2008-03-15 23:57:47 +01:00
|
|
|
jQuery(document).ready( function() {
|
2008-01-09 13:12:35 +01:00
|
|
|
// pulse
|
2008-03-02 21:17:30 +01:00
|
|
|
jQuery('.fade').animate( { backgroundColor: '#ffffe0' }, 300).animate( { backgroundColor: '#fffbcc' }, 300).animate( { backgroundColor: '#ffffe0' }, 300).animate( { backgroundColor: '#fffbcc' }, 300);
|
2008-01-10 23:42:49 +01:00
|
|
|
|
2008-08-20 23:42:31 +02:00
|
|
|
// show things that should be visible, hide what should be hidden
|
2008-08-21 08:42:19 +02:00
|
|
|
jQuery('.hide-if-no-js').removeClass('hide-if-no-js');
|
2008-08-20 23:42:31 +02:00
|
|
|
jQuery('.hide-if-js').hide();
|
2008-03-12 06:50:07 +01:00
|
|
|
|
|
|
|
// Basic form validation
|
|
|
|
if ( ( 'undefined' != typeof wpAjax ) && jQuery.isFunction( wpAjax.validateForm ) ) {
|
2008-03-18 20:20:18 +01:00
|
|
|
jQuery('form.validate').submit( function() { return wpAjax.validateForm( jQuery(this) ); } );
|
2008-03-12 06:50:07 +01:00
|
|
|
}
|
2008-11-08 11:17:45 +01:00
|
|
|
|
|
|
|
// Move .updated and .error alert boxes
|
|
|
|
jQuery('div.wrap h2 ~ div.updated, div.wrap h2 ~ div.error').addClass('below-h2');
|
|
|
|
jQuery('div.updated, div.error').not('.below-h2').insertAfter('div.wrap h2:first');
|
|
|
|
|
2008-01-10 23:42:49 +01:00
|
|
|
});
|
2008-11-07 04:13:50 +01:00
|
|
|
|
|
|
|
// stub for doing better warnings
|
|
|
|
(function($){
|
|
|
|
showNotice = {
|
|
|
|
warn : function(text) {
|
|
|
|
if ( confirm(text) )
|
|
|
|
return true;
|
|
|
|
|
|
|
|
return false;
|
|
|
|
},
|
|
|
|
|
|
|
|
note : function(text) {
|
|
|
|
alert(text);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})(jQuery);
|
|
|
|
|
2008-08-31 15:51:52 +02:00
|
|
|
/*
|
|
|
|
(function($) {
|
|
|
|
$.fn.tTips = function() {
|
2008-03-15 17:53:36 +01:00
|
|
|
|
2008-08-31 15:51:52 +02:00
|
|
|
$('body').append('<div id="tTips"><p id="tTips_inside"></p></div>');
|
|
|
|
var TT = $('#tTips');
|
2008-03-15 17:53:36 +01:00
|
|
|
|
|
|
|
this.each(function() {
|
2008-08-31 15:51:52 +02:00
|
|
|
var el = $(this), txt;
|
2008-08-09 07:36:14 +02:00
|
|
|
|
2008-03-15 17:53:36 +01:00
|
|
|
if ( txt = el.attr('title') ) el.attr('tip', txt).removeAttr('title');
|
|
|
|
else return;
|
|
|
|
el.find('img').removeAttr('alt');
|
|
|
|
|
|
|
|
el.mouseover(function(e) {
|
2008-08-20 23:42:31 +02:00
|
|
|
txt = el.attr('tip'), o = el.offset();
|
2008-03-15 17:53:36 +01:00
|
|
|
|
|
|
|
clearTimeout(TT.sD);
|
|
|
|
TT.find('p').html(txt);
|
|
|
|
|
|
|
|
TT.css({'top': o.top - 43, 'left': o.left - 5});
|
|
|
|
TT.sD = setTimeout(function(){TT.fadeIn(150);}, 100);
|
|
|
|
});
|
|
|
|
|
|
|
|
el.mouseout(function() {
|
|
|
|
clearTimeout(TT.sD);
|
|
|
|
TT.css({display : 'none'});
|
|
|
|
})
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}(jQuery));
|
2008-08-31 15:51:52 +02:00
|
|
|
*/
|
2008-08-20 23:42:31 +02:00
|
|
|
|
2008-08-31 15:51:52 +02:00
|
|
|
//jQuery(function(){jQuery('#media-buttons a').tTips();});
|