jQuery.extend(jQuery.easing,{easeOutExpo:function(e,f,a,h,g){return(f==g)?a+h:h*(-Math.pow(2,-10*f/g)+1)+a}});var Cycle=function(m){var e={};var m=$.extend(e,m);var g=$(m.MainPicSel).length;var f=1;var l=0;var b=5000;var h=300;function a(){f=parseInt(f);var q=1+f;if(q>g){q=1}if(l==0){l=1;k();return}else{var p=$(m.MainPicSel+"["+m.GroupAttrName+"='"+q+"']").parents("a:first");var o=f;var n=q;$(m.MainPicSel+"["+m.GroupAttrName+"='"+o+"']").parents("a:first").fadeOut("fast",function(){p.fadeIn("fast");j(q);x(q);if(f>=g){f=1}else{f++}})}k()}function c(n){if(f==n){return}if(n<0||n>g){return false}if(window.lbt){clearTimeout(window.lbt)}window.lbt=setTimeout(function(){d(n)},h)}var d=function(q){var p=$(m.MainPicSel+"["+m.GroupAttrName+"='"+q+"']").parents("a:first");var o=f;var n=q;$(m.MainPicSel+"["+m.GroupAttrName+"='"+o+"']").parents("a:first").fadeOut("fast",function(){p.fadeIn("fast");j(q);x(q);f=q})};function j(n){for(i=1;i<=g;i++){$(m.ControlSel+"["+m.GroupAttrName+"='"+i+"']").removeClass("cur")}$(m.ControlSel+"["+m.GroupAttrName+"='"+n+"']").addClass("cur")}function x(n){for(i=1;i<=g;i++){$(m.ControlSeltxt+"["+m.GroupAttrName+"='"+i+"']").removeClass("cur1")}$(m.ControlSeltxt+"["+m.GroupAttrName+"='"+n+"']").addClass("cur1")}function k(){if(window.lbt){clearTimeout(window.lbt)}window.lbt=setTimeout(function(){a()},b)}a();$(m.ControlSel).each(function(){$(this).mouseover(function(){c($(this).attr("gid"))}).mouseout(function(){k()})})};$(document).ready(function(){var e=new Cycle({MainPicSel:"#top_ad_img a img",ControlSel:"#top_ad_txt li",ControlSeltxt:"#top_ad_txt1 a",GroupAttrName:"gid"});});
