// What is $(document).ready ? See: http://flowplayer.org/tools/documentation/basics.html#document_ready
$(document).ready(function() {

// create custom animation algorithm for jQuery called "drop" 

$.easing.drop = function (x, t, b, c, d) {
	return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;
};



// loading animation
$.tools.overlay.addEffect("drop", function(css, done) { 
   
   // use Overlay API to gain access to crucial elements
   var conf = this.getConf(),
       overlay = this.getOverlay();           
   
   // determine initial position for the overlay
   if (conf.fixed)  {
      css.position = 'fixed';
   } else {
      css.top += $(window).scrollTop();
      css.left += $(window).scrollLeft();
      css.position = 'absolute';
   } 
   
   // position the overlay and show it
   overlay.css(css).show();
   
   // begin animating with our custom easing
   overlay.animate({opacity: 1}, 150, 'drop', done);
   
   // closing animation 
   }, function(done) {
      this.getOverlay().animate({opacity:0}, 150, 'drop', function() {
         $(this).hide();
         done.call();      
      });
   }
);

$("a[longdesc]").overlay({
	effect: 'drop',
	mask: '#e0edfd'
});


});
