1&&n'+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.aspectRatio1&&o.mode==='vertical')?ph:h;base.width=pw=(o.showMultiple>1&&o.mode==='horizontal')?w/o.showMultiple:w;base.$items.css({width:pw,height:ph});}base.$items.each(function(i){t=$(this);c=t.children();if(o.resizeContents){w=base.width;h=base.height;t.css({width:w,height:h});if(c.length){if(c[0].tagName==="EMBED"){c.attr(fullsize);}if(c[0].tagName==="OBJECT"){c.find('embed').attr(fullsize);}if(c.length===1){c.css(fullsize);}}}else{if(o.mode==='vertical'){w=t.css('display','inline-block').width();t.css('display','');}else{w=t.width()||base.width;}if(c.length===1&&w>=pw){w=(c.width()>=pw)?pw:c.width();c.css('max-width',w);}t.css({width:w,height:''});h=(c.length===1?c.outerHeight(true):t.height());if(h<=base.outerPad[1]){h=base.height;}t.css('height',h);}base.panelSize[i]=[w,h,edge];edge+=(o.mode==='vertical')?h:w;});base.$el.css((o.mode==='vertical'?'height':'width'),o.mode==='fade'?base.width:edge);};base.getDim=function(page){var t,i,w=base.width,h=base.height;if(base.pages<1||isNaN(page)){return[w,h];}page=(o.infiniteSlides&&base.pages>1)?page:page-1;i=base.panelSize[page];if(i){w=i[0]||w;h=i[1]||h;}if(o.showMultiple>1){for(i=1;i1-page?1:adj));}if(page>base.pages){page=o.stopAtEnd?base.pages:(o.showMultiple>1-page?1:page-=adj);}else if(page>=adj){page=adj;}}if(base.pages<=1){return;}base.$lastPage=base.$currentPage;if(typeof(page)!=="number"){page=parseInt(page,10)||o.startPanel;base.setCurrentPage(page);}if(autoplay&&o.isVideoPlaying(base)){return;}if(o.stopAtEnd&&!o.infiniteSlides&&page>base.pages-o.showMultiple){page=base.pages-o.showMultiple+1;}base.exactPage=page;if(page>base.pages+1-base.adj){page=(!o.infiniteSlides&&!o.stopAtEnd)?1:base.pages;}if(pagebase.pages)?base.pages:(page<1)?1:base.currentPage;base.$currentPage=base.$items.eq(base.currentPage-base.adj);base.targetPage=(page===0)?base.pages:(page>base.pages)?1:page;base.$targetPage=base.$items.eq(base.targetPage-base.adj);time=typeof time!=='undefined'?time:o.animationTime;if(time>=0){base.$el.trigger('slide_init',base);}if(time>0&&o.toggleControls===true){base.slideControls(true);}if(o.buildNavigation){base.setNavigation(base.targetPage);}if(autoplay!==true){autoplay=false;}if(!autoplay||(o.stopAtEnd&&page===base.pages)){base.startStop(false);}if(time>=0){base.$el.trigger('slide_begin',base);}setTimeout(function(d){var t,p,empty=true;if(o.allowRapidChange){base.$wrapper.add(base.$el).add(base.$items).stop(true,true);}if(!o.resizeContents){p=base.getDim(page);d={};if(base.$wrapper.width()!==p[0]){d.width=p[0]||base.width;empty=false;}if(base.$wrapper.height()!==p[1]){d.height=p[1]||base.height;empty=false;}if(!empty){base.$wrapper.filter(':not(:animated)').animate(d,{queue:false,duration:(time<0?0:time),easing:o.easing});}}if(o.mode==='fade'){if(base.$lastPage[0]!==base.$targetPage[0]){base.fadeIt(base.$lastPage,0,time);base.fadeIt(base.$targetPage,1,time,function(){base.endAnimation(page,callback,time);});}else{base.endAnimation(page,callback,time);}}else{d={};d[base.dir]=-base.panelSize[(o.infiniteSlides&&base.pages>1)?page:page-1][2];if(o.mode==='vertical'&&!o.resizeContents){d.width=p[0];}base.$el.filter(':not(:animated)').animate(d,{queue:false,duration:time<0?0:time,easing:o.easing,complete:function(){base.endAnimation(page,callback,time);}});}},parseInt(o.delayBeforeAnimate,10)||0);};base.endAnimation=function(page,callback,time){if(page===0){base.$el.css(base.dir,o.mode==='fade'?0:-base.panelSize[base.pages][2]);page=base.pages;}else if(page>base.pages){base.$el.css(base.dir,o.mode==='fade'?0:-base.panelSize[1][2]);page=1;}base.exactPage=page;base.setCurrentPage(page,false);if(o.mode==='fade'){base.fadeIt(base.$items.not(':eq('+(page-base.adj)+')'),0,0);}if(!base.hovered){base.slideControls(false);}if(o.hashTags){base.setHash(page);}if(time>=0){base.$el.trigger('slide_complete',base);}if(typeof callback==='function'){callback(base);}if(o.autoPlayLocked&&!base.playing){setTimeout(function(){base.startStop(true);},o.resumeDelay-(o.autoPlayDelayed?o.delay:0));}};base.fadeIt=function(el,toOpacity,time,callback){var f=el.filter(':not(:animated)'),t=time<0?0:time;if(o.resumeOnVisible){if(toOpacity===1){f.css('visibility','visible');}f.fadeTo(t,toOpacity,function(){if(toOpacity===0){f.css('visibility','hidden');}if($.isFunction(callback)){callback();}});}else{f[toOpacity===0?'fadeOut':'fadeIn'](t,callback);}};base.setCurrentPage=function(page,move){page=parseInt(page,10);if(base.pages<1||page===0||isNaN(page)){return;}if(page>base.pages+1-base.adj){page=base.pages-base.adj;}if(page1)?page:page-1][2]);}base.currentPage=page;base.$currentPage=base.$items.removeClass('activePage').eq(page-base.adj).addClass('activePage');if(o.buildNavigation){base.setNavigation(page);}};base.setNavigation=function(page){base.$nav.find('.cur').removeClass('cur').end().find('a').eq(page-1).addClass('cur');};base.makeActive=function(){if(!base.$wrapper.hasClass('activeSlider')){$('.activeSlider').removeClass('activeSlider');base.$wrapper.addClass('activeSlider');}};base.gotoHash=function(){var h=win.location.hash,i=h.indexOf('&'),n=h.match(base.regex);if(n===null&&!/^#&/.test(h)&&!/#!?\//.test(h)&&!/\=/.test(h)){h=h.substring(0,(i>=0?i:h.length));n=($(h).length&&$(h).closest('.anythingBase')[0]===base.el)?base.$items.index($(h).closest('.panel'))+base.adj:null;}else if(n!==null){n=(o.hashTags)?parseInt(n[1],10):null;}return n;};base.setHash=function(n){var s='panel'+base.runTimes+'-',h=win.location.hash;if(typeof h!=='undefined'){win.location.hash=(h.indexOf(s)>0)?h.replace(base.regex,s+n):h+"&"+s+n;}};base.slideControls=function(toggle){var dir=(toggle)?'slideDown':'slideUp',t1=(toggle)?0:o.animationTime,t2=(toggle)?o.animationTime:0,op=(toggle)?1:0,sign=(toggle)?0:1;if(o.toggleControls){base.$controls.stop(true,true).delay(t1)[dir](o.animationTime/2).delay(t2);}if(o.buildArrows&&o.toggleArrows){if(!base.hovered&&base.playing){sign=1;op=0;}base.$forward.stop(true,true).delay(t1).animate({right:base.arrowRight+(sign*base.arrowWidth),opacity:op},o.animationTime/2);base.$back.stop(true,true).delay(t1).animate({left:base.arrowLeft+(sign*base.arrowWidth),opacity:op},o.animationTime/2);}};base.clearTimer=function(paused){if(base.timer){win.clearInterval(base.timer);if(!paused&&base.slideshow){base.$el.trigger('slideshow_stop',base);base.slideshow=false;}}};base.startStop=function(playing,paused){if(playing!==true){playing=false;}base.playing=playing;if(playing&&!paused){base.$el.trigger('slideshow_start',base);base.slideshow=true;}if(o.buildStartStop){base.$startStop.toggleClass('playing',playing).find('span').html(playing?o.stopText:o.startText);if(base.$startStop.find('span').css('visibility')==="hidden"){base.$startStop.addClass(o.tooltipClass).attr('title',playing?o.stopText:o.startText);}}if(playing){base.clearTimer(true);base.timer=win.setInterval(function(){if(!!(doc.hidden||doc.webkitHidden||doc.mozHidden||doc.msHidden)){if(!o.autoPlayLocked){base.startStop();}}else if(!o.isVideoPlaying(base)){base.goForward(true,o.playRtl);}else if(!o.resumeOnVideoEnd){base.startStop();}},o.delay);}else{base.clearTimer();}};base.init();};$.anythingSlider.defaults={theme:"default",mode:"horiz",expand:false,resizeContents:true,showMultiple:false,easing:"swing",buildArrows:true,buildNavigation:true,buildStartStop:true,toggleArrows:false,toggleControls:false,startText:"Start",stopText:"Stop",forwardText:"»",backText:"«",tooltipClass:"tooltip",enableArrows:true,enableNavigation:true,enableStartStop:true,enableKeyboard:true,startPanel:1,changeBy:1,hashTags:true,infiniteSlides:true,navigationFormatter:null,navigationSize:false,autoPlay:false,autoPlayLocked:false,autoPlayDelayed:false,pauseOnHover:true,stopAtEnd:false,playRtl:false,delay:3000,resumeDelay:15000,animationTime:600,delayBeforeAnimate:0,clickForwardArrow:"click",clickBackArrow:"click",clickControls:"click focusin",clickSlideshow:"click",allowRapidChange:false,resumeOnVideoEnd:true,resumeOnVisible:true,isVideoPlaying:function(base){return false;}};$.fn.anythingSlider=function(options,callback){return this.each(function(){var page,anySlide=$(this).data('AnythingSlider');if((typeof(options)).match('object|undefined')){if(!anySlide){(new $.anythingSlider(this,options));}else{anySlide.updateSlider();}}else if(/\d/.test(options)&&!isNaN(options)&&anySlide){page=(typeof(options)==="number")?options:parseInt($.trim(options),10);if(page>=1&&page<=anySlide.pages){anySlide.gotoPage(page,false,callback);}}else if(/^[#|.]/.test(options)&&$(options).length){anySlide.gotoPage(options,false,callback);}});};})(jQuery,window,document);
Центр обучения технологии Fabrion:
Адрес: Россия, 454020, г. Челябинск, ул. Курчатова, 26
Телефон: +7(495) 766-41-40
Электронная почта: fabrion-russia@mail.ru
Закажите обратный звонок: