/**
 * gamma.js v1.0.0
 * http://www.codrops.com
 *
 * Licensed under the MIT license.
 * http://www.opensource.org/licenses/mit-license.php
 * 
 * Copyright 2012, Codrops
 * http://www.codrops.com
 */
!function(e){var t=function(i){var a=this;this.init=function(){MagicMove.ticker.useRAF(!1),this.props_obj=i,this.listeners={events_ar:[]},this.mustHaveHolderDiv_bl=!1,this.instanceName_str=this.props_obj.instanceName,a.props_obj.gridType?(a.gridType_str=a.props_obj.gridType||"dynamicvertical",a.gridType_str=String(a.gridType_str).toLowerCase(),"dynamicvertical"==a.gridType_str||"dynamichorizontal"==a.gridType_str||"classicvertical"==a.gridType_str||"classichorizontal"==a.gridType_str||"masonryvertical"==a.gridType_str||"masonryhorizontal"==a.gridType_str||"flexiblevertical"==a.gridType_str||"flexiblehorizontal"==a.gridType_str?this.props_obj.instanceName?e[this.instanceName_str]?alert("You published the same gallery two times on the same page. Make sure that you properly configure gallery. Contact support if you have some questions [id: "+this.instanceName_str+"] "):(e[this.instanceName_str]=this,this.props_obj?this.props_obj.parentId||!this.mustHaveHolderDiv_bl?!this.mustHaveHolderDiv_bl||GAMLDATUtils.getChildById(a.props_obj.parentId)?(this.displayType=this.props_obj.displayType||t.RESPONSIVE,this.displayType=this.displayType.toLowerCase(),a.displayType.toLowerCase()!=t.RESPONSIVE&&a.displayType.toLowerCase()!=t.FULL_SCREEN&&a.displayType.toLowerCase()!=t.FLUID_WIDTH&&a.displayType.toLowerCase()!=t.AFTER_PARENT&&(this.displayType=t.RESPONSIVE),this.body=document.getElementsByTagName("body")[0],this.displayType==t.FULL_SCREEN?this.stageContainer=a.body:this.stageContainer=GAMLDATUtils.getChildById(this.props_obj.parentId),this.customContextMenu,this.info_do,this.main_do,this.preloader_do,this.menu_do,this.thumbnailManager_do,this.lighBox_do,this.rect,this.backgroundColor_str=this.props_obj.backgroundColor||"transparent",this.lightBoxBackgroundColor_str=this.props_obj.lightMainBoxBackgroundColor||"transparent",this.zIndex=parseInt(i.zIndex)||0,this.stageWidth=0,this.stageHeight=0,this.pageXOffset=e.pageXOffset,this.pageYOffset=e.pageYOffset,this.catId_ar=-1,this.maxWidth=this.props_obj.maxWidth||640,this.maxHeight=this.props_obj.maxHeight||380,this.thumbnailsVOffset=this.props_obj.thumbnailsVerticalOffset||0,this.resizeHandlerId1_to,this.resizeHandlerId2_to,this.scrollEndId_to,this.orientationChangeId_to,this.isVerticalType_bl=!0,this.isDataLoaded_bl=!1,this.autoScale_bl="yes"==this.props_obj.autoScale,this.showFullScreenButton_bl="yes"==this.props_obj.showFullScreenButton,this.orintationChanceComplete_bl=!0,this.isMobile_bl=GAMLDATUtils.isMobile,this.hasPointerEvent_bl=GAMLDATUtils.hasPointerEvent,this.isReady_bl=!1,this.setupMainDo(),this.setupData(),this.setupInfo()):alert("GAMMAGRID parent div is not found, please make sure that the div exsists and the id is correct! "+a.props_obj.parentId):alert("Property parentId is not defined in the GAMMAGRID constructor, self property represents the div id into which the megazoom is added as a child!"):alert("GAMMAGRID constructor properties object is not defined!")):alert("Gallery error: instance name is required please make sure that the instanceName parameter existists and it's value is unique."):alert("Gallery error: type is not valid!")):alert("GAMMAGRID: config required")},this.setupMainDo=function(){this.main_do=new GAMLDATDisplayObject("div","relative"),this.main_do.getStyle().webkitTapHighlightColor="rgba(0, 0, 0, 0)",this.main_do.getStyle().webkitFocusRingColor="rgba(0, 0, 0, 0)",this.main_do.getStyle().width="100%",this.main_do.getStyle().height="100%",(!GAMLDATUtils.isMobile||GAMLDATUtils.isMobile&&GAMLDATUtils.hasPointerEvent)&&this.main_do.setSelectable(!1),"dynamichorizontal"==a.gridType_str||"classichorizontal"==a.gridType_str||"masonryhorizontal"==a.gridType_str||"flexiblehorizontal"==a.gridType_str?(this.main_do.getStyle().msTouchAction="none",this.displayType==t.FULL_SCREEN||this.displayType==t.FLUID_WIDTH?(this.main_do.getStyle().position="absolute",this.stageContainer.appendChild(this.main_do.screen),this.main_do.getStyle().zIndex=a.zIndex):this.stageContainer.appendChild(this.main_do.screen)):this.stageContainer.appendChild(this.main_do.screen),this.stageContainer.style.overflow="hidden",this.startResizeHandler()},this.setupInfo=function(){GAMLDATInfo.setPrototype(),this.info_do=new GAMLDATInfo(a,a.data.warningIconPath_str)},this.startResizeHandler=function(){e.addEventListener?(e.addEventListener("resize",a.onResizeHandler),e.addEventListener("scroll",a.onScrollHandler)):e.attachEvent&&(e.attachEvent("onresize",a.onResizeHandler),e.attachEvent("onscroll",a.onScrollHandler)),a.resizeHandler(),a.resizeHandlerId2_to=setTimeout(function(){a.resizeHandler(),a.positionPreloader()},400)},this.onResizeHandler=function(e){clearTimeout(a.resizeHandlerId2_to),a.resizeHandlerId2_to=setTimeout(function(){a.resizeHandler()},100)},a.onScrollHandler=function(e){a.scrollOffsets=GAMLDATUtils.getScrollOffsets(),a.thumbnailManager_do&&(t.globalY=a.thumbnailManager_do.getGlobalY())},this.resizeHandler=function(){a.scrollOffsets=GAMLDATUtils.getScrollOffsets();var e,i=GAMLDATUtils.getViewportSize(),n=0;t.viewportHeight=i.h,a.pageXOffset=a.scrollOffsets.x,a.pageYOffset=a.scrollOffsets.y,"dynamicvertical"==a.gridType_str||"classicvertical"==a.gridType_str||"masonryvertical"==a.gridType_str||"flexiblevertical"==a.gridType_str?(a.stageWidth=a.stageContainer.offsetWidth,a.main_do.setWidth(a.stageWidth),a.globalX=a.main_do.getGlobalX(),a.globalY=a.main_do.getGlobalY(),clearTimeout(a.resizeGridId_to),a.resizeGridId_to=setTimeout(function(){a.menu_do&&a.menu_do.isShowed_bl&&a.menu_do.resizeAndPosition(a.stageWidth),a.thumbnailManager_do&&(a.thumbnailManager_do.resizeAndPosition(),t.globalY=a.thumbnailManager_do.getGlobalY()),a.setFinalSize()},100)):"dynamichorizontal"!=a.gridType_str&&"classichorizontal"!=a.gridType_str&&"masonryhorizontal"!=a.gridType_str&&"flexiblehorizontal"!=a.gridType_str||(a.menu_do&&a.menu_do.isShowed_bl&&(a.stageHeight=a.menu_do.h),a.isFullScreen_bl||a.displayType==t.FULL_SCREEN?(a.main_do.setX(a.scrollOffsets.x),a.main_do.setY(a.scrollOffsets.y),a.stageWidth=i.w,a.stageHeight=i.h,a.main_do.setWidth(a.stageWidth),a.main_do.setHeight(a.stageHeight)):a.displayType==t.FLUID_WIDTH?(a.stageWidth=i.w,a.stageHeight=i.h,a.autoScale_bl?(e=Math.min(a.stageWidth/a.maxWidth,1),a.stageHeight=Math.min(parseInt(e*a.maxHeight),a.maxHeight),a.stageHeight<500&&(a.stageHeight=500),a.stageContainer.style.height=a.stageHeight+"px"):(a.stageHeight=a.maxHeight,a.stageContainer.style.height=a.stageHeight+"px"),a.menu_do&&(a.menu_do.isShowed_bl?(a.menu_do.resizeAndPosition(a.stageWidth),n=a.menu_do.h):(a.menu_do.resizeAndPosition(0),n=0)),a.main_do.setX(a.pageXOffset),a.main_do.setY(Math.round(a.stageContainer.getBoundingClientRect().top+a.pageYOffset)),a.main_do.setWidth(a.stageWidth),a.main_do.setHeight(a.stageHeight),a.stageContainer.style.height=a.stageHeight+"px"):a.displayType==t.RESPONSIVE?(a.stageContainer.style.width="100%",a.stageContainer.offsetWidth>a.maxWidth&&(a.stageContainer.style.width=a.maxWidth+"px"),a.stageWidth=a.stageContainer.offsetWidth,a.menu_do&&(a.menu_do.isShowed_bl?(a.menu_do.resizeAndPosition(a.stageWidth),n=a.menu_do.h):(a.menu_do.resizeAndPosition(0),n=0)),a.autoScale_bl?a.stageHeight=parseInt(a.maxHeight*(a.stageWidth/a.maxWidth))+2*a.thumbnailsVOffset:a.stageHeight=a.maxHeight,a.main_do.setX(0),a.main_do.setY(0),a.stageHeight+=n,a.isDataLoaded_bl||(a.stageHeight=150),a.main_do.setWidth(a.stageWidth),a.main_do.setHeight(a.stageHeight),a.stageContainer.style.height=a.stageHeight+"px"):a.displayType==t.AFTER_PARENT?(a.stageWidth=a.stageContainer.offsetWidth,a.stageHeight=a.stageContainer.offsetHeight,a.menu_do&&(a.menu_do.isShowed_bl?(a.menu_do.resizeAndPosition(a.stageWidth),n=a.menu_do.h):(a.menu_do.resizeAndPosition(0),n=0)),a.main_do.setWidth(a.stageWidth),a.main_do.setHeight(a.stageHeight)):(a.main_do.setX(0),a.main_do.setY(0),a.stageWidth=i.w,a.stageHeight=i.h)),a.menu_do&&(a.menu_do.isShowed_bl?a.menu_do.resizeAndPosition(a.stageWidth):a.menu_do.setHeight(0)),a.thumbnailManager_do&&a.thumbnailManager_do.resizeAndPosition(),a.fullScreenButton_do&&a.positionFullScreenButton()},this.setFinalSize=function(){a.stageWidth=a.stageContainer.offsetWidth,a.isReady_bl?a.stageHeight=0:(a.stageHeight=84,a.main_do.setHeight(a.stageHeight)),a.menu_do&&(a.menu_do.isShowed_bl?a.stageHeight=a.menu_do.h:a.menu_do.setHeight(0)),a.thumbnailManager_do&&(a.stageHeight+=a.thumbnailManager_do.totalHeight),a.main_do&&a.prevStageHeight!=a.stageHeight&&a.main_do.setWidth(a.stageWidth),a.prevStageHeight=a.stageHeight},this.setupContextMenu=function(){this.customContextMenu_do=new GAMLDATContextMenu(this.main_do,a.data.rightClickContextMenu_str)},this.setupData=function(){GAMMAGRIDData.setPrototype(),this.data=new GAMMAGRIDData(this.props_obj,this),this.data.addListener(GAMMAGRIDData.PRELOADER_LOAD_DONE,this.onPreloaderLoadDone),this.data.addListener(GAMMAGRIDData.LIGHBOX_CLOSE_BUTTON_LOADED,this.onLightBoxCloseButtonLoadDone),this.data.addListener(GAMMAGRIDData.LOAD_ERROR,this.dataLoadError),this.data.addListener(GAMMAGRIDData.LOAD_DONE,this.dataLoadComplete)},this.onLightBoxCloseButtonLoadDone=function(){},this.onPreloaderLoadDone=function(){a.setupPreloader(),a.positionPreloader(),a.resizeHandler()},this.dataLoadError=function(e,t){a.main_do.addChild(a.info_do),a.info_do.showText(e.text)},this.dataLoadComplete=function(e){a.isReady_bl=!0,a.main_do.getStyle().height="100%",a.catId_ar=a.data.startAtCategory,a.setupLightBox(),a.data.showMenu_bl&&a.setupMenu(),a.main_do.addChild(a.preloader_do),a.isMobile_bl||a.setupContextMenu(),a.setupThumbanilsManager(),a.showFullScreenButton_bl&&a.setupFullScreenButton(),a.isDataLoaded_bl=!0,a.resizeHandler(),a.preloader_do.hide(!0),setTimeout(a.resizeHandler,200),a.dispatchEvent(t.READY)},this.setupPreloader=function(){GAMLDATPreloader.setPrototype(),this.preloader_do=new GAMLDATPreloader(this.data.mainPreloader_img,38,38,30,36),this.preloader_do.addListener(GAMLDATPreloader.HIDE_COMPLETE,this.onPreloaderHideCompleteHandler),this.preloader_do.show(!0),this.main_do.addChild(this.preloader_do)},this.positionPreloader=function(){this.preloader_do&&0!=a.stageHeight&&(this.preloader_do.setX(parseInt((this.stageWidth-this.preloader_do.w)/2)),this.preloader_do.setY(parseInt((this.stageHeight-this.preloader_do.h)/2)))},this.onPreloaderHideCompleteHandler=function(){a.main_do.removeChild(a.preloader_do)},this.setupMenu=function(){GAMMAGRIDMenu.setPrototype(),this.menu_do=new GAMMAGRIDMenu(a.data,a),this.menu_do.addListener(GAMMAGRIDMenu.MOUSE_UP,this.menuOnMouseUpHandler),this.main_do.addChild(this.menu_do),this.menu_do.addListener(GAMMAGRIDMenu.SEARCH,this.searchHandler)},this.menuOnMouseUpHandler=function(e){a.updateCategory(e.id)},this.searchHandler=function(e){a.thumbnailManager_do.search(e.searchValue)},this.setupThumbanilsManager=function(e){"dynamicvertical"==a.gridType_str?(a.data.isVerticalType_bl=!0,GAMMAGRIDVerticalThumbnailsManager.setPrototype(),this.thumbnailManager_do=new GAMMAGRIDVerticalThumbnailsManager(this.data,this),this.thumbnailManager_do.addListener(GAMMAGRIDVerticalThumbnailsManager.CATEGORY_UPDATE,this.onTMCategoryUpdate),this.thumbnailManager_do.addListener(GAMMAGRIDVerticalThumbnailsManager.OPEN_LIGHTBOX,this.openLightbox)):"dynamichorizontal"==a.gridType_str?(a.data.isVerticalType_bl=!1,GAMMAGRIDHorizontalThumbnailsManager.setPrototype(),this.thumbnailManager_do=new GAMMAGRIDHorizontalThumbnailsManager(this.data,this),this.thumbnailManager_do.addListener(GAMMAGRIDHorizontalThumbnailsManager.CATEGORY_UPDATE,this.onTMCategoryUpdate),this.thumbnailManager_do.addListener(GAMMAGRIDHorizontalThumbnailsManager.OPEN_LIGHTBOX,this.openLightbox)):"classicvertical"==a.gridType_str?(a.data.isVerticalType_bl=!0,GAMMAGRIDClassicVerticalThumbnailsManager.setPrototype(),this.thumbnailManager_do=new GAMMAGRIDClassicVerticalThumbnailsManager(this.data,this),this.thumbnailManager_do.addListener(GAMMAGRIDClassicVerticalThumbnailsManager.CATEGORY_UPDATE,this.onTMCategoryUpdate),this.thumbnailManager_do.addListener(GAMMAGRIDClassicVerticalThumbnailsManager.OPEN_LIGHTBOX,this.openLightbox)):"classichorizontal"==a.gridType_str?(a.data.isVerticalType_bl=!1,GAMMAGRIDClassicHorizontalThumbnailsManager.setPrototype(),this.thumbnailManager_do=new GAMMAGRIDClassicHorizontalThumbnailsManager(this.data,this),this.thumbnailManager_do.addListener(GAMMAGRIDClassicHorizontalThumbnailsManager.CATEGORY_UPDATE,this.onTMCategoryUpdate),this.thumbnailManager_do.addListener(GAMMAGRIDClassicHorizontalThumbnailsManager.OPEN_LIGHTBOX,this.openLightbox)):"masonryvertical"==a.gridType_str?(a.data.isVerticalType_bl=!0,GAMMAGRIDMasonryVerticalThumbnailsManager.setPrototype(),this.thumbnailManager_do=new GAMMAGRIDMasonryVerticalThumbnailsManager(this.data,this),this.thumbnailManager_do.addListener(GAMMAGRIDMasonryVerticalThumbnailsManager.CATEGORY_UPDATE,this.onTMCategoryUpdate),this.thumbnailManager_do.addListener(GAMMAGRIDMasonryVerticalThumbnailsManager.OPEN_LIGHTBOX,this.openLightbox)):"masonryhorizontal"==a.gridType_str?(a.data.isVerticalType_bl=!1,GAMMAGRIDMasonryHorizontalThumbnailsManager.setPrototype(),this.thumbnailManager_do=new GAMMAGRIDMasonryHorizontalThumbnailsManager(this.data,this),this.thumbnailManager_do.addListener(GAMMAGRIDMasonryHorizontalThumbnailsManager.CATEGORY_UPDATE,this.onTMCategoryUpdate),this.thumbnailManager_do.addListener(GAMMAGRIDMasonryHorizontalThumbnailsManager.OPEN_LIGHTBOX,this.openLightbox)):"flexiblevertical"==a.gridType_str?(a.data.isVerticalType_bl=!0,GAMMAGRIDFlexibleVerticalThumbnailsManager.setPrototype(),this.thumbnailManager_do=new GAMMAGRIDFlexibleVerticalThumbnailsManager(this.data,this),this.thumbnailManager_do.addListener(GAMMAGRIDFlexibleVerticalThumbnailsManager.CATEGORY_UPDATE,this.onTMCategoryUpdate),this.thumbnailManager_do.addListener(GAMMAGRIDFlexibleVerticalThumbnailsManager.OPEN_LIGHTBOX,this.openLightbox)):"flexiblehorizontal"==a.gridType_str&&(a.data.isVerticalType_bl=!1,GAMMAGRIDFlexibleHorizontalThumbnailsManager.setPrototype(),this.thumbnailManager_do=new GAMMAGRIDFlexibleHorizontalThumbnailsManager(this.data,this),this.thumbnailManager_do.addListener(GAMMAGRIDFlexibleHorizontalThumbnailsManager.CATEGORY_UPDATE,this.onTMCategoryUpdate),this.thumbnailManager_do.addListener(GAMMAGRIDFlexibleHorizontalThumbnailsManager.OPEN_LIGHTBOX,this.openLightbox)),this.main_do.addChild(this.thumbnailManager_do),t.globalY=a.thumbnailManager_do.getGlobalY()},this.onThumbsManagerLoadError=function(e){a.main_do.addChild(a.info_do),a.info_do.showText(e.text)},this.onTMCategoryUpdate=function(e){},this.openLightbox=function(t){e.rlobj_curObj=a.data.lightboxPlaylist_ar,GAMLDAT.show("rlobj_curObj",t.id),e.rlobj_curObj=null},this.setupLightBox=function(){},this.RLShowStart=function(){a.dispatchEvent(t.LIGHTBOX_SHOW_START)},this.RLShowComplete=function(){a.dispatchEvent(t.LIGHTBOX_SHOW_COMPLETE)},this.RLHideStart=function(){a.dispatchEvent(t.LIGHTBOX_HIDE_START)},this.RLhideComplete=function(){a.dispatchEvent(t.LIGHTBOX_HIDE_COMPLETE)},this.addListener=function(e,t){if(void 0==e)throw Error("type is required.");if("object"==typeof e)throw Error("type must be of type String.");if("function"!=typeof t)throw Error("listener must be of type Function.");var i={};i.type=e,i.listener=t,i.target=this,this.listeners.events_ar.push(i)},this.dispatchEvent=function(e,t){if(null!=this.listeners){if(void 0==e)throw Error("type is required.");if("object"==typeof e)throw Error("type must be of type String.");for(var i=0,a=this.listeners.events_ar.length;i<a;i++)if(this.listeners.events_ar[i].target===this&&this.listeners.events_ar[i].type===e){if(t)for(var n in t)this.listeners.events_ar[i][n]=t[n];this.listeners.events_ar[i].listener.call(this,this.listeners.events_ar[i])}}},this.removeListener=function(e,t){if(void 0==e)throw Error("type is required.");if("object"==typeof e)throw Error("type must be of type String.");if("function"!=typeof t)throw Error("listener must be of type Function."+e);for(var i=0,a=this.listeners.events_ar.length;i<a;i++)if(this.listeners.events_ar[i].target===this&&this.listeners.events_ar[i].type===e&&this.listeners.events_ar[i].listener===t){this.listeners.events_ar.splice(i,1);break}},this.setupFullScreenButton=function(){GAMLDATComplexButton.setPrototype(),a.fullScreenButton_do=new GAMLDATComplexButton(a.data.fullScreenN_img,a.data.fullScreenSPath_str,a.data.normalScreenN_img,a.data.normalScreenSPath_str,!0),a.fullScreenButton_do.addListener(GAMLDATComplexButton.MOUSE_UP,a.fullScreenUpHandler),a.main_do.addChild(a.fullScreenButton_do),document.addEventListener&&(document.addEventListener("fullscreenchange",a.onFullScreenChange),document.addEventListener("mozfullscreenchange",a.onFullScreenChange),document.addEventListener("webkitfullscreenchange",a.onFullScreenChange))},this.fullScreenUpHandler=function(e){1==a.fullScreenButton_do.currentState?a.goFullScreen():a.goNormalScreen()},this.onFullScreenChange=function(e){document.fullScreen||document.mozFullScreen||document.webkitIsFullScreen||document.msieFullScreen?(a.fullScreenButton_do.isFullScreen_bl=!0,a.isFullScreen_bl=!0):(a.fullScreenButton_do.isFullScreen_bl=!1,a.goNormalScreen(),a.fullScreenButton_do.setButtonState(1))},this.positionFullScreenButton=function(){this.showFullScreenButton_bl?(a.fullScreenButton_do.setX(this.stageWidth-this.fullScreenButton_do.w-10),a.fullScreenButton_do.setY(this.stageHeight-this.fullScreenButton_do.h-10)):a.fullScreenButton_do.setY(-200)},this.goFullScreen=function(){var e=GAMLDATUtils.getScrollOffsets();a.lastScrollX=e.x,a.lastScrollY=e.y,document.documentElement.requestFullScreen?document.documentElement.requestFullScreen():document.documentElement.mozRequestFullScreen?document.documentElement.mozRequestFullScreen():document.documentElement.webkitRequestFullScreen?document.documentElement.webkitRequestFullScreen():document.documentElement.msieRequestFullScreen&&document.documentElement.msieRequestFullScreen(),a.main_do.getStyle().position="absolute",a.body.style.overflow="hidden",document.documentElement.style.overflow="hidden",document.documentElement.appendChild(a.main_do.screen),a.isMobile_bl&&a.disableMoveOnFullScreen(),a.main_do.getStyle().zIndex=2147483646,console.log(GAMLDATUtils.getViewportSize()),a.fullScreenButton_do.isFullScreen_bl=!0,a.fullScreenButton_do.setButtonState(0),a.isFullScreen_bl=!0;try{this.thumbnailManager_do.deactivateDragScrollBar()}catch(e){}this.resizeHandler()},this.goNormalScreen=function(){if(a.isFullScreen_bl){document.cancelFullScreen?document.cancelFullScreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen?document.webkitCancelFullScreen():document.msieCancelFullScreen&&document.msieCancelFullScreen(),a.fullScreenButton_do.isFullScreen_bl=!1,a.fullScreenButton_do.setButtonState(1),a.isFullScreen_bl=!1,a.isMobile_bl&&a.removeDisableMoveOnFullScreen();try{this.thumbnailManager_do.deactivateDragScrollBar()}catch(e){}a.addMainDoToTheOriginalParent(),a.resizeHandler()}},this.addMainDoToTheOriginalParent=function(){GAMLDATUtils.isIE7&&a.displayType==t.FULL_SCREEN?(document.documentElement.style.overflow="auto",a.body.style.overflow="auto"):a.displayType!=t.FULL_SCREEN&&(GAMLDATUtils.isIE7?(document.documentElement.style.overflow="auto",a.body.style.overflow="visible"):(document.documentElement.style.overflow="visible",a.body.style.overflow="visible")),this.displayType==t.FULL_SCREEN?GAMLDATUtils.isIE7?a.body.appendChild(a.main_do.screen):document.documentElement.appendChild(this.main_do.screen):a.displayType==t.FLUID_WIDTH?(GAMLDATUtils.isIE7?a.body.appendChild(a.main_do.screen):document.documentElement.appendChild(a.main_do.screen),a.resizeHandler(!0)):(a.main_do.getStyle().position="relative",a.stageContainer.appendChild(a.main_do.screen));try{this.thumbnailManager_do.deactivateDragScrollBar()}catch(e){}a.main_do.getStyle().zIndex=a.zIndex,a.main_do.setX(0),a.main_do.setY(0),a.resizeHandler(!0),e.scrollTo(a.lastScrollX,a.lastScrollY)},this.disableMoveOnFullScreen=function(t){e.addEventListener("touchmove",a.onDisableMove)},this.removeDisableMoveOnFullScreen=function(t){e.removeEventListener("touchmove",a.onDisableMove)},this.onDisableMove=function(e){e.preventDefault()},this.updateCategory=function(e){this.isReady_bl&&(this.catId_ar=e,a.thumbnailManager_do.updateCategory(this.catId_ar),setTimeout(function(){a.dispatchEvent(t.CATEGORY_UPDATE)},50))},this.getCategoryName=function(e){if(this.isReady_bl)return this.data.categories_ar},this.getCategoryId=function(){return this.catId_ar},this.updateSize=function(){a.isReady_bl,a.resizeHandler()},this.init()};t.READY="ready",t.LIGHTBOX_SHOW_START="showStart",t.LIGHTBOX_SHOW_COMPLETE="showComplete",t.LIGHTBOX_HIDE_START="hideStart",t.LIGHTBOX_HIDE_COMPLETE="hideComplete",t.CATEGORY_UPDATE="categoryUpdate",t.FULL_SCREEN="fullscreen",t.LIGHTBOX="lightbox",t.RESPONSIVE="responsive",t.FLUID_WIDTH="fluidwidth",t.AFTER_PARENT="afterparent",t.IFRAME="iframe",t.IMAGE="image",t.FLASH="flash",t.AUDIO="audio",t.VIDEO="video",t.VIMEO="vimeo",t.YOUTUBE="youtube",t.MAPS="maps",t.LINK="link",t.NONE="none",JSGDIGP=void 0,e.GAMMAGRID=t}(window);
/**
 * Return a new JSON object of the old string.
 * Turns:
 * 		file.js?a=1&amp;b.c=3.0&b.d=four&a_false_value=false&a_null_value=null
 * Into:
 * 		{"a":1,"b":{"c":3,"d":"four"},"a_false_value":false,"a_null_value":null}
 * @version 1.1.0
 * @date July 16, 2010
 * @since 1.0.0, June 30, 2010
 * @package jquery-sparkle {@link http://www.balupton/projects/jquery-sparkle}
 * @author Benjamin "balupton" Lupton {@link http://www.balupton.com}
 * @copyright (c) 2009-2010 Benjamin Arthur Lupton {@link http://www.balupton.com}
 * @license GNU Affero General Public License version 3 {@link http://www.gnu.org/licenses/agpl-3.0.html}
 */
!function(window){var GAMMAGRIDData=function(props,parent){var self=this,prototype=GAMMAGRIDData.prototype;this.props_obj=props,this.rootElement_el=null,this.graphicsPaths_ar=[],this.skinPaths_ar=[],this.playlist_ar=[],this.lightboxPlaylist_ar=[],this.categories_ar=[],this.parsedPlaylist_ar=[],this.youtubeData_ar,this.backgroundColor_str,this.thumbnailOverlayBackgroundColor_str,this.lightBoxInfoWindowBackgroundColor_str,this.lightBoxItemBorderColor_str,this.lightBoxItemBackgroundColor_str,this.grabIconPath_str,this.handIconPath_str,this.imageIconPath_str,this.videoIconPath_str,this.linkIconPath_str,this.mainFolderPath_str,this.gridSkinPath_str,this.rightClickContextMenu_str,this.selectLabel_str,this.allCategoriesLabel_str,this.accessToken_str,this.scClientId_str="a123083c52a6b06985421d33038e033a",this.totalPlaylists,this.startAtCategory,this.thumbnailMaxWidth,this.thumbnailMaxHeight,this.thumbnailOverlayOpacity,this.countLoadedGraphics=0,this.totalGraphics,this.totalItems,this.lightBoxInfoWindowBackgroundOpacity,this.lightBoxBackgroundOpacity,this.lightBoxBorderSize,this.lightBoxSlideShowDelay,this.countLoadedSkinImages=0,this.youtubeLoadId=0,this.nextPageToken_str=0,this.parseDelayId_to,this.loadImageId_to,this.isYoutube_bl,this.showLightBoxZoomButton_bl,this.showLightBoxInfoButton_bl,this.showLighBoxSlideShowButton_bl,this.addLightBoxKeyboardSupport_bl,this.showLighBoxNextAndPrevButtons_bl,this.showContextMenu_bl,this.disableThumbnailsInteractivity_bl,this.isPlaylistDispatchingError_bl,this.isMobile_bl=GAMLDATUtils.isMobile,this.showHelpScreen_bl,this.init=function(){self.parseProperties()},this.parseProperties=function(){var t;if(self.mainFolderPath_str=self.props_obj.mainFolderPath,self.mainFolderPath_str)if(self.mainFolderPath_str.lastIndexOf("/")+1!=self.mainFolderPath_str.length&&(self.mainFolderPath_str+="/"),self.gridSkinPath_str=self.props_obj.gridSkinPath,self.gridSkinPath_str)if(self.gridSkinPath_str.lastIndexOf("/")+1!=self.gridSkinPath_str.length&&(self.gridSkinPath_str+="/"),self.gridSkinPath_str=self.mainFolderPath_str+self.gridSkinPath_str,self.lightboxSkinPath_str=self.props_obj.lightboxSkinPath,self.gridSkinPath_str){self.rightClickContextMenu_str=self.props_obj.rightClickContextMenu||"developer","developer"==self.rightClickContextMenu_str||"disabled"==self.rightClickContextMenu_str||"default"==self.rightClickContextMenu_str||(self.rightClickContextMenu_str="developer"),self.handIconPath_str=self.gridSkinPath_str+"hand.cur",self.grabIconPath_str=self.gridSkinPath_str+"grab.cur",self.comboBoxPosition_str=self.props_obj.comboBoxPosition||"topright",self.comboBoxPosition_str=self.comboBoxPosition_str.toLowerCase(),"topright"==self.comboBoxPosition_str.toLowerCase()||"topleft"==self.comboBoxPosition_str.toLowerCase()||(self.comboBoxPosition_str="topright"),self.buttonsAlignment_str=self.props_obj.buttonsAlignment||"in","in"==self.buttonsAlignment_str||"out"==self.buttonsAlignment_str||(self.buttonsAlignment_str="in"),self.thumbnailLoadingType_str=String(self.props_obj.thumbnailLoadingType).toLowerCase()||"default","loadmorewithbutton"==self.thumbnailLoadingType_str||"loadmoreonscroll"==self.thumbnailLoadingType_str||"default"==self.thumbnailLoadingType_str||(self.thumbnailLoadingType_str="default"),self.hideAndShowTransitionType_str=String(self.props_obj.hideAndShowTransitionType).toLowerCase()||"scale","scale"==self.hideAndShowTransitionType_str||"opacity"==self.hideAndShowTransitionType_str||"rotation"==self.hideAndShowTransitionType_str||"none"==self.hideAndShowTransitionType_str||(self.hideAndShowTransitionType_str="scale"),GAMLDATUtils.hasTransform2d||(self.hideAndShowTransitionType_str="none"),self.textVerticalAlign_str=String(self.props_obj.textVerticalAlign).toLowerCase()||"center","center"==self.textVerticalAlign_str||"top"==self.textVerticalAlign_str||"bottom"==self.textVerticalAlign_str||(self.textVerticalAlign_str="center"),self.imageTransitionDirection_str=String(self.props_obj.curtainRevealDirection).toLowerCase()||"top","top"==self.imageTransitionDirection_str||"bottom"==self.imageTransitionDirection_str||"left"==self.imageTransitionDirection_str||"right"==self.imageTransitionDirection_str||(self.imageTransitionDirection_str="top"),self.menuPosition_str=String(self.props_obj.menuPosition).toLowerCase()||"center","center"==self.menuPosition_str||"left"==self.menuPosition_str||"right"==self.menuPosition_str||(self.menuPosition_str="center"),self.textAnimType_str=String(self.props_obj.textAnimationType).toLowerCase()||"opacity";"opacity"==self.textAnimType_str||"scale"==self.textAnimType_str||"scalerandom"==self.textAnimType_str||self.textAnimType_str;if(self.menuType_str=String(self.props_obj.menuType).toLowerCase()||"list","list"==self.menuType_str||"combobox"==self.menuType_str||(self.menuType_str="list"),self.warningIconPath_str=self.gridSkinPath_str+"warning.png",self.searchLabel_str=self.props_obj.searchLabel,self.searchClassName_str=self.props_obj.searchClassName,self.searchClassName_str="searchClassName",self.searchNotFoundClassName_str="searchNotFound",self.searchNotFoundLabel_str=self.props_obj.searchNotFoundLabel,self.comboboxSelectorLabel_str=self.props_obj.comboboxSelectorLabel,self.ytbTitleClassName_str=self.props_obj.ytbTitleClassName,self.ytbDescriptionClassName_str=self.props_obj.ytbDescriptionClassName,self.comboboxArrowNormalColor_str=self.props_obj.comboboxArrowNormalColor||"#000000",self.comboboxArrowSelectedColor_str=self.props_obj.comboboxArrowSelectedColor||"#000000",self.showYtbTitle_bl="yes"==self.props_obj.showYtbTitle,self.showSearchButton_bl="yes"==self.props_obj.showSearchBox,self.showYtbDescription_bl="yes"==self.props_obj.showYtbDescription,self.centerNoSearchFoundLabelWithMenu_bl="no"!=self.props_obj.centerNoSearchFoundLabelWithMenu,self.ytbTitleMaxLength=parseInt(self.props_obj.ytbTitleMaxLength),self.facebookTitleClassName_str=self.props_obj.facebookTitleClassName,self.facebookDescriptionClassName_str=self.props_obj.facebookDescriptionClassName,self.showFacebookTitle_bl="yes"==self.props_obj.showFacebookTitle,self.showFacebookDescription_bl="yes"==self.props_obj.showFacebookDescription,self.facebookTitleMaxLength=parseInt(self.props_obj.facebookTitleMaxLength),self.soundCloudTitleClassName_str=self.props_obj.soundCloudTitleClassName,self.soundCloudTrackClassName_str=self.props_obj.soundCloudTrackClassName,self.showSoundCloudUserName_bl="yes"==self.props_obj.showSoundCloudTitle,self.showSoundCloudTrack_bl="yes"==self.props_obj.showSoundCloudTrack,self.pintrestDescriptionClassName_str=self.props_obj.pintrestDescriptionClassName,self.showPintrestDescription_bl="yes"==self.props_obj.showPintrestDescription,self.showPinButton_bl="yes"==self.props_obj.usePinIconButton,self.flickrAPIKey_str=self.props_obj.flickrAppId,self.flickrTitleClassName_str=self.props_obj.flickrTitleClassName,self.showFlickrkDescription_bl="yes"==self.props_obj.showFlickrDescription,self.flickrTitleMaxLength=parseInt(self.props_obj.flickrDescriptionMaxLength),"classicvertical"!=parent.gridType_str&&"masonryvertical"!=parent.gridType_str&&"flexiblevertical"!=parent.gridType_str||(self.showAsExtraText_bl="yes"==self.props_obj.showAsExtraText),GAMLDATUtils.hasTransform2d||!1,self.thumbanilBoxShadow_str=self.props_obj.thumbanilBoxShadow||"none",self.presetType_str=String(self.props_obj.preset).toLowerCase(),"3d"!=self.presetType_str||GAMLDATUtils.hasTransform3d||(self.presetType_str="movetext"),self.allCategoriesLabel_str=self.props_obj.allCategoriesLabel,self.slideShowAutoPlay_str=self.props_obj.slideShowAutoPlay,self.addKeyboardSupport_str=self.props_obj.addKeyboardSupport,self.showCloseButton_str=self.props_obj.showCloseButton,self.showShareButton_str=self.props_obj.showShareButton,self.showZoomButton_str=self.props_obj.showZoomButton,self.showSlideShowButton_str=self.props_obj.showSlideShowButton,self.showSlideShowAnimation_str=self.props_obj.showSlideShowAnimation,self.showNextAndPrevButtons_str=self.props_obj.showNextAndPrevButtons,self.showNextAndPrevButtonsOnMobile_str=self.props_obj.showNextAndPrevButtonsOnMobile,self.itemBoxShadow_str=self.props_obj.itemBoxShadow,self.itemBackgroundColor_str=self.props_obj.itemBackgroundColor,self.itemBorderColor_str=self.props_obj.itemBorderColor,self.backgroundColor_str=self.props_obj.lightboxBackgroundColor,self.showDescriptionButton_str=self.props_obj.showDescriptionButton,self.showDescriptionByDefault_str=self.props_obj.showDescriptionByDefault,self.descriptionWindowAnimationType_str=self.props_obj.descriptionWindowAnimationType,self.descriptionWindowPosition_str=self.props_obj.descriptionWindowPosition,self.useAsModal_str=self.props_obj.useAsModal,self.descriptionWindowBackgroundColor_str=self.props_obj.descriptionWindowBackgroundColor,self.descriptionWindowBackgroundOpacity=self.props_obj.descriptionWindowBackgroundOpacity,self.useVideo_str=self.props_obj.useVideo,self.useAudio_str=self.props_obj.useAudio,self.videoShowFullScreenButton_str=self.props_obj.videoShowFullScreenButton,self.nextVideoOrAudioAutoPlay_str=self.props_obj.nextVideoOrAudioAutoPlay,self.videoAutoPlay_str=self.props_obj.videoAutoPlay,self.videoLoop_str=self.props_obj.videoLoop,self.audioAutoPlay_str=self.props_obj.audioAutoPlay,self.audioLoop_str=self.props_obj.audioLoop,self.videoControllerBackgroundColor_str=self.props_obj.videoControllerBackgroundColor,self.videoPosterBackgroundColor_str=self.props_obj.videoPosterBackgroundColor,self.videoPosterBackgroundColor_str=self.props_obj.videoPosterBackgroundColor,self.audioControllerBackgroundColor_str=self.props_obj.audioControllerBackgroundColor,self.timeColor_str=self.props_obj.timeColor,self.facebookAppId_str=self.props_obj.facebookAppId,self.backgroundColor_str=self.props_obj.backgroundColor||"transparent",self.lightBoxInfoWindowBackgroundColor_str=self.props_obj.lightBoxInfoWindowBackgroundColor||"transparent",self.thumbnailBorderNormalColor_str=self.props_obj.thumbnailBorderNormalColor||"transparent",self.thumbnailBorderSelectedColor_str=self.props_obj.thumbnailBorderSelectedColor||"transparent",self.thumbnailBackgroundColor_str=self.props_obj.thumbnailBackgroundColor||"transparent",self.thumbnailOverlayColor_str=self.props_obj.thumbnailOverlayColor||"transparent",self.loadMoreButtonLabel_str=self.props_obj.loadMoreButtonLabel||"not defined",self.comboboxSelectorBackgroundNormalClassName_str=self.props_obj.comboboxSelectorBackgroundNormalClassName||"",self.comboboxSelectorBackgroundNormalClassName_str="UGPMenuButtonBackgroundNormal",self.comboboxSelectorBackgroundSelectedClassName_str=self.props_obj.comboboxSelectorBackgroundSelectedClassName||"",self.comboboxSelectorBackgroundSelectedClassName_str="UGPMenuButtonBackgroundSelected",self.comboboxSelectorTextNormalClassName_str=self.props_obj.comboboxSelectorTextNormalClassName||"",self.comboboxSelectorTextNormalClassName_str="UGPMenuButtonTextNormal",self.comboboxSelectorTextSeectedClassName_str=self.props_obj.comboboxSelectorTextSeectedClassName||"",self.comboboxSelectorTextSeectedClassName_str="UGPMenuButtonTextSelected",self.menuBackgroundClass_str=self.props_obj.menuBackgroundClassName||"",self.menuBackgroundClass_str="UGPMenuBackground",self.menuButtonBackgroundNormalClassName_str=self.props_obj.menuButtonBackgroundNormalClassName||"",self.menuButtonBackgroundNormalClassName_str="UGPMenuButtonBackgroundNormal",self.menuButtonBackgroundSelectedClassName_str=self.props_obj.menuButtonBackgroundSelectedClassName||"",self.menuButtonBackgroundSelectedClassName_str="UGPMenuButtonBackgroundSelected",self.menuButtonTextNormalClassName_str=self.props_obj.menuButtonTextNormalClassName||"",self.menuButtonTextNormalClassName_str="UGPMenuButtonTextNormal",self.menuButtonTextSeectedClassName_str=self.props_obj.menuButtonTextSeectedClassName||"",self.menuButtonTextSeectedClassName_str="UGPMenuButtonTextSelected",self.menuButtonsSpacersClassName_str=self.props_obj.menuButtonsSpacersClassName||"",self.menuButtonsSpacersClassName_str="UGPMenuButtonsSpacers",self.loadMoreButtonBackgroundNormalClassName_str=self.props_obj.loadMoreButtonBackgroundNormalClassName||"",self.loadMoreButtonBackgroundNormalClassName_str="UGPLoadMoreButtonBackgroundNormal",self.loadMoreButtonBackgroundSelectedClassName_str=self.props_obj.loadMoreButtonBackgroundSelectedClassName||"",self.loadMoreButtonBackgroundSelectedClassName_str="UGPLoadMoreButtonBackgroundSelected",self.loadMoreButtonTextNormalClassName_str=self.props_obj.loadMoreButtonTextNormalClassName||"",self.loadMoreButtonTextNormalClassName_str="UGPLoadMoreButtonTextNormal",self.loadMoreButtonTextSeectedClassName_str=self.props_obj.loadMoreButtonTextSeectedClassName||"",self.loadMoreButtonTextSeectedClassName_str="UGPLoadMoreButtonTextSelected",self.loadMoreButtonOffsetTop=self.props_obj.loadMoreButtonOffsetTop||0,self.loadMoreButtonOffsetLeft=self.props_obj.loadMoreButtonOffsetLeft||0,self.loadMoreButtonOffsetRight=self.props_obj.loadMoreButtonOffsetRight||0,self.loadMoreButtonOffsetBottom=self.props_obj.loadMoreButtonOffsetBottom||0,self.loadMoreButtonBorderSize=self.props_obj.loadMoreButtonBorderSize||0,self.loadMoreButtonBorderRadius=self.props_obj.loadMoreButtonBorderRadius||0,self.thumbnailMaxWidth=self.props_obj.thumbnailMaxWidth||280,self.thumbnailMaxWidth<20&&(self.thumbnailMaxWidth=20),self.thumbnailMaxHeight=self.props_obj.thumbnailMaxHeight||240,self.thumbnailMaxHeight<20&&(self.thumbnailMaxHeight=20),self.thumbnailOverlayOpacity=void 0==self.props_obj.thumbnailOverlayOpacity?1:self.props_obj.thumbnailOverlayOpacity,self.spaceBetweenThumbanilIcons=self.props_obj.spaceBetweenThumbanilIcons||5,self.spaceBetweenTextAndIcons=self.props_obj.spaceBetweenTextAndIcons||0,self.howManyThumbnailsToDisplayPerSet=parseInt(self.props_obj.howManyThumbnailsToDisplayPerSet)||2,self.howManyThumbnailsToDisplayPerSet<2&&(self.howManyThumbnailsToDisplayPerSet=2),"default"==self.thumbnailLoadingType_str&&(self.howManyThumbnailsToDisplayPerSet=1e3),self.menuMaxWidth=self.props_obj.menuMaxWidth||500,self.menuOffsetTop=self.props_obj.menuOffsetTop||0,self.menuButtonsSapcerLeftAndRight=self.props_obj.menuButtonsSapcerLeftAndRight||0,self.menuOffsetBottom=self.props_obj.menuOffsetBottom||0,self.horizontalSpaceBetweenMenuButtons=self.props_obj.horizontalSpaceBetweenMenuButtons||0,self.verticalSpaceBetweenMenuButtons=self.props_obj.verticalSpaceBetweenMenuButtons||0,self.menuButtonSpacerWidth=self.props_obj.menuButtonSpacerWidth||0,self.menuButtonSpacerHeight=self.props_obj.menuButtonSpacerHeight||0,self.thumbnailBorderSize=self.props_obj.thumbnailBorderSize||0,self.thumbnailBorderRadius=self.props_obj.thumbnailBorderRadius||0,self.loadMoreButtonOffsetTop=self.props_obj.loadMoreButtonOffsetTop||0,self.loadMoreButtonOffsetBottom=self.props_obj.loadMoreButtonOffsetBottom||0,self.lightBoxBackgroundColor_str=self.props_obj.lightBoxBackgroundColor||"transparent",self.lightBoxInfoWindowBackgroundOpacity=self.props_obj.lightBoxInfoWindowBackgroundOpacity||1,self.lightBoxBackgroundOpacity=self.props_obj.lightBoxInfoWindowBackgroundOpacity||1,self.lightBoxMainBackgroundOpacity=self.props_obj.lightBoxMainBackgroundOpacity||1,self.lightBoxItemBorderColor_str=self.props_obj.lightBoxItemBorderColor||"transparent",self.lightBoxItemBackgroundColor_str=self.props_obj.lightBoxItemBackgroundColor||"transparent",self.buttonsOffestY=0,self.contentOffsetY=0,self.lightBoxBorderSize=self.props_obj.lightBoxBorderSize||0,self.lightBoxSlideShowDelay=1e3*self.props_obj.lightBoxSlideShowDelay||3e3,self.startAtCategory_ar=[parseInt(self.props_obj.startAtCategory)],self.buttonsHideDelay=self.props_obj.buttonsHideDelay,self.slideShowDelay=self.props_obj.slideShowDelay,self.defaultItemWidth=self.props_obj.defaultItemWidth,self.defaultItemHeight=self.props_obj.defaultItemHeight,self.itemOffsetHeight=self.props_obj.itemOffsetHeight,self.spaceBetweenButtons=self.props_obj.spaceBetweenButtons,self.buttonsOffsetIn=self.props_obj.buttonsOffsetIn,self.buttonsOffsetOut=self.props_obj.buttonsOffsetOut,self.itemBorderSize=self.props_obj.itemBorderSize||0,self.itemBorderRadius=self.props_obj.itemBorderRadius||0,self.thumbnailIconWidth=self.props_obj.thumbnailIconWidth||20,self.thumbnailIconHeight=self.props_obj.thumbnailIconHeight||0,self.backgroundOpacity=self.props_obj.backgroundOpacity,self.horizontalSpaceBetweenThumbnails=self.props_obj.horizontalSpaceBetweenThumbnails||0,self.verticalSpaceBetweenThumbnails=self.props_obj.verticalSpaceBetweenThumbnails||0,self.thumbnailsHorizontalOffset=self.props_obj.thumbnailsHorizontalOffset||0,self.thumbnailsVerticalOffset=self.props_obj.thumbnailsVerticalOffset||0,self.useIconButtons_bl=self.props_obj.useIconButtons,self.useIconButtons_bl="yes"==self.useIconButtons_bl,self.inverseButtonsIcons_bl=self.props_obj.inverseButtonsIcons,self.inverseButtonsIcons_bl="yes"==self.inverseButtonsIcons_bl,self.inverseButtonsIcons_bl?(self.linkIconPathN_str=self.gridSkinPath_str+"link-icon-with-background.png",self.linkIconPathS_str=self.gridSkinPath_str+"link-icon.png"):(self.linkIconPathN_str=self.gridSkinPath_str+"link-icon.png",self.linkIconPathS_str=self.gridSkinPath_str+"link-icon-with-background.png"),self.disableThumbnailsInteractivity_bl=self.props_obj.disableThumbnailsInteractivity,self.disableThumbnailsInteractivity_bl="yes"==self.disableThumbnailsInteractivity_bl,self.disableThumbnails_bl=self.props_obj.disableThumbnails,self.disableThumbnails_bl="no"!=self.disableThumbnails_bl,self.addMouseWheelSupport_bl=self.props_obj.addMouseWheelSupport,self.addMouseWheelSupport_bl="yes"==self.addMouseWheelSupport_bl,self.addLightBoxKeyboardSupport_bl=self.props_obj.addLightBoxKeyboardSupport,self.addLightBoxKeyboardSupport_bl="no"!=self.addLightBoxKeyboardSupport_bl,self.showLighBoxNextAndPrevButtons_bl=self.props_obj.showLightBoxNextAndPrevButtons,self.showLighBoxNextAndPrevButtons_bl="no"!=self.showLighBoxNextAndPrevButtons_bl,self.showLightBoxZoomButton_bl=self.props_obj.showLightBoxZoomButton,self.showLightBoxZoomButton_bl="no"!=self.showLightBoxZoomButton_bl,self.showLightBoxInfoButton_bl=self.props_obj.showLightBoxInfoButton,self.showLightBoxInfoButton_bl="no"!=self.showLightBoxInfoButton_bl,self.showLighBoxSlideShowButton_bl=self.props_obj.showLighBoxSlideShowButton,self.showLighBoxSlideShowButton_bl="no"!=self.showLighBoxSlideShowButton_bl,self.showAllCategories_bl=self.props_obj.showAllCategories,self.showAllCategories_bl="yes"==self.showAllCategories_bl,self.keepThumbnailsOriginalSizeOnGridStart_bl=self.props_obj.keepThumbnailsOriginalSizeOnGridStart,self.keepThumbnailsOriginalSizeOnGridStart_bl="yes"==self.keepThumbnailsOriginalSizeOnGridStart_bl,self.randomizeCategories_bl=self.props_obj.randomizeCategories,self.randomizeCategories_bl="yes"==self.randomizeCategories_bl,self.animateParent_bl=self.props_obj.animateParent,self.animateParent_bl="yes"==self.animateParent_bl,self.showMenu_bl=self.props_obj.showMenu,self.showMenu_bl="yes"==self.showMenu_bl,self.showMenuButtonsSpacers_bl=self.props_obj.showMenuButtonsSpacers,self.showMenuButtonsSpacers_bl="yes"==self.showMenuButtonsSpacers_bl,self.multipleCategorySelection_bl=self.props_obj.multipleCategorySelection,self.multipleCategorySelection_bl="yes"==self.multipleCategorySelection_bl,self.showTotalThumbnailsPerCategory_bl=self.props_obj.showTotalThumbnailsPerCategory,self.showTotalThumbnailsPerCategory_bl="yes"==self.showTotalThumbnailsPerCategory_bl,self.scaleImage_bl="no"!=self.scaleImage,self.playListElement=GAMLDATUtils.getChildById(self.props_obj.playlistId),self.playListElement){self.allPlaylists_ar=GAMLDATUtils.getChildren(self.playListElement),self.totalPlaylists=self.allPlaylists_ar.length,self.totalPlaylists<=1&&(self.showAllCategories_bl=!1);for(e=0;e<self.totalPlaylists;e++)GAMLDATUtils.getAttributeValue(self.allPlaylists_ar[e],"data-soundcloud-url")?self.isSoundcloud_bl=!0:GAMLDATUtils.getAttributeValue(self.allPlaylists_ar[e],"data-youtube-playlist-url")?self.isYoutube_bl=!0:GAMLDATUtils.getAttributeValue(self.allPlaylists_ar[e],"data-facebook-album-url")?self.isFacebook_bl=!0:GAMLDATUtils.getAttributeValue(self.allPlaylists_ar[e],"data-pintrest-board-url")?self.isPintrest_bl=!0:GAMLDATUtils.getAttributeValue(self.allPlaylists_ar[e],"data-flickr-album-url")&&(self.isFlickr_bl=!0);if(self.isSoundcloud_bl){self.soundCloudData_ar=[],self.soundCloudLoadId=0;for(e=0;e<self.totalPlaylists;e++){l=self.allPlaylists_ar[e];GAMLDATUtils.getAttributeValue(l,"data-soundcloud-url")&&(self.soundCloudData_ar[e]=GAMLDATUtils.getAttributeValue(l,"data-soundcloud-url")),self.categories_ar[e]=GAMLDATUtils.getAttributeValue(self.allPlaylists_ar[e],"data-category-name")}GAMMAGRIDData.isSoundCloud_bl=!0}else if(self.isYoutube_bl){self.youtubeData_ar=[],self.youtubeLoadId=0;for(e=0;e<self.totalPlaylists;e++){l=self.allPlaylists_ar[e];if(GAMLDATUtils.getAttributeValue(l,"data-youtube-playlist-url")){s=GAMLDATUtils.getAttributeValue(l,"data-youtube-playlist-url").match(/list=([^&]+)/i)[1];self.youtubeData_ar[e]=s}self.categories_ar[e]=GAMLDATUtils.getAttributeValue(self.allPlaylists_ar[e],"data-category-name")}}else if(self.isFacebook_bl){self.facebookData_ar=[],self.facebookLoadId=0,self.isAPIReady_bl=!1;for(e=0;e<self.totalPlaylists;e++){l=self.allPlaylists_ar[e];GAMLDATUtils.getAttributeValue(l,"data-facebook-album-url")&&(s=GAMLDATUtils.getAttributeValue(l,"data-facebook-album-url"),self.facebookData_ar[e]=String(s.match(/[\.][0-9]*[\.|&]/i)[0]).replace(/\.|&/g,"")),self.categories_ar[e]=GAMLDATUtils.getAttributeValue(self.allPlaylists_ar[e],"data-category-name")}GAMMAGRIDData.isFaceBook_bl=!0}else if(self.isPintrest_bl){GAMMAGRIDData.isPintrest_bl=!0,self.pinterestData_ar=[],self.pintrestLoadId=0,self.countPN=0,self.isAPIReady_bl=!1,self.showPinButton_bl&&(window.pAsyncInit=function(){PDK.init({appId:"nada",cookie:!0})},function(t,e,s){var l,o=t.getElementsByTagName(e)[0];t.getElementById(s)||((l=t.createElement(e)).id=s,l.src="//assets.pinterest.com/sdk/sdk.js",o.parentNode.insertBefore(l,o))}(document,"script","pinterest-jssdk")),self.inverseButtonsIcons_bl?(self.linkIconPathN_str=self.gridSkinPath_str+"pin-icon-with-background.png",self.linkIconPathS_str=self.gridSkinPath_str+"pin-icon.png"):(self.linkIconPathN_str=self.gridSkinPath_str+"pin-icon.png",self.linkIconPathS_str=self.gridSkinPath_str+"pin-icon-with-background.png");for(e=0;e<self.totalPlaylists;e++){l=self.allPlaylists_ar[e];GAMLDATUtils.getAttributeValue(l,"data-pintrest-board-url")&&(s=GAMLDATUtils.getAttributeValue(l,"data-pintrest-board-url"),self.pinterestData_ar[e]="https://api.pinterest.com/v3/pidgets/boards/"+String(s.match(/pinterest[^\/]+\/(.+)/i)[1])+"pins"),self.categories_ar[e]=GAMLDATUtils.getAttributeValue(self.allPlaylists_ar[e],"data-category-name")}}else if(self.isFlickr_bl){GAMMAGRIDData.isFlickr_bl=!0,self.flickrData_ar=[],self.flickrLoadId=0,self.isAPIReady_bl=!1;for(var e=0;e<self.totalPlaylists;e++){var s,l=self.allPlaylists_ar[e];GAMLDATUtils.getAttributeValue(l,"data-flickr-album-url")&&(s=GAMLDATUtils.getAttributeValue(l,"data-flickr-album-url"),self.flickrData_ar[e]=String(s.match(/[^\/]+$/i))),self.categories_ar[e]=GAMLDATUtils.getAttributeValue(self.allPlaylists_ar[e],"data-category-name")}}self.isFacebook_bl||self.setupFacebook(),self.prepareSiknForLoading()}else self.playlistErrorHandler()}else setTimeout(function(){null!=self&&(t="The <font color='#FF0000'>lightboxSkinPath</font> property is not defined in the constructor function!",self.dispatchEvent(GAMLDATData.LOAD_ERROR,{text:t}))},50);else setTimeout(function(){null!=self&&(t="The <font color='#FF0000'>gridSkinPath</font> property is not defined in the constructor function!",self.dispatchEvent(GAMLDATData.LOAD_ERROR,{text:t}))},50);else setTimeout(function(){null!=self&&(t="The <font color='#FF0000'>mainFolderPath</font> property is not defined in the constructor function!",self.dispatchEvent(GAMLDATData.LOAD_ERROR,{text:t}))},50)},this.loadPlaylist=function(){if(self.isFlickr_bl)self.loadFlickrPlaylist();else if(self.isSoundcloud_bl)self.loadSoundCloudPlaylist();else if(self.isYoutube_bl)self.loadYoutubePlaylist();else if(self.isPintrest_bl)self.loadPintrestPlaylist();else if(self.isFacebook_bl){if(!self.accessToken_str)return void self.loadAccessFacebookAccessToken();self.loadFacebookPlaylist()}else self.loadHTMLPlaylist(self.allPlaylists_ar),self.loadSkin()},this.stopToLoadPlaylist=function(){clearTimeout(self.JSONPRequestTimeoutId_to);try{self.scs_el.src=null,document.documentElement.removeChild(self.scs_el),self.scs_el=null}catch(t){}if(null!=self.xhr){try{self.xhr.abort()}catch(t){}self.xhr.onreadystatechange=null,self.xhr.onerror=null,self.xhr=null}},this.loadFlickrPlaylist=function(){if(!self.isPlaylistDispatchingError_bl){if(self.flickrUrl_str=self.flickrData_ar[self.flickrLoadId],self.stopToLoadPlaylist(),url="https://api.flickr.com/services/rest/?method=flickr.photosets.getPhotos&api_key="+self.flickrAPIKey_str+"&photoset_id="+self.flickrUrl_str+"&format=json&jsoncallback="+parent.instanceName_str+".data.parseflickrPlaylist",null==self.scs_el)try{self.scs_el=document.createElement("script"),self.scs_el.src=url,self.scs_el.id=parent.instanceName_str+".data.parseflickrPlaylist",document.documentElement.appendChild(self.scs_el)}catch(t){}self.JSONPRequestTimeoutId_to=setTimeout(self.playlistErrorHandler,8e3)}},this.parseflickrPlaylist=function(t){if(!self.isPlaylistDispatchingError_bl){if(self.stopToLoadPlaylist(),"fail"==t.stat)return self.playlistErrorHandler(),void(console&&console.log(t));self.flickrObject_ar=[],self.lightboxParsedPlaylist_ar=[];for(o=0;o<t.photoset.photo.length;o++)self.flickrObject_ar.push(t.photoset.photo[o]);for(var e,s,l=self.flickrObject_ar.length,o=0;o<l;o++){var r={};if(e=self.flickrObject_ar[o],r.catId=self.flickrLoadId,r.url="http://farm"+e.farm+".staticflickr.com/"+e.server+"/"+e.id+"_"+e.secret+"_b.jpg",r.thumbnailPath_str="http://farm"+e.farm+".staticflickr.com/"+e.server+"/"+e.id+"_"+e.secret+"_n.jpg",self.showFlickrkDescription_bl&&e.title&&(s=e.title.length>self.flickrTitleMaxLength?e.title.substr(0,self.flickrTitleMaxLength)+" ...":e.title,r.htmlContent1_str="<div class='"+self.flickrTitleClassName_str+"'>"+s+"</div>",r.rawDescription_str=e.description,"animtext"==self.presetType_str&&!self.showAsExtraText_bl)){var a,i,n=s,f=String(r.htmlContent1_str).match(/<[^<>]*>/)[0],d=String(r.htmlContent1_str).match(/<[^<>]*>/g)[1];r.animText_ar=[],r.htmlContent1_str=n.replace(/(^[\s]+|[\s]+$)/g,""),i=f,a=r.htmlContent1_str.split("");for(var u=0;u<a.length;u++)i+="<div style='position:relative;display:inline-block;'>"+(" "==a[u]?"&nbsp":a[u])+"</div>";i+=d,r.htmlContent1_str=i}self.showAsExtraText_bl&&(r.htmlExtraContent_str=r.htmlContent1_str,r.htmlContent1_str=void 0,self.hasExtraText_bl=!0),r.titleText_str=s,r.type_str=GAMMAGRID.IMAGE,r.iconType_str=GAMMAGRID.IMAGE,self.inverseButtonsIcons_bl?(r.thumbIconPathN_str=self.gridSkinPath_str+"image-icon-with-background.png",r.thumbIconPathS_str=self.gridSkinPath_str+"image-icon.png"):(r.thumbIconPathN_str=self.gridSkinPath_str+"image-icon.png",r.thumbIconPathS_str=self.gridSkinPath_str+"image-icon-with-background.png"),self.parsedPlaylist_ar.push(r)}++self.flickrLoadId<self.totalPlaylists?self.loadPlaylist():(self.finalizePlaylist(),self.loadSkin())}},this.loadPintrestPlaylist=function(){if(!self.isPlaylistDispatchingError_bl){if(self.pinterestUrl_str=self.pinterestData_ar[self.pintrestLoadId],self.stopToLoadPlaylist(),url=self.pinterestUrl_str+"?callback="+parent.instanceName_str+".data.parsePintrestPlaylist",null==self.scs_el)try{self.scs_el=document.createElement("script"),self.scs_el.src=url,self.scs_el.id=parent.instanceName_str+".data.parsePintrestPlaylist",document.documentElement.appendChild(self.scs_el)}catch(t){}self.JSONPRequestTimeoutId_to=setTimeout(self.playlistErrorHandler,8e3)}},this.parsePintrestPlaylist=function(t){if(!self.isPlaylistDispatchingError_bl){if(self.stopToLoadPlaylist(),"failure"==t.status)return self.playlistErrorHandler(),void(console&&console.log(t));self.pintrestObject_ar=[],self.lightboxParsedPlaylist_ar=[];for(o=0;o<t.data.pins.length;o++)self.pintrestObject_ar.push(t.data.pins[o]);for(var e,s=self.pintrestObject_ar.length,l="",o=0;o<s;o++){var r={};if(e=self.pintrestObject_ar[o],r.catId=self.pintrestLoadId,r.url="https://www.pinterest.com/pin/"+e.id,r.thumbnailPath_str=e.images["237x"].url,r.pinLInk_str=e.link,self.showPinButton_bl&&(r.extraButtonUrl_str="pinterest"),self.showPintrestDescription_bl&&e.description&&" "!=e.description&&(e.description&&(l=e.description),r.htmlContent1_str="<div class='"+self.pintrestDescriptionClassName_str+"'>"+e.description+"</div>",r.rawDescription_str=e.description,"animtext"==self.presetType_str&&!self.showAsExtraText_bl)){var a,i,n=l,f=String(r.htmlContent1_str).match(/<[^<>]*>/)[0],d=String(r.htmlContent1_str).match(/<[^<>]*>/g)[1];r.animText_ar=[],r.htmlContent1_str=n.replace(/(^[\s]+|[\s]+$)/g,""),i=f,a=r.htmlContent1_str.split("");for(var u=0;u<a.length;u++)i+="<div style='position:relative;display:inline-block;'>"+(" "==a[u]?"&nbsp":a[u])+"</div>";i+=d,r.htmlContent1_str=i}self.showAsExtraText_bl&&(r.htmlExtraContent_str=r.htmlContent1_str,r.htmlContent1_str=void 0,self.hasExtraText_bl=!0),r.titleText_str=l,r.type_str=GAMMAGRID.LINK,r.iconType_str=GAMMAGRID.IMAGE,self.inverseButtonsIcons_bl?(r.thumbIconPathN_str=self.gridSkinPath_str+"image-icon-with-background.png",r.thumbIconPathS_str=self.gridSkinPath_str+"image-icon.png"):(r.thumbIconPathN_str=self.gridSkinPath_str+"image-icon.png",r.thumbIconPathS_str=self.gridSkinPath_str+"image-icon-with-background.png"),self.parsedPlaylist_ar.push(r)}++self.pintrestLoadId<self.totalPlaylists?self.loadPlaylist():(self.finalizePlaylist(),self.loadSkin())}},this.loadSoundCloudPlaylist=function(){if(!self.isPlaylistDispatchingError_bl){if(self.soundCloundUrl_str=self.soundCloudData_ar[self.soundCloudLoadId],self.stopToLoadPlaylist(),-1!=self.soundCloundUrl_str.indexOf("likes")&&(self.soundCloundUrl_str=self.soundCloundUrl_str.replace(/\/likes$/,"/favorites")),-1==self.soundCloundUrl_str.indexOf("api.soundcloud.")?url="http://api.soundcloud.com/resolve?format=json&url="+self.soundCloundUrl_str+"&limit=100&client_id="+self.scClientId_str+"&callback="+parent.instanceName_str+".data.parseSoundCloudPlaylist":url=self.sourceURL_str+"?format=json&client_id="+self.scClientId_str+"&limit=100&callback="+parent.instanceName_str+".data.parseSoundCloudPlaylist",null==self.scs_el)try{self.scs_el=document.createElement("script"),self.scs_el.src=url,self.scs_el.id=parent.instanceName_str+".data.parseSoundCloud",document.documentElement.appendChild(self.scs_el)}catch(t){}self.JSONPRequestTimeoutId_to=setTimeout(self.playlistErrorHandler,8e3)}},this.parseSoundCloudPlaylist=function(t){if(!self.isPlaylistDispatchingError_bl){if(self.stopToLoadPlaylist(),t.tracks)t=t.tracks;else{if(!t.length)return void self.dispatchEvent(GAMMAGRIDData.LOAD_ERROR,{text:"Please provide a playlist or tracks URL : <font color='#FF0000'>"+self.soundCloundUrl_str+"</font>."});t=t}self.soundCloudObject_ar=[],self.lightboxParsedPlaylist_ar=[];for(o=0;o<t.length;o++)self.soundCloudObject_ar.push(t[o]);for(var e,s,l=self.soundCloudObject_ar.length,o=0;o<l;o++){var r={};if(e=self.soundCloudObject_ar[o],r.catId=self.soundCloudLoadId,r.url=e.stream_url+"?consumer_key="+self.scClientId_str,r.thumbnailPath_str=String(e.artwork_url).replace(/large/,"t300x300"),(self.showSoundCloudUserName_bl||self.showSoundCloudTrack_bl)&&(s=e.user.username+" - "+e.title,"animtext"==self.presetType_str&&self.showSoundCloudUserName_bl&&!self.showAsExtraText_bl?r.htmlContent1_str="<div class='"+self.soundCloudTitleClassName_str+"'>"+e.user.username+" - "+e.title+"</div>":self.presetType_str&&(r.htmlContent1_str="<div class='"+self.soundCloudTitleClassName_str+"'>"+e.user.username+"</div><div class='"+self.soundCloudTrackClassName_str+"'>"+e.title+"</div>"),"animtext"==self.presetType_str&&!self.showAsExtraText_bl)){var a,i,n=s,f=String(r.htmlContent1_str).match(/<[^<>]*>/)[0],d=String(r.htmlContent1_str).match(/<[^<>]*>/g)[1];r.animText_ar=[],r.htmlContent1_str=n.replace(/(^[\s]+|[\s]+$)/g,""),i=f,a=r.htmlContent1_str.split("");for(var u=0;u<a.length;u++)i+="<div style='position:relative;display:inline-block;'>"+(" "==a[u]?"&nbsp":a[u])+"</div>";i+=d,r.htmlContent1_str=i}self.showAsExtraText_bl&&(r.htmlExtraContent_str=r.htmlContent1_str,r.htmlContent1_str=void 0,self.hasExtraText_bl=!0),r.titleText_str=s,r.type_str=GAMMAGRID.AUDIO,r.iconType_str=GAMMAGRID.AUDIO,self.inverseButtonsIcons_bl?(r.thumbIconPathN_str=self.gridSkinPath_str+"audio-icon-with-background.png",r.thumbIconPathS_str=self.gridSkinPath_str+"audio-icon.png"):(r.thumbIconPathN_str=self.gridSkinPath_str+"audio-icon.png",r.thumbIconPathS_str=self.gridSkinPath_str+"audio-icon-with-background.png"),self.parsedPlaylist_ar.push(r)}++self.soundCloudLoadId<self.totalPlaylists?self.loadPlaylist():(self.finalizePlaylist(),self.loadSkin())}},this.setupFacebook=function(){},this.facebookAPIReadyHandler=function(t){self.loadAccessFacebookAccessToken()},this.loadAccessFacebookAccessToken=function(){self.stopToLoadPlaylist(),self.sourceURL_str=self.mainFolderPath_str+"facebook_access_token.txt",self.xhr=new XMLHttpRequest,self.xhr.onreadystatechange=self.facebookTokenOnLoadoadHandler,self.xhr.onerror=self.facebookAPIErrorHandler;try{self.xhr.open("get",self.sourceURL_str+"?rand="+parseInt(99999999*Math.random()),!0),self.xhr.send()}catch(t){t&&t.message&&t.message,self.facebookAPIErrorHandler()}},this.facebookTokenOnLoadoadHandler=function(e){var response;4==self.xhr.readyState&&(404==self.xhr.status?self.dispatchEvent(GAMMAGRIDData.LOAD_ERROR,{text:"Facebook token path is not found: <font color='#FF0000'>"+self.sourceURL_str+"</font>"}):408==self.xhr.status?self.dispatchEvent(GAMMAGRIDData.LOAD_ERROR,{text:"Loadiong Facebook token file request load timeout!"}):200==self.xhr.status&&(response=window.JSON?JSON.parse(self.xhr.responseText):eval("("+self.xhr.responseText+")"),self.accessToken_str=response.access_token,self.loadPlaylist()))},this.facebookAPIErrorHandler=function(t){try{window.console&&console.log(t),window.console&&console.log(t.message)}catch(t){}self.dispatchEvent(GAMMAGRIDData.LOAD_ERROR,{text:"Error loading file : <font color='#FFFFFF'>"+self.sourceURL_str+"</font>. Make sure the path is correct"})},this.loadFacebookPlaylist=function(){FB.api("/"+self.facebookData_ar[self.facebookLoadId]+"?access_token="+self.accessToken_str,"GET",{fields:"photos.limit(100){images,created_time,name}"},function(t){t&&self.parseFacebookPlaylist(t)})},this.parseFacebookPlaylist=function(t){if(!self.isPlaylistDispatchingError_bl){if(self.stopToLoadPlaylist(),t.error)return self.playlistErrorHandler(),void(console&&console.dir(t));self.facebookObject_ar=[],self.lightboxParsedPlaylist_ar=[];for(o=0;o<t.photos.data.length;o++)self.facebookObject_ar.push(t.photos.data[o]);for(var e,s,l=self.facebookObject_ar.length,o=0;o<l;o++){var r={};e=self.facebookObject_ar[o],r.catId=self.facebookLoadId,r.url=e.images[0].source,r.thumbnailPath_str=e.images[e.images.length-1].source;for(var a=e.images.length-1;a>=0;a--)if(parseInt(e.images[a].width)>200&&parseInt(e.images[a].width)<500){r.thumbnailPath_str=e.images[a].source;break}if(self.showFacebookTitle_bl&&e.name&&(e.name.length>self.facebookTitleMaxLength?(s=e.name.substr(0,self.facebookTitleMaxLength)+" ...",r.htmlContent1_str="<div class='"+self.facebookTitleClassName_str+"'>"+s+"</div>"):(s=e.name,r.htmlContent1_str="<div class='"+self.facebookTitleClassName_str+"'>"+s+"</div>"),"animtext"==self.presetType_str)){var i,n,f=s,d=String(r.htmlContent1_str).match(/<[^<>]*>/)[0],u=String(r.htmlContent1_str).match(/<[^<>]*>/g)[1];r.animText_ar=[],r.htmlContent1_str=f.replace(/(^[\s]+|[\s]+$)/g,""),n=d,i=r.htmlContent1_str.split("");for(var c=0;c<i.length;c++)n+="<div style='position:relative;display:inline-block;'>"+(" "==i[c]?"&nbsp":i[c])+"</div>";n+=u,r.htmlContent1_str=n}self.showFacebookDescription_bl&&e.name&&(r.description="<p class='"+self.facebookDescriptionClassName_str+"'>"+e.name+"</p>",r.descriptionText=String(e.name).substr(0,self.facebookTitleMaxLength)),r.titleText_str=s,r.iconType_str=GAMMAGRID.IMAGE,self.inverseButtonsIcons_bl?(r.thumbIconPathN_str=self.gridSkinPath_str+"image-icon-with-background.png",r.thumbIconPathS_str=self.gridSkinPath_str+"image-icon.png"):(r.thumbIconPathN_str=self.gridSkinPath_str+"image-icon.png",r.thumbIconPathS_str=self.gridSkinPath_str+"image-icon-with-background.png"),self.parsedPlaylist_ar.push(r)}++self.facebookLoadId<self.totalPlaylists?self.loadFacebookPlaylist():(self.finalizePlaylist(),self.loadSkin())}},this.loadYoutubePlaylist=function(){if(self.youtubeUrl_str=self.youtubeData_ar[self.youtubeLoadId],self.nextPageToken_str?self.sourceURL_str="https://www.googleapis.com/youtube/v3/playlistItems?part=snippet&pageToken="+self.nextPageToken_str+"&playlistId="+self.youtubeUrl_str+"&key=AIzaSyAlyhJ-C5POyo4hofPh3b7ECAxWy6t6lyg&maxResults=50&callback="+parent.instanceName_str+".data.parseYoutubePlaylist":(self.youtubeObject_ar=[],self.lightboxParsedPlaylist_ar=[],self.sourceURL_str="https://www.googleapis.com/youtube/v3/playlistItems?part=snippet&playlistId="+self.youtubeUrl_str+"&key=AIzaSyAlyhJ-C5POyo4hofPh3b7ECAxWy6t6lyg&maxResults=50&callback="+parent.instanceName_str+".data.parseYoutubePlaylist"),null==self.scs_el)try{self.scs_el=document.createElement("script"),self.scs_el.src=self.sourceURL_str,self.scs_el.id=parent.instanceName_str+".data.parseYoutubePlaylist",document.documentElement.appendChild(self.scs_el)}catch(t){}self.JSONPRequestTimeoutId_to=setTimeout(self.playlistErrorHandler,6e3)},this.parseYoutubePlaylist=function(t){if(!self.isPlaylistDispatchingError_bl){if(self.stopToLoadPlaylist(),t.error)return self.playlistErrorHandler(),void(console&&console.dir(t));for(o=0;o<t.items.length;o++)self.youtubeObject_ar.push(t.items[o]);if(t.nextPageToken)return self.nextPageToken_str=t.nextPageToken,void self.loadYoutubePlaylist();for(var e,s,l=self.youtubeObject_ar.length,o=0;o<l;o++){var r={};if((e=self.youtubeObject_ar[o]).snippet.thumbnails){if(r.catId=self.youtubeLoadId,r.url="https://www.youtube.com/watch?v="+e.snippet.resourceId.videoId,r.thumbnailPath_str=e.snippet.thumbnails.medium.url,self.showYtbTitle_bl&&(e.snippet.title.length>self.ytbTitleMaxLength?(s=e.snippet.title.substr(0,self.ytbTitleMaxLength)+" ...",r.htmlContent1_str="<div class='"+self.ytbTitleClassName_str+"'>"+s+"</div>"):(s=e.snippet.title,r.htmlContent1_str="<div class='"+self.ytbTitleClassName_str+"'>"+s+"</div>"),"animtext"==self.presetType_str)){var a,i,n=s,f=String(r.htmlContent1_str).match(/<[^<>]*>/)[0],d=String(r.htmlContent1_str).match(/<[^<>]*>/g)[1];r.animText_ar=[],r.htmlContent1_str=n.replace(/(^[\s]+|[\s]+$)/g,""),i=f,a=r.htmlContent1_str.split("");for(var u=0;u<a.length;u++)i+="<div style='position:relative;display:inline-block;'>"+(" "==a[u]?"&nbsp":a[u])+"</div>";i+=d,r.htmlContent1_str=i}self.showYtbDescription_bl&&(r.description="<p class='"+self.ytbDescriptionClassName_str+"'>"+e.snippet.description+"</p>",r.descriptionText=String(e.snippet.description).substr(0,self.ytbTitleMaxLength)),r.titleText_str=s,r.iconType_str=GAMMAGRID.YOUTUBE,self.inverseButtonsIcons_bl?(r.thumbIconPathN_str=self.gridSkinPath_str+"youtube-icon-with-background.png",r.thumbIconPathS_str=self.gridSkinPath_str+"youtube-icon.png"):(r.thumbIconPathN_str=self.gridSkinPath_str+"youtube-icon.png",r.thumbIconPathS_str=self.gridSkinPath_str+"youtube-icon-with-background.png"),self.parsedPlaylist_ar.push(r)}}++self.youtubeLoadId<self.totalPlaylists?(self.nextPageToken_str=void 0,self.loadYoutubePlaylist()):(self.finalizePlaylist(),self.loadSkin())}},this.playlistErrorHandler=function(){var t;t=self.isFlickr_bl?"Error loading Flickr album! - <font color='#FF0000'>"+self.flickrData_ar[self.flickrLoadId]+"</font>":self.isSoundcloud_bl?"Error loading Soundcloud playlist! - <font color='#FF0000'>"+self.soundCloudData_ar[self.soundCloudLoadId]+"</font>":self.isFacebook_bl?"Error loading Facebook playlist! - <font color='#FF0000'>"+self.facebookData_ar[self.facebookLoadId]+"</font>":self.isYoutube_bl?"Error loading Youtube playlist! - <font color='#FF0000'>"+self.youtubeData_ar[self.youtubeLoadId]+"</font>":self.isPintrest_bl?"Error loading Pintrest playlist! - <font color='#FF0000'>"+self.pinterestData_ar[self.pintrestLoadId]+"</font>":"Playlist div with the id! - <font color='#FF0000'>"+self.props_obj.playlistId+"</font> doesn't exists.",self.stopToLoadPlaylist(),self.isPlaylistDispatchingError_bl=!0,showLoadPlaylistErrorId_to=setTimeout(function(){self.dispatchEvent(GAMMAGRIDData.LOAD_ERROR,{text:t}),self.isPlaylistDispatchingError_bl=!1},50)},this.loadHTMLPlaylist=function(t){var e;self.parsedPlaylist_ar=[],self.lightboxParsedPlaylist_ar=[];for(var s,l,o,r,a=0;a<self.totalPlaylists;a++){s=(e=GAMLDATUtils.getChildren(t[a])).length,l=a,o=0;for(var i=0;i<s;i++){var n={},f=e[i];if(r="",o=i,!GAMLDATUtils.hasAttribute(f,"data-url"))return errorMessage_str="Attribute <font color='#FF0000'>data-url</font> is not found in the playlist at position nr: <font color='#FF0000'>"+i+"</font>.",void self.dispatchEvent(GAMMAGRIDData.LOAD_ERROR,{text:errorMessage_str});n.catId=a,n.url=String(GAMLDATUtils.getAttributeValue(f,"data-url")),n.target=GAMLDATUtils.getAttributeValue(f,"data-target")||"_blank",n.posterPath=GAMLDATUtils.getAttributeValue(f,"data-poster-path"),n.type_str=GAMLDATUtils.getAttributeValue(f,"data-url"),n.width=GAMLDATUtils.getAttributeValue(f,"data-width"),n.height=GAMLDATUtils.getAttributeValue(f,"data-height"),n.extraButtonUrl_str=GAMLDATUtils.getAttributeValue(f,"data-extra-button-url"),n.extraButtonUrlTarget_str=GAMLDATUtils.getAttributeValue(f,"data-extra-button-target")||"_blank",n.disabled_bl="none"==n.url,n.thumbnailBorderNormalColor=GAMLDATUtils.getAttributeValue(f,"data-thumbnail-border-normal-color"),n.thumbnailBorderSelectedColor=GAMLDATUtils.getAttributeValue(f,"data-thumbnail-border-selected-color"),n.thumbnailOverlayColor=GAMLDATUtils.getAttributeValue(f,"data-thumbnail-overlay-color");for(var d,u=GAMLDATUtils.getChildren(f),c=!1,p=0;p<u.length;p++){if(d=u[p],GAMLDATUtils.hasAttribute(d,"src")&&(c=!0,n.thumbnailPath_str=GAMLDATUtils.getAttributeValue(d,"src"),n.alt_str=GAMLDATUtils.getAttributeValue(d,"alt")||""),GAMLDATUtils.hasAttribute(d,"data-lightbox-desc")&&(n.description=d.innerHTML,n.descriptionText=d.innerText),GAMLDATUtils.hasAttribute(d,"data-thumbnail-content1")){if("animtext"==self.presetType_str){var _,h,b=d.innerText||d.textContent,m=String(d.innerHTML).match(/<[^<>]*>/)[0],g=String(d.innerHTML).match(/<[^<>]*>/g)[1];n.animText_ar=[],n.htmlContent1_str=b.replace(/(^[\s]+|[\s]+$)/g,""),h=m,_=n.htmlContent1_str.split("");for(var y=0;y<_.length;y++)h+="<div style='position:relative;display:inline-block;'>"+(" "==_[y]?"&nbsp":_[y])+"</div>";h+=g,n.htmlContent1_str=h}else n.htmlContent1_str=d.innerHTML;r+=d.innerText||d.textContent}GAMLDATUtils.hasAttribute(d,"data-thumbnail-content2")&&(n.htmlContent2_str=d.innerHTML,r+=d.innerText||d.textContent),GAMLDATUtils.hasAttribute(d,"data-thumbnail-extra-content")&&(n.htmlExtraContent_str=d.innerHTML,r+=d.innerText||d.textContent,self.hasExtraText_bl=!0),n.titleText_str=r}if(!c)return errorMessage_str="Thumbnail image is not found at category: <font color='#FF0000'>"+(l+1)+"</font> at position nr: <font color='#FF0000'>"+(o+1)+"</font>",void self.dispatchEvent(GAMMAGRIDData.LOAD_ERROR,{text:errorMessage_str});if(/none/i.test(n.type_str)?(n.iconType_str=GAMMAGRID.NONE,n.type_str=GAMMAGRID.NONE,n.thumbIconPathN_str=void 0,n.thumbIconPathS_str=void 0):/\.jpg|\.jpeg|\.png/i.test(n.type_str)?(n.iconType_str=GAMMAGRID.IMAGE,n.type_str=GAMMAGRID.IMAGE,self.inverseButtonsIcons_bl?(n.thumbIconPathN_str=self.gridSkinPath_str+"image-icon-with-background.png",n.thumbIconPathS_str=self.gridSkinPath_str+"image-icon.png"):(n.thumbIconPathN_str=self.gridSkinPath_str+"image-icon.png",n.thumbIconPathS_str=self.gridSkinPath_str+"image-icon-with-background.png"),n.width=void 0,n.height=void 0):/\.mp4/i.test(n.type_str)?(n.iconType_str=GAMMAGRID.VIDEO,n.type_str=GAMMAGRID.VIDEO,self.inverseButtonsIcons_bl?(n.thumbIconPathN_str=self.gridSkinPath_str+"video-icon-with-background.png",n.thumbIconPathS_str=self.gridSkinPath_str+"video-icon.png"):(n.thumbIconPathN_str=self.gridSkinPath_str+"video-icon.png",n.thumbIconPathS_str=self.gridSkinPath_str+"video-icon-with-background.png")):/\.mp3/i.test(n.type_str)?(n.type_str=GAMMAGRID.AUDIO,n.iconType_str=GAMMAGRID.AUDIO,self.inverseButtonsIcons_bl?(n.thumbIconPathN_str=self.gridSkinPath_str+"audio-icon-with-background.png",n.thumbIconPathS_str=self.gridSkinPath_str+"audio-icon.png"):(n.thumbIconPathN_str=self.gridSkinPath_str+"audio-icon.png",n.thumbIconPathS_str=self.gridSkinPath_str+"audio-icon-with-background.png")):/\.swf/i.test(n.type_str)?(n.type_str=GAMMAGRID.FLASH,n.iconType_str=GAMMAGRID.FLASH,self.inverseButtonsIcons_bl?(n.thumbIconPathN_str=self.gridSkinPath_str+"flash-icon-with-background.png",n.thumbIconPathS_str=self.gridSkinPath_str+"flash-icon.png"):(n.thumbIconPathN_str=self.gridSkinPath_str+"flash-icon.png",n.thumbIconPathS_str=self.gridSkinPath_str+"flash-icon-with-background.png")):/youtube\.|vimeo\./i.test(n.type_str)?(-1!=n.type_str.indexOf("youtube.")?(n.iconType_str=GAMMAGRID.YOUTUBE,self.inverseButtonsIcons_bl?(n.thumbIconPathN_str=self.gridSkinPath_str+"youtube-icon-with-background.png",n.thumbIconPathS_str=self.gridSkinPath_str+"youtube-icon.png"):(n.thumbIconPathN_str=self.gridSkinPath_str+"youtube-icon.png",n.thumbIconPathS_str=self.gridSkinPath_str+"youtube-icon-with-background.png")):(n.iconType_str=GAMMAGRID.VIMEO,self.inverseButtonsIcons_bl?(n.thumbIconPathN_str=self.gridSkinPath_str+"vimeo-icon-with-background.png",n.thumbIconPathS_str=self.gridSkinPath_str+"vimeo-icon.png"):(n.thumbIconPathN_str=self.gridSkinPath_str+"vimeo-icon.png",n.thumbIconPathS_str=self.gridSkinPath_str+"vimeo-icon-with-background.png")),n.type_str=GAMMAGRID.IFRAME):/link:/i.test(n.type_str)?(n.url=n.url.substr(5),n.target=n.target,n.iconType_str=GAMMAGRID.LINK,self.inverseButtonsIcons_bl?(n.thumbIconPathN_str=self.gridSkinPath_str+"link-icon-with-background.png",n.thumbIconPathS_str=self.gridSkinPath_str+"link-icon.png"):(n.thumbIconPathN_str=self.gridSkinPath_str+"link-icon.png",n.thumbIconPathS_str=self.gridSkinPath_str+"link-icon-with-background.png"),n.type_str=GAMMAGRID.LINK):(-1!=n.type_str.indexOf("google.")?(n.iconType_str=GAMMAGRID.MAPS,self.inverseButtonsIcons_bl?(n.thumbIconPathN_str=self.gridSkinPath_str+"maps-icon-with-background.png",n.thumbIconPathS_str=self.gridSkinPath_str+"maps-icon.png"):(n.thumbIconPathN_str=self.gridSkinPath_str+"maps-icon.png",n.thumbIconPathS_str=self.gridSkinPath_str+"maps-icon-with-background.png")):(n.iconType_str=GAMMAGRID.IFRAME,self.inverseButtonsIcons_bl?(n.thumbIconPathN_str=self.gridSkinPath_str+"iframe-icon-with-background.png",n.thumbIconPathS_str=self.gridSkinPath_str+"iframe-icon.png"):(n.thumbIconPathN_str=self.gridSkinPath_str+"iframe-icon.png",n.thumbIconPathS_str=self.gridSkinPath_str+"iframe-icon-with-background.png")),n.type_str=GAMMAGRID.IFRAME),n.type_str==GAMMAGRID.IMAGE_TYPE||n.type_str==GAMMAGRID.VIDEO_TYPE){var P=encodeURI(n.url.substr(0,n.url.lastIndexOf("/")+1)),k=encodeURIComponent(n.url.substr(n.url.lastIndexOf("/")+1));n.url=P+k}self.parsedPlaylist_ar.push(n)}self.categories_ar[a]=GAMLDATUtils.getAttributeValue(t[a],"data-category-name")}self.finalizePlaylist();try{self.playListElement.parentNode.removeChild(self.playListElement)}catch(t){}},this.finalizePlaylist=function(){var t=[];self.playlist_ar={playlistItems:self.parsedPlaylist_ar},self.randomizeCategories_bl&&(self.playlist_ar.playlistItems=GAMLDATUtils.randomizeArray(self.playlist_ar.playlistItems));for(e=0;e<self.playlist_ar.playlistItems.length;e++)self.playlist_ar.playlistItems[e].type_str!=GAMMAGRID.LINK&&self.playlist_ar.playlistItems[e].type_str!=GAMMAGRID.NONE&&t.push(self.playlist_ar.playlistItems[e]);self.showAllCategories_bl&&self.categories_ar.splice(0,0,self.allCategoriesLabel_str),self.catsLength_ar=[];for(e=0;e<self.categories_ar.length;e++)self.catsLength_ar[e]=0;for(var e=0;e<self.playlist_ar.playlistItems.length;e++)self.showAllCategories_bl?(self.catsLength_ar[0]++,self.catsLength_ar[self.playlist_ar.playlistItems[e].catId+1]++):self.catsLength_ar[self.playlist_ar.playlistItems[e].catId]++;self.lightboxPlaylist_ar={playlistItems:t}},this.prepareSiknForLoading=function(){self.mainPreloader_img=new Image,self.mainPreloader_img.onerror=self.onSkinLoadErrorHandler,self.mainPreloader_img.onload=self.onPreloaderLoadHandler,self.mainPreloader_img.src=self.gridSkinPath_str+"loading.png",self.skinPaths_ar=[{img:self.fullScreenN_img=new Image,src:self.gridSkinPath_str+"icon-fs-normal.png"},{img:self.normalScreenN_img=new Image,src:self.gridSkinPath_str+"icon-ns-normal.png"}],self.fullScreenSPath_str=self.gridSkinPath_str+"icon-fs-hover.png",self.normalScreenSPath_str=self.gridSkinPath_str+"icon-ns-hover.png",self.loadMoreSPath_str=self.gridSkinPath_str+"load-more-button-over.png",self.handGrabPath_str=self.gridSkinPath_str+"handgrab.cur",self.handMovePath_str=self.gridSkinPath_str+"handmove.cur",self.totalGraphics=self.skinPaths_ar.length},this.onPreloaderLoadHandler=function(){setTimeout(function(){self.dispatchEvent(GAMMAGRIDData.PRELOADER_LOAD_DONE),self.isFacebook_bl?self.setupFacebook(!0):self.loadPlaylist()},50)},self.loadSkin=function(){for(var t,e,s=0;s<self.totalGraphics;s++)t=self.skinPaths_ar[s].img,e=self.skinPaths_ar[s].src,t.onload=self.onSkinLoadHandler,t.onerror=self.onSkinLoadErrorHandler,t.src=e},this.onSkinLoadHandler=function(t){++self.countLoadedSkinImages==self.totalGraphics&&setTimeout(function(){self.dispatchEvent(GAMMAGRIDData.LOAD_DONE)},50)},self.onSkinLoadErrorHandler=function(t){GAMLDATUtils.isIEAndLessThen9?message="Graphics image not found!":message="The skin graphics with label <font color='#FF0000'>"+t.target.src+"</font> can't be loaded, check path!",window.console&&console.log(t);var e={text:message};setTimeout(function(){self.dispatchEvent(GAMMAGRIDData.LOAD_ERROR,e)},50)},this.init()};GAMMAGRIDData.setPrototype=function(){GAMMAGRIDData.prototype=new GAMLDATEventDispatcher},GAMMAGRIDData.isSoundCloud_bl=!1,GAMMAGRIDData.isFaceBook_bl=!1,GAMMAGRIDData.prototype=null,GAMMAGRIDData.PRELOADER_LOAD_DONE="onPreloaderLoadDone",GAMMAGRIDData.LOAD_DONE="onLoadDone",GAMMAGRIDData.LOAD_ERROR="onLoadError",GAMMAGRIDData.LIGHBOX_CLOSE_BUTTON_LOADED="onLightBoxCloseButtonLoadDone",window.GAMMAGRIDData=GAMMAGRIDData}(window);
!function(t){var e=function(o,s){var i=this;e.prototype;this.categories_ar=o.categories_ar,this.buttons_ar=[],this.buttonsOriginal_ar=[],this.spacers_ar=[],this.catId_ar=o.startAtCategory_ar,this.catsLength_ar=o.catsLength_ar,this.allCategoriesButton_do,this.buttonsHolder_do,this.searchButton_do,this.searchLabel_str=o.searchLabel_str,this.comboboxSelectorLabel_str=o.comboboxSelectorLabel_str,this.menuPosition_str=o.menuPosition_str,this.menuBackgroundClass_str=o.menuBackgroundClass_str,this.menuButtonSpacerColor_str=o.menuButtonSpacerColor_str,this.menuButtonsSpacersClassName_str=o.menuButtonsSpacersClassName_str,this.menuType_str=o.menuType_str,this.comboboxArrowNormalColor_str=o.comboboxArrowNormalColor_str,this.comboboxArrowSelectedColor_str=o.comboboxArrowSelectedColor_str,this.menuButtonSpacerWidth=o.menuButtonSpacerWidth,this.menuButtonSpacerHeight=o.menuButtonSpacerHeight,this.curId=this.catId_ar[0],this.menuItemBorderSize=0,this.menuButtonsSapcerLeftAndRight=o.menuButtonsSapcerLeftAndRight,this.menuMaxWidth=o.menuMaxWidth,this.menuOffsetTop=o.menuOffsetTop,this.menuOffsetBottom=o.menuOffsetBottom,this.horizontalSpaceBetweenMenuButtons=o.horizontalSpaceBetweenMenuButtons,this.verticalSpaceBetweenMenuButtons=o.verticalSpaceBetweenMenuButtons,this.totalButtons=i.categories_ar.length,this.selectorOriginalWidth=0,this.stageWidth=0,this.stageHeight=0,this.isComboboxShowed_bl=!1,this.showTotalThumbnailsPerCategory_bl=o.showTotalThumbnailsPerCategory_bl,this.showAllCategories_bl=o.showAllCategories_bl,this.showAllCategories2_bl=!1,this.multipleCategorySelection_bl=o.multipleCategorySelection_bl,this.showMenuButtonsSpacers_bl=o.showMenuButtonsSpacers_bl,this.isShowed_bl=o.showMenu_bl,this.isMobile_bl=GAMLDATUtils.isMobile,this.hasPointerEvent_bl=GAMLDATUtils.hasPointerEvent,this.showSearchButton_bl=o.showSearchButton_bl,this.init=function(){this.getStyle().backgroundColor="",this.screen.className=this.menuBackgroundClass_str,"undefined"!=JSGDIGP&&this.setupSearch(),JSGDIGP&&(this.showSearchButton_bl=!1),this.setupButtons(),this.setButtonsLabels(this.showTotalThumbnailsPerCategory_bl),this.setButtons(this.catId_ar[0]),this.setupSpacers(),this.setupCombobox(),this.updateMenuStyle(),this.setAlpha(0),setTimeout(function(){i.resizeAndPosition(),JSGDIGP?GAMLDATMagicAnim.to(i,.8,{alpha:1,delay:.3,ease:Expo.easeOut}):GAMLDATMagicAnim.to(i,.8,{alpha:1,ease:Expo.easeOut})},80)},this.resizeAndPosition=function(){i.stageWidth=s.stageWidth,i.isShowed_bl&&0!=i.stageWidth&&(i.positionButtons(),i.setWidth(i.stageWidth),i.setHeight(i.stageHeight))},this.setupCombobox=function(){this.mainButtonsHolder_do=new GAMLDATDisplayObject("div"),this.buttonsHolder_do=new GAMLDATDisplayObject("div"),this.buttonsHolder_do.setX(-1e3),this.arrow_do=new GAMLDATTransformDisplayObject("div"),this.arrow_do.setOverflow("visible"),this.arrow_do.setDisplay("inline-block"),this.arrow_do.getStyle().fontSmoothing="antialiased",this.arrow_do.getStyle().webkitFontSmoothing="antialiased",this.arrow_do.getStyle().textRendering="optimizeLegibility",this.arrow_do.getStyle().whiteSpace="nowrap",this.arrow_do.setBackfaceVisibility(),this.arrow_do.getStyle().padding="",this.arrow_do.getStyle().margin="",this.arrow_do.getStyle().borderRight="1px solid",this.arrow_do.getStyle().borderBottom="1px solid",this.arrow_do.setWidth(10),this.arrow_do.setHeight(10),this.arrow_do.getStyle().borderColor=this.comboboxArrowNormalColor_str,GAMMAGRIDMenuButton.setPrototype(),this.selector_do=new GAMMAGRIDMenuButton("NOT DEFINED",o.comboboxSelectorBackgroundNormalClassName_str,o.comboboxSelectorBackgroundSelectedClassName_str,o.comboboxSelectorTextNormalClassName_str,o.comboboxSelectorTextSeectedClassName_str,10),this.selector_do.addListener(GAMMAGRIDMenuButton.MOUSE_OVER,i.selectorOverHandler),this.selector_do.addListener(GAMMAGRIDMenuButton.MOUSE_OUT,i.selectorOutHandler),GAMLDATUtils.isIEAndLessThen9||this.selector_do.addChild(this.arrow_do),this.selector_do.addListener(GAMMAGRIDMenuButton.MOUSE_UP,this.openCombobox),this.selector_do.setLabel(i.comboboxSelectorLabel_str),this.selector_do.setSize(),setTimeout(function(){i.selector_do.getStyle().width=i.selector_do.getWidth()+40+"px",i.selectorOriginalWidth=i.selector_do.getWidth(),i.arrow_do.setRotation(-135),i.arrow_do.setY(parseInt(i.selector_do.h-i.arrow_do.h)/2+3-i.menuItemBorderSize)},60),this.addChild(this.mainButtonsHolder_do),this.mainButtonsHolder_do.addChild(this.buttonsHolder_do),this.mainButtonsHolder_do.addChild(this.selector_do)},this.selectorOverHandler=function(){GAMLDATMagicAnim.to(i.arrow_do.screen,.8,{borderColor:i.comboboxArrowSelectedColor_str,ease:Expo.easeOut})},this.selectorOutHandler=function(){GAMLDATMagicAnim.to(i.arrow_do.screen,.8,{borderColor:i.comboboxArrowNormalColor_str,ease:Expo.easeOut})},this.openCombobox=function(){i.isComboboxShowed_bl||(i.isComboboxShowed_bl=!0,0==s.zIndex?i.getStyle().zIndex=1:i.getStyle().zIndex=s.zIndex+1,i.selector_do.isSelected_bl=i.selector_do.isDisabled_bl=!0,i.buttonsHolder_do.setX(0),i.buttonsHolder_do.setY(-i.buttonsHolder_do.h+i.selector_do.h),i.mainButtonsHolder_do.setHeight(i.buttonsHolder_do.h+i.mainButtonsHolder_do.h),GAMLDATMagicAnim.to(i.buttonsHolder_do,.8,{y:i.selector_do.h,ease:Expo.easeInOut}),GAMLDATMagicAnim.to(i.arrow_do,.8,{rotation:45,y:parseInt(i.selector_do.h-i.arrow_do.h)/2-3-i.menuItemBorderSize,ease:Expo.easeInOut}),i.startToCheckMenuHit())},this.closeComboBox=function(){GAMLDATMagicAnim.isTweening(i.mainButtonsHolder_do)||(i.selector_do.isSelected_bl=i.selector_do.isDisabled_bl=!1,i.selector_do.setNormalState(!0),GAMLDATMagicAnim.to(i.buttonsHolder_do,.8,{y:-i.buttonsHolder_do.h+i.selector_do.h,ease:Expo.easeInOut}),GAMLDATMagicAnim.to(i.mainButtonsHolder_do,.8,{h:i.selector_do.h,ease:Expo.easeInOut,onComplete:function(){i.isComboboxShowed_bl=!1}}),GAMLDATMagicAnim.to(i.arrow_do,.8,{rotation:-135,y:parseInt(i.selector_do.h-i.arrow_do.h)/2+3-i.menuItemBorderSize,ease:Expo.easeInOut}),GAMLDATMagicAnim.to(i.arrow_do.screen,.8,{borderColor:i.comboboxArrowNormalColor_str,ease:Expo.easeOut,onComplete:function(){i.buttonsHolder_do.setX(-1e3),i.getStyle().zIndex="auto"}}))},this.startToCheckMenuHit=function(){this.isCheckHitAdded_bl||(this.isCheckHitAdded_bl=!0,i.isMobile_bl?setTimeout(function(){GAMLDATUtils.isIOS?i.hitThhumbnailId_to=t.addEventListener("touchstart",i.checkThumbnailHit):i.hitThhumbnailId_to=t.addEventListener("click",i.checkThumbnailHit)},50):t.addEventListener?(t.addEventListener("mousemove",i.checkThumbnailHit),t.addEventListener("mousedown",i.chechThumbnailsOnClick)):(document.attachEvent("onmousemove",i.checkThumbnailHit),document.attachEvent("onmousedown",i.chechThumbnailsOnClick)))},this.stopToCheckMenuHit=function(){i.isCheckHitAdded_bl&&(i.isCheckHitAdded_bl=!1,i.isMobile_bl?GAMLDATUtils.isIOS?i.hitThhumbnailId_to=t.removeEventListener("touchstart",i.checkThumbnailHit):i.hitThhumbnailId_to=t.removeEventListener("click",i.checkThumbnailHit):t.removeEventListener?(t.removeEventListener("mousemove",i.checkThumbnailHit),t.removeEventListener("mousedown",i.chechThumbnailsOnClick)):(document.detachEvent("onmousemove",i.checkThumbnailHit),document.detachEvent("onmousedown",i.chechThumbnailsOnClick)),clearTimeout(i.hitThhumbnailId_to))},this.chechThumbnailsOnClick=function(t){var e=GAMLDATUtils.getViewportMouseCoordinates(t);GAMLDATUtils.hitTest(i.mainButtonsHolder_do.screen,e.screenX,e.screenY)||(clearTimeout(i.hideComoboboxWithDelayId_to),i.stopToCheckMenuHit(),i.closeComboBox())},this.checkThumbnailHit=function(t){var e=GAMLDATUtils.getViewportMouseCoordinates(t);GAMLDATUtils.hitTest(i.mainButtonsHolder_do.screen,e.screenX,e.screenY)?clearTimeout(i.hideComoboboxWithDelayId_to):(clearTimeout(i.hideComoboboxWithDelayId_to),i.hideComoboboxWithDelayId_to=setTimeout(function(){i.stopToCheckMenuHit(),i.closeComboBox()},200))},this.setupSearch=function(){GAMMAGRIDMenuButton.setPrototype(),this.searchButton_do=new GAMMAGRIDMenuButton(this.searchLabel_str,o.searchClassName_str,o.menuButtonBackgroundSelectedClassName_str,o.searchClassName_str,o.menuButtonTextSeectedClassName_str,100),this.addChild(this.searchButton_do),this.searchButton_do.setLabel(this.searchLabel_str),this.searchButton_do.setSize(),this.showSearchButton_bl||this.searchButton_do.setVisible(!1),this.searchButton_do.addListener(e.SEARCH,this.searchHandler)},this.searchHandler=function(t){i.dispatchEvent(e.SEARCH,{searchValue:t.param})},this.setupButtons=function(){for(var t,e=0;e<this.totalButtons;e++)GAMMAGRIDMenuButton.setPrototype(),t=new GAMMAGRIDMenuButton(void 0,o.menuButtonBackgroundNormalClassName_str,o.menuButtonBackgroundSelectedClassName_str,o.menuButtonTextNormalClassName_str,o.menuButtonTextSeectedClassName_str,e),0==e&&(this.allCategoriesButton_do=t),t.addListener(GAMMAGRIDMenuButton.MOUSE_UP,this.buttonOnMouseUpHandler),this.buttons_ar.push(t),this.buttonsOriginal_ar.push(t);this.showSearchButton_bl&&(this.buttons_ar.push(this.searchButton_do),this.buttonsOriginal_ar.push(this.searchButton_do))},this.buttonOnMouseUpHandler=function(t){if(!s.thumbsManager_do||!s.thumbsManager_do.isCategoryChanging_bl)if(t&&(i.setButtons(t.id),i.curId=t.id),JSGDIGP){var o=i.showAllCategories2_bl?1:0;i.dispatchEvent(e.MOUSE_UP,{id:t.id+o}),"combobox"==i.menuType_str&&i.closeComboBox()}else i.dispatchEvent(e.MOUSE_UP,{id:i.getIdsArray()})},this.resetButtonsIGP=function(){this.showAllCategories_bl||0!=this.curId||(this.buttons_ar[0].setSelected(),i.dispatchEvent(e.MOUSE_UP,{id:1}));for(var t=0;t<this.buttons_ar.length;t++)button=this.buttons_ar[t],button.id=t;"list"==this.menuType_str?this.addChild(i.buttons_ar[0]):this.buttonsHolder_do.addChild(i.buttons_ar[0])},this.setButtonsLabels=function(t){for(var e,o=0;o<this.buttonsOriginal_ar.length;o++)(e=this.buttonsOriginal_ar[o])!=this.searchButton_do&&(e.w=0,e.getStyle().width="auto"),label_str=t?this.categories_ar[o]+" ("+this.catsLength_ar[o]+")":this.categories_ar[o],e!=this.searchButton_do&&(void 0!=this.categories_ar[o]&&e.setLabel(label_str),e.setSize())},this.setButtons=function(t){var e=0;if(o=this.buttons_ar[t],this.multipleCategorySelection_bl){this.multipleCategorySelection_bl&&(o.isSelectedFinal_bl?o.setUnselected():o.setSelected());for(s=0;s<this.totalButtons;s++)(o=this.buttons_ar[s]).isSelectedFinal_bl&&e++,this.showAllCategories_bl&&0==t?0!=s&&o.setUnselected():this.showAllCategories_bl&&0!=t&&this.buttons_ar[0].setUnselected();o=this.buttons_ar[t],0==e&&o.setSelected()}else for(var o,s=0;s<i.totalButtons;s++)o=i.buttons_ar[s],s==t?(o.isSelectedFinal_bl=!0,o.disable()):(o.isSelectedFinal_bl=!1,o.enable())},this.resetButtonsState=function(){var t,e=!0;if(i.multipleCategorySelection_bl)if(this.showAllCategories_bl){for(o=0;o<i.totalButtons;o++)(t=i.buttons_ar[o]).id=o,t.isDisabled_bl=!0,t.enable(),t.isSelectedFinal_bl&&t.setSelectedState();1==this.catId_ar.length&&0==this.catId_ar[0]&&(this.buttons_ar[1].isSelectedFinal_bl=!1,this.setButtons(1))}else{0==i.catId_ar.length&&(i.catId_ar[0]=[0]);for(o=0;o<i.totalButtons;o++)(t=i.buttons_ar[o]).id=o,o==i.catId_ar[o]&&(t.isSelectedFinal_bl=!0,t.isDisabled_bl=!0,t.enable(),t.setSelectedState())}else{i.allCategoriesButton_do.isSelectedFinal_bl&&1==i.buttons_ar[0].id&&(i.buttons_ar[0].isSelectedFinal_bl=!0);for(var o=0;o<i.totalButtons;o++)(t=i.buttons_ar[o]).id=o,t.isSelectedFinal_bl&&e?(t.isDisabled_bl=!1,t.disable(),e=!1):(t.isSelectedFinal_bl=!1,t.isSelected_bl=!1,t.isDisabled_bl=!0,t.enable())}},this.getIdsArray=function(){i.catId_ar=[];for(var t=0;t<i.totalButtons;t++)button=i.buttons_ar[t],(button.isSelectedFinal_bl||button.isDisabled_bl)&&i.catId_ar.push(button.id);return i.catId_ar},this.updateMenuStyle=function(){var t;if("list"==this.menuType_str){for(e=0;e<this.totalButtons;e++)button=this.buttons_ar[e],this.addChild(button),(t=this.spacers_ar[e]).setHeight(this.menuButtonSpacerHeight),t.setWidth(1),this.addChild(t),e==this.totalButtons-1&&t.setVisible(!1);this.selector_do.setVisible(!1)}else{for(var e=0;e<this.totalButtons;e++)button=this.buttons_ar[e],this.buttonsHolder_do.addChild(button),(t=this.spacers_ar[e]).setHeight(1),this.buttonsHolder_do.addChild(t),e==this.totalButtons-1&&t.setVisible(!0);this.selector_do.setVisible(!0)}this.positionButtons(),this.setHeight(this.stageHeight)},this.setButtonsClass=function(t,e,o,s,n,a,r,h,l,u,d,c){var _;this.selectorOriginalWidth=0,this.comboboxArrowNormalColor_str=d,this.comboboxArrowSelectedColor_str=c,this.arrow_do.getStyle().borderColor=this.comboboxArrowNormalColor_str;for(b=0;b<i.buttonsOriginal_ar.length;b++)(_=i.buttonsOriginal_ar[b])!=this.searchButton_do&&(_.w=0,_.getStyle().width="0px",_.getStyle().width="auto",_.setClass(t,e,o,s),_.setSize()),_==this.searchButton_do&&(_.w=0,this.searchButton_do.getStyle().width="0px",this.searchButton_do.getStyle().width="auto",this.searchButton_do.setClass("","",u,""),this.searchButton_do.setSize());this.selector_do.getStyle().width="auto",this.selector_do.setClass(n,a,r,h),this.selector_do.setSize(),setTimeout(function(){i.selector_do.getStyle().width=i.selector_do.getWidth()+40+"px",i.selectorOriginalWidth=i.selector_do.getWidth(),i.arrow_do.setY(parseInt(i.selector_do.h-i.arrow_do.h)/2+3-i.menuItemBorderSize)},51);for(var b=0;b<i.totalButtons;b++)spacer=this.spacers_ar[b],spacer.screen.className=l},this.setupSpacers=function(){for(var t,e=0;e<i.totalButtons;e++)t=new GAMLDATDisplayObject("div"),this.spacers_ar[e]=t,t.setWidth(this.menuButtonSpacerWidth),t.setHeight(this.menuButtonSpacerHeight),t.getStyle().backgroundColor="",t.screen.className=this.menuButtonsSpacersClassName_str,this.showMenuButtonsSpacers_bl||t.setVisible(!1),i.addChild(t)},this.showOrHideSpacers=function(t){this.showMenuButtonsSpacers_bl=t;for(var e=0;e<i.totalButtons;e++)spacer=this.spacers_ar[e],t?(spacer.setVisible(!0),"list"==this.menuType_str?(spacer.setHeight(this.menuButtonSpacerHeight),spacer.setWidth(1),e==this.totalButtons-1&&spacer.setVisible(!1)):spacer.setHeight(1)):(spacer.setVisible(!1),spacer.setY(-200))},this.showOrHideSearchBox=function(t){i.showSearchButton_bl=t,t?this.searchButton_do.setVisible(!0):this.searchButton_do.setVisible(!1)},this.positionButtons=function(){if(0!=i.stageWidth){var t,e,o=[],s=[],n=i.stageWidth,a=0,r=i.menuOffsetTop,h=0,l=0,u=0,d=0,c=this.selectorOriginalWidth;if(0!=c||"combobox"!=i.menuType_str){if(n>i.menuMaxWidth&&(n=i.menuMaxWidth),"combobox"==i.menuType_str){this.mainButtonsHolder_do.setY(this.menuOffsetTop),h=i.menuOffsetTop,GAMLDATUtils.isIEAndLessThen9||(i.menuItemBorderSize=getComputedStyle(i.buttons_ar[0].screen,null).getPropertyValue("border-left-width")||"0",i.menuItemBorderSize=parseInt(i.menuItemBorderSize.replace("px","")));for(b=0;b<i.totalButtons;b++)(t=i.buttons_ar[b]).w>=c&&(c=t.w);for(b=0;b<i.totalButtons;b++)t=i.buttons_ar[b],this.showMenuButtonsSpacers_bl?(spacer=i.spacers_ar[b],spacer.setX(0),spacer.setWidth(c),spacer.setY(b*(spacer.h+t.h)),t.setY(b*(spacer.h+t.h)+spacer.h)):t.setY(b*t.h),t.setX(0),c>35&&t.setWidth(c-2*i.menuItemBorderSize);this.selectorOriginalWidth<c+10&&this.selector_do.setWidth(c-2*i.menuItemBorderSize),this.buttonsHolder_do.setWidth(c),this.buttonsHolder_do.setHeight(t.y+t.h),this.mainButtonsHolder_do.setWidth(c),this.mainButtonsHolder_do.setHeight(t.h),this.arrow_do.setX(c-23-2*i.menuItemBorderSize),this.arrow_do.setY(parseInt(i.selector_do.h-this.arrow_do.h)/2+3-this.menuItemBorderSize),"center"==i.menuPosition_str?i.showSearchButton_bl?i.searchButton_do.w+c+2*i.menuButtonsSapcerLeftAndRight+i.horizontalSpaceBetweenMenuButtons<i.stageWidth?(i.mainButtonsHolder_do.setX(parseInt(i.stageWidth-(i.searchButton_do.w+c+i.horizontalSpaceBetweenMenuButtons))/2),i.searchButton_do.setX(i.mainButtonsHolder_do.x+c+i.horizontalSpaceBetweenMenuButtons),i.searchButton_do.setY(i.menuOffsetTop)):(i.mainButtonsHolder_do.setX(parseInt(i.stageWidth-c)/2),i.searchButton_do.setX(parseInt(i.stageWidth-i.searchButton_do.w)/2),i.searchButton_do.setY(i.menuOffsetTop+t.h+i.verticalSpaceBetweenMenuButtons),h=i.searchButton_do.y):i.mainButtonsHolder_do.setX(parseInt(i.stageWidth-c)/2):"left"==i.menuPosition_str?(i.mainButtonsHolder_do.setX(Math.max(i.menuButtonsSapcerLeftAndRight,parseInt(i.stageWidth-i.menuMaxWidth)/2)),i.showSearchButton_bl&&(i.searchButton_do.w+c+2*i.menuButtonsSapcerLeftAndRight+i.horizontalSpaceBetweenMenuButtons<i.stageWidth?(i.searchButton_do.setX(i.stageWidth-Math.max(i.menuButtonsSapcerLeftAndRight,parseInt((i.stageWidth-i.menuMaxWidth)/2))-i.searchButton_do.w),i.searchButton_do.setY(i.menuOffsetTop)):(i.searchButton_do.setX(i.mainButtonsHolder_do.x),i.searchButton_do.setY(i.menuOffsetTop+t.h+i.verticalSpaceBetweenMenuButtons),h=i.searchButton_do.y))):"right"==i.menuPosition_str&&(i.mainButtonsHolder_do.setX(Math.min(i.stageWidth-i.menuButtonsSapcerLeftAndRight-c,parseInt(i.stageWidth/2+i.menuMaxWidth/2)-c)),i.showSearchButton_bl&&(i.searchButton_do.w+c+2*i.menuButtonsSapcerLeftAndRight+i.horizontalSpaceBetweenMenuButtons<i.stageWidth?(i.searchButton_do.setX(Math.max(i.menuButtonsSapcerLeftAndRight,parseInt((i.stageWidth-i.menuMaxWidth)/2))),i.searchButton_do.setY(i.menuOffsetTop)):(i.searchButton_do.setX(i.stageWidth-i.menuButtonsSapcerLeftAndRight-i.searchButton_do.w),i.searchButton_do.setY(i.menuOffsetTop+t.h+i.verticalSpaceBetweenMenuButtons),h=i.searchButton_do.y)))}else{o[l]=[0],s[l]=i.buttons_ar[0].w;for(b=0;b<i.totalButtons;b++)(t=i.buttons_ar[b]).getStyle().width="auto";for(var _=this.showSearchButton_bl?1:0,b=1;b<i.totalButtons+_;b++)t=i.buttons_ar[b],s[l]+t.w+i.horizontalSpaceBetweenMenuButtons>n-2*i.menuButtonsSapcerLeftAndRight?(o[++l]=[],o[l].push(b),s[l]=t.w):(o[l].push(b),s[l]+=t.w+i.horizontalSpaceBetweenMenuButtons);i.showSearchButton_bl&&0==l&&"right"==i.menuPosition_str&&(s[0]-=i.buttons_ar[i.totalButtons].w+i.horizontalSpaceBetweenMenuButtons);for(b=0;b<l+1;b++){"center"==i.menuPosition_str?d=Math.max(i.menuButtonsSapcerLeftAndRight,parseInt((i.stageWidth-s[b])/2)):"left"==i.menuPosition_str?d=Math.max(i.menuButtonsSapcerLeftAndRight,parseInt((i.stageWidth-i.menuMaxWidth)/2)):"right"==i.menuPosition_str&&(d=Math.min(parseInt(i.stageWidth-s[b]-(i.stageWidth-i.menuMaxWidth)/2),parseInt(i.stageWidth-s[b]-i.menuButtonsSapcerLeftAndRight))),b>0&&(r+=t.h+i.verticalSpaceBetweenMenuButtons);for(var m=0;m<o[b].length;m++)t=i.buttons_ar[o[b][m]],spacer=i.spacers_ar[u],u++,a=0==m?d:(e=i.buttons_ar[o[b][m]-1]).finalX+e.w+i.horizontalSpaceBetweenMenuButtons,spacer&&i.showMenuButtonsSpacers_bl&&(m==o[b].length-1?spacer.setX(-1e3):(spacer.setX(parseInt(a+t.w+(i.horizontalSpaceBetweenMenuButtons-spacer.w)/2)),spacer.setY(parseInt(r+(t.h-spacer.h)/2)))),t.finalX=a,t.finalY=r,h<t.finalY&&(h=t.finalY),t.setX(t.finalX),t.setY(t.finalY)}if(i.showSearchButton_bl&&0==l)if("left"==i.menuPosition_str)(t=i.buttons_ar[i.totalButtons]).setX(i.stageWidth-d-t.w);else if("right"==i.menuPosition_str){t=i.buttons_ar[i.totalButtons];var B=Math.max(i.menuButtonsSapcerLeftAndRight,parseInt((i.stageWidth-i.menuMaxWidth)/2));t.setX(B)}}i.stageHeight=h+i.buttons_ar[0].h+i.menuOffsetBottom}}},this.init()};e.setPrototype=function(){e.prototype=new GAMLDATDisplayObject("div","relative","visible")},e.MOUSE_OVER="onMouseOver",e.MOUSE_OUT="onMouseOut",e.MOUSE_UP="onMouseDown",e.RIGHT="right",e.LEFT="left",e.BOTTOM="bottom",e.TOP="top",e.prototype=null,t.GAMMAGRIDMenu=e}(window);
!function(t){var i=function(t,n,s,e){var o=this;this.nImg_img=null,this.sImg_img=null,this.n_do,this.s_do,this.nImgPath_str=t,this.sImgPath_str=n,this.buttonWidth=s,this.buttonHeight=e,this.isMobile_bl=GAMLDATUtils.isMobile,this.hasPointerEvent_bl=GAMLDATUtils.hasPointerEvent,this.isDisabled_bl=!1,this.init=function(){o.setupMainContainers(),o.setWidth(o.buttonWidth),o.setHeight(o.buttonHeight),o.setButtonMode(!0)},this.setupMainContainers=function(){o.n_do=new GAMLDATDisplayObject("img"),o.nImg_img=new Image,o.nImg_img.src=o.nImgPath_str,o.nImg_img.width=o.buttonWidth,o.nImg_img.height=o.buttonHeight,o.n_do.setScreen(o.nImg_img),o.s_do=new GAMLDATDisplayObject("img"),o.sImg_img=new Image,o.sImg_img.src=o.sImgPath_str,o.sImg_img.width=o.buttonWidth,o.sImg_img.height=o.buttonHeight,o.s_do.setScreen(o.sImg_img),o.addChild(o.s_do),o.addChild(o.n_do),o.screen.onmouseover=o.onMouseOver,o.screen.onmouseout=o.onMouseOut,o.screen.onclick=o.onClick},this.onMouseOver=function(t){o.isMobile_bl||GAMLDATMagicAnim.to(o.n_do,.9,{alpha:0,ease:Expo.easeOut})},this.onMouseOut=function(t){GAMLDATMagicAnim.to(o.n_do,.9,{alpha:1,ease:Expo.easeOut})},this.onClick=function(t){o.dispatchEvent(i.CLICK)},o.init()};i.setPrototype=function(){i.prototype=null,i.prototype=new GAMLDATTransformDisplayObject("div")},i.CLICK="onClick",i.prototype=null,t.GAMMAGRIDSimpleSizeButton=i}(window);
!function(t){var e=function(t,s,i,n,o,a){var l=this;e.prototype;this.text_str=t,this.menuButtonBackgroundNormalClassName_str=s,this.menuButtonBackgroundSelectedClassName_str=i,this.menuButtonTextNormalClassName_str=n,this.menuButtonTextSeectedClassName_str=o,this.id=a,this.isDisabled_bl=!0,this.isSelected_bl=!1,this.isMobile_bl=GAMLDATUtils.isMobile,this.hasPointerEvent_bl=GAMLDATUtils.hasPointerEvent,this.init=function(){this.setOverflow("visible"),this.getStyle().border="",this.getStyle().backgroundColor="",this.setupDos(),this.setNormalState(!1),this.enable(),this.addEvents(),this.dumy_do.setVisible(!1)},this.setupDos=function(){100==this.id?this.text_do=new GAMLDATDisplayObject("input","relative"):this.text_do=new GAMLDATDisplayObject("div","relative"),this.text_do.setOverflow("visible"),this.text_do.setDisplay("inline-block"),this.text_do.getStyle().fontSmoothing="antialiased",this.text_do.getStyle().webkitFontSmoothing="antialiased",this.text_do.getStyle().textRendering="optimizeLegibility",this.text_do.getStyle().whiteSpace="nowrap",this.text_do.setBackfaceVisibility(),this.text_do.getStyle().padding="",this.text_do.getStyle().margin="",this.text_do.hasTransform3d_bl=!1,this.text_do.hasTransform2d_bl=!1,this.dumy_do=new GAMLDATDisplayObject("div"),this.dumy_do.getStyle().width="100%",this.dumy_do.getStyle().height="100%",GAMLDATUtils.isIE&&(this.dumy_do.setBkColor("#00FF00"),this.dumy_do.setAlpha(0)),this.addChild(this.text_do),this.addChild(this.dumy_do),this.setSize()},this.addEvents=function(){100==this.id?l.text_do.screen.addEventListener?(l.text_do.screen.addEventListener("focus",l.inputFocusInHandler),l.text_do.screen.addEventListener("blur",l.inputFocusOutHandler),l.text_do.screen.addEventListener("keyup",l.keyUpHandler)):l.text_do.screen.attachEvent&&(l.text_do.screen.attachEvent("onfocus",l.inputFocusInHandler),l.text_do.screen.attachEvent("onblur",l.inputFocusOutHandler),l.text_do.screen.attachEvent("onkeyup",l.keyUpHandler)):l.isMobile_bl?this.hasPointerEvent_bl?(this.screen.addEventListener("pointerup",this.onMouseUp),this.screen.addEventListener("pointerover",this.onMouseOver),this.screen.addEventListener("pointerout",this.onMouseOut)):this.screen.addEventListener("click",this.onMouseUp):this.screen.addEventListener?(this.screen.addEventListener("mouseover",this.onMouseOver),this.screen.addEventListener("mouseout",this.onMouseOut),this.screen.addEventListener("mouseup",this.onMouseUp)):this.screen.attachEvent&&(this.screen.attachEvent("onmouseover",this.onMouseOver),this.screen.attachEvent("onmouseout",this.onMouseOut),this.screen.attachEvent("onmouseup",this.onMouseUp))},this.onMouseOver=function(t){if(!t.pointerType||"mouse"==t.pointerType){if(l.isDisabled_bl||l.isSelectedFinal_bl)return;l.dispatchEvent(e.MOUSE_OVER,{e:t}),l.setSelectedState(!0)}},this.onMouseOut=function(t){if(!t.pointerType||"mouse"==t.pointerType){if(l.isDisabled_bl||l.isSelectedFinal_bl)return;l.dispatchEvent(e.MOUSE_OUT,{e:t}),l.setNormalState(!0)}},this.onMouseUp=function(t){2==t.button||l.isDisabled_bl||l.dispatchEvent(e.MOUSE_UP,{id:l.id})},this.inputFocusInHandler=function(){l.hasInputFocus_bl||(l.hasInputFocus_bl=!0,l.text_do.screen.value==l.text_str&&(l.text_do.screen.value=""))},this.inputFocusOutHandler=function(t){if(l.hasInputFocus_bl){var e=GAMLDATUtils.getViewportMouseCoordinates(t);return GAMLDATUtils.hitTest(l.text_do.screen,e.screenX,e.screenY)?void 0:(l.hasInputFocus_bl=!1,void(""==l.text_do.screen.value&&(l.text_do.screen.value=l.text_str)))}},this.keyUpHandler=function(t){t.stopPropagation&&t.stopPropagation();var e;l.prevInputValue_str!=l.text_do.screen.value&&(e=l.text_do.screen.value.toLowerCase())!=l.text_str&&(l.searchValue=e,clearTimeout(l.updateSearch_to),l.updateSearch_to=setTimeout(function(){l.dispatchEvent(GAMMAGRIDMenu.SEARCH,{param:l.searchValue})},200)),l.prevInputValue_str=l.text_do.screen.value},this.setClass=function(t,e,s,i){GAMLDATMagicAnim.killTweensOf(this.screen),GAMLDATMagicAnim.killTweensOf(this.text_do.screen),this.menuButtonBackgroundNormalClassName_str=t,this.menuButtonBackgroundSelectedClassName_str=e,this.menuButtonTextNormalClassName_str=s,this.menuButtonTextSeectedClassName_str=i,100==this.id?this.text_do.screen.className=s:this.isSelected_bl?(this.screen.className=t,this.text_do.screen.className=s):(this.screen.className=e,this.text_do.screen.className=i)},this.setNormalState=function(t){this.isSelected_bl||(this.isSelected_bl=!0,GAMLDATMagicAnim.killTweensOf(this.screen),GAMLDATMagicAnim.killTweensOf(this.text_do.screen),100==this.id?this.text_do.screen.className=this.menuButtonTextNormalClassName_str:t?(GAMLDATMagicAnim.to(this.screen,.8,{className:this.menuButtonBackgroundNormalClassName_str,ease:Expo.easeOut}),GAMLDATMagicAnim.to(this.text_do.screen,.8,{className:this.menuButtonTextNormalClassName_str,ease:Expo.easeOut})):(this.screen.className=this.menuButtonBackgroundNormalClassName_str,this.text_do.screen.className=this.menuButtonTextNormalClassName_str))},this.setSelectedState=function(t){this.isSelected_bl&&(this.isSelected_bl=!1,GAMLDATMagicAnim.killTweensOf(this.screen),GAMLDATMagicAnim.killTweensOf(this.text_do.screen),t?(GAMLDATMagicAnim.to(this.screen,.8,{className:this.menuButtonBackgroundSelectedClassName_str,ease:Expo.easeOut}),GAMLDATMagicAnim.to(this.text_do.screen,.8,{className:this.menuButtonTextSeectedClassName_str,ease:Expo.easeOut})):(this.screen.className=this.menuButtonBackgroundSelectedClassName_str,this.text_do.screen.className=this.menuButtonTextSeectedClassName_str))},this.setSelected=function(){this.isSelectedFinal_bl||(this.isSelectedFinal_bl=!0,this.setSelectedState(!0))},this.setUnselected=function(){this.isSelectedFinal_bl&&(this.isSelectedFinal_bl=!1,this.setNormalState(!0))},this.disable=function(){100!=this.id&&(this.isDisabled_bl=!0,this.setButtonMode(!0),this.dumy_do.setButtonMode(!0),this.setSelectedState(!0))},this.enable=function(){100!=this.id&&(this.isDisabled_bl=!1,this.setButtonMode(!0),this.dumy_do.setButtonMode(!0),this.setNormalState(!0))},this.setLabel=function(t){l.text_str=t,100==this.id?this.text_do.screen.value=l.text_str:this.text_do.setInnerHTML(l.text_str)},this.setSize=function(){setTimeout(function(){l.w=l.getWidth(),l.h=l.getHeight()},69)},this.init()};e.setPrototype=function(){e.prototype=new GAMLDATDisplayObject("div")},GAMMAGRIDMenu.SEARCH="search",e.MOUSE_OVER="onMouseOver",e.MOUSE_OUT="onMouseOut",e.MOUSE_UP="onMouseDown",e.prototype=null,t.GAMMAGRIDMenuButton=e}(window);
!function(t){var a=function(o,s){var e=this;a.prototype;this.sourcePlaylist_ar=o.playlist_ar.playlistItems,this.originalDataThumbnails_ar=[],this.dataThumbnails_ar=[],this.tempPlaylist_ar,this.columnHeights_ar=[],this.loadMoreCatsData_ar=[],this.catId_ar=o.startAtCategory_ar,this.loadMoreButton_do,this.curDataThumbnail,this.thumbnailLoadingType_str=o.thumbnailLoadingType_str,this.totalLoadedThumbnails=0,this.loadMoreButtonOffsetTop=o.loadMoreButtonOffsetTop,this.loadMoreButtonOffsetBottom=o.loadMoreButtonOffsetBottom,this.thumbnailsPerSet=o.howManyThumbnailsToDisplayPerSet,this.thumbsHOffset=o.thumbnailsHorizontalOffset,this.thumbsVOffset=o.thumbnailsVerticalOffset,this.offsetTotalHeight=0,this.maxH=0,this.thumbOffsetX=0,this.catId=o.startAtCategory,this.stageWidth=0,this.prevStageWidth=0,this.thumbnailMaxWidth=o.thumbnailMaxWidth,this.thumbnailMaxHeight=o.thumbnailMaxHeight,this.leftWidth=0,this.thumbWidth,this.thumbHeight,this.thumbsHSpace=o.horizontalSpaceBetweenThumbnails,this.thumbsVSpace=o.verticalSpaceBetweenThumbnails,this.countLoadedThumbs=0,this.borderSize=o.thumbnailBorderSize,this.totalThumbnails=this.sourcePlaylist_ar.length,this.tempTotalThumbnails=this.sourcePlaylist_ar.length,this.totalOriginalThumbnails=this.sourcePlaylist_ar.length,this.globalX=0,this.globalY=0,this.searchValue="",this.catChanging_to,this.arangeFaterTweenId_to,this.updateSearch_to,this.centerWithMenu_bl=o.centerNoSearchFoundLabelWithMenu_bl,this.isLoadAtTheEnd_bl=!1,this.isLoadMoreButtonShowed_bl=!0,this.isCatChanging_bl=!1,this.isFirstThumbnailLoaded_bl=!1,this.firstThumbnailShowed_bl=!1,this.animateParent_bl=o.animateParent_bl,this.hasExtraText_bl=o.hasExtraText_bl,this.isVerticalType_bl=o.isVerticalType_bl,this.hasSearchResult_bl=!0,this.showAllCategories_bl=o.showAllCategories_bl,this.totalCats=this.showAllCategories_bl?o.categories_ar.length-1:o.categories_ar.length,this.isMobile_bl=GAMLDATUtils.isMobile,this.init=function(){this.setOverflow("visible"),this.setBkColor(s.backgroundColor_str),this.setupThumbnailsData(),"loadmorewithbutton"==e.thumbnailLoadingType_str?this.setupLoadMoreButton():"loadmoreonscroll"==this.thumbnailLoadingType_str&&this.setupLoadMoreOnScroll(),this.filterCategories(),this.startGetMousePosition(),this.setupNoSearch()},this.resizeAndPosition=function(){e.stageWidth=s.stageWidth,e.setDataForResize(),e.positionThumbnailsAndMain()},this.startGetMousePosition=function(){t.addEventListener?(e.isMobile_bl||t.addEventListener("touchstart",this.getMousePosition),t.addEventListener("mousemove",this.getMousePosition)):document.attachEvent&&document.attachEvent("onmousemove",this.getMousePosition)},this.getMousePosition=function(t){var a=GAMLDATUtils.getViewportMouseCoordinates(t);e.isMobile_bl||(e.globalX=a.screenX,e.globalY=a.screenY)},this.setupThumbnailsData=function(){for(var t,a=[],i=0;i<this.totalThumbnails;i++)(t={}).thumbnail=void 0,t.id=i,t.catId=this.sourcePlaylist_ar[i].catId,this.originalDataThumbnails_ar[i]=t,this.dataThumbnails_ar[i]=t;for(i=0;i<this.totalCats;i++)a[i]=0;for(i=0;i<this.totalThumbnails;i++)a[this.dataThumbnails_ar[i].catId]++;for(i=0;i<this.totalCats;i++)(t={}).loaded=0,t.limit=0,t.total=a[i],t.isSelected=!1,this.loadMoreCatsData_ar[i]=t},this.search=function(t){e.searchValue=t,clearTimeout(e.updateSearch_to),e.updateSearch_to=setTimeout(function(){e.filterCategories()},200)},this.getThumbnail=function(t,a){var i={};return i.parent=this,i.id=a,i.catId=t,i.presetType_str=o.presetType_str,i.backgroundColor_str=o.thumbnailBackgroundColor_str,i.borderNormalColor_str=this.sourcePlaylist_ar[a].thumbnailBorderNormalColor||o.thumbnailBorderNormalColor_str,i.borderSelectedColor_str=this.sourcePlaylist_ar[a].thumbnailBorderSelectedColor||o.thumbnailBorderSelectedColor_str,i.borderSize=o.thumbnailBorderSize,i.borderRadius=o.thumbnailBorderRadius,i.thumbnailOverlayColor_str=this.sourcePlaylist_ar[a].thumbnailOverlayColor||o.thumbnailOverlayColor_str,i.thumbnailOverlayOpacity=o.thumbnailOverlayOpacity,i.spaceBetweenTextAndIcons=o.spaceBetweenTextAndIcons,i.extraButtonUrl_str=this.sourcePlaylist_ar[a].extraButtonUrl_str,i.extraButtonUrlTarget_str=this.sourcePlaylist_ar[a].extraButtonUrlTarget_str,i.thumbIconPathN_str=this.sourcePlaylist_ar[a].thumbIconPathN_str,i.thumbIconPathS_str=this.sourcePlaylist_ar[a].thumbIconPathS_str,i.thumbnailIconWidth=o.thumbnailIconWidth,i.thumbnailIconHeight=o.thumbnailIconHeight,i.linkIconPathN_str=o.linkIconPathN_str,i.linkIconPathS_str=o.linkIconPathS_str,i.spaceBetweenThumbanilIcons=o.spaceBetweenThumbanilIcons,i.hideAndShowTransitionType_str=o.hideAndShowTransitionType_str,i.textVerticalAlign_str=o.textVerticalAlign_str,i.imageTransitionDirection_str=o.imageTransitionDirection_str,i.thumbanilBoxShadow_str=o.thumbanilBoxShadow_str,i.textAnimType_str=o.textAnimType_str,i.disableThumbnails_bl=o.disableThumbnails_bl,i.useIconButtons_bl=o.useIconButtons_bl,i.alt_str=this.sourcePlaylist_ar[a].alt_str,i.linkUrl_str=this.sourcePlaylist_ar[a].url,i.linkTarget_str=this.sourcePlaylist_ar[a].target,i.contentOffsetY=o.contentOffsetY,i.buttonsOffest=o.buttonsOffestY,i.isVerticalType_bl=o.isVerticalType_bl,i.isDisabled_bl=this.sourcePlaylist_ar[a].disabled_bl,i.htmlContent1_str=this.sourcePlaylist_ar[a].htmlContent1_str,i.htmlContent2_str=this.sourcePlaylist_ar[a].htmlContent2_str,i.htmlExtraContent_str=this.sourcePlaylist_ar[a].htmlExtraContent_str,GAMMAGRIDThumbnail.setPrototype(),thumbnail=new GAMMAGRIDThumbnail(i),thumbnail.addListener(GAMMAGRIDThumbnail.MOUSE_UP,this.thumbanilOnMouseUpHandler),this.addChild(thumbnail),thumbnail},this.thumbanilOnMouseUpHandler=function(i){for(var s=i.id,h=i.id,l=i.extraButton?"extraButtonLink":e.sourcePlaylist_ar[s].type_str,r=0;r<e.totalOriginalThumbnails;r++)r<h&&(e.sourcePlaylist_ar[r].type_str==GAMMAGRID.NONE||e.sourcePlaylist_ar[r].type_str==GAMMAGRID.LINK)&&(s-=1);"extraButtonLink"==l?o.isPintrest_bl?PDK.pin(e.sourcePlaylist_ar[i.id].thumbnailPath_str,e.sourcePlaylist_ar[i.id].rawDescription_str,e.sourcePlaylist_ar[i.id].pinLInk_str,function(){}):t.open(e.dataThumbnails_ar[i.id].thumbnail.extraButtonUrl_str,e.dataThumbnails_ar[i.id].thumbnail.extraButtonUrlTarget_str):"link"==l?t.open(e.dataThumbnails_ar[i.id].thumbnail.linkUrl_str,e.dataThumbnails_ar[i.id].thumbnail.linkTarget_str):e.dispatchEvent(a.OPEN_LIGHTBOX,{id:s})},this.updateCategory=function(t){this.catId_ar!=t&&(this.catId_ar=t,this.filterCategories(),this.positionThumbnailsAndMain(),this.dispatchEvent(a.CATEGORY_UPDATE))},this.stopToLoadImage=function(){clearTimeout(this.loadThumbnailId_to),e.image_img&&(e.image_img.onerror=null,e.image_img.onload=null)},this.startToLoadImage=function(t){e.image_img=new Image,e.image_img.onerror=e.onImageLoadErrorHandler,e.image_img.onload=e.onImageLoadHandler,e.image_img.src=t},this.loadThumbImage=function(){var t;e.stopToLoadImage();for(a=0;a<e.totalCats;a++)if(e.loadMoreCatsData_ar[a].isSelected&&e.loadMoreCatsData_ar[a].loaded<e.loadMoreCatsData_ar[a].limit){t=a;break}for(var a=0;a<e.tempTotalThumbnails&&(e.curDataThumbnail=e.tempPlaylist_ar[a],e.curDataThumbnail.catId!=t||e.curDataThumbnail.thumbnail);a++);e.startToLoadImage(e.sourcePlaylist_ar[e.curDataThumbnail.id].thumbnailPath_str)},this.onImageLoadErrorHandler=function(t){var i="Thumbnail image can't be loaded, probably the path is incorrect <font color='#FFFFFF'>"+e.sourcePlaylist_ar[e.curDataThumbnail.id].thumbnailPath_str+"</font>";e.dispatchEvent(a.ERROR,{text:i})},this.onImageLoadHandler=function(t){var a=e.getThumbnail(e.curDataThumbnail.catId,e.curDataThumbnail.id);e.loadMoreCatsData_ar[e.curDataThumbnail.catId].loaded++,e.curDataThumbnail.thumbnail=a,e.originalDataThumbnails_ar[e.curDataThumbnail.id].thumbnail=a,a.hasImg_bl=!0,a.originalWidth=e.image_img.width,a.originalHeight=e.image_img.height,a.addImage(e.image_img),e.countLoadedThumbs++,e.isFirstThumbnailLoaded_bl||setTimeout(function(){e.firstThumbnailShowed_bl=!0},200),e.updateCurThumbnails(),e.positionThumbnailsAndMain()},this.updateCatsLimits=function(){var t=e.thumbnailsPerSet,a=0;if(this.showAllCategories_bl&&0==this.catId_ar[0]){if(0==this.loadMoreCatsData_ar[0].limit)for(;t>0&&a<this.totalCats;)this.loadMoreCatsData_ar[a].limit+t>this.loadMoreCatsData_ar[a].total?(t-=this.loadMoreCatsData_ar[a].total-this.loadMoreCatsData_ar[a].limit,this.loadMoreCatsData_ar[a].limit=this.loadMoreCatsData_ar[a].total):(this.loadMoreCatsData_ar[a].limit+=t,t=0),a++}else for(i=0;i<this.totalCats;i++)this.loadMoreCatsData_ar[i].isSelected&&this.loadMoreCatsData_ar[i].limit<this.thumbnailsPerSet&&(this.loadMoreCatsData_ar[i].limit=Math.min(this.loadMoreCatsData_ar[i].total,this.thumbnailsPerSet));this.totalThumbnailsLimit=0;for(var i=0;i<this.totalCats;i++)this.loadMoreCatsData_ar[i].isSelected&&(this.totalThumbnailsLimit+=this.loadMoreCatsData_ar[i].limit)},this.allowToLoadMoreThumbnails=function(){return this.totalLoadedThumbnails==this.totalThumbnailsLimit&&this.totalLoadedThumbnails<this.tempTotalThumbnails},this.loadMore=function(){for(var t=e.thumbnailsPerSet,a=0;t>0&&a<e.totalCats;)e.loadMoreCatsData_ar[a].isSelected&&(e.loadMoreCatsData_ar[a].limit+t>e.loadMoreCatsData_ar[a].total?(t-=e.loadMoreCatsData_ar[a].total-e.loadMoreCatsData_ar[a].limit,e.loadMoreCatsData_ar[a].limit=e.loadMoreCatsData_ar[a].total):(e.loadMoreCatsData_ar[a].limit+=t,t=0)),a++;this.totalThumbnailsLimit=0;for(var i=0;i<this.totalCats;i++)this.loadMoreCatsData_ar[i].isSelected&&(this.totalThumbnailsLimit+=this.loadMoreCatsData_ar[i].limit);e.loadThumbImage()},this.updateCatsData=function(){var t,a,i=[],o=[];e.loadMoreCatsData_ar=[];for(s=0;s<e.totalCats;s++)i[s]=0,o[s]=0;for(s=0;s<e.totalThumbnails;s++)i[(t=e.dataThumbnails_ar[s]).catId]++,t.thumbnail&&o[t.catId]++;for(var s=0;s<e.totalCats;s++)(a={}).loaded=o[s],a.limit=o[s],a.total=i[s],a.isSelected=!1,e.loadMoreCatsData_ar[s]=a},this.filterCategories=function(){var t,a,i=0;this.tempPlaylist_ar=[],this.playlist_ar=[],this.dataThumbnails_ar=[],e.stopToLoadImage();for(o=0;o<e.sourcePlaylist_ar.length;o++)t=e.originalDataThumbnails_ar[o],-1!=e.sourcePlaylist_ar[o].titleText_str.toLowerCase().indexOf(e.searchValue)?e.dataThumbnails_ar.push(t):t.thumbnail&&t.thumbnail.hide(!0);if(e.totalThumbnails=e.dataThumbnails_ar.length,this.updateCatsData(),this.showAllCategories_bl&&(i=1),this.showAllCategories_bl&&0==e.catId_ar[0]){for(o=0;o<this.totalThumbnails;o++)t=this.dataThumbnails_ar[o],this.tempPlaylist_ar.push(t),t.thumbnail&&(this.playlist_ar.push(t),t.thumbnail.show(!0));for(var o=0;o<this.totalCats;o++)this.loadMoreCatsData_ar[o].isSelected=!0}else for(o=0;o<this.totalThumbnails;o++){t=this.dataThumbnails_ar[o],a=!1;for(var s=0;s<this.totalCats;s++)t.catId==e.catId_ar[s]-i&&(this.tempPlaylist_ar.push(t),t.thumbnail&&this.playlist_ar.push(t),this.loadMoreCatsData_ar[e.catId_ar[s]-i].isSelected=!0,a=!0);a?t.thumbnail&&t.thumbnail.show(!0):t.thumbnail&&t.thumbnail.hide(!0)}this.tempTotalThumbnails=this.tempPlaylist_ar.length,this.totalLoadedThumbnails=this.playlist_ar.length,0==this.tempTotalThumbnails?(this.hasSearchResult_bl=!1,this.showNoSearch()):(this.hasSearchResult_bl=!0,this.hideNoSearch()),this.updateCatsLimits(),this.totalLoadedThumbnails<this.totalThumbnailsLimit?(clearTimeout(this.loadThumbnailId_to),this.loadThumbnailId_to=setTimeout(this.loadThumbImage,300)):(e.updateCurThumbnails(),e.positionThumbnailsAndMain()),"loadmorewithbutton"==e.thumbnailLoadingType_str&&this.hideOrShowLoadMoreButton()},this.updateCurThumbnails=function(){var t,a=0;if(this.playlist_ar=[],this.showAllCategories_bl&&(a=1),this.showAllCategories_bl&&0==e.catId_ar[0])for(i=0;i<this.totalThumbnails;i++)(t=this.dataThumbnails_ar[i]).thumbnail&&this.playlist_ar.push(t);else for(i=0;i<this.totalThumbnails;i++){t=this.dataThumbnails_ar[i];for(var o=0;o<this.totalCats;o++)t.catId==e.catId_ar[o]-a&&t.thumbnail&&this.playlist_ar.push(t)}this.totalLoadedThumbnails=this.playlist_ar.length,this.totalLoadedThumbnails<this.totalThumbnailsLimit&&(clearTimeout(this.loadThumbnailId_to),this.hasExtraText_bl?this.loadThumbnailId_to=setTimeout(this.loadThumbImage,53):this.loadThumbnailId_to=setTimeout(this.loadThumbImage,10)),"loadmorewithbutton"==e.thumbnailLoadingType_str?this.hideOrShowLoadMoreButton():"loadmoreonscroll"==this.thumbnailLoadingType_str&&this.loadInfinite()},this.setDataForResize=function(){if(this.stageWidth){this.totalColumns=Math.ceil((this.stageWidth-2*this.thumbsHOffset+this.thumbsHSpace)/(this.thumbnailMaxWidth+2*this.borderSize+this.thumbsHSpace)),this.thumbWidth=Math.floor((this.stageWidth-2*this.thumbsHOffset+this.thumbsHSpace-this.totalColumns*(this.thumbsHSpace+2*this.borderSize))/this.totalColumns),this.thumbHeight=Math.floor(this.thumbWidth*(this.thumbnailMaxHeight/this.thumbnailMaxWidth));var t=this.totalColumns*(this.thumbWidth+2*this.borderSize+this.thumbsHSpace)-this.thumbsHSpace;this.leftWidth=this.stageWidth-2*this.thumbsHOffset-t,this.prevStageWidth=this.stageWidth}},this.positionThumbnailsAndMain=function(){this.hasExtraText_bl?(e.setThumbsExtraTextWidth(),clearTimeout(this.resizeWithExtraContentId_to),this.resizeWithExtraContentId_to=setTimeout(function(){e.positionThumbnailWithExtraContent(),e.setFinalSize()},51)):(this.positionThumbnails(),this.setFinalSize())},this.setFinalSize=function(){e.positionLoadMoreButton(),e.totalHeight+=e.offsetTotalHeight,e.hasSearchResult_bl||(e.totalHeight=e.thumbHeight,e.positionNoSearchLabel()),e.prevTotalHeight!=e.totalHeight&&(e.firstThumbnailShowed_bl&&e.animateParent_bl&&!e.isMobile_bl?(GAMLDATMagicAnim.to(e,.7,{h:e.totalHeight,ease:Quart.easeOut}),clearTimeout(e.arangeFaterTweenId_to),e.arangeFaterTweenId_to=setTimeout(function(){e.stageWidth!=s.stageContainer.offsetWidth&&s.onResizeHandler()},700)):e.setHeight(e.totalHeight)),s.setFinalSize(),s.stageWidth=s.stageContainer.offsetWidth,e.prevTotalHeight=e.totalHeight,e.stageWidth!=s.stageWidth&&s.onResizeHandler()},this.positionThumbnails=function(){for(var t,a,i,o,s,h,l=0;l<e.totalLoadedThumbnails;l++)s=e.playlist_ar[l].thumbnail,i=e.thumbWidth+2*e.borderSize,o=e.thumbHeight+2*e.borderSize,e.leftWidth>0&&l%e.totalColumns<e.leftWidth&&i++,a=Math.floor(l/e.totalColumns)*(o+e.thumbsVSpace)+e.thumbsVOffset,l%e.totalColumns==0?(h=e.thumbsHOffset,t=e.thumbsHOffset):t=h,h+=i+e.thumbsHSpace,s.finalW=i,s.finalH=o,s.finalX=t,s.finalY=a,s.resizeAndPosition();e.totalHeight=s?a+o+e.thumbsVOffset:0},this.setThumbsExtraTextWidth=function(){for(var t,a,i=0;i<e.totalLoadedThumbnails;i++)a=e.playlist_ar[i].thumbnail,t=e.thumbWidth+2*e.borderSize,e.leftWidth>0&&i%e.totalColumns<e.leftWidth&&t++,a.hasExtraText_bl&&a.textHolder_do.setWidth(t-2*e.borderSize)},this.positionThumbnailWithExtraContent=function(){for(var t,a,i,o,s,h,l=0,r=e.thumbsVOffset,n=0;n<e.totalLoadedThumbnails;n++)(s=e.playlist_ar[n].thumbnail).hasExtraText_bl&&(s.addToHeight=s.text3_do.getHeight()),i=e.thumbWidth+2*e.borderSize,o=e.thumbHeight+2*e.borderSize,e.leftWidth>0&&n%e.totalColumns<e.leftWidth&&i++,0!=n&&n%e.totalColumns==0&&(r+=o+l+e.thumbsVSpace),s.addToHeight>l&&(l=s.addToHeight),n%e.totalColumns==0?(h=e.thumbsHOffset,t=e.thumbsHOffset,n<e.totalLoadedThumbnails-1&&(l=0)):t=h,a=r,h+=i+e.thumbsHSpace,s.finalW=i,s.finalH=o+s.addToHeight,s.finalX=t,s.finalY=a,s.resizeAndPosition();e.totalHeight=s?a+o+l+e.thumbsVOffset:0},this.setupNoSearch=function(){this.noSearch_do=new GAMLDATDisplayObject("div"),this.noSearch_do.setOverflow("visible"),this.noSearch_do.setDisplay("inline-block"),this.noSearch_do.getStyle().fontSmoothing="antialiased",this.noSearch_do.getStyle().webkitFontSmoothing="antialiased",this.noSearch_do.getStyle().textRendering="optimizeLegibility",this.noSearch_do.getStyle().whiteSpace="nowrap",this.noSearch_do.setBackfaceVisibility(),this.noSearch_do.getStyle().padding="",this.noSearch_do.getStyle().margin="",this.noSearch_do.screen.className=o.searchNotFoundClassName_str,this.noSearch_do.hasTransform3d_bl=!1,this.noSearch_do.hasTransform2d_bl=!1,this.noSearch_do.setAlpha(0),this.noSearch_do.setInnerHTML(o.searchNotFoundLabel_str),this.addChild(this.noSearch_do),setTimeout(function(){e.noSearch_do.w=e.noSearch_do.getWidth(),e.noSearch_do.h=e.noSearch_do.getHeight(),e.removeChild(e.noSearch_do)},70)},this.showNoSearch=function(){this.isNoSearchFoundShowed_bl||(this.isNoSearchFoundShowed_bl=!0,this.addChild(this.noSearch_do),this.positionNoSearchLabel(),GAMLDATMagicAnim.killTweensOf(this.noSearch_do),GAMLDATMagicAnim.to(this.noSearch_do,.1,{alpha:1,yoyo:!0,repeat:8}))},this.hideNoSearch=function(){this.isNoSearchFoundShowed_bl&&(this.isNoSearchFoundShowed_bl=!1,GAMLDATMagicAnim.killTweensOf(this.noSearch_do),GAMLDATMagicAnim.to(this.noSearch_do,.1,{alpha:0,onComplete:function(){e.removeChild(e.noSearch_do)}}))},this.positionNoSearchLabel=function(){this.isNoSearchFoundShowed_bl&&(this.noSearch_do.setX(parseInt((this.stageWidth-this.noSearch_do.w)/2)),s.menu_do.isShowed_bl&&this.centerWithMenu_bl?this.noSearch_do.setY(parseInt((this.totalHeight-s.menu_do.menuOffsetBottom-this.noSearch_do.h)/2)):this.noSearch_do.setY(parseInt((this.totalHeight-this.noSearch_do.h)/2)))},this.setupLoadMoreButton=function(){GAMMAGRIDMenuButton.setPrototype(),e.loadMoreButton_do=new GAMMAGRIDMenuButton(o.loadMoreButtonLabel_str,o.loadMoreButtonBackgroundNormalClassName_str,o.loadMoreButtonBackgroundSelectedClassName_str,o.loadMoreButtonTextNormalClassName_str,o.loadMoreButtonTextSeectedClassName_str),this.loadMoreButton_do.setLabel(o.loadMoreButtonLabel_str),this.loadMoreButton_do.getStyle().zIndex=20,this.loadMoreButton_do.addListener(GAMMAGRIDMenuButton.MOUSE_UP,this.loadMoreButtonOnMouseUpHandler),this.hideLoadMoreButton(),this.addChild(this.loadMoreButton_do)},this.loadMoreButtonOnMouseUpHandler=function(){e.hideLoadMoreButton(),e.loadMore()},this.hideLoadMoreButton=function(){this.loadMoreButton_do&&this.isLoadMoreButtonShowed_bl&&(this.isLoadMoreButtonShowed_bl=!1,this.loadMoreButton_do.setVisible(!1))},this.showLoadMoreButton=function(){this.loadMoreButton_do&&!this.isLoadMoreButtonShowed_bl&&(this.isLoadMoreButtonShowed_bl=!0,this.loadMoreButton_do.setVisible(!0),this.isMobile_bl||(this.loadMoreButton_do.setAlpha(0),GAMLDATMagicAnim.to(this.loadMoreButton_do,.6,{alpha:1})),this.positionLoadMoreButton())},this.hideOrShowLoadMoreButton=function(){e.allowToLoadMoreThumbnails()?e.showLoadMoreButton():e.hideLoadMoreButton()},this.positionLoadMoreButton=function(){this.isLoadMoreButtonShowed_bl&&this.loadMoreButton_do?(this.isMobile_bl||0==this.loadMoreButton_do.alpha?(this.loadMoreButton_do.setX(parseInt((this.stageWidth-this.loadMoreButton_do.w)/2)),this.loadMoreButton_do.setY(this.totalHeight+this.loadMoreButtonOffsetTop)):GAMLDATMagicAnim.to(this.loadMoreButton_do,.5,{x:parseInt((this.stageWidth-this.loadMoreButton_do.w)/2),y:parseInt(this.totalHeight+this.loadMoreButtonOffsetTop)}),this.offsetTotalHeight=this.loadMoreButtonOffsetTop+this.loadMoreButtonOffsetBottom+this.loadMoreButton_do.h):this.offsetTotalHeight=0},this.setupLoadMoreOnScroll=function(){t.addEventListener?t.addEventListener("scroll",this.onScrollHandler):t.attachEvent&&t.attachEvent("onscroll",this.onScrollHandler)},this.onScrollHandler=function(){e.loadInfinite(),e.totalLoadedThumbnails==e.totalThumbnails&&(t.removeEventListener?t.removeEventListener("scroll",this.onScrollHandler):t.detachEvent&&t.detachEvent("onscroll",this.onScrollHandler))},this.loadInfinite=function(){if(this.allowToLoadMoreThumbnails()){var t=this.playlist_ar[this.playlist_ar.length-1].thumbnail;clearTimeout(this.loadInifiniteId_to),this.loadInifiniteId_to=setTimeout(function(){t.getGlobalY()+t.finalH<GAMLDATUtils.getViewportSize().h&&e.loadMore()},500)}},this.init()};a.setPrototype=function(){a.prototype=new GAMLDATDisplayObject("div","relative")},a.OPEN_LIGHTBOX="openLightbox",a.CATEGORY_UPDATE="categoryUpdate",a.ERROR="error",a.prototype=null,t.GAMMAGRIDClassicVerticalThumbnailsManager=a}(window);
!function(t){var a=function(o,s){var e=this;a.prototype;this.sourcePlaylist_ar=o.playlist_ar.playlistItems,this.originalDataThumbnails_ar=[],this.dataThumbnails_ar=[],this.tempPlaylist_ar,this.columnHeights_ar=[],this.loadMoreCatsData_ar=[],this.catId_ar=o.startAtCategory_ar,this.loadMoreButton_do,this.curDataThumbnail,this.thumbnailLoadingType_str=o.thumbnailLoadingType_str,this.totalLoadedThumbnails=0,this.loadMoreButtonOffsetTop=o.loadMoreButtonOffsetTop,this.loadMoreButtonOffsetBottom=o.loadMoreButtonOffsetBottom,this.thumbnailsPerSet=o.howManyThumbnailsToDisplayPerSet,this.thumbsHOffset=o.thumbnailsHorizontalOffset,this.thumbsVOffset=o.thumbnailsVerticalOffset,this.offsetTotalHeight=0,this.maxH=0,this.thumbOffsetX=0,this.catId=o.startAtCategory,this.stageWidth=0,this.prevStageWidth=0,this.thumbnailMaxWidth=o.thumbnailMaxWidth,this.thumbnailMaxHeight=o.thumbnailMaxHeight,this.leftWidth=0,this.thumbWidth,this.thumbHeight,this.thumbsHSpace=o.horizontalSpaceBetweenThumbnails,this.thumbsVSpace=o.verticalSpaceBetweenThumbnails,this.countLoadedThumbs=0,this.borderSize=o.thumbnailBorderSize,this.totalThumbnails=this.sourcePlaylist_ar.length,this.tempTotalThumbnails=this.sourcePlaylist_ar.length,this.totalOriginalThumbnails=this.sourcePlaylist_ar.length,this.globalX=0,this.globalY=0,this.searchValue="",this.catChanging_to,this.arangeFaterTweenId_to,this.updateSearch_to,this.centerWithMenu_bl=o.centerNoSearchFoundLabelWithMenu_bl,this.isLoadAtTheEnd_bl=!1,this.isLoadMoreButtonShowed_bl=!0,this.isCatChanging_bl=!1,this.isFirstThumbnailLoaded_bl=!1,this.firstThumbnailShowed_bl=!1,this.animateParent_bl=o.animateParent_bl,this.showAllCategories_bl=o.showAllCategories_bl,this.totalCats=this.showAllCategories_bl?o.categories_ar.length-1:o.categories_ar.length,this.isMobile_bl=GAMLDATUtils.isMobile,this.init=function(){this.setOverflow("visible"),this.setBkColor(s.backgroundColor_str),this.setupThumbnailsData(),"loadmorewithbutton"==e.thumbnailLoadingType_str?this.setupLoadMoreButton():"loadmoreonscroll"==this.thumbnailLoadingType_str&&this.setupLoadMoreOnScroll(),this.filterCategories(),this.startGetMousePosition(),this.setupNoSearch()},this.resizeAndPosition=function(){e.stageWidth=s.stageWidth,e.setDataForResize(),e.positionThumbnailsAndMain()},this.startGetMousePosition=function(){t.addEventListener?(e.isMobile_bl||t.addEventListener("touchstart",this.getMousePosition),t.addEventListener("mousemove",this.getMousePosition)):document.attachEvent&&document.attachEvent("onmousemove",this.getMousePosition)},this.getMousePosition=function(t){var a=GAMLDATUtils.getViewportMouseCoordinates(t);e.isMobile_bl||(e.globalX=a.screenX,e.globalY=a.screenY)},this.setupThumbnailsData=function(){for(var t,a=[],i=0;i<this.totalThumbnails;i++)(t={}).thumbnail=void 0,t.id=i,t.catId=this.sourcePlaylist_ar[i].catId,this.originalDataThumbnails_ar[i]=t,this.dataThumbnails_ar[i]=t;for(i=0;i<this.totalCats;i++)a[i]=0;for(i=0;i<this.totalThumbnails;i++)a[this.dataThumbnails_ar[i].catId]++;for(i=0;i<this.totalCats;i++)(t={}).loaded=0,t.limit=0,t.total=a[i],t.isSelected=!1,this.loadMoreCatsData_ar[i]=t},this.search=function(t){e.searchValue=t,clearTimeout(e.updateSearch_to),e.updateSearch_to=setTimeout(function(){e.filterCategories()},200)},this.getThumbnail=function(t,a){var i={};return i.parent=this,i.id=a,i.catId=t,i.presetType_str=o.presetType_str,i.backgroundColor_str=o.thumbnailBackgroundColor_str,i.borderNormalColor_str=this.sourcePlaylist_ar[a].thumbnailBorderNormalColor||o.thumbnailBorderNormalColor_str,i.borderSelectedColor_str=this.sourcePlaylist_ar[a].thumbnailBorderSelectedColor||o.thumbnailBorderSelectedColor_str,i.borderSize=o.thumbnailBorderSize,i.borderRadius=o.thumbnailBorderRadius,i.thumbnailOverlayColor_str=this.sourcePlaylist_ar[a].thumbnailOverlayColor||o.thumbnailOverlayColor_str,i.thumbnailOverlayOpacity=o.thumbnailOverlayOpacity,i.spaceBetweenTextAndIcons=o.spaceBetweenTextAndIcons,i.extraButtonUrl_str=this.sourcePlaylist_ar[a].extraButtonUrl_str,i.extraButtonUrlTarget_str=this.sourcePlaylist_ar[a].extraButtonUrlTarget_str,i.thumbIconPathN_str=this.sourcePlaylist_ar[a].thumbIconPathN_str,i.thumbIconPathS_str=this.sourcePlaylist_ar[a].thumbIconPathS_str,i.thumbnailIconWidth=o.thumbnailIconWidth,i.thumbnailIconHeight=o.thumbnailIconHeight,i.linkIconPathN_str=o.linkIconPathN_str,i.linkIconPathS_str=o.linkIconPathS_str,i.spaceBetweenThumbanilIcons=o.spaceBetweenThumbanilIcons,i.hideAndShowTransitionType_str=o.hideAndShowTransitionType_str,i.textVerticalAlign_str=o.textVerticalAlign_str,i.imageTransitionDirection_str=o.imageTransitionDirection_str,i.thumbanilBoxShadow_str=o.thumbanilBoxShadow_str,i.textAnimType_str=o.textAnimType_str,i.disableThumbnails_bl=o.disableThumbnails_bl,i.useIconButtons_bl=o.useIconButtons_bl,i.alt_str=this.sourcePlaylist_ar[a].alt_str,i.linkUrl_str=this.sourcePlaylist_ar[a].url,i.linkTarget_str=this.sourcePlaylist_ar[a].target,i.contentOffsetY=o.contentOffsetY,i.buttonsOffest=o.buttonsOffestY,i.isVerticalType_bl=o.isVerticalType_bl,i.isDisabled_bl=this.sourcePlaylist_ar[a].disabled_bl,i.htmlContent1_str=this.sourcePlaylist_ar[a].htmlContent1_str,i.htmlContent2_str=this.sourcePlaylist_ar[a].htmlContent2_str,GAMMAGRIDThumbnail.setPrototype(),thumbnail=new GAMMAGRIDThumbnail(i),thumbnail.addListener(GAMMAGRIDThumbnail.MOUSE_UP,this.thumbanilOnMouseUpHandler),this.addChild(thumbnail),thumbnail},this.thumbanilOnMouseUpHandler=function(i){for(var s=i.id,h=i.id,l=i.extraButton?"extraButtonLink":e.sourcePlaylist_ar[s].type_str,r=0;r<e.totalOriginalThumbnails;r++)r<h&&(e.sourcePlaylist_ar[r].type_str==GAMMAGRID.NONE||e.sourcePlaylist_ar[r].type_str==GAMMAGRID.LINK)&&(s-=1);"extraButtonLink"==l?o.isPintrest_bl?PDK.pin(e.sourcePlaylist_ar[i.id].thumbnailPath_str,e.sourcePlaylist_ar[i.id].rawDescription_str,e.sourcePlaylist_ar[i.id].pinLInk_str,function(){}):t.open(e.dataThumbnails_ar[i.id].thumbnail.extraButtonUrl_str,e.dataThumbnails_ar[i.id].thumbnail.extraButtonUrlTarget_str):"link"==l?t.open(e.dataThumbnails_ar[i.id].thumbnail.linkUrl_str,e.dataThumbnails_ar[i.id].thumbnail.linkTarget_str):e.dispatchEvent(a.OPEN_LIGHTBOX,{id:s})},this.updateCategory=function(t){this.catId_ar!=t&&(this.catId_ar=t,this.filterCategories(),this.positionThumbnailsAndMain(),this.dispatchEvent(a.CATEGORY_UPDATE))},this.stopToLoadImage=function(){clearTimeout(this.loadThumbnailId_to),e.image_img&&(e.image_img.onerror=null,e.image_img.onload=null)},this.startToLoadImage=function(t){e.image_img=new Image,e.image_img.onerror=e.onImageLoadErrorHandler,e.image_img.onload=e.onImageLoadHandler,e.image_img.src=t},this.loadThumbImage=function(){var t;e.stopToLoadImage();for(a=0;a<e.totalCats;a++)if(e.loadMoreCatsData_ar[a].isSelected&&e.loadMoreCatsData_ar[a].loaded<e.loadMoreCatsData_ar[a].limit){t=a;break}for(var a=0;a<e.tempTotalThumbnails&&(e.curDataThumbnail=e.tempPlaylist_ar[a],e.curDataThumbnail.catId!=t||e.curDataThumbnail.thumbnail);a++);e.startToLoadImage(e.sourcePlaylist_ar[e.curDataThumbnail.id].thumbnailPath_str)},this.onImageLoadErrorHandler=function(t){var i="Thumbnail image can't be loaded, probably the path is incorrect <font color='#FFFFFF'>"+e.sourcePlaylist_ar[e.curDataThumbnail.id].thumbnailPath_str+"</font>";e.dispatchEvent(a.ERROR,{text:i})},this.onImageLoadHandler=function(t){var a=e.getThumbnail(e.curDataThumbnail.catId,e.curDataThumbnail.id);e.loadMoreCatsData_ar[e.curDataThumbnail.catId].loaded++,e.curDataThumbnail.thumbnail=a,e.originalDataThumbnails_ar[e.curDataThumbnail.id].thumbnail=a,a.hasImg_bl=!0,a.originalWidth=e.image_img.width,a.originalHeight=e.image_img.height,a.addImage(e.image_img),e.countLoadedThumbs++,e.isFirstThumbnailLoaded_bl||setTimeout(function(){e.firstThumbnailShowed_bl=!0},200),e.updateCurThumbnails(),e.positionThumbnailsAndMain()},this.updateCatsLimits=function(){var t=e.thumbnailsPerSet,a=0;if(this.showAllCategories_bl&&0==this.catId_ar[0]){if(0==this.loadMoreCatsData_ar[0].limit)for(;t>0&&a<this.totalCats;)this.loadMoreCatsData_ar[a].limit+t>this.loadMoreCatsData_ar[a].total?(t-=this.loadMoreCatsData_ar[a].total-this.loadMoreCatsData_ar[a].limit,this.loadMoreCatsData_ar[a].limit=this.loadMoreCatsData_ar[a].total):(this.loadMoreCatsData_ar[a].limit+=t,t=0),a++}else for(i=0;i<this.totalCats;i++)this.loadMoreCatsData_ar[i].isSelected&&this.loadMoreCatsData_ar[i].limit<this.thumbnailsPerSet&&(this.loadMoreCatsData_ar[i].limit=Math.min(this.loadMoreCatsData_ar[i].total,this.thumbnailsPerSet));this.totalThumbnailsLimit=0;for(var i=0;i<this.totalCats;i++)this.loadMoreCatsData_ar[i].isSelected&&(this.totalThumbnailsLimit+=this.loadMoreCatsData_ar[i].limit)},this.allowToLoadMoreThumbnails=function(){return this.totalLoadedThumbnails==this.totalThumbnailsLimit&&this.totalLoadedThumbnails<this.tempTotalThumbnails},this.loadMore=function(){for(var t=e.thumbnailsPerSet,a=0;t>0&&a<e.totalCats;)e.loadMoreCatsData_ar[a].isSelected&&(e.loadMoreCatsData_ar[a].limit+t>e.loadMoreCatsData_ar[a].total?(t-=e.loadMoreCatsData_ar[a].total-e.loadMoreCatsData_ar[a].limit,e.loadMoreCatsData_ar[a].limit=e.loadMoreCatsData_ar[a].total):(e.loadMoreCatsData_ar[a].limit+=t,t=0)),a++;this.totalThumbnailsLimit=0;for(var i=0;i<this.totalCats;i++)this.loadMoreCatsData_ar[i].isSelected&&(this.totalThumbnailsLimit+=this.loadMoreCatsData_ar[i].limit);e.loadThumbImage()},this.updateCatsData=function(){var t,a,i=[],o=[];e.loadMoreCatsData_ar=[];for(s=0;s<e.totalCats;s++)i[s]=0,o[s]=0;for(s=0;s<e.totalThumbnails;s++)i[(t=e.dataThumbnails_ar[s]).catId]++,t.thumbnail&&o[t.catId]++;for(var s=0;s<e.totalCats;s++)(a={}).loaded=o[s],a.limit=o[s],a.total=i[s],a.isSelected=!1,e.loadMoreCatsData_ar[s]=a},this.filterCategories=function(){var t,a,i=0;this.tempPlaylist_ar=[],this.playlist_ar=[],this.dataThumbnails_ar=[],e.stopToLoadImage();for(o=0;o<e.sourcePlaylist_ar.length;o++)t=e.originalDataThumbnails_ar[o],-1!=e.sourcePlaylist_ar[o].titleText_str.toLowerCase().indexOf(e.searchValue)?e.dataThumbnails_ar.push(t):t.thumbnail&&t.thumbnail.hide(!0);if(e.totalThumbnails=e.dataThumbnails_ar.length,this.updateCatsData(),this.showAllCategories_bl&&(i=1),this.showAllCategories_bl&&0==e.catId_ar[0]){for(o=0;o<this.totalThumbnails;o++)t=this.dataThumbnails_ar[o],this.tempPlaylist_ar.push(t),t.thumbnail&&(this.playlist_ar.push(t),t.thumbnail.show(!0));for(var o=0;o<this.totalCats;o++)this.loadMoreCatsData_ar[o].isSelected=!0}else for(o=0;o<this.totalThumbnails;o++){t=this.dataThumbnails_ar[o],a=!1;for(var s=0;s<this.totalCats;s++)t.catId==e.catId_ar[s]-i&&(this.tempPlaylist_ar.push(t),t.thumbnail&&this.playlist_ar.push(t),this.loadMoreCatsData_ar[e.catId_ar[s]-i].isSelected=!0,a=!0);a?t.thumbnail&&t.thumbnail.show(!0):t.thumbnail&&t.thumbnail.hide(!0)}this.tempTotalThumbnails=this.tempPlaylist_ar.length,this.totalLoadedThumbnails=this.playlist_ar.length,0==this.tempTotalThumbnails?(this.hasSearchResult_bl=!1,this.showNoSearch()):(this.hasSearchResult_bl=!0,this.hideNoSearch()),this.updateCatsLimits(),this.totalLoadedThumbnails<this.totalThumbnailsLimit?(clearTimeout(this.loadThumbnailId_to),this.loadThumbnailId_to=setTimeout(this.loadThumbImage,300)):(e.updateCurThumbnails(),e.positionThumbnailsAndMain()),"loadmorewithbutton"==e.thumbnailLoadingType_str&&this.hideOrShowLoadMoreButton()},this.updateCurThumbnails=function(){var t,a=0;if(this.playlist_ar=[],this.showAllCategories_bl&&(a=1),this.showAllCategories_bl&&0==e.catId_ar[0])for(i=0;i<this.totalThumbnails;i++)(t=this.dataThumbnails_ar[i]).thumbnail&&this.playlist_ar.push(t);else for(i=0;i<this.totalThumbnails;i++){t=this.dataThumbnails_ar[i];for(var o=0;o<this.totalCats;o++)t.catId==e.catId_ar[o]-a&&t.thumbnail&&this.playlist_ar.push(t)}this.totalLoadedThumbnails=this.playlist_ar.length,this.totalLoadedThumbnails<this.totalThumbnailsLimit&&(clearTimeout(this.loadThumbnailId_to),this.loadThumbnailId_to=setTimeout(this.loadThumbImage,10)),"loadmorewithbutton"==e.thumbnailLoadingType_str?this.hideOrShowLoadMoreButton():"loadmoreonscroll"==this.thumbnailLoadingType_str&&this.loadInfinite()},this.setDataForResize=function(){if(this.stageWidth){this.totalColumns=Math.ceil((this.stageWidth-2*this.thumbsHOffset+this.thumbsHSpace)/(this.thumbnailMaxWidth+2*this.borderSize+this.thumbsHSpace)),this.thumbWidth=Math.floor((this.stageWidth-2*this.thumbsHOffset+this.thumbsHSpace-this.totalColumns*(this.thumbsHSpace+2*this.borderSize))/this.totalColumns),this.thumbHeight=Math.floor(this.thumbWidth*(this.thumbnailMaxHeight/this.thumbnailMaxWidth));var t=this.totalColumns*(this.thumbWidth+2*this.borderSize+this.thumbsHSpace)-this.thumbsHSpace;this.leftWidth=this.stageWidth-2*this.thumbsHOffset-t,this.prevStageWidth=this.stageWidth}},this.positionThumbnailsAndMain=function(){this.columnHeights_ar=[];for(t=0;t<this.totalColumns;t++)this.columnHeights_ar[t]=0;for(var t=0;t<this.totalLoadedThumbnails;t++)thumbnail=this.playlist_ar[t].thumbnail,thumbnail.used_bl=!1;this.positionThumbnails(),this.positionThumbnails(),this.positionThumbnails2(),this.totalHeight=Math.max(0,this.maxH*(this.thumbHeight+this.thumbsVSpace+2*this.borderSize)-this.thumbsVSpace+2*this.thumbsVOffset),e.hasSearchResult_bl||(e.totalHeight=e.thumbHeight,e.positionNoSearchLabel()),this.positionLoadMoreButton(),this.totalHeight+=this.offsetTotalHeight,this.setWidth(this.stageWidth),this.prevTotalHeight!=this.totalHeight&&(this.firstThumbnailShowed_bl&&this.animateParent_bl&&!this.isMobile_bl?(GAMLDATMagicAnim.to(this,.7,{h:this.totalHeight,ease:Quart.easeOut}),clearTimeout(this.arangeFaterTweenId_to),this.arangeFaterTweenId_to=setTimeout(function(){e.stageWidth!=s.stageContainer.offsetWidth&&s.onResizeHandler()},700)):this.setHeight(this.totalHeight)),s.setFinalSize(),s.stageWidth=s.stageContainer.offsetWidth,this.prevTotalHeight=this.totalHeight,e.stageWidth!=s.stageWidth&&s.onResizeHandler()},this.positionThumbnails=function(){for(var t,a,i,o,s,h,l,r,n,u,d,m=[],b=[],_=0;_<e.totalColumns;_++)m[_]=e.thumbWidth+2*e.borderSize,e.leftWidth>0&&_<e.leftWidth&&m[_]++,b[_]=0==_?e.thumbsHOffset:b[_-1]+m[_-1]+e.thumbsHSpace;for(_=0;_<e.totalLoadedThumbnails;_++)if(!(d=e.playlist_ar[_].thumbnail).used_bl)if(i=Math.round(d.originalWidth/e.thumbnailMaxWidth),o=Math.round(d.originalHeight/e.thumbnailMaxHeight),a=1e3,1==i){d.used_bl=!0;for(c=0;c<e.totalColumns;c++)e.columnHeights_ar[c]<a&&(a=e.columnHeights_ar[c]);for(c=0;c<e.totalColumns;c++)if(e.columnHeights_ar[c]==a){t=c;break}l=b[t],r=e.columnHeights_ar[t]*(e.thumbHeight+e.thumbsVSpace+2*e.borderSize)+e.thumbsVOffset,n=m[t],u=(e.thumbHeight+e.thumbsVSpace+2*e.borderSize)*o-e.thumbsVSpace,d.finalW=n,d.finalH=u,d.finalX=l,d.finalY=r,d.resizeAndPosition(),e.columnHeights_ar[t]+=o}else{s=!1;for(var c=0;c<e.totalColumns-(i-1);c++){h=!0;for(g=0;g<i;g++)e.columnHeights_ar[c]!=e.columnHeights_ar[c+g]&&(h=!1);h&&e.columnHeights_ar[c]<a&&(a=e.columnHeights_ar[c],t=c,s=!0)}if(s){d.used_bl=!0,l=b[t],r=e.columnHeights_ar[t]*(e.thumbHeight+e.thumbsVSpace+2*e.borderSize)+e.thumbsVOffset,n=-e.thumbsHSpace;for(g=0;g<i;g++)n+=m[t+g]+e.thumbsHSpace;u=(e.thumbHeight+e.thumbsVSpace+2*e.borderSize)*o-e.thumbsVSpace,d.finalW=n,d.finalH=u,d.finalX=l,d.finalY=r,d.resizeAndPosition();for(var g=0;g<i;g++)e.columnHeights_ar[t+g]+=o}}e.maxH=0;for(_=0;_<e.totalColumns;_++)e.columnHeights_ar[_]>e.maxH&&(e.maxH=e.columnHeights_ar[_])},this.positionThumbnails2=function(){for(var t,a,i,o,s=[],h=0;h<e.totalColumns;h++)s[h]=e.thumbWidth+2*e.borderSize,e.leftWidth>0&&h<e.leftWidth&&s[h]++;this.maxH=0;for(h=0;h<this.totalColumns;h++)this.columnHeights_ar[h]>this.maxH&&(this.maxH=this.columnHeights_ar[h]);for(h=0;h<this.totalLoadedThumbnails;h++)if(thumbnail=this.playlist_ar[h].thumbnail,!thumbnail.used_bl){thumbnail.used_bl=!0;var l=Math.round(thumbnail.originalWidth/this.thumbnailMaxWidth),r=Math.round(thumbnail.originalHeight/this.thumbnailMaxHeight);this.totalColumns<l&&(l=this.totalColumns),t=this.thumbsHOffset,a=this.maxH*(this.thumbHeight+this.thumbsVSpace+2*this.borderSize)+this.thumbsVOffset,i=-e.thumbsHSpace;for(n=0;n<l;n++)i+=s[n]+e.thumbsHSpace;o=(this.thumbHeight+this.thumbsVSpace+2*this.borderSize)*r-this.thumbsVSpace,thumbnail.finalX=t,thumbnail.finalY=a,thumbnail.finalW=i,thumbnail.finalH=o,thumbnail.resizeAndPosition(),this.maxH+=r;for(var n=0;n<l;n++)this.columnHeights_ar[n]=this.maxH}},this.setupNoSearch=function(){this.noSearch_do=new GAMLDATDisplayObject("div"),this.noSearch_do.setOverflow("visible"),this.noSearch_do.setDisplay("inline-block"),this.noSearch_do.getStyle().fontSmoothing="antialiased",this.noSearch_do.getStyle().webkitFontSmoothing="antialiased",this.noSearch_do.getStyle().textRendering="optimizeLegibility",this.noSearch_do.getStyle().whiteSpace="nowrap",this.noSearch_do.setBackfaceVisibility(),this.noSearch_do.getStyle().padding="",this.noSearch_do.getStyle().margin="",this.noSearch_do.screen.className=o.searchNotFoundClassName_str,this.noSearch_do.hasTransform3d_bl=!1,this.noSearch_do.hasTransform2d_bl=!1,this.noSearch_do.setAlpha(0),this.noSearch_do.setInnerHTML(o.searchNotFoundLabel_str),this.addChild(this.noSearch_do),setTimeout(function(){e.noSearch_do.w=e.noSearch_do.getWidth(),e.noSearch_do.h=e.noSearch_do.getHeight(),e.removeChild(e.noSearch_do)},70)},this.showNoSearch=function(){this.isNoSearchFoundShowed_bl||(this.isNoSearchFoundShowed_bl=!0,this.addChild(this.noSearch_do),this.positionNoSearchLabel(),GAMLDATMagicAnim.killTweensOf(this.noSearch_do),GAMLDATMagicAnim.to(this.noSearch_do,.1,{alpha:1,yoyo:!0,repeat:8}))},this.hideNoSearch=function(){this.isNoSearchFoundShowed_bl&&(this.isNoSearchFoundShowed_bl=!1,GAMLDATMagicAnim.killTweensOf(this.noSearch_do),GAMLDATMagicAnim.to(this.noSearch_do,.1,{alpha:0,onComplete:function(){e.removeChild(e.noSearch_do)}}))},this.positionNoSearchLabel=function(){this.isNoSearchFoundShowed_bl&&(this.noSearch_do.setX(parseInt((this.stageWidth-this.noSearch_do.w)/2)),s.menu_do.isShowed_bl&&this.centerWithMenu_bl?this.noSearch_do.setY(parseInt((this.totalHeight-s.menu_do.menuOffsetBottom-this.noSearch_do.h)/2)):this.noSearch_do.setY(parseInt((this.totalHeight-this.noSearch_do.h)/2)))},this.setupLoadMoreButton=function(){GAMMAGRIDMenuButton.setPrototype(),e.loadMoreButton_do=new GAMMAGRIDMenuButton(o.loadMoreButtonLabel_str,o.loadMoreButtonBackgroundNormalClassName_str,o.loadMoreButtonBackgroundSelectedClassName_str,o.loadMoreButtonTextNormalClassName_str,o.loadMoreButtonTextSeectedClassName_str),this.loadMoreButton_do.setLabel(o.loadMoreButtonLabel_str),this.loadMoreButton_do.getStyle().zIndex=20,this.loadMoreButton_do.addListener(GAMMAGRIDMenuButton.MOUSE_UP,this.loadMoreButtonOnMouseUpHandler),this.hideLoadMoreButton(),this.addChild(this.loadMoreButton_do)},this.loadMoreButtonOnMouseUpHandler=function(){e.hideLoadMoreButton(),e.loadMore()},this.hideLoadMoreButton=function(){this.loadMoreButton_do&&this.isLoadMoreButtonShowed_bl&&(this.isLoadMoreButtonShowed_bl=!1,this.loadMoreButton_do.setVisible(!1))},this.showLoadMoreButton=function(){this.loadMoreButton_do&&!this.isLoadMoreButtonShowed_bl&&(this.isLoadMoreButtonShowed_bl=!0,this.loadMoreButton_do.setVisible(!0),this.isMobile_bl||(this.loadMoreButton_do.setAlpha(0),GAMLDATMagicAnim.to(this.loadMoreButton_do,.6,{alpha:1})),this.positionLoadMoreButton())},this.hideOrShowLoadMoreButton=function(){e.allowToLoadMoreThumbnails()?e.showLoadMoreButton():e.hideLoadMoreButton()},this.positionLoadMoreButton=function(){this.isLoadMoreButtonShowed_bl&&this.loadMoreButton_do?(this.isMobile_bl||0==this.loadMoreButton_do.alpha?(this.loadMoreButton_do.setX(parseInt((this.stageWidth-this.loadMoreButton_do.w)/2)),this.loadMoreButton_do.setY(this.totalHeight+this.loadMoreButtonOffsetTop)):GAMLDATMagicAnim.to(this.loadMoreButton_do,.5,{x:parseInt((this.stageWidth-this.loadMoreButton_do.w)/2),y:parseInt(this.totalHeight+this.loadMoreButtonOffsetTop)}),this.offsetTotalHeight=this.loadMoreButtonOffsetTop+this.loadMoreButtonOffsetBottom+this.loadMoreButton_do.h):this.offsetTotalHeight=0},this.setupLoadMoreOnScroll=function(){t.addEventListener?t.addEventListener("scroll",this.onScrollHandler):t.attachEvent&&t.attachEvent("onscroll",this.onScrollHandler)},this.onScrollHandler=function(){e.loadInfinite(),e.totalLoadedThumbnails==e.totalThumbnails&&(t.removeEventListener?t.removeEventListener("scroll",this.onScrollHandler):t.detachEvent&&t.detachEvent("onscroll",this.onScrollHandler))},this.loadInfinite=function(){if(this.allowToLoadMoreThumbnails()){var t=this.playlist_ar[this.playlist_ar.length-1].thumbnail;clearTimeout(this.loadInifiniteId_to),this.loadInifiniteId_to=setTimeout(function(){t.getGlobalY()+t.finalH<GAMLDATUtils.getViewportSize().h&&e.loadMore()},500)}},this.init()};a.setPrototype=function(){a.prototype=new GAMLDATDisplayObject("div","relative")},a.OPEN_LIGHTBOX="openLightbox",a.CATEGORY_UPDATE="categoryUpdate",a.ERROR="error",a.prototype=null,t.GAMMAGRIDVerticalThumbnailsManager=a}(window);
!function(t){var e=function(i){var s=this;e.prototype;this.parent=i.parent,this.main_do,this.bk_do,this.border_do,this.imageHolder_do,this.image_do,this.contentHolder_do,this.text1_do,this.overlay_do,this.fakeBorder_do,this.button1_do,this.button2_do,this.icon_do,this.mySplitText,this.textHolder_do,this.presetType_str=i.presetType_str,this.backgroundColor_str=i.backgroundColor_str,this.borderNormalColor_str=i.borderNormalColor_str,this.borderSelectedColor_str=i.borderSelectedColor_str,this.htmlContent1_str=i.htmlContent1_str,this.htmlContent2_str=i.htmlContent2_str,this.htmlExtraContent_str=i.htmlExtraContent_str,this.overlayColor_str=i.thumbnailOverlayColor_str,this.extraButtonUrl_str=i.extraButtonUrl_str,this.extraButtonUrlTarget_str=i.extraButtonUrlTarget_str,this.iconPathN_str=i.thumbIconPathN_str,this.iconPathS_str=i.thumbIconPathS_str,this.linkIconPathN_str=i.linkIconPathN_str,this.linkIconPathS_str=i.linkIconPathS_str,this.hideAndShowTransitionType_str=i.hideAndShowTransitionType_str,this.prevAndShowTransitionType_str,this.textVerticalAlign_str=i.textVerticalAlign_str,this.imageTransitionDirection_str=i.imageTransitionDirection_str,this.thumbanilBoxShadow_str=i.thumbanilBoxShadow_str,this.animStartDir_str="top",this.textAnimType_str=i.textAnimType_str,this.alt_str=i.alt_str,this.linkUrl_str=i.linkUrl_str,this.linkTarget_str=i.linkTarget_str,this.catId=i.catId,this.id=i.id,this.contentOffest=i.contentOffsetY,this.buttonsOffest=i.buttonsOffest,this.borderSize=i.borderSize,this.lastBorderSize=this.borderSize,this.borderRadius=i.borderRadius,this.overlayOpacity=i.thumbnailOverlayOpacity,this.iconW=i.thumbnailIconWidth,this.iconH=i.thumbnailIconHeight,this.spaceBetweenThumbanilIcons=i.spaceBetweenThumbanilIcons,this.spaceBetweenTextAndIcons=i.spaceBetweenTextAndIcons,this.imageOriginalW,this.imageOriginalH,this.tempFinalX=-1,this.tempFinalY=-1,this.finalX=0,this.finalY=0,this.finalW=0,this.finalH=0,this.prevFinalX=0,this.prevFinalY=0,this.prevFinalW=0,this.prevFinalH=0,this.angleY=-180,this.text1H=0,this.text2H=0,this.addToHeight=0,this.finalHOffset=0,this.hOffset=0,this.showOrHideWithDelayId_to,this.isImageAnimCompleteId_to,this.resizeTextContent1Id_to,this.contentHideCompleteId_to,this.contentShowCompleteId_to,this.isVerticalType_bl=i.isVerticalType_bl,this.isCheckHitAdded_bl=!1,this.showIcon_bl=!0,this.hasButtons_bl=i.useIconButtons_bl,this.doNotOverwriteResizeContent_bl=!1,this.disableThumbnails_bl=i.disableThumbnails_bl,this.isImageAnimCompleteId_bl=!1,this.isLightboxDisabled_bl=i.isDisabled_bl,this.imageShowComplete_bl=!1,this.isContentHidden_bl=!0,this.hasImage_bl=!1,this.used_bl=!1,this.firstTimeLoad_bl=!0,this.isImageShowed_bl=!1,this.isFirstTimeShowed_bl=!0,this.isContentShowed_bl=!1,this.isHidden_bl=!1,this.hasExtraText_bl=Boolean(this.htmlExtraContent_str),this.isMobile_bl=GAMLDATUtils.isMobile,this.hasPointerEvent_bl=GAMLDATUtils.hasPointerEvent,this.init=function(){this.setupMainInstances()},this.setupMainInstances=function(){"3d"==this.presetType_str?(this.main3dContainer_do=new GAMMAGRIDDisplayObject3D("div"),this.main3dContainer_do.setOverflow("visible"),this.setOverflow("visible"),this.main3dContainer_do.setPerspective(1e3),this.main3dContainer_do.setPreserve3D(),!this.isVerticalType_bl||this.isLightboxDisabled_bl||this.disableThumbnails_bl||this.hasButtons_bl||this.main3dContainer_do.setButtonMode(!0),this.main_do=new GAMMAGRIDDisplayObject3D("div"),this.main_do.setBackfaceVisibility(),this.main3dContainer_do.addChild(this.main_do),this.addChild(this.main3dContainer_do)):(this.main_do=new GAMLDATDisplayObject("div"),this.addChild(this.main_do)),this.bk_do=new GAMLDATDisplayObject("div"),this.bk_do.setBkColor(this.backgroundColor_str),this.border_do=new GAMLDATDisplayObject("div"),!GAMLDATUtils.hasTransform2d||"scaletext"!=this.presetType_str&&"scaletextinverse"!=this.presetType_str?this.imageHolder_do=new GAMLDATDisplayObject("div"):this.imageHolder_do=new GAMLDATTransformDisplayObject("div"),this.image_do=new GAMLDATDisplayObject("img"),this.isLightboxDisabled_bl||this.disableThumbnails_bl||this.hasButtons_bl||(this.isVerticalType_bl&&this.border_do.setButtonMode(!0),this.isVerticalType_bl&&"curtain"==this.presetType_str&&this.imageHolder_do.setButtonMode(!0)),this.thumbanilBoxShadow_str&&this.setBorderBoxShadow(this.thumbanilBoxShadow_str),this.setupContent(),this.main_do.addChild(this.bk_do),this.main_do.addChild(this.border_do),0!=this.borderSize&&this.setBorderSize(this.borderSize),0!=this.borderRadius&&this.setBorderRadius(this.borderRadius),this.setBorderColor(this.borderNormalColor_str,this.borderSelectedColor_str)},this.addImage=function(t){this.imageOriginalW=t.width,this.imageOriginalH=t.height,this.hasImage_bl=!0,this.image_do.setScreen(t),t.setAttribute("alt",this.alt_str),this.main_do.setAlpha(0),this.addEvents()},this.resizeAndPosition=function(){if(this.finalX!=this.prevFinalX||this.finalY!=this.prevFinalY||this.finalW!=this.prevFinalW||this.finalH!=this.prevFinalH||this.prevBorderSize!=this.borderSize){this.prevBorderSize=this.borderSize,this.prevFinalX=this.finalX,this.prevFinalY=this.finalY,this.prevFinalW=this.finalW,this.prevFinalH=this.finalH,GAMLDATMagicAnim.killTweensOf(this);var t,e=this.finalW-2*this.borderSize,i=this.finalH-this.addToHeight-2*this.borderSize,o=e/s.imageOriginalW,n=i/s.imageOriginalH;t=o>=n?o:n;var a=parseInt(t*s.imageOriginalW)+1,h=parseInt(t*s.imageOriginalH)+1,r=Math.abs(Math.min(0,GAMMAGRID.globalY)),d=GAMMAGRID.globalY>0?GAMMAGRID.viewportHeight-GAMMAGRID.globalY:GAMMAGRID.viewportHeight;this.firstTimeLoad_bl||!s.isImageShowed_bl?(GAMLDATMagicAnim.killTweensOf(this.image_do),GAMLDATMagicAnim.killTweensOf(this.imageHolder_do),this.setX(this.finalX),this.setY(this.finalY),this.imageHolder_do.setX(e/2+this.borderSize),this.imageHolder_do.setY(i/2+this.borderSize),this.image_do.setWidth(a),this.image_do.setHeight(h),this.image_do.setX(-a/2),this.image_do.setY(-h/2),GAMLDATMagicAnim.to(this.main_do,.7,{alpha:1}),GAMLDATMagicAnim.to(this.imageHolder_do,.7,{x:this.borderSize,y:this.borderSize,w:e,h:i,delay:.2,ease:Quint.easeInOut}),GAMLDATMagicAnim.to(this.image_do,.7,{x:parseInt((e-a)/2),y:parseInt((i-h)/2),delay:.2,ease:Quint.easeInOut}),this.hasExtraText_bl&&GAMLDATMagicAnim.to(this.text3_do,.7,{alpha:1,delay:.5}),this.isImageAnimCompleteId_to=setTimeout(function(){s.isImageAnimCompleteId_bl=!0,"media"==s.presetType_str?s.text1_do&&s.text2_do&&(GAMLDATUtils.hitTest(s.screen,s.parent.globalX,s.parent.globalY)&&!s.isMobile_bl?("bottom"==s.textVerticalAlign_str?s.text2_do.setY(s.finalH+s.text1H-2*s.borderSize+s.contentOffest):s.text2_do.setY(-s.text1H-s.text2H+s.contentOffest),s.showContent(),s.startToCheckThumbnailHit()):(GAMLDATMagicAnim.killTweensOf(s.text1_do),"bottom"==s.textVerticalAlign_str?GAMLDATMagicAnim.to(s.text1_do,.7,{y:s.finalH-s.text1H-2*s.borderSize+s.contentOffest,ease:Expo.easeInOut}):GAMLDATMagicAnim.to(s.text1_do,.7,{y:s.contentOffest,ease:Expo.easeInOut}))):"media2"==s.presetType_str?GAMLDATUtils.hitTest(s.screen,s.parent.globalX,s.parent.globalY)&&!s.isMobile_bl&&(s.isContentShowed_bl=!1,s.showContent(),s.startToCheckThumbnailHit()):"scaletextinverse"==s.presetType_str?GAMLDATUtils.hitTest(s.screen,s.parent.globalX,s.parent.globalY)?(s.isContentShowed_bl=!1,s.showContent(),s.startToCheckThumbnailHit()):(s.isContentShowed_bl=!0,s.hideContent(),s.stopToCheckThumbnailHit()):s.isMobile_bl||s.disableThumbnails_bl||GAMLDATUtils.hitTest(s.screen,s.parent.globalX,s.parent.globalY)&&(s.showContent(),s.startToCheckThumbnailHit())},800),this.imageHolder_do.addChild(this.image_do),"curtain"==this.presetType_str||"3d"==this.presetType_str?this.main_do.addChild(this.imageHolder_do):this.main_do.addChildAt(this.imageHolder_do,1),this.isImageShowed_bl=!0,this.firstTimeLoad_bl=!1):(this.w==this.finalW&&this.h==this.finalH&&this.finalHOffset==this.hOffset&&this.lastBorderSize==this.borderSize||(GAMLDATMagicAnim.killTweensOf(this.image_do),GAMLDATMagicAnim.killTweensOf(this.imageHolder_do),this.imageHolder_do.setX(this.borderSize),this.imageHolder_do.setY(this.borderSize),this.imageHolder_do.setWidth(e),this.imageHolder_do.setHeight(i),this.image_do.setX(parseInt((e-a)/2)),this.image_do.setY(parseInt((i-h)/2))),this.isMobile_bl||this.isHidden_bl||(!(s.finalY+s.finalH>r||s.y+s.finalH>r)||!(s.finalY-r<d||s.y-r<d))&&this.isVerticalType_bl?(this.setX(this.finalX),this.setY(this.finalY)):GAMLDATUtils.hasTransform2d?"scale"==this.hideAndShowTransitionType_str?GAMLDATMagicAnim.to(this,.7,{x:this.finalX,y:this.finalY,scale:1,alpha:1,ease:Quart.easeOut}):"opacity"==this.hideAndShowTransitionType_str?GAMLDATMagicAnim.to(this,.7,{x:this.finalX,y:this.finalY,alpha:1,ease:Quart.easeOut}):"rotation"==this.hideAndShowTransitionType_str&&GAMLDATMagicAnim.to(this,.7,{x:this.finalX,y:this.finalY,rotation:0,scale:1,ease:Quart.easeOut}):GAMLDATMagicAnim.to(this,.7,{x:this.finalX,y:this.finalY,alpha:1,ease:Quart.easeOut}),this.isFirstTimeShowed_bl=!1,"scaletextinverse"!=s.presetType_str&&clearTimeout(this.isImageAnimCompleteId_to),this.isImageAnimCompleteId_bl=!0),this.w==this.finalW&&this.h==this.finalH&&this.finalHOffset==this.hOffset&&this.lastBorderSize==this.borderSize||(this.setWidth(this.finalW),this.setHeight(this.finalH),this.main_do.setWidth(this.finalW),this.main_do.setHeight(this.finalH+this.addToHeight),this.bk_do.setX(this.borderSize),this.bk_do.setY(this.borderSize),this.bk_do.setWidth(e),this.bk_do.setHeight(i+this.addToHeight),this.border_do.setWidth(e),this.border_do.setHeight(i+this.addToHeight),this.main3dContainer_do&&(this.main3dContainer_do.setWidth(this.finalW),this.main3dContainer_do.setHeight(this.finalH)),this.image_do.setWidth(a),this.image_do.setHeight(h),this.hasExtraText_bl&&(this.textHolder_do.setX(this.borderSize),this.textHolder_do.setWidth(this.finalW-2*this.borderSize),this.textHolder_do.setY(this.finalH-this.addToHeight-this.borderSize)),this.stopToCheckThumbnailHit()),"media"!=this.presetType_str&&"media2"!=this.presetType_str&&"scaletextinverse"!=this.presetType_str||this.resizeContent(),this.hOffset=this.finalHOffset,this.lastBorderSize=this.borderSize}},this.setupContent=function(){if("movetext"==this.presetType_str||"preset2"==this.presetType_str||"curtain"==this.presetType_str||"3d"==this.presetType_str||"scaletext"==this.presetType_str||"scaletextinverse"==this.presetType_str||"animtext"==this.presetType_str){if("3d"==this.presetType_str?this.contentHolder_do=new GAMMAGRIDDisplayObject3D("div"):this.contentHolder_do=new GAMLDATDisplayObject("div"),this.contentHolder_do.setX(-1e3),this.overlay_do=new GAMLDATDisplayObject("div"),this.overlay_do.getStyle().width="100%",this.overlay_do.getStyle().height="100%",this.overlay_do.setBackfaceVisibility(!0),this.setOverlayColor(this.overlayColor_str),this.overlay_do.setAlpha(this.overlayOpacity),"scaletext"!=this.presetType_str&&"scaletextinverse"!=this.presetType_str||!GAMLDATUtils.hasTransform2d?this.text1_do=new GAMLDATDisplayObject("div",null,"visible"):this.text1_do=new GAMLDATTransformDisplayObject("div",null,"visible"),this.text1_do.getStyle().width="100%",this.text1_do.getStyle().fontSmoothing="antialiased",this.text1_do.getStyle().webkitFontSmoothing="antialiased",this.text1_do.getStyle().textRendering="optimizeLegibility",this.text1_do.setY(-500),this.htmlContent1_str&&this.text1_do.setInnerHTML(this.htmlContent1_str),this.contentHolder_do.addChild(this.overlay_do),this.contentHolder_do.addChild(this.text1_do),"curtain"==this.presetType_str)this.fakeBorder_do=new GAMLDATDisplayObject("div"),this.fakeBorder_do.setBkColor(this.borderNormalColor_str);else if("preset2"==this.presetType_str)this.isContentHidden_bl=!0,this.contentHolder_do.setX(-1e3);else if("animtext"==this.presetType_str&&(this.isContentHidden_bl=!0,this.contentHolder_do.setX(-1e3),this.overlay_do.setAlpha(0),this.htmlContent1_str)){this.text1_do.screen.setAttribute("id","GAMMAGRID_at"+s.id);for(var t,e=GAMLDATUtils.getChildren(this.text1_do.screen.firstChild),i=0;i<e.length;i++)t=e[i],GAMLDATMagicAnim.killTweensOf(t),"scale"==this.textAnimType_str||"scalerandom"==this.textAnimType_str?GAMLDATMagicAnim.to(t,0,{css:{scale:0}}):"largescale"==this.textAnimType_str?GAMLDATMagicAnim.to(t,0,{css:{opacity:0,scale:3}}):"opacity"==this.textAnimType_str&&GAMLDATMagicAnim.to(t,0,{css:{opacity:0}})}}else"preset30"==this.presetType_str?(this.contentHolder_do=new GAMLDATDisplayObject("div"),this.border_do.setButtonMode(!1),this.hasButtons_bl=!0):"media"==this.presetType_str?(this.contentHolder_do=new GAMLDATDisplayObject("div"),!this.isLightboxDisabled_bl&&this.isVerticalType_bl&&this.border_do.setButtonMode(!0),GAMLDATUtils.hasTransform2d?(this.text1_do=new GAMLDATTransformDisplayObject("div"),this.text2_do=new GAMLDATTransformDisplayObject("div")):(this.text1_do=new GAMLDATDisplayObject("div"),this.text2_do=new GAMLDATDisplayObject("div")),this.htmlContent1_str&&(this.text1_do.setY(-500),this.text1_do.getStyle().width="100%",this.text1_do.getStyle().fontSmoothing="antialiased",this.text1_do.getStyle().webkitFontSmoothing="antialiased",this.text1_do.getStyle().textRendering="optimizeLegibility",this.text1_do.setInnerHTML(this.htmlContent1_str)),this.htmlContent1_str&&this.htmlContent2_str&&(this.text2_do.setY(-500),this.text2_do.getStyle().width="100%",this.text2_do.getStyle().fontSmoothing="antialiased",this.text2_do.getStyle().webkitFontSmoothing="antialiased",this.text2_do.getStyle().textRendering="optimizeLegibility",this.text2_do.setInnerHTML(this.htmlContent2_str)),this.contentHolder_do.addChild(this.text1_do),this.contentHolder_do.addChild(this.text2_do),this.border_do.addChild(this.contentHolder_do)):"media2"==this.presetType_str&&(this.contentHolder_do=new GAMLDATDisplayObject("div"),GAMLDATUtils.hasTransform2d?this.text1_do=new GAMLDATTransformDisplayObject("div"):this.text1_do=new GAMLDATDisplayObject("div"),this.htmlContent1_str&&(this.text1_do.setY(-400),this.text1_do.getStyle().width="100%",this.text1_do.getStyle().fontSmoothing="antialiased",this.text1_do.getStyle().webkitFontSmoothing="antialiased",this.text1_do.getStyle().textRendering="optimizeLegibility",this.text1_do.setInnerHTML(this.htmlContent1_str)),this.overlay_do=new GAMLDATDisplayObject("div"),this.overlay_do.getStyle().width="100%",this.overlay_do.getStyle().height="100%",this.setOverlayColor(this.overlayColor_str),this.overlay_do.setAlpha(0),this.contentHolder_do.addChild(this.overlay_do),setTimeout(function(){s.contentHolder_do.addChild(s.text1_do)},50));this.hasButtons_bl&&(this.isLightboxDisabled_bl||(GAMMAGRIDSimpleSizeButton.setPrototype(),this.button1_do=new GAMMAGRIDSimpleSizeButton(this.iconPathN_str,this.iconPathS_str,this.iconW,this.iconH),this.button1_do.setX(-200),this.button1_do.addListener(GAMMAGRIDSimpleSizeButton.CLICK,this.btn1ClickHandler),this.extraButtonUrl_str&&(GAMMAGRIDSimpleSizeButton.setPrototype(),this.button2_do=new GAMMAGRIDSimpleSizeButton(this.linkIconPathN_str,this.linkIconPathS_str,this.iconW,this.iconH),this.contentHolder_do.addChild(this.button2_do),this.button2_do.setX(-200),this.button2_do.addListener(GAMMAGRIDSimpleSizeButton.CLICK,this.btn2ClickHandler)),this.contentHolder_do.addChild(this.button1_do))),"scaletextinverse"!=s.presetType_str&&"scaletext"!=s.presetType_str||(this.overlay_do.setAlpha(0),this.text1_do.setAlpha(0)),this.setupExtraText()},this.btn1ClickHandler=function(t){s.dispatchEvent(e.MOUSE_UP,{id:s.id,extraButton:!1})},this.btn2ClickHandler=function(t){s.dispatchEvent(e.MOUSE_UP,{id:s.id,extraButton:!0})},this.resizeContent=function(){var t,e=0,i=0,o=0,n=0;this.contentHolder_do.setWidth(this.finalW-2*this.borderSize),this.contentHolder_do.setHeight(this.finalH-this.addToHeight-2*this.borderSize),clearTimeout(this.resizeTextContent1Id_to),"media"==this.presetType_str&&this.text1_do?this.resizeTextContent1Id_to=setTimeout(function(){s.text1H=s.text1_do.getHeight(),s.text2_do&&(s.text2H=s.text2_do.getHeight()),s.isImageAnimCompleteId_bl?"bottom"==s.textVerticalAlign_str?(e=Math.max(Math.round(s.finalH-s.addToHeight-2*s.borderSize-s.text1H+s.contentOffest),0),i=s.finalH-s.addToHeight-2*s.borderSize+s.contentOffest):(e=s.contentOffest,i=-s.text2H+s.contentOffest):"bottom"==s.textVerticalAlign_str?(e=Math.round(s.finalH-s.addToHeight-2*s.borderSize),i=s.finalH-s.addToHeight-2*s.borderSize+s.contentOffest):(e=-s.text1H+s.contentOffest,i=-s.text2H+s.contentOffest),GAMLDATMagicAnim.killTweensOf(s.text1_do),s.text1_do.setY(e),s.text2_do&&(GAMLDATMagicAnim.killTweensOf(s.text2_do),s.text2_do.setY(i))},50):"media2"==this.presetType_str&&this.text1_do?this.resizeTextContent1Id_to=setTimeout(function(){s.text1H=s.text1_do.getHeight(),e="bottom"==s.textVerticalAlign_str?Math.round(s.finalH-s.addToHeight):-s.text1H,GAMLDATMagicAnim.killTweensOf(s.text1_do),0!=e&&s.text1_do.setY(e)},50):"movetext"!=this.presetType_str&&"preset2"!=this.presetType_str&&"3d"!=this.presetType_str&&"curtain"!=this.presetType_str&&"scaletext"!=this.presetType_str&&"scaletextinverse"!=this.presetType_str&&"animtext"!=this.presetType_str||(this.button1_do&&(n=this.button2_do?this.iconW+this.spaceBetweenThumbanilIcons:0,o=parseInt((this.iconH+this.spaceBetweenTextAndIcons)/2)),this.resizeTextContent1Id_to=setTimeout(function(){t=s.text1_do.getHeight(),s.htmlContent1_str?"center"==s.textVerticalAlign_str?s.text1Y=Math.max(Math.round((s.finalH-s.addToHeight-2*s.borderSize-t)/2)+s.contentOffest,0)-o:"bottom"==s.textVerticalAlign_str?s.text1Y=Math.max(Math.round(s.finalH-s.addToHeight-2*s.borderSize-t)+s.contentOffest,0):"top"==s.textVerticalAlign_str&&(s.text1Y=+s.contentOffest):(s.text1Y=0,t=0,s.spaceBetweenTextAndIcons=0),s.text1Y<0&&(s.text1Y=0),s.button1_do&&(s.button1X=parseInt((s.finalW-s.iconW-n)/2-s.borderSize),s.button2X=s.button1X+s.iconW+s.spaceBetweenThumbanilIcons,"center"==s.textVerticalAlign_str?s.htmlContent1_str?s.buttonY=s.text1Y+t+s.spaceBetweenTextAndIcons+s.contentOffest+s.buttonsOffest:s.buttonY=Math.round((s.finalH-s.addToHeight-s.iconH-2*s.borderSize)/2)+s.buttonsOffest:"bottom"==s.textVerticalAlign_str?s.htmlContent1_str?s.buttonY=s.text1Y-s.iconH-s.spaceBetweenTextAndIcons+s.buttonsOffest:s.buttonY=s.finalH-s.addToHeight-s.iconH-2*s.borderSize+s.buttonsOffest:"top"==s.textVerticalAlign_str&&(s.buttonY=s.text1Y+t+s.spaceBetweenTextAndIcons+s.buttonsOffest),s.buttonY<0?s.buttonY=0:s.buttonY>s.finalH-s.addToHeight-s.iconH-2*s.borderSize&&(s.buttonY=s.finalH-s.addToHeight-s.iconH-2*s.borderSize),"movetext"!=s.presetType_str&&(s.button1_do.setX(s.button1X),s.button1_do.setY(s.buttonY),s.button2_do&&(s.button2_do.setX(s.button2X),s.button2_do.setY(s.buttonY)))),"movetext"==s.presetType_str&&s.hasButtons_bl||s.text1_do.setY(s.text1Y),"scaletextinverse"==s.presetType_str&&GAMLDATUtils.hasTransform2d},50))},this.setupExtraText=function(){this.hasExtraText_bl&&(this.textHolder_do=new GAMLDATDisplayObject("div"),this.textHolder_do.setX(this.borderSize),this.textHolder_do.getStyle().height="100%",this.addChild(this.textHolder_do),this.text3_do=new GAMLDATDisplayObject("div"),this.text3_do.getStyle().width="100%",this.text3_do.getStyle().fontSmoothing="antialiased",this.text3_do.getStyle().webkitFontSmoothing="antialiased",this.text3_do.getStyle().textRendering="optimizeLegibility",this.text3_do.setInnerHTML(this.htmlExtraContent_str),this.text3_do.setAlpha(0),this.hasButtons_bl||this.text3_do.setButtonMode(!0),this.textHolder_do.addChild(this.text3_do))},this.addEvents=function(){this.screen.addEventListener?this.isMobile_bl?this.hasPointerEvent_bl?this.screen.addEventListener("pointerdown",this.onMouseUp):this.screen.addEventListener("click",this.onMouseUp):(this.screen.addEventListener("mouseover",this.onMouseOver),this.screen.addEventListener("click",this.onMouseUp)):this.screen.attachEvent&&(this.screen.attachEvent("onmouseover",this.onMouseOver),this.screen.attachEvent("onclick",this.onMouseUp))},s.onMouseOver=function(t){s.isContentShowed_bl||s.disableThumbnails_bl||("curtain"!=s.presetType_str&&"3d"!=s.presetType_str&&"animtext"!=s.presetType_str&&"movetext"!=s.presetType_str&&"preset2"!=s.presetType_str&&"scaletext"!=s.presetType_str||s.isImageAnimCompleteId_bl)&&("preset2"!=s.presetType_str||s.htmlContent1_str)&&("3d"==s.presetType_str&&s.isLightboxDisabled_bl&&!s.htmlContent1_str||(t&&s.getInOrOutAngle(t),s.showContent(),s.startToCheckThumbnailHit()))},s.onMouseUp=function(t){2==t.button||s.disableThumbnails_bl||(s.isContentShowed_bl||!s.isMobile_bl?s.button1_do||s.isLightboxDisabled_bl||s.dispatchEvent(e.MOUSE_UP,{id:s.id}):s.onMouseOver())},this.startToCheckThumbnailHit=function(){this.isCheckHitAdded_bl||(this.isCheckHitAdded_bl=!0,s.isMobile_bl?setTimeout(function(){GAMLDATUtils.isIOS?s.hitThhumbnailId_to=t.addEventListener("touchstart",s.checkThumbnailHit):s.hitThhumbnailId_to=t.addEventListener("click",s.checkThumbnailHit)},50):t.addEventListener?t.addEventListener("mousemove",s.checkThumbnailHit):document.attachEvent("onmousemove",s.checkThumbnailHit))},this.stopToCheckThumbnailHit=function(){s.isCheckHitAdded_bl&&(s.isCheckHitAdded_bl=!1,s.isMobile_bl?GAMLDATUtils.isIOS?s.hitThhumbnailId_to=t.removeEventListener("touchstart",s.checkThumbnailHit):s.hitThhumbnailId_to=t.removeEventListener("click",s.checkThumbnailHit):t.removeEventListener?t.removeEventListener("mousemove",s.checkThumbnailHit):document.detachEvent("onmousemove",s.checkThumbnailHit),clearTimeout(s.hitThhumbnailId_to),s.hideContent(!0))},this.checkThumbnailHit=function(t){var e=GAMLDATUtils.getViewportMouseCoordinates(t);if(!GAMLDATUtils.hitTest(s.screen,e.screenX,e.screenY))return"3d"!=s.presetType_str&&s.getInOrOutAngle(t),void s.stopToCheckThumbnailHit()},this.showContent=function(){if(!this.isContentShowed_bl&&!this.isHidden_bl){var t,e,i,o,n,a,h,r,d=0,l=0,_=0,A=0,c=0,b=0,m=.6;if("animtext"==this.presetType_str)o=.7,m=.7,r=Circ.easeOut,clearTimeout(this.showOrHideWithDelayId_to),this.showOrHideWithDelayId_to=setTimeout(function(){if(s.isContentHidden_bl){if(s.contentHolder_do.setX(0),s.htmlContent1_str){t=GAMLDATUtils.getChildren(s.text1_do.screen.firstChild);for(var i=0;i<t.length;i++)e=t[i],"scale"==s.textAnimType_str?(GAMLDATMagicAnim.to(e,1.2,{css:{scale:1},delay:d,ease:Elastic.easeOut}),d+=.035):"scalerandom"==s.textAnimType_str?GAMLDATMagicAnim.to(e,1.2,{css:{scale:1},delay:.8*Math.random(),ease:Elastic.easeOut}):"largescale"==s.textAnimType_str?GAMLDATMagicAnim.to(e,.6,{css:{opacity:1,scale:1},delay:.5*Math.random(),ease:Expo.easeInOut}):"opacity"==s.textAnimType_str&&(GAMLDATMagicAnim.to(e,.8,{css:{opacity:1},delay:d}),d+=.03)}GAMLDATMagicAnim.to(s.overlay_do,o,{alpha:s.overlayOpacity,ease:Quint.easeOut})}},51),this.button1_do&&(GAMLDATUtils.hasTransform2d?(this.button1_do.setScale2(0),this.button1_do.setAlpha(0),GAMLDATMagicAnim.to(this.button1_do,o+.4,{alpha:1,scale:1,delay:.1,ease:Elastic.easeOut}),this.button2_do&&(this.button2_do.setScale2(0),this.button2_do.setAlpha(0),GAMLDATMagicAnim.to(this.button2_do,o+.4,{alpha:1,scale:1,delay:.2,ease:Elastic.easeOut}))):(this.button1_do.setAlpha(0),GAMLDATMagicAnim.to(this.button1_do,o,{alpha:1,delay:.2,ease:Expo.easeInOut}),this.button2_do&&(this.button2_do.setAlpha(0),GAMLDATMagicAnim.to(this.button2_do,o,{alpha:1,delay:.3,ease:Expo.easeInOut})))),this.border_do.addChild(this.contentHolder_do),this.resizeContent();else if("media2"==this.presetType_str){if(!s.isImageAnimCompleteId_bl)return;o=.7,m=.7,r=Circ.easeOut,this.isContentHidden_bl&&(s.contentHolder_do.setX(0),this.overlay_do.setAlpha(0),this.button1_do&&(n=this.button2_do?this.iconW+this.spaceBetweenThumbanilIcons:0,h=(a=parseInt((this.finalW-this.iconW-n)/2)-this.borderSize)+this.iconW+this.spaceBetweenThumbanilIcons,this.button1_do.setX(a),"bottom"==s.textVerticalAlign_str?this.button1_do.setY(this.finalH-2*this.borderSize):this.button1_do.setY(s.borderSize),this.button1_do.setAlpha(0)),this.button2_do&&(this.button2_do.setX(h),"bottom"==s.textVerticalAlign_str?this.button2_do.setY(this.finalH-2*this.borderSize):this.button2_do.setY(s.borderSize),this.button2_do.setAlpha(0)),this.isContentHidden_bl=!1),this.border_do.addChildAt(this.contentHolder_do,0),this.resizeContent(),clearTimeout(this.showOrHideWithDelayId_to),this.showOrHideWithDelayId_to=setTimeout(function(){i=s.text1_do.getHeight();var t,e,n;GAMLDATMagicAnim.killTweensOf(s.overlay_do),GAMLDATMagicAnim.killTweensOf(s.text1_do),GAMLDATMagicAnim.killTweensOf(s.imageHolder_do),GAMLDATMagicAnim.to(s.overlay_do,o-.051,{alpha:s.overlayOpacity,ease:Quint.easeOut}),"bottom"==s.textVerticalAlign_str?(n=s.finalH-i-2*s.borderSize,e=parseInt(-i/2)+s.borderSize,t=parseInt((s.finalH-i-s.iconH)/2)-s.borderSize):(n=0,e=parseInt(i/2)+s.borderSize,t=parseInt((s.finalH+i-s.iconH)/2)-s.borderSize),GAMLDATMagicAnim.to(s.text1_do,o-.151,{y:n,ease:Quint.easeInOut}),GAMLDATMagicAnim.to(s.imageHolder_do,o-.151,{y:e,ease:Quint.easeInOut}),s.button1_do&&(GAMLDATMagicAnim.killTweensOf(s.button1_do),GAMLDATMagicAnim.to(s.button1_do,o-.151,{y:t,alpha:1,delay:.05,ease:Quint.easeInOut})),s.button2_do&&(GAMLDATMagicAnim.killTweensOf(s.button2_do),GAMLDATMagicAnim.to(s.button2_do,o-.151,{y:t,alpha:1,delay:.1,ease:Quint.easeInOut}))},51)}else if("media"==this.presetType_str){if(!s.isImageAnimCompleteId_bl)return;o=.7,m=.7,r=Circ.easeOut,s.contentHolder_do.setX(0),this.icon_do&&GAMLDATMagicAnim.to(this.icon_do,o,{alpha:1,ease:Expo.easeInOut}),this.text1_do&&this.text2_do&&("bottom"==s.textVerticalAlign_str?(GAMLDATMagicAnim.to(this.text1_do,o,{y:this.finalH-2*this.borderSize-this.text1H-this.text2H,ease:Expo.easeInOut}),GAMLDATMagicAnim.to(this.text2_do,o,{y:this.finalH-2*this.borderSize-this.text2H,ease:Expo.easeInOut})):(GAMLDATMagicAnim.to(this.text1_do,o,{y:this.text2H,ease:Expo.easeInOut}),GAMLDATMagicAnim.to(this.text2_do,o,{y:0,ease:Expo.easeInOut})))}else if("scaletextinverse"==this.presetType_str){if(!this.isImageAnimCompleteId_bl)return;o=.7,m=.7,r=Circ.easeOut,A=0,c=0,d=.1,b=0,this.contentHolder_do.setX(0),this.isContentHidden_bl=!1,GAMLDATUtils.hasTransform2d&&(GAMLDATMagicAnim.killTweensOf(this.imageHolder_do),GAMLDATMagicAnim.to(this.imageHolder_do,o,{scale:1,rotation:0,ease:Expo.easeInOut})),GAMLDATMagicAnim.killTweensOf(this.overlay_do),GAMLDATMagicAnim.to(this.overlay_do,o,{alpha:b,delay:d,ease:Quint.easeOut}),GAMLDATMagicAnim.killTweensOf(this.text1_do),GAMLDATUtils.hasTransform2d?GAMLDATMagicAnim.to(this.text1_do,o,{scale:c,alpha:A,ease:Expo.easeInOut}):GAMLDATMagicAnim.to(this.text1_do,o,{alpha:A,ease:Expo.easeInOut}),this.border_do.addChild(this.contentHolder_do)}else if("scaletext"==this.presetType_str){if(!this.isImageAnimCompleteId_bl)return;o=.7,m=.7,r=Circ.easeOut,A=1,c=1,d=.1,b=this.overlayOpacity,this.contentHolder_do.setX(0),GAMLDATUtils.hasTransform2d&&(GAMLDATMagicAnim.killTweensOf(this.imageHolder_do),GAMLDATMagicAnim.to(this.imageHolder_do,o,{scale:1.4,rotation:parseInt(20*Math.random()-10),ease:Expo.easeInOut})),this.isContentHidden_bl=!1,this.button1_do&&(GAMLDATUtils.hasTransform2d?(this.button1_do.setScale2(0),this.button1_do.setAlpha(0),GAMLDATMagicAnim.to(this.button1_do,o,{alpha:1,scale:1,delay:.2,ease:Expo.easeInOut}),this.button2_do&&(this.button2_do.setScale2(0),this.button2_do.setAlpha(0),GAMLDATMagicAnim.to(this.button2_do,o,{alpha:1,scale:1,delay:.3,ease:Expo.easeInOut}))):(this.button1_do.setAlpha(0),GAMLDATMagicAnim.to(this.button1_do,o,{alpha:1,delay:.2,ease:Expo.easeInOut}),this.button2_do&&(this.button2_do.setAlpha(0),GAMLDATMagicAnim.to(this.button2_do,o,{alpha:1,delay:.3,ease:Expo.easeInOut})))),GAMLDATMagicAnim.killTweensOf(this.overlay_do),GAMLDATMagicAnim.to(this.overlay_do,o,{alpha:b,delay:d,ease:Quint.easeOut}),GAMLDATMagicAnim.killTweensOf(this.text1_do),GAMLDATUtils.hasTransform2d?GAMLDATMagicAnim.to(this.text1_do,o,{scale:c,alpha:A,ease:Expo.easeInOut}):GAMLDATMagicAnim.to(this.text1_do,o,{alpha:A,ease:Expo.easeInOut}),this.border_do.addChild(this.contentHolder_do),this.resizeContent()}else if("movetext"==this.presetType_str)o=.7,m=.7,r=Circ.easeOut,this.border_do.addChild(this.contentHolder_do),this.resizeContent(),this.hasButtons_bl?(clearTimeout(this.showOrHideWithDelayId_to),this.showOrHideWithDelayId_to=setTimeout(function(){s.isContentHidden_bl&&(s.contentHolder_do.setX(0),"top"==s.animStartDir_str?(s.overlay_do.setX(0),s.overlay_do.setY(-s.finalH+2*s.borderSize),s.text1_do.setX(0),s.text1_do.setY(-s.finalH+2*s.borderSize),s.button1_do&&(s.button1_do.setX(s.button1X),s.button1_do.setY(-s.iconH),s.button1_do.setAlpha(0)),s.button2_do&&(s.button2_do.setX(s.button2X),s.button2_do.setY(-s.iconH),s.button2_do.setAlpha(0)),l=0,_=.05):"right"==s.animStartDir_str?(s.overlay_do.setY(0),s.overlay_do.setX(s.finalW-2*s.borderSize),s.text1_do.setX(s.finalW-2*s.borderSize),s.text1_do.setY(s.text1Y),s.button1_do&&(s.button1_do.setX(s.finalW-2*s.borderSize),s.button1_do.setY(s.buttonY),s.button1_do.setAlpha(0)),s.button2_do&&(s.button2_do.setX(s.finalW+s.iconW-2*s.borderSize),s.button2_do.setY(s.buttonY),s.button2_do.setAlpha(0)),l=0,_=.05):"bottom"==s.animStartDir_str?(s.overlay_do.setX(0),s.overlay_do.setY(s.finalH-2*s.borderSize),s.text1_do.setX(0),s.text1_do.setY(s.finalH-2*s.borderSize),s.button1_do&&(s.button1_do.setX(s.button1X),s.button1_do.setY(s.finalH-2*s.borderSize),s.button1_do.setAlpha(0)),s.button2_do&&(s.button2_do.setX(s.button2X),s.button2_do.setY(s.finalH-2*s.borderSize),s.button2_do.setAlpha(0)),l=0,_=.05):"left"==s.animStartDir_str&&(s.overlay_do.setX(-s.finalW+2*s.borderSize),s.overlay_do.setY(0),s.text1_do.setX(-s.finalW+2*s.borderSize),s.text1_do.setY(s.text1Y),s.button1_do&&(GAMLDATMagicAnim.killTweensOf(s.button1_do),s.button2_do?s.button1_do.setX(2*-s.iconW-s.spaceBetweenThumbanilIcons):s.button1_do.setX(-s.iconW),s.button1_do.setY(s.buttonY),s.button1_do.setAlpha(0)),s.button2_do&&(GAMLDATMagicAnim.killTweensOf(s.button2_do),s.button2_do.setX(-s.iconW),s.button2_do.setY(s.buttonY),s.button2_do.setAlpha(0),l=.05),_=0)),GAMLDATMagicAnim.killTweensOf(s.contentHolder_do),GAMLDATMagicAnim.to(s.overlay_do,.4,{x:0,y:0}),GAMLDATMagicAnim.killTweensOf(s.text1_do),GAMLDATMagicAnim.to(s.text1_do,.4,{x:0,y:s.text1Y}),s.button1_do&&GAMLDATMagicAnim.to(s.button1_do,.7,{x:s.button1X,y:s.buttonY,alpha:1,delay:l,ease:Expo.easeInOut}),s.button2_do&&GAMLDATMagicAnim.to(s.button2_do,.7,{x:s.button2X,y:s.buttonY,alpha:1,delay:_,ease:Expo.easeInOut}),s.isContentHidden_bl=!1},51)):(o=.4,this.isContentHidden_bl&&("top"==this.animStartDir_str?(this.contentHolder_do.setX(0),this.contentHolder_do.setY(-this.finalH+2*this.borderSize)):"right"==this.animStartDir_str?(this.contentHolder_do.setX(this.finalW-2*this.borderSize),this.contentHolder_do.setY(0)):"bottom"==this.animStartDir_str?(this.contentHolder_do.setX(0),this.contentHolder_do.setY(this.finalH-2*this.borderSize)):"left"==this.animStartDir_str&&(this.contentHolder_do.setX(-this.finalW+2*this.borderSize),this.contentHolder_do.setY(0))),this.isContentHidden_bl=!1,GAMLDATMagicAnim.killTweensOf(this.contentHolder_do),GAMLDATMagicAnim.to(this.contentHolder_do,o,{x:0,y:0}));else if("curtain"==this.presetType_str){var T=this.borderSize,u=this.borderSize;o=.7,m=.7,r=Circ.easeOut,s.contentHolder_do.setX(0),"top"==this.imageTransitionDirection_str?(u=-this.finalH+3*this.borderSize-1,this.fakeBorder_do.setWidth(this.finalW),this.fakeBorder_do.setHeight(this.borderSize)):"right"==this.imageTransitionDirection_str?(T=this.finalW-this.borderSize,this.fakeBorder_do.setX(this.finalW-this.borderSize),this.fakeBorder_do.setWidth(this.borderSize),this.fakeBorder_do.setHeight(this.finalH)):"bottom"==this.imageTransitionDirection_str?(u=this.finalH-this.borderSize,this.fakeBorder_do.setY(this.finalH-this.borderSize),this.fakeBorder_do.setWidth(this.finalW),this.fakeBorder_do.setHeight(this.borderSize)):"left"==this.imageTransitionDirection_str&&(T=-this.finalW+3*this.borderSize,this.fakeBorder_do.setWidth(this.borderSize),this.fakeBorder_do.setHeight(this.finalH)),this.addChild(this.fakeBorder_do),this.border_do.addChild(this.contentHolder_do),this.resizeContent(),0!=this.borderSize&&GAMLDATMagicAnim.to(this.fakeBorder_do.screen,m,{css:{backgroundColor:this.borderSelectedColor_str},ease:r}),GAMLDATMagicAnim.to(this.imageHolder_do,o,{x:T,y:u,ease:Expo.easeInOut})}else"3d"==this.presetType_str&&(o=.8,m=.8,r=Circ.easeOut,this.isVerticalType_bl?this.parent.addChild(this):this.parent.thumbnailsHolder_do.addChild(this),this.border_do.addChild(this.contentHolder_do),this.resizeContent(),this.isContentHidden_bl&&(this.prevAnimStartDir_str=this.animStartDir_str,"top"==this.animStartDir_str?(this.angleX=-180,this.angleY=0,this.contentHolder_do.setAngleX(180),this.contentHolder_do.setAngleY(0)):"right"==this.animStartDir_str?(this.angleX=0,this.angleY=-180,this.contentHolder_do.setAngleX(0),this.contentHolder_do.setAngleY(180)):"bottom"==this.animStartDir_str?(this.angleX=180,this.angleY=0,this.contentHolder_do.setAngleY(0),this.contentHolder_do.setAngleX(-180)):"left"==this.animStartDir_str&&(this.angleX=0,this.angleY=180,this.contentHolder_do.setAngleX(0),this.contentHolder_do.setAngleY(-180)),this.contentHolder_do.setZ(3),this.isContentHidden_bl=!1),this.resizeContent(),this.contentHolder_do.setX(this.borderSize),this.contentHolder_do.setY(this.borderSize),this.main3dContainer_do.addChild(this.contentHolder_do),GAMLDATMagicAnim.killTweensOf(this.main_do),GAMLDATMagicAnim.killTweensOf(this.contentHolder_do),GAMLDATMagicAnim.to(this.main_do,o,{angleX:s.angleX,angleY:s.angleY,alpha:1,delay:.1,ease:Quint.easeOut}),GAMLDATMagicAnim.to(this.contentHolder_do,o,{angleX:0,angleY:0,delay:.1,ease:Quint.easeOut}));this.borderNormalColor_str!=this.borderSelectedColor_str&&0!=this.borderSize&&GAMLDATMagicAnim.to(this.border_do.screen,m,{css:{borderColor:this.borderSelectedColor_str},ease:r}),this.isContentShowed_bl=!0,clearTimeout(this.contentShowCompleteId_to),clearTimeout(this.contentHideCompleteId_to),this.contentShowCompleteId_to=setTimeout(this.showContentComplete,1e3*o)}},this.showContentComplete=function(){clearTimeout(s.contentShowCompleteId_to),clearTimeout(s.contentHideCompleteId_to)},this.hideContent=function(){if(this.isContentShowed_bl){var t,e,i,o,n,a,h,r,d,l=0,_=0,A=0,c=.6,b=0,m=0,T=0,u=0,p=0,M=0;if("animtext"==this.presetType_str){if(n=.4,c=.7,i=Circ.easeOut,clearTimeout(this.showOrHideWithDelayId_to),this.htmlContent1_str){e=GAMLDATUtils.getChildren(s.text1_do.screen.firstChild);for(var g=0;g<e.length;g++)t=e[g],GAMLDATMagicAnim.killTweensOf(t),"scale"==s.textAnimType_str?GAMLDATMagicAnim.to(t,.2,{css:{scale:0}}):"scalerandom"==s.textAnimType_str?GAMLDATMagicAnim.to(t,.2,{css:{scale:0}}):"largescale"==s.textAnimType_str?GAMLDATMagicAnim.to(t,.2,{css:{scale:3,opacity:0}}):"opacity"==s.textAnimType_str&&GAMLDATMagicAnim.to(t,.2,{css:{opacity:0}})}this.button1_do&&(GAMLDATUtils.hasTransform2d?(GAMLDATMagicAnim.killTweensOf(this.button1_do),GAMLDATMagicAnim.to(this.button1_do,n,{alpha:0,scale:0,ease:Quint.easeOut}),this.button2_do&&(GAMLDATMagicAnim.killTweensOf(this.button2_do),GAMLDATMagicAnim.to(this.button2_do,n,{alpha:0,scale:0,ease:Quint.easeOut}))):(GAMLDATMagicAnim.killTweensOf(this.button1_do),GAMLDATMagicAnim.to(this.button1_do,n,{alpha:0,ease:Expo.easeInOut}),this.button2_do&&(GAMLDATMagicAnim.killTweensOf(this.button2_do),GAMLDATMagicAnim.to(this.button2_do,n,{alpha:0,ease:Expo.easeInOut})))),GAMLDATMagicAnim.to(s.overlay_do,n,{alpha:0,ease:Quint.easeOut})}else if("media2"==this.presetType_str){if(!s.isImageAnimCompleteId_bl)return;n=.7,c=.7,i=Circ.easeOut,clearTimeout(this.showOrHideWithDelayId_to),this.showOrHideWithDelayId_to=setTimeout(function(){var t,e,i=s.text1_do.getHeight();GAMLDATMagicAnim.killTweensOf(s.overlay_do),GAMLDATMagicAnim.killTweensOf(s.text1_do),GAMLDATMagicAnim.killTweensOf(s.imageHolder_do),GAMLDATMagicAnim.to(s.overlay_do,n-.051,{alpha:0,ease:Quint.easeOut}),"bottom"==s.textVerticalAlign_str?(e=s.finalH-2*s.borderSize,t=s.borderSize,S=s.finalH-2*s.borderSize):(e=-i,t=s.borderSize,S=-s.iconH),GAMLDATMagicAnim.to(s.text1_do,n-.151,{y:e,ease:Quint.easeInOut}),GAMLDATMagicAnim.to(s.imageHolder_do,n-.151,{y:t,ease:Quint.easeInOut}),s.button1_do&&(GAMLDATMagicAnim.killTweensOf(s.button1_do),GAMLDATMagicAnim.to(s.button1_do,n-.151,{y:S,alpha:1,delay:.05,ease:Quint.easeInOut})),s.button2_do&&(GAMLDATMagicAnim.killTweensOf(s.button2_do),GAMLDATMagicAnim.to(s.button2_do,n-.151,{y:S,alpha:1,delay:.1,ease:Quint.easeInOut}))},51)}else if("media"==this.presetType_str){if(!this.isImageAnimCompleteId_bl)return;n=.7,c=.7,i=Circ.easeOut,this.icon_do&&GAMLDATMagicAnim.to(this.icon_do,n,{alpha:0,ease:Expo.easeInOut}),this.text1_do&&this.text2_do&&("bottom"==s.textVerticalAlign_str?(GAMLDATMagicAnim.to(this.text1_do,n,{y:this.finalH-2*this.borderSize-this.text1H,ease:Expo.easeInOut}),GAMLDATMagicAnim.to(this.text2_do,n,{y:this.finalH-2*this.borderSize,ease:Expo.easeInOut})):(GAMLDATMagicAnim.to(this.text1_do,n,{y:0,ease:Expo.easeInOut}),GAMLDATMagicAnim.to(this.text2_do,n,{y:-this.text2H,ease:Expo.easeInOut})))}else if("scaletextinverse"==this.presetType_str){if(!this.isImageAnimCompleteId_bl)return;n=.7,c=.7,i=Circ.easeOut,l=1,_=1,o=.1,A=this.overlayOpacity,this.contentHolder_do.setX(0),GAMLDATUtils.hasTransform2d&&(GAMLDATMagicAnim.killTweensOf(this.imageHolder_do),GAMLDATMagicAnim.to(this.imageHolder_do,n,{scale:1.4,rotation:parseInt(20*Math.random()-10),ease:Expo.easeInOut})),GAMLDATMagicAnim.killTweensOf(this.overlay_do),GAMLDATMagicAnim.to(this.overlay_do,n,{alpha:A,delay:o,ease:Quint.easeOut}),GAMLDATMagicAnim.killTweensOf(this.text1_do),GAMLDATUtils.hasTransform2d?GAMLDATMagicAnim.to(this.text1_do,n,{scale:_,alpha:l,ease:Expo.easeInOut}):GAMLDATMagicAnim.to(this.text1_do,n,{alpha:l,ease:Expo.easeInOut}),this.isContentHidden_bl=!1,this.border_do.addChild(this.contentHolder_do),this.resizeContent()}else if("scaletext"==this.presetType_str){if(!this.isImageAnimCompleteId_bl)return;n=.7,c=.7,i=Circ.easeOut,"scaletext"==this.presetType_str&&(l=0,_=0,A=0,o=.2,this.button1_do&&(GAMLDATMagicAnim.killTweensOf(this.button1_do),GAMLDATUtils.hasTransform2d?(GAMLDATMagicAnim.to(this.button1_do,.4,{alpha:0,scale:0,ease:Quint.easeOut}),this.button2_do&&(GAMLDATMagicAnim.killTweensOf(this.button2_do),GAMLDATMagicAnim.to(this.button2_do,.4,{alpha:0,scale:0,ease:Quint.easeOut}))):(GAMLDATMagicAnim.to(this.button1_do,.4,{alpha:0,ease:Quint.easeOut}),this.button2_do&&(GAMLDATMagicAnim.killTweensOf(this.button2_do),GAMLDATMagicAnim.to(this.button2_do,.4,{alpha:0,ease:Quint.easeOut})))),GAMLDATUtils.hasTransform2d&&(GAMLDATMagicAnim.killTweensOf(this.imageHolder_do),GAMLDATMagicAnim.to(this.imageHolder_do,n,{scale:1,rotation:0,ease:Expo.easeInOut}))),this.isContentHidden_bl=!1,GAMLDATMagicAnim.killTweensOf(this.overlay_do),GAMLDATMagicAnim.to(this.overlay_do,n,{alpha:A,delay:o,ease:Quint.easeOut}),GAMLDATMagicAnim.killTweensOf(this.text1_do),GAMLDATUtils.hasTransform2d?GAMLDATMagicAnim.to(this.text1_do,n,{scale:_,alpha:l,ease:Expo.easeInOut}):GAMLDATMagicAnim.to(this.text1_do,n,{alpha:l,ease:Expo.easeInOut})}else if("movetext"==this.presetType_str)n=.7,c=.7,i=Circ.easeOut,clearTimeout(this.showOrHideWithDelayId_to),this.button1_do?("top"==this.animStartDir_str?(contentX=0,contentY=-this.finalH+2*this.borderSize,d=0,r=contentY,T=this.button1X,u=-this.iconH,p=this.button2X,M=u,this.button2_do&&(m=.05)):"right"==this.animStartDir_str?(contentX=this.finalW-2*this.borderSize,contentY=0,d=contentX,r=this.text1Y,T=contentX,u=this.buttonY,p=contentX+this.iconW+this.spaceBetweenThumbanilIcons,M=this.buttonY,this.button2_do&&(b=.05)):"bottom"==this.animStartDir_str?(contentX=0,contentY=this.finalH-2*this.borderSize,d=0,r=contentY,T=this.button1X,u=this.finalH-2*this.borderSize,p=this.button2X,M=u,this.button2_do&&(b=.05)):"left"==this.animStartDir_str&&(contentX=-this.finalW+2*this.borderSize,contentY=0,d=contentX,r=this.text1Y,T=this.button2_do?2*-this.iconW-this.spaceBetweenThumbanilIcons:-this.iconW,u=this.buttonY,p=-this.iconW,M=this.buttonY,this.button2_do&&(m=.05)),GAMLDATMagicAnim.killTweensOf(this.contentHolder_do),GAMLDATMagicAnim.to(this.overlay_do,.4,{x:contentX,y:contentY}),GAMLDATMagicAnim.killTweensOf(this.text1_do),GAMLDATMagicAnim.to(this.text1_do,.4,{x:d,y:r}),this.button1_do&&(GAMLDATMagicAnim.killTweensOf(this.button1_do),GAMLDATMagicAnim.to(this.button1_do,.7,{x:T,y:u,alpha:0,delay:b,ease:Expo.easeInOut})),this.button2_do&&(GAMLDATMagicAnim.killTweensOf(this.button2_do),GAMLDATMagicAnim.to(this.button2_do,.7,{x:p,y:M,alpha:0,delay:m,ease:Expo.easeInOut}))):(n=.4,"top"==s.animStartDir_str?(a=0,h=-s.finalH+2*s.borderSize):"right"==s.animStartDir_str?(a=s.finalW-2*s.borderSize,h=0):"bottom"==s.animStartDir_str?(a=0,h=s.finalH-2*s.borderSize):"left"==s.animStartDir_str&&(a=-s.finalW+2*s.borderSize,h=0),GAMLDATMagicAnim.killTweensOf(s.contentHolder_do),GAMLDATMagicAnim.to(s.contentHolder_do,n,{x:a,y:h}));else if("curtain"==this.presetType_str){var f=this.borderSize,y=this.borderSize;n=.7,c=.7,i=Circ.easeOut,this.border_do.addChild(this.contentHolder_do),this.resizeContent(),0!=this.borderSize&&GAMLDATMagicAnim.to(this.fakeBorder_do.screen,c,{css:{backgroundColor:this.borderNormalColor_str},ease:i}),GAMLDATMagicAnim.killTweensOf(this.imageHolder_do),GAMLDATMagicAnim.to(this.imageHolder_do,n,{x:f,y:y,ease:Expo.easeInOut})}else if("preset30"!=this.presetType_str||this.isLightboxDisabled_bl){if("3d"==this.presetType_str){var x=0,H=0;n=.8,c=.8,i=Circ.easeOut,"top"==this.prevAnimStartDir_str?(x=180,H=0,x=-180==this.angleX?180:-180):"right"==this.prevAnimStartDir_str?(x=0,H=-180==this.angleY?180:-180):"bottom"==this.prevAnimStartDir_str?(H=0,-180==this.angleX?x=180:180==this.angleX&&(x=-180)):"left"==this.prevAnimStartDir_str&&(x=0,H=-180,H=-180==this.angleY?180:-180),this.isContentHidden_bl=!1,GAMLDATMagicAnim.killTweensOf(this.main_do),GAMLDATMagicAnim.killTweensOf(this.contentHolder_do),GAMLDATMagicAnim.to(this.main_do,n,{angleX:0,angleY:0,ease:Quint.easeOut}),GAMLDATMagicAnim.to(this.contentHolder_do,n,{angleX:x,angleY:H,ease:Quint.easeOut})}}else{n=.6,c=.6,i=Circ.easeOut;var D=this.button2_do?this.iconW+this.spaceBetweenThumbanilIcons:0,T=parseInt((this.finalW-this.iconW-D)/2),S=parseInt((this.finalH-this.iconH)/2),p=T+this.iconW+this.spaceBetweenThumbanilIcons,O=parseInt((this.finalH-this.iconH)/2);"top"==this.animStartDir_str?(S=-this.iconH,this.button2_do&&(O=-this.iconH,m=.1)):"right"==this.animStartDir_str?(T=this.finalW-this.borderSize,b=.1,this.button2_do&&(p=this.finalW+this.iconW+this.spaceBetweenThumbanilIcons-this.borderSize,m=0)):"bottom"==this.animStartDir_str?(S=this.finalH-this.borderSize,this.button2_do&&(O=this.finalH-this.borderSize,m=.1)):"left"==this.animStartDir_str&&(T=2*-this.iconW+this.spaceBetweenThumbanilIcons,this.button2_do&&(p=-this.iconW,m=.1)),this.isContentHidden_bl=!1,this.button2_do&&(this.mainTransitionDuration+=.1),GAMLDATMagicAnim.killTweensOf(this.button1_do),GAMLDATMagicAnim.to(this.button1_do,n,{x:T,y:S,delay:b,ease:Expo.easeOut}),this.button2_do&&(GAMLDATMagicAnim.killTweensOf(this.button2_do),GAMLDATMagicAnim.to(this.button2_do,n,{x:p,y:O,delay:m,ease:Expo.easeOut}))}this.borderNormalColor_str!=this.borderSelectedColor_str&&0!=this.borderSize&&GAMLDATMagicAnim.to(this.border_do.screen,c,{css:{borderColor:this.borderNormalColor_str},ease:i}),this.isContentShowed_bl=!1,clearTimeout(this.contentShowCompleteId_to),clearTimeout(this.contentHideCompleteId_to),s.contentHideCompleteId_to=setTimeout(s.hideContentComplete,1e3*n)}},this.hideContentComplete=function(){if(clearTimeout(s.contentShowCompleteId_to),clearTimeout(s.contentHideCompleteId_to),"media"!=s.presetType_str&&"scaletextinverse"!=s.presetType_str){try{s.border_do.removeChild(s.contentHolder_do)}catch(t){}try{s.removeChild(s.contentHolder_do)}catch(t){}try{s.removeChild(s.fakeBorder_do)}catch(t){}s.contentHolder_do&&s.contentHolder_do.setX(-1e3)}s.isContentHidden_bl=!0},this.getInOrOutAngle=function(t){var e=GAMLDATUtils.getViewportMouseCoordinates(t),i=s.getGlobalX(),o=s.getGlobalY(),n=e.screenX,a=e.screenY,h=n-(i+s.finalW/2),r=a-(o+s.finalH/2),d=180*Math.atan2(r,h)/Math.PI,l=180*Math.atan2(s.finalH,s.finalW)/Math.PI;d<l&&d>-l&&(s.animStartDir_str="right"),d>l&&d<180-l&&(s.animStartDir_str="bottom"),(d<-180+l||d>180-l)&&(s.animStartDir_str="left"),d>-180+l&&d<-l&&(s.animStartDir_str="top")},this.hide=function(t,e){if(!this.isHidden_bl&&this.hasImage_bl){var i=Math.abs(Math.min(0,GAMMAGRID.globalY)),o=GAMMAGRID.globalY>0?GAMMAGRID.viewportHeight-GAMMAGRID.globalY:GAMMAGRID.viewportHeight;clearTimeout(this.showHideId_to),this.showHideId_to=setTimeout(function(){s.isHidden_bl=!0;var t=s.finalY+s.finalH>i&&s.finalY-i<o;if(s.isVerticalType_bl||(t=!0),"scale"==s.hideAndShowTransitionType_str)t?GAMLDATMagicAnim.to(s,.6,{scale:0,alpha:0,delay:.05+.1*Math.random(),ease:Quart.easeOut}):(GAMLDATMagicAnim.killTweensOf(s),s.setScale2(0),s.setAlpha(0));else if("opacity"==s.hideAndShowTransitionType_str)t?GAMLDATMagicAnim.to(s,.6,{alpha:0,delay:.05+.1*Math.random(),ease:Quart.easeOut}):(GAMLDATMagicAnim.killTweensOf(s),s.setAlpha(0));else if("rotation"==s.hideAndShowTransitionType_str){for(var e=-60+parseInt(120*Math.random());e>-20&&e<20;)e=-60+parseInt(120*Math.random());t?GAMLDATMagicAnim.to(s,.6,{scale:0,rotation:e,delay:.05+.1*Math.random(),ease:Quart.easeOut}):(GAMLDATMagicAnim.killTweensOf(s),s.setRotation(0),s.setScale2(0))}else("none"==s.hideAndShowTransitionType_str||GAMLDATUtils.hasTransform2d)&&s.setVisible(!1)},50)}},this.show=function(t){if(this.isVerticalType_bl?this.parent.addChild(this):this.parent.thumbnailsHolder_do.addChild(this),this.isHidden_bl&&this.hasImage_bl){var e=Math.abs(Math.min(0,GAMMAGRID.globalY)),i=GAMMAGRID.globalY>0?GAMMAGRID.viewportHeight-GAMMAGRID.globalY:GAMMAGRID.viewportHeight;clearTimeout(s.contentShowCompleteId_to),s.isContentHidden_bl=!0,clearTimeout(this.showHideId_to),this.showHideId_to=setTimeout(function(){s.isHidden_bl=!1;var t=s.finalY+s.finalH>e&&s.finalY-e<i;s.isVerticalType_bl||(t=!0),"scale"==s.hideAndShowTransitionType_str?t?GAMLDATMagicAnim.to(s,.6,{scale:1,alpha:1,delay:.05+.2*Math.random(),ease:Quart.easeOut}):(GAMLDATMagicAnim.killTweensOf(s),s.setScale2(1),s.setAlpha(1)):"opacity"==s.hideAndShowTransitionType_str?t?GAMLDATMagicAnim.to(s,.6,{alpha:1,delay:.05+.1*Math.random(),ease:Quart.easeOut}):(GAMLDATMagicAnim.killTweensOf(s),s.setAlpha(1)):"rotation"==s.hideAndShowTransitionType_str?(GAMLDATMagicAnim.killTweensOf(s),t?GAMLDATMagicAnim.to(s,.6,{scale:1,alpha:1,rotation:0,delay:.05+.2*Math.random(),ease:Quart.easeOut}):(s.setRotation(0),s.setScale2(1),s.setAlpha(1))):("none"==s.hideAndShowTransitionType_str||GAMLDATUtils.hasTransform2d)&&s.setVisible(!0)},50)}},this.setTransitionType=function(t){if(this.hideAndShowTransitionType_str=t,"scale"==s.hideAndShowTransitionType_str)this.isHidden_bl&&(s.setRotation(0),s.setAlpha(0),s.setScale2(0));else if("rotation"==s.hideAndShowTransitionType_str){if(this.isHidden_bl){for(var e=-60+parseInt(120*Math.random());e>-20&&e<20;)e=-60+parseInt(120*Math.random());s.setRotation(e),"opacity"==this.prevAndShowTransitionType_str?s.setAlpha(0):s.setAlpha(1),s.setScale2(0)}}else"opacity"==s.hideAndShowTransitionType_str&&this.isHidden_bl&&(s.setRotation(1),s.setScale2(1),s.setAlpha(0));this.prevAndShowTransitionType_str=this.hideAndShowTransitionType_str},this.setOverlayColor=function(t){this.overlayColor_str=t,this.overlay_do.setBkColor(this.overlayColor_str)},this.setOverlayOpacityValue=function(t){void 0!=t&&(this.overlayOpacity=t)},this.setOverlayOpacity=function(){this.overlay_do.setAlpha(this.overlayOpacity)},this.setContentPosition=function(t,e,i){this.textVerticalAlign_str=t,this.contentOffest=e,void 0!=i&&(this.buttonsOffest=i)},this.setCurtainAnimationDirection=function(t){s.imageTransitionDirection_str=t},this.setBorderSize=function(t){this.borderSize=parseInt(t),0==this.borderSize?(this.border_do.getStyle().borderStyle="none",this.border_do.getStyle().boxShadow="none"):(this.border_do.getStyle().borderStyle="solid",this.border_do.getStyle().boxShadow=this.thumbanilBoxShadow_str),this.border_do.getStyle().borderWidth=this.borderSize+"px"},this.setBorderRadius=function(t){this.borderRadius=parseInt(t),this.border_do.getStyle().borderRadius=this.borderRadius+"px",this.getStyle().borderRadius=this.borderRadius+"px","3d"==this.presetType_str&&(this.main_do.getStyle().borderRadius=this.borderRadius+"px")},this.setBorderColor=function(t,e){this.borderNormalColor_str=t,this.borderSelectedColor_str=e,this.border_do.getStyle().borderColor=this.borderNormalColor_str},this.setBorderBoxShadow=function(t){this.thumbanilBoxShadow_str=t,"3d"==this.presetType_str?this.main_do.getStyle().boxShadow=this.thumbanilBoxShadow_str:this.getStyle().boxShadow=this.thumbanilBoxShadow_str},this.init()};e.setPrototype=function(){GAMLDATUtils.hasTransform2d?e.prototype=new GAMLDATTransformDisplayObject("div"):e.prototype=new GAMLDATDisplayObject("div")},e.MOUSE_UP="onMouseDown",e.RIGHT="right",e.LEFT="left",e.BOTTOM="bottom",e.TOP="top",e.prototype=null,t.GAMMAGRIDThumbnail=e}(window);
!function(e){function t(){for(var e,t,n=["transform","msTransform","WebkitTransform","MozTransform","OTransform","KhtmlTransform"];e=n.shift();)if(void 0!==r.dumy.style[e]&&(r.dumy.style.position="absolute",t=r.dumy.getBoundingClientRect().left,r.dumy.style[e]="translate3d(500px, 0px, 0px)",(t=Math.abs(r.dumy.getBoundingClientRect().left-t))>100&&t<900)){try{document.documentElement.removeChild(r.dumy)}catch(e){}return!0}try{document.documentElement.removeChild(r.dumy)}catch(e){}return!1}function n(){for(var e,t=["transform","msTransform","WebkitTransform","MozTransform","OTransform","KhtmlTransform"];e=t.shift();)if(void 0!==r.dumy.style[e])return!0;try{document.documentElement.removeChild(r.dumy)}catch(e){}return!1}var r=function(){};r.dumy=document.createElement("div"),r.trim=function(e){return e.replace(/\s/gi,"")},r.splitAndTrim=function(e,t){for(var n=e.split(","),o=n.length,i=0;i<o;i++)t&&(n[i]=r.trim(n[i]));return n},r.indexOfArray=function(e,t){for(var n=e.length,r=0;r<n;r++)if(e[r]===t)return r;return-1},r.randomizeArray=function(e){for(var t=[],n=e.concat(),r=n.length,o=0;o<r;o++){var i=Math.floor(Math.random()*n.length);t.push(n[i]),n.splice(i,1)}return t},r.removeArrayDuplicates=function(e,t){var n,r,o,i=[],s=e.length;for(r=0;r<s;r++){for(n=void 0,o=0;o<i.length;o++)if(e[r][t]===i[o][t]){n=!0;break}n||i.push(e[r])}return i},r.parent=function(e,t){for(void 0===t&&(t=1);t--&&e;)e=e.parentNode;return e&&1===e.nodeType?e:null},r.sibling=function(e,t){for(;e&&0!==t;)if(t>0){if(e.nextElementSibling)e=e.nextElementSibling;else for(e=e.nextSibling;e&&1!==e.nodeType;e=e.nextSibling);t--}else{if(e.previousElementSibling)e=e.previousElementSibling;else for(var e=e.previousSibling;e&&1!==e.nodeType;e=e.previousSibling);t++}return e},r.getChildAt=function(e,t){var n=r.getChildren(e);return t<0&&(t+=n.length),t<0?null:n[t]},r.getChildById=function(e){return document.getElementById(e)||void 0},r.getChildren=function(e,t){for(var n=[],r=e.firstChild;null!=r;r=r.nextSibling)t?n.push(r):1===r.nodeType&&n.push(r);return n},r.getChildrenFromAttribute=function(e,t,n){for(var o=[],i=e.firstChild;null!=i;i=i.nextSibling)n&&r.hasAttribute(i,t)?o.push(i):1===i.nodeType&&r.hasAttribute(i,t)&&o.push(i);return 0==o.length?void 0:o},r.getChildFromNodeListFromAttribute=function(e,t,n){for(var o=e.firstChild;null!=o;o=o.nextSibling){if(n&&r.hasAttribute(o,t))return o;if(1===o.nodeType&&r.hasAttribute(o,t))return o}},r.getAttributeValue=function(e,t){if(r.hasAttribute(e,t))return e.getAttribute(t)},r.hasAttribute=function(e,t){return e.hasAttribute?e.hasAttribute(t):!!e.getAttribute(t)},r.insertNodeAt=function(e,t,n){var o=r.children(e);if(n<0||n>o.length)throw new Error("invalid index!");e.insertBefore(t,o[n])},r.hasCanvas=function(){return Boolean(document.createElement("canvas"))},r.hitTest=function(e,t,n){if(!e)throw Error("Hit test target is null!");var r=e.getBoundingClientRect();return t>=r.left&&t<=r.left+(r.right-r.left)&&n>=r.top&&n<=r.top+(r.bottom-r.top)},r.getScrollOffsets=function(){return null!=e.pageXOffset?{x:e.pageXOffset,y:e.pageYOffset}:"CSS1Compat"==document.compatMode?{x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop}:void 0},r.getViewportSize=function(){return r.hasPointerEvent&&navigator.msMaxTouchPoints>1?{w:document.documentElement.clientWidth||e.innerWidth,h:document.documentElement.clientHeight||e.innerHeight}:r.isMobile?{w:e.innerWidth,h:e.innerHeight}:{w:document.documentElement.clientWidth||e.innerWidth,h:document.documentElement.clientHeight||e.innerHeight}},r.getViewportMouseCoordinates=function(e){var t=r.getScrollOffsets();return e.touches?{screenX:void 0==e.touches[0]?e.touches.pageX-t.x:e.touches[0].pageX-t.x,screenY:void 0==e.touches[0]?e.touches.pageY-t.y:e.touches[0].pageY-t.y}:{screenX:void 0==e.clientX?e.pageX-t.x:e.clientX,screenY:void 0==e.clientY?e.pageY-t.y:e.clientY}},r.hasPointerEvent=function(){return Boolean(e.navigator.msPointerEnabled)||Boolean(e.navigator.pointerEnabled)}(),r.isMobile=function(){if(r.hasPointerEvent&&navigator.msMaxTouchPoints>1||r.hasPointerEvent&&navigator.maxTouchPoints>1)return!0;var e=["android","webos","iphone","ipad","blackberry","kfsowi"];for(i in e)if(-1!=String(navigator.userAgent).toLowerCase().indexOf(String(e[i]).toLowerCase()))return!0;return!1}(),r.isAndroid=function(){return-1!=navigator.userAgent.toLowerCase().indexOf("android".toLowerCase())}(),r.isChrome=function(){return-1!=navigator.userAgent.toLowerCase().indexOf("chrome")}(),r.isSafari=function(){return-1!=navigator.userAgent.toLowerCase().indexOf("safari")&&-1==navigator.userAgent.toLowerCase().indexOf("chrome")}(),r.isOpera=function(){return-1!=navigator.userAgent.toLowerCase().indexOf("opera")&&-1==navigator.userAgent.toLowerCase().indexOf("chrome")}(),r.isFirefox=function(){return-1!=navigator.userAgent.toLowerCase().indexOf("firefox")}(),r.isIE=function(){return Boolean(-1!=navigator.userAgent.toLowerCase().indexOf("msie"))||Boolean(-1!=navigator.userAgent.toLowerCase().indexOf("edge"))||Boolean(document.documentElement.msRequestFullscreen)}(),r.isIE11=function(){return Boolean(!r.isIE&&document.documentElement.msRequestFullscreen)}(),r.isIEAndLessThen9=function(){return-1!=navigator.userAgent.toLowerCase().indexOf("msie 7")||-1!=navigator.userAgent.toLowerCase().indexOf("msie 8")}(),r.isIEAndLessThen10=function(){return-1!=navigator.userAgent.toLowerCase().indexOf("msie 7")||-1!=navigator.userAgent.toLowerCase().indexOf("msie 8")||-1!=navigator.userAgent.toLowerCase().indexOf("msie 9")}(),r.isIE7=function(){return-1!=navigator.userAgent.toLowerCase().indexOf("msie 7")}(),r.isIOS=function(){return navigator.userAgent.match(/(iPad|iPhone|iPod)/g)}(),r.isIphone=function(){return navigator.userAgent.match(/(iPhone|iPod)/g)}(),r.isApple=function(){return-1!=navigator.appVersion.toLowerCase().indexOf("mac")}(),r.isLocal=function(){return-1!=location.href.indexOf("file:")}(),r.hasFullScreen=function(){return r.dumy.requestFullScreen||r.dumy.mozRequestFullScreen||r.dumy.webkitRequestFullScreen||r.dumy.msieRequestFullScreen}(),r.onReady=function(e){document.addEventListener?document.addEventListener("DOMContentLoaded",function(){r.checkIfHasTransofrms(),e()}):document.onreadystatechange=function(){r.checkIfHasTransofrms(),"complete"==document.readyState&&e()}},r.checkIfHasTransofrms=function(){document.documentElement.appendChild(r.dumy),r.hasTransform3d=t(),r.hasTransform2d=n(),r.isReadyMethodCalled_bl=!0},r.disableElementSelection=function(e){try{e.style.userSelect="none"}catch(e){}try{e.style.MozUserSelect="none"}catch(e){}try{e.style.webkitUserSelect="none"}catch(e){}try{e.style.khtmlUserSelect="none"}catch(e){}try{e.style.oUserSelect="none"}catch(e){}try{e.style.msUserSelect="none"}catch(e){}try{e.msUserSelect="none"}catch(e){}e.onselectstart=function(){return!1}},r.getSearchArgs=function(e){for(var t={},n=(e.substr(e.indexOf("?")+1)||location.search.substring(1)).split("&"),r=0;r<n.length;r++){var o=n[r].indexOf("="),i=n[r].substring(0,o),s=n[r].substring(o+1);s=decodeURIComponent(s),t[i]=s}return t},r.getHashArgs=function(e){for(var t={},n=(e.substr(e.indexOf("#")+1)||location.hash.substring(1)).split("&"),r=0;r<n.length;r++){var o=n[r].indexOf("="),i=n[r].substring(0,o),s=n[r].substring(o+1);s=decodeURIComponent(s),t[i]=s}return t},r.isReadyMethodCalled_bl=!1,e.GAMLDATUtils=r}(window);
(window._gsQueue||(window._gsQueue=[])).push(function(){"use strict";window._gsDefine("GAMLDATMagicAnim",["core.Animation","core.SimpleTimeline","MagicMove"],function(t,e,i){var s=[].slice,r=function(t,e,s){i.call(this,t,e,s),this._cycle=0,this._yoyo=!0===this.vars.yoyo,this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._dirty=!0},n=function(t){return t.jquery||t.length&&t[0]&&t[0].nodeType&&t[0].style},a=r.prototype=i.to({},.1,{}),o=[];r.version="1.9.7",a.constructor=r,a.kill()._gc=!1,r.killTweensOf=r.killDelayedCallsTo=i.killTweensOf,r.getTweensOf=i.getTweensOf,r.ticker=i.ticker,a.invalidate=function(){return this._yoyo=!0===this.vars.yoyo,this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._uncache(!0),i.prototype.invalidate.call(this)},a.updateTo=function(t,e){var s,r=this.ratio;e&&this.timeline&&this._startTime<this._timeline._time&&(this._startTime=this._timeline._time,this._uncache(!1),this._gc?this._enabled(!0,!1):this._timeline.insert(this,this._startTime-this._delay));for(s in t)this.vars[s]=t[s];if(this._initted)if(e)this._initted=!1;else if(this._notifyPluginsOfEnabled&&this._firstPT&&i._onPluginEvent("_onDisable",this),this._time/this._duration>.998){var n=this._time;this.render(0,!0,!1),this._initted=!1,this.render(n,!0,!1)}else if(this._time>0){this._initted=!1,this._init();for(var a,o=1/(1-r),h=this._firstPT;h;)a=h.s+h.c,h.c*=o,h.s=a-h.c,h=h._next}return this},a.render=function(t,e,i){var s,r,n,a,h,l,_,u=this._dirty?this.totalDuration():this._totalDuration,p=this._time,c=this._totalTime,f=this._cycle;if(t>=u?(this._totalTime=u,this._cycle=this._repeat,this._yoyo&&0!=(1&this._cycle)?(this._time=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0):(this._time=this._duration,this.ratio=this._ease._calcEnd?this._ease.getRatio(1):1),this._reversed||(s=!0,r="onComplete"),0===this._duration&&((0===t||this._rawPrevTime<0)&&this._rawPrevTime!==t&&(i=!0,this._rawPrevTime>0&&(r="onReverseComplete",e&&(t=-1))),this._rawPrevTime=t)):t<1e-7?(this._totalTime=this._time=this._cycle=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0,(0!==c||0===this._duration&&this._rawPrevTime>0)&&(r="onReverseComplete",s=this._reversed),t<0?(this._active=!1,0===this._duration&&(this._rawPrevTime>=0&&(i=!0),this._rawPrevTime=t)):this._initted||(i=!0)):(this._totalTime=this._time=t,0!==this._repeat&&(a=this._duration+this._repeatDelay,this._cycle=this._totalTime/a>>0,0!==this._cycle&&this._cycle===this._totalTime/a&&this._cycle--,this._time=this._totalTime-this._cycle*a,this._yoyo&&0!=(1&this._cycle)&&(this._time=this._duration-this._time),this._time>this._duration?this._time=this._duration:this._time<0&&(this._time=0)),this._easeType?(h=this._time/this._duration,l=this._easeType,_=this._easePower,(1===l||3===l&&h>=.5)&&(h=1-h),3===l&&(h*=2),1===_?h*=h:2===_?h*=h*h:3===_?h*=h*h*h:4===_&&(h*=h*h*h*h),1===l?this.ratio=1-h:2===l?this.ratio=h:this._time/this._duration<.5?this.ratio=h/2:this.ratio=1-h/2):this.ratio=this._ease.getRatio(this._time/this._duration)),p!==this._time||i){if(!this._initted){if(this._init(),!this._initted)return;this._time&&!s?this.ratio=this._ease.getRatio(this._time/this._duration):s&&this._ease._calcEnd&&(this.ratio=this._ease.getRatio(0===this._time?0:1))}for(this._active||this._paused||(this._active=!0),0===c&&(this._startAt&&(t>=0?this._startAt.render(t,e,i):r||(r="_dummyGS")),this.vars.onStart&&(0===this._totalTime&&0!==this._duration||e||this.vars.onStart.apply(this.vars.onStartScope||this,this.vars.onStartParams||o))),n=this._firstPT;n;){if(n.f)n.t[n.p](n.c*this.ratio+n.s);else{var m=n.c*this.ratio+n.s;"x"==n.p?n.t.setX(m):"y"==n.p?n.t.setY(m):"z"==n.p?n.t.setZ(m):"angleX"==n.p?n.t.setAngleX(m):"angleY"==n.p?n.t.setAngleY(m):"angleZ"==n.p?n.t.setAngleZ(m):"w"==n.p?n.t.setWidth(m):"h"==n.p?n.t.setHeight(m):"alpha"==n.p?n.t.setAlpha(m):"scale"==n.p?n.t.setScale2(m):"rotation"==n.p?n.t.setRotation(m):n.t[n.p]=m}n=n._next}this._onUpdate&&(t<0&&this._startAt&&this._startAt.render(t,e,i),e||this._onUpdate.apply(this.vars.onUpdateScope||this,this.vars.onUpdateParams||o)),this._cycle!==f&&(e||this._gc||this.vars.onRepeat&&this.vars.onRepeat.apply(this.vars.onRepeatScope||this,this.vars.onRepeatParams||o)),r&&(this._gc||(t<0&&this._startAt&&!this._onUpdate&&this._startAt.render(t,e,i),s&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!e&&this.vars[r]&&this.vars[r].apply(this.vars[r+"Scope"]||this,this.vars[r+"Params"]||o)))}else c!==this._totalTime&&this._onUpdate&&(e||this._onUpdate.apply(this.vars.onUpdateScope||this,this.vars.onUpdateParams||o))},r.to=function(t,e,i){return new r(t,e,i)},r.from=function(t,e,i){return i.runBackwards=!0,i.immediateRender=0!=i.immediateRender,new r(t,e,i)},r.fromTo=function(t,e,i,s){return s.startAt=i,s.immediateRender=0!=s.immediateRender&&0!=i.immediateRender,new r(t,e,s)},r.staggerTo=r.allTo=function(t,e,a,h,l,_,u){h=h||0;var p,c,f,m,d=a.delay||0,g=[],v=function(){a.onComplete&&a.onComplete.apply(a.onCompleteScope||this,a.onCompleteParams||o),l.apply(u||this,_||o)};for(t instanceof Array||("string"==typeof t&&(t=i.selector(t)||t),n(t)&&(t=s.call(t,0))),p=t.length,f=0;f<p;f++){c={};for(m in a)c[m]=a[m];c.delay=d,f===p-1&&l&&(c.onComplete=v),g[f]=new r(t[f],e,c),d+=h}return g},r.staggerFrom=r.allFrom=function(t,e,i,s,n,a,o){return i.runBackwards=!0,i.immediateRender=0!=i.immediateRender,r.staggerTo(t,e,i,s,n,a,o)},r.staggerFromTo=r.allFromTo=function(t,e,i,s,n,a,o,h){return s.startAt=i,s.immediateRender=0!=s.immediateRender&&0!=i.immediateRender,r.staggerTo(t,e,s,n,a,o,h)},r.delayedCall=function(t,e,i,s,n){return new r(e,0,{delay:t,onComplete:e,onCompleteParams:i,onCompleteScope:s,onReverseComplete:e,onReverseCompleteParams:i,onReverseCompleteScope:s,immediateRender:!1,useFrames:n,overwrite:0})},r.set=function(t,e){return new r(t,0,e)},r.isTweening=function(t){for(var e,s=i.getTweensOf(t),r=s.length;--r>-1;)if((e=s[r])._active||e._startTime===e._timeline._time&&e._timeline._active)return!0;return!1};var h=function(t,e){for(var s=[],r=0,n=t._first;n;)n instanceof i?s[r++]=n:(e&&(s[r++]=n),r=(s=s.concat(h(n,e))).length),n=n._next;return s},l=r.getAllTweens=function(e){return h(t._rootTimeline,e).concat(h(t._rootFramesTimeline,e))};r.killAll=function(t,i,s,r){null==i&&(i=!0),null==s&&(s=!0);var n,a,o,h=l(0!=r),_=h.length,u=i&&s&&r;for(o=0;o<_;o++)a=h[o],(u||a instanceof e||(n=a.target===a.vars.onComplete)&&s||i&&!n)&&(t?a.totalTime(a.totalDuration()):a._enabled(!1,!1))},r.killChildTweensOf=function(t,e){if(null!=t){var a,o,h,l,_,u=i._tweenLookup;if("string"==typeof t&&(t=i.selector(t)||t),n(t)&&(t=s(t,0)),t instanceof Array)for(l=t.length;--l>-1;)r.killChildTweensOf(t[l],e);else{a=[];for(h in u)for(o=u[h].target.parentNode;o;)o===t&&(a=a.concat(u[h].tweens)),o=o.parentNode;for(_=a.length,l=0;l<_;l++)e&&a[l].totalTime(a[l].totalDuration()),a[l]._enabled(!1,!1)}}};var _=function(t,i,s,r){void 0===i&&(i=!0),void 0===s&&(s=!0);for(var n,a,o=l(r),h=i&&s&&r,_=o.length;--_>-1;)a=o[_],(h||a instanceof e||(n=a.target===a.vars.onComplete)&&s||i&&!n)&&a.paused(t)};return r.pauseAll=function(t,e,i){_(!0,t,e,i)},r.resumeAll=function(t,e,i){_(!1,t,e,i)},a.progress=function(t){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&0!=(1&this._cycle)?1-t:t)+this._cycle*(this._duration+this._repeatDelay),!1):this._time/this.duration()},a.totalProgress=function(t){return arguments.length?this.totalTime(this.totalDuration()*t,!1):this._totalTime/this.totalDuration()},a.time=function(t,e){return arguments.length?(this._dirty&&this.totalDuration(),t>this._duration&&(t=this._duration),this._yoyo&&0!=(1&this._cycle)?t=this._duration-t+this._cycle*(this._duration+this._repeatDelay):0!==this._repeat&&(t+=this._cycle*(this._duration+this._repeatDelay)),this.totalTime(t,e)):this._time},a.duration=function(e){return arguments.length?t.prototype.duration.call(this,e):this._duration},a.totalDuration=function(t){return arguments.length?-1===this._repeat?this:this.duration((t-this._repeat*this._repeatDelay)/(this._repeat+1)):(this._dirty&&(this._totalDuration=-1===this._repeat?999999999999:this._duration*(this._repeat+1)+this._repeatDelay*this._repeat,this._dirty=!1),this._totalDuration)},a.repeat=function(t){return arguments.length?(this._repeat=t,this._uncache(!0)):this._repeat},a.repeatDelay=function(t){return arguments.length?(this._repeatDelay=t,this._uncache(!0)):this._repeatDelay},a.yoyo=function(t){return arguments.length?(this._yoyo=t,this):this._yoyo},r},!0),window._gsDefine("TimelineLite",["core.Animation","core.SimpleTimeline","MagicMove"],function(t,e,i){var s=function(t){e.call(this,t),this._labels={},this.autoRemoveChildren=!0===this.vars.autoRemoveChildren,this.smoothChildTiming=!0===this.vars.smoothChildTiming,this._sortChildren=!0,this._onUpdate=this.vars.onUpdate;for(var i,s,n=this.vars,a=r.length;--a>-1;)if(s=n[r[a]])for(i=s.length;--i>-1;)"{self}"===s[i]&&((s=n[r[a]]=s.concat())[i]=this);n.tweens instanceof Array&&this.add(n.tweens,0,n.align,n.stagger)},r=["onStartParams","onUpdateParams","onCompleteParams","onReverseCompleteParams","onRepeatParams"],n=[],a=function(t){var e,i={};for(e in t)i[e]=t[e];return i},o=n.slice,h=s.prototype=new e;return s.version="1.9.7",h.constructor=s,h.kill()._gc=!1,h.to=function(t,e,s,r){return e?this.add(new i(t,e,s),r):this.set(t,s,r)},h.from=function(t,e,s,r){return this.add(i.from(t,e,s),r)},h.fromTo=function(t,e,s,r,n){return e?this.add(i.fromTo(t,e,s,r),n):this.set(t,r,n)},h.staggerTo=function(t,e,r,n,h,l,_,u){var p,c=new s({onComplete:l,onCompleteParams:_,onCompleteScope:u});for("string"==typeof t&&(t=i.selector(t)||t),!(t instanceof Array)&&t.length&&t[0]&&t[0].nodeType&&t[0].style&&(t=o.call(t,0)),n=n||0,p=0;p<t.length;p++)r.startAt&&(r.startAt=a(r.startAt)),c.to(t[p],e,a(r),p*n);return this.add(c,h)},h.staggerFrom=function(t,e,i,s,r,n,a,o){return i.immediateRender=0!=i.immediateRender,i.runBackwards=!0,this.staggerTo(t,e,i,s,r,n,a,o)},h.staggerFromTo=function(t,e,i,s,r,n,a,o,h){return s.startAt=i,s.immediateRender=0!=s.immediateRender&&0!=i.immediateRender,this.staggerTo(t,e,s,r,n,a,o,h)},h.call=function(t,e,s,r){return this.add(i.delayedCall(0,t,e,s),r)},h.set=function(t,e,s){return s=this._parseTimeOrLabel(s,0,!0),null==e.immediateRender&&(e.immediateRender=s===this._time&&!this._paused),this.add(new i(t,0,e),s)},s.exportRoot=function(t,e){null==(t=t||{}).smoothChildTiming&&(t.smoothChildTiming=!0);var r,n,a=new s(t),o=a._timeline;for(null==e&&(e=!0),o._remove(a,!0),a._startTime=0,a._rawPrevTime=a._time=a._totalTime=o._time,r=o._first;r;)n=r._next,e&&r instanceof i&&r.target===r.vars.onComplete||a.add(r,r._startTime-r._delay),r=n;return o.add(a,0),a},h.add=function(r,n,a,o){var h,l,_,u,p;if("number"!=typeof n&&(n=this._parseTimeOrLabel(n,0,!0,r)),!(r instanceof t)){if(r instanceof Array){for(a=a||"normal",o=o||0,h=n,l=r.length,_=0;_<l;_++)(u=r[_])instanceof Array&&(u=new s({tweens:u})),this.add(u,h),"string"!=typeof u&&"function"!=typeof u&&("sequence"===a?h=u._startTime+u.totalDuration()/u._timeScale:"start"===a&&(u._startTime-=u.delay())),h+=o;return this._uncache(!0)}if("string"==typeof r)return this.addLabel(r,n);if("function"!=typeof r)throw"Cannot add "+r+" into the timeline; it is neither a tween, timeline, function, nor a string.";r=i.delayedCall(0,r)}if(e.prototype.add.call(this,r,n),this._gc&&!this._paused&&this._time===this._duration&&this._time<this.duration())for(p=this;p._gc&&p._timeline;)p._timeline.smoothChildTiming?p.totalTime(p._totalTime,!0):p._enabled(!0,!1),p=p._timeline;return this},h.remove=function(e){if(e instanceof t)return this._remove(e,!1);if(e instanceof Array){for(var i=e.length;--i>-1;)this.remove(e[i]);return this}return"string"==typeof e?this.removeLabel(e):this.kill(null,e)},h.append=function(t,e){return this.add(t,this._parseTimeOrLabel(null,e,!0,t))},h.insert=h.insertMultiple=function(t,e,i,s){return this.add(t,e||0,i,s)},h.appendMultiple=function(t,e,i,s){return this.add(t,this._parseTimeOrLabel(null,e,!0,t),i,s)},h.addLabel=function(t,e){return this._labels[t]=this._parseTimeOrLabel(e),this},h.removeLabel=function(t){return delete this._labels[t],this},h.getLabelTime=function(t){return null!=this._labels[t]?this._labels[t]:-1},h._parseTimeOrLabel=function(e,i,s,r){var n;if(r instanceof t&&r.timeline===this)this.remove(r);else if(r instanceof Array)for(n=r.length;--n>-1;)r[n]instanceof t&&r[n].timeline===this&&this.remove(r[n]);if("string"==typeof i)return this._parseTimeOrLabel(i,s&&"number"==typeof e&&null==this._labels[i]?e-this.duration():0,s);if(i=i||0,"string"!=typeof e||!isNaN(e)&&null==this._labels[e])null==e&&(e=this.duration());else{if(-1===(n=e.indexOf("=")))return null==this._labels[e]?s?this._labels[e]=this.duration()+i:i:this._labels[e]+i;i=parseInt(e.charAt(n-1)+"1",10)*Number(e.substr(n+1)),e=n>1?this._parseTimeOrLabel(e.substr(0,n-1),0,s):this.duration()}return Number(e)+i},h.seek=function(t,e){return this.totalTime("number"==typeof t?t:this._parseTimeOrLabel(t),!1!==e)},h.stop=function(){return this.paused(!0)},h.gotoAndPlay=function(t,e){return this.play(t,e)},h.gotoAndStop=function(t,e){return this.pause(t,e)},h.render=function(t,e,i){this._gc&&this._enabled(!0,!1),this._active=!this._paused;var s,r,a,o,h,l=this._dirty?this.totalDuration():this._totalDuration,_=this._time,u=this._startTime,p=this._timeScale,c=this._paused;if(t>=l?(this._totalTime=this._time=l,this._reversed||this._hasPausedChild()||(r=!0,o="onComplete",0===this._duration&&(0===t||this._rawPrevTime<0)&&this._rawPrevTime!==t&&this._first&&(h=!0,this._rawPrevTime>0&&(o="onReverseComplete"))),this._rawPrevTime=t,t=l+1e-6):t<1e-7?(this._totalTime=this._time=0,(0!==_||0===this._duration&&this._rawPrevTime>0)&&(o="onReverseComplete",r=this._reversed),t<0?(this._active=!1,0===this._duration&&this._rawPrevTime>=0&&this._first&&(h=!0)):this._initted||(h=!0),this._rawPrevTime=t,t=0):this._totalTime=this._time=this._rawPrevTime=t,this._time!==_&&this._first||i||h){if(this._initted||(this._initted=!0),0===_&&this.vars.onStart&&0!==this._time&&(e||this.vars.onStart.apply(this.vars.onStartScope||this,this.vars.onStartParams||n)),this._time>=_)for(s=this._first;s&&(a=s._next,!this._paused||c);)(s._active||s._startTime<=this._time&&!s._paused&&!s._gc)&&(s._reversed?s.render((s._dirty?s.totalDuration():s._totalDuration)-(t-s._startTime)*s._timeScale,e,i):s.render((t-s._startTime)*s._timeScale,e,i)),s=a;else for(s=this._last;s&&(a=s._prev,!this._paused||c);)(s._active||s._startTime<=_&&!s._paused&&!s._gc)&&(s._reversed?s.render((s._dirty?s.totalDuration():s._totalDuration)-(t-s._startTime)*s._timeScale,e,i):s.render((t-s._startTime)*s._timeScale,e,i)),s=a;this._onUpdate&&(e||this._onUpdate.apply(this.vars.onUpdateScope||this,this.vars.onUpdateParams||n)),o&&(this._gc||u!==this._startTime&&p===this._timeScale||(0===this._time||l>=this.totalDuration())&&(r&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!e&&this.vars[o]&&this.vars[o].apply(this.vars[o+"Scope"]||this,this.vars[o+"Params"]||n)))}},h._hasPausedChild=function(){for(var t=this._first;t;){if(t._paused||t instanceof s&&t._hasPausedChild())return!0;t=t._next}return!1},h.getChildren=function(t,e,s,r){r=r||-9999999999;for(var n=[],a=this._first,o=0;a;)a._startTime<r||(a instanceof i?!1!==e&&(n[o++]=a):(!1!==s&&(n[o++]=a),!1!==t&&(o=(n=n.concat(a.getChildren(!0,e,s))).length))),a=a._next;return n},h.getTweensOf=function(t,e){for(var s=i.getTweensOf(t),r=s.length,n=[],a=0;--r>-1;)(s[r].timeline===this||e&&this._contains(s[r]))&&(n[a++]=s[r]);return n},h._contains=function(t){for(var e=t.timeline;e;){if(e===this)return!0;e=e.timeline}return!1},h.shiftChildren=function(t,e,i){i=i||0;for(var s,r=this._first,n=this._labels;r;)r._startTime>=i&&(r._startTime+=t),r=r._next;if(e)for(s in n)n[s]>=i&&(n[s]+=t);return this._uncache(!0)},h._kill=function(t,e){if(!t&&!e)return this._enabled(!1,!1);for(var i=e?this.getTweensOf(e):this.getChildren(!0,!0,!1),s=i.length,r=!1;--s>-1;)i[s]._kill(t,e)&&(r=!0);return r},h.clear=function(t){var e=this.getChildren(!1,!0,!0),i=e.length;for(this._time=this._totalTime=0;--i>-1;)e[i]._enabled(!1,!1);return!1!==t&&(this._labels={}),this._uncache(!0)},h.invalidate=function(){for(var t=this._first;t;)t.invalidate(),t=t._next;return this},h._enabled=function(t,i){if(t===this._gc)for(var s=this._first;s;)s._enabled(t,!0),s=s._next;return e.prototype._enabled.call(this,t,i)},h.progress=function(t){return arguments.length?this.totalTime(this.duration()*t,!1):this._time/this.duration()},h.duration=function(t){return arguments.length?(0!==this.duration()&&0!==t&&this.timeScale(this._duration/t),this):(this._dirty&&this.totalDuration(),this._duration)},h.totalDuration=function(t){if(!arguments.length){if(this._dirty){for(var e,i,s=0,r=this._last,n=999999999999;r;)e=r._prev,r._dirty&&r.totalDuration(),r._startTime>n&&this._sortChildren&&!r._paused?this.add(r,r._startTime-r._delay):n=r._startTime,r._startTime<0&&!r._paused&&(s-=r._startTime,this._timeline.smoothChildTiming&&(this._startTime+=r._startTime/this._timeScale),this.shiftChildren(-r._startTime,!1,-9999999999),n=0),(i=r._startTime+r._totalDuration/r._timeScale)>s&&(s=i),r=e;this._duration=this._totalDuration=s,this._dirty=!1}return this._totalDuration}return 0!==this.totalDuration()&&0!==t&&this.timeScale(this._totalDuration/t),this},h.usesFrames=function(){for(var e=this._timeline;e._timeline;)e=e._timeline;return e===t._rootFramesTimeline},h.rawTime=function(){return this._paused||0!==this._totalTime&&this._totalTime!==this._totalDuration?this._totalTime:(this._timeline.rawTime()-this._startTime)*this._timeScale},s},!0),window._gsDefine("TimelineMax",["TimelineLite","MagicMove","easing.Ease"],function(t,e,i){var s=function(e){t.call(this,e),this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._cycle=0,this._yoyo=!0===this.vars.yoyo,this._dirty=!0},r=[],n=new i(null,null,1,0),a=function(t){for(;t;){if(t._paused)return!0;t=t._timeline}return!1},o=s.prototype=new t;return o.constructor=s,o.kill()._gc=!1,s.version="1.9.7",o.invalidate=function(){return this._yoyo=!0===this.vars.yoyo,this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._uncache(!0),t.prototype.invalidate.call(this)},o.addCallback=function(t,i,s,r){return this.add(e.delayedCall(0,t,s,r),i)},o.removeCallback=function(t,e){if(null==e)this._kill(null,t);else for(var i=this.getTweensOf(t,!1),s=i.length,r=this._parseTimeOrLabel(e);--s>-1;)i[s]._startTime===r&&i[s]._enabled(!1,!1);return this},o.tweenTo=function(t,i){i=i||{};var s,a,o={ease:n,overwrite:2,useFrames:this.usesFrames(),immediateRender:!1};for(s in i)o[s]=i[s];return o.time=this._parseTimeOrLabel(t),a=new e(this,Math.abs(Number(o.time)-this._time)/this._timeScale||.001,o),o.onStart=function(){a.target.paused(!0),a.vars.time!==a.target.time()&&a.duration(Math.abs(a.vars.time-a.target.time())/a.target._timeScale),i.onStart&&i.onStart.apply(i.onStartScope||a,i.onStartParams||r)},a},o.tweenFromTo=function(t,e,i){i=i||{},t=this._parseTimeOrLabel(t),i.startAt={onComplete:this.seek,onCompleteParams:[t],onCompleteScope:this},i.immediateRender=!1!==i.immediateRender;var s=this.tweenTo(e,i);return s.duration(Math.abs(s.vars.time-t)/this._timeScale||.001)},o.render=function(t,e,i){this._gc&&this._enabled(!0,!1),this._active=!this._paused;var s,n,a,o,h,l,_=this._dirty?this.totalDuration():this._totalDuration,u=this._duration,p=this._time,c=this._totalTime,f=this._startTime,m=this._timeScale,d=this._rawPrevTime,g=this._paused,v=this._cycle;if(t>=_?(this._locked||(this._totalTime=_,this._cycle=this._repeat),this._reversed||this._hasPausedChild()||(n=!0,o="onComplete",0===u&&(0===t||this._rawPrevTime<0)&&this._rawPrevTime!==t&&this._first&&(h=!0,this._rawPrevTime>0&&(o="onReverseComplete"))),this._rawPrevTime=t,this._yoyo&&0!=(1&this._cycle)?this._time=t=0:(this._time=u,t=u+1e-6)):t<1e-7?(this._locked||(this._totalTime=this._cycle=0),this._time=0,(0!==p||0===u&&this._rawPrevTime>0&&!this._locked)&&(o="onReverseComplete",n=this._reversed),t<0?(this._active=!1,0===u&&this._rawPrevTime>=0&&this._first&&(h=!0)):this._initted||(h=!0),this._rawPrevTime=t,t=0):(this._time=this._rawPrevTime=t,this._locked||(this._totalTime=t,0!==this._repeat&&(l=u+this._repeatDelay,this._cycle=this._totalTime/l>>0,0!==this._cycle&&this._cycle===this._totalTime/l&&this._cycle--,this._time=this._totalTime-this._cycle*l,this._yoyo&&0!=(1&this._cycle)&&(this._time=u-this._time),this._time>u?(this._time=u,t=u+1e-6):this._time<0?this._time=t=0:t=this._time))),this._cycle!==v&&!this._locked){var y=this._yoyo&&0!=(1&v),T=y===(this._yoyo&&0!=(1&this._cycle)),x=this._totalTime,w=this._cycle,b=this._rawPrevTime,P=this._time;this._totalTime=v*u,this._cycle<v?y=!y:this._totalTime+=u,this._time=p,this._rawPrevTime=0===u?d-1e-5:d,this._cycle=v,this._locked=!0,p=y?0:u,this.render(p,e,0===u),e||this._gc||this.vars.onRepeat&&this.vars.onRepeat.apply(this.vars.onRepeatScope||this,this.vars.onRepeatParams||r),T&&(p=y?u+1e-6:-1e-6,this.render(p,!0,!1)),this._time=P,this._totalTime=x,this._cycle=w,this._rawPrevTime=b,this._locked=!1}if(this._time!==p&&this._first||i||h){if(this._initted||(this._initted=!0),0===c&&this.vars.onStart&&0!==this._totalTime&&(e||this.vars.onStart.apply(this.vars.onStartScope||this,this.vars.onStartParams||r)),this._time>=p)for(s=this._first;s&&(a=s._next,!this._paused||g);)(s._active||s._startTime<=this._time&&!s._paused&&!s._gc)&&(s._reversed?s.render((s._dirty?s.totalDuration():s._totalDuration)-(t-s._startTime)*s._timeScale,e,i):s.render((t-s._startTime)*s._timeScale,e,i)),s=a;else for(s=this._last;s&&(a=s._prev,!this._paused||g);)(s._active||s._startTime<=p&&!s._paused&&!s._gc)&&(s._reversed?s.render((s._dirty?s.totalDuration():s._totalDuration)-(t-s._startTime)*s._timeScale,e,i):s.render((t-s._startTime)*s._timeScale,e,i)),s=a;this._onUpdate&&(e||this._onUpdate.apply(this.vars.onUpdateScope||this,this.vars.onUpdateParams||r)),o&&(this._locked||this._gc||f!==this._startTime&&m===this._timeScale||(0===this._time||_>=this.totalDuration())&&(n&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!e&&this.vars[o]&&this.vars[o].apply(this.vars[o+"Scope"]||this,this.vars[o+"Params"]||r)))}else c!==this._totalTime&&this._onUpdate&&(e||this._onUpdate.apply(this.vars.onUpdateScope||this,this.vars.onUpdateParams||r))},o.getActive=function(t,e,i){null==t&&(t=!0),null==e&&(e=!0),null==i&&(i=!1);var s,r,n=[],o=this.getChildren(t,e,i),h=0,l=o.length;for(s=0;s<l;s++)(r=o[s])._paused||r._timeline._time>=r._startTime&&r._timeline._time<r._startTime+r._totalDuration/r._timeScale&&(a(r._timeline)||(n[h++]=r));return n},o.getLabelAfter=function(t){t||0!==t&&(t=this._time);var e,i=this.getLabelsArray(),s=i.length;for(e=0;e<s;e++)if(i[e].time>t)return i[e].name;return null},o.getLabelBefore=function(t){null==t&&(t=this._time);for(var e=this.getLabelsArray(),i=e.length;--i>-1;)if(e[i].time<t)return e[i].name;return null},o.getLabelsArray=function(){var t,e=[],i=0;for(t in this._labels)e[i++]={time:this._labels[t],name:t};return e.sort(function(t,e){return t.time-e.time}),e},o.progress=function(t){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&0!=(1&this._cycle)?1-t:t)+this._cycle*(this._duration+this._repeatDelay),!1):this._time/this.duration()},o.totalProgress=function(t){return arguments.length?this.totalTime(this.totalDuration()*t,!1):this._totalTime/this.totalDuration()},o.totalDuration=function(e){return arguments.length?-1===this._repeat?this:this.duration((e-this._repeat*this._repeatDelay)/(this._repeat+1)):(this._dirty&&(t.prototype.totalDuration.call(this),this._totalDuration=-1===this._repeat?999999999999:this._duration*(this._repeat+1)+this._repeatDelay*this._repeat),this._totalDuration)},o.time=function(t,e){return arguments.length?(this._dirty&&this.totalDuration(),t>this._duration&&(t=this._duration),this._yoyo&&0!=(1&this._cycle)?t=this._duration-t+this._cycle*(this._duration+this._repeatDelay):0!==this._repeat&&(t+=this._cycle*(this._duration+this._repeatDelay)),this.totalTime(t,e)):this._time},o.repeat=function(t){return arguments.length?(this._repeat=t,this._uncache(!0)):this._repeat},o.repeatDelay=function(t){return arguments.length?(this._repeatDelay=t,this._uncache(!0)):this._repeatDelay},o.yoyo=function(t){return arguments.length?(this._yoyo=t,this):this._yoyo},o.currentLabel=function(t){return arguments.length?this.seek(t,!0):this.getLabelBefore(this._time+1e-8)},s},!0),function(){var t=180/Math.PI,e=Math.PI/180,i=[],s=[],r=[],n={},a=function(t,e,i,s){this.a=t,this.b=e,this.c=i,this.d=s,this.da=s-t,this.ca=i-t,this.ba=e-t},o=function(t,e,i,s){var r={a:t},n={},a={},o={c:s},h=(t+e)/2,l=(e+i)/2,_=(i+s)/2,u=(h+l)/2,p=(l+_)/2,c=(p-u)/8;return r.b=h+(t-h)/4,n.b=u+c,r.c=n.a=(r.b+n.b)/2,n.c=a.a=(u+p)/2,a.b=p-c,o.b=_+(s-_)/4,a.c=o.a=(a.b+o.b)/2,[r,n,a,o]},h=function(t,e,n,a,h){var l,_,u,p,c,f,m,d,g,v,y,T,x,w=t.length-1,b=0,P=t[0].a;for(l=0;l<w;l++)_=(c=t[b]).a,u=c.d,p=t[b+1].d,h?(y=i[l],x=((T=s[l])+y)*e*.25/(a?.5:r[l]||.5),d=u-((f=u-(u-_)*(a?.5*e:0!==y?x/y:0))+(((m=u+(p-u)*(a?.5*e:0!==T?x/T:0))-f)*(3*y/(y+T)+.5)/4||0))):d=u-((f=u-(u-_)*e*.5)+(m=u+(p-u)*e*.5))/2,f+=d,m+=d,c.c=g=f,c.b=0!==l?P:P=c.a+.6*(c.c-c.a),c.da=u-_,c.ca=g-_,c.ba=P-_,n?(v=o(_,P,g,u),t.splice(b,1,v[0],v[1],v[2],v[3]),b+=4):b++,P=m;(c=t[b]).b=P,c.c=P+.4*(c.d-P),c.da=c.d-c.a,c.ca=c.c-c.a,c.ba=P-c.a,n&&(v=o(c.a,P,c.c,c.d),t.splice(b,1,v[0],v[1],v[2],v[3]))},l=function(t,e,r,n){var o,h,l,_,u,p,c=[];if(n)for(h=(t=[n].concat(t)).length;--h>-1;)"string"==typeof(p=t[h][e])&&"="===p.charAt(1)&&(t[h][e]=n[e]+Number(p.charAt(0)+p.substr(2)));if((o=t.length-2)<0)return c[0]=new a(t[0][e],0,0,t[o<-1?0:1][e]),c;for(h=0;h<o;h++)l=t[h][e],_=t[h+1][e],c[h]=new a(l,0,0,_),r&&(u=t[h+2][e],i[h]=(i[h]||0)+(_-l)*(_-l),s[h]=(s[h]||0)+(u-_)*(u-_));return c[h]=new a(t[h][e],0,0,t[h+1][e]),c},_=function(t,e,a,o,_,u){var p,c,f,m,d,g,v,y,T={},x=[],w=u||t[0];_="string"==typeof _?","+_+",":",x,y,z,left,top,right,bottom,marginTop,marginLeft,marginRight,marginBottom,paddingLeft,paddingTop,paddingRight,paddingBottom,backgroundPosition,backgroundPosition_y,",null==e&&(e=1);for(c in t[0])x.push(c);if(t.length>1){for(y=t[t.length-1],v=!0,p=x.length;--p>-1;)if(c=x[p],Math.abs(w[c]-y[c])>.05){v=!1;break}v&&(t=t.concat(),u&&t.unshift(u),t.push(t[1]),u=t[t.length-3])}for(i.length=s.length=r.length=0,p=x.length;--p>-1;)c=x[p],n[c]=-1!==_.indexOf(","+c+","),T[c]=l(t,c,n[c],u);for(p=i.length;--p>-1;)i[p]=Math.sqrt(i[p]),s[p]=Math.sqrt(s[p]);if(!o){for(p=x.length;--p>-1;)if(n[c])for(g=(f=T[x[p]]).length-1,m=0;m<g;m++)d=f[m+1].da/s[m]+f[m].da/i[m],r[m]=(r[m]||0)+d*d;for(p=r.length;--p>-1;)r[p]=Math.sqrt(r[p])}for(p=x.length,m=a?4:1;--p>-1;)f=T[c=x[p]],h(f,e,a,o,n[c]),v&&(f.splice(0,m),f.splice(f.length-m,m));return T},u=function(t,e,i){var s,r,n,o,h,l,_,u,p,c,f,m={},d="cubic"===(e=e||"soft")?3:2,g="soft"===e,v=[];if(g&&i&&(t=[i].concat(t)),null==t||t.length<d+1)throw"invalid Bezier data";for(p in t[0])v.push(p);for(l=v.length;--l>-1;){for(m[p=v[l]]=h=[],c=0,u=t.length,_=0;_<u;_++)s=null==i?t[_][p]:"string"==typeof(f=t[_][p])&&"="===f.charAt(1)?i[p]+Number(f.charAt(0)+f.substr(2)):Number(f),g&&_>1&&_<u-1&&(h[c++]=(s+h[c-2])/2),h[c++]=s;for(u=c-d+1,c=0,_=0;_<u;_+=d)s=h[_],r=h[_+1],n=h[_+2],o=2===d?0:h[_+3],h[c++]=f=3===d?new a(s,r,n,o):new a(s,(2*r+s)/3,(2*r+n)/3,n);h.length=c}return m},p=function(t,e,i){for(var s,r,n,a,o,h,l,_,u,p,c,f=1/i,m=t.length;--m>-1;)for(n=(p=t[m]).a,a=p.d-n,o=p.c-n,h=p.b-n,s=r=0,_=1;_<=i;_++)s=r-(r=((l=f*_)*l*a+3*(u=1-l)*(l*o+u*h))*l),e[c=m*i+_-1]=(e[c]||0)+s*s},c=function(t,e){var i,s,r,n,a=[],o=[],h=0,l=0,_=(e=e>>0||6)-1,u=[],c=[];for(i in t)p(t[i],a,e);for(r=a.length,s=0;s<r;s++)h+=Math.sqrt(a[s]),c[n=s%e]=h,n===_&&(l+=h,u[n=s/e>>0]=c,o[n]=l,h=0,c=[]);return{length:l,lengths:o,segments:u}},f=window._gsDefine.plugin({propName:"bezier",priority:-1,API:2,global:!0,init:function(t,e,i){this._target=t,e instanceof Array&&(e={values:e}),this._func={},this._round={},this._props=[],this._timeRes=null==e.timeResolution?6:parseInt(e.timeResolution,10);var s,r,n,a,o,h=e.values||[],l={},p=h[0],f=e.autoRotate||i.vars.orientToBezier;this._autoRotate=f?f instanceof Array?f:[["x","y","rotation",!0===f?0:Number(f)||0]]:null;for(s in p)this._props.push(s);for(n=this._props.length;--n>-1;)s=this._props[n],this._overwriteProps.push(s),r=this._func[s]="function"==typeof t[s],l[s]=r?t[s.indexOf("set")||"function"!=typeof t["get"+s.substr(3)]?s:"get"+s.substr(3)]():parseFloat(t[s]),o||l[s]!==h[0][s]&&(o=l);if(this._beziers="cubic"!==e.type&&"quadratic"!==e.type&&"soft"!==e.type?_(h,isNaN(e.curviness)?1:e.curviness,!1,"thruBasic"===e.type,e.correlate,o):u(h,e.type,l),this._segCount=this._beziers[s].length,this._timeRes){var m=c(this._beziers,this._timeRes);this._length=m.length,this._lengths=m.lengths,this._segments=m.segments,this._l1=this._li=this._s1=this._si=0,this._l2=this._lengths[0],this._curSeg=this._segments[0],this._s2=this._curSeg[0],this._prec=1/this._curSeg.length}if(f=this._autoRotate)for(f[0]instanceof Array||(this._autoRotate=f=[f]),n=f.length;--n>-1;)for(a=0;a<3;a++)s=f[n][a],this._func[s]="function"==typeof t[s]&&t[s.indexOf("set")||"function"!=typeof t["get"+s.substr(3)]?s:"get"+s.substr(3)];return!0},set:function(e){var i,s,r,n,a,o,h,l,_,u,p=this._segCount,c=this._func,f=this._target;if(this._timeRes){if(_=this._lengths,u=this._curSeg,e*=this._length,r=this._li,e>this._l2&&r<p-1){for(l=p-1;r<l&&(this._l2=_[++r])<=e;);this._l1=_[r-1],this._li=r,this._curSeg=u=this._segments[r],this._s2=u[this._s1=this._si=0]}else if(e<this._l1&&r>0){for(;r>0&&(this._l1=_[--r])>=e;);0===r&&e<this._l1?this._l1=0:r++,this._l2=_[r],this._li=r,this._curSeg=u=this._segments[r],this._s1=u[(this._si=u.length-1)-1]||0,this._s2=u[this._si]}if(i=r,e-=this._l1,r=this._si,e>this._s2&&r<u.length-1){for(l=u.length-1;r<l&&(this._s2=u[++r])<=e;);this._s1=u[r-1],this._si=r}else if(e<this._s1&&r>0){for(;r>0&&(this._s1=u[--r])>=e;);0===r&&e<this._s1?this._s1=0:r++,this._s2=u[r],this._si=r}o=(r+(e-this._s1)/(this._s2-this._s1))*this._prec}else o=(e-(i=e<0?0:e>=1?p-1:p*e>>0)*(1/p))*p;for(s=1-o,r=this._props.length;--r>-1;)n=this._props[r],h=(o*o*(a=this._beziers[n][i]).da+3*s*(o*a.ca+s*a.ba))*o+a.a,this._round[n]&&(h=h+(h>0?.5:-.5)>>0),c[n]?f[n](h):"x"==n?f.setX(h):"y"==n?f.setY(h):"z"==n?f.setZ(h):"angleX"==n?f.setAngleX(h):"angleY"==n?f.setAngleY(h):"angleZ"==n?f.setAngleZ(h):"w"==n?f.setWidth(h):"h"==n?f.setHeight(h):"alpha"==n?f.setAlpha(h):"scale"==n?f.setScale2(h):f[n]=h;if(this._autoRotate){var m,d,g,v,y,T,x,w=this._autoRotate;for(r=w.length;--r>-1;)n=w[r][2],T=w[r][3]||0,x=!0===w[r][4]?1:t,a=this._beziers[w[r][0]],m=this._beziers[w[r][1]],a&&m&&(a=a[i],m=m[i],d=a.a+(a.b-a.a)*o,d+=((v=a.b+(a.c-a.b)*o)-d)*o,v+=(a.c+(a.d-a.c)*o-v)*o,g=m.a+(m.b-m.a)*o,g+=((y=m.b+(m.c-m.b)*o)-g)*o,y+=(m.c+(m.d-m.c)*o-y)*o,h=Math.atan2(y-g,v-d)*x+T,c[n]?f[n](h):f[n]=h)}}}),m=f.prototype;f.bezierThrough=_,f.cubicToQuadratic=o,f._autoCSS=!0,f.quadraticToCubic=function(t,e,i){return new a(t,(2*e+t)/3,(2*e+i)/3,i)},f._cssRegister=function(){var t=window._gsDefine.globals.CSSPlugin;if(t){var i=t._internals,s=i._parseToProxy,r=i._setPluginRatio,n=i.CSSPropTween;i._registerComplexSpecialProp("bezier",{parser:function(t,i,a,o,h,l){i instanceof Array&&(i={values:i}),l=new f;var _,u,p,c=i.values,m=c.length-1,d=[],g={};if(m<0)return h;for(_=0;_<=m;_++)p=s(t,c[_],o,h,l,m!==_),d[_]=p.end;for(u in i)g[u]=i[u];return g.values=d,h=new n(t,"bezier",0,0,p.pt,2),h.data=p,h.plugin=l,h.setRatio=r,0===g.autoRotate&&(g.autoRotate=!0),!g.autoRotate||g.autoRotate instanceof Array||(_=!0===g.autoRotate?0:Number(g.autoRotate)*e,g.autoRotate=null!=p.end.left?[["left","top","rotation",_,!0]]:null!=p.end.x&&[["x","y","rotation",_,!0]]),g.autoRotate&&(o._transform||o._enableTransforms(!1),p.autoRotate=o._target._gsTransform),l._onInitTween(p.proxy,g,o._tween),h}})}},m._roundProps=function(t,e){for(var i=this._overwriteProps,s=i.length;--s>-1;)(t[i[s]]||t.bezier||t.bezierThrough)&&(this._round[i[s]]=e)},m._kill=function(t){var e,i,s=this._props;for(e in this._beziers)if(e in t)for(delete this._beziers[e],delete this._func[e],i=s.length;--i>-1;)s[i]===e&&s.splice(i,1);return this._super._kill.call(this,t)}}(),window._gsDefine("plugins.CSSPlugin",["plugins.TweenPlugin","MagicMove"],function(t,e){var i,s,r,n,a=function(){t.call(this,"css"),this._overwriteProps.length=0},o={},h=a.prototype=new t("css");h.constructor=a,a.version="1.9.7",a.API=2,a.defaultTransformPerspective=0,h="px",a.suffixMap={top:h,right:h,bottom:h,left:h,width:h,height:h,fontSize:h,padding:h,margin:h,perspective:h};var l,_,u,p,c,f,m=/(?:\d|\-\d|\.\d|\-\.\d)+/g,d=/(?:\d|\-\d|\.\d|\-\.\d|\+=\d|\-=\d|\+=.\d|\-=\.\d)+/g,g=/(?:\+=|\-=|\-|\b)[\d\-\.]+[a-zA-Z0-9]*(?:%|\b)/gi,v=/[^\d\-\.]/g,y=/(?:\d|\-|\+|=|#|\.)*/g,T=/opacity *= *([^)]*)/,x=/opacity:([^;]*)/,w=/alpha\(opacity *=.+?\)/i,b=/^(rgb|hsl)/,P=/([A-Z])/g,R=/-([a-z])/gi,S=/(^(?:url\(\"|url\())|(?:(\"\))$|\)$)/gi,k=function(t,e){return e.toUpperCase()},A=/(?:Left|Right|Width)/i,C=/(M11|M12|M21|M22)=[\d\-\.e]+/gi,M=/progid\:DXImageTransform\.Microsoft\.Matrix\(.+?\)/i,O=/,(?=[^\)]*(?:\(|$))/gi,D=Math.PI/180,I=180/Math.PI,F={},X=document,N=X.createElement("div"),E=X.createElement("img"),L=a._internals={_specialProps:o},z=navigator.userAgent,Y=function(){var t,e=z.indexOf("Android"),i=X.createElement("div");return u=-1!==z.indexOf("Safari")&&-1===z.indexOf("Chrome")&&(-1===e||Number(z.substr(e+8,1))>3),c=u&&Number(z.substr(z.indexOf("Version/")+8,1))<6,p=-1!==z.indexOf("Firefox"),/MSIE ([0-9]{1,}[\.0-9]{0,})/.exec(z),f=parseFloat(RegExp.$1),i.innerHTML="<a style='top:1px;opacity:.55;'>a</a>",!!(t=i.getElementsByTagName("a")[0])&&/^0.55/.test(t.style.opacity)}(),U=function(t){return T.test("string"==typeof t?t:(t.currentStyle?t.currentStyle.filter:t.style.filter)||"")?parseFloat(RegExp.$1)/100:1},B=function(t){window.console&&console.log(t)},j="",V="",Z=function(t,e){var i,s,r=(e=e||N).style;if(void 0!==r[t])return t;for(t=t.charAt(0).toUpperCase()+t.substr(1),i=["O","Moz","ms","Ms","Webkit"],s=5;--s>-1&&void 0===r[i[s]+t];);return s>=0?(V=3===s?"ms":i[s],j="-"+V.toLowerCase()+"-",V+t):null},q=X.defaultView?X.defaultView.getComputedStyle:function(){},W=a.getStyle=function(t,e,i,s,r){var n;return Y||"opacity"!==e?(!s&&t.style[e]?n=t.style[e]:(i=i||q(t,null))?n=(t=i.getPropertyValue(e.replace(P,"-$1").toLowerCase()))||i.length?t:i[e]:t.currentStyle&&(n=(i=t.currentStyle)[e]),null==r||n&&"none"!==n&&"auto"!==n&&"auto auto"!==n?n:r):U(t)},$=function(t,e,i,s,r){if("px"===s||!s)return i;if("auto"===s||!i)return 0;var n,a=A.test(e),o=t,h=N.style,l=i<0;return l&&(i=-i),"%"===s&&-1!==e.indexOf("border")?n=i/100*(a?t.clientWidth:t.clientHeight):(h.cssText="border-style:solid; border-width:0; position:absolute; line-height:0;","%"!==s&&o.appendChild?h[a?"borderLeftWidth":"borderTopWidth"]=i+s:(o=t.parentNode||X.body,h[a?"width":"height"]=i+s),o.appendChild(N),n=parseFloat(N[a?"offsetWidth":"offsetHeight"]),o.removeChild(N),0!==n||r||(n=$(t,e,i,s,!0))),l?-n:n},G=function(t,e,i){if("absolute"!==W(t,"position",i))return 0;var s="left"===e?"Left":"Top",r=W(t,"margin"+s,i);return t["offset"+s]-($(t,e,parseFloat(r),r.replace(y,""))||0)},H=function(t,e){var i,s,r={};if(e=e||q(t,null))if(i=e.length)for(;--i>-1;)r[e[i].replace(R,k)]=e.getPropertyValue(e[i]);else for(i in e)r[i]=e[i];else if(e=t.currentStyle||t.style)for(i in e)r[i.replace(R,k)]=e[i];return Y||(r.opacity=U(t)),s=wt(t,e,!1),r.rotation=s.rotation*I,r.skewX=s.skewX*I,r.scaleX=s.scaleX,r.scaleY=s.scaleY,r.x=s.x,r.y=s.y,xt&&(r.z=s.z,r.rotationX=s.rotationX*I,r.rotationY=s.rotationY*I,r.scaleZ=s.scaleZ),r.filters&&delete r.filters,r},Q=function(t,e,i,s,r){var n,a,o,h={},l=t.style;for(a in i)"cssText"!==a&&"length"!==a&&isNaN(a)&&(e[a]!==(n=i[a])||r&&r[a])&&-1===a.indexOf("Origin")&&("number"!=typeof n&&"string"!=typeof n||(h[a]="auto"!==n||"left"!==a&&"top"!==a?""!==n&&"auto"!==n&&"none"!==n||"string"!=typeof e[a]||""===e[a].replace(v,"")?n:0:G(t,a),void 0!==l[a]&&(o=new ut(l,a,l[a],o))));if(s)for(a in s)"className"!==a&&(h[a]=s[a]);return{difs:h,firstMPT:o}},K={width:["Left","Right"],height:["Top","Bottom"]},J=["marginLeft","marginRight","marginTop","marginBottom"],tt=function(t,e,i){var s=parseFloat("width"===e?t.offsetWidth:t.offsetHeight),r=K[e],n=r.length;for(i=i||q(t,null);--n>-1;)s-=parseFloat(W(t,"padding"+r[n],i,!0))||0,s-=parseFloat(W(t,"border"+r[n]+"Width",i,!0))||0;return s},et=function(t,e){null!=t&&""!==t&&"auto"!==t&&"auto auto"!==t||(t="0 0");var i=t.split(" "),s=-1!==t.indexOf("left")?"0%":-1!==t.indexOf("right")?"100%":i[0],r=-1!==t.indexOf("top")?"0%":-1!==t.indexOf("bottom")?"100%":i[1];return null==r?r="0":"center"===r&&(r="50%"),("center"===s||isNaN(parseFloat(s)))&&(s="50%"),e&&(e.oxp=-1!==s.indexOf("%"),e.oyp=-1!==r.indexOf("%"),e.oxr="="===s.charAt(1),e.oyr="="===r.charAt(1),e.ox=parseFloat(s.replace(v,"")),e.oy=parseFloat(r.replace(v,""))),s+" "+r+(i.length>2?" "+i[2]:"")},it=function(t,e){return"string"==typeof t&&"="===t.charAt(1)?parseInt(t.charAt(0)+"1",10)*parseFloat(t.substr(2)):parseFloat(t)-parseFloat(e)},st=function(t,e){return null==t?e:"string"==typeof t&&"="===t.charAt(1)?parseInt(t.charAt(0)+"1",10)*Number(t.substr(2))+e:parseFloat(t)},rt=function(t,e,i,s){var r,n,a,o;return null==t?o=e:"number"==typeof t?o=t*D:(r=2*Math.PI,n=t.split("_"),a=Number(n[0].replace(v,""))*(-1===t.indexOf("rad")?D:1)-("="===t.charAt(1)?0:e),n.length&&(s&&(s[i]=e+a),-1!==t.indexOf("short")&&(a%=r)!==a%(r/2)&&(a=a<0?a+r:a-r),-1!==t.indexOf("_cw")&&a<0?a=(a+9999999999*r)%r-(a/r|0)*r:-1!==t.indexOf("ccw")&&a>0&&(a=(a-9999999999*r)%r-(a/r|0)*r)),o=e+a),o<1e-6&&o>-1e-6&&(o=0),o},nt={aqua:[0,255,255],lime:[0,255,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,255],navy:[0,0,128],white:[255,255,255],fuchsia:[255,0,255],olive:[128,128,0],yellow:[255,255,0],orange:[255,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[255,0,0],pink:[255,192,203],cyan:[0,255,255],transparent:[255,255,255,0]},at=function(t,e,i){return t=t<0?t+1:t>1?t-1:t,255*(6*t<1?e+(i-e)*t*6:t<.5?i:3*t<2?e+(i-e)*(2/3-t)*6:e)+.5|0},ot=function(t){var e,i,s,r,n,a;return t&&""!==t?"number"==typeof t?[t>>16,t>>8&255,255&t]:(","===t.charAt(t.length-1)&&(t=t.substr(0,t.length-1)),nt[t]?nt[t]:"#"===t.charAt(0)?(4===t.length&&(t="#"+(e=t.charAt(1))+e+(i=t.charAt(2))+i+(s=t.charAt(3))+s),t=parseInt(t.substr(1),16),[t>>16,t>>8&255,255&t]):"hsl"===t.substr(0,3)?(t=t.match(m),r=Number(t[0])%360/360,n=Number(t[1])/100,a=Number(t[2])/100,i=a<=.5?a*(n+1):a+n-a*n,e=2*a-i,t.length>3&&(t[3]=Number(t[3])),t[0]=at(r+1/3,e,i),t[1]=at(r,e,i),t[2]=at(r-1/3,e,i),t):(t=t.match(m)||nt.transparent,t[0]=Number(t[0]),t[1]=Number(t[1]),t[2]=Number(t[2]),t.length>3&&(t[3]=Number(t[3])),t)):nt.black},ht="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#.+?\\b";for(h in nt)ht+="|"+h+"\\b";ht=new RegExp(ht+")","gi");var lt=function(t,e,i,s){if(null==t)return function(t){return t};var r,n=e?(t.match(ht)||[""])[0]:"",a=t.split(n).join("").match(g)||[],o=t.substr(0,t.indexOf(a[0])),h=")"===t.charAt(t.length-1)?")":"",l=-1!==t.indexOf(" ")?" ":",",_=a.length,u=_>0?a[0].replace(m,""):"";return _?r=e?function(t){var e,p,c,f;if("number"==typeof t)t+=u;else if(s&&O.test(t)){for(f=t.replace(O,"|").split("|"),c=0;c<f.length;c++)f[c]=r(f[c]);return f.join(",")}if(e=(t.match(ht)||[n])[0],p=t.split(e).join("").match(g)||[],c=p.length,_>c--)for(;++c<_;)p[c]=i?p[(c-1)/2|0]:a[c];return o+p.join(l)+l+e+h+(-1!==t.indexOf("inset")?" inset":"")}:function(t){var e,n,p;if("number"==typeof t)t+=u;else if(s&&O.test(t)){for(n=t.replace(O,"|").split("|"),p=0;p<n.length;p++)n[p]=r(n[p]);return n.join(",")}if(e=t.match(g)||[],p=e.length,_>p--)for(;++p<_;)e[p]=i?e[(p-1)/2|0]:a[p];return o+e.join(l)+h}:function(t){return t}},_t=function(t){return t=t.split(","),function(e,i,s,r,n,a,o){var h,l=(i+"").split(" ");for(o={},h=0;h<4;h++)o[t[h]]=l[h]=l[h]||l[(h-1)/2>>0];return r.parse(e,o,n,a)}},ut=(L._setPluginRatio=function(t){this.plugin.setRatio(t);for(var e,i,s,r,n=this.data,a=n.proxy,o=n.firstMPT;o;)e=a[o.v],o.r?e=e>0?e+.5|0:e-.5|0:e<1e-6&&e>-1e-6&&(e=0),o.t[o.p]=e,o=o._next;if(n.autoRotate&&(n.autoRotate.rotation=a.rotation),1===t)for(o=n.firstMPT;o;){if((i=o.t).type){if(1===i.type){for(r=i.xs0+i.s+i.xs1,s=1;s<i.l;s++)r+=i["xn"+s]+i["xs"+(s+1)];i.e=r}}else i.e=i.s+i.xs0;o=o._next}},function(t,e,i,s,r){this.t=t,this.p=e,this.v=i,this.r=r,s&&(s._prev=this,this._next=s)}),pt=(L._parseToProxy=function(t,e,i,s,r,n){var a,o,h,l,_,u=s,p={},c={},f=i._transform,m=F;for(i._transform=null,F=e,s=_=i.parse(t,e,s,r),F=m,n&&(i._transform=f,u&&(u._prev=null,u._prev&&(u._prev._next=null)));s&&s!==u;){if(s.type<=1&&(o=s.p,c[o]=s.s+s.c,p[o]=s.s,n||(l=new ut(s,"s",o,l,s.r),s.c=0),1===s.type))for(a=s.l;--a>0;)h="xn"+a,c[o=s.p+"_"+h]=s.data[h],p[o]=s[h],n||(l=new ut(s,h,o,l,s.rxp[h]));s=s._next}return{proxy:p,end:c,firstMPT:l,pt:_}},L.CSSPropTween=function(t,e,s,r,a,o,h,l,_,u,p){this.t=t,this.p=e,this.s=s,this.c=r,this.n=h||"css_"+e,t instanceof pt||n.push(this.n),this.r=l,this.type=o||0,_&&(this.pr=_,i=!0),this.b=void 0===u?s:u,this.e=void 0===p?s+r:p,a&&(this._next=a,a._prev=this)}),ct=a.parseComplex=function(t,e,i,s,r,n,a,o,h,_){i=i||n||"",a=new pt(t,e,0,0,a,_?2:1,null,!1,o,i,s),s+="";var u,p,c,f,g,v,y,T,x,w,P,R,S=i.split(", ").join(",").split(" "),k=s.split(", ").join(",").split(" "),A=S.length,C=!1!==l;for(-1===s.indexOf(",")&&-1===i.indexOf(",")||(S=S.join(" ").replace(O,", ").split(" "),k=k.join(" ").replace(O,", ").split(" "),A=S.length),A!==k.length&&(A=(S=(n||"").split(" ")).length),a.plugin=h,a.setRatio=_,u=0;u<A;u++)if(f=S[u],g=k[u],(T=parseFloat(f))||0===T)a.appendXtra("",T,it(g,T),g.replace(d,""),C&&-1!==g.indexOf("px"),!0);else if(r&&("#"===f.charAt(0)||nt[f]||b.test(f)))R=","===g.charAt(g.length-1)?"),":")",f=ot(f),g=ot(g),(x=f.length+g.length>6)&&!Y&&0===g[3]?(a["xs"+a.l]+=a.l?" transparent":"transparent",a.e=a.e.split(k[u]).join("transparent")):(Y||(x=!1),a.appendXtra(x?"rgba(":"rgb(",f[0],g[0]-f[0],",",!0,!0).appendXtra("",f[1],g[1]-f[1],",",!0).appendXtra("",f[2],g[2]-f[2],x?",":R,!0),x&&(f=f.length<4?1:f[3],a.appendXtra("",f,(g.length<4?1:g[3])-f,R,!1)));else if(v=f.match(m)){if(!(y=g.match(d))||y.length!==v.length)return a;for(c=0,p=0;p<v.length;p++)P=v[p],w=f.indexOf(P,c),a.appendXtra(f.substr(c,w-c),Number(P),it(y[p],P),"",C&&"px"===f.substr(w+P.length,2),0===p),c=w+P.length;a["xs"+a.l]+=f.substr(c)}else a["xs"+a.l]+=a.l?" "+f:f;if(-1!==s.indexOf("=")&&a.data){for(R=a.xs0+a.data.s,u=1;u<a.l;u++)R+=a["xs"+u]+a.data["xn"+u];a.e=R+a["xs"+u]}return a.l||(a.type=-1,a.xs0=a.e),a.xfirst||a},ft=9;for((h=pt.prototype).l=h.pr=0;--ft>0;)h["xn"+ft]=0,h["xs"+ft]="";h.xs0="",h._next=h._prev=h.xfirst=h.data=h.plugin=h.setRatio=h.rxp=null,h.appendXtra=function(t,e,i,s,r,n){var a=this,o=a.l;return a["xs"+o]+=n&&o?" "+t:t||"",i||0===o||a.plugin?(a.l++,a.type=a.setRatio?2:1,a["xs"+a.l]=s||"",o>0?(a.data["xn"+o]=e+i,a.rxp["xn"+o]=r,a["xn"+o]=e,a.plugin||(a.xfirst=new pt(a,"xn"+o,e,i,a.xfirst||a,0,a.n,r,a.pr),a.xfirst.xs0=0),a):(a.data={s:e+i},a.rxp={},a.s=e,a.c=i,a.r=r,a)):(a["xs"+o]+=e+(s||""),a)};var mt=function(t,e){e=e||{},this.p=e.prefix?Z(t)||t:t,o[t]=o[this.p]=this,this.format=e.formatter||lt(e.defaultValue,e.color,e.collapsible,e.multi),e.parser&&(this.parse=e.parser),this.clrs=e.color,this.multi=e.multi,this.keyword=e.keyword,this.dflt=e.defaultValue,this.pr=e.priority||0},dt=L._registerComplexSpecialProp=function(t,e,i){"object"!=typeof e&&(e={parser:i});var s,r=t.split(","),n=e.defaultValue;for(i=i||[n],s=0;s<r.length;s++)e.prefix=0===s&&e.prefix,e.defaultValue=i[s]||n,new mt(r[s],e)};(h=mt.prototype).parseComplex=function(t,e,i,s,r,n){var a,o,h,l,_,u=this.keyword;if(this.multi&&(O.test(i)||O.test(e)?(o=e.replace(O,"|").split("|"),h=i.replace(O,"|").split("|")):u&&(o=[e],h=[i])),h){for(l=h.length>o.length?h.length:o.length,a=0;a<l;a++)e=o[a]=o[a]||this.dflt,i=h[a]=h[a]||this.dflt,u&&e.indexOf(u)!==(_=i.indexOf(u))&&((i=-1===_?h:o)[a]+=" "+u);e=o.join(", "),i=h.join(", ")}return ct(t,this.p,e,i,this.clrs,this.dflt,s,this.pr,r,n)},h.parse=function(t,e,i,s,n,a,o){return this.parseComplex(t.style,this.format(W(t,this.p,r,!1,this.dflt)),this.format(e),n,a)},a.registerSpecialProp=function(t,e,i){dt(t,{parser:function(t,s,r,n,a,o,h){var l=new pt(t,r,0,0,a,2,r,!1,i);return l.plugin=o,l.setRatio=e(t,s,n._tween,r),l},priority:i})};var gt="scaleX,scaleY,scaleZ,x,y,z,skewX,rotation,rotationX,rotationY,perspective".split(","),vt=Z("transform"),yt=j+"transform",Tt=Z("transformOrigin"),xt=null!==Z("perspective"),wt=function(t,e,i){var s,r,n,o,h,l,_,u,p,c,f,m,d,g=i?t._gsTransform||{skewY:0}:{skewY:0},v=g.scaleX<0,y=1e-4-Math.PI,T=Math.PI-1e-4,x=xt?parseFloat(W(t,Tt,e,!1,"0 0 0").split(" ")[2])||g.zOrigin||0:0;if(vt)s=W(t,yt,e,!0);else if(t.currentStyle)if((s=t.currentStyle.filter.match(C))&&4===s.length)s=[s[0].substr(4),Number(s[2].substr(4)),Number(s[1].substr(4)),s[3].substr(4),g.x||0,g.y||0].join(",");else{if(null!=g.x)return g;s=""}for(n=(r=(s||"").match(/(?:\-|\b)[\d\-\.e]+\b/gi)||[]).length;--n>-1;)o=Number(r[n]),r[n]=(h=o-(o|=0))?(1e5*h+(h<0?-.5:.5)|0)/1e5+o:o;if(16===r.length){var w=r[8],b=r[9],P=r[10],R=r[12],S=r[13],k=r[14];if(g.zOrigin&&(R=w*(k=-g.zOrigin)-r[12],S=b*k-r[13],k=P*k+g.zOrigin-r[14]),!i||null==g.rotationX){var A,M,O,D,I,F,X,N=r[0],E=r[1],L=r[2],z=r[3],Y=r[4],U=r[5],B=r[6],j=r[7],V=r[11],Z=g.rotationX=Math.atan2(B,P),q=Z<y||Z>T;Z&&(A=Y*(D=Math.cos(-Z))+w*(I=Math.sin(-Z)),M=U*D+b*I,O=B*D+P*I,w=Y*-I+w*D,b=U*-I+b*D,P=B*-I+P*D,V=j*-I+V*D,Y=A,U=M,B=O),(Z=g.rotationY=Math.atan2(w,N))&&(F=Z<y||Z>T,M=E*(D=Math.cos(-Z))-b*(I=Math.sin(-Z)),O=L*D-P*I,b=E*I+b*D,P=L*I+P*D,V=z*I+V*D,N=A=N*D-w*I,E=M,L=O),(Z=g.rotation=Math.atan2(E,U))&&(X=Z<y||Z>T,N=N*(D=Math.cos(-Z))+Y*(I=Math.sin(-Z)),M=E*D+U*I,U=E*-I+U*D,B=L*-I+B*D,E=M),X&&q?g.rotation=g.rotationX=0:X&&F?g.rotation=g.rotationY=0:F&&q&&(g.rotationY=g.rotationX=0),g.scaleX=(1e5*Math.sqrt(N*N+E*E)+.5|0)/1e5,g.scaleY=(1e5*Math.sqrt(U*U+b*b)+.5|0)/1e5,g.scaleZ=(1e5*Math.sqrt(B*B+P*P)+.5|0)/1e5,g.skewX=0,g.perspective=V?1/(V<0?-V:V):0,g.x=R,g.y=S,g.z=k}}else if(!(xt&&0!==r.length&&g.x===r[4]&&g.y===r[5]&&(g.rotationX||g.rotationY)||void 0!==g.x&&"none"===W(t,"display",e))){var $=r.length>=6,G=$?r[0]:1,H=r[1]||0,Q=r[2]||0,K=$?r[3]:1;g.x=r[4]||0,g.y=r[5]||0,l=Math.sqrt(G*G+H*H),_=Math.sqrt(K*K+Q*Q),u=G||H?Math.atan2(H,G):g.rotation||0,p=Q||K?Math.atan2(Q,K)+u:g.skewX||0,c=l-Math.abs(g.scaleX||0),f=_-Math.abs(g.scaleY||0),Math.abs(p)>Math.PI/2&&Math.abs(p)<1.5*Math.PI&&(v?(l*=-1,p+=u<=0?Math.PI:-Math.PI,u+=u<=0?Math.PI:-Math.PI):(_*=-1,p+=p<=0?Math.PI:-Math.PI)),m=(u-g.rotation)%Math.PI,d=(p-g.skewX)%Math.PI,(void 0===g.skewX||c>2e-5||c<-2e-5||f>2e-5||f<-2e-5||m>y&&m<T&&1e5*m|!1||d>y&&d<T&&1e5*d|!1)&&(g.scaleX=l,g.scaleY=_,g.rotation=u,g.skewX=p),xt&&(g.rotationX=g.rotationY=g.z=0,g.perspective=parseFloat(a.defaultTransformPerspective)||0,g.scaleZ=1)}g.zOrigin=x;for(n in g)g[n]<2e-5&&g[n]>-2e-5&&(g[n]=0);return i&&(t._gsTransform=g),g},bt=function(t){var e,i,s=this.data,r=-s.rotation,n=r+s.skewX,a=(Math.cos(r)*s.scaleX*1e5|0)/1e5,o=(Math.sin(r)*s.scaleX*1e5|0)/1e5,h=(Math.sin(n)*-s.scaleY*1e5|0)/1e5,l=(Math.cos(n)*s.scaleY*1e5|0)/1e5,_=this.t.style,u=this.t.currentStyle;if(u){i=o,o=-h,h=-i,e=u.filter,_.filter="";var p,c,m=this.t.offsetWidth,d=this.t.offsetHeight,g="absolute"!==u.position,v="progid:DXImageTransform.Microsoft.Matrix(M11="+a+", M12="+o+", M21="+h+", M22="+l,x=s.x,w=s.y;if(null!=s.ox&&(x+=(p=(s.oxp?m*s.ox*.01:s.ox)-m/2)-(p*a+(c=(s.oyp?d*s.oy*.01:s.oy)-d/2)*o),w+=c-(p*h+c*l)),g)v+=", Dx="+((p=m/2)-(p*a+(c=d/2)*o)+x)+", Dy="+(c-(p*h+c*l)+w)+")";else{var b,P,R,S=f<8?1:-1;for(p=s.ieOffsetX||0,c=s.ieOffsetY||0,s.ieOffsetX=Math.round((m-((a<0?-a:a)*m+(o<0?-o:o)*d))/2+x),s.ieOffsetY=Math.round((d-((l<0?-l:l)*d+(h<0?-h:h)*m))/2+w),ft=0;ft<4;ft++)R=(i=-1!==(b=u[P=J[ft]]).indexOf("px")?parseFloat(b):$(this.t,P,parseFloat(b),b.replace(y,""))||0)!==s[P]?ft<2?-s.ieOffsetX:-s.ieOffsetY:ft<2?p-s.ieOffsetX:c-s.ieOffsetY,_[P]=(s[P]=Math.round(i-R*(0===ft||2===ft?1:S)))+"px";v+=", sizingMethod='auto expand')"}-1!==e.indexOf("DXImageTransform.Microsoft.Matrix(")?_.filter=e.replace(M,v):_.filter=v+" "+e,0!==t&&1!==t||1===a&&0===o&&0===h&&1===l&&(g&&-1===v.indexOf("Dx=0, Dy=0")||T.test(e)&&100!==parseFloat(RegExp.$1)||-1===e.indexOf("gradient(")&&_.removeAttribute("filter"))}},Pt=function(t){var e,i,s,r,n,a,o,h,l,_=this.data,u=this.t.style,c=_.perspective,f=_.scaleX,m=0,d=0,g=0,v=0,y=_.scaleY,T=0,x=0,w=0,b=0,P=_.scaleZ,R=0,S=0,k=0,A=c?-1/c:0,C=_.rotation,M=_.zOrigin;p&&(o=u.top?"top":u.bottom?"bottom":parseFloat(W(this.t,"top",null,!1))?"bottom":"top",s=W(this.t,o,null,!1),h=parseFloat(s)||0,l=s.substr((h+"").length)||"px",_._ffFix=!_._ffFix,u[o]=(_._ffFix?h+.05:h-.05)+l),(C||_.skewX)&&(s=f*Math.cos(C),r=y*Math.sin(C),C-=_.skewX,m=f*-Math.sin(C),y*=Math.cos(C),f=s,v=r),(C=_.rotationY)&&(e=Math.cos(C),n=P*-(i=Math.sin(C)),a=A*-i,d=f*i,T=v*i,P*=e,A*=e,f=s=f*e,v=r=v*e,w=n,S=a),(C=_.rotationX)&&(s=m*(e=Math.cos(C))+d*(i=Math.sin(C)),r=y*e+T*i,n=b*e+P*i,a=k*e+A*i,d=m*-i+d*e,T=y*-i+T*e,P=b*-i+P*e,A=k*-i+A*e,m=s,y=r,b=n,k=a),M&&(g=d*(R-=M),x=T*R,R=P*R+M),g=(s=(g+=_.x)-(g|=0))?(1e5*s+(s<0?-.5:.5)|0)/1e5+g:g,x=(s=(x+=_.y)-(x|=0))?(1e5*s+(s<0?-.5:.5)|0)/1e5+x:x,R=(s=(R+=_.z)-(R|=0))?(1e5*s+(s<0?-.5:.5)|0)/1e5+R:R,u[vt]="matrix3d("+[(1e5*f|0)/1e5,(1e5*v|0)/1e5,(1e5*w|0)/1e5,(1e5*S|0)/1e5,(1e5*m|0)/1e5,(1e5*y|0)/1e5,(1e5*b|0)/1e5,(1e5*k|0)/1e5,(1e5*d|0)/1e5,(1e5*T|0)/1e5,(1e5*P|0)/1e5,(1e5*A|0)/1e5,g,x,R,c?1+-R/c:1].join(",")+")"},Rt=function(t){var e,i,s,r,n,a,o,h,l,_=this.data,u=this.t,c=u.style;p&&(e=c.top?"top":c.bottom?"bottom":parseFloat(W(u,"top",null,!1))?"bottom":"top",i=W(u,e,null,!1),s=parseFloat(i)||0,r=i.substr((s+"").length)||"px",_._ffFix=!_._ffFix,c[e]=(_._ffFix?s+.05:s-.05)+r),_.rotation||_.skewX?(a=(n=_.rotation)-_.skewX,o=1e5,h=_.scaleX*o,l=_.scaleY*o,c[vt]="matrix("+(Math.cos(n)*h|0)/o+","+(Math.sin(n)*h|0)/o+","+(Math.sin(a)*-l|0)/o+","+(Math.cos(a)*l|0)/o+","+_.x+","+_.y+")"):c[vt]="matrix("+_.scaleX+",0,0,"+_.scaleY+","+_.x+","+_.y+")"};dt("transform,scale,scaleX,scaleY,scaleZ,x,y,z,rotation,rotationX,rotationY,rotationZ,skewX,skewY,shortRotation,shortRotationX,shortRotationY,shortRotationZ,transformOrigin,transformPerspective,directionalRotation",{parser:function(t,e,i,s,n,a,o){if(s._transform)return n;var h,l,_,u,p,c,f,m=s._transform=wt(t,r,!0),d=t.style,g=gt.length,v=o,y={};if("string"==typeof v.transform&&vt)_=d.cssText,d[vt]=v.transform,d.display="block",h=wt(t,null,!1),d.cssText=_;else if("object"==typeof v){if(h={scaleX:st(null!=v.scaleX?v.scaleX:v.scale,m.scaleX),scaleY:st(null!=v.scaleY?v.scaleY:v.scale,m.scaleY),scaleZ:st(null!=v.scaleZ?v.scaleZ:v.scale,m.scaleZ),x:st(v.x,m.x),y:st(v.y,m.y),z:st(v.z,m.z),perspective:st(v.transformPerspective,m.perspective)},null!=(f=v.directionalRotation))if("object"==typeof f)for(_ in f)v[_]=f[_];else v.rotation=f;h.rotation=rt("rotation"in v?v.rotation:"shortRotation"in v?v.shortRotation+"_short":"rotationZ"in v?v.rotationZ:m.rotation*I,m.rotation,"rotation",y),xt&&(h.rotationX=rt("rotationX"in v?v.rotationX:"shortRotationX"in v?v.shortRotationX+"_short":m.rotationX*I||0,m.rotationX,"rotationX",y),h.rotationY=rt("rotationY"in v?v.rotationY:"shortRotationY"in v?v.shortRotationY+"_short":m.rotationY*I||0,m.rotationY,"rotationY",y)),h.skewX=null==v.skewX?m.skewX:rt(v.skewX,m.skewX),h.skewY=null==v.skewY?m.skewY:rt(v.skewY,m.skewY),(l=h.skewY-m.skewY)&&(h.skewX+=l,h.rotation+=l)}for((p=m.z||m.rotationX||m.rotationY||h.z||h.rotationX||h.rotationY||h.perspective)||null==v.scale||(h.scaleZ=1);--g>-1;)((u=h[i=gt[g]]-m[i])>1e-6||u<-1e-6||null!=F[i])&&(c=!0,n=new pt(m,i,m[i],u,n),i in y&&(n.e=y[i]),n.xs0=0,n.plugin=a,s._overwriteProps.push(n.n));return((u=v.transformOrigin)||xt&&p&&m.zOrigin)&&(vt?(c=!0,u=(u||W(t,i,r,!1,"50% 50%"))+"",(n=new pt(d,i=Tt,0,0,n,-1,"css_transformOrigin")).b=d[i],n.plugin=a,xt?(_=m.zOrigin,u=u.split(" "),m.zOrigin=(u.length>2?parseFloat(u[2]):_)||0,n.xs0=n.e=d[i]=u[0]+" "+(u[1]||"50%")+" 0px",(n=new pt(m,"zOrigin",0,0,n,-1,n.n)).b=_,n.xs0=n.e=m.zOrigin):n.xs0=n.e=d[i]=u):et(u+"",m)),c&&(s._transformType=p||3===this._transformType?3:2),n},prefix:!0}),dt("boxShadow",{defaultValue:"0px 0px 0px 0px #999",prefix:!0,color:!0,multi:!0,keyword:"inset"}),dt("borderRadius",{defaultValue:"0px",parser:function(t,e,i,n,a,o){e=this.format(e);var h,l,_,u,p,c,f,m,d,g,v,y,T,x,w,b,P=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],R=t.style;for(d=parseFloat(t.offsetWidth),g=parseFloat(t.offsetHeight),h=e.split(" "),l=0;l<P.length;l++)this.p.indexOf("border")&&(P[l]=Z(P[l])),-1!==(p=u=W(t,P[l],r,!1,"0px")).indexOf(" ")&&(p=(u=p.split(" "))[0],u=u[1]),c=_=h[l],f=parseFloat(p),y=p.substr((f+"").length),(T="="===c.charAt(1))?(m=parseInt(c.charAt(0)+"1",10),c=c.substr(2),m*=parseFloat(c),v=c.substr((m+"").length-(m<0?1:0))||""):(m=parseFloat(c),v=c.substr((m+"").length)),""===v&&(v=s[i]||y),v!==y&&(x=$(t,"borderLeft",f,y),w=$(t,"borderTop",f,y),"%"===v?(p=x/d*100+"%",u=w/g*100+"%"):"em"===v?(p=x/(b=$(t,"borderLeft",1,"em"))+"em",u=w/b+"em"):(p=x+"px",u=w+"px"),T&&(c=parseFloat(p)+m+v,_=parseFloat(u)+m+v)),a=ct(R,P[l],p+" "+u,c+" "+_,!1,"0px",a);return a},prefix:!0,formatter:lt("0px 0px 0px 0px",!1,!0)}),dt("backgroundPosition",{defaultValue:"0 0",parser:function(t,e,i,s,n,a){var o,h,l,_,u,p,c="background-position",m=r||q(t,null),d=this.format((m?f?m.getPropertyValue(c+"-x")+" "+m.getPropertyValue(c+"-y"):m.getPropertyValue(c):t.currentStyle.backgroundPositionX+" "+t.currentStyle.backgroundPositionY)||"0 0"),g=this.format(e);if(-1!==d.indexOf("%")!=(-1!==g.indexOf("%"))&&(p=W(t,"backgroundImage").replace(S,""))&&"none"!==p){for(o=d.split(" "),h=g.split(" "),E.setAttribute("src",p),l=2;--l>-1;)(_=-1!==(d=o[l]).indexOf("%"))!==(-1!==h[l].indexOf("%"))&&(u=0===l?t.offsetWidth-E.width:t.offsetHeight-E.height,o[l]=_?parseFloat(d)/100*u+"px":parseFloat(d)/u*100+"%");d=o.join(" ")}return this.parseComplex(t.style,d,g,n,a)},formatter:et}),dt("backgroundSize",{defaultValue:"0 0",formatter:et}),dt("perspective",{defaultValue:"0px",prefix:!0}),dt("perspectiveOrigin",{defaultValue:"50% 50%",prefix:!0}),dt("transformStyle",{prefix:!0}),dt("backfaceVisibility",{prefix:!0}),dt("margin",{parser:_t("marginTop,marginRight,marginBottom,marginLeft")}),dt("padding",{parser:_t("paddingTop,paddingRight,paddingBottom,paddingLeft")}),dt("clip",{defaultValue:"rect(0px,0px,0px,0px)",parser:function(t,e,i,s,n,a){var o,h,l;return f<9?(h=t.currentStyle,l=f<8?" ":",",o="rect("+h.clipTop+l+h.clipRight+l+h.clipBottom+l+h.clipLeft+")",e=this.format(e).split(",").join(l)):(o=this.format(W(t,this.p,r,!1,this.dflt)),e=this.format(e)),this.parseComplex(t.style,o,e,n,a)}}),dt("textShadow",{defaultValue:"0px 0px 0px #999",color:!0,multi:!0}),dt("autoRound,strictUnits",{parser:function(t,e,i,s,r){return r}}),dt("border",{defaultValue:"0px solid #000",parser:function(t,e,i,s,n,a){return this.parseComplex(t.style,this.format(W(t,"borderTopWidth",r,!1,"0px")+" "+W(t,"borderTopStyle",r,!1,"solid")+" "+W(t,"borderTopColor",r,!1,"#000")),this.format(e),n,a)},color:!0,formatter:function(t){var e=t.split(" ");return e[0]+" "+(e[1]||"solid")+" "+(t.match(ht)||["#000"])[0]}}),dt("float,cssFloat,styleFloat",{parser:function(t,e,i,s,r,n){var a=t.style,o="cssFloat"in a?"cssFloat":"styleFloat";return new pt(a,o,0,0,r,-1,i,!1,0,a[o],e)}});var St=function(t){var e,i=this.t,s=i.filter,r=this.s+this.c*t|0;100===r&&(-1===s.indexOf("atrix(")&&-1===s.indexOf("radient(")?(i.removeAttribute("filter"),e=!W(this.data,"filter")):(i.filter=s.replace(w,""),e=!0)),e||(this.xn1&&(i.filter=s=s||"alpha(opacity=100)"),-1===s.indexOf("opacity")?i.filter+=" alpha(opacity="+r+")":i.filter=s.replace(T,"opacity="+r))};dt("opacity,alpha,autoAlpha",{defaultValue:"1",parser:function(t,e,i,s,n,a){var o,h=parseFloat(W(t,"opacity",r,!1,"1")),l=t.style;return e=parseFloat(e),"autoAlpha"===i&&(o=W(t,"visibility",r),1===h&&"hidden"===o&&0!==e&&(h=0),(n=new pt(l,"visibility",0,0,n,-1,null,!1,0,0!==h?"visible":"hidden",0===e?"hidden":"visible")).xs0="visible",s._overwriteProps.push(n.n)),Y?n=new pt(l,"opacity",h,e-h,n):((n=new pt(l,"opacity",100*h,100*(e-h),n)).xn1="autoAlpha"===i?1:0,l.zoom=1,n.type=2,n.b="alpha(opacity="+n.s+")",n.e="alpha(opacity="+(n.s+n.c)+")",n.data=t,n.plugin=a,n.setRatio=St),n}});var kt=function(t,e){e&&(t.removeProperty?t.removeProperty(e.replace(P,"-$1").toLowerCase()):t.removeAttribute(e))},At=function(t){if(this.t._gsClassPT=this,1===t||0===t){this.t.className=0===t?this.b:this.e;for(var e=this.data,i=this.t.style;e;)e.v?i[e.p]=e.v:kt(i,e.p),e=e._next;1===t&&this.t._gsClassPT===this&&(this.t._gsClassPT=null)}else this.t.className!==this.e&&(this.t.className=this.e)};dt("className",{parser:function(t,e,s,n,a,o,h){var l,_,u,p,c,f=t.className,m=t.style.cssText;if(a=n._classNamePT=new pt(t,s,0,0,a,2),a.setRatio=At,a.pr=-11,i=!0,a.b=f,_=H(t,r),u=t._gsClassPT){for(p={},c=u.data;c;)p[c.p]=1,c=c._next;u.setRatio(1)}return t._gsClassPT=a,a.e="="!==e.charAt(1)?e:f.replace(new RegExp("\\s*\\b"+e.substr(2)+"\\b"),"")+("+"===e.charAt(0)?" "+e.substr(2):""),n._tween._duration&&(t.className=a.e,l=Q(t,_,H(t),h,p),t.className=f,a.data=l.firstMPT,t.style.cssText=m,a=a.xfirst=n.parse(t,l.difs,a,o)),a}});var Ct=function(t){if((1===t||0===t)&&this.data._totalTime===this.data._totalDuration)for(var e,i="all"===this.e,s=this.t.style,r=i?s.cssText.split(";"):this.e.split(","),n=r.length,a=o.transform.parse;--n>-1;)e=r[n],i&&(e=e.substr(0,e.indexOf(":")).split(" ").join("")),o[e]&&(e=o[e].parse===a?vt:o[e].p),kt(s,e)};for(dt("clearProps",{parser:function(t,e,s,r,n){return n=new pt(t,s,0,0,n,2),n.setRatio=Ct,n.e=e,n.pr=-10,n.data=r._tween,i=!0,n}}),h="bezier,throwProps,physicsProps,physics2D".split(","),ft=h.length;ft--;)!function(t){if(!o[t]){var e=t.charAt(0).toUpperCase()+t.substr(1)+"Plugin";dt(t,{parser:function(t,i,s,r,n,a,h){var l=(window.GreenSockGlobals||window).com.greensock.plugins[e];return l?(l._cssRegister(),o[s].parse(t,i,s,r,n,a,h)):(B("Error: "+e+" js file not loaded."),n)}})}}(h[ft]);(h=a.prototype)._firstPT=null,h._onInitTween=function(t,e,o){if(!t.nodeType)return!1;this._target=t,this._tween=o,this._vars=e,l=e.autoRound,i=!1,s=e.suffixMap||a.suffixMap,r=q(t,""),n=this._overwriteProps;var h,p,f,m,d,g,v,y,T,w=t.style;if(_&&""===w.zIndex&&("auto"!==(h=W(t,"zIndex",r))&&""!==h||(w.zIndex=0)),"string"==typeof e&&(m=w.cssText,h=H(t,r),w.cssText=m+";"+e,h=Q(t,h,H(t)).difs,!Y&&x.test(e)&&(h.opacity=parseFloat(RegExp.$1)),e=h,w.cssText=m),this._firstPT=p=this.parse(t,e,null),this._transformType){for(T=3===this._transformType,vt?u&&(_=!0,""===w.zIndex&&("auto"!==(v=W(t,"zIndex",r))&&""!==v||(w.zIndex=0)),c&&(w.WebkitBackfaceVisibility=this._vars.WebkitBackfaceVisibility||(T?"visible":"hidden"))):w.zoom=1,f=p;f&&f._next;)f=f._next;y=new pt(t,"transform",0,0,null,2),this._linkCSSP(y,null,f),y.setRatio=T&&xt?Pt:vt?Rt:bt,y.data=this._transform||wt(t,r,!0),n.pop()}if(i){for(;p;){for(g=p._next,f=m;f&&f.pr>p.pr;)f=f._next;(p._prev=f?f._prev:d)?p._prev._next=p:m=p,(p._next=f)?f._prev=p:d=p,p=g}this._firstPT=m}return!0},h.parse=function(t,e,i,n){var a,h,_,u,p,c,f,m,d,g,v=t.style;for(a in e)c=e[a],(h=o[a])?i=h.parse(t,c,a,this,i,n,e):(p=W(t,a,r)+"",d="string"==typeof c,"color"===a||"fill"===a||"stroke"===a||-1!==a.indexOf("Color")||d&&b.test(c)?(d||(c=((c=ot(c)).length>3?"rgba(":"rgb(")+c.join(",")+")"),i=ct(v,a,p,c,!0,"transparent",i,0,n)):!d||-1===c.indexOf(" ")&&-1===c.indexOf(",")?(f=(_=parseFloat(p))||0===_?p.substr((_+"").length):"",""!==p&&"auto"!==p||("width"===a||"height"===a?(_=tt(t,a,r),f="px"):"left"===a||"top"===a?(_=G(t,a,r),f="px"):(_="opacity"!==a?0:1,f="")),(g=d&&"="===c.charAt(1))?(u=parseInt(c.charAt(0)+"1",10),c=c.substr(2),u*=parseFloat(c),m=c.replace(y,"")):(u=parseFloat(c),m=d?c.substr((u+"").length)||"":""),""===m&&(m=s[a]||f),c=u||0===u?(g?u+_:u)+m:e[a],f!==m&&""!==m&&(u||0===u)&&(_||0===_)&&(_=$(t,a,_,f),"%"===m?((_/=$(t,a,100,"%")/100)>100&&(_=100),!0!==e.strictUnits&&(p=_+"%")):"em"===m?_/=$(t,a,1,"em"):(u=$(t,a,u,m),m="px"),g&&(u||0===u)&&(c=u+_+m)),g&&(u+=_),!_&&0!==_||!u&&0!==u?void 0!==v[a]&&(c||c+""!="NaN"&&null!=c)?(i=new pt(v,a,u||_||0,0,i,-1,"css_"+a,!1,0,p,c)).xs0="none"!==c||"display"!==a&&-1===a.indexOf("Style")?c:p:B("invalid "+a+" tween value: "+e[a]):(i=new pt(v,a,_,u-_,i,0,"css_"+a,!1!==l&&("px"===m||"zIndex"===a),0,p,c)).xs0=m):i=ct(v,a,p,c,!0,null,i,0,n)),n&&i&&!i.plugin&&(i.plugin=n);return i},h.setRatio=function(t){var e,i,s,r=this._firstPT;if(1!==t||this._tween._time!==this._tween._duration&&0!==this._tween._time)if(t||this._tween._time!==this._tween._duration&&0!==this._tween._time||-1e-6===this._tween._rawPrevTime)for(;r;){if(e=r.c*t+r.s,r.r?e=e>0?e+.5|0:e-.5|0:e<1e-6&&e>-1e-6&&(e=0),r.type)if(1===r.type)if(2===(s=r.l))r.t[r.p]=r.xs0+e+r.xs1+r.xn1+r.xs2;else if(3===s)r.t[r.p]=r.xs0+e+r.xs1+r.xn1+r.xs2+r.xn2+r.xs3;else if(4===s)r.t[r.p]=r.xs0+e+r.xs1+r.xn1+r.xs2+r.xn2+r.xs3+r.xn3+r.xs4;else if(5===s)r.t[r.p]=r.xs0+e+r.xs1+r.xn1+r.xs2+r.xn2+r.xs3+r.xn3+r.xs4+r.xn4+r.xs5;else{for(i=r.xs0+e+r.xs1,s=1;s<r.l;s++)i+=r["xn"+s]+r["xs"+(s+1)];r.t[r.p]=i}else-1===r.type?r.t[r.p]=r.xs0:r.setRatio&&r.setRatio(t);else r.t[r.p]=e+r.xs0;r=r._next}else for(;r;)2!==r.type?r.t[r.p]=r.b:r.setRatio(t),r=r._next;else for(;r;)2!==r.type?r.t[r.p]=r.e:r.setRatio(t),r=r._next},h._enableTransforms=function(t){this._transformType=t||3===this._transformType?3:2},h._linkCSSP=function(t,e,i,s){return t&&(e&&(e._prev=t),t._next&&(t._next._prev=t._prev),i?i._next=t:s||null!==this._firstPT||(this._firstPT=t),t._prev?t._prev._next=t._next:this._firstPT===t&&(this._firstPT=t._next),t._next=e,t._prev=i),t},h._kill=function(e){var i,s,r,n=e;if(e.css_autoAlpha||e.css_alpha){n={};for(s in e)n[s]=e[s];n.css_opacity=1,n.css_autoAlpha&&(n.css_visibility=1)}return e.css_className&&(i=this._classNamePT)&&((r=i.xfirst)&&r._prev?this._linkCSSP(r._prev,i._next,r._prev._prev):r===this._firstPT&&(this._firstPT=i._next),i._next&&this._linkCSSP(i._next,i._next._next,r._prev),this._classNamePT=null),t.prototype._kill.call(this,n)};var Mt=function(t,e,i){var s,r,n,a;if(t.slice)for(r=t.length;--r>-1;)Mt(t[r],e,i);else for(r=(s=t.childNodes).length;--r>-1;)a=(n=s[r]).type,n.style&&(e.push(H(n)),i&&i.push(n)),1!==a&&9!==a&&11!==a||!n.childNodes.length||Mt(n,e,i)};return a.cascadeTo=function(t,i,s){var r,n,a,o=e.to(t,i,s),h=[o],l=[],_=[],u=[],p=e._internals.reservedProps;for(t=o._targets||o.target,Mt(t,l,u),o.render(i,!0),Mt(t,_),o.render(0,!0),o._enabled(!0),r=u.length;--r>-1;)if((n=Q(u[r],l[r],_[r])).firstMPT){n=n.difs;for(a in s)p[a]&&(n[a]=s[a]);h.push(e.to(u[r],i,n))}return h},t.activate([a]),a},!0),function(){var t=window._gsDefine.plugin({propName:"roundProps",priority:-1,API:2,init:function(t,e,i){return this._tween=i,!0}}).prototype;t._onInitAllProps=function(){for(var t,e,i,s=this._tween,r=s.vars.roundProps instanceof Array?s.vars.roundProps:s.vars.roundProps.split(","),n=r.length,a={},o=s._propLookup.roundProps;--n>-1;)a[r[n]]=1;for(n=r.length;--n>-1;)for(t=r[n],e=s._firstPT;e;)i=e._next,e.pg?e.t._roundProps(a,!0):e.n===t&&(this._add(e.t,t,e.s,e.c),i&&(i._prev=e._prev),e._prev?e._prev._next=i:s._firstPT===e&&(s._firstPT=i),e._next=e._prev=null,s._propLookup[t]=o),e=i;return!1},t._add=function(t,e,i,s){this._addTween(t,e,i,i+s,e,!0),this._overwriteProps.push(e)}}(),window._gsDefine.plugin({propName:"attr",API:2,init:function(t,e,i){var s;if("function"!=typeof t.setAttribute)return!1;this._target=t,this._proxy={};for(s in e)this._addTween(this._proxy,s,parseFloat(t.getAttribute(s)),e[s],s),this._overwriteProps.push(s);return!0},set:function(t){this._super.setRatio.call(this,t);for(var e,i=this._overwriteProps,s=i.length;--s>-1;)e=i[s],this._target.setAttribute(e,this._proxy[e]+"")}}),window._gsDefine.plugin({propName:"directionalRotation",API:2,init:function(t,e,i){"object"!=typeof e&&(e={rotation:e}),this.finals={};var s,r,n,a,o,h=!0===e.useRadians?2*Math.PI:360;for(s in e)"useRadians"!==s&&(r=(o=(e[s]+"").split("_"))[0],n=parseFloat("function"!=typeof t[s]?t[s]:t[s.indexOf("set")||"function"!=typeof t["get"+s.substr(3)]?s:"get"+s.substr(3)]()),a=(this.finals[s]="string"==typeof r&&"="===r.charAt(1)?n+parseInt(r.charAt(0)+"1",10)*Number(r.substr(2)):Number(r)||0)-n,o.length&&(-1!==(r=o.join("_")).indexOf("short")&&(a%=h)!==a%(h/2)&&(a=a<0?a+h:a-h),-1!==r.indexOf("_cw")&&a<0?a=(a+9999999999*h)%h-(a/h|0)*h:-1!==r.indexOf("ccw")&&a>0&&(a=(a-9999999999*h)%h-(a/h|0)*h)),(a>1e-6||a<-1e-6)&&(this._addTween(t,s,n,n+a,s),this._overwriteProps.push(s)));return!0},set:function(t){var e;if(1!==t)this._super.setRatio.call(this,t);else for(e=this._firstPT;e;)e.f?e.t[e.p](this.finals[e.p]):e.t[e.p]=this.finals[e.p],e=e._next}})._autoCSS=!0,window._gsDefine("easing.Back",["easing.Ease"],function(t){var e,i,s,r=window.GreenSockGlobals||window,n=r.com.greensock,a=2*Math.PI,o=Math.PI/2,h=n._class,l=function(e,i){var s=h("easing."+e,function(){},!0),r=s.prototype=new t;return r.constructor=s,r.getRatio=i,s},_=t.register||function(){},u=function(t,e,i,s,r){var n=h("easing."+t,{easeOut:new e,easeIn:new i,easeInOut:new s},!0);return _(n,t),n},p=function(t,e,i){this.t=t,this.v=e,i&&(this.next=i,i.prev=this,this.c=i.v-e,this.gap=i.t-t)},c=function(e,i){var s=h("easing."+e,function(t){this._p1=t||0===t?t:1.70158,this._p2=1.525*this._p1},!0),r=s.prototype=new t;return r.constructor=s,r.getRatio=i,r.config=function(t){return new s(t)},s},f=u("Back",c("BackOut",function(t){return(t-=1)*t*((this._p1+1)*t+this._p1)+1}),c("BackIn",function(t){return t*t*((this._p1+1)*t-this._p1)}),c("BackInOut",function(t){return(t*=2)<1?.5*t*t*((this._p2+1)*t-this._p2):.5*((t-=2)*t*((this._p2+1)*t+this._p2)+2)})),m=h("easing.SlowMo",function(t,e,i){e=e||0===e?e:.7,null==t?t=.7:t>1&&(t=1),this._p=1!==t?e:0,this._p1=(1-t)/2,this._p2=t,this._p3=this._p1+this._p2,this._calcEnd=!0===i},!0),d=m.prototype=new t;return d.constructor=m,d.getRatio=function(t){var e=t+(.5-t)*this._p;return t<this._p1?this._calcEnd?1-(t=1-t/this._p1)*t:e-(t=1-t/this._p1)*t*t*t*e:t>this._p3?this._calcEnd?1-(t=(t-this._p3)/this._p1)*t:e+(t-e)*(t=(t-this._p3)/this._p1)*t*t*t:this._calcEnd?1:e},m.ease=new m(.7,.7),d.config=m.config=function(t,e,i){return new m(t,e,i)},e=h("easing.SteppedEase",function(t){t=t||1,this._p1=1/t,this._p2=t+1},!0),d=e.prototype=new t,d.constructor=e,d.getRatio=function(t){return t<0?t=0:t>=1&&(t=.999999999),(this._p2*t>>0)*this._p1},d.config=e.config=function(t){return new e(t)},i=h("easing.RoughEase",function(e){for(var i,s,r,n,a,o,h=(e=e||{}).taper||"none",l=[],_=0,u=0|(e.points||20),c=u,f=!1!==e.randomize,m=!0===e.clamp,d=e.template instanceof t?e.template:null,g="number"==typeof e.strength?.4*e.strength:.4;--c>-1;)i=f?Math.random():1/u*c,s=d?d.getRatio(i):i,r="none"===h?g:"out"===h?(n=1-i)*n*g:"in"===h?i*i*g:i<.5?(n=2*i)*n*.5*g:(n=2*(1-i))*n*.5*g,f?s+=Math.random()*r-.5*r:c%2?s+=.5*r:s-=.5*r,m&&(s>1?s=1:s<0&&(s=0)),l[_++]={x:i,y:s};for(l.sort(function(t,e){return t.x-e.x}),o=new p(1,1,null),c=u;--c>-1;)a=l[c],o=new p(a.x,a.y,o);this._prev=new p(0,0,0!==o.t?o:o.next)},!0),d=i.prototype=new t,d.constructor=i,d.getRatio=function(t){var e=this._prev;if(t>e.t){for(;e.next&&t>=e.t;)e=e.next;e=e.prev}else for(;e.prev&&t<=e.t;)e=e.prev;return this._prev=e,e.v+(t-e.t)/e.gap*e.c},d.config=function(t){return new i(t)},i.ease=new i,u("Bounce",l("BounceOut",function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}),l("BounceIn",function(t){return(t=1-t)<1/2.75?1-7.5625*t*t:t<2/2.75?1-(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?1-(7.5625*(t-=2.25/2.75)*t+.9375):1-(7.5625*(t-=2.625/2.75)*t+.984375)}),l("BounceInOut",function(t){var e=t<.5;return t=e?1-2*t:2*t-1,t<1/2.75?t*=7.5625*t:t=t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375,e?.5*(1-t):.5*t+.5})),u("Circ",l("CircOut",function(t){return Math.sqrt(1-(t-=1)*t)}),l("CircIn",function(t){return-(Math.sqrt(1-t*t)-1)}),l("CircInOut",function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)})),s=function(e,i,s){var r=h("easing."+e,function(t,e){this._p1=t||1,this._p2=e||s,this._p3=this._p2/a*(Math.asin(1/this._p1)||0)},!0),n=r.prototype=new t;return n.constructor=r,n.getRatio=i,n.config=function(t,e){return new r(t,e)},r},u("Elastic",s("ElasticOut",function(t){return this._p1*Math.pow(2,-10*t)*Math.sin((t-this._p3)*a/this._p2)+1},.3),s("ElasticIn",function(t){return-this._p1*Math.pow(2,10*(t-=1))*Math.sin((t-this._p3)*a/this._p2)},.3),s("ElasticInOut",function(t){return(t*=2)<1?this._p1*Math.pow(2,10*(t-=1))*Math.sin((t-this._p3)*a/this._p2)*-.5:this._p1*Math.pow(2,-10*(t-=1))*Math.sin((t-this._p3)*a/this._p2)*.5+1},.45)),u("Expo",l("ExpoOut",function(t){return 1-Math.pow(2,-10*t)}),l("ExpoIn",function(t){return Math.pow(2,10*(t-1))-.001}),l("ExpoInOut",function(t){return(t*=2)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*(t-1)))})),u("Sine",l("SineOut",function(t){return Math.sin(t*o)}),l("SineIn",function(t){return 1-Math.cos(t*o)}),l("SineInOut",function(t){return-.5*(Math.cos(Math.PI*t)-1)})),h("easing.EaseLookup",{find:function(e){return t.map[e]}},!0),_(r.SlowMo,"SlowMo","ease,"),_(i,"RoughEase","ease,"),_(e,"SteppedEase","ease,"),f},!0)}),function(t){"use strict";var e,i,s,r,n,a=t.GreenSockGlobals||t,o=function(t){var e,i=t.split("."),s=a;for(e=0;e<i.length;e++)s[i[e]]=s=s[i[e]]||{};return s},h=o("com.greensock"),l=[].slice,_=function(){},u={},p=function(e,i,s,r){this.sc=u[e]?u[e].sc:[],u[e]=this,this.gsClass=null,this.func=s;var n=[];this.check=function(h){for(var l,_,c,f,m=i.length,d=m;--m>-1;)(l=u[i[m]]||new p(i[m],[])).gsClass?(n[m]=l.gsClass,d--):h&&l.sc.push(this);if(0===d&&s)for(c=(_=("com.greensock."+e).split(".")).pop(),f=o(_.join("."))[c]=this.gsClass=s.apply(s,n),r&&(a[c]=f,"function"==typeof define&&define.amd?define((t.GreenSockAMDPath?t.GreenSockAMDPath+"/":"")+e.split(".").join("/"),[],function(){return f}):"undefined"!=typeof module&&module.exports&&(module.exports=f)),m=0;m<this.sc.length;m++)this.sc[m].check()},this.check(!0)},c=t._gsDefine=function(t,e,i,s){return new p(t,e,i,s)},f=h._class=function(t,e,i){return e=e||function(){},c(t,[],function(){return e},i),e};c.globals=a;var m=[0,0,1,1],d=[],g=f("easing.Ease",function(t,e,i,s){this._func=t,this._type=i||0,this._power=s||0,this._params=e?m.concat(e):m},!0),v=g.map={},y=g.register=function(t,e,i,s){for(var r,n,a,o,l=e.split(","),_=l.length,u=(i||"easeIn,easeOut,easeInOut").split(",");--_>-1;)for(n=l[_],r=s?f("easing."+n,null,!0):h.easing[n]||{},a=u.length;--a>-1;)o=u[a],v[n+"."+o]=v[o+n]=r[o]=t.getRatio?t:t[o]||new t};for((s=g.prototype)._calcEnd=!1,s.getRatio=function(t){if(this._func)return this._params[0]=t,this._func.apply(null,this._params);var e=this._type,i=this._power,s=1===e?1-t:2===e?t:t<.5?2*t:2*(1-t);return 1===i?s*=s:2===i?s*=s*s:3===i?s*=s*s*s:4===i&&(s*=s*s*s*s),1===e?1-s:2===e?s:t<.5?s/2:1-s/2},i=(e=["Linear","Quad","Cubic","Quart","Quint,Strong"]).length;--i>-1;)s=e[i]+",Power"+i,y(new g(null,null,1,i),s,"easeOut",!0),y(new g(null,null,2,i),s,"easeIn"+(0===i?",easeNone":"")),y(new g(null,null,3,i),s,"easeInOut");v.linear=h.easing.Linear.easeIn,v.swing=h.easing.Quad.easeInOut;var T=f("events.EventDispatcher",function(t){this._listeners={},this._eventTarget=t||this});(s=T.prototype).addEventListener=function(t,e,i,s,a){a=a||0;var o,h,l=this._listeners[t],_=0;for(null==l&&(this._listeners[t]=l=[]),h=l.length;--h>-1;)(o=l[h]).c===e&&o.s===i?l.splice(h,1):0===_&&o.pr<a&&(_=h+1);l.splice(_,0,{c:e,s:i,up:s,pr:a}),this!==r||n||r.wake()},s.removeEventListener=function(t,e){var i,s=this._listeners[t];if(s)for(i=s.length;--i>-1;)if(s[i].c===e)return void s.splice(i,1)},s.dispatchEvent=function(t){var e,i,s,r=this._listeners[t];if(r)for(e=r.length,i=this._eventTarget;--e>-1;)(s=r[e]).up?s.c.call(s.s||i,{type:t,target:i}):s.c.call(s.s||i)};var x=t.requestAnimationFrame,w=t.cancelAnimationFrame,b=Date.now||function(){return(new Date).getTime()};for(i=(e=["ms","moz","webkit","o"]).length;--i>-1&&!x;)x=t[e[i]+"RequestAnimationFrame"],w=t[e[i]+"CancelAnimationFrame"]||t[e[i]+"CancelRequestAnimationFrame"];f("Ticker",function(t,e){var i,s,a,o,h,l=this,u=b(),p=!1!==e&&x,c=function(t){l.time=(b()-u)/1e3;var e=a,r=l.time-h;(!i||r>0||!0===t)&&(l.frame++,h+=r+(r>=o?.004:o-r),l.dispatchEvent("tick")),!0!==t&&e===a&&(a=s(c))};T.call(l),this.time=this.frame=0,this.tick=function(){c(!0)},this.sleep=function(){null!=a&&(p&&w?w(a):clearTimeout(a),s=_,a=null,l===r&&(n=!1))},this.wake=function(){null!==a&&l.sleep(),s=0===i?_:p&&x?x:function(t){return setTimeout(t,1e3*(h-l.time)+1|0)},l===r&&(n=!0),c(2)},this.fps=function(t){if(!arguments.length)return i;o=1/((i=t)||60),h=this.time+o,l.wake()},this.useRAF=function(t){if(!arguments.length)return p;l.sleep(),p=t,l.fps(i)},l.fps(t),setTimeout(function(){p&&(!a||l.frame<5)&&l.useRAF(!1)},1500)}),(s=h.Ticker.prototype=new h.events.EventDispatcher).constructor=h.Ticker;var P=f("core.Animation",function(t,e){if(this.vars=e||{},this._duration=this._totalDuration=t||0,this._delay=Number(this.vars.delay)||0,this._timeScale=1,this._active=!0===this.vars.immediateRender,this.data=this.vars.data,this._reversed=!0===this.vars.reversed,N){n||r.wake();var i=this.vars.useFrames?X:N;i.add(this,i._time),this.vars.paused&&this.paused(!0)}});r=P.ticker=new h.Ticker,(s=P.prototype)._dirty=s._gc=s._initted=s._paused=!1,s._totalTime=s._time=0,s._rawPrevTime=-1,s._next=s._last=s._onUpdate=s._timeline=s.timeline=null,s._paused=!1,s.play=function(t,e){return arguments.length&&this.seek(t,e),this.reversed(!1).paused(!1)},s.pause=function(t,e){return arguments.length&&this.seek(t,e),this.paused(!0)},s.resume=function(t,e){return arguments.length&&this.seek(t,e),this.paused(!1)},s.seek=function(t,e){return this.totalTime(Number(t),!1!==e)},s.restart=function(t,e){return this.reversed(!1).paused(!1).totalTime(t?-this._delay:0,!1!==e,!0)},s.reverse=function(t,e){return arguments.length&&this.seek(t||this.totalDuration(),e),this.reversed(!0).paused(!1)},s.render=function(){},s.invalidate=function(){return this},s._enabled=function(t,e){return n||r.wake(),this._gc=!t,this._active=t&&!this._paused&&this._totalTime>0&&this._totalTime<this._totalDuration,!0!==e&&(t&&!this.timeline?this._timeline.add(this,this._startTime-this._delay):!t&&this.timeline&&this._timeline._remove(this,!0)),!1},s._kill=function(t,e){return this._enabled(!1,!1)},s.kill=function(t,e){return this._kill(t,e),this},s._uncache=function(t){for(var e=t?this:this.timeline;e;)e._dirty=!0,e=e.timeline;return this},s.eventCallback=function(t,e,i,s){if(null==t)return null;if("on"===t.substr(0,2)){var r,n=this.vars;if(1===arguments.length)return n[t];if(null==e)delete n[t];else if(n[t]=e,n[t+"Params"]=i,n[t+"Scope"]=s,i)for(r=i.length;--r>-1;)"{self}"===i[r]&&((i=n[t+"Params"]=i.concat())[r]=this);"onUpdate"===t&&(this._onUpdate=e)}return this},s.delay=function(t){return arguments.length?(this._timeline.smoothChildTiming&&this.startTime(this._startTime+t-this._delay),this._delay=t,this):this._delay},s.duration=function(t){return arguments.length?(this._duration=this._totalDuration=t,this._uncache(!0),this._timeline.smoothChildTiming&&this._time>0&&this._time<this._duration&&0!==t&&this.totalTime(this._totalTime*(t/this._duration),!0),this):(this._dirty=!1,this._duration)},s.totalDuration=function(t){return this._dirty=!1,arguments.length?this.duration(t):this._totalDuration},s.time=function(t,e){return arguments.length?(this._dirty&&this.totalDuration(),this.totalTime(t>this._duration?this._duration:t,e)):this._time},s.totalTime=function(t,e,i){if(n||r.wake(),!arguments.length)return this._totalTime;if(this._timeline){if(t<0&&!i&&(t+=this.totalDuration()),this._timeline.smoothChildTiming){this._dirty&&this.totalDuration();var s=this._totalDuration,a=this._timeline;if(t>s&&!i&&(t=s),this._startTime=(this._paused?this._pauseTime:a._time)-(this._reversed?s-t:t)/this._timeScale,a._dirty||this._uncache(!1),!a._active)for(;a._timeline;)a.totalTime(a._totalTime,!0),a=a._timeline}this._gc&&this._enabled(!0,!1),this._totalTime!==t&&this.render(t,e,!1)}return this},s.startTime=function(t){return arguments.length?(t!==this._startTime&&(this._startTime=t,this.timeline&&this.timeline._sortChildren&&this.timeline.add(this,t-this._delay)),this):this._startTime},s.timeScale=function(t){if(!arguments.length)return this._timeScale;if(t=t||1e-6,this._timeline&&this._timeline.smoothChildTiming){var e=this._pauseTime,i=e||0===e?e:this._timeline.totalTime();this._startTime=i-(i-this._startTime)*this._timeScale/t}return this._timeScale=t,this._uncache(!1)},s.reversed=function(t){return arguments.length?(t!=this._reversed&&(this._reversed=t,this.totalTime(this._totalTime,!0)),this):this._reversed},s.paused=function(t){if(!arguments.length)return this._paused;if(t!=this._paused&&this._timeline){n||t||r.wake();var e=this._timeline.rawTime(),i=e-this._pauseTime;!t&&this._timeline.smoothChildTiming&&(this._startTime+=i,this._uncache(!1)),this._pauseTime=t?e:null,this._paused=t,this._active=!t&&this._totalTime>0&&this._totalTime<this._totalDuration,t||0===i||0===this._duration||this.render(this._totalTime,!0,!0)}return this._gc&&!t&&this._enabled(!0,!1),this};var R=f("core.SimpleTimeline",function(t){P.call(this,0,t),this.autoRemoveChildren=this.smoothChildTiming=!0});(s=R.prototype=new P).constructor=R,s.kill()._gc=!1,s._first=s._last=null,s._sortChildren=!1,s.add=s.insert=function(t,e,i,s){var r,n;if(t._startTime=Number(e||0)+t._delay,t._paused&&this!==t._timeline&&(t._pauseTime=t._startTime+(this.rawTime()-t._startTime)/t._timeScale),t.timeline&&t.timeline._remove(t,!0),t.timeline=t._timeline=this,t._gc&&t._enabled(!0,!0),r=this._last,this._sortChildren)for(n=t._startTime;r&&r._startTime>n;)r=r._prev;return r?(t._next=r._next,r._next=t):(t._next=this._first,this._first=t),t._next?t._next._prev=t:this._last=t,t._prev=r,this._timeline&&this._uncache(!0),this},s._remove=function(t,e){return t.timeline===this&&(e||t._enabled(!1,!0),t.timeline=null,t._prev?t._prev._next=t._next:this._first===t&&(this._first=t._next),t._next?t._next._prev=t._prev:this._last===t&&(this._last=t._prev),this._timeline&&this._uncache(!0)),this},s.render=function(t,e,i){var s,r=this._first;for(this._totalTime=this._time=this._rawPrevTime=t;r;)s=r._next,(r._active||t>=r._startTime&&!r._paused)&&(r._reversed?r.render((r._dirty?r.totalDuration():r._totalDuration)-(t-r._startTime)*r._timeScale,e,i):r.render((t-r._startTime)*r._timeScale,e,i)),r=s},s.rawTime=function(){return n||r.wake(),this._totalTime};var S=f("MagicMove",function(t,e,i){if(P.call(this,e,i),null==t)throw"Cannot tween a null target.";this.target=t="string"!=typeof t?t:S.selector(t)||t;var s,r,n,a=t.jquery||t.length&&t[0]&&t[0].nodeType&&t[0].style,o=this.vars.overwrite;if(this._overwrite=o=null==o?F[S.defaultOverwrite]:"number"==typeof o?o>>0:F[o],(a||t instanceof Array)&&"number"!=typeof t[0])for(this._targets=n=l.call(t,0),this._propLookup=[],this._siblings=[],s=0;s<n.length;s++)(r=n[s])?"string"!=typeof r?r.length&&r[0]&&r[0].nodeType&&r[0].style?(n.splice(s--,1),this._targets=n=n.concat(l.call(r,0))):(this._siblings[s]=E(r,this,!1),1===o&&this._siblings[s].length>1&&L(r,this,null,1,this._siblings[s])):"string"==typeof(r=n[s--]=S.selector(r))&&n.splice(s+1,1):n.splice(s--,1);else this._propLookup={},this._siblings=E(t,this,!1),1===o&&this._siblings.length>1&&L(t,this,null,1,this._siblings);(this.vars.immediateRender||0===e&&0===this._delay&&!1!==this.vars.immediateRender)&&this.render(-this._delay,!1,!0)},!0),k=function(t){return t.length&&t[0]&&t[0].nodeType&&t[0].style},A=function(t,e){var i,s={};for(i in t)I[i]||i in e&&"x"!==i&&"y"!==i&&"width"!==i&&"height"!==i&&"className"!==i||!(!M[i]||M[i]&&M[i]._autoCSS)||(s[i]=t[i],delete t[i]);t.css=s};(s=S.prototype=new P).constructor=S,s.kill()._gc=!1,s.ratio=0,s._firstPT=s._targets=s._overwrittenProps=s._startAt=null,s._notifyPluginsOfEnabled=!1,S.version="1.9.7",S.defaultEase=s._ease=new g(null,null,1,1),S.defaultOverwrite="auto",S.ticker=r,S.autoSleep=!0,S.selector=t.$||t.jQuery||function(e){return t.$?(S.selector=t.$,t.$(e)):t.document?t.document.getElementById("#"===e.charAt(0)?e.substr(1):e):e};var C=S._internals={},M=S._plugins={},O=S._tweenLookup={},D=0,I=C.reservedProps={ease:1,delay:1,overwrite:1,onComplete:1,onCompleteParams:1,onCompleteScope:1,useFrames:1,runBackwards:1,startAt:1,onUpdate:1,onUpdateParams:1,onUpdateScope:1,onStart:1,onStartParams:1,onStartScope:1,onReverseComplete:1,onReverseCompleteParams:1,onReverseCompleteScope:1,onRepeat:1,onRepeatParams:1,onRepeatScope:1,easeParams:1,yoyo:1,immediateRender:1,repeat:1,repeatDelay:1,data:1,paused:1,reversed:1,autoCSS:1},F={none:0,all:1,auto:2,concurrent:3,allOnStart:4,preexisting:5,true:1,false:0},X=P._rootFramesTimeline=new R,N=P._rootTimeline=new R;N._startTime=r.time,X._startTime=r.frame,N._active=X._active=!0,P._updateRoot=function(){if(N.render((r.time-N._startTime)*N._timeScale,!1,!1),X.render((r.frame-X._startTime)*X._timeScale,!1,!1),!(r.frame%120)){var t,e,i;for(i in O){for(t=(e=O[i].tweens).length;--t>-1;)e[t]._gc&&e.splice(t,1);0===e.length&&delete O[i]}if((!(i=N._first)||i._paused)&&S.autoSleep&&!X._first&&1===r._listeners.tick.length){for(;i&&i._paused;)i=i._next;i||r.sleep()}}},r.addEventListener("tick",P._updateRoot);var E=function(t,e,i){var s,r,n=t._gsTweenID;if(O[n||(t._gsTweenID=n="t"+D++)]||(O[n]={target:t,tweens:[]}),e&&(s=O[n].tweens,s[r=s.length]=e,i))for(;--r>-1;)s[r]===e&&s.splice(r,1);return O[n].tweens},L=function(t,e,i,s,r){var n,a,o,h;if(1===s||s>=4){for(h=r.length,n=0;n<h;n++)if((o=r[n])!==e)o._gc||o._enabled(!1,!1)&&(a=!0);else if(5===s)break;return a}var l,_=e._startTime+1e-10,u=[],p=0,c=0===e._duration;for(n=r.length;--n>-1;)(o=r[n])===e||o._gc||o._paused||(o._timeline!==e._timeline?(l=l||z(e,0,c),0===z(o,l,c)&&(u[p++]=o)):o._startTime<=_&&o._startTime+o.totalDuration()/o._timeScale+1e-10>_&&((c||!o._initted)&&_-o._startTime<=2e-10||(u[p++]=o)));for(n=p;--n>-1;)o=u[n],2===s&&o._kill(i,t)&&(a=!0),(2!==s||!o._firstPT&&o._initted)&&o._enabled(!1,!1)&&(a=!0);return a},z=function(t,e,i){for(var s=t._timeline,r=s._timeScale,n=t._startTime;s._timeline;){if(n+=s._startTime,r*=s._timeScale,s._paused)return-100;s=s._timeline}return n/=r,n>e?n-e:i&&n===e||!t._initted&&n-e<2e-10?1e-10:(n+=t.totalDuration()/t._timeScale/r)>e+1e-10?0:n-e-1e-10};s._init=function(){var t,e,i,s,r=this.vars,n=this._overwrittenProps,a=this._duration,o=r.ease;if(r.startAt){if(r.startAt.overwrite=0,r.startAt.immediateRender=!0,this._startAt=S.to(this.target,0,r.startAt),r.immediateRender&&(this._startAt=null,0===this._time&&0!==a))return}else if(r.runBackwards&&r.immediateRender&&0!==a)if(this._startAt)this._startAt.render(-1,!0),this._startAt=null;else if(0===this._time){i={};for(s in r)I[s]&&"autoCSS"!==s||(i[s]=r[s]);return i.overwrite=0,void(this._startAt=S.to(this.target,0,i))}if(this._ease=o?o instanceof g?r.easeParams instanceof Array?o.config.apply(o,r.easeParams):o:"function"==typeof o?new g(o,r.easeParams):v[o]||S.defaultEase:S.defaultEase,this._easeType=this._ease._type,this._easePower=this._ease._power,this._firstPT=null,this._targets)for(t=this._targets.length;--t>-1;)this._initProps(this._targets[t],this._propLookup[t]={},this._siblings[t],n?n[t]:null)&&(e=!0);else e=this._initProps(this.target,this._propLookup,this._siblings,n);if(e&&S._onPluginEvent("_onInitAllProps",this),n&&(this._firstPT||"function"!=typeof this.target&&this._enabled(!1,!1)),r.runBackwards)for(i=this._firstPT;i;)i.s+=i.c,i.c=-i.c,i=i._next;this._onUpdate=r.onUpdate,this._initted=!0},s._initProps=function(t,e,i,s){var r,n,a,o,h,l,_;if(null==t)return!1;this.vars.css||t.style&&t.nodeType&&M.css&&!1!==this.vars.autoCSS&&A(this.vars,t);for(r in this.vars){if(I[r]){if(("onStartParams"===r||"onUpdateParams"===r||"onCompleteParams"===r||"onReverseCompleteParams"===r||"onRepeatParams"===r)&&(h=this.vars[r]))for(n=h.length;--n>-1;)"{self}"===h[n]&&((h=this.vars[r]=h.concat())[n]=this)}else if(M[r]&&(o=new M[r])._onInitTween(t,this.vars[r],this)){for(this._firstPT=l={_next:this._firstPT,t:o,p:"setRatio",s:0,c:1,f:!0,n:r,pg:!0,pr:o._priority},n=o._overwriteProps.length;--n>-1;)e[o._overwriteProps[n]]=this._firstPT;(o._priority||o._onInitAllProps)&&(a=!0),(o._onDisable||o._onEnable)&&(this._notifyPluginsOfEnabled=!0)}else this._firstPT=e[r]=l={_next:this._firstPT,t:t,p:r,f:"function"==typeof t[r],n:r,pg:!1,pr:0},l.s=l.f?t[r.indexOf("set")||"function"!=typeof t["get"+r.substr(3)]?r:"get"+r.substr(3)]():parseFloat(t[r]),_=this.vars[r],l.c="string"==typeof _&&"="===_.charAt(1)?parseInt(_.charAt(0)+"1",10)*Number(_.substr(2)):Number(_)-l.s||0;l&&l._next&&(l._next._prev=l)}return s&&this._kill(s,t)?this._initProps(t,e,i,s):this._overwrite>1&&this._firstPT&&i.length>1&&L(t,this,e,this._overwrite,i)?(this._kill(e,t),this._initProps(t,e,i,s)):a},s.render=function(t,e,i){var s,r,n,a=this._time;if(t>=this._duration)this._totalTime=this._time=this._duration,this.ratio=this._ease._calcEnd?this._ease.getRatio(1):1,this._reversed||(s=!0,r="onComplete"),0===this._duration&&((0===t||this._rawPrevTime<0)&&this._rawPrevTime!==t&&(i=!0,this._rawPrevTime>0&&(r="onReverseComplete",e&&(t=-1))),this._rawPrevTime=t);else if(t<1e-7)this._totalTime=this._time=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0,(0!==a||0===this._duration&&this._rawPrevTime>0)&&(r="onReverseComplete",s=this._reversed),t<0?(this._active=!1,0===this._duration&&(this._rawPrevTime>=0&&(i=!0),this._rawPrevTime=t)):this._initted||(i=!0);else if(this._totalTime=this._time=t,this._easeType){var o=t/this._duration,h=this._easeType,l=this._easePower;(1===h||3===h&&o>=.5)&&(o=1-o),3===h&&(o*=2),1===l?o*=o:2===l?o*=o*o:3===l?o*=o*o*o:4===l&&(o*=o*o*o*o),1===h?this.ratio=1-o:2===h?this.ratio=o:t/this._duration<.5?this.ratio=o/2:this.ratio=1-o/2}else this.ratio=this._ease.getRatio(t/this._duration);if(this._time!==a||i){if(!this._initted){if(this._init(),!this._initted)return;this._time&&!s?this.ratio=this._ease.getRatio(this._time/this._duration):s&&this._ease._calcEnd&&(this.ratio=this._ease.getRatio(0===this._time?0:1))}for(this._active||this._paused||(this._active=!0),0===a&&(this._startAt&&(t>=0?this._startAt.render(t,e,i):r||(r="_dummyGS")),this.vars.onStart&&(0===this._time&&0!==this._duration||e||this.vars.onStart.apply(this.vars.onStartScope||this,this.vars.onStartParams||d))),n=this._firstPT;n;)n.f?n.t[n.p](n.c*this.ratio+n.s):n.t[n.p]=n.c*this.ratio+n.s,n=n._next;this._onUpdate&&(t<0&&this._startAt&&this._startAt.render(t,e,i),e||this._onUpdate.apply(this.vars.onUpdateScope||this,this.vars.onUpdateParams||d)),r&&(this._gc||(t<0&&this._startAt&&!this._onUpdate&&this._startAt.render(t,e,i),s&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!e&&this.vars[r]&&this.vars[r].apply(this.vars[r+"Scope"]||this,this.vars[r+"Params"]||d)))}},s._kill=function(t,e){if("all"===t&&(t=null),null==t&&(null==e||e===this.target))return this._enabled(!1,!1);var i,s,r,n,a,o,h,l;if(((e="string"!=typeof e?e||this._targets||this.target:S.selector(e)||e)instanceof Array||k(e))&&"number"!=typeof e[0])for(i=e.length;--i>-1;)this._kill(t,e[i])&&(o=!0);else{if(this._targets){for(i=this._targets.length;--i>-1;)if(e===this._targets[i]){a=this._propLookup[i]||{},this._overwrittenProps=this._overwrittenProps||[],s=this._overwrittenProps[i]=t?this._overwrittenProps[i]||{}:"all";break}}else{if(e!==this.target)return!1;a=this._propLookup,s=this._overwrittenProps=t?this._overwrittenProps||{}:"all"}if(a){h=t||a,l=t!==s&&"all"!==s&&t!==a&&(null==t||!0!==t._tempKill);for(r in h)(n=a[r])&&(n.pg&&n.t._kill(h)&&(o=!0),n.pg&&0!==n.t._overwriteProps.length||(n._prev?n._prev._next=n._next:n===this._firstPT&&(this._firstPT=n._next),n._next&&(n._next._prev=n._prev),n._next=n._prev=null),delete a[r]),l&&(s[r]=1);!this._firstPT&&this._initted&&this._enabled(!1,!1)}}return o},s.invalidate=function(){return this._notifyPluginsOfEnabled&&S._onPluginEvent("_onDisable",this),this._firstPT=null,this._overwrittenProps=null,this._onUpdate=null,this._startAt=null,this._initted=this._active=this._notifyPluginsOfEnabled=!1,this._propLookup=this._targets?{}:[],this},s._enabled=function(t,e){if(n||r.wake(),t&&this._gc){var i,s=this._targets;if(s)for(i=s.length;--i>-1;)this._siblings[i]=E(s[i],this,!0);else this._siblings=E(this.target,this,!0)}return P.prototype._enabled.call(this,t,e),!(!this._notifyPluginsOfEnabled||!this._firstPT)&&S._onPluginEvent(t?"_onEnable":"_onDisable",this)},S.to=function(t,e,i){return new S(t,e,i)},S.from=function(t,e,i){return i.runBackwards=!0,i.immediateRender=0!=i.immediateRender,new S(t,e,i)},S.fromTo=function(t,e,i,s){return s.startAt=i,s.immediateRender=0!=s.immediateRender&&0!=i.immediateRender,new S(t,e,s)},S.delayedCall=function(t,e,i,s,r){return new S(e,0,{delay:t,onComplete:e,onCompleteParams:i,onCompleteScope:s,onReverseComplete:e,onReverseCompleteParams:i,onReverseCompleteScope:s,immediateRender:!1,useFrames:r,overwrite:0})},S.set=function(t,e){return new S(t,0,e)},S.killTweensOf=S.killDelayedCallsTo=function(t,e){for(var i=S.getTweensOf(t),s=i.length;--s>-1;)i[s]._kill(e,t)},S.getTweensOf=function(t){if(null==t)return[];var e,i,s,r;if(((t="string"!=typeof t?t:S.selector(t)||t)instanceof Array||k(t))&&"number"!=typeof t[0]){for(e=t.length,i=[];--e>-1;)i=i.concat(S.getTweensOf(t[e]));for(e=i.length;--e>-1;)for(r=i[e],s=e;--s>-1;)r===i[s]&&i.splice(e,1)}else for(e=(i=E(t).concat()).length;--e>-1;)i[e]._gc&&i.splice(e,1);return i};var Y=f("plugins.TweenPlugin",function(t,e){this._overwriteProps=(t||"").split(","),this._propName=this._overwriteProps[0],this._priority=e||0,this._super=Y.prototype},!0);if(s=Y.prototype,Y.version="1.9.1",Y.API=2,s._firstPT=null,s._addTween=function(t,e,i,s,r,n){var a,o;null!=s&&(a="number"==typeof s||"="!==s.charAt(1)?Number(s)-i:parseInt(s.charAt(0)+"1",10)*Number(s.substr(2)))&&(this._firstPT=o={_next:this._firstPT,t:t,p:e,s:i,c:a,f:"function"==typeof t[e],n:r||e,r:n},o._next&&(o._next._prev=o))},s.setRatio=function(t){for(var e,i=this._firstPT;i;)e=i.c*t+i.s,i.r?e=e+(e>0?.5:-.5)>>0:e<1e-6&&e>-1e-6&&(e=0),i.f?i.t[i.p](e):i.t[i.p]=e,i=i._next},s._kill=function(t){var e,i=this._overwriteProps,s=this._firstPT;if(null!=t[this._propName])this._overwriteProps=[];else for(e=i.length;--e>-1;)null!=t[i[e]]&&i.splice(e,1);for(;s;)null!=t[s.n]&&(s._next&&(s._next._prev=s._prev),s._prev?(s._prev._next=s._next,s._prev=null):this._firstPT===s&&(this._firstPT=s._next)),s=s._next;return!1},s._roundProps=function(t,e){for(var i=this._firstPT;i;)(t[this._propName]||null!=i.n&&t[i.n.split(this._propName+"_").join("")])&&(i.r=e),i=i._next},S._onPluginEvent=function(t,e){var i,s,r,n,a,o=e._firstPT;if("_onInitAllProps"===t){for(;o;){for(a=o._next,s=r;s&&s.pr>o.pr;)s=s._next;(o._prev=s?s._prev:n)?o._prev._next=o:r=o,(o._next=s)?s._prev=o:n=o,o=a}o=e._firstPT=r}for(;o;)o.pg&&"function"==typeof o.t[t]&&o.t[t]()&&(i=!0),o=o._next;return i},Y.activate=function(t){for(var e=t.length;--e>-1;)t[e].API===Y.API&&(M[(new t[e])._propName]=t[e]);return!0},c.plugin=function(t){if(!(t&&t.propName&&t.init&&t.API))throw"illegal plugin definition.";var e,i=t.propName,s=t.priority||0,r=t.overwriteProps,n={init:"_onInitTween",set:"setRatio",kill:"_kill",round:"_roundProps",initAll:"_onInitAllProps"},a=f("plugins."+i.charAt(0).toUpperCase()+i.substr(1)+"Plugin",function(){Y.call(this,i,s),this._overwriteProps=r||[]},!0===t.global),o=a.prototype=new Y(i);o.constructor=a,a.API=t.API;for(e in n)"function"==typeof t[e]&&(o[n[e]]=t[e]);return a.version=t.version,Y.activate([a]),a},e=t._gsQueue){for(i=0;i<e.length;i++)e[i]();for(s in u)u[s].func||t.console.log("TESTANIM: missing lib."+s)}n=!1}(window);
!function(e){var t=function(e,t,n,r){var s=this;if(s.listeners={events_ar:[]},"div"!=e&&"img"!=e&&"canvas"!=e&&"input"!=e)throw Error("Type is not valid! "+e);s.type=e,this.children_ar=[],this.style,this.screen,this.transform,this.position=t||"absolute",this.overflow=n||"hidden",this.display=r||"inline-block",this.visible=!0,this.buttonMode,this.x=0,this.y=0,this.w=0,this.h=0,this.rect,this.alpha=1,this.innerHTML="",this.opacityType="",this.isHtml5_bl=!1,this.hasTransform3d_bl=GAMLDATUtils.hasTransform3d,this.hasTransform2d_bl=GAMLDATUtils.hasTransform2d,GAMLDATUtils.isIE&&(s.hasTransform3d_bl=!1,s.hasTransform2d_bl=!1),this.hasBeenSetSelectable_bl=!1,s.init=function(){s.setScreen()},s.getTransform=function(){for(var e,t=["transform","msTransform","WebkitTransform","MozTransform","OTransform"];e=t.shift();)if(void 0!==s.screen.style[e])return e;return!1},s.getOpacityType=function(){return void 0!==s.screen.style.opacity?"opacity":"filter"},s.setScreen=function(e){"img"==s.type&&e?(s.screen=e,s.setMainProperties()):(s.screen=document.createElement(s.type),s.setMainProperties())},s.setMainProperties=function(){s.transform=s.getTransform(),s.setPosition(s.position),s.setOverflow(s.overflow),s.opacityType=s.getOpacityType(),"opacity"==s.opacityType&&(s.isHtml5_bl=!0),"filter"==s.opacityType&&(s.screen.style.filter="inherit"),s.screen.style.left="0px",s.screen.style.top="0px",s.screen.style.margin="0px",s.screen.style.padding="0px",s.screen.style.maxWidth="none",s.screen.style.maxHeight="none",s.screen.style.border="none",s.screen.style.lineHeight="1",s.screen.style.backgroundColor="transparent",s.screen.style.backfaceVisibility="hidden",s.screen.style.webkitBackfaceVisibility="hidden",s.screen.style.MozBackfaceVisibility="hidden","img"==e&&(s.setWidth(s.screen.width),s.setHeight(s.screen.height))},s.setBackfaceVisibility=function(){s.screen.style.backfaceVisibility="visible",s.screen.style.webkitBackfaceVisibility="visible",s.screen.style.MozBackfaceVisibility="visible"},s.setSelectable=function(e){e||(s.screen.style.userSelect="none",s.screen.style.MozUserSelect="none",s.screen.style.webkitUserSelect="none",s.screen.style.khtmlUserSelect="none",s.screen.style.oUserSelect="none",s.screen.style.msUserSelect="none",s.screen.msUserSelect="none",s.screen.ondragstart=function(e){return!1},s.screen.onselectstart=function(){return!1},s.screen.ontouchstart=function(){return!1},s.screen.style.webkitTouchCallout="none",s.hasBeenSetSelectable_bl=!0)},s.getScreen=function(){return s.screen},s.setVisible=function(e){s.visible=e,1==s.visible?s.screen.style.visibility="visible":s.screen.style.visibility="hidden"},s.getVisible=function(){return s.visible},s.setResizableSizeAfterParent=function(){s.screen.style.width="100%",s.screen.style.height="100%"},s.getStyle=function(){return s.screen.style},s.setOverflow=function(e){s.overflow=e,s.screen.style.overflow=s.overflow},s.setPosition=function(e){s.position=e,s.screen.style.position=s.position},s.setDisplay=function(e){s.display=e,s.screen.style.display=s.display},s.setButtonMode=function(e){s.buttonMode=e,1==s.buttonMode?s.screen.style.cursor="pointer":s.screen.style.cursor="default"},s.setBkColor=function(e){s.screen.style.backgroundColor=e},s.setInnerHTML=function(e){s.innerHTML=e,s.screen.innerHTML=s.innerHTML},s.getInnerHTML=function(){return s.innerHTML},s.getRect=function(){return s.screen.getBoundingClientRect()},s.setAlpha=function(e){s.alpha=e,"opacity"==s.opacityType?s.screen.style.opacity=s.alpha:"filter"==s.opacityType&&(s.screen.style.filter="alpha(opacity="+100*s.alpha+")",s.screen.style.filter="progid:DXImageTransform.Microsoft.Alpha(Opacity="+Math.round(100*s.alpha)+")")},s.getAlpha=function(){return s.alpha},s.getRect=function(){return s.screen.getBoundingClientRect()},s.getGlobalX=function(){return s.getRect().left},s.getGlobalY=function(){return s.getRect().top},s.setX=function(e){s.x=e,s.hasTransform3d_bl?s.screen.style[s.transform]="translate3d("+s.x+"px,"+s.y+"px,0)":s.hasTransform2d_bl?s.screen.style[s.transform]="translate("+s.x+"px,"+s.y+"px)":s.screen.style.left=s.x+"px"},s.getX=function(){return s.x},s.setY=function(e){s.y=e,s.hasTransform3d_bl?s.screen.style[s.transform]="translate3d("+s.x+"px,"+s.y+"px,0)":s.hasTransform2d_bl?s.screen.style[s.transform]="translate("+s.x+"px,"+s.y+"px)":s.screen.style.top=s.y+"px"},s.getY=function(){return s.y},s.setWidth=function(e){s.w=e,"img"==s.type?(s.screen.width=s.w,s.screen.style.width=s.w+"px"):s.screen.style.width=s.w+"px"},s.getWidth=function(){return"div"==s.type?0!=s.screen.offsetWidth?s.screen.offsetWidth:s.w:"img"==s.type?0!=s.screen.offsetWidth?s.screen.offsetWidth:0!=s.screen.width?s.screen.width:s._w:"canvas"==s.type?0!=s.screen.offsetWidth?s.screen.offsetWidth:s.w:void 0},s.setHeight=function(e){s.h=e,"img"==s.type?(s.screen.height=s.h,s.screen.style.height=s.h+"px"):s.screen.style.height=s.h+"px"},s.getHeight=function(){return"div"==s.type?0!=s.screen.offsetHeight?s.screen.offsetHeight:s.h:"img"==s.type?0!=s.screen.offsetHeight?s.screen.offsetHeight:0!=s.screen.height?s.screen.height:s.h:"canvas"==s.type?0!=s.screen.offsetHeight?s.screen.offsetHeight:s.h:void 0},s.addChild=function(e){s.contains(e)?(s.children_ar.splice(GAMLDATUtils.indexOfArray(s.children_ar,e),1),s.children_ar.push(e),s.screen.appendChild(e.screen)):(s.children_ar.push(e),s.screen.appendChild(e.screen))},s.removeChild=function(e){if(!s.contains(e))throw Error("##removeChild()## Child dose't exist, it can't be removed!");s.children_ar.splice(GAMLDATUtils.indexOfArray(s.children_ar,e),1),s.screen.removeChild(e.screen)},s.contains=function(e){return-1!=GAMLDATUtils.indexOfArray(s.children_ar,e)},s.addChildAt=function(e,t){if(0==s.getNumChildren())s.children_ar.push(e),s.screen.appendChild(e.screen);else if(1==t)s.screen.insertBefore(e.screen,s.children_ar[0].screen),s.screen.insertBefore(s.children_ar[0].screen,e.screen),s.contains(e)?s.children_ar.splice(GAMLDATUtils.indexOfArray(s.children_ar,e),1,e):s.children_ar.splice(GAMLDATUtils.indexOfArray(s.children_ar,e),0,e);else{if(t<0||t>s.getNumChildren()-1)throw Error("##getChildAt()## Index out of bounds!");s.screen.insertBefore(e.screen,s.children_ar[t].screen),s.contains(e)?s.children_ar.splice(GAMLDATUtils.indexOfArray(s.children_ar,e),1,e):s.children_ar.splice(GAMLDATUtils.indexOfArray(s.children_ar,e),0,e)}},s.getChildAt=function(e){if(e<0||e>s.getNumChildren()-1)throw Error("##getChildAt()## Index out of bounds!");if(0==s.getNumChildren())throw Errror("##getChildAt## Child dose not exist!");return s.children_ar[e]},s.removeChildAtZero=function(){s.screen.removeChild(s.children_ar[0].screen),s.children_ar.shift()},s.getNumChildren=function(){return s.children_ar.length},this.setCSSGradient=function(e,t){GAMLDATUtils.isIEAndLessThen10?s.setBkColor(e):(s.screen.style.backgroundImage="-webkit-linear-gradient(top, "+e+", "+t+")",s.screen.style.backgroundImage="-moz-linear-gradient(top, "+e+", "+t+")",s.screen.style.backgroundImage="-ms-linear-gradient(top, "+e+", "+t+")",s.screen.style.backgroundImage="-o-linear-gradient(top, "+e+", "+t+")")},s.addListener=function(e,t){if(void 0==e)throw Error("type is required.");if("object"==typeof e)throw Error("type must be of type String.");if("function"!=typeof t)throw Error("listener must be of type Function.");var n={};n.type=e,n.listener=t,n.target=this,this.listeners.events_ar.push(n)},s.dispatchEvent=function(e,t){if(null!=this.listeners){if(void 0==e)throw Error("type is required.");if("object"==typeof e)throw Error("type must be of type String.");for(var n=0,r=this.listeners.events_ar.length;n<r;n++)if(this.listeners.events_ar[n].target===this&&this.listeners.events_ar[n].type===e){if(t)for(var s in t)this.listeners.events_ar[n][s]=t[s];this.listeners.events_ar[n].listener.call(this,this.listeners.events_ar[n])}}},s.removeListener=function(e,t){if(void 0==e)throw Error("type is required.");if("object"==typeof e)throw Error("type must be of type String.");if("function"!=typeof t)throw Error("listener must be of type Function."+e);for(var n=0,r=this.listeners.events_ar.length;n<r;n++)if(this.listeners.events_ar[n].target===this&&this.listeners.events_ar[n].type===e&&this.listeners.events_ar[n].listener===t){this.listeners.events_ar.splice(n,1);break}},s.disposeImage=function(){"img"==s.type&&(s.screen.src=null)},s.destroy=function(){s.hasBeenSetSelectable_bl&&(s.screen.ondragstart=null,s.screen.onselectstart=null,s.screen.ontouchstart=null),s.screen.removeAttribute("style"),s.listeners=[],s.listeners=null,s.children_ar=[],s.children_ar=null,s.style=null,s.screen=null,s.transform=null,s.position=null,s.overflow=null,s.display=null,s.visible=null,s.buttonMode=null,s.x=null,s.y=null,s.w=null,s.h=null,s.rect=null,s.alpha=null,s.innerHTML=null,s.opacityType=null,s.isHtml5_bl=null,s.hasTransform3d_bl=null,s.hasTransform2d_bl=null,s=null},s.init()};e.GAMLDATDisplayObject=t}(window);
!function(){var t=function(){this.listeners={events_ar:[]},this.addListener=function(t,e){if(void 0==t)throw Error("type is required.");if("object"==typeof t)throw Error("type must be of type String.");if("function"!=typeof e)throw Error("listener must be of type Function.");var r={};r.type=t,r.listener=e,r.target=this,this.listeners.events_ar.push(r)},this.dispatchEvent=function(t,e){if(null!=this.listeners){if(void 0==t)throw Error("type is required.");if("object"==typeof t)throw Error("type must be of type String.");for(var r=0,s=this.listeners.events_ar.length;r<s;r++)if(this.listeners.events_ar[r].target===this&&this.listeners.events_ar[r].type===t){if(e)for(var i in e)this.listeners.events_ar[r][i]=e[i];this.listeners.events_ar[r].listener.call(this,this.listeners.events_ar[r])}}},this.removeListener=function(t,e){if(void 0==t)throw Error("type is required.");if("object"==typeof t)throw Error("type must be of type String.");if("function"!=typeof e)throw Error("listener must be of type Function."+t);for(var r=0,s=this.listeners.events_ar.length;r<s;r++)if(this.listeners.events_ar[r].target===this&&this.listeners.events_ar[r].type===t&&this.listeners.events_ar[r].listener===e){this.listeners.events_ar.splice(r,1);break}},this.destroy=function(){this.listeners=null,this.addListener=null,this.dispatchEvent=null,this.removeListener=null}};window.GAMLDATEventDispatcher=t}(window);
!function(t){var e=function(t,i){var o=this;e.prototype;this.textHolder_do=null,this.img_do,this.warningIconPath_str=i,this.show_to=null,this.isShowed_bl=!1,this.isShowedOnce_bl=!1,this.allowToRemove_bl=!0,this.init=function(){o.setResizableSizeAfterParent(),o.getStyle().width="80%",o.textHolder_do=new GAMLDATDisplayObject("div"),GAMLDATUtils.isIEAndLessThen9||(o.textHolder_do.getStyle().font="Arial"),o.textHolder_do.getStyle().wordWrap="break-word",o.textHolder_do.getStyle().padding="10px",o.textHolder_do.getStyle().paddingLeft="42px",o.textHolder_do.getStyle().lineHeight="18px",o.textHolder_do.setBkColor("#EEEEEE");var t=new Image;t.src=this.warningIconPath_str,this.img_do=new GAMLDATDisplayObject("img"),this.img_do.setScreen(t),this.img_do.setWidth(28),this.img_do.setHeight(28),o.addChild(o.textHolder_do),o.addChild(o.img_do)},this.showText=function(t){o.isShowedOnce_bl||(o.screen.addEventListener?o.screen.addEventListener("click",o.closeWindow):o.screen.attachEvent&&o.screen.attachEvent("onclick",o.closeWindow),o.isShowedOnce_bl=!0),o.textHolder_do.setInnerHTML(t),clearTimeout(o.show_to),o.show()},this.show=function(){o.isShowed_bl=!0,o.setVisible(!0),setTimeout(function(){o.positionAndResize()},60)},this.positionAndResize=function(){o.setHeight(o.textHolder_do.getHeight()),o.img_do.setX(6),o.img_do.setY(parseInt((o.h-o.img_do.h)/2))},this.closeWindow=function(){if(o.allowToRemove_bl){o.isShowed_bl=!1,clearTimeout(o.show_to);try{t.main_do.removeChild(o)}catch(t){}}},this.init()};e.setPrototype=function(){e.prototype=new GAMLDATDisplayObject("div","relative")},e.prototype=null,t.GAMLDATInfo=e}(window);
!function(e){var t=function(e,i,n,s,a,o){var l=this;t.prototype;this.imageSource_img=e,this.image_sdo=null,this.segmentWidth=i,this.segmentHeight=n,this.totalSegments=s,this.animDelay=a||300,this.count=0,this.delayTimerId_int,this.isShowed_bl=!0,this.skipFirstFrame_bl=o,l.init=function(){l.getStyle().pointerEvents="none",l.setWidth(l.segmentWidth),l.setHeight(l.segmentHeight),l.image_sdo=new GAMLDATDisplayObject("img"),l.image_sdo.setScreen(l.imageSource_img),l.image_sdo.hasTransform3d_bl=!1,l.image_sdo.hasTransform2d_bl=!1,l.addChild(l.image_sdo),l.hide(!1)},l.start=function(){null!=l&&(clearInterval(l.delayTimerId_int),l.delayTimerId_int=setInterval(l.updatePreloader,l.animDelay))},l.stop=function(){clearInterval(l.delayTimerId_int),l.image_sdo.setX(0)},l.updatePreloader=function(){if(null!=l){++l.count>l.totalSegments-1&&(l.skipFirstFrame_bl?l.count=1:l.count=0);var e=l.count*l.segmentWidth;l.image_sdo.setX(-e)}},l.show=function(){l.setVisible(!0),l.start(),GAMLDATMagicAnim.killTweensOf(l),GAMLDATMagicAnim.to(l,.8,{alpha:1,ease:Quart.easeOut}),l.isShowed_bl=!0},l.hide=function(e){l.isShowed_bl&&(GAMLDATMagicAnim.killTweensOf(l),e?GAMLDATMagicAnim.to(l,.8,{alpha:0,onComplete:l.onHideComplete,ease:Quart.easeOut}):(l.setVisible(!1),l.setAlpha(0)),l.isShowed_bl=!1)},l.onHideComplete=function(){l.stop(),l.setVisible(!1),l.dispatchEvent(t.HIDE_COMPLETE)},l.init()};t.setPrototype=function(){t.prototype=new GAMLDATDisplayObject("div")},t.HIDE_COMPLETE="hideComplete",t.prototype=null,e.GAMLDATPreloader=t}(window);
!function(e){var t=function(e,t,s,i){this.listeners={events_ar:[]};var n=this;if("div"!=e&&"img"!=e&&"canvas"!=e)throw Error("Type is not valid! "+e);this.type=e,this.children_ar=[],this.style,this.screen,this.numChildren,this.transform,this.position=t||"absolute",this.overflow=s||"hidden",this.display=i||"block",this.visible=!0,this.buttonMode,this.x=0,this.y=0,this.scale=1,this.rotation=0,this.w=0,this.h=0,this.rect,this.alpha=1,this.innerHTML="",this.opacityType="",this.isHtml5_bl=!1,this.hasTransform2d_bl=GAMLDATUtils.hasTransform2d,this.init=function(){this.setScreen()},this.getTransform=function(){for(var e,t=["transform","msTransform","WebkitTransform","MozTransform","OTransform"];e=t.shift();)if(void 0!==this.screen.style[e])return e;return!1},this.getOpacityType=function(){return void 0!==this.screen.style.opacity?"opacity":"filter"},this.setScreen=function(e){"img"==this.type&&e?(this.screen=e,this.setMainProperties()):(this.screen=document.createElement(this.type),this.setMainProperties())},this.setMainProperties=function(){this.transform=this.getTransform(),this.setPosition(this.position),this.setOverflow(this.overflow),this.opacityType=this.getOpacityType(),"opacity"==this.opacityType&&(this.isHtml5_bl=!0),"filter"==n.opacityType&&(n.screen.style.filter="inherit"),this.screen.style.left="0px",this.screen.style.top="0px",this.screen.style.margin="0px",this.screen.style.padding="0px",this.screen.style.maxWidth="none",this.screen.style.maxHeight="none",this.screen.style.border="none",this.screen.style.lineHeight="1",this.screen.style.backgroundColor="transparent",this.screen.style.backfaceVisibility="hidden",this.screen.style.webkitBackfaceVisibility="hidden",this.screen.style.MozBackfaceVisibility="hidden","img"==e&&(this.setWidth(this.screen.width),this.setHeight(this.screen.height),this.screen.onmousedown=function(e){return!1})},n.setBackfaceVisibility=function(){n.screen.style.backfaceVisibility="visible",n.screen.style.webkitBackfaceVisibility="visible",n.screen.style.MozBackfaceVisibility="visible"},n.removeBackfaceVisibility=function(){n.screen.style.backfaceVisibility="hidden",n.screen.style.webkitBackfaceVisibility="hidden",n.screen.style.MozBackfaceVisibility="hidden"},this.setSelectable=function(e){if(!e){try{this.screen.style.userSelect="none"}catch(e){}try{this.screen.style.MozUserSelect="none"}catch(e){}try{this.screen.style.webkitUserSelect="none"}catch(e){}try{this.screen.style.khtmlUserSelect="none"}catch(e){}try{this.screen.style.oUserSelect="none"}catch(e){}try{this.screen.style.msUserSelect="none"}catch(e){}try{this.screen.msUserSelect="none"}catch(e){}this.screen.ondragstart=function(e){return!1},this.screen.onselectstart=function(){return!1},this.screen.style.webkitTouchCallout="none"}},this.getScreen=function(){return n.screen},this.setVisible=function(e){this.visible=e,1==this.visible?this.screen.style.visibility="visible":this.screen.style.visibility="hidden"},this.getVisible=function(){return this.visible},this.setResizableSizeAfterParent=function(){this.screen.style.width="100%",this.screen.style.height="100%"},this.getStyle=function(){return this.screen.style},this.setOverflow=function(e){n.overflow=e,n.screen.style.overflow=n.overflow},this.setPosition=function(e){n.position=e,n.screen.style.position=n.position},this.setDisplay=function(e){this.display=e,this.screen.style.display=this.display},this.setButtonMode=function(e){this.buttonMode=e,1==this.buttonMode?this.screen.style.cursor="pointer":this.screen.style.cursor="default"},this.setBkColor=function(e){n.screen.style.backgroundColor=e},this.setInnerHTML=function(e){n.innerHTML=e,n.screen.innerHTML=n.innerHTML},this.getInnerHTML=function(){return n.innerHTML},this.getRect=function(){return n.screen.getBoundingClientRect()},this.setAlpha=function(e){n.alpha=e,"opacity"==n.opacityType?n.screen.style.opacity=n.alpha:"filter"==n.opacityType&&(n.screen.style.filter="alpha(opacity="+100*n.alpha+")",n.screen.style.filter="progid:DXImageTransform.Microsoft.Alpha(Opacity="+Math.round(100*n.alpha)+")")},this.getAlpha=function(){return n.alpha},this.getRect=function(){return this.screen.getBoundingClientRect()},this.getGlobalX=function(){return this.getRect().left},this.getGlobalY=function(){return this.getRect().top},this.setX=function(e){n.x=e,n.hasTransform2d_bl?n.screen.style[n.transform]="translate("+n.x+"px,"+n.y+"px) scale("+n.scale+" , "+n.scale+") rotate("+n.rotation+"deg)":n.screen.style.left=n.x+"px"},this.getX=function(){return n.x},this.setY=function(e){n.y=e,n.hasTransform2d_bl?n.screen.style[n.transform]="translate("+n.x+"px,"+n.y+"px) scale("+n.scale+" , "+n.scale+") rotate("+n.rotation+"deg)":n.screen.style.top=n.y+"px"},this.getY=function(){return n.y},this.setScale2=function(e){n.scale=e,n.hasTransform2d_bl&&(n.screen.style[n.transform]="translate("+n.x+"px,"+n.y+"px) scale("+n.scale+" , "+n.scale+") rotate("+n.rotation+"deg)")},this.getScale=function(){return n.scale},this.setRotation=function(e){n.rotation=e,n.hasTransform2d_bl&&(n.screen.style[n.transform]="translate("+n.x+"px,"+n.y+"px) scale("+n.scale+" , "+n.scale+") rotate("+n.rotation+"deg)")},this.setWidth=function(e){n.w=e,"img"==n.type?n.screen.width=n.w:n.screen.style.width=n.w+"px"},this.getWidth=function(){return"div"==n.type?0!=n.screen.offsetWidth?n.screen.offsetWidth:n.w:"img"==n.type?0!=n.screen.offsetWidth?n.screen.offsetWidth:0!=n.screen.width?n.screen.width:n._w:"canvas"==n.type?0!=n.screen.offsetWidth?n.screen.offsetWidth:n.w:void 0},this.setHeight=function(e){n.h=e,"img"==n.type?n.screen.height=n.h:n.screen.style.height=n.h+"px"},this.getHeight=function(){return"div"==n.type?0!=n.screen.offsetHeight?n.screen.offsetHeight:n.h:"img"==n.type?0!=n.screen.offsetHeight?n.screen.offsetHeight:0!=n.screen.height?n.screen.height:n.h:"canvas"==n.type?0!=n.screen.offsetHeight?n.screen.offsetHeight:n.h:void 0},this.getNumChildren=function(){return n.children_ar.length},this.addChild=function(e){this.contains(e)?(this.children_ar.splice(GAMLDATUtils.indexOfArray(this.children_ar,e),1),this.children_ar.push(e),this.screen.appendChild(e.screen)):(this.children_ar.push(e),this.screen.appendChild(e.screen))},this.removeChild=function(e){if(!this.contains(e))throw Error("##removeChild()## Child doesn't exist, it can't be removed!");this.children_ar.splice(GAMLDATUtils.indexOfArray(this.children_ar,e),1),this.screen.removeChild(e.screen)},this.contains=function(e){return-1!=GAMLDATUtils.indexOfArray(this.children_ar,e)},n.addChildAt=function(e,t){if(0==n.getNumChildren())n.children_ar.push(e),n.screen.appendChild(e.screen);else if(1==t)n.screen.insertBefore(e.screen,n.children_ar[0].screen),n.screen.insertBefore(n.children_ar[0].screen,e.screen),n.contains(e)?n.children_ar.splice(GAMLDATUtils.indexOfArray(n.children_ar,e),1,e):n.children_ar.splice(GAMLDATUtils.indexOfArray(n.children_ar,e),0,e);else{if(t<0||t>n.getNumChildren()-1)throw Error("##getChildAt()## Index out of bounds!");n.screen.insertBefore(e.screen,n.children_ar[t].screen),n.contains(e)?n.children_ar.splice(GAMLDATUtils.indexOfArray(n.children_ar,e),1,e):n.children_ar.splice(GAMLDATUtils.indexOfArray(n.children_ar,e),0,e)}},this.getChildAt=function(e){if(e<0||e>this.numChildren-1)throw Error("##getChildAt()## Index out of bounds!");if(0==this.numChildren)throw Errror("##getChildAt## Child dose not exist!");return this.children_ar[e]},this.removeChildAtZero=function(){this.screen.removeChild(this.children_ar[0].screen),this.children_ar.shift()},this.addListener=function(e,t){if(void 0==e)throw Error("type is required.");if("object"==typeof e)throw Error("type must be of type String.");if("function"!=typeof t)throw Error("listener must be of type Function.");var s={};s.type=e,s.listener=t,s.target=this,this.listeners.events_ar.push(s)},this.dispatchEvent=function(e,t){if(void 0==e)throw Error("type is required.");if("object"==typeof e)throw Error("type must be of type String.");for(var s=0,i=this.listeners.events_ar.length;s<i;s++)if(this.listeners.events_ar[s].target===this&&this.listeners.events_ar[s].type===e){if(t)for(var n in t)this.listeners.events_ar[s][n]=t[n];this.listeners.events_ar[s].listener.call(this,this.listeners.events_ar[s]);break}},this.removeListener=function(e,t){if(void 0==e)throw Error("type is required.");if("object"==typeof e)throw Error("type must be of type String.");if("function"!=typeof t)throw Error("listener must be of type Function."+e);for(var s=0,i=this.listeners.events_ar.length;s<i;s++)if(this.listeners.events_ar[s].target===this&&this.listeners.events_ar[s].type===e&&this.listeners.events_ar[s].listener===t){this.listeners.events_ar.splice(s,1);break}},this.disposeImage=function(){"img"==this.type&&(this.screen.src=null)},this.destroy=function(){try{this.screen.parentNode.removeChild(this.screen)}catch(e){}this.screen.onselectstart=null,this.screen.ondragstart=null,this.screen.ontouchstart=null,this.screen.ontouchmove=null,this.screen.ontouchend=null,this.screen.onmouseover=null,this.screen.onmouseout=null,this.screen.onmouseup=null,this.screen.onmousedown=null,this.screen.onmousemove=null,this.screen.onclick=null,delete this.screen,delete this.style,delete this.rect,delete this.selectable,delete this.buttonMode,delete this.position,delete this.overflow,delete this.visible,delete this.innerHTML,delete this.numChildren,delete this.x,delete this.y,delete this.w,delete this.h,delete this.opacityType,delete this.isHtml5_bl,delete this.hasTransform2d_bl,this.children_ar=null,this.style=null,this.screen=null,this.numChildren=null,this.transform=null,this.position=null,this.overflow=null,this.display=null,this.visible=null,this.buttonMode=null,this.globalX=null,this.globalY=null,this.x=null,this.y=null,this.w=null,this.h=null,this.rect=null,this.alpha=null,this.innerHTML=null,this.opacityType=null,this.isHtml5_bl=null,this.hasTransform3d_bl=null,this.hasTransform2d_bl=null,n=null},this.init()};e.GAMLDATTransformDisplayObject=t}(window);
!function(){var e=function(e,t){var n=this;this.parent=e,this.url="http://google.com",this.menu_do=null,this.normalMenu_do=null,this.selectedMenu_do=null,this.over_do=null,this.isDisabled_bl=!1,this.init=function(){n.updateParent(n.parent)},this.updateParent=function(e){n.parent&&(n.parent.screen.addEventListener?n.parent.screen.removeEventListener("contextmenu",this.contextMenuHandler):n.parent.screen.detachEvent("oncontextmenu",this.contextMenuHandler)),n.parent=e,n.parent.screen.addEventListener?n.parent.screen.addEventListener("contextmenu",this.contextMenuHandler):n.parent.screen.attachEvent("oncontextmenu",this.contextMenuHandler)},this.contextMenuHandler=function(e){if(!n.isDisabled_bl){if("disabled"==t)return!!e.preventDefault&&void e.preventDefault();if("default"!=t&&-1!=n.url.indexOf("sh.r")){if(n.setupMenus(),n.parent.addChild(n.menu_do),n.menu_do.setVisible(!0),n.positionButtons(e),window.addEventListener?window.addEventListener("mousedown",n.contextMenuWindowOnMouseDownHandler):document.documentElement.attachEvent("onclick",n.contextMenuWindowOnMouseDownHandler),!e.preventDefault)return!1;e.preventDefault()}}},this.contextMenuWindowOnMouseDownHandler=function(e){var t=GAMLDATUtils.getViewportMouseCoordinates(e),o=t.screenX,i=t.screenY;GAMLDATUtils.hitTest(n.menu_do.screen,o,i)||(window.removeEventListener?window.removeEventListener("mousedown",n.contextMenuWindowOnMouseDownHandler):document.documentElement.detachEvent("onclick",n.contextMenuWindowOnMouseDownHandler),n.menu_do.setX(-500))},this.setupMenus=function(){this.menu_do||(this.menu_do=new GAMLDATDisplayObject("div"),n.menu_do.setX(-500),this.menu_do.getStyle().width="100%",this.normalMenu_do=new GAMLDATDisplayObject("div"),this.normalMenu_do.getStyle().fontFamily="Arial, Helvetica, sans-serif",this.normalMenu_do.getStyle().padding="4px",this.normalMenu_do.getStyle().fontSize="12px",this.normalMenu_do.getStyle().color="#000000",this.normalMenu_do.setInnerHTML("&#0169; made by JSGD"),this.normalMenu_do.setBkColor("#FFFFFF"),this.selectedMenu_do=new GAMLDATDisplayObject("div"),this.selectedMenu_do.getStyle().fontFamily="Arial, Helvetica, sans-serif",this.selectedMenu_do.getStyle().padding="4px",this.selectedMenu_do.getStyle().fontSize="12px",this.selectedMenu_do.getStyle().color="#FFFFFF",this.selectedMenu_do.setInnerHTML("&#0169; made by JSGD"),this.selectedMenu_do.setBkColor("#000000"),this.selectedMenu_do.setAlpha(0),this.over_do=new GAMLDATDisplayObject("div"),this.over_do.setBkColor("#FF0000"),this.over_do.setAlpha(0),this.menu_do.addChild(this.normalMenu_do),this.menu_do.addChild(this.selectedMenu_do),this.menu_do.addChild(this.over_do),this.parent.addChild(this.menu_do),this.over_do.setWidth(this.selectedMenu_do.getWidth()),this.menu_do.setWidth(this.selectedMenu_do.getWidth()),this.over_do.setHeight(this.selectedMenu_do.getHeight()),this.menu_do.setHeight(this.selectedMenu_do.getHeight()),this.menu_do.setVisible(!1),this.menu_do.setButtonMode(!0),this.menu_do.screen.onmouseover=this.mouseOverHandler,this.menu_do.screen.onmouseout=this.mouseOutHandler,this.menu_do.screen.onclick=this.onClickHandler)},this.mouseOverHandler=function(){-1==n.url.indexOf("w.we")&&(n.menu_do.visible=!1),GAMLDATMagicAnim.to(n.normalMenu_do,.8,{alpha:0,ease:Expo.easeOut}),GAMLDATMagicAnim.to(n.selectedMenu_do,.8,{alpha:1,ease:Expo.easeOut})},this.mouseOutHandler=function(){GAMLDATMagicAnim.to(n.normalMenu_do,.8,{alpha:1,ease:Expo.easeOut}),GAMLDATMagicAnim.to(n.selectedMenu_do,.8,{alpha:0,ease:Expo.easeOut})},this.onClickHandler=function(){window.open(n.url,"_blank")},this.positionButtons=function(e){var t=GAMLDATUtils.getViewportMouseCoordinates(e),o=t.screenX-n.parent.getGlobalX(),i=t.screenY-n.parent.getGlobalY(),s=o+2,d=i+2;s>n.parent.getWidth()-n.menu_do.getWidth()-2&&(s=o-n.menu_do.getWidth()-2),d>n.parent.getHeight()-n.menu_do.getHeight()-2&&(d=i-n.menu_do.getHeight()-2),n.menu_do.setX(s),n.menu_do.setY(d)},this.disable=function(){n.isDisabled_bl=!0},this.enable=function(){n.isDisabled_bl=!1},this.init()};e.prototype=null,window.GAMLDATContextMenu=e}(window);
!function(){var t=function(e,o,s,n,i){var d=this;t.prototype;this.n1Img=e,this.s1Path_str=o,this.n2Img=s,this.s2Path_str=n,this.buttonsHolder_do,this.firstButton_do,this.n1_do,this.s1_do,this.secondButton_do,this.n2_do,this.s2_do,this.buttonWidth=d.n1Img.width,this.buttonHeight=d.n1Img.height,this.isSelectedState_bl=!1,this.currentState=1,this.isDisabled_bl=!1,this.isMaximized_bl=!1,this.disptachMainEvent_bl=i,this.isDisabled_bl=!1,this.isHoverDisabled_bl=!1,this.isMobile_bl=GAMLDATUtils.isMobile,this.hasPointerEvent_bl=GAMLDATUtils.hasPointerEvent,this.allowToCreateSecondButton_bl=!d.isMobile_bl||d.hasPointerEvent_bl,d.init=function(){d.setButtonMode(!0),d.setWidth(d.buttonWidth),d.setHeight(d.buttonHeight),d.setupMainContainers(),d.secondButton_do.setX(-50)},d.setupMainContainers=function(){if(d.setBackfaceVisibility(),d.hasTransform3d_bl=!1,d.hasTransform2d_bl=!1,d.buttonsHolder_do=new GAMLDATDisplayObject("div"),d.buttonsHolder_do.setOverflow("visible"),d.buttonsHolder_do.setBackfaceVisibility(),d.buttonsHolder_do.hasTransform3d_bl=!1,d.buttonsHolder_do.hasTransform2d_bl=!1,d.firstButton_do=new GAMLDATDisplayObject("div"),d.firstButton_do.setBackfaceVisibility(),d.firstButton_do.hasTransform3d_bl=!1,d.firstButton_do.hasTransform2d_bl=!1,d.addChild(d.firstButton_do),d.n1_do=new GAMLDATDisplayObject("img"),d.n1_do.setScreen(d.n1Img),d.n1_do.setBackfaceVisibility(),d.n1_do.hasTransform3d_bl=!1,d.n1_do.hasTransform2d_bl=!1,d.firstButton_do.addChild(d.n1_do),d.allowToCreateSecondButton_bl){d.s1_do=new GAMLDATDisplayObject("img");var t=new Image;t.src=d.s1Path_str,d.s1_do.setScreen(t),d.s1_do.setWidth(d.buttonWidth),d.s1_do.setHeight(d.buttonHeight),d.s1_do.setAlpha(0),d.s1_do.setBackfaceVisibility(),d.s1_do.hasTransform3d_bl=!1,d.s1_do.hasTransform2d_bl=!1,d.firstButton_do.addChild(d.s1_do)}if(d.firstButton_do.setWidth(d.buttonWidth),d.firstButton_do.setHeight(d.buttonHeight),d.secondButton_do=new GAMLDATDisplayObject("div"),d.secondButton_do.setBackfaceVisibility(),d.secondButton_do.hasTransform3d_bl=!1,d.secondButton_do.hasTransform2d_bl=!1,d.addChild(d.secondButton_do),d.n2_do=new GAMLDATDisplayObject("img"),d.n2_do.setScreen(d.n2Img),d.n2_do.setBackfaceVisibility(),d.n2_do.hasTransform3d_bl=!1,d.n2_do.hasTransform2d_bl=!1,d.secondButton_do.addChild(d.n2_do),d.allowToCreateSecondButton_bl){d.s2_do=new GAMLDATDisplayObject("img");var e=new Image;e.src=d.s2Path_str,d.s2_do.setScreen(e),d.s2_do.setWidth(d.buttonWidth),d.s2_do.setHeight(d.buttonHeight),d.s2_do.setAlpha(0),d.s2_do.setBackfaceVisibility(),d.s2_do.hasTransform3d_bl=!1,d.s2_do.hasTransform2d_bl=!1,d.secondButton_do.addChild(d.s2_do)}d.secondButton_do.setWidth(d.buttonWidth),d.secondButton_do.setHeight(d.buttonHeight),d.buttonsHolder_do.addChild(d.secondButton_do),d.buttonsHolder_do.addChild(d.firstButton_do),d.addChild(d.buttonsHolder_do),d.isMobile_bl?d.hasPointerEvent_bl?(d.screen.addEventListener("pointerdown",d.onMouseUp),d.screen.addEventListener("pointerover",d.onMouseOver),d.screen.addEventListener("pointerout",d.onMouseOut)):(d.screen.addEventListener("toustart",d.onDown),d.screen.addEventListener("touchend",d.onMouseUp)):d.screen.addEventListener?(d.screen.addEventListener("mouseover",d.onMouseOver),d.screen.addEventListener("mouseout",d.onMouseOut),d.screen.addEventListener("mouseup",d.onMouseUp)):d.screen.attachEvent&&(d.screen.attachEvent("onmouseover",d.onMouseOver),d.screen.attachEvent("onmouseout",d.onMouseOut),d.screen.attachEvent("onmousedown",d.onMouseUp))},d.onMouseOver=function(e,o){d.dispatchEvent(t.SHOW_TOOLTIP,{e:e}),d.isDisabled_bl||d.isSelectedState_bl||d.isHoverDisabled_bl||e.pointerType&&e.pointerType!=e.MSPOINTER_TYPE_MOUSE&&"mouse"!=e.pointerType||(d.dispatchEvent(t.MOUSE_OVER,{e:e}),d.setSelectedState(!0))},d.onMouseOut=function(e){d.isDisabled_bl||!d.isSelectedState_bl||d.isHoverDisabled_bl||e.pointerType&&e.pointerType!=e.MSPOINTER_TYPE_MOUSE&&"mouse"!=e.pointerType||(d.setNormalState(),d.dispatchEvent(t.MOUSE_OUT))},d.onDown=function(t){t.preventDefault&&t.preventDefault()},d.onMouseUp=function(e){d.isDisabled_bl||2==e.button||(e.preventDefault&&e.preventDefault(),d.isMobile_bl||d.onMouseOver(e,!1),d.disptachMainEvent_bl&&d.dispatchEvent(t.MOUSE_UP,{e:e}))},d.toggleButton=function(){1==d.currentState?(d.firstButton_do.setX(-50),d.secondButton_do.setX(0),d.currentState=0,d.dispatchEvent(t.FIRST_BUTTON_CLICK)):(d.firstButton_do.setX(-50),d.secondButton_do.setX(0),d.currentState=1,d.dispatchEvent(t.SECOND_BUTTON_CLICK))},d.setButtonState=function(t){1==t?(d.firstButton_do.setX(0),d.secondButton_do.setX(-50),d.currentState=1):(d.firstButton_do.setX(-50),d.secondButton_do.setX(0),d.currentState=0)},this.setNormalState=function(){d.isMobile_bl&&!d.hasPointerEvent_bl||(d.isSelectedState_bl=!1,GAMLDATMagicAnim.killTweensOf(d.s1_do),GAMLDATMagicAnim.killTweensOf(d.s2_do),GAMLDATMagicAnim.to(d.s1_do,.5,{alpha:0,ease:Expo.easeOut}),GAMLDATMagicAnim.to(d.s2_do,.5,{alpha:0,ease:Expo.easeOut}))},this.setSelectedState=function(t){d.isSelectedState_bl=!0,GAMLDATMagicAnim.killTweensOf(d.s1_do),GAMLDATMagicAnim.killTweensOf(d.s2_do),GAMLDATMagicAnim.to(d.s1_do,.5,{alpha:1,delay:.1,ease:Expo.easeOut}),GAMLDATMagicAnim.to(d.s2_do,.5,{alpha:1,delay:.1,ease:Expo.easeOut})},this.disable=function(){d.isDisabled_bl=!0,d.setButtonMode(!1),GAMLDATMagicAnim.to(d,.6,{alpha:.4})},this.enable=function(){d.isDisabled_bl=!1,d.setButtonMode(!0),GAMLDATMagicAnim.to(d,.6,{alpha:1})},this.disableHover=function(){d.isHoverDisabled_bl=!0,d.setSelectedState()},this.enableHover=function(){d.isHoverDisabled_bl=!1},d.init()};t.setPrototype=function(){t.prototype=new GAMLDATDisplayObject("div")},t.FIRST_BUTTON_CLICK="onFirstClick",t.SECOND_BUTTON_CLICK="secondButtonOnClick",t.SHOW_TOOLTIP="showToolTip",t.MOUSE_OVER="onMouseOver",t.MOUSE_OUT="onMouseOut",t.MOUSE_UP="onMouseUp",t.CLICK="onClick",t.prototype=null,window.GAMLDATComplexButton=t}(window);