').appendTo('body').remove();base.$wrapper=base.$el.parent().closest('div.anythingSlider').addClass('anythingSlider-'+o.theme);base.$outer=base.$wrapper.parent();base.$window=base.$el.closest('div.anythingWindow');base.$win=$(win);base.$controls=$('
');base.$nav=$('');base.$startStop=$('');if(o.buildStartStop||o.buildNavigation){base.$controls.appendTo((o.appendControlsTo&&$(o.appendControlsTo).length)?$(o.appendControlsTo):base.$wrapper);}if(o.buildNavigation){base.$nav.appendTo((o.appendNavigationTo&&$(o.appendNavigationTo).length)?$(o.appendNavigationTo):base.$controls);}if(o.buildStartStop){base.$startStop.appendTo((o.appendStartStopTo&&$(o.appendStartStopTo).length)?$(o.appendStartStopTo):base.$controls);}base.runTimes=$('.anythingBase').length;base.regex=(o.hashTags)?new RegExp('panel'+base.runTimes+'-(\\d+)','i'):null;if(base.runTimes===1){base.makeActive();}base.flag=false;if(o.autoPlayLocked){o.autoPlay=true;}base.playing=o.autoPlay;base.slideshow=false;base.hovered=false;base.panelSize=[];base.currentPage=base.targetPage=o.startPanel=parseInt(o.startPanel,10)||1;o.changeBy=parseInt(o.changeBy,10)||1;t=(o.mode||'h').toLowerCase().match(/(h|v|f)/);t=o.vertical?'v':(t||['h'])[0];o.mode=t==='v'?'vertical':t==='f'?'fade':'horizontal';if(t==='f'){o.showMultiple=1;o.infiniteSlides=false;}base.adj=(o.infiniteSlides)?0:1;base.adjustMultiple=0;if(o.playRtl){base.$wrapper.addClass('rtl');}if(o.buildStartStop){base.buildAutoPlay();}if(o.buildArrows){base.buildNextBackButtons();}base.$lastPage=base.$targetPage=base.$currentPage;if(o.expand){if(o.aspectRatio===true){o.aspectRatio=base.$el.width()/base.$el.height();}else if(typeof o.aspectRatio==='string'&&o.aspectRatio.indexOf(':')!==-1){var f=o.aspectRatio.split(':');o.aspectRatio=f[0]/f[1];}if(o.aspectRatio>0&&o.showMultiple>1){o.aspectRatio=o.aspectRatio*o.showMultiple;}}base.updateSlider();if(o.expand){base.$window.css({width:'100%',height:'100%'});base.checkResize();}if(!$.isFunction($.easing[o.easing])){o.easing="swing";}if(o.pauseOnHover){base.$wrapper.hover(function(){if(base.playing){base.$el.trigger('slideshow_paused',base);base.clearTimer(true);}},function(){if(base.playing){base.$el.trigger('slideshow_unpaused',base);base.startStop(base.playing,true);}});}base.slideControls(false);base.$wrapper.bind('mouseenter mouseleave',function(e){$(this)[e.type==='mouseenter'?'addClass':'removeClass']('anythingSlider-hovered');base.hovered=(e.type==='mouseenter')?true:false;base.slideControls(base.hovered);});$(doc).keyup(function(e){if(o.enableKeyboard&&base.$wrapper.hasClass('activeSlider')&&!e.target.tagName.match('TEXTAREA|INPUT|SELECT')){if(o.mode!=='vertical'&&(e.which===38||e.which===40)){return;}switch(e.which){case 39:case 40:base.goForward();break;case 37:case 38:base.goBack();break;}}});base.currentPage=((o.hashTags)?base.gotoHash():'')||o.startPanel||1;base.gotoPage(base.currentPage,false,null,-1);var triggers="slideshow_resized slideshow_paused slideshow_unpaused slide_init slide_begin slideshow_stop slideshow_start initialized swf_completed".split(" ");$.each("onSliderResize onShowPause onShowUnpause onSlideInit onSlideBegin onShowStop onShowStart onInitialized onSWFComplete".split(" "),function(i,f){if($.isFunction(o[f])){base.$el.bind(triggers[i],o[f]);}});if($.isFunction(o.onSlideComplete)){base.$el.bind('slide_complete',function(){setTimeout(function(){o.onSlideComplete(base);},0);return false;});}base.initialized=true;base.$el.trigger('initialized',base);base.startStop(o.autoPlay);};base.updateSlider=function(){base.$el.children('.cloned').remove();base.navTextVisible=base.$nav.find('span:first').css('visibility')!=='hidden';base.$nav.empty();base.currentPage=base.currentPage||1;base.$items=base.$el.children();base.pages=base.$items.length;base.dir=(o.mode==='vertical')?'top':'left';o.showMultiple=parseInt(o.showMultiple,10)||1;o.navigationSize=(o.navigationSize===false)?0:parseInt(o.navigationSize,10)||0;base.$items.find('a').unbind('focus.AnythingSlider').bind('focus.AnythingSlider',function(e){var panel=$(this).closest('.panel'),indx=base.$items.index(panel)+base.adj;base.$items.find('.focusedLink').removeClass('focusedLink');$(this).addClass('focusedLink');base.$window.scrollLeft(0).scrollTop(0);if((indx!==-1&&(indx>=base.currentPage+o.showMultiple||indx'+o.forwardText+'');base.$back=$(''+o.backText+'');base.$back.bind(o.clickBackArrow,function(e){if(o.enableArrows&&!base.flag){base.flag=true;setTimeout(function(){base.flag=false;},100);base.goBack();}e.preventDefault();});base.$forward.bind(o.clickForwardArrow,function(e){if(o.enableArrows&&!base.flag){base.flag=true;setTimeout(function(){base.flag=false;},100);base.goForward();}e.preventDefault();});base.$back.add(base.$forward).find('a').bind('focusin focusout',function(){$(this).toggleClass('hover');});base.$back.appendTo((o.appendBackTo&&$(o.appendBackTo).length)?$(o.appendBackTo):base.$wrapper);base.$forward.appendTo((o.appendForwardTo&&$(o.appendForwardTo).length)?$(o.appendForwardTo):base.$wrapper);base.arrowWidth=base.$forward.width();base.arrowRight=parseInt(base.$forward.css('right'),10);base.arrowLeft=parseInt(base.$back.css('left'),10);};base.buildAutoPlay=function(){base.$startStop.html(''+(base.playing?o.stopText:o.startText)+'').bind(o.clickSlideshow,function(e){if(o.enableStartStop){base.startStop(!base.playing);base.makeActive();if(base.playing&&!o.autoPlayDelayed){base.goForward(true,o.playRtl);}}e.preventDefault();}).bind('focusin focusout',function(){$(this).toggleClass('hover');});};base.checkResize=function(stopTimer){var vis=!!(doc.hidden||doc.webkitHidden||doc.mozHidden||doc.msHidden);clearTimeout(base.resizeTimer);base.resizeTimer=setTimeout(function(){var w=base.$outer.width(),h=base.$outer[0].tagName==="BODY"?base.$win.height():base.$outer.height();if(!vis&&(base.lastDim[0]!==w||base.lastDim[1]!==h)){base.setDimensions();base.$el.trigger('slideshow_resized',base);base.gotoPage(base.currentPage,base.playing,null,-1);}if(typeof(stopTimer)==='undefined'){base.checkResize();}},vis?2000:500);};base.setDimensions=function(){base.$wrapper.find('.anythingWindow, .anythingBase, .panel')[$.fn.addBack?'addBack':'andSelf']().css({width:'',height:''});base.width=base.$el.width();base.height=base.$el.height();base.outerPad=[base.$wrapper.innerWidth()-base.$wrapper.width(),base.$wrapper.innerHeight()-base.$wrapper.height()];var w,h,c,t,edge=0,fullsize={width:'100%',height:'100%'},pw=(o.showMultiple>1&&o.mode==='horizontal')?base.width||base.$window.width()/o.showMultiple:base.$window.width(),ph=(o.showMultiple>1&&o.mode==='vertical')?base.height/o.showMultiple||base.$window.height()/o.showMultiple:base.$window.height();if(o.expand){base.lastDim=[base.$outer.width(),base.$outer.height()];w=base.lastDim[0]-base.outerPad[0];h=base.lastDim[1]-base.outerPad[1];if(o.aspectRatio&&o.aspectRatio
Запишитесь
на бесплатную презентацию технологии по ремонту кожи
Fabrion
Заказать звонок