b4c3dc1a4d382f2631f73d96155c8de58c23fd87605514af287fe0c6e519df13

Source Code:

var stepcarousel={ajaxloadingmsg:'<div style="margin: 1em; font-weight: bold"><img src="ajaxloadr.gif" style="vertical-align: middle" /> Fetching Content. Please wait...</div>',defaultbuttonsfade:.4,configholder:{},getCSSValue:function(a){return"auto"==a?0:parseInt(a)},getremotepanels:function(a,b){b.$belt.html(this.ajaxloadingmsg),a.ajax({url:b.contenttype[1],async:!0,error:function(a){b.$belt.html("Error fetching content.<br />Server Response: "+a.responseText)},success:function(c){b.$belt.html(c),b.$panels=b.$gallery.find("."+b.panelclass),stepcarousel.alignpanels(a,b)}})},getoffset:function(a,b){return a.offsetParent?a[b]+this.getoffset(a.offsetParent,b):a[b]},getCookie:function(a){var b=new RegExp(a+"=[^;]+","i");return document.cookie.match(b)?document.cookie.match(b)[0].split("=")[1]:null},setCookie:function(a,b){document.cookie=a+"="+b},fadebuttons:function(a,b){a.$leftnavbutton.fadeTo("fast",0==b?this.defaultbuttonsfade:1),a.$rightnavbutton.fadeTo("fast",b==a.lastvisiblepanel?this.defaultbuttonsfade:1)},addnavbuttons:function(a,b){return a.$leftnavbutton=jQuery('<img src="'+a.defaultbuttons.leftnav[0]+'">').css({zIndex:50,position:"absolute",left:a.offsets.left+a.defaultbuttons.leftnav[1]+"px",top:a.offsets.top+a.defaultbuttons.leftnav[2]+"px",cursor:"hand",cursor:"pointer"}).attr({title:""+a.defaultbuttons.moveby+" geri"}).appendTo("body"),a.$rightnavbutton=jQuery('<img src="'+a.defaultbuttons.rightnav[0]+'">').css({zIndex:50,position:"absolute",left:a.offsets.left+a.$gallery.get(0).offsetWidth+a.defaultbuttons.rightnav[1]+"px",top:a.offsets.top+a.defaultbuttons.rightnav[2]+"px",cursor:"hand",cursor:"pointer"}).attr({title:""+a.defaultbuttons.moveby+" ileri"}).appendTo("body"),a.$leftnavbutton.bind("click",function(){stepcarousel.stepBy(a.galleryid,-a.defaultbuttons.moveby)}),a.$rightnavbutton.bind("click",function(){stepcarousel.stepBy(a.galleryid,a.defaultbuttons.moveby)}),0==a.panelbehavior.wraparound&&this.fadebuttons(a,b),a.$leftnavbutton.add(a.$rightnavbutton)},stopautostep:function(a){clearTimeout(a.steptimer),clearTimeout(a.resumeautostep)},alignpanels:function(a,b){var c=0;b.paneloffsets=[c],b.panelwidths=[],b.$panels.each(function(d){var e=a(this);e.css({float:"none",position:"absolute",left:c+"px"}),e.bind("click",function(a){return b.onpanelclick(a.target)}),c+=stepcarousel.getCSSValue(e.css("marginRight"))+parseInt(e.get(0).offsetWidth||e.css("width")),b.paneloffsets.push(c),b.panelwidths.push(c-b.paneloffsets[b.paneloffsets.length-2])}),b.paneloffsets.pop();var d=0,e=b.$panels.length-1;b.lastvisiblepanel=e;for(var f=b.$panels.length-1;f>=0;f--)d+=f==e?b.panelwidths[e]:b.paneloffsets[f+1]-b.paneloffsets[f],b.gallerywidth>d&&(b.lastvisiblepanel=f);if(b.$belt.css({width:c+"px"}),b.currentpanel=b.panelbehavior.persist?parseInt(this.getCookie(window[b.galleryid+"persist"])):0,b.currentpanel="number"==typeof b.currentpanel&&b.currentpanel<b.$panels.length?b.currentpanel:0,0!=b.currentpanel){var g=b.paneloffsets[b.currentpanel]+(0==b.currentpanel?0:b.beltoffset);b.$belt.css({left:-g+"px"})}if(1==b.defaultbuttons.enable){var h=this.addnavbuttons(b,b.currentpanel);a(window).bind("load resize",function(){b.offsets={left:stepcarousel.getoffset(b.$gallery.get(0),"offsetLeft"),top:stepcarousel.getoffset(b.$gallery.get(0),"offsetTop")},b.$leftnavbutton.css({left:b.offsets.left+b.defaultbuttons.leftnav[1]+"px",top:b.offsets.top+b.defaultbuttons.leftnav[2]+"px"}),b.$rightnavbutton.css({left:b.offsets.left+b.$gallery.get(0).offsetWidth+b.defaultbuttons.rightnav[1]+"px",top:b.offsets.top+b.defaultbuttons.rightnav[2]+"px"})})}if(b.autostep&&b.autostep.enable){var i=b.$gallery.add("undefined"!=typeof h?h:null);i.bind("click",function(){stepcarousel.stopautostep(b),b.autostep.status="stopped"}),i.hover(function(){stepcarousel.stopautostep(b),b.autostep.hoverstate="over"},function(){b.steptimer&&"over"==b.autostep.hoverstate&&"stopped"!=b.autostep.status&&(b.resumeautostep=setTimeout(function(){stepcarousel.autorotate(b.galleryid),b.autostep.hoverstate="out"},500))}),b.steptimer=setTimeout(function(){stepcarousel.autorotate(b.galleryid)},b.autostep.pause)}this.statusreport(b.galleryid),b.oninit(),b.onslideaction(this)},stepTo:function(a,b){var c=stepcarousel.configholder[a];if("undefined"==typeof c)return void alert("There's an error with your set up of Carousel Viewer \""+a+'"!');stepcarousel.stopautostep(c);var b=Math.min(b-1,c.paneloffsets.length-1),d=c.paneloffsets[b]+(0==b?0:c.beltoffset);0==c.panelbehavior.wraparound&&1==c.defaultbuttons.enable&&this.fadebuttons(c,b),c.$belt.animate({left:-d+"px"},c.panelbehavior.speed,function(){c.onslideaction(this)}),c.currentpanel=b,this.statusreport(a)},stepBy:function(a,b){var c=stepcarousel.configholder[a];if("undefined"==typeof c)return void alert("There's an error with your set up of Carousel Viewer \""+a+'"!');stepcarousel.stopautostep(c);var d=b>0?"forward":"back",e=c.currentpanel+b;0==c.panelbehavior.wraparound?(e="back"==d&&e<=0?0:"forward"==d?Math.min(e,c.lastvisiblepanel):e,1==c.defaultbuttons.enable&&stepcarousel.fadebuttons(c,e)):e>c.lastvisiblepanel&&"forward"==d?e=c.currentpanel<c.lastvisiblepanel?c.lastvisiblepanel:0:e<0&&"back"==d&&(e=c.currentpanel>0?0:c.lastvisiblepanel);var f=c.paneloffsets[e]+(0==e?0:c.beltoffset);0==e&&"forward"==d||0==c.currentpanel&&"back"==d&&1==c.panelbehavior.wraparound?c.$belt.animate({left:-c.paneloffsets[c.currentpanel]-("forward"==d?100:-30)+"px"},"normal",function(){c.$belt.animate({left:-f+"px"},c.panelbehavior.speed,function(){c.onslideaction(this)})}):c.$belt.animate({left:-f+"px"},c.panelbehavior.speed,function(){c.onslideaction(this)}),c.currentpanel=e,this.statusreport(a)},autorotate:function(a){var b=stepcarousel.configholder[a];"yes"!=b.$gallery.attr("_ismouseover")&&this.stepBy(a,b.autostep.moveby),b.steptimer=setTimeout(function(){stepcarousel.autorotate(a)},b.autostep.pause)},statusreport:function(a){for(var b=stepcarousel.configholder[a],c=b.currentpanel,d=0,e=c;e<b.paneloffsets.length&&(d+=b.panelwidths[e],!(d>b.gallerywidth));e++);c+=1,e=e+1==c?c:e;for(var f=[c,e,b.panelwidths.length],g=0;g<b.statusvars.length;g++)window[b.statusvars[g]]=f[g],b.$statusobjs[g].text(f[g]+" ")},setup:function(a){document.write('<style type="text/css">\n#'+a.galleryid+"{overflow: hidden;}\n</style>"),jQuery(document).ready(function(b){a.$gallery=b("#"+a.galleryid),a.gallerywidth=a.$gallery.width(),a.offsets={left:stepcarousel.getoffset(a.$gallery.get(0),"offsetLeft"),top:stepcarousel.getoffset(a.$gallery.get(0),"offsetTop")},a.$belt=a.$gallery.find("."+a.beltclass),a.$panels=a.$gallery.find("."+a.panelclass),a.panelbehavior.wraparound=!(!a.autostep||!a.autostep.enable)||a.panelbehavior.wraparound,a.onpanelclick="undefined"==typeof a.onpanelclick?function(a){}:a.onpanelclick,a.onslideaction="undefined"==typeof a.onslide?function(){}:function(c){b(c).stop(),a.onslide()},a.oninit="undefined"==typeof a.oninit?function(){}:a.oninit,a.beltoffset=stepcarousel.getCSSValue(a.$belt.css("marginLeft")),a.statusvars=a.statusvars||[],a.$statusobjs=[b("#"+a.statusvars[0]),b("#"+a.statusvars[1]),b("#"+a.statusvars[2])],a.currentpanel=0,stepcarousel.configholder[a.galleryid]=a,"ajax"==a.contenttype[0]&&"undefined"!=typeof a.contenttype[1]?stepcarousel.getremotepanels(b,a):stepcarousel.alignpanels(b,a)}),jQuery(window).bind("unload",function(){a.panelbehavior.persist&&stepcarousel.setCookie(window[a.galleryid+"persist"],a.currentpanel),jQuery.each(a,function(a,b){b=null}),a=null})}};