(function($,undefined){$.widget('ui.depositSeries',{options:{name:'',display:'',mode:'',alone:'',page:'all',markup:{element:'.series-holder'}},_init:function(){this.$this=this.element;this.$seriesElems=this.$this.find(this.options.markup.element);this._raiseParams();this.configKey='ds_'+this.options.display;this.sharedConfig=this._getSharedConfig();this._prepareDisplay();this._initItemsTracking();},_initItemsTracking:function(){var _this=this;var index;var offset=0;var scope='.series[data-display="default"],.series[data-display="slider"],.series[data-display="table"] a';var $document=$(document);var $items;var val1='version_3_1_mainpage_event';var val2='landing_event';var params={'indexMainSlider':val1+',Slider,View image','indexAmazing':val1+',Amazing Photos,Left;'+val2+',Main,#','indexAmazing1':val1+',Amazing Photos,Right-top;'+val2+',Main,#','indexAmazing2':val1+',Amazing Photos,Right-bottom;'+val2+',Main,#','indexProfessional1':val1+',Professional Vectors,Left;'+val2+',Main,#','indexProfessional2':val1+',Professional Vectors,Right;'+val2+',Main,#','indexFresh1':val1+',Fresh Editorial,Left;'+val2+',Main,#','indexFresh2':val1+',Fresh Editorial,Center;'+val2+',Main,#','indexFresh3':val1+',Fresh Editorial,Right;'+val2+',Main,#','indexVideos1':val1+',HD Videos,Left-top;'+val2+',Main,#','indexVideos2':val1+',HD Videos,Right-top;'+val2+',Main,#','indexVideos3':val1+',HD Videos,Left-bottom;'+val2+',Main,#','indexVideos4':val1+',HD Videos,Right-bottom;'+val2+',Main,#','landingPhotosMain':val2+',Photo,#','landingPhotos':val2+',Photo,#','landingVectorsMain':val2+',Vectors,#','landingVectors':val2+',Vectors,#','landingEditorialMain':val2+',Editorial,#','landingEditorial':val2+',Editorial,#','landingVideosMain':val2+',Video,#','landingVideos1':val2+',Video,#','landingVideos2':val2+',Video,#'};if(!params.hasOwnProperty(this.options.name)){return;} switch(this.options.display){case'default':case'slider':$items=this.$this;break;case'table':$items=this.$this.find('a');break;} if($document.find('.series[data-name="indexMainSlider"]').length){offset=1;} $items.each(function(){var $item=$(this);index=$item.index(scope)+1-offset;$item.attr('data-smart-event',params[_this.options.name].replace('#',index));});},_prepareDisplay:function(){switch(this.options.display){case'banner':this.initBanners();break;case'slider':this.initSlider();break;}},_getSharedConfig:function(){return $.parseJSON(cookie.get(this.configKey));},_updateConfig:function(value){var confEntry={};confEntry[this.options.page]={};confEntry[this.options.page][this.options.name]=value;this.sharedConfig=$.extend(true,this._getSharedConfig(),confEntry);cookie.set(this.configKey,JSON.stringify(this.sharedConfig),{expires:31});},_applyElementParams:function($element){var params={url:null,gashow:null,gaclick:null,guestpopup:null,authpopup:null};var regex=/^data-/;var attributes=$element[0].attributes;for(var i=0;i-1?5:7,barDelay:175},animationTimeouts:{slide:2000,show:500},autorun:false,selectors:{slide:this.options.markup.element,nav:{},effects:{bar:'.blind-bar'}},navigation:false,stops:{slider:true}});},_raiseParams:function(){var _this=this;var attributes=this.$this[0].attributes;var regex=/^data-/;var setParam=function(name,value){var names=name.split('-');if(value=="true")value=true;if(value=="false")value=false;if(names.length==2&&_this.options.hasOwnProperty(names[0])&&_this.options[names[0]].hasOwnProperty(names[1]))_this.options[names[0]][names[1]]=value;if(names.length==1&&_this.options.hasOwnProperty(names[0]))_this.options[names[0]]=value;};for(var i=0;i=0){setParam(attributes[i].nodeName.replace(regex,''),attributes[i].value);}}}});})(jQuery); ;