(function(d){d.fn.slides=function(a){a=d.extend({},d.fn.slides.option,a);return this.each(function(){function j(f,j,n){if(!o&&s){o=!0;a.animationStart(k+1);switch(f){case "next":l=k;e=k+1;e=g===e?0:e;q=2*h;f=2*-h;k=e;break;case "prev":l=k;e=k-1;e=-1===e?g-1:e;f=q=0;k=e;break;case "pagination":e=parseInt(n,10),l=d("."+a.paginationClass+" li."+a.currentClass+" a",c).attr("href").match("[^#/]+$"),e>l?(q=2*h,f=2*-h):f=q=0,k=e}"fade"===j?a.crossfade?b.children(":eq("+e+")",c).css({zIndex:10}).fadeIn(a.fadeSpeed, a.fadeEasing,function(){a.autoHeight?b.animate({height:b.children(":eq("+e+")",c).outerHeight()},a.autoHeightSpeed,function(){b.children(":eq("+l+")",c).css({display:"none",zIndex:0});b.children(":eq("+e+")",c).css({zIndex:0});a.animationComplete(e+1);o=!1}):(b.children(":eq("+l+")",c).css({display:"none",zIndex:0}),b.children(":eq("+e+")",c).css({zIndex:0}),a.animationComplete(e+1),o=!1)}):b.children(":eq("+l+")",c).fadeOut(a.fadeSpeed,a.fadeEasing,function(){a.autoHeight?b.animate({height:b.children(":eq("+ e+")",c).outerHeight()},a.autoHeightSpeed,function(){b.children(":eq("+e+")",c).fadeIn(a.fadeSpeed,a.fadeEasing)}):b.children(":eq("+e+")",c).fadeIn(a.fadeSpeed,a.fadeEasing,function(){d.browser.msie&&d(this).get(0).style.removeAttribute("filter")});a.animationComplete(e+1);o=!1}):(b.children(":eq("+e+")").css({left:q,display:"block"}),a.autoHeight?b.animate({left:f,height:b.children(":eq("+e+")").outerHeight()},a.slideSpeed,a.slideEasing,function(){b.css({left:-h});b.children(":eq("+e+")").css({left:h, zIndex:5});b.children(":eq("+l+")").css({left:h,display:"none",zIndex:0});a.animationComplete(e+1);o=!1}):b.animate({left:f},a.slideSpeed,a.slideEasing,function(){b.css({left:-h});b.children(":eq("+e+")").css({left:h,zIndex:5});b.children(":eq("+l+")").css({left:h,display:"none",zIndex:0});a.animationComplete(e+1);o=!1}));a.pagination&&(d("."+a.paginationClass+" li."+a.currentClass,c).removeClass(a.currentClass),d("."+a.paginationClass+" li:eq("+e+")",c).addClass(a.currentClass))}}function m(){a.pause? (clearTimeout(c.data("pause")),clearInterval(c.data("interval")),v=setTimeout(function(){clearTimeout(c.data("pause"));t=setInterval(function(){j("next",n)},a.play);c.data("interval",t)},a.pause),c.data("pause",v)):clearInterval(c.data("interval"))}d("."+a.container,d(this)).children().wrapAll('
');var c=d(this),b=d(".slides_control",c),g=b.children().size(),h=b.children().outerWidth(),u=b.children().outerHeight(),f=a.start-1,n=0>a.effect.indexOf(",")?a.effect:a.effect.replace(" ", "").split(",")[0],w=0>a.effect.indexOf(",")?n:a.effect.replace(" ","").split(",")[1],e=0,l=0,r=0,k=0,s,o,p,q,x,v,t;2>g?(d("."+a.container,d(this)).fadeIn(a.fadeSpeed,a.fadeEasing,function(){s=!0;a.slidesLoaded()}),d("."+a.next+", ."+a.prev).fadeOut(0)):2>g||(0>f&&(f=0),f>g&&(f=g-1),a.start&&(k=f),a.randomize&&b.randomize(),d("."+a.container,c).css({overflow:"hidden",position:"relative"}),b.children().css({position:"absolute",top:0,left:b.children().outerWidth(),zIndex:0,display:"none"}),b.css({position:"relative", width:3*h,height:u,left:-h}),d("."+a.container,c).css({display:"block"}),a.autoHeight&&(b.children().css({height:"auto"}),b.animate({height:b.children(":eq("+f+")").outerHeight()},a.autoHeightSpeed)),a.preload&&b.find("img:eq("+f+")").length?(d("."+a.container,c).css({background:"url("+a.preloadImage+") no-repeat 50% 50%"}),u=b.find("img:eq("+f+")").attr("src")+"?"+(new Date).getTime(),x="slides_control"!=d("img",c).parent().attr("class")?b.children(":eq(0)")[0].tagName.toLowerCase():b.find("img:eq("+ f+")"),b.find("img:eq("+f+")").attr("src",u).load(function(){b.find(x+":eq("+f+")").fadeIn(a.fadeSpeed,a.fadeEasing,function(){d(this).css({zIndex:5});d("."+a.container,c).css({background:""});s=!0;a.slidesLoaded()})})):b.children(":eq("+f+")").fadeIn(a.fadeSpeed,a.fadeEasing,function(){s=!0;a.slidesLoaded()}),a.bigTarget&&(b.children().css({cursor:"pointer"}),b.children().click(function(){j("next",n);return!1})),a.hoverPause&&a.play&&(b.bind("mouseover",function(){clearInterval(c.data("interval"))}), b.bind("mouseleave",function(){m()})),a.generateNextPrev&&(d("."+a.container,c).after('Prev'),d("."+a.prev,c).after('Next')),d("."+a.next,c).click(function(b){b.preventDefault();a.play&&m();j("next",n)}),d("."+a.prev,c).click(function(b){b.preventDefault();a.play&&m();j("prev",n)}),a.generatePagination?(a.prependPagination?c.prepend(""):c.append(""),b.children().each(function(){d("."+ a.paginationClass,c).append('
  • '+(r+1)+"
  • ");r++})):d("."+a.paginationClass+" li a",c).each(function(){d(this).attr("href","#"+r);r++}),d("."+a.paginationClass+" li:eq("+f+")",c).addClass(a.currentClass),d("."+a.paginationClass+" li a",c).click(function(){a.play&&m();p=d(this).attr("href").match("[^#/]+$");k!=p&&j("pagination",w,p);return!1}),d("a.link",c).click(function(){a.play&&m();p=d(this).attr("href").match("[^#/]+$")-1;k!=p&&j("pagination",w,p);return!1}),a.play&& (t=setInterval(function(){j("next",n)},a.play),c.data("interval",t)))})};d.fn.slides.option={preload:!1,preloadImage:"/img/loading.gif",container:"slides_container",generateNextPrev:!1,next:"next",prev:"prev",pagination:!0,generatePagination:!0,prependPagination:!1,paginationClass:"pagination",currentClass:"current",fadeSpeed:350,fadeEasing:"",slideSpeed:350,slideEasing:"",start:1,effect:"slide",crossfade:!1,randomize:!1,play:0,pause:0,hoverPause:!1,autoHeight:!1,autoHeightSpeed:350,bigTarget:!1, animationStart:function(){},animationComplete:function(){},slidesLoaded:function(){}};d.fn.randomize=function(a){function j(){return Math.round(Math.random())-0.5}return d(this).each(function(){var m=d(this),c=m.children(),b=c.length;if(1