//// JQUERY PLUGIN - EASING ($jsmart||jQuery).easing={easein:function(x,t,b,c,d){return c*(t/=d)*t+b},easeinout:function(x,t,b,c,d){if(t0 ? go(curr-o.scroll) : go(curr+o.scroll); }); if(o.auto) setInterval(function() { go(curr+o.scroll); }, o.auto+o.speed); function setCssDiv(){ }; function vis() { return li.slice(curr).slice(0,v); }; function go(to) { var countslide var buttons = $('#image_button'+o.moduleId).children(); var lengthButtons = buttons.length; $.each(buttons , function(key, val){++key; if(($(val).attr('class')=='button_img_selected')) { $(val).removeClass("button_img_selected");$(val).addClass("button_img"); } if(to==key) { $(val).removeClass("button_img");$(val).addClass("button_img_selected"); } if(to==0) { if(key == lengthButtons) $(val).removeClass("button_img");$(val).addClass("button_img_selected"); } if(to==-1) { if(key == (lengthButtons-1)) $(val).removeClass("button_img");$(val).addClass("button_img_selected"); } if(to == (lengthButtons+1)) { if(key == 1) $(val).removeClass("button_img");$(val).addClass("button_img_selected"); } if(to == (lengthButtons+2)) { if(key == 2) $(val).removeClass("button_img");$(val).addClass("button_img_selected"); } }); if(!running) { if(o.beforeStart) o.beforeStart.call(this, vis()); if(o.circular) { // If circular we are in first or last, then goto the other end if(to<=o.start-v-1) { // If first, then goto last ul.css(animCss, -((itemLength-(v*2))*liSize)+"px"); // If "scroll" > 1, then the "to" might not be equal to the condition; it can be lesser depending on the number of elements. curr = to==o.start-v-1 ? itemLength-(v*2)-1 : itemLength-(v*2)-o.scroll; } else if(to>=itemLength-v+1) { // If last, then goto first ul.css(animCss, -( (v) * liSize ) + "px" ); // If "scroll" > 1, then the "to" might not be equal to the condition; it can be greater depending on the number of elements. curr = to==itemLength-v+1 ? v+1 : v+o.scroll; } else curr = to; } else { // If non-circular and to points to first or last, we just return. if(to<0 || to>itemLength-v) return; else curr = to; } // If neither overrides it, the curr will still be "to" and we can proceed. running = true; ul.animate( animCss == "left" ? { left: -(curr*liSize) } : { top: -(curr*liSize) } , o.speed, o.easing, function() { if(o.afterEnd) o.afterEnd.call(this, vis()); running = false; } ); // Disable buttons when the carousel reaches the last/first, and enable when not if(!o.circular) { $(o.btnPrev + "," + o.btnNext).removeClass("disabled"); $( (curr-o.scroll<0 && o.btnPrev) || (curr+o.scroll > itemLength-v && o.btnNext) || [] ).addClass("disabled"); } } return false; }; }); }; function css(el, prop) { return parseInt($.css(el[0], prop)) || 0; }; function width(el) { return el[0].offsetWidth + css(el, 'marginLeft') + css(el, 'marginRight'); }; function height(el) { BrowserDetect.init(); var maxLength = 0; var liLength = 0; var arrValue = []; var subValue = 0; if((BrowserDetect.browser=="Explorer") && (BrowserDetect.version==6)){ for(var i=0;i