/** auto generated js file do not edit by hand */
/** js/jquery.stepcarousel.js */
jQuery.noConflict();var stepcarousel={ajaxloadingmsg:'<div style="margin: 1em; font-weight: bold"><img src="ajaxloadr.gif" style="vertical-align: middle" /> Fetching Content. Please wait...</div>',configholder:{},getCSSValue:function(a){return(a=="auto")?0:parseInt(a)},getremotepanels:function(b,a){a.$belt.html(this.ajaxloadingmsg);b.ajax({url:a.contenttype[1],async:true,error:function(c){a.$belt.html("Error fetching content.<br />Server Response: "+c.responseText)},success:function(c){a.$belt.html(c);a.$panels=a.$gallery.find("."+a.panelclass);stepcarousel.alignpanels(b,a)}})},alignpanels:function(c,b){var a=0;b.paneloffsets=[a];b.panelwidths=[];b.$panels.each(function(d){var e=c(this);e.css({"float":"none",position:"absolute",left:a+"px",display:"block"});e.bind("click",function(f){return b.onpanelclick(f.target)});a+=stepcarousel.getCSSValue(e.css("marginRight"))+parseInt(e.get(0).offsetWidth);b.paneloffsets.push(a);b.panelwidths.push(a-b.paneloffsets[b.paneloffsets.length-2])});b.paneloffsets.pop();b.$belt.css({width:a+"px"});this.statusreport(b.galleryid);b.oninit();b.onslideaction(this)},stepTo:function(c,b){var a=stepcarousel.configholder[c];if(typeof a=="undefined"){alert("There's an error with your set up of Carousel Viewer \""+c+'"!');return}document.getElementById(c+"LabelText"+(a.currentpanel+1)).className="caroNavBarItem";document.getElementById(c+"RightEdge"+(a.currentpanel+1)).className="rightEdgeEmpty";document.getElementById(c+"LabelText"+b).className="caroNavBarItemSelected";document.getElementById(c+"RightEdge"+b).className="rightEdge";var d=Math.min(b-1,a.paneloffsets.length-1);var e=a.paneloffsets[d]+(d===0?0:a.beltoffset);a.$belt.animate({left:-e+"px"},"slow",function(){a.onslideaction(this)});a.currentpanel=d;this.statusreport(c)},stepBy:function(d,a){var c=stepcarousel.configholder[d];if(typeof c=="undefined"){alert("There's an error with your set up of Carousel Viewer \""+d+'"!');return}var e=(a>0)?"forward":"back";var b=c.currentpanel+a;b=(b>c.paneloffsets.length-1||b<0&&b-a>0)?0:(b<0)?c.paneloffsets.length+a:b;var f=c.paneloffsets[b]+(b===0?0:c.beltoffset);if(b===0&&e=="forward"||c.currentpanel===0&&e=="back"){c.$belt.animate({left:-c.paneloffsets[c.currentpanel]-(e=="forward"?100:-30)+"px"},"normal",function(){c.$belt.animate({left:-f+"px"},"slow",function(){c.onslideaction(this)})})}else{c.$belt.animate({left:-f+"px"},"slow",function(){c.onslideaction(this)})}c.currentpanel=b;this.statusreport(d)},statusreport:function(d){var b=stepcarousel.configholder[d];var a=b.currentpanel;var e=0;for(var f=a;f<b.paneloffsets.length;f++){e+=b.panelwidths[f];if(e>b.gallerywidth){break}}a+=1;f=(f+1==a)?a:f;var g=[a,f,b.panelwidths.length];for(var c=0;c<b.statusvars.length;c++){window[b.statusvars[c]]=g[c];b.$statusobjs[c].html(g[c])}},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.$belt=a.$gallery.find("."+a.beltclass);a.$panels=a.$gallery.find("."+a.panelclass);a.onpanelclick=(typeof a.onpanelclick=="undefined")?function(c){}:a.onpanelclick;a.onslideaction=(typeof a.onslide=="undefined")?function(){}:function(c){b(c).stop();a.onslide()};a.oninit=(typeof a.oninit=="undefined")?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;if(a.contenttype[0]=="ajax"&&typeof a.contenttype[1]!="undefined"){stepcarousel.getremotepanels(b,a)}else{stepcarousel.alignpanels(b,a)}});jQuery(window).bind("unload",function(){jQuery.each(a,function(b,c){c=null});a=null})}};

