home *** CD-ROM | disk | FTP | other *** search
/ Cricao de Sites - 650 Layouts Prontos / WebMasters.iso / Blogs / wordpress2.6.exe / wordpress2.6 / wp-admin / js / common.js < prev    next >
Encoding:
JavaScript  |  2008-03-18  |  1.3 KB  |  46 lines

  1. jQuery(document).ready( function() {
  2.     // pulse
  3.     jQuery('.fade').animate( { backgroundColor: '#ffffe0' }, 300).animate( { backgroundColor: '#fffbcc' }, 300).animate( { backgroundColor: '#ffffe0' }, 300).animate( { backgroundColor: '#fffbcc' }, 300);
  4.  
  5.     // Reveal
  6.     jQuery('.wp-no-js-hidden').removeClass( 'wp-no-js-hidden' );
  7.  
  8.     // Basic form validation
  9.     if ( ( 'undefined' != typeof wpAjax ) && jQuery.isFunction( wpAjax.validateForm ) ) {
  10.         jQuery('form.validate').submit( function() { return wpAjax.validateForm( jQuery(this) ); } );
  11.     }
  12. });
  13.  
  14. (function(JQ) {
  15.     JQ.fn.tTips = function() {
  16.  
  17.         JQ('body').append('<div id="tTips"><p id="tTips_inside"></p></div>');
  18.         var TT = JQ('#tTips');
  19.  
  20.         this.each(function() {
  21.             var el = JQ(this), txt;
  22.             
  23.             if ( txt = el.attr('title') ) el.attr('tip', txt).removeAttr('title');
  24.             else return;
  25.             el.find('img').removeAttr('alt');
  26.  
  27.             el.mouseover(function(e) {
  28.                 txt = el.attr('tip'), o = el.offset();;
  29.  
  30.                 clearTimeout(TT.sD);
  31.                 TT.find('p').html(txt);
  32.  
  33.                 TT.css({'top': o.top - 43, 'left': o.left - 5});
  34.                 TT.sD = setTimeout(function(){TT.fadeIn(150);}, 100);
  35.             });
  36.  
  37.             el.mouseout(function() {
  38.                 clearTimeout(TT.sD);
  39.                 TT.css({display : 'none'});
  40.             })
  41.         });
  42.     }
  43. }(jQuery));
  44.  
  45. jQuery(function(){jQuery('#media-buttons a').tTips();});
  46.