// JavaScript Document (function($){ $.fn.floatad = function(){ var flH = $(".floatAD").height(); $(".floatAD").css({"margin-top":0}); setTimeout(out, 15000); $(".floatAD").children("span").click(function(){ $(this).parent("div.floatAD").hide(); }); }; function out(){ $('.floatAD').animate({top:'0'}, 500, function(){ $(this).css({display:'none', top:'100px'}); }); } })(jQuery); $(".floatleft_ad").floatad(); $(".floatright_ad").floatad();