File: /home/salhiscp/salhab360photos.com/wp-content/plugins/fwdsisc/js/FWDSISC-unminified.js
/**
* Simple Image Slider Carousel PACKAGED v3.0
* Main class.
*
* @author Tibi - FWDesign [https://webdesign-flash.ro/]
* Copyright © 2006 All Rights Reserved.
*/
(function (window){
'use strict';
var FWDSISC = function(props){
var _s = this;
// Initialize.
_s.init = function(){
FWDSISCUtils.checkIfHasTransforms();
FWDTweenLite.ticker.useRAF(true);
_s.props = props;
_s.listeners = {events_ar:[]};
_s.fontIcon = props.fontIcon || 'fwdsisc-icon';
if(!_s.props){
alert("FWDSISC constructor properties object is not defined!");
return;
}
_s.instName = _s.props.instanceName;
_s.displayType = _s.props.displayType || FWDSISC.RESPONSIVE;
_s.displayType = _s.displayType.toLowerCase();
if(_s.displayType.toLowerCase() != FWDSISC.RESPONSIVE
&& _s.displayType.toLowerCase() != FWDSISC.FULL_SCREEN
&& _s.displayType.toLowerCase() != FWDSISC.FLUID_WIDTH
&& _s.displayType.toLowerCase() != FWDSISC.FLUID_WIDTH_AND_HEIGHT
&& _s.displayType.toLowerCase() != FWDSISC.AFTER_PARENT){
_s.displayType = FWDSISC.RESPONSIVE;
}
if(!_s.props.instanceName){
alert("FWDSISC instance name is required please make sure that the instanceName parameter exsists and it's value is uinique.");
return;
}
if(window[_s.instName]){
alert("FWDSISC instance name " + _s.instName + " is already defined and contains a different instance reference, set a different instance name.");
return;
}else{
window[_s.instName] = _s;
}
if(!_s.props){
alert("FWDSISC constructor properties object is not defined!");
return;
}
_s.body = document.getElementsByTagName("body")[0];
_s.stageContainer = null;
if(_s.displayType == FWDSISC.FULL_SCREEN){
_s.stageContainer = _s.body;
}else{
_s.stageContainer = FWDSISCUtils.getChildById(_s.props.parentId);
if(!_s.stageContainer){
alert("FWDSISC holder div is not found, please make sure that the div exsists and the id is correct! " + _s.props.parentId);
return;
}
}
_s.backgroundColor_str = _s.props.backgroundColor || "#000000";
_s.maxWidth = _s.props.maxWidth || 1800;
_s.offsetWidth = _s.props.offsetWidth || 1000;
_s.maxHeight = _s.props.maxHeight || 700;
_s.sliderOffsetTopAndBottom = _s.props.sliderOffsetTopAndBottom || 0;
_s.className = _s.props.className;
_s.id = -1;
_s.catId = -1;
_s.prevCatId = -2;
_s.prevId = -2;
_s.stageW = 0;
_s.stageH = _s.lastX = _s.lastY = 0;
_s.offsetParalaxPos = 0;
_s.zIndex = _s.props.zIndex || 0;
_s.totalimages;
_s.displayVertical = _s.props.displayVertical || false;
if(_s.displayVertical == 'yes') _s.displayVertical = true;
_s.isMobile_bl = FWDSISCUtils.isMobile;
_s.autoScale_bl = _s.props.autoScale == "yes" ? true : false;
_s.paralax_bl = _s.props.paralax == "yes" ? true : false;
_s.hasPointerEvent_bl = FWDSISCUtils.hasPointerEvent;
_s.initializeOnlyWhenVisible_bl = _s.props.initializeOnlyWhenVisible;
_s.initializeOnlyWhenVisible_bl = _s.initializeOnlyWhenVisible_bl == "yes" ? true : false;
_s.setupMainDo();
_s.startResizeHandler();
if(_s.initializeOnlyWhenVisible_bl){
window.addEventListener("scroll", _s.onInitlalizeScrollHandler);
setTimeout(_s.onInitlalizeScrollHandler, 50);
}else{
setTimeout(_s.setupSlider, 50);
}
};
_s.onInitlalizeScrollHandler = function(){
if(!_s.ws) return;
var so = FWDSISCUtils.getScrollOffsets();
_s.pageXOffset = so.x;
_s.pageYOffset = so.y;
if(_s.main_do.getRect().top >= -_s.stageH && _s.main_do.getRect().top < _s.ws.h){
window.removeEventListener("scroll", _s.onInitlalizeScrollHandler);
_s.setupSlider();
}
};
_s.setupSlider = function(){
if(_s.data) return;
_s.setupData();
_s.setupInfoWindow();
}
// Start stop slideshow.
_s.startStopSlideshowBasedOnVisiblity = function(){
if(_s.data.slideshowDelay || _s.paralax_bl){
window.addEventListener("scroll", _s.onStartStopSlideshowBasedOnVisiblity);
_s.onStartStopSlideshowBasedOnVisiblity();
if(_s.paralax_bl) _s.startRAF();
}
}
_s.stopSlideshowBasedOnVisiblity = function(){
window.removeEventListener("scroll", _s.onStartStopSlideshowBasedOnVisiblity);
_s.stopRAF();
}
_s.isVisible_bl = true;
_s.onStartStopSlideshowBasedOnVisiblity = function(){
var so = FWDSISCUtils.getScrollOffsets();
_s.pageXOffset = so.x;
_s.pageYOffset = so.y;
if(_s.main_do.getRect().top >= -_s.stageH && _s.main_do.getRect().top < _s.ws.h){
if(_s.paralax_bl){
if(_s.imageManager_do.slideshowPreloader) _s.imageManager_do.slideshowPreloader.positionAndResize();
_s.startRAF();
clearTimeout(_s.pr_to);
_s.pr_to = setTimeout(function(){
cancelAnimationFrame(_s.myReq);
}, 1000);
}
if(!_s.isVisible_bl && _s.imageManager_do.tm) _s.imageManager_do.tm.start();
_s.isVisible_bl = true;
}else{
if(_s.imageManager_do.tm) _s.imageManager_do.tm.stop();
_s.isVisible_bl = false;
}
};
_s.stopRAF = function(){
cancelAnimationFrame(_s.myReq);
}
_s.startRAF = function(){
function step() {
if(window['acora_nonce']){
var pos = Math.round(FWDSISCUtils.getScrollOffsets().y/2);
}else{
var pos = _s.main_do.getRect().top/2;
if(pos > 0){
pos = 0;
}
pos *= -1;
}
if(_s.main_do.getRect().top >= -_s.stageH && _s.main_do.getRect().top < _s.ws.h){
if(FWDSISCUtils.hasTransform3d){
_s.imageManager_do.mainHolder_do.getStyle().transform = 'translate3d(0, ' + pos + 'px' + ', 0)';
}else{
_s.imageManager_do.mainHolder_do.setY(pos);
}
if(_s.imageManager_do.vidHld_do){
var videoPos = Math.round((_s.imageManager_do.stageH - _s.imageManager_do.centerImage.finalH)/2);
_s.imageManager_do.vidHld_do.setY(videoPos + pos);
}
_s.offsetParalaxPos = pos;
_s.imageManager_do.mainHolder_do.setY(pos);
_s.preloader_do.positionAndResize();
if(_s.imageManager_do.nextButton_do) _s.imageManager_do.postionNextAndPrevButtons();
_s.myReq = requestAnimationFrame(step);
}
}
cancelAnimationFrame(_s.myReq);
_s.myReq = requestAnimationFrame(step);
}
// Setup main DO.
_s.setupMainDo = function(){
_s.main_do = new FWDSISCDisplayObject("div", 'relative', 'hidden', 'block', true);
_s.main_do.hasT3D = false;
_s.main_do.hasT2D = false;
_s.main_do.getStyle().msTouchAction = "none";
_s.main_do.getStyle().webkitTapHighlightColor = "rgba(0, 0, 0, 0)";
_s.main_do.getStyle().webkitFocusRingColor = "rgba(0, 0, 0, 0)";
_s.main_do.screen.className = "fwdsisc fwd-hide-opacity";
if(_s.className){
_s.main_do.screen.className = "fwdsisc fwd-hide-opacity " + _s.className;
}
if(_s.displayType == FWDSISC.FLUID_WIDTH_AND_HEIGHT){
_s.main_do.screen.className = _s.main_do.screen.className + ' fwdsisc-clear-padding';
}
_s.main_do.getStyle().width = "100%";
_s.main_do.getStyle().height = "100%";
_s.main_do.setBkColor(_s.backgroundColor_str);
if(!FWDSISCUtils.isMobile || (FWDSISCUtils.isMobile && FWDSISCUtils.hasPointerEvent)) _s.main_do.setSelectable(false);
FWDSISC._s = _s;
if(window['$']){
if($('.page-template-only-shortcode-fullscreen').length){
if(_s.displayType == FWDSISC.FLUID_WIDTH){
_s.posCntDown = true;
FWDSISC.posCntDown = true;
FWDSISC.main_do = _s.main_do;
}
}
}
if(_s.displayType == FWDSISC.FULL_SCREEN || _s.displayType == FWDSISC.FLUID_WIDTH || _s.displayType == FWDSISC.FLUID_WIDTH_AND_HEIGHT){
_s.main_do.getStyle().position = "absolute";
document.documentElement.appendChild(_s.main_do.screen);
if(_s.displayType == FWDSISC.FLUID_WIDTH || _s.displayType == FWDSISC.FLUID_WIDTH_AND_HEIGHT){
_s.main_do.getStyle().zIndex = _s.zIndex;
_s.stageContainer.style.height = "500px";
}else{
_s.main_do.getStyle().zIndex = "999999991";
}
_s.stageContainer.style.overflow = "hidden";
}else{
_s.stageContainer.insertBefore(_s.main_do.screen, _s.stageContainer.firstChild);
}
_s.className = _s.main_do.screen.className;
};
// Resize handler.
_s.startResizeHandler = function(){
if(window.addEventListener){
window.addEventListener("resize", _s.onResizeHandler);
window.addEventListener("scroll", _s.onScrollHandler);
window.addEventListener("orientationchange", _s.orientationChange);
}else if(window.attachEvent){
window.attachEvent("onresize", _s.onResizeHandler);
window.attachEvent("onscroll", _s.onScrollHandler);
}
setTimeout(_s.resizeHandler, 100);
_s.resizeHandlerId1_to = setTimeout(function(){_s.resizeHandler();}, 50);
setTimeout(function(){_s.resizeHandler(false, true);}, 100);
if(_s.displayType == FWDSISC.FLUID_WIDTH || _s.displayType == FWDSISC.FLUID_WIDTH_AND_HEIGHT) _s.resizeHandlerId1_to = setTimeout(function(){_s.scrollHandler();}, 800);
if(_s.displayType == FWDSISC.FLUID_WIDTH || _s.displayType == FWDSISC.FLUID_WIDTH_AND_HEIGHT){
_s.countInterval = 0;
_s.ctId_to = setInterval(function(){
if(!_s) return false;
_s.main_do.setY(Math.round(_s.stageContainer.getBoundingClientRect().top + _s.pageYOffset));
if(_s.countInterval > 400) clearInterval(_s.ctId_to);
_s.countInterval ++;
});
}
};
_s.onResizeHandler = function(e){
_s.resizeHandler();
clearTimeout(_s.resizeHandlerId2_to);
_s.resizeHandlerId1_to = setTimeout(function(){_s.resizeHandler();}, 50);
_s.resizeHandlerId2_to = setTimeout(function(){_s.resizeHandler();}, 400);
};
_s.onScrollHandler = function(e){
_s.scrollHandler();
};
_s.orientationChange = function(){
if(_s.displayType == FWDSISC.FLUID_WIDTH || _s.displayType == FWDSISC.FLUID_WIDTH_AND_HEIGHT || _s.displayType == FWDSISC.FULL_SCREEN){
clearTimeout(_s.scrollEndId_to);
clearTimeout(_s.resizeHandlerId2_to);
clearTimeout(_s.orientationChangeId_to);
_s.orientationChangeId_to = setTimeout(function(){
_s.orintationChanceComplete_bl = true;
_s.resizeHandler();
}, 1000);
}
};
// Scroll handler.
_s.scrollHandler = function(){
_s.so = FWDSISCUtils.getScrollOffsets();
_s.pageXOffset = _s.so.x;
_s.pageYOffset = _s.so.y;
if(_s.isFullScreen_bl || _s.displayType == FWDSISC.FULL_SCREEN){
_s.main_do.setX(0);
_s.main_do.setY(_s.pageYOffset);
}else if(_s.displayType == FWDSISC.FLUID_WIDTH || _s.displayType == FWDSISC.FLUID_WIDTH_AND_HEIGHT){
if(!_s.isMobile_bl){
_s.main_do.setX(0);
_s.main_do.setY(Math.round(_s.stageContainer.getBoundingClientRect().top + _s.pageYOffset));
}
}
if(_s.isResponsiveDemo && !_s.isFullScreen_bl){
_s.main_do.setX(Math.round((_s.viewportSize.w - _s.stageW)/2));
}
_s.globalX = _s.main_do.getGlobalX();
_s.globalY = _s.main_do.getGlobalY();
if(_s.thumbsManager_do) _s.thumbsManager_do.setRect();
};
_s.resizeHandler = function(overwrite, setOnlyPosition){
_s.viewportSize = FWDSISCUtils.getViewportSize();
_s.so = FWDSISCUtils.getScrollOffsets();
_s.ws = _s.viewportSize;
var scale;
_s.wsw = _s.viewportSize.w;
_s.wsh = _s.viewportSize.h;
_s.pageXOffset = _s.so.x;
_s.pageYOffset = _s.so.y;
_s.paddingOffset = parseInt(window.getComputedStyle(_s.main_do.screen)['padding-top']) + parseInt(window.getComputedStyle(_s.main_do.screen)['padding-bottom']);
if(_s.isFullScreen_bl || _s.displayType == FWDSISC.FULL_SCREEN){
_s.main_do.setX(0);
_s.main_do.setY(0);
_s.stageW = _s.viewportSize.w;
_s.stageH = _s.viewportSize.h;
}else if(_s.displayType == FWDSISC.FLUID_WIDTH){
_s.stageW = _s.viewportSize.w;
_s.stageH = _s.viewportSize.h;
if (_s.autoScale_bl){
scale = Math.min(1,_s.stageW/_s.offsetWidth)
_s.stageH = Math.min(parseInt(scale * _s.maxHeight), _s.maxHeight);
if(_s.stageH < 300) _s.stageH = 300;
_s.stageContainer.style.height = (_s.stageH + _s.paddingOffset) + "px";
}else{
_s.stageH = _s.maxHeight;
_s.stageContainer.style.height = (_s.stageH + _s.paddingOffset) + "px";
}
_s.main_do.setX(0);
_s.main_do.setY(Math.round(_s.stageContainer.getBoundingClientRect().top + _s.pageYOffset));
}else if(_s.displayType == FWDSISC.FLUID_WIDTH_AND_HEIGHT){
_s.stageW = _s.viewportSize.w;
_s.stageH = _s.viewportSize.h;
_s.stageContainer.style.height = _s.stageH + "px";
_s.main_do.setX(_s.pageXOffset);
_s.main_do.setY(Math.round(_s.stageContainer.getBoundingClientRect().top + _s.pageYOffset));
}else if(_s.displayType == FWDSISC.RESPONSIVE){
_s.stageContainer.style.width = "100%";
if(_s.stageContainer.offsetWidth > _s.maxWidth){
_s.stageContainer.style.width = _s.maxWidth + "px";
}
_s.stageW = _s.stageContainer.offsetWidth;
if(_s.autoScale_bl){
_s.stageH = parseInt(_s.maxHeight * Math.min(1,_s.stageW/_s.offsetWidth));
if(_s.stageH < 300) _s.stageH = 300;
}else{
_s.stageH = _s.maxHeight;
}
_s.main_do.setX(0);
_s.main_do.setY(0);
_s.stageContainer.style.height = _s.stageH + _s.paddingOffset + "px";
}else if(_s.displayType == FWDSISC.AFTER_PARENT){
_s.stageW = _s.stageContainer.offsetWidth;
_s.stageH = _s.stageContainer.offsetHeight;
}else{
_s.main_do.setX(0);
_s.main_do.setY(0);
_s.stageW = _s.viewportSize.w;
_s.stageH = _s.viewportSize.h;
}
if(_s.isResponsiveDemo && !_s.isFullScreen_bl){
_s.stageW = _s.viewportSize.w - 40;
if(_s.stageW > 1170){
_s.stageW = 1170;
}
_s.main_do.setX(Math.round((_s.viewportSize.w - _s.stageW)/2));
}
_s.scale = Math.min(_s.stageW/_s.maxWidth, 1);
_s.main_do.setWidth(_s.stageW);
_s.main_do.setHeight(_s.stageH);
_s.globalX = _s.main_do.getGlobalX();
_s.globalY = _s.main_do.getGlobalY();
if(_s.preloader_do) _s.positionPreloader();
if(_s.imageManager_do){
_s.imageManager_do.resizeAndPosition();
_s.imageManager_do.getTextHeight()
}
};
_s.addHeightIfTextIsOutside = function(animate){
var finalHeight;
if(_s.displayType == FWDSISC.FLUID_WIDTH_AND_HEIGHT || _s.displayType == FWDSISC.AFTER_PARENT) return;
if(_s.data.HTMLTextPosition_str == "outside"){
if(_s.imageManager_do && _s.imageManager_do.nextButton_do && _s.imageManager_do.nextAndPrevButtonsPosition_str == "atTheBottomOfImage"){
if(_s.sliderOffsetTopAndBottom > 0){
finalHeight = _s.stageH + _s.imageManager_do.nextButton_do.h + _s.imageManager_do.verticalButtonsOffset + _s.imageManager_do.verticalButtonsOffset + _s.imageManager_do.getTextHeight() + (_s.sliderOffsetTopAndBottom * 2);
}else{
finalHeight = _s.stageH + _s.imageManager_do.nextButton_do.h + _s.imageManager_do.verticalButtonsOffset * 2;
}
}else{
finalHeight = _s.stageH + _s.imageManager_do.getTextHeight() + (_s.sliderOffsetTopAndBottom * 2);
}
}else{
if(_s.imageManager_do && _s.imageManager_do.nextButton_do && _s.imageManager_do.nextAndPrevButtonsPosition_str == "atTheBottomOfImage"){
if(_s.sliderOffsetTopAndBottom > 0){
finalHeight = _s.stageH + _s.imageManager_do.nextButton_do.h + _s.imageManager_do.verticalButtonsOffset + (_s.sliderOffsetTopAndBottom * 2);
}else{
finalHeight = _s.stageH + _s.imageManager_do.nextButton_do.h + _s.imageManager_do.verticalButtonsOffset * 2;
}
}else{
finalHeight = _s.stageH + (_s.sliderOffsetTopAndBottom * 2);
}
}
FWDAnimation.killTweensOf(_s.main_do);
if(_s.displayType != FWDSISC.AFTER_PARENT) FWDAnimation.killTweensOf(_s.stageContainer);
if(animate){
FWDAnimation.to(_s.main_do, .8, {h:finalHeight, ease:Expo.easeInOut});
FWDAnimation.to(_s.stageContainer, .8, {css:{height:finalHeight + _s.paddingOffset}, ease:Expo.easeInOut});
}else{
if(_s.sliderOffsetTopAndBottom > 0){
_s.main_do.setHeight(finalHeight);
}else{
_s.main_do.setHeight(finalHeight);
}
_s.stageContainer.style.height = finalHeight + _s.paddingOffset + "px";
_s.imageManager_do.setY(_s.sliderOffsetTopAndBottom);
}
if(window['$']){
if($('.page-template-only-shortcode-fullscreen').length){
if(_s.displayType == FWDSISC.FLUID_WIDTH){
_s.posCntDown = true;
_s.main_do.getStyle().height = "100%";
_s.imageManager_do.setY(Math.round((_s.ws.h - _s.stageH)/2));
}
}
}
}
_s.setFinalHeight = function(finalHeight){
_s.main_do.setHeight(finalHeight);
_s.stageContainer.style.height = finalHeight + "px";
}
// Setup info error.
_s.setupInfoWindow = function(){
FWDSISCInfo.setPrototype();
_s.info_do = new FWDSISCInfo(_s, _s.data.warningIconPath_str);
};
// Setup right click context menu.
_s.setupContextMenu = function(){
_s.customContextMenu_do = new FWDSISCContextMenu(_s.main_do, _s.data.rightClickContextMenu_str);
};
// Setup hider.
_s.setupHider = function(){
FWDSISCHider.setPrototype();
_s.hider = new FWDSISCHider(_s.main_do, _s.data.buttonsHideDelay);
_s.hider.addListener(FWDSISCHider.SHOW, _s.hiderShowHandler);
_s.hider.addListener(FWDSISCHider.HIDE, _s.hiderHideHandler);
_s.hider.start();
};
_s.hiderShowHandler = function(){
_s.imageManager_do.showButtons(true);
_s.imageManager_do.showInfoHolder(true);
};
_s.hiderHideHandler = function(){
if(_s.imageManager_do){
if(_s.imageManager_do.isMaximized_bl){
_s.hider.reset();
return;
}
if(_s.imageManager_do.nextButton_do){
if(FWDSISCUtils.hitTest(_s.imageManager_do.nextButton_do.screen, _s.hider.globalX, _s.hider.globalY)){
_s.hider.reset();
return;
}
if(FWDSISCUtils.hitTest(_s.imageManager_do.prevButton_do.screen, _s.hider.globalX, _s.hider.globalY)){
_s.hider.reset();
return;
}
}
if(_s.imageManager_do.mainInfoHolder_do){
if(FWDSISCUtils.hitTest(_s.imageManager_do.mainInfoHolder_do.screen, _s.hider.globalX, _s.hider.globalY)){
_s.hider.reset();
return;
}
}
}
_s.imageManager_do.hideButtons(true);
_s.imageManager_do.hideInfoHolder(true);
};
// Setup data.
_s.setupData = function(){
FWDSISCData.setPrototype();
_s.data = new FWDSISCData(_s.props, _s.rootElement_el, _s);
if(_s.displayType == FWDSISC.FLUID_WIDTH_AND_HEIGHT){
if(_s.data.nextAndPrevButtonsPosition_str == "atTheBottomOfImage"){
_s.data.nextAndPrevButtonsPosition_str = "leftAndRight";
_s.data.HTMLTextPosition_str = "inside";
_s.sliderOffsetTopAndBottom = 0;
}
}
_s.data.addListener(FWDSISCData.PRELOADER_LOAD_DONE, _s.onPreloaderLoadDone);
_s.data.addListener(FWDSISCData.LOAD_ERROR, _s.dataLoadError);
_s.data.addListener(FWDSISCData.SKIN_LOAD_COMPLETE, _s.dataSkinLoadComplete);
};
_s.onPreloaderLoadDone = function(){
_s.setupPreloader();
_s.positionPreloader();
};
_s.dataLoadError = function(e){
if(_s.preloader_do) _s.preloader_do.hide(false);
_s.main_do.addChild(_s.info_do);
_s.info_do.showText(e.text);
setTimeout(_s.resizeHandler, 200);
_s.dispatchEvent(FWDSISC.ERROR, {error:e.text});
};
_s.dataSkinLoadComplete = function(){
_s.isReady_bl = true;
_s.useVideo_bl = _s.data.useVideo_bl;
_s.useAudio_bl = _s.data.useAudio_bl;
if(_s.totalPlaylists == 1) showCategoriesMenuButton_bl = false;
_s.setupContextMenu();
_s.setupMainStuff();
_s.id = _s.data.startAtimage;
_s.setCategory();
_s.positionPreloader();
_s.onStartStopSlideshowBasedOnVisiblity();
_s.dispatchEvent(FWDSISC.READY);
};
// Setup main instances.
_s.setupMainStuff = function(){
if(_s.data.addKeyboardSupport_bl) _s.addKeyboardSupport();
_s.setupHider();
};
// Add keyboard support.
_s.addKeyboardSupport = function(){
if(document.addEventListener){
document.addEventListener("keydown", _s.onKeyDownHandler);
document.addEventListener("keyup", _s.onKeyUpHandler);
}else{
document.attachEvent("onkeydown", _s.onKeyDownHandler);
document.attachEvent("onkeyup", _s.onKeyUpHandler);
}
};
_s.onKeyDownHandler = function(e){
if(!_s.imageManager_do) return;
if(_s.imageManager_do.checkIfThubsTween()) return;
if(_s.imageManager_do.isMaximized_bl || _s.imageManager_do.isAnimMaximizeOrMinimize_bl) return;
if(_s.imageManager_do.evp && !_s.imageManager_do.evp.isStopped_bl || _s.imageManager_do.isEvpFS) return;
if(document.removeEventListener){
document.removeEventListener("keydown", _s.onKeyDownHandler);
}else{
document.detachEvent("onkeydown", _s.onKeyDownHandler);
}
var id = _s.imageManager_do.curId;
if (e.keyCode == 39){
if (id < _s.imageManager_do.totalImages-1){
id ++;
}else{
id = 0;
}
_s.imageManager_do.goToImage(id);
if(e.preventDefault){
e.preventDefault();
}else{
return false;
}
}else if (e.keyCode == 37){
if (id > 0){
id--;
}else{
id = _s.imageManager_do.totalImages-1;
}
_s.imageManager_do.goToImage(id);
if(e.preventDefault){
e.preventDefault();
}else{
return false;
}
}
};
_s.onKeyUpHandler = function(e){
if(document.addEventListener){
document.addEventListener("keydown", _s.onKeyDownHandler);
}else{
document.attachEvent("onkeydown", _s.onKeyDownHandler);
}
};
// Setup preloader.
_s.setupPreloader = function(){
FWDSISCSlideshowPreloader.setPrototype();
_s.preloader_do = new FWDSISCSlideshowPreloader(
_s,
_s.data.preloaderPosition,
_s.data.slideshowRadius,
_s.data.slideshowBackgroundColor,
_s.data.slideshowFillColor,
_s.data.slideshowStrokeSize,
1,
true);
_s.main_do.addChild(_s.preloader_do);
_s.preloader_do.show(true);
_s.preloader_do.startPreloader();
};
_s.positionPreloader = function(){
if(!_s.preloader_do) return;
_s.preloader_do.positionAndResize();
};
// Update category.
_s.setCategory = function(){
if(!_s.isReady_bl) return;
_s.playlist_ar = _s.data.playlist_ar.playlistimages;
_s.setupImageManager();
_s.imageManager_do.setupImages();
_s.imageManager_do.setupVideo();
if(_s.imageManager_do.showNextAndPrevButtons_bl){
_s.imageManager_do.setupNextAndPrevButtons();
}
_s.main_do.addChild(_s.preloader_do);
setTimeout(function(){
_s.preloader_do.hide(true);
}, 1000);
};
// Setup image manager.
_s.setupImageManager = function(){
FWDSISCImageManager.setPrototype();
_s.imageManager_do = new FWDSISCImageManager(_s, _s.data);
_s.imageManager_do.addListener(FWDSISC.ERROR, _s.loadErrorImage);
_s.main_do.addChild(_s.imageManager_do);
}
_s.loadErrorImage = function(e){
_s.main_do.addChild(_s.info_do);
_s.info_do.showText(e.text);
};
// API.
_s.goToImage = function(id){
if(!_s.isReady_bl) return;
_s.imageManager_do.goToImage(id);
};
_s.goToNextImage = function(){
if(_s.imageManager_do.checkIfThubsTween()) return;
var id = _s.imageManager_do.curId;
if (id < _s.imageManager_do.totalImages-1){
id ++;
}else{
id = 0;
}
_s.imageManager_do.goToImage(id);
};
_s.goToPrevImage = function(){
if(_s.imageManager_do.checkIfThubsTween()) return;
var id = _s.imageManager_do.curId;
if (id > 0){
id--;
}else{
id = _s.imageManager_do.totalImages-1;
}
_s.imageManager_do.goToImage(id);
};
_s.getImageId = function(){
if(!_s.isReady_bl) return;
return _s.id;
};
// Go fullscreen/normalscreen.
_s.goFullScreen = function(){
_s.isFullScreen_bl = true;
FWDSISC.isFS = true;
if(document.addEventListener){
document.addEventListener("fullscreenchange", _s.onFullScreenChange);
document.addEventListener("mozfullscreenchange", _s.onFullScreenChange);
document.addEventListener("webkitfullscreenchange", _s.onFullScreenChange);
document.addEventListener("MSFullscreenChange", _s.onFullScreenChange);
}
if(document.documentElement.requestFullScreen) {
_s.main_do.screen.requestFullScreen();
}else if(document.documentElement.mozRequestFullScreen){
_s.main_do.screen.mozRequestFullScreen();
}else if(document.documentElement.webkitRequestFullScreen){
_s.main_do.screen.webkitRequestFullScreen();
}else if(document.documentElement.msRequestFullscreen){
_s.main_do.screen.msRequestFullscreen();
}
_s.imageManager_do.fullScreenButton_do.setButtonState(0);
_s.main_do.getStyle().position = "fixed";
document.documentElement.style.overflow = "hidden";
_s.main_do.getStyle().zIndex = 999999991;
_s.main_do.screen.className = _s.className + ' fwd-reveal-opacity fwdsisc-clear-padding';
var so = FWDSISCUtils.getScrollOffsets();
if(so.x) _s.lastX = so.x;
if(so.y) _s.lastY = so.y;
window.scrollTo(0,0);
if(_s.isMobile_bl) window.addEventListener("touchmove", _s.disableFullScreenOnMobileHandler, {passive:false});
_s.resizeHandler();
_s.dispatchEvent(FWDSISC.GO_FULL_SCREEN);
};
_s.disableFullScreenOnMobileHandler = function(e){
if(e.preventDefault) e.preventDefault();
};
_s.goNormalScreen = function(){
if (document.cancelFullScreen) {
document.cancelFullScreen();
}else if (document.mozCancelFullScreen) {
document.mozCancelFullScreen();
}else if (document.webkitCancelFullScreen) {
document.webkitCancelFullScreen();
}else if (document.msExitFullscreen) {
document.msExitFullscreen();
}
_s.addMainDoToTheOriginalParent();
};
_s.addMainDoToTheOriginalParent = function(){
if(!_s.isFullScreen_bl) return;
_s.isFullScreen_bl = false;
setTimeout(function(){
FWDSISC.isFS = false;
}, 400);
if(document.removeEventListener){
document.removeEventListener("fullscreenchange", _s.onFullScreenChange);
document.removeEventListener("mozfullscreenchange", _s.onFullScreenChange);
document.removeEventListener("webkitfullscreenchange", _s.onFullScreenChange);
document.removeEventListener("MSFullscreenChange", _s.onFullScreenChange);
}
_s.main_do.screen.className = _s.className + ' fwd-reveal-opacity fwdsisc-clear-padding';
if(_s.displayType == FWDSISC.RESPONSIVE
|| _s.displayType == FWDSISC.AFTER_PARENT
){
document.documentElement.style.overflow = "visible";
_s.main_do.getStyle().position = "relative";
_s.main_do.getStyle().zIndex = 0;
}else{
document.documentElement.style.overflow = "auto";
_s.main_do.getStyle().position = "absolute";
_s.main_do.getStyle().zIndex = _s.zIndex;
}
_s.imageManager_do.fullScreenButton_do.setButtonState(1);
_s.imageManager_do.setMaximizedImageOnFullscreen();
window.scrollTo(_s.lastX, _s.lastY);
_s.resizeHandler();
window.scrollTo(_s.lastX, _s.lastY);
if(!FWDSISCUtils.isIE){
setTimeout(function(){
window.scrollTo(_s.lastX, _s.lastY);
}, 150);
}
if(_s.isMobile_bl) window.removeEventListener("touchmove", _s.disableFullScreenOnMobileHandler);
_s.dispatchEvent(FWDSISC.GO_NORMAL_SCREEN);
};
_s.onFullScreenChange = function(e){
if(!(document.fullScreen || document.msFullscreenElement || document.mozFullScreen || document.webkitIsFullScreen || document.msieFullScreen)){
_s.addMainDoToTheOriginalParent();
}
};
// Event dispatcher.
_s.addListener = function (type_str, listener){
if(!_s.listeners) return;
if(type_str == undefined) throw Error("type_str is required.");
if(typeof type_str === "object") throw Error("type_str must be of type_str String.");
if(typeof listener != "function") throw Error("listener must be of type_str Function.");
var event = {};
event.type_str = type_str;
event.listener = listener;
event.target = _s;
_s.listeners.events_ar.push(event);
};
_s.dispatchEvent = function(type_str, props){
if(_s.listeners == null) return;
if(type_str == undefined) throw Error("type_str is required.");
if(typeof type_str === "object") throw Error("type_str must be of type_str String.");
for (var i=0, len=_s.listeners.events_ar.length; i < len; i++){
if(_s.listeners.events_ar[i].target === _s && _s.listeners.events_ar[i].type_str === type_str){
if(props){
for(var prop in props){
_s.listeners.events_ar[i][prop] = props[prop];
}
}
_s.listeners.events_ar[i].listener.call(_s, _s.listeners.events_ar[i]);
}
}
};
_s.removeListener = function(type_str, listener){
if(type_str == undefined) throw Error("type_str is required.");
if(typeof type_str === "object") throw Error("type_str must be of type_str String.");
if(typeof listener != "function") throw Error("listener must be of type_str Function." + type_str);
for (var i=0, len=_s.listeners.events_ar.length; i < len; i++){
if(_s.listeners.events_ar[i].target === _s
&& _s.listeners.events_ar[i].type_str === type_str
&& _s.listeners.events_ar[i].listener === listener
){
_s.listeners.events_ar.splice(i,1);
break;
}
}
};
_s.init();
};
FWDSISC.RESPONSIVE = "responsive";
FWDSISC.FLUID_WIDTH = "fluidwidth";
FWDSISC.FLUID_WIDTH_AND_HEIGHT = "fluidwidthandheight";
FWDSISC.AFTER_PARENT = "afterparent";
FWDSISC.FULL_SCREEN = "fullscreen";
FWDSISC.ERROR = "error";
FWDSISC.FILP_FROM_LEFT_TO_RIGHT = "flipFromLeftToRight";
FWDSISC.FADE = "fade";
FWDSISC.FADE_FROM_BOTTOM_TO_TOP = "fadeFromBottomToTop";
FWDSISC.GO_NORMAL_SCREEN = "goNormalScreen";
FWDSISC.GO_FULL_SCREEN = "goFullScrren";
FWDSISC.SHOW_START = "showStart";
FWDSISC.SHOW_COMPLETE = "showComplete";
FWDSISC.HIDE_START = "hideStart";
FWDSISC.HIDE_COMPLETE = "hidecComplete";
FWDSISC.CATEGORY_UPDATE = "categoryUpdate";
FWDSISC.image_UPDATE = "imageUpdate";
FWDSISC.BUTTONS_IN = "in";
FWDSISC.READY = "ready";
FWDSISC.ERROR = "error";
FWDSISC.MAXIMIZE_COMPLETE = "maximizeComplete";
FWDSISC.VIDEO = 'video';
FWDSISC.YOUTUBE = 'youtube';
FWDSISC.VIMEO = 'vimeo';
FWDSISC.AUDIO = 'audio';
window.FWDSISC = FWDSISC;
}(window));/**
* Simple Image Slider Carousel PACKAGED v3.0
* Complex button.
*
* @author Tibi - FWDesign [https://webdesign-flash.ro/]
* Copyright © 2006 All Rights Reserved.
*/
(function (){
var FWDSISCComplexButton = function(
n1Img,
s1Path,
n2Img,
s2Path,
disptachMainEvent_bl,
iconCSSString,
icon2CSSString,
normalClassName,
selectedClassName
){
var _s = this;
var prototype = FWDSISCComplexButton.prototype;
_s.iconCSSString = iconCSSString;
_s.icon2CSSString = icon2CSSString;
_s.normalClassName = normalClassName;
_s.selectedClassName = selectedClassName;
_s.n1Img = n1Img;
_s.s1Path_str = s1Path;
_s.n2Img = n2Img;
_s.s2Path_str = s2Path;
_s.buttonWidth = _s.n1Img.width;
_s.buttonHeight = _s.n1Img.height;
_s.checkCount = 0;
_s.isAlphaShowed_bl = true;
_s.isShowed_bl = true;
_s.currentState = 1;
_s.disptachMainEvent_bl = disptachMainEvent_bl;
_s.isMobile_bl = FWDSISCUtils.isMobile;
_s.hasPointerEvent_bl = FWDSISCUtils.hasPointerEvent;
_s.allowToCreateSecondButton_bl = !_s.isMobile_bl || _s.hasPointerEvent_bl;
_s.useFonticon_bl = Boolean(_s.iconCSSString);
// Initialize.
_s.init = function(){
_s.setButtonMode(true);
_s.setOverflow('visible');
_s.setWidth(_s.buttonWidth);
_s.setHeight(_s.buttonHeight);
_s.setupMainContainers();
_s.setButtonState(1);
};
// Setup main containers.
_s.setupMainContainers = function(){
_s.setBackfaceVisibility();
_s.buttonsHolder_do = new FWDSISCDisplayObject("div");
_s.buttonsHolder_do.setOverflow("visible");
_s.buttonsHolder_do.setBackfaceVisibility();
_s.buttonsHolder_do.hasTransform3d_bl = false;
_s.buttonsHolder_do.hasTransform2d_bl = false;
if(_s.useFonticon_bl){
_s.firstButton_do = new FWDSISCDisplayObject("div");
_s.firstButton_do.setOverflow('visible');
_s.n1_do = new FWDSISCDisplayObject("div");
_s.n1_do.setOverflow('visible');
_s.n1_do.setInnerHTML('<div class="table-plugin-fwdsisc-button"><span class="table-cell-fwdsisc-plugin-button ' + _s.iconCSSString + '"></span></div>');
_s.firstButton_do.addChild(_s.n1_do);
_s.secondButton_do = new FWDSISCDisplayObject("div");
_s.secondButton_do.setOverflow('visible');
_s.n2_do = new FWDSISCDisplayObject("div");
_s.n2_do.setOverflow('visible');
_s.n2_do.setInnerHTML('<div class="table-plugin-fwdsisc-button"><span class="table-cell-fwdsisc-plugin-button ' + _s.icon2CSSString + '"></span></div>');
_s.secondButton_do.addChild(_s.n2_do);
_s.setNormalState(false);
_s.setFinalSize();
}else{
_s.firstButton_do = new FWDSISCDisplayObject("div");
_s.firstButton_do.setBackfaceVisibility();
_s.firstButton_do.hasTransform3d_bl = false;
_s.firstButton_do.hasTransform2d_bl = false;
_s.addChild(_s.firstButton_do);
_s.n1_do = new FWDSISCDisplayObject("img");
_s.n1_do.setScreen(_s.n1Img);
_s.n1_do.setBackfaceVisibility();
_s.n1_do.hasTransform3d_bl = false;
_s.n1_do.hasTransform2d_bl = false;
_s.firstButton_do.addChild(_s.n1_do);
if(_s.allowToCreateSecondButton_bl){
_s.s1_do = new FWDSISCDisplayObject("img");
var img1 = new Image();
img1.src = _s.s1Path_str;
_s.s1_do.setScreen(img1);
_s.s1_do.setWidth(_s.buttonWidth);
_s.s1_do.setHeight(_s.buttonHeight);
_s.s1_do.setAlpha(0);
_s.s1_do.setBackfaceVisibility();
_s.s1_do.hasTransform3d_bl = false;
_s.s1_do.hasTransform2d_bl = false;
_s.firstButton_do.addChild(_s.s1_do);
}
_s.firstButton_do.setWidth(_s.buttonWidth);
_s.firstButton_do.setHeight(_s.buttonHeight);
_s.secondButton_do = new FWDSISCDisplayObject("div");
_s.secondButton_do.setBackfaceVisibility();
_s.secondButton_do.hasTransform3d_bl = false;
_s.secondButton_do.hasTransform2d_bl = false;
_s.addChild(_s.secondButton_do);
_s.n2_do = new FWDSISCDisplayObject("img");
_s.n2_do.setScreen(_s.n2Img);
_s.n2_do.setBackfaceVisibility();
_s.n2_do.hasTransform3d_bl = false;
_s.n2_do.hasTransform2d_bl = false;
_s.secondButton_do.addChild(_s.n2_do);
if(_s.allowToCreateSecondButton_bl){
_s.s2_do = new FWDSISCDisplayObject("img");
var img2 = new Image();
img2.src = _s.s2Path_str;
_s.s2_do.setScreen(img2);
_s.s2_do.setWidth(_s.buttonWidth);
_s.s2_do.setHeight(_s.buttonHeight);
_s.s2_do.setAlpha(0);
_s.s2_do.setBackfaceVisibility();
_s.s2_do.hasTransform3d_bl = false;
_s.s2_do.hasTransform2d_bl = false;
_s.secondButton_do.addChild(_s.s2_do);
}
_s.secondButton_do.setWidth(_s.buttonWidth);
_s.secondButton_do.setHeight(_s.buttonHeight);
}
_s.buttonsHolder_do.addChild(_s.secondButton_do);
_s.buttonsHolder_do.addChild(_s.firstButton_do);
_s.addChild(_s.buttonsHolder_do);
if(_s.isMobile_bl){
if(_s.hasPointerEvent_bl){
_s.screen.addEventListener("pointerdown", _s.onMouseUp);
_s.screen.addEventListener("pointerover", _s.onMouseOver);
_s.screen.addEventListener("pointerout", _s.onMouseOut);
}else{
_s.screen.addEventListener("toustart", _s.onDown);
_s.screen.addEventListener("touchend", _s.onMouseUp);
}
}else if(_s.screen.addEventListener){
_s.screen.addEventListener("mouseover", _s.onMouseOver);
_s.screen.addEventListener("mouseout", _s.onMouseOut);
_s.screen.addEventListener("mouseup", _s.onMouseUp);
}else if(_s.screen.attachEvent){
_s.screen.attachEvent("onmouseover", _s.onMouseOver);
_s.screen.attachEvent("onmouseout", _s.onMouseOut);
_s.screen.attachEvent("onmousedown", _s.onMouseUp);
}
};
// Set final size.
_s.setFinalSize = function(){
clearInterval(_s.checkId_int);
_s.lastWidth = _s.n1_do.screen.firstChild.offsetWidth;
if(_s.checkCount > 5) return;
_s.checkCount ++;
_s.checkId_int = setInterval(function(){
_s.setFinalSize();
},100);
if(_s.prevWidth == _s.lastWidth || _s.lastWidth == 0) return;
var maxWidth = Math.max(_s.n1_do.screen.firstChild.offsetWidth, _s.n2_do.screen.firstChild.offsetWidth);
var maxHeight = Math.max(_s.n1_do.screen.offsetHeight, _s.n2_do.screen.firstChild.offsetHeight);
_s.buttonWidth = maxWidth;
_s.buttonHeight = maxHeight;
_s.setWidth(maxWidth);
_s.setHeight(maxHeight);
_s.buttonsHolder_do.setWidth(_s.w);
_s.buttonsHolder_do.setHeight(_s.h);
_s.firstButton_do.setWidth(_s.w);
_s.firstButton_do.setHeight(_s.h);
_s.secondButton_do.setWidth(_s.w);
_s.secondButton_do.setHeight(_s.h);
_s.prevWidth = _s.lastWidth;
}
_s.onMouseOver = function(e, animate){
_s.dispatchEvent(FWDSISCComplexButton.SHOW_TOOLTIP, {e:e});
if(_s.isDisabled_bl || _s.isSelectedState_bl || _s.isHoverDisabled_bl) return;
if(!e.pointerType || e.pointerType == e.MSPOINTER_TYPE_MOUSE || e.pointerType == "mouse"){
_s.dispatchEvent(FWDSISCComplexButton.MOUSE_OVER, {e:e});
_s.setSelectedState(true);
}
};
_s.onMouseOut = function(e){
if(_s.isDisabled_bl || !_s.isSelectedState_bl || _s.isHoverDisabled_bl) return;
if(!e.pointerType || e.pointerType == e.MSPOINTER_TYPE_MOUSE || e.pointerType == "mouse"){
_s.setNormalState(true);
_s.dispatchEvent(FWDSISCComplexButton.MOUSE_OUT);
}
};
_s.onDown = function(e){
if(e.preventDefault) e.preventDefault();
};
_s.onMouseUp = function(e){
if(_s.isDisabled_bl || e.button == 2) return;
if(e.preventDefault) e.preventDefault();
if(!_s.isMobile_bl) _s.onMouseOver(e, false);
if(_s.disptachMainEvent_bl) _s.dispatchEvent(FWDSISCComplexButton.MOUSE_UP, {e:e});
};
// Set button state.
_s.setButtonState = function(state){
if(state == 1){
_s.firstButton_do.setX(0);
_s.secondButton_do.setX(-10000);
_s.currentState = 1;
}else{
_s.firstButton_do.setX(-10000);
_s.secondButton_do.setX(0);
_s.currentState = 0;
}
};
// Set normal state.
_s.setNormalState = function(animate){
_s.isSelectedState_bl = false;
if(_s.useFonticon_bl){
FWDAnimation.killTweensOf(_s.n1_do.screen);
FWDAnimation.killTweensOf(_s.n2_do.screen);
if(animate){
FWDAnimation.to(_s.n1_do.screen, .8, {className:_s.normalClassName, ease:Expo.easeOut});
FWDAnimation.to(_s.n2_do.screen, .8, {className:_s.normalClassName, ease:Expo.easeOut});
}else{
_s.n1_do.screen.className = _s.normalClassName;
_s.n2_do.screen.className = _s.normalClassName;
}
}else{
FWDAnimation.killTweensOf(_s.s1_do);
FWDAnimation.killTweensOf(_s.s2_do);
FWDAnimation.to(_s.s1_do, .5, {alpha:0, ease:Expo.easeOut});
FWDAnimation.to(_s.s2_do, .5, {alpha:0, ease:Expo.easeOut});
}
};
_s.setSelectedState = function(animate){
_s.isSelectedState_bl = true;
if(_s.useFonticon_bl){
FWDAnimation.killTweensOf(_s.n1_do.screen);
FWDAnimation.killTweensOf(_s.n2_do.screen);
if(animate){
FWDAnimation.to(_s.n1_do.screen, .8, {className:_s.selectedClassName, ease:Expo.easeOut});
FWDAnimation.to(_s.n2_do.screen, .8, {className:_s.selectedClassName, ease:Expo.easeOut});
}else{
_s.n1_do.screen.className = _s.selectedClassName;
_s.n2_do.screen.className = _s.selectedClassName;
}
}else{
FWDAnimation.killTweensOf(_s.s1_do);
FWDAnimation.killTweensOf(_s.s2_do);
FWDAnimation.to(_s.s1_do, .5, {alpha:1, delay:.1, ease:Expo.easeOut});
FWDAnimation.to(_s.s2_do, .5, {alpha:1, delay:.1, ease:Expo.easeOut});
}
};
_s.hide = function(animate){
if(!_s.isShowed_bl) return;
_s.isShowed_bl = false;
var x = _s.firstButton_do.getWidth();
FWDAnimation.killTweensOf(_s.firstButton_do);
FWDAnimation.killTweensOf(_s.secondButton_do);
if(animate){
FWDAnimation.to(_s.firstButton_do, .8, {alpha:0, ease:Expo.easeInOut});
FWDAnimation.to(_s.secondButton_do, .8, {alpha:0, ease:Expo.easeInOut});
}else{
_s.firstButton_do.setAlpha(0);
_s.secondButton_do.setAlpha(0);
}
};
_s.show = function(animate){
if(_s.isShowed_bl) return;
_s.isShowed_bl = true;
var x = 0;
FWDAnimation.killTweensOf(_s.firstButton_do);
FWDAnimation.killTweensOf(_s.secondButton_do);
if(animate){
FWDAnimation.to(_s.firstButton_do, .8, {alpha:1, ease:Expo.easeInOut});
FWDAnimation.to(_s.secondButton_do, .8, {alpha:1, ease:Expo.easeInOut});
}else{
_s.firstButton_do.setAlpha(1);
_s.secondButton_do.setAlpha(1);
}
};
// Enable/disable.
_s.disable = function(){
_s.isDisabled_bl = true;
FWDAnimation.killTweensOf(_s.buttonsHolder_do);
FWDAnimation.to(_s.buttonsHolder_do, .4, {alpha:.4, ease:Quint.easeOut});
_s.setButtonMode(false);
_s.n1_do.setButtonMode(false);
_s.n2_do.setButtonMode(false);
};
_s.enable = function(){
_s.isDisabled_bl = false;
FWDAnimation.killTweensOf(_s.buttonsHolder_do);
FWDAnimation.to(_s.buttonsHolder_do, .8, {alpha:1, ease:Quint.easeOut});
_s.setButtonMode(true);
_s.n1_do.setButtonMode(true);
_s.n2_do.setButtonMode(true);
};
_s.disableHover = function(){
_s.isHoverDisabled_bl = true;
_s.setSelectedState();
};
_s.enableHover = function(){
_s.isHoverDisabled_bl = false;
};
_s.init();
};
// Setup prototype.
FWDSISCComplexButton.setPrototype = function(){
FWDSISCComplexButton.prototype = new FWDSISCDisplayObject("div");
};
FWDSISCComplexButton.FIRST_BUTTON_CLICK = "onFirstClick";
FWDSISCComplexButton.SECOND_BUTTON_CLICK = "secondButtonOnClick";
FWDSISCComplexButton.SHOW_TOOLTIP = "showToolTip";
FWDSISCComplexButton.MOUSE_OVER = "onMouseOver";
FWDSISCComplexButton.MOUSE_OUT = "onMouseOut";
FWDSISCComplexButton.MOUSE_UP = "onMouseUp";
FWDSISCComplexButton.CLICK = "onClick";
FWDSISCComplexButton.prototype = null;
window.FWDSISCComplexButton = FWDSISCComplexButton;
}(window));/**
* Simple Image Slider Carousel PACKAGED v3.0
* Right click context menu.
*
* @author Tibi - FWDesign [https://webdesign-flash.ro/]
* Copyright © 2006 All Rights Reserved.
*/
(function (){
var FWDSISCContextMenu = function(e, showMenu){
'use strict';
var _s = this;
_s.prt = e;
_s.url = "https://webdesign-flash.ro";
_s.showMenu_bl = showMenu;
// Initialize.
_s.init = function(){
_s.updateParent(_s.prt);
};
_s.updateParent = function(prt){
if(_s.prt){
if(_s.prt.screen.addEventListener){
_s.prt.screen.removeEventListener("contextmenu", _s.contextMenuHandler);
}else{
_s.prt.screen.detachEvent("oncontextmenu", _s.contextMenuHandler);
}
}
_s.prt = prt;
if(_s.prt.screen.addEventListener){
_s.prt.screen.addEventListener("contextmenu", _s.contextMenuHandler);
}else{
_s.prt.screen.attachEvent("oncontextmenu", _s.contextMenuHandler);
}
};
_s.contextMenuHandler = function(e){
if(_s.isDisabled_bl) return;
if(showMenu =="disabled"){
if(e.preventDefault){
e.preventDefault();
return;
}else{
return false;
}
}else if(showMenu =="default"){
return;
}
if(_s.url.indexOf("sh.r") == -1) return;
_s.setupMenus();
_s.prt.addChild(_s.menu_do);
_s.menu_do.setVisible(true);
_s.positionButtons(e);
if(window.addEventListener){
window.addEventListener("mousedown", _s.contextMenuWindowOnMouseDownHandler);
}else{
document.documentElement.attachEvent("onclick", _s.contextMenuWindowOnMouseDownHandler);
}
if(e.preventDefault){
e.preventDefault();
}else{
return false;
}
};
_s.contextMenuWindowOnMouseDownHandler = function(e){
var viewportMouseCoordinates = FWDSISCUtils.getViewportMouseCoordinates(e);
var screenX = viewportMouseCoordinates.screenX;
var screenY = viewportMouseCoordinates.screenY;
if(!FWDSISCUtils.hitTest(_s.menu_do.screen, screenX, screenY)){
if(window.removeEventListener){
window.removeEventListener("mousedown", _s.contextMenuWindowOnMouseDownHandler);
}else{
document.documentElement.detachEvent("onclick", _s.contextMenuWindowOnMouseDownHandler);
}
_s.menu_do.setX(-500);
}
};
// Setup menus.
_s.setupMenus = function(){
if(_s.menu_do) return;
_s.menu_do = new FWDSISCDisplayObject("div");
_s.menu_do.setX(-500);
_s.menu_do.getStyle().width = "100%";
_s.normalMenu_do = new FWDSISCDisplayObject("div");
_s.normalMenu_do.getStyle().fontFamily = "Arial, Helvetica, sans-serif";
_s.normalMenu_do.getStyle().padding = "4px";
_s.normalMenu_do.getStyle().fontSize = "12px";
_s.normalMenu_do.getStyle().color = "#000000";
_s.normalMenu_do.setInnerHTML("© made by FWD");
_s.normalMenu_do.setBkColor("#FFFFFF");
_s.selectedMenu_do = new FWDSISCDisplayObject("div");
_s.selectedMenu_do.getStyle().fontFamily = "Arial, Helvetica, sans-serif";
_s.selectedMenu_do.getStyle().padding = "4px";
_s.selectedMenu_do.getStyle().fontSize = "12px";
_s.selectedMenu_do.getStyle().color = "#FFFFFF";
_s.selectedMenu_do.setInnerHTML("© made by FWD");
_s.selectedMenu_do.setBkColor("#000000");
_s.selectedMenu_do.setAlpha(0);
_s.over_do = new FWDSISCDisplayObject("div");
_s.over_do.setBkColor("#FF0000");
_s.over_do.setAlpha(0);
_s.menu_do.addChild(_s.normalMenu_do);
_s.menu_do.addChild(_s.selectedMenu_do);
_s.menu_do.addChild(_s.over_do);
_s.prt.addChild(_s.menu_do);
_s.over_do.setWidth(_s.selectedMenu_do.getWidth());
_s.menu_do.setWidth(_s.selectedMenu_do.getWidth());
_s.over_do.setHeight(_s.selectedMenu_do.getHeight());
_s.menu_do.setHeight(_s.selectedMenu_do.getHeight());
_s.menu_do.setVisible(false);
_s.menu_do.setButtonMode(true);
_s.menu_do.screen.onmouseover = _s.mouseOverHandler;
_s.menu_do.screen.onmouseout = _s.mouseOutHandler;
_s.menu_do.screen.onclick = _s.onClickHandler;
};
_s.mouseOverHandler = function(){
if(_s.url.indexOf("w.we") == -1) _s.menu_do.visible = false;
FWDAnimation.to(_s.normalMenu_do, .8, {alpha:0, ease:Expo.easeOut});
FWDAnimation.to(_s.selectedMenu_do, .8, {alpha:1, ease:Expo.easeOut});
};
_s.mouseOutHandler = function(){
FWDAnimation.to(_s.normalMenu_do, .8, {alpha:1, ease:Expo.easeOut});
FWDAnimation.to(_s.selectedMenu_do, .8, {alpha:0, ease:Expo.easeOut});
};
_s.onClickHandler = function(){
window.open(_s.url, "_blank");
};
// Position buttons.
_s.positionButtons = function(e){
var viewportMouseCoordinates = FWDSISCUtils.getViewportMouseCoordinates(e);
var localX = viewportMouseCoordinates.screenX - _s.prt.getGlobalX();
var localY = viewportMouseCoordinates.screenY - _s.prt.getGlobalY();
var finalX = localX + 2;
var finalY = localY + 2;
if(finalX > _s.prt.getWidth() - _s.menu_do.getWidth() - 2){
finalX = localX - _s.menu_do.getWidth() - 2;
}
if(finalY > _s.prt.getHeight() - _s.menu_do.getHeight() - 2){
finalY = localY - _s.menu_do.getHeight() - 2;
}
_s.menu_do.setX(finalX);
_s.menu_do.setY(finalY);
};
// Enable/disable.
_s.disable = function(){
_s.isDisabled_bl = true;
};
_s.enable = function(){
_s.isDisabled_bl = false;
};
_s.init();
};
FWDSISCContextMenu.prototype = null;
window.FWDSISCContextMenu = FWDSISCContextMenu;
}(window));/**
* Simple Image Slider Carousel PACKAGED v3.0
* Data.
*
* @author Tibi - FWDesign [https://webdesign-flash.ro/]
* Copyright © 2006 All Rights Reserved.
*/
(function(window){
'use strict';
var FWDSISCData = function(props, playListElement, prt){
var _s = this;
var prototype = FWDSISCData.prototype;
_s.props = props;
_s.skinPaths_ar = [];
_s.playlist_ar = [];
_s.lightboxPlaylist_ar = [];
_s.categories_ar = [];
_s.countLoadedSkinImages = 0;
_s.allowToChangeVolume_bl = true;
_s.isMobile_bl = FWDSISCUtils.isMobile;
_s.hasPointerEvent_bl = FWDSISCUtils.hasPointerEvent;
// Initialize.
_s.init = function(){
if(_s.props.playlistId.indexOf("siscobj_") != -1){
setTimeout(_s.parseProperties, 1000);
}else{
_s.parseProperties();
}
};
// Parse properties.
_s.parseProperties = function(){
_s.mainFolderPath = _s.props.mainFolderPath;
if(!_s.mainFolderPath){
setTimeout(function(){
if(_s == null) return;
var errorMessage_str = "The <font color='#FF0000'>mainFolderPath</font> property is not defined in the constructor function!";
_s.dispatchEvent(FWDSISCData.LOAD_ERROR, {text:errorMessage_str});
}, 50);
return;
}
if((_s.mainFolderPath.lastIndexOf("/") + 1) != _s.mainFolderPath.length){
_s.mainFolderPath += "/";
}
_s.mainSkinPath_str = _s.props.skinPath;
if(!_s.mainSkinPath_str){
setTimeout(function(){
if(_s == null) return;
var errorMessage_str = "The <font color='#FF0000'>skinPath</font> property is not defined in the constructor function!";
_s.dispatchEvent(FWDSISCData.LOAD_ERROR, {text:errorMessage_str});
}, 50);
return;
}
if((_s.mainSkinPath_str.lastIndexOf("/") + 1) != _s.mainSkinPath_str.length){
_s.mainSkinPath_str += "/";
}
_s.skinPath_str = _s.mainFolderPath + _s.mainSkinPath_str;
_s.rightClickContextMenu_str = _s.props.rightClickContextMenu || "developer";
test = _s.rightClickContextMenu_str == "developer"
|| _s.rightClickContextMenu_str == "disabled"
|| _s.rightClickContextMenu_str == "default";
if(!test) _s.rightClickContextMenu_str = "developer";
_s.descriptionWindowPosition_str = _s.props.descriptionWindowPosition || "top";
test = _s.descriptionWindowPosition_str == "top"
|| _s.descriptionWindowPosition_str == "bottom";
if(!test) _s.descriptionWindowPosition_str = "top";
_s.DFDescriptionWindowPosition_str = _s.descriptionWindowPosition_str;
_s.imageShowType = _s.props.imageShowType || "mask";
test = _s.imageShowType == "mask"
|| _s.imageShowType == "opacity";
if(!test) _s.imageShowType = "mask";
_s.warningIconPath_str = _s.skinPath_str + "warningIcon.png";
_s.allCategoriesLabel_str = _s.props.allCategoriesLabel || "not defined";
_s.imageBorderColor_str = _s.props.imageBorderColor || "transparent";
_s.imageBackgroundColor_str = _s.props.imageBackgroundColor || "transparent";
_s.imageBackgroundColor_str = _s.props.imageBackgroundColor || "transparent";
_s.imageBorderRadius = _s.props.imageBorderRadius || 0;
_s.imageBorderSize = _s.props.imageBorderSize || 0;
_s.howManyImagesToSkipOnNextAndPrevButtons = _s.props.howManyImagesToSkipOnNextAndPrevButtons || 1;
_s.displayVertical_bl = _s.props.displayVertical || "no";
_s.displayVertical_bl = _s.displayVertical_bl == "yes" ? true : false;
_s.maximizeOnSingleClick = _s.props.maximizeOnSingleClick || "no";
_s.maximizeOnSingleClick = _s.maximizeOnSingleClick == "yes" ? true : false;
_s.maxZoom = parseInt(_s.props.maxZoom) || 1;
_s.slideshowPreloaderPosition = _s.props.slideshowPreloaderPosition || 'bottomleft';
_s.slideshowPreloaderPosition = _s.slideshowPreloaderPosition.toLowerCase();
_s.preloaderPosition = _s.props.preloaderPosition || 'bottomleft';
_s.preloaderPosition = _s.preloaderPosition.toLowerCase();
if(_s.displayVertical_bl) _s.preloaderPosition = 'topleft'
_s.slideshowRadius = _s.props.slideshowRadius || 10;
_s.slideshowBackgroundColor = _s.props.slideshowBackgroundColor || '#FF0000';
_s.slideshowFillColor = _s.props.slideshowFillColor || '#FFFFFF';
_s.slideshowStrokeSize = _s.props.slideshowStrokeSize || 4;
_s.preloaderBackgroundColor = _s.props.slideshowBackgroundColor || '#FF0000';
_s.preloaderFillColor = _s.props.slideshowFillColor || '#FFFFFF';
_s.rotationY360DegreeVideo = _s.props.rotationY360DegreeVideo || - 90;
_s.maxImageHeight = _s.props.maxImageHeight || 300;
if(_s.maxImageHeight == "originalSize") _s.maxImageHeight = 10000;
_s.maxCenterImageHeight = _s.props.maxCenterImageHeight || 300;
if(_s.maxCenterImageHeight == "originalSize") _s.maxCenterImageHeight = 10000;
_s.addDragSupport_bl = _s.props.addDragSupport || "no";
_s.addDragSupport_bl = _s.addDragSupport_bl == "yes" ? true : false;
_s.maximizeImageIfVideo = _s.props.maximizeImageIfVideo || "no";
_s.maximizeImageIfVideo = _s.maximizeImageIfVideo == "yes" ? true : false;
if(_s.displayVertical_bl) _s.addDragSupport_bl = false;
_s.showCount_bl = _s.props.showCount || "no";
_s.showCount_bl = _s.showCount_bl == "yes" ? true : false;
_s.useVideo = _s.props.useVideo || "yes";
_s.useVideo = _s.useVideo == "yes" ? true : false;
_s.showZoomButton_bl = _s.props.showZoomButton || "no";
_s.showZoomButton_bl = _s.showZoomButton_bl == "yes" ? true : false;
_s.imageOffsetBottom = _s.props.imageOffsetBottom || 0;
_s.nextAndPrevButtonsHorizontalButtonsOffset = _s.props.nextAndPrevButtonsHorizontalButtonsOffset || 0;
_s.nextAndPrevButtonsVerticalButtonsOffset = _s.props.nextAndPrevButtonsVerticalButtonsOffset || 0;
_s.buttonsHideDelay = _s.props.buttonsHideDelay || 3;
_s.buttonsHideDelay *= 1000;
_s.showHTMLTextContent_str = _s.props.showCaption || "none";
if(_s.showHTMLTextContent_str.toLowerCase() == "none"){
_s.showHTMLTextContent_str = "none";
}else if(_s.showHTMLTextContent_str.toLowerCase() == "center"){
_s.showHTMLTextContent_str = "center";
}else if(_s.showHTMLTextContent_str.toLowerCase() == "all"){
_s.showHTMLTextContent_str = "all";
}else{
_s.showHTMLTextContent_str = "all";
}
if(_s.displayVertical_bl) _s.showHTMLTextContent_str = "all";
_s.nextAndPrevButtonsPosition_str = _s.props.nextAndPrevButtonsPosition || "insideImage";
if(_s.nextAndPrevButtonsPosition_str.toLowerCase() == "insideimage"){
_s.nextAndPrevButtonsPosition_str = "insideImage";
}else if(_s.nextAndPrevButtonsPosition_str.toLowerCase() == "outsideimage"){
_s.nextAndPrevButtonsPosition_str = "outsideImage";
}else if(_s.nextAndPrevButtonsPosition_str.toLowerCase() == "atthebottomofimage"){
_s.nextAndPrevButtonsPosition_str = "atTheBottomOfImage";
}else if(_s.nextAndPrevButtonsPosition_str.toLowerCase() == "leftandright"){
_s.nextAndPrevButtonsPosition_str = "leftAndRight";
}else{
_s.nextAndPrevButtonsPosition_str = "insideImage";
}
_s.HTMLTextPosition_str = _s.props.captionPosition || "inside";
if(_s.HTMLTextPosition_str.toLowerCase() == "inside"){
_s.HTMLTextPosition_str = "inside";
}else if(_s.HTMLTextPosition_str.toLowerCase() == "outside"){
_s.HTMLTextPosition_str = "outside";
}else{
_s.HTMLTextPosition_str = "inside";
}
_s.showFullSreenButton_bl = _s.props.showFullscreenButton || "no";
_s.showFullSreenButton_bl = _s.showFullSreenButton_bl == "yes" ? true : false;
if(_s.displayVertical_bl || _s.HTMLTextPosition_str == "outside") _s.showFullSreenButton_bl = false;
_s.HTMLTextAlignment_str = _s.props.HTMLTextAlignment || "bottom";
if(_s.HTMLTextAlignment_str.toLowerCase() == "top"){
_s.HTMLTextAlignment_str = "top";
}else if(_s.HTMLTextAlignment_str.toLowerCase() == "bottom"){
_s.HTMLTextAlignment_str = "bottom";
}else{
_s.HTMLTextAlignment_str = "top";
}
_s.buttonBackgroundNormalColor_str = _s.props.buttonBackgroundNormalColor || "#FF0000";
_s.buttonBackgroundNormalSelected_str = _s.props.buttonBackgroundSelectedColor || "#FF0000";
_s.buttonTextNormalColor_str = _s.props.buttonTextNormalColor || "#FF0000";
_s.buttonTextSelectedColor_str = _s.props.buttonTextSelectedColor || "#FF0000";
_s.buttonBackgroundOpacity = _s.props.buttonBackgroundOpacity;
if(!_s.props.buttonBackgroundOpacity) _s.buttonBackgroundOpacity = 1;
_s.autoPlay_bl = _s.props.autoPlay;
_s.autoPlay_bl = _s.autoPlay_bl == "yes" ? true : false;
// Video settings.
_s.timeColor_str = _s.props.timeColor || "#FF0000";
_s.videoPosterBackgroundColor_str = _s.props.videoPosterBackgroundColor || "transparent";
_s.videoControllerBackgroundColor_str = _s.props.videoControllerBackgroundColor || "transparent";
_s.audioControllerBackgroundColor_str = _s.props.audioControllerBackgroundColor || "transparent";
_s.volume = 1;
_s.controllerHeight = _s.props.videoControllerHeight || 50;
_s.startSpaceBetweenButtons = _s.props.startSpaceBetweenButtons || 0;
_s.controllerHideDelay = _s.props.videoControllerHideDelay || 2;
_s.controllerHideDelay *= 1000;
_s.vdSpaceBetweenButtons = _s.props.vdSpaceBetweenButtons || 0;
_s.scrubbersOffsetWidth = _s.props.scrubbersOffsetWidth || 0;
_s.volumeScrubberOffsetRightWidth = _s.props.volumeScrubberOffsetRightWidth || 0;
_s.timeOffsetLeftWidth = _s.props.timeOffsetLeftWidth || 0;
_s.timeOffsetRightWidth = _s.props.timeOffsetRightWidth || 0;
_s.timeOffsetTop = _s.props.timeOffsetTop || 0;
_s.logoMargins = _s.props.logoMargins || 0;
_s.mainScrubberOffestTop = _s.props.mainScrubberOffestTop || 0;
_s.volumeScrubberWidth = _s.props.volumeScrubberWidth || 10;
_s.audioScrubbersOffestTotalWidth = _s.props.audioScrubbersOffestTotalWidth || 0;
_s.audioControllerHeight = _s.props.audioControllerHeight || 40;
_s.imageBackgroundColor_str = _s.props.imageBackgroundColor || "#333333";
_s.startAtCategory = _s.props.startAtCategory || 0;
_s.startAtImage = _s.props.startAtImage || 0;
if(_s.volumeScrubberWidth > 200) _s.volumeScrubberWidth = 200;
_s.transitionDuration =_s.props.transitionDuration || .8;
_s.spaceBetweenImages = parseInt(_s.props.spaceBetweenImages) || 0;
if(_s.spaceBetweenImages != 0) _s.spaceBetweenImages += 1;
_s.transitionType_str = _s.props.transitionType || "expo";
if(_s.transitionType != "expo"
&& _s.transitionType != "slowease"
&& _s.transitionType != "elastic"
&& _s.transitionType != "bounce"
&& _s.transitionType != "normal"
){
_s.transitionType_str = _s.getTransitionType(_s.transitionType_str);
}
_s.defaulNrThumbsToDisplay = _s.props.defaulNrThumbsToDisplay || "all"
if(_s.displayVertical_bl) _s.defaulNrThumbsToDisplay = "all";
if(_s.defaulNrThumbsToDisplay != "all") _s.defaulNrThumbsToDisplay = parseInt(_s.defaulNrThumbsToDisplay);
_s.animationTextType_str = _s.props.captionAnimationType || "fade";
if(_s.animationTextType_str != "fade"
&& _s.animationTextType_str != "fadeFromBottomToTop"
){
_s.animationTextType_str = "fade";
}
_s.showImageReflection_bl = _s.props.showImageReflection || "no";
_s.showImageReflection_bl = _s.showImageReflection_bl == "yes" ? true : false;
if(_s.displayVertical_bl) _s.showImageReflection_bl = false;
_s.reflectionHeight = _s.props.reflectionHeight || 100;
if(_s.isMobile_bl) _s.allowToChangeVolume_bl = false;
_s.overlayColor_str = _s.props.overlayColor || "";
if(_s.displayVertical_bl) _s.overlayColor_str = 'rgba(0,0,0,0)';
_s.showNextAndPrevButtons_bl = _s.props.showNextAndPrevButtons;
_s.showNextAndPrevButtons_bl = _s.showNextAndPrevButtons_bl == "yes" ? true : false;
_s.showNextAndPrevButtonsOnMobile_bl = _s.props.showNextAndPrevButtonsOnMobile;
_s.showNextAndPrevButtonsOnMobile_bl = _s.showNextAndPrevButtonsOnMobile_bl == "yes" ? true : false;
if(_s.isMobile_bl && _s.showNextAndPrevButtonsOnMobile_bl){
_s.showNextAndPrevButtons_bl = true;
}else if(_s.isMobile_bl && !_s.showNextAndPrevButtonsOnMobile_bl){
_s.showNextAndPrevButtons_bl = false;
}
_s.zoomButtonOffset = parseInt(_s.props.zoomButtonOffset) || 0;
_s.slideshowDelay = _s.props.slideshowDelay;
_s.slideshowDelay /= 1000;
if(_s.displayVertical_bl) _s.slideshowDelay = 0;
_s.showInfoHolder = _s.props.showInfoHolder == "yes" ? true : false;
_s.infoHolderHeight = _s.props.infoHolderHeight || 40;
_s.infoHolderHorizontalOffset = _s.props.infoHolderHorizontalOffset || 30;
_s.infoHolderVerticalOffset = _s.props.infoHolderVerticalOffset || 30;
_s.infoHolderBackgroundColor = _s.props.infoHolderBackgroundColor || 'rgba(0,0,0,.6)';
_s.infoHolderStartHorizontalSpace = _s.props.infoHolderStartHorizontalSpace || 20;
_s.infoHolderHorizontalSpaceBetweenItems = _s.props.infoHolderHorizontalSpaceBetweenItems || 10;
_s.videoAutoPlay_bl = _s.props.videoAutoPlay;
_s.videoAutoPlay_bl = _s.videoAutoPlay_bl == "yes" ? true : false;
if(FWDSISCUtils.isMobile) _s.videoAutoPlay_bl = false;
_s.audioAutoPlay_bl = _s.props.audioAutoPlay;
_s.audioAutoPlay_bl = _s.audioAutoPlay_bl == "yes" ? true : false;
if(FWDSISCUtils.isMobile) _s.audioAutoPlay_bl = false;
_s.videoLoop_bl = _s.props.videoLoop;
_s.videoLoop_bl = _s.videoLoop_bl == "yes" ? true : false;
_s.audioLoop_bl = _s.props.audioLoop;
_s.audioLoop_bl = _s.audioLoop_bl == "yes" ? true : false;
_s.addKeyboardSupport_bl = _s.props.addKeyboardSupport;
_s.addKeyboardSupport_bl = _s.addKeyboardSupport_bl == "yes" ? true : false;
_s.hideLogoWithController_bl = _s.props.hideLogoWithController;
_s.hideLogoWithController_bl = _s.hideLogoWithController_bl == "yes" ? true : false;
_s.showPoster_bl = _s.props.showPoster;
_s.showPoster_bl = _s.showPoster_bl == "yes" ? true : false;
_s.showVolumeScrubber_bl = _s.props.showVolumeScrubber;
_s.showVolumeScrubber_bl = _s.showVolumeScrubber_bl == "no" ? false : true;
_s.useVectorIconsSkin_bl = _s.props.useVectorIconsSkin;
_s.useVectorIconsSkin_bl = _s.useVectorIconsSkin_bl == "no" ? false : true;
_s.showVolumeButton_bl = _s.props.showVolumeButton;
_s.showVolumeButton_bl = _s.showVolumeButton_bl == "no" ? false : true;
_s.showAllCategories_bl = _s.props.showAllCategories;
_s.showAllCategories_bl = _s.showAllCategories_bl == "yes" ? true : false;
_s.showTime_bl = _s.props.showTime;
_s.showTime_bl = _s.showTime_bl == "no" ? false : true;
_s.videoShowFullScreenButton_bl = _s.props.videoShowFullScreenButton;
_s.videoShowFullScreenButton_bl = _s.videoShowFullScreenButton_bl == "no" ? false : true;
_s.randomizeImages_bl = _s.props.randomizeImages;
_s.randomizeImages_bl = _s.randomizeImages_bl == "yes" ? true : false;
_s.showComboBox_bl = _s.props.showComboBox;
_s.showComboBox_bl = _s.showComboBox_bl == "yes" ? true : false;
// Video & audio player.
_s.useVideo = _s.props.useVideo == "yes" ? true : false;
_s.videoAutoPlay = _s.props.videoAutoPlay == "yes" ? true : false;
_s.nextVideoAutoPlay = _s.props.nextVideoAutoPlay == "yes" ? true : false;
_s.videoAutoPlayText = _s.props.videoAutoPlayText || 'Click to unmute';
_s.volume = _s.props.volume;
if(_s.volume === undefined) _s.volume = 1;
_s.showLogo = _s.props.showLogo == "yes" ? true : false;
_s.logoPath = _s.props.logoPath || _s.mainFolderPath + "evp/skin/logo.png";
_s.hideLogoWithController = _s.props.hideLogoWithController == "yes" ? true : false;
_s.logoLink = _s.props.logoLink || '';
_s.showDefaultControllerForVimeo = _s.props.showDefaultControllerForVimeo == "yes" ? true : false;
_s.showScrubberWhenControllerIsHidden = _s.props.showScrubberWhenControllerIsHidden == "yes" ? true : false;
_s.showVolumeButton = _s.props.showVolumeButton == "yes" ? true : false;
_s.showScrubberToolTipLabel = _s.props.showScrubberToolTipLabel == "yes" ? true : false;
_s.showTime = _s.props.showTime == "yes" ? true : false;
_s.showRewindButton = _s.props.showRewindButton == "yes" ? true : false;
_s.showQualityButton = _s.props.showQualityButton == "yes" ? true : false;
_s.showChromecastButton = _s.props.showChromecastButton == "yes" ? true : false;
_s.showFullScreenButton = _s.props.showFullScreenButton == "yes" ? true : false;
_s.showScrubberToolTipLabel = _s.props.showScrubberToolTipLabel == "yes" ? true : false;
_s.fillEntireVideoScreen = _s.props.fillEntireVideoScreen == "yes" ? true : false;
_s.videoControllerHideDelay = _s.props.videoControllerHideDelay;
if(_s.videoControllerHideDelay === undefined) _s.videoControllerHideDelay = 3000;
_s.videoControllerHideDelay = _s.videoControllerHideDelay/1000;
_s.timeColor = _s.props.timeColor || '#B9B9B9';
_s.youtubeQualityButtonNormalColor = _s.props.youtubeQualityButtonNormalColor || '#B9B9B9';
_s.youtubeQualityButtonSelectedColor = _s.props.youtubeQualityButtonSelectedColor || '#FFFFFF';
_s.scrubbersToolTipLabelBackgroundColor = _s.props.scrubbersToolTipLabelBackgroundColor || '#FFFFFF';
_s.scrubbersToolTipLabelFontColor = _s.props.scrubbersToolTipLabelFontColor || '#5a5a5a';
_s.showPlaybackRateButton = _s.props.showPlaybackRateButton == "yes" ? true : false;
_s.audioVisualizerLinesColor = _s.props.audioVisualizerLinesColor || '#570AB8';
_s.audioVisualizerCircleColor = _s.props.audioVisualizerCircleColor || '#b9b9b9';
_s.thumbnailsPreviewWidth = _s.props.thumbnailsPreviewWidth || 196;
_s.thumbnailsPreviewBackgroundColor = _s.props.thumbnailsPreviewBackgroundColor || '#2e2e2e';
_s.thumbnailsPreviewBorderColor = _s.props.thumbnailsPreviewBorderColor || '#414141';
_s.thumbnailsPreviewLabelBackgroundColor = _s.props.thumbnailsPreviewLabelBackgroundColor || '#414141';
_s.thumbnailsPreviewLabelFontColor = _s.props.thumbnailsPreviewLabelFontColor || '#CCCCCC';
_s.skipToVideoText = _s.props.skipToVideoText || 'You can skip to video in: ';
_s.skipToVideoButtonText = _s.props.skipToVideoButtonText || 'Skip Ad';
// Create playlists.
var parsedPlaylist_ar = [];
_s.playListElement = FWDSISCUtils.getChildById(_s.props.playlistId);
if(_s.props.playlistId.indexOf("siscobj_") != -1){
plObj = window[_s.props.playlistId];
if(!plObj){
var errorMessage_str = "ERROR! The playlist JSON object with the label <font color='#FF0000'>" + _s.props.playlistId + "</font> doesn't exist!";
setTimeout(function(){
_s.dispatchEvent(FWDSISCData.LOAD_ERROR, {text:errorMessage_str});
}, 100);
return;
}
_s.playlist_ar = plObj;
}else{
if(!_s.playListElement){
var errorMessage_str = "Playlist div with the id <font color='#FF0000'>" + _s.props.playlistId + "</font> doesn't exists.";
setTimeout(function(){
_s.dispatchEvent(FWDSISCData.LOAD_ERROR, {text:errorMessage_str});
}, 100);
return;
}
var curPlaylist_ar = FWDSISCUtils.getChildren(_s.playListElement);
var totalimages = curPlaylist_ar.length;
var plObj = {};
if(totalimages == 0){
var errorMessage_str = "At least one entry is requires in the playlist nr: <font color='#FF0000'>" + j + "</font>";
setTimeout(function(){
_s.dispatchEvent(FWDSISCData.LOAD_ERROR, {text:errorMessage_str});
}, 100);
return;
}
for(var i=0; i<totalimages; i++){
var obj = {};
var ch = curPlaylist_ar[i];
var test;
if(!FWDSISCUtils.hasAttribute(ch, "data-source")){
var errorMessage_str = "Attribute <font color='#FF0000'>data-source</font> is not found in the playlist at position nr: <font color='#FF0000'>" + i + "</font>.";
setTimeout(function(){
_s.dispatchEvent(FWDSISCData.LOAD_ERROR, {text:errorMessage_str});
}, 100);
return;
}
obj.source = String(FWDSISCUtils.getAttributeValue(ch, "data-source"));
obj.target = FWDSISCUtils.getAttributeValue(ch, "data-target");
obj.link = FWDSISCUtils.getAttributeValue(ch, "data-link");
obj.imageWidth = FWDSISCUtils.getAttributeValue(ch, "data-width");
obj.imageHeight = FWDSISCUtils.getAttributeValue(ch, "data-height");
obj.HTMLTextAlignment = FWDSISCUtils.getAttributeValue(ch, "data-text-vertical-alignment");
obj.videoSrc = FWDSISCUtils.getAttributeValue(ch, "data-video-source");
obj.password = FWDSISCUtils.getAttributeValue(ch, "data-video-password");
obj.subtitleSrc = FWDSISCUtils.getAttributeValue(ch, "data-video-subtitle-source");
obj.thumbPreviewSrc = FWDSISCUtils.getAttributeValue(ch, "data-video-thumb-preview");
obj.thumbVastSrc = FWDSISCUtils.getAttributeValue(ch, "data-video-vast-source");
obj.is360 = FWDSISCUtils.getAttributeValue(ch, "data-is-360") || false;
obj.show360DegreeVideoVrButton = FWDSISCUtils.getAttributeValue(ch, "data-show-360-vr-button");
if(obj.show360DegreeVideoVrButton && obj.show360DegreeVideoVrButton == 'yes'){
obj.show360DegreeVideoVrButton = true;
}else{
obj.show360DegreeVideoVrButton = false;
}
if(obj.videoSrc){
_s.setVideoType(obj, obj.videoSrc);
}
if(!FWDSISCUtils.getChildren(ch).length){
ch.innerHTML = FWDSISCUtils.unescapeHtml(ch.innerHTML);
}
try{
obj.description_ar = [];
for(var k=0; k<FWDSISCUtils.getChildren(ch).length; k++){
obj.description_ar[k] = FWDSISCUtils.getChildren(ch)[k].outerHTML;
}
}catch(e){};
var firstUrlPath = encodeURI(obj.source.substr(0,obj.source.lastIndexOf("/") + 1));
var secondUrlPath = encodeURIComponent(obj.source.substr(obj.source.lastIndexOf("/") + 1));
obj.source = firstUrlPath + secondUrlPath;
parsedPlaylist_ar[i] = obj;
}
_s.playlist_ar = {playlistimages:parsedPlaylist_ar};
}
if(_s.randomizeImages_bl) _s.playlist_ar.playlistimages = FWDSISCUtils.randomizeArray(_s.playlist_ar.playlistimages);
_s.skinPaths_ar = [
{img:_s.nextButtonN_img = new Image(), src:_s.skinPath_str + "next-button.png"},
{img:_s.prevButtonN_img = new Image(), src:_s.skinPath_str + "prev-button.png"}
];
_s.nextButtonS_str = _s.skinPath_str + "next-button-over.png";
_s.prevButtonS_str = _s.skinPath_str + "prev-button-over.png";
_s.totalGraphics = _s.skinPaths_ar.length;
setTimeout(function(){
_s.dispatchEvent(FWDSISCData.PRELOADER_LOAD_DONE);
if(_s.useVideo){
_s.loadVideoPlayer();
}else{
_s.doneLoading();
}
}, 50);
};
_s.doneLoading = function(){
_s.dispatchEvent(FWDSISCData.SKIN_LOAD_COMPLETE);
}
// Load video player.
_s.loadVideoPlayer = function(){
if(!FWDSISC.hasLoadEVP && !window['FWDEVPlayer']){
var script = document.createElement('script');
script.src = _s.mainFolderPath + 'evp/java/FWDEVPlayer.js';
document.head.appendChild(script);
script.onload = _s.videoLoadDone;
script.onerror = _s.onVidLoadError;
}
_s.evp_it = setInterval(function(){
if(FWDSISC.hasEVP || window['FWDEVPlayer']){
_s.doneLoading();
clearInterval(_s.evp_it);
}
}, 5);
FWDSISC.hasLoadEVP = true;
}
_s.onVidLoadError = function(){
clearInterval(_s.evp_it);
var error = "Error loading video player!";
_s.dispatchEvent(FWDSISCData.LOAD_ERROR, {text:error});
}
_s.videoLoadDone = function(){
FWDSISC.hasEVP = true;
}
// Utils.
_s.setVideoType = function(obj, str){
if(/\.mp4|\.m3u8|\.mpd/i.test(str)){
obj.type = FWDSISC.VIDEO;
}else if(/youtube\./i.test(str)){
obj.type = FWDSISC.YOUTUBE;
}else if(/vimeo\./i.test(str)){
obj.type = FWDSISC.VIMEO;
}else if(/\.mp3/i.test(str)){
obj.type = FWDSISC.AUDIO;
}
}
_s.getTransitionType = function(transition){
if(transition.toLowerCase() == "expo"){
transition = "Expo.easeInOut"
}else if(transition.toLowerCase() == "slowease"){
transition = "Quart.easeOut"
}else if(transition.toLowerCase() == "elastic"){
transition = "Elastic.easeOut"
}else if(transition.toLowerCase() == "bounce"){
transition = "Bounce.easeOut"
}else if(transition.toLowerCase() == "normal"){
transition = "Power0.easeNone"
}
return transition;
}
// Show error if a required property is not defined.
_s.showPropertyError = function(error){
_s.dispatchEvent(FWDSISCData.LOAD_ERROR, {text:"The property called <font color='#FF0000'>" + error + "</font> is not defined."});
};
_s.init();
};
// Set prototype.
FWDSISCData.setPrototype = function(){
FWDSISCData.prototype = new FWDSISCEventDispatcher();
};
FWDSISCData.prototype = null;
FWDSISCData.PRELOADER_LOAD_DONE = "onPreloaderLoadDone";
FWDSISCData.LOAD_DONE = "onLoadDone";
FWDSISCData.LOAD_ERROR = "onLoadError";
FWDSISCData.IMAGE_LOADED = "onImageLoaded";
FWDSISCData.SKIN_LOAD_COMPLETE = "onSkinLoadComplete";
FWDSISCData.SKIN_PROGRESS = "onSkinProgress";
FWDSISCData.IMAGES_PROGRESS = "onImagesPogress";
FWDSISCData.PLAYLIST_LOAD_COMPLETE = "onPlaylistLoadComplete";
window.FWDSISCData = FWDSISCData;
}(window));/**
* Simple Image Slider Carousel PACKAGED v3.0
* Display object.
*
* @author Tibi - FWDesign [https://webdesign-flash.ro/]
* Copyright © 2006 All Rights Reserved.
*/
(function (window){
'use strict';
/*
* @ type values: div, img.
* @ positon values: relative, absolute.
* @ positon values: hidden.
* @ display values: block, inline-block, _s applies only if the position is relative.
*/
var FWDSISCDisplayObject = function(type, position, overflow, display, setPadding){
var _s = this;
_s.listeners = {events_ar:[]};
if(type == "div" || type == "img" || type == "canvas" || type == "input" || type == "IFRAME"){
_s.type = type;
}else{
throw Error("Type is not valid! " + type);
}
_s.children_ar = [];
_s.position = position || "absolute";
_s.overflow = overflow || "hidden";
_s.display = display || "inline-block";
_s.visible = true;
_s.buttonMode;
_s.setPadding = setPadding;
_s.x = 0;
_s.y = 0;
_s.w = 0;
_s.h = 0;
_s.rect;
_s.alpha = 1;
_s.innerHTML = "";
_s.opacityType = "";
_s.isHtml5_bl = false;
_s.hasT3D = FWDSISCUtils.hasTransform3d;
_s.hasT2D = FWDSISCUtils.hasTransform2d;
_s.hasBeenSetSelectable_bl = false;
// Initialize.
_s.init = function(){
_s.setScreen();
};
// Check if it supports transforms.
_s.getTransform = function() {
var properties = ['transform', 'msTransform', 'WebkitTransform', 'MozTransform', 'OTransform'];
var p;
while (p = properties.shift()) {
if (typeof _s.screen.style[p] !== 'undefined') {
return p;
}
}
return false;
};
// Set opacity type.
_s.getOpacityType = function(){
var opacityType;
if (typeof _s.screen.style.opacity != "undefined") {//ie9+
opacityType = "opacity";
}else{ //ie8
opacityType = "filter";
}
return opacityType;
};
// Setup main screen.
_s.setScreen = function(element){
if(_s.type == "img" && element){
_s.screen = element;
_s.setMainProperties();
}else{
_s.screen = document.createElement(_s.type);
_s.setMainProperties();
}
};
// Set main properties.
_s.setMainProperties = function(){
_s.transform = _s.getTransform();
_s.setPosition(_s.position);
_s.setOverflow(_s.overflow);
_s.opacityType = _s.getOpacityType();
if(_s.opacityType == "opacity") _s.isHtml5_bl = true;
if(_s.opacityType == "filter") _s.screen.style.filter = "inherit";
_s.screen.style.left = "0";
_s.screen.style.top = "0";
_s.screen.style.margin = "0";
if(!_s.setPadding){
_s.screen.style.padding = "0";
}
_s.screen.style.maxWidth = "none";
_s.screen.style.maxHeight = "none";
_s.screen.style.border = "none";
_s.screen.style.lineHeight = "1";
_s.screen.style.backfaceVisibility = "hidden";
if(type == "img"){
_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";
};
// Set / get various peoperties.
_s.setSelectable = function(val){
if(!val){
_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 false;};
_s.screen.onselectstart = function(){return false;};
_s.screen.ontouchstart = function(){return false;};
_s.screen.style.webkitTouchCallout='none';
_s.hasBeenSetSelectable_bl = true;
}else{
if(FWDSISCUtils.isFirefox || FWDSISCUtils.isIE){
_s.screen.style.userSelect = "element";
_s.screen.style.MozUserSelect = "element";
_s.screen.style.msUserSelect = "element";
}else if(FWDSISCUtils.isSafari){
_s.screen.style.userSelect = "text";
_s.screen.style.webkitUserSelect = "text";
}else{
_s.screen.style.userSelect = "all";
_s.screen.style.webkitUserSelect = "all";
}
_s.screen.style.khtmlUserSelect = "all";
_s.screen.style.oUserSelect = "all";
if(FWDSISCUtils.isIEAndLessThen9){
_s.screen.ondragstart = null;
_s.screen.onselectstart = null;
_s.screen.ontouchstart = null;
}else{
_s.screen.ondragstart = undefined;
_s.screen.onselectstart = undefined;
_s.screen.ontouchstart = undefined;
}
_s.screen.style.webkitTouchCallout='default';
_s.hasBeenSetSelectable_bl = false;
}
};
_s.getScreen = function(){
return _s.screen;
};
_s.setVisible = function(val){
_s.visible = val;
if(_s.visible == true){
_s.screen.style.visibility = "visible";
}else{
_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(val){
_s.overflow = val;
_s.screen.style.overflow = _s.overflow;
};
_s.setPosition = function(val){
_s.position = val;
_s.screen.style.position = _s.position;
};
_s.setDisplay = function(val){
_s.display = val;
_s.screen.style.display = _s.display;
};
_s.setButtonMode = function(val){
_s.buttonMode = val;
if(_s.buttonMode == true){
_s.screen.style.cursor = "pointer";
}else{
_s.screen.style.cursor = "default";
}
};
_s.setBkColor = function(val){
_s.screen.style.backgroundColor = val;
};
_s.setInnerHTML = function(val){
_s.innerHTML = val;
_s.screen.innerHTML = _s.innerHTML;
};
_s.getInnerHTML = function(){
return _s.innerHTML;
};
_s.getRect = function(){
return _s.screen.getBoundingClientRect();
};
_s.setAlpha = function(val){
_s.alpha = val;
if(_s.opacityType == "opacity"){
_s.screen.style.opacity = _s.alpha;
}else if(_s.opacityType == "filter"){
_s.screen.style.filter = "alpha(opacity=" + _s.alpha * 100 + ")";
_s.screen.style.filter = "progid:DXImageTransform.Microsoft.Alpha(Opacity=" + Math.round(_s.alpha * 100) + ")";
}
};
_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(val){
_s.x = val;
if(_s.hasT3D){
_s.screen.style[_s.transform] = 'translate3d(' + _s.x + 'px,' + _s.y + 'px,0)';
}else if(_s.hasT2D){
_s.screen.style[_s.transform] = 'translate(' + _s.x + 'px,' + _s.y + 'px)';
}else{
_s.screen.style.left = _s.x + "px";
}
};
_s.getX = function(){
return _s.x;
};
_s.setY = function(val){
_s.y = val;
if(_s.hasT3D){
_s.screen.style[_s.transform] = 'translate3d(' + _s.x + 'px,' + _s.y + 'px,0)';
}else if(_s.hasT2D){
_s.screen.style[_s.transform] = 'translate(' + _s.x + 'px,' + _s.y + 'px)';
}else{
_s.screen.style.top = _s.y + "px";
}
};
_s.getY = function(){
return _s.y;
};
_s.setWidth = function(val){
_s.w = val;
if(_s.type == "img"){
_s.screen.width = _s.w;
_s.screen.style.width = _s.w + "px";
}else{
_s.screen.style.width = _s.w + "px";
}
};
_s.getWidth = function(){
if(_s.type == "div" || _s.type == "input"){
if(_s.screen.offsetWidth != 0) return _s.screen.offsetWidth;
return _s.w;
}else if(_s.type == "img"){
if(_s.screen.offsetWidth != 0) return _s.screen.offsetWidth;
if(_s.screen.width != 0) return _s.screen.width;
return _s._w;
}else if( _s.type == "canvas"){
if(_s.screen.offsetWidth != 0) return _s.screen.offsetWidth;
return _s.w;
}
};
_s.setHeight = function(val){
_s.h = val;
if(_s.type == "img"){
_s.screen.height = _s.h;
_s.screen.style.height = _s.h + "px";
}else{
_s.screen.style.height = _s.h + "px";
}
};
_s.getHeight = function(){
if(_s.type == "div" || _s.type == "input"){
if(_s.screen.offsetHeight != 0) return _s.screen.offsetHeight;
return _s.h;
}else if(_s.type == "img"){
if(_s.screen.offsetHeight != 0) return _s.screen.offsetHeight;
if(_s.screen.height != 0) return _s.screen.height;
return _s.h;
}else if(_s.type == "canvas"){
if(_s.screen.offsetHeight != 0) return _s.screen.offsetHeight;
return _s.h;
}
};
// DOM.
_s.addChild = function(e, parent){
if(_s.contains(e)){
_s.children_ar.splice(FWDSISCUtils.indexOfArray(_s.children_ar, e), 1);
_s.children_ar.push(e);
_s.screen.appendChild(e.screen);
e.parent = parent;
}else{
_s.children_ar.push(e);
_s.screen.appendChild(e.screen);
e.parent = parent;
}
};
_s.removeChild = function(e){
if(_s.contains(e)){
_s.children_ar.splice(FWDSISCUtils.indexOfArray(_s.children_ar, e), 1);
_s.screen.removeChild(e.screen);
}else{
throw Error("##removeChild()## Child dose't exist, it can't be removed!");
};
};
_s.contains = function(e){
if(FWDSISCUtils.indexOfArray(_s.children_ar, e) == -1){
return false;
}else{
return true;
}
};
_s.addChildAt = function(e, index){
if(_s.getNumChildren() == 0){
_s.children_ar.push(e);
_s.screen.appendChild(e.screen);
}else if(index == 1){
_s.screen.insertBefore(e.screen, _s.children_ar[0].screen);
_s.screen.insertBefore(_s.children_ar[0].screen, e.screen);
if(_s.contains(e)){
_s.children_ar.splice(FWDSISCUtils.indexOfArray(_s.children_ar, e), 1, e);
}else{
_s.children_ar.splice(FWDSISCUtils.indexOfArray(_s.children_ar, e), 0, e);
}
}else{
if(index < 0 || index > _s.getNumChildren() -1) throw Error("##getChildAt()## Index out of bounds!");
_s.screen.insertBefore(e.screen, _s.children_ar[index].screen);
if(_s.contains(e)){
_s.children_ar.splice(FWDSISCUtils.indexOfArray(_s.children_ar, e), 1, e);
}else{
_s.children_ar.splice(FWDSISCUtils.indexOfArray(_s.children_ar, e), 0, e);
}
}
};
_s.getChildAt = function(index){
if(index < 0 || index > _s.getNumChildren() -1) throw Error("##getChildAt()## Index out of bounds!");
if(_s.getNumChildren() == 0) throw Errror("##getChildAt## Child dose not exist!");
return _s.children_ar[index];
};
_s.getChildIndex = function(child){
if(_s.contains(child)){
return FWDSISCUtils.indexOfArray(_s.children_ar, child);
}
return 0;
};
_s.removeChildAtZero = function(){
_s.screen.removeChild(_s.children_ar[0].screen);
_s.children_ar.shift();
};
_s.getNumChildren = function(){
return _s.children_ar.length;
};
// Event dispatcher.
_s.addListener = function (type, listener){
if(type == undefined) throw Error("type is required.");
if(typeof type === "object") throw Error("type must be of type String.");
if(typeof listener != "function") throw Error("listener must be of type Function.");
var event = {};
event.type = type;
event.listener = listener;
event.target = _s;
_s.listeners.events_ar.push(event);
};
_s.dispatchEvent = function(type, props){
if(_s.listeners == null) return;
if(type == undefined) throw Error("type is required.");
if(typeof type === "object") throw Error("type must be of type String.");
for (var i=0, len=_s.listeners.events_ar.length; i < len; i++){
if(_s.listeners.events_ar[i].target === _s && _s.listeners.events_ar[i].type === type){
if(props){
for(var prop in props){
_s.listeners.events_ar[i][prop] = props[prop];
}
}
_s.listeners.events_ar[i].listener.call(_s, _s.listeners.events_ar[i]);
}
}
};
_s.removeListener = function(type, listener){
if(type == undefined) throw Error("type is required.");
if(typeof type === "object") throw Error("type must be of type String.");
if(typeof listener != "function") throw Error("listener must be of type Function." + type);
for (var i=0, len=_s.listeners.events_ar.length; i < len; i++){
if(_s.listeners.events_ar[i].target === _s
&& _s.listeners.events_ar[i].type === type
&& _s.listeners.events_ar[i].listener === listener
){
_s.listeners.events_ar.splice(i,1);
break;
}
}
};
// Destory methods.
_s.disposeImage = function(){
if(_s.type == "img") _s.screen.src = null;
};
_s.destroy = function(){
if(_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.hasT3D = null;
_s.hasT2D = null;
_s = null;
};
_s.init();
};
window.FWDSISCDisplayObject = FWDSISCDisplayObject;
}(window));/**
* Simple Image Slider Carousel PACKAGED v3.0
* Event disptatcher.
*
* @author Tibi - FWDesign [https://webdesign-flash.ro/]
* Copyright © 2006 All Rights Reserved.
*/
(function (){
var FWDSISCEventDispatcher = function (){
this.listeners = {events_ar:[]};
this.addListener = function (type, listener){
if(type == undefined) throw Error("type is required.");
if(typeof type === "object") throw Error("type must be of type String.");
if(typeof listener != "function") throw Error("listener must be of type Function.");
var event = {};
event.type = type;
event.listener = listener;
event.target = this;
this.listeners.events_ar.push(event);
};
this.dispatchEvent = function(type, props){
if(this.listeners == null) return;
if(type == undefined) throw Error("type is required.");
if(typeof type === "object") throw Error("type must be of type String.");
for (var i=0, len=this.listeners.events_ar.length; i < len; i++){
if(this.listeners.events_ar[i].target === this && this.listeners.events_ar[i].type === type){
if(props){
for(var prop in props){
this.listeners.events_ar[i][prop] = props[prop];
}
}
this.listeners.events_ar[i].listener.call(this, this.listeners.events_ar[i]);
}
}
};
this.removeListener = function(type, listener){
if(type == undefined) throw Error("type is required.");
if(typeof type === "object") throw Error("type must be of type String.");
if(typeof listener != "function") throw Error("listener must be of type Function." + type);
for (var i=0, len=this.listeners.events_ar.length; i < len; i++){
if(this.listeners.events_ar[i].target === this
&& this.listeners.events_ar[i].type === type
&& this.listeners.events_ar[i].listener === listener
){
this.listeners.events_ar.splice(i,1);
break;
}
}
};
/* destroy */
this.destroy = function(){
this.listeners = null;
this.addListener = null;
this.dispatchEvent = null;
this.removeListener = null;
};
};
window.FWDSISCEventDispatcher = FWDSISCEventDispatcher;
}(window));/**
* Simple Image Slider Carousel PACKAGED v3.0
* Hider.
*
* @author Tibi - FWDesign [https://webdesign-flash.ro/]
* Copyright © 2006 All Rights Reserved.
*/
(function (window){
'use strict';
var FWDSISCHider = function(screenToTest, hideDelay){
var _s = this;
var prototype = FWDSISCHider.prototype;
_s.screenToTest = screenToTest;
_s.hideDelay = hideDelay;
_s.globalX = 0;
_s.globalY = 0;
_s.currentTime;
_s.checkIntervalId_int;
_s.hideCompleteId_to;
_s.hasInitialTestEvents_bl = false;
_s.addSecondTestEvents_bl = false;
_s.dispatchOnceShow_bl = true;
_s.dispatchOnceHide_bl = false;
_s.isStopped_bl = true;
_s.isHidden_bl = false;
_s.isMobile_bl = FWDSISCUtils.isMobile;
_s.hasPointerEvent_bl = FWDSISCUtils.hasPointerEvent;
_s.init = function(){};
_s.start = function(){
_s.currentTime = new Date().getTime();
clearInterval(_s.checkIntervalId_int);
_s.checkIntervalId_int = setInterval(_s.update, 100);
_s.addMouseOrTouchCheck();
_s.isStopped_bl = false;
};
_s.stop = function(){
clearInterval(_s.checkIntervalId_int);
_s.isStopped_bl = true;
_s.removeMouseOrTouchCheck();
_s.removeMouseOrTouchCheck2();
};
_s.addMouseOrTouchCheck = function(){
if(_s.hasInitialTestEvents_bl) return;
_s.hasInitialTestEvents_bl = true;
if(_s.isMobile_bl){
if(_s.hasPointerEvent_bl){
_s.screenToTest.screen.addEventListener("MSPointerDown", _s.onMouseOrTouchUpdate);
_s.screenToTest.screen.addEventListener("MSPointerMove", _s.onMouseOrTouchUpdate);
}else{
_s.screenToTest.screen.addEventListener("touchstart", _s.onMouseOrTouchUpdate);
}
}else if(window.addEventListener){
window.addEventListener("mousemove", _s.onMouseOrTouchUpdate);
window.addEventListener("scroll", _s.onMouseOrTouchUpdate);
}
};
_s.removeMouseOrTouchCheck = function(){
if(!_s.hasInitialTestEvents_bl) return;
_s.hasInitialTestEvents_bl = false;
if(_s.isMobile_bl){
if(_s.hasPointerEvent_bl){
_s.screenToTest.screen.removeEventListener("MSPointerDown", _s.onMouseOrTouchUpdate);
_s.screenToTest.screen.removeEventListener("MSPointerMove", _s.onMouseOrTouchUpdate);
}else{
_s.screenToTest.screen.removeEventListener("touchstart", _s.onMouseOrTouchUpdate);
}
}else if(window.removeEventListener){
window.removeEventListener("mousemove", _s.onMouseOrTouchUpdate);
}else if(document.detachEvent){
document.detachEvent("onmousemove", _s.onMouseOrTouchUpdate);
}
};
_s.addMouseOrTouchCheck2 = function(){
if(_s.addSecondTestEvents_bl) return;
_s.addSecondTestEvents_bl = true;
if(_s.screenToTest.screen.addEventListener){
_s.screenToTest.screen.addEventListener("mousemove", _s.secondTestMoveDummy);
}else if(_s.screenToTest.screen.attachEvent){
_s.screenToTest.screen.attachEvent("onmousemove", _s.secondTestMoveDummy);
}
};
_s.removeMouseOrTouchCheck2 = function(){
if(!_s.addSecondTestEvents_bl) return;
_s.addSecondTestEvents_bl = false;
if(_s.screenToTest.screen.removeEventListener){
_s.screenToTest.screen.removeEventListener("mousemove", _s.secondTestMoveDummy);
}else if(_s.screenToTest.screen.detachEvent){
_s.screenToTest.screen.detachEvent("onmousemove", _s.secondTestMoveDummy);
}
};
_s.secondTestMoveDummy = function(){
_s.removeMouseOrTouchCheck2();
_s.addMouseOrTouchCheck();
};
_s.onMouseOrTouchUpdate = function(e){
var viewportMouseCoordinates = FWDSISCUtils.getViewportMouseCoordinates(e);
if(_s.globalX != viewportMouseCoordinates.screenX
&& _s.globalY != viewportMouseCoordinates.screenY){
_s.currentTime = new Date().getTime();
}
_s.globalX = viewportMouseCoordinates.screenX;
_s.globalY = viewportMouseCoordinates.screenY;
if(!_s.isMobile_bl){
if(!FWDSISCUtils.hitTest(_s.screenToTest.screen, _s.globalX, _s.globalY)){
_s.removeMouseOrTouchCheck();
_s.addMouseOrTouchCheck2();
}
}
};
_s.update = function(e){
if(new Date().getTime() > _s.currentTime + _s.hideDelay){
if(_s.dispatchOnceShow_bl){
_s.dispatchOnceHide_bl = true;
_s.dispatchOnceShow_bl = false;
_s.isHidden_bl = true;
_s.dispatchEvent(FWDSISCHider.HIDE);
clearTimeout(_s.hideCompleteId_to);
_s.hideCompleteId_to = setTimeout(function(){
_s.dispatchEvent(FWDSISCHider.HIDE_COMPLETE);
}, 1000);
}
}else{
if(_s.dispatchOnceHide_bl){
clearTimeout(_s.hideCompleteId_to);
_s.dispatchOnceHide_bl = false;
_s.dispatchOnceShow_bl = true;
_s.isHidden_bl = false;
_s.dispatchEvent(FWDSISCHider.SHOW);
}
}
};
_s.reset = function(){
_s.isHidden_bl = false;
clearTimeout(_s.hideCompleteId_to);
_s.currentTime = new Date().getTime();
_s.dispatchEvent(FWDSISCHider.SHOW);
};
_s.init();
};
FWDSISCHider.HIDE = "hide";
FWDSISCHider.SHOW = "show";
FWDSISCHider.HIDE_COMPLETE = "hideComplete";
FWDSISCHider.setPrototype = function(){
FWDSISCHider.prototype = new FWDSISCEventDispatcher();
};
window.FWDSISCHider = FWDSISCHider;
}(window));/**
* Simple Image Slider Carousel PACKAGED v3.0
* Image manager.
*
* @author Tibi - FWDesign [https://webdesign-flash.ro/]
* Copyright © 2006 All Rights Reserved.
*/
(function (window){
'use strict';
var FWDSISCImageManager = function(prt, _d){
var _s = this;
var prototype = FWDSISCImageManager.prototype;
_s._d = _d;
_s.prt = prt;
_s._dc = document.documentElement;
_s.displayVertical_bl = _d.displayVertical_bl;
_s.imageBorderColor_str = _d.imageBorderColor_str;
_s.imageoverlayColor_str = _d.imageoverlayColor_str;
_s.imageBorderRadius = _d.imageBorderRadius;
_s.imageBorderSize = _d.imageBorderSize;
_s.imageBackgroundColor_str = _d.imageBackgroundColor_str;
_s.showHTMLTextContent_str = _d.showHTMLTextContent_str;
_s.HTMLTextPosition_str = _d.HTMLTextPosition_str;
_s.overlayColor_str = _d.overlayColor_str;
_s.showImageReflection_bl = _d.showImageReflection_bl;
_s.HTMLTextAlignment_str = _d.HTMLTextAlignment_str;
_s.zoomButtonOffset = _d.zoomButtonOffset;
_s.imageShowType = _d.imageShowType;
_s.maxZoom = _d.maxZoom;
_s.stageW = 0;
_s.stageH = 0;
_s.horizontalButtonsOffset = _d.nextAndPrevButtonsHorizontalButtonsOffset;
_s.verticalButtonsOffset = _d.nextAndPrevButtonsVerticalButtonsOffset;
_s.nextAndPrevButtonsPosition_str = _d.nextAndPrevButtonsPosition_str;
_s.maxImageHeight = _d.maxImageHeight;
_s.maxCenterImageHeight = _d.maxCenterImageHeight;
_s.spaceBetweenImages = _d.spaceBetweenImages;
_s.imageOverlayOpacity = prt.imageOverlayOpacity;
_s.lastPresedX = 0;
_s.totalImages = 0;
_s.countLoadedThumbs = 0;
_s.curId = _d.startAtImage;
_s.cntId = _d.startAtImage;
_s.friction = .9;
_s.vx = 0;
_s.vy = 0;
_s.prevId = -1;
_s.volume = _s.prevVolume = _d.volume;
_s.videoAutoPlay = _d.videoAutoPlay;
_s.nextVideoAutoPlay = _d.nextVideoAutoPlay;
_s.offsetWidth = _s.imageBorderSize ? 0 : 1;
if(_s.showImageReflection_bl){
_s.offsetWidth = 0;
if(_s.spaceBetweenImages == 0){
_s.offsetWidth = .5;
}
}
_s.defaulNrThumbsToDisplay = _d.defaulNrThumbsToDisplay;
_s.transitionDuration = _d.transitionDuration;
_s.defaultTransitionDuration = _s.transitionDuration;
_s.transitionType_str = _d.transitionType_str;
_s.defaultTransitionType = _d.transitionType_str;
_s.showInfoHolder_bl = _d.showInfoHolder;
_s.infoHolderHeight = _d.infoHolderHeight;
_s.infoHolderHorizontalOffset = _d.props.infoHolderHorizontalOffset;
_s.infoHolderVerticalOffset = _d.props.infoHolderVerticalOffset;
_s.infoHolderBackgroundColor = _d.props.infoHolderBackgroundColor;
_s.infoHolderStartHorizontalSpace = _d.infoHolderStartHorizontalSpace;
_s.infoHolderHorizontalSpaceBetweenItems = _d.infoHolderHorizontalSpaceBetweenItems;
_s.addDragSupport_bl = _d.addDragSupport_bl;
_s.howManyImagesToSkipOnNextAndPrevButtons = _d.howManyImagesToSkipOnNextAndPrevButtons;
_s.animationTextType_str = _d.animationTextType_str;
_s.showNextAndPrevButtons_bl = _d.showNextAndPrevButtons_bl;
_s.showimageOverlay_bl = prt.showimageOverlay_bl;
_s.isMobile_bl = FWDSISCUtils.isMobile;
_s.hasPointerEvent_bl =FWDSISCUtils.hasPointerEvent;
// Initialize.
_s.init = function(){
_s.setOverflow("visible");
_s._dc.addEventListener('touchstart', onClick, {passive: false});
_s._dc.addEventListener('mousedown', onClick);
function onClick(e){
_s.clicked = true;
_s._dc.removeEventListener('touchstart', onClick);
_s._dc.removeEventListener('click', onClick);
}
_s.mainHolder_do = new FWDSISCDisplayObject("div");
_s.mainHolder_do.setOverflow("visible");
_s.imageHolder_do = new FWDSISCDisplayObject("div");
_s.imageHolder_do.setOverflow("visible");
_s.mainHolder_do.addChild(_s.imageHolder_do);
_s.addChild(_s.mainHolder_do);
if(_s.addDragSupport_bl){
setTimeout(_s.addDragSupport, 200);
}
_s.setupLeftHolder();
_s.setupSlideshowPreloader();
if(_d.showCount_bl){
_s.setupCount();
_s.setCount(_s.cntId, prt.playlist_ar.length);
}
if(_s._d.showZoomButton_bl) _s.setupZoomButton();
if(_s._d.showFullSreenButton_bl) _s.setupFullScreenButton();
window.addEventListener("mousemove", function(e){
var wc = FWDSISCUtils.getViewportMouseCoordinates(e);
_s.dMouseX = wc.screenX;
_s.dMouseY = wc.screenY;
});
_s.resizeAndPosition();
if(!_s._d.maximizeOnSingleClick){
_s.addDoubleClickSupport();
}
};
// Add double click support max/min.
_s.addDoubleClickSupport = function(){
if(_s.isMobile_bl){
window.addEventListener("touchstart", _s.firstDown);
}else{
window.addEventListener("mousedown", _s.firstDown);
}
};
_s.removeDbl = function(){
if(_s.isMobile_bl){
window.removeEventListener("touchstart", _s.firstDown);
window.removeEventListener("touchstart", _s.onSecondDown);
}else{
window.removeEventListener("mousedown", _s.firstDown);
window.removeEventListener("mousedown", _s.onSecondDown);
}
clearTimeout(_s.secondTap_to);
};
_s.firstDown = function(e){
if(e.btn == 2 || !_s.centerImage) return;
var vc = FWDSISCUtils.getViewportMouseCoordinates(e);
_s.firstTapX = vc.screenX - prt.main_do.getGlobalX();
_s.firstTapY = vc.screenY - prt.main_do.getGlobalY();
if(_s.isMobile_bl){
window.addEventListener("touchstart", _s.onSecondDown);
window.removeEventListener("touchstart", _s.firstDown);
}else{
window.addEventListener("mousedown", _s.onSecondDown);
window.removeEventListener("mousedown", _s.firstDown);
}
clearTimeout(_s.secondTap_to);
_s.secondTap_to = setTimeout(_s.doubleTapExpired, 500);
};
_s.doubleTapExpired = function(){
clearTimeout(_s.secondTap_to);
if(_s.isMobile_bl){
window.removeEventListener("touchstart", _s.onSecondDown);
window.addEventListener("touchstart", _s.firstDown);
}else{
window.removeEventListener("mousedown", _s.onSecondDown);
window.addEventListener("mousedown", _s.firstDown);
}
};
_s.onSecondDown = function(e){
var vc = FWDSISCUtils.getViewportMouseCoordinates(e);
var dx;
var dy;
if(e.touches && e.touches.length != 1) return;
dx = Math.abs((vc.screenX - prt.main_do.getGlobalX()) - _s.firstTapX);
dy = Math.abs((vc.screenY - prt.main_do.getGlobalY()) - _s.firstTapY);
if(dx > 10 || dy > 10) return;
var vmc = FWDSISCUtils.getViewportMouseCoordinates(e);
if(FWDSISCUtils.hitTest(_s.centerImage.imageHolder_do.screen, vmc.screenX, vmc.screenY)){
_s.maximizeOrMinimize();
return;
}
};
// Setup left holder.
_s.setupLeftHolder = function(){
_s.info_ar = [];
_s.mainInfoHolder_do = new FWDSISCDisplayObject('div');
_s.mainInfoHolder_do.setOverflow('visible');
_s.mainInfoHolder_do.screen.className = 'fwdsisc-main-info-holder';
_s.mainInfoHolder_do.getStyle().cursor = 'auto';
_s.infoHolder_do = new FWDSISCDisplayObject('div');
_s.infoHolder_do.screen.className = 'fwdsisc-info-holder';
_s.infoHolder_do.getStyle().width = '100%';
_s.infoHolder_do.getStyle().height = '100%';
_s.infoHolder_do.setBkColor(_s.infoHolderBackgroundColor);
_s.mainInfoHolder_do.addChild(_s.infoHolder_do);
_s.mainHolder_do.addChild(_s.mainInfoHolder_do);
setTimeout(function(){
if(!_s.showInfoHolder_bl || !_s.info_ar.length) _s.mainInfoHolder_do.setVisible(false);
}, 200);
}
_s.resizeAndPositionInfoHolder = function(animate, addBack){
var vs = FWDSISCUtils.getViewportSize()
prt.globalX = prt.main_do.getGlobalX();
prt.globalY = prt.main_do.getGlobalY();
var zoomButtonX;
_s.totalInfoHolderWidth = _s.infoHolderStartHorizontalSpace * 2;
var item;
if(_s.isMaximized_bl){
zoomButtonX = _s.infoHolderStartHorizontalSpace;
for(var i=0; i<_s.info_ar.length; i++){
item = _s.info_ar[i];
if(item != _s.zoomButton_do) FWDAnimation.to(item, .8, {alpha:0});
}
}else{
for(var i=0; i<_s.info_ar.length; i++){
var itemX;
item = _s.info_ar[i];
_s.totalInfoHolderWidth += item.getWidth();
if(i != 0){
_s.totalInfoHolderWidth += _s.infoHolderHorizontalSpaceBetweenItems;
}
if(i == 0){
item.itemX = _s.infoHolderStartHorizontalSpace;
}else{
item.itemX = _s.info_ar[i - 1].itemX + _s.info_ar[i - 1].getWidth() + _s.infoHolderHorizontalSpaceBetweenItems;
}
if(item == _s.zoomButton_do){
zoomButtonX = item.itemX;
}
FWDAnimation.killTweensOf(item);
if(animate){
FWDAnimation.to(item, .8, {alpha:1, x:item.itemX, ease:Expo.easeInOut});
}else{
item.setX(item.itemX);
item.setAlpha(1);
}
item.setY(Math.round((_s.infoHolderHeight - item.getHeight())/2));
}
}
_s.infoHolderW = _s.totalInfoHolderWidth;
_s.infoHolderH = _s.infoHolderHeight;
_s.infoHolderX = _s.stageW - _s.infoHolderW - _s.infoHolderHorizontalOffset;
_s.infoHolderY = _s.stageH - _s.infoHolderHeight - _s.infoHolderVerticalOffset;
if(addBack){
_s.infoHolderX = Math.round(prt.globalX + _s.stageW - _s.infoHolderW - _s.infoHolderHorizontalOffset + prt.pageXOffset);
var offsetTop = parseInt(window.getComputedStyle(prt.main_do.screen)['padding-top']);
var offsetBottom = parseInt(window.getComputedStyle(prt.main_do.screen)['padding-bottom']);
_s.infoHolderY = Math.round(prt.globalY + _s.stageH - _s.infoHolderH - _s.infoHolderVerticalOffset + prt.pageYOffset + offsetBottom + offsetTop);
}else if(_s.isMaximized_bl){
_s.infoHolderW = Math.round((_s.infoHolderStartHorizontalSpace * 2) + _s.zoomButton_do.getWidth());
_s.infoHolderX = Math.round(vs.w - _s.infoHolderW - _s.infoHolderHorizontalOffset + prt.pageXOffset);
_s.infoHolderY = Math.round(prt.wsh - _s.infoHolderHeight - _s.infoHolderVerticalOffset + prt.pageYOffset);
}else{
_s.infoHolderX = Math.round(_s.stageW - _s.infoHolderW - _s.infoHolderHorizontalOffset);
var offsetBottom = parseInt(window.getComputedStyle(prt.main_do.screen)['padding-bottom']);
_s.infoHolderY = Math.round(_s.stageH - _s.infoHolderHeight - _s.infoHolderVerticalOffset + offsetBottom);
}
if(_s.displayVertical_bl && !_s.isMaximized_bl && _s.centerImage){
if(addBack){
_s.infoHolderX = Math.round(prt.globalX + _s.stageW - _s.infoHolderW - _s.infoHolderHorizontalOffset + prt.pageXOffset);
_s.infoHolderY = Math.round(prt.globalY + _s.centerImage.finalY + _s.centerImage.finalH - _s.infoHolderHeight - _s.infoHolderVerticalOffset + prt.pageYOffset);
}else{
_s.infoHolderX = Math.round(_s.stageW - _s.infoHolderW - _s.infoHolderHorizontalOffset);
_s.infoHolderY = Math.round(_s.centerImage.finalY + _s.centerImage.finalH - _s.infoHolderHeight - _s.infoHolderVerticalOffset);
}
}
if(_s.HTMLTextPosition_str == "outside" && !_s.isMaximized_bl){
_s.infoHolderY += _s.getTextHeight();
}
if(!_s.info_ar.length) _s.infoHolderW = 0;
FWDAnimation.killTweensOf(_s.mainInfoHolder_do);
if(animate){
FWDAnimation.to(_s.mainInfoHolder_do, .8, {x:_s.infoHolderX,
y:_s.infoHolderY,
w:_s.infoHolderW,
h:_s.infoHolderH,
ease:Expo.easeInOut});
if(_s.zoomButton_do){
FWDAnimation.killTweensOf(_s.zoomButton_do);
FWDAnimation.to(_s.zoomButton_do, .8, {x:zoomButtonX, alpha:1, ease:Expo.easeInOut});
}
}else{
_s.mainInfoHolder_do.setX(_s.infoHolderX);
_s.mainInfoHolder_do.setY(_s.infoHolderY);
_s.mainInfoHolder_do.setWidth(_s.infoHolderW);
_s.mainInfoHolder_do.setHeight(_s.infoHolderH);
}
if(!_s.hasZoomButton && _s.zoomButton_do && !_d.maximizeImageIfVideo){
FWDAnimation.killTweensOf(_s.zoomButton_do);
FWDAnimation.to(_s.zoomButton_do, .8, {alpha:0, ease:Expo.easeInOut});
}
}
// Setup zoom button.
_s.setupZoomButton = function(){
FWDSISCComplexButton.setPrototype();
_s.zoomButton_do = new FWDSISCComplexButton(
_s._d.nextButtonN_img,
_s._d.maximizeSPath_str,
_s._d.nextButtonN_img,
_s._d.minimizeSPath_str,
true,
prt.fontIcon + '-zoomin',
prt.fontIcon + '-zoomout',
'fwdsisc-button-normal',
'fwdsisc-button-selected');
_s.zoomButton_do.screen.className = 'fwdsisc-zoom-button';
_s.infoHolder_do.addChild(_s.zoomButton_do);
_s.zoomButton_do.addListener(FWDSISCComplexButton.MOUSE_UP, _s.maximizeOrMinimize);
_s.info_ar.push(_s.zoomButton_do);
}
_s.setCenterImage = function(e){
_s.ws = FWDSISCUtils.getViewportSize();
var so = FWDSISCUtils.getScrollOffsets();
for(var i=0; i<_s.totalImages; i++){
var image = _s.images_ar[i];
image.addListener(FWDSISCThumb.MOVE_VERTICAL, _s.setZoomButtonOnImageVertically);
}
}
_s.setZoomButtonOnImageVertically = function(e){
if(_s.isMaximized_bl || _s.isAnimMaximizeOrMinimize_bl) return;
if(_s.centerImage.id != e.id){
_s.curId = e.id;
if(_s.centerImage){
_s.centerImage.removeListener(FWDSISCThumb.DOUBLE_CLICK, _s.onThumbImageDoubleClick);
_s.centerImage.removeListener(FWDSISCThumb.MAXIMIZE_SINGLE_CLICK, _s.onThumbImageDoubleClick);
}
_s.centerImage = _s.images_ar[_s.curId];
_s.centerImage.addListener(FWDSISCThumb.DOUBLE_CLICK, _s.onThumbImageDoubleClick);
_s.centerImage.addListener(FWDSISCThumb.MAXIMIZE_SINGLE_CLICK, _s.onThumbImageDoubleClick);
_s.resizeAndPositionInfoHolder(true);
_s.setCount(_s.curId, _s.totalImages);
}
}
_s.addRemoveZoomBtn = function(animate){
if(!_s.zoomButton_do) return;
_s.type = _s.playlist_ar[_s.centerImage.finalId].type;
var add = true;
if(_s.type && !_d.maximizeImageIfVideo){
add = false;
}
if(add){
if(FWDSISCUtils.indexOfArray(_s.info_ar, _s.zoomButton_do) == -1){
if(FWDSISCUtils.indexOfArray(_s.info_ar, _s.cntHolder_do) != -1){
_s.info_ar.splice(FWDSISCUtils.indexOfArray(_s.info_ar, _s.cntHolder_do) + 1, 0, _s.zoomButton_do);
}else if(FWDSISCUtils.indexOfArray(_s.info_ar, _s.slideshowPreloader) != -1){
_s.info_ar.splice(FWDSISCUtils.indexOfArray(_s.info_ar, _s.slideshowPreloader) + 1, 0, _s.zoomButton_do);
}else{
_s.info_ar.splice(0, 0, _s.zoomButton_do);
}
_s.zoomButton_do.getStyle().pointerEvents = 'auto';
_s.zoomButton_do.setAlpha(0);
}
_s.hasZoomButton = true;
}else{
if(FWDSISCUtils.indexOfArray(_s.info_ar, _s.zoomButton_do) != -1){
_s.zoomButton_do.getStyle().pointerEvents = 'none';
_s.info_ar.splice(FWDSISCUtils.indexOfArray(_s.info_ar, _s.zoomButton_do), 1);
}
_s.hasZoomButton = false;
}
_s.resizeAndPositionInfoHolder(animate);
}
// Setup fullscreen button.
_s.setupFullScreenButton = function(){
FWDSISCComplexButton.setPrototype();
_s.fullScreenButton_do = new FWDSISCComplexButton(
_s._d.nextButtonN_img,
_s._d.maximizeSPath_str,
_s._d.nextButtonN_img,
_s._d.minimizeSPath_str,
true,
prt.fontIcon + '-gallery-fullscreen',
prt.fontIcon + '-gallery-normalscreen',
'fwdsisc-button-normal',
'fwdsisc-button-selected');
_s.fullScreenButton_do.screen.className = 'fwdsisc-fullscreen-button';
_s.fullScreenButton_do.setButtonState(1)
_s.infoHolder_do.addChild(_s.fullScreenButton_do);
_s.fullScreenButton_do.addListener(FWDSISCComplexButton.MOUSE_UP, _s.fullscreenHandler);
_s.info_ar.push(_s.fullScreenButton_do);
}
_s.fullscreenHandler = function(){
if(prt.isFullScreen_bl){
prt.goNormalScreen();
}else{
prt.goFullScreen();
}
}
// Setup count.
_s.setupCount = function(){
_s.cntHolder_do = new FWDSISCDisplayObject('div');
_s.cntHolder_do.screen.style.display = "inline-block";
_s.cntHolder_do.screen.className = 'fwdsisc-count-holder';
_s.cntHolder_do.getStyle().lineHeight = 0;
_s.isCntShowed_bl = true;
_s.cnt_do = new FWDSISCDisplayObject("div", 'relative');
_s.cnt_do.screen.style.display = "inline-block";
_s.cntHolder_do.addChild(_s.cnt_do);
_s.infoHolder_do.addChild(_s.cntHolder_do);
_s.info_ar.push(_s.cntHolder_do);
}
_s.setCount = function(current, total){
if(!_s.cnt_do) return;
current = current + 1;
var output = '<div class="fwdsisc-count">';
if(current < 10){
current = '<span class="fwdsisc-current">0' + current + '</span>';
}else{
current = '<span class="fwdsisc-current">' + current + '</span>';
}
if(total < 10) total = '0' + total;
output += current + '<span class="separator">/</span>' + total;
_s.cnt_do.setInnerHTML(output);
}
// Setup slideshow preloader.
_s.setupSlideshowPreloader = function(){
if(!_s._d.slideshowDelay) return;
if(_d.playlist_ar['playlistimages'].length <= 1) return;
FWDSISCSlideshowPreloader.setPrototype();
_s.slideshowPreloader = new FWDSISCSlideshowPreloader(
_s,
_s._d.slideshowPreloaderPosition,
_s._d.slideshowRadius,
_s._d.slideshowBackgroundColor,
_s._d.slideshowFillColor,
_s._d.slideshowStrokeSize,
_s._d.slideshowDelay);
_s.infoHolder_do.addChild(_s.slideshowPreloader);
_s.slideshowPreloader.show2(false);
FWDSISCTimerManager.setPrototype();
_s.tm = new FWDSISCTimerManager(_s._d.slideshowDelay * 1000);
_s.tm.addListener(FWDSISCTimerManager.START, _s.tmStartHandler);
_s.tm.addListener(FWDSISCTimerManager.STOP, _s.tmStopHandler);
_s.tm.addListener(FWDSISCTimerManager.TIME, _s.tmTimeHandler);
_s.info_ar.push(_s.slideshowPreloader);
}
_s.tmStopHandler = function(){
_s.slideshowPreloader.stopSlideshow(_s.transitionDuration, _s.transitionType);
}
_s.tmStartHandler = function(){
_s.slideshowPreloader.show2(true);
_s.slideshowPreloader.startSlideshow();
}
_s.tmTimeHandler = function(){
_s.transitionDuration = _s.defaultTransitionDuration;
_s.transitionType_str = _s.defaultTransitionType;
_s.nextButtonClickHandler();
}
// Position and resize.
_s.resizeAndPosition = function(){
_s.areButtonsPositioned_bl = false;
_s.stageW = prt.stageW;
_s.stageH = prt.stageH;
_s.mainHolder_do.setWidth(_s.stageW);
_s.mainHolder_do.setHeight(_s.stageH);
_s.positionImages(false);
_s.positionVideo();
_s.resizeMaximizedImage();
_s.resizeAndPositionInfoHolder();
clearTimeout(_s.maxId_to);
_s.maxId_to = setTimeout(_s.resizeMaximizedImage, 300);
};
// Create/destory image.
_s.setupImages = function(){
_s.areimageCreated_bl = true;
_s.areButtonsPositioned_bl = false;
_s.images_ar = [];
_s.originalImages_ar = [];
_s.playlist_ar = prt.playlist_ar;
_s.totalImages = _s.playlist_ar.length;
_s.nrThumbsToDisplay = _s.defaulNrThumbsToDisplay;
if(_s.nrThumbsToDisplay > (Math.floor((Math.floor(_s.totalImages - 1 / _s.nrThumbsToDisplay))/2))){
_s.nrThumbsToDisplay = (Math.floor((Math.floor(_s.totalImages - 1 / _s.nrThumbsToDisplay))/2));
}
if(_s.totalImages <3) _s.nrThumbsToDisplay = "all";
if(_s.curId > _s.totalImages-1) _s.curId = 0;
for(var i=0; i<_s.totalImages; i++){
var HTMLTextAlignment_str = _s.HTMLTextAlignment_str;
if(_s.playlist_ar[i].HTMLTextAlignment != undefined) HTMLTextAlignment_str = _s.playlist_ar[i].HTMLTextAlignment;
FWDSISCThumb.setPrototype();
var thumb = new FWDSISCThumb(
_s,
i,
_s.transitionDuration,
_s.transitionType_str,
_s.animationTextType_str,
_s.showHTMLTextContent_str,
_s.HTMLTextPosition_str,
HTMLTextAlignment_str,
_s.playlist_ar[i].source,
_s.playlist_ar[i].imageWidth,
_s.playlist_ar[i].imageHeight,
_s.imageBorderSize,
_s.imageBorderRadius,
_s.imageBackgroundColor_str,
_s.imageBorderColor_str,
_s.overlayColor_str,
_s.playlist_ar[i].description_ar,
_s.showImageReflection_bl,
_s.playlist_ar[i].link,
_s.playlist_ar[i].target,
_s._d.maximizeOnSingleClick
);
_s.originalImages_ar[i] = thumb;
_s.images_ar[i] = thumb;
_s.imageHolder_do.addChild(thumb);
thumb.addListener(FWDSISCThumb.CLICK, _s.onThumbImageClick);
}
if(_s.nrThumbsToDisplay != "all") _s.checkRightOrLeftSide();
_s.setAlpha(0);
FWDAnimation.to(_s, .8, {alpha:1, ease:Expo.easeOut});
_s.setTextType();
_s.hideButtons(false, true);
_s.hideInfoHolder(false)
setTimeout(function(){
_s.showButtons();
_s.showInfoHolder();
_s.setVideo();
_s.addRemoveZoomBtn(false);
_s.prevId = _s.curId;
}, 600);
_s.resizeAndPosition();
setTimeout(function(){
_s.resizeAndPositionInfoHolder();
}, 300)
_s.loadImagecenterId = _s.curId;
_s.loadImageRightId = _s.curId + 1;
_s.loadImageleftId = _s.curId - 1;
_s.loadImageCenter();
if(_s.displayVertical_bl) _s.setCenterImage();
_s.centerImage = _s.images_ar[_s.curId];
};
_s.setTextType = function(textType){
_s.animationTextType_str = textType;
for(var i=0; i<_s.totalImages; i++){
_s.images_ar[i].animationTextType_str = _s.animationTextType_str;
}
}
_s.onThumbImageClick = function(e){
if(_s.isMaximized_bl || _s.isAnimMaximizeOrMinimize_bl || _s.isEvpFS || _s.isLoading) return;
if(_s.curId != e.id){
_s.transitionDuration = _s.defaultTransitionDuration;
_s.transitionType_str = _s.defaultTransitionType;
_s.goToImage(e.id);
}
};
_s.onThumbImageDoubleClick = function(e){
if(_s.playBtnDO){
var vmc = FWDSISCUtils.getViewportMouseCoordinates(e.e);
if(FWDSISCUtils.hitTest(_s.playBtnDO.screen, vmc.screenX, vmc.screenY)){
return;
}
}
_s.maximizeOrMinimize();
}
_s.goToImage = function(id){
_s.wasDragged = false;
_s.cntId += id - _s.curId;
if(_s.cntId < 0){
_s.cntId = _s.totalImages - 1;
}else if(_s.cntId > _s.totalImages - 1){
_s.cntId = 0;
}
_s.curId = id;
if(_s.curId != _d.startAtImage){
_s.transitionedOnce = true;
}
clearTimeout(_s.playDondeId_to);
_s.setCount(_s.cntId, _s.totalImages);
if(_s.nrThumbsToDisplay == "all"){
_s.positionImages(true);
}else{
_s.checkRightOrLeftSide(true);
}
clearTimeout(_s.transitionDone_to);
_s.transitionDone_to = setTimeout(function(){
if(_s.tm) _s.tm.start();
_s.checkIfThumbsHit();
_s.setVideo();
}, _s.transitionDuration * 1000);
_s.prevId = _s.curId;
prt.info_do.closeWindow();
_s.stopToLoadThumbanils();
_s.loadImageRightId = _s.curId + 1;
_s.loadImageleftId = _s.curId;
_s.loadImageleft();
_s.loadImageRight();
_s.positionVideo(false, false, true);
_s.addRemoveZoomBtn(true);
if(_d.maxImageHeight != _d.maxCenterImageHeight && _s.playBtnHldDO){
_s.playBtnHldDO.setX(-5000)
}
if(_s.prevCenterImage){
if(_s.prevCenterImage.finalId != _s.centerImage.finalId){
if(_s.tm) _s.tm.stop();
}
}else{
if(_s.tm) _s.tm.stop();
}
_s.prevCenterImage = _s.centerImage;
}
// Setup video.
_s.setupVideo = function(){
if(!_d.useVideo) return;
_s.vidHld_do = new FWDSISCDisplayObject("div");
_s.vidHld_do.screen.setAttribute('id', prt.instName + '_evp_div')
_s.vidHld_do.setWidth(10);
_s.vidHld_do.setHeight(10);
_s.addChild(_s.vidHld_do);
_s.playBtnHldDO = new FWDSISCDisplayObject('div');
FWDSISCSimpleButton.setPrototype(true);
_s.playBtnDO = new FWDSISCSimpleButton(_s, _d.nextButtonN_img, _d.nextButtonS_str, undefined,
undefined,
undefined,
undefined,
undefined,
'<div class="table-plugin-fwdsisc-button"><span class="table-cell-fwdsisc-plugin-button ' + prt.fontIcon + '-play' + '"></span></div>',
'EVPLargePlayButtonNormalState',
'EVPLargePlayButtonSelectedState');
_s.playBtnHldDO.addChild(_s.playBtnDO);
_s.playBtnHldDO.setOverflow('visible');
_s.centerImage.addChild(_s.playBtnHldDO, _s.centerImage);
_s.playBtnDO.hide2();
_s.playBtnDO.addListener(FWDSISCSimpleButton.MOUSE_UP, _s.playBtnOnClick);
}
_s.hidePlayButton = function(d){
if(_s.playBtnDO) _s.playBtnDO.hide2(d);
}
_s.playBtnOnClick = function(){
if(_s.checkIfThubsTween()) return;
_s.videoStarted = true;
_s.positionVideo();
_s.evp.largePlayButtonUpHandler();
}
_s.positionVideo = function(hide, drag, anim, setVideoSize){
if(!_d.useVideo || !_s.vidHld_do) return;
if(!_s.videoSrc || hide){
_s.playBtnHldDO.setX(-5000);
_s.vidHld_do.setX(-6000);
return;
}
_s.vidHld_do.getStyle().left = 0;
FWDAnimation.killTweensOf(_s.vidHld_do);
if(setVideoSize){
_s.vidHld_do.setWidth(_s.centerImage.finalW + _s.centerImage.offsetWidth - _s.centerImage.borderSize * 2 + 2);
_s.vidHld_do.setHeight(_s.centerImage.finalH - _s.centerImage.borderSize * 2);
}
if(_s.videoStarted && !_s.isEvpFS){
var playerX = _s.centerImage.finalX + _s.centerImage.borderSize;
var playerY = _s.centerImage.finalY + _s.centerImage.borderSize;
if(drag){
playerX = _s.imageHolder_do.x + _s.centerImage.x + _s.centerImage.borderSize;
playerY = _s.centerImage.y + _s.centerImage.borderSize;
}
if(anim){
var opacity = 0;
if(_s.videoId == _s.centerImage.finalId){
opacity = 1;
}
if(opacity == 0){
_s.evpTweening = true;
_s.prevVolume = _s.volume;
FWDAnimation.to(_s.vidHld_do, _s.transitionDuration, {x:_s.prevCenterImage.finalX + _s.prevCenterImage.borderSize, alpha:0, onComplete:function(){_s.evpTweening = false}, ease:_s.transitionType_str});
FWDAnimation.to(_s.evp, _s.transitionDuration, {volume:0, onUpdate:function(){
_s.evp.setVolume(_s.evp.volume);
}, ease:_s.transitionType_str});
}else{
FWDAnimation.to(_s.vidHld_do, _s.transitionDuration, {x:_s.prevCenterImage.finalX + _s.prevCenterImage.borderSize, ease:_s.transitionType_str});
}
}else{
var offest = 0;
var gap = 0;
if(_s.spaceBetweenImages == 0){
offest = 2;
gap = 1;
}
if(!drag){
_s.vidHld_do.setWidth(_s.centerImage.finalW + _s.centerImage.offsetWidth - _s.centerImage.borderSize * 2 + offest);
_s.vidHld_do.setHeight(_s.centerImage.finalH - _s.centerImage.borderSize * 2);
_s.evp.resizeHandler();
}
_s.vidHld_do.setX(playerX - gap);
_s.vidHld_do.setY(playerY + prt.offsetParalaxPos);
}
}else if(!_s.isEvpFS){
_s.vidHld_do.setX(-5000);
}
var playBtnX = Math.round((_s.playBtnHldDO.parent.finalW - _s.playBtnDO.w)/2);
var playBtnY = Math.round((_s.playBtnHldDO.parent.finalH - _s.playBtnDO.h)/2);
if(_s.isEvpFS){
_s.playBtnHldDO.setX(Math.round((prt.ws.w - _s.playBtnDO.w)/2));
_s.playBtnHldDO.setY(Math.round((prt.ws.h - _s.playBtnDO.w)/2));
}else{
var opacity = 0;
if(_s.videoId == _s.centerImage.finalId){
opacity = 1;
}
_s.playBtnHldDO.setX(playBtnX);
_s.playBtnHldDO.setY(playBtnY);
if(anim){
if(opacity == 0){
FWDAnimation.to(_s.playBtnHldDO, _s.transitionDuration, {alpha:0, ease:Quint.easeOut});
}
}
}
}
_s.setVideo = function(){
if(!_d.useVideo){
if(_s.playlist_ar[_s.curId]){
_s.videoSrc = _s.playlist_ar[_s.centerImage.finalId].videoSrc;
}
if(_s.videoSrc){
_s.dispatchEvent(FWDSISC.ERROR, {text : 'Please set use video to yes.'});
}
return;
}
FWDAnimation.killTweensOf(_s.playBtnHldDO);
_s.evpTweening = false;
if(_s.playBtnDO.isShowed_bl && _s.playBtnHldDO.alpha < 1){
_s.playBtnDO.hide2();
_s.playBtnDO.show2(.2);
}
_s.playBtnHldDO.setAlpha(1);
_s.vidHld_do.setAlpha(1);
if(_s.videoId == _s.centerImage.finalId){
_s.curCenterImage = _s.centerImage;
return;
}
_s.centerImage.addChild(_s.playBtnHldDO, _s.centerImage);
_s.prevCenterImage = _s.centerImage;
_s.curCenterImage = null;
_s.hideVideo();
if(_s.evp) _s.evp.stop();
_s.positionVideo(false, false, false, true);
_s.curItemData = _s.playlist_ar[_s.centerImage.finalId];
_s.password = _s.curItemData.password;
_s.subtitleSrc = _s.curItemData.subtitleSrc;
_s.thumbPreviewSrc = _s.curItemData.thumbPreviewSrc;
_s.thumbVastSrc = _s.curItemData.thumbVastSrc;
_s.is360 = _s.curItemData.is360;
_s.show360DegreeVideoVrButton = _s.curItemData.show360DegreeVideoVrButton;
_s.updateVideoTo = setTimeout(function(){
_s.updateVideo();
}, 100);
_s.videoId = _s.centerImage.finalId;
}
_s.hideVideo = function(){
prt.preloader_do.hide(true);
_s.videoStarted = false;
if(_s.playlist_ar[_s.curId]){
_s.videoSrc = _s.playlist_ar[_s.centerImage.finalId].videoSrc;
}
if(!_s.playlist_ar[_s.curId] || !_d.useVideo){
return;
}
clearTimeout(_s.updateVideoTo);
_s.hidePassWindow();
_s.hidePlayButton(true);
_s.hieVideoOnFrstTween = false;
_s.type = _s.playlist_ar[_s.centerImage.finalId].type;
if(_s.evp){
_s.evp.notShowPlayBtnExternal = true;
_s.evp._d.autoPlay_bl = false;
_s.evp.pause();
if(!_s.videoSrc) _s.evp.goNormalScreen();
}
_s.positionVideo(true);
}
_s.updateVideo = function(){
if(!_d.useVideo && _s.videoSrc){
var error = 'Please set use video to yes to play video/audio.';
_s.dispatchEvent(FWDSISC.ERROR, {text:error});
return;
}
if(!_d.useVideo || !_s.videoSrc) return;
_s.curVidId = _s.curId;
var pushBtns = -2;
var startSpaceBetweenButtons = 10;
var spaceBetweenButtons = 6;
var volumeScrubberOffsetRightWidth = 6;
if(window['is_ACORA']){
pushBtns = 0;
startSpaceBetweenButtons = 16;
spaceBetweenButtons = 14;
volumeScrubberOffsetRightWidth = 2;
}
if(!_s.evpInst){
_s.isLoading = true;
_s.evpInst = true;
FWDEVPUtils.hasTransform3d = FWDSISCUtils.hasTransform3d;
FWDEVPUtils.hasTransform2d = FWDSISCUtils.hasTransform2d;
var src = {source:_s.videoSrc, label:""}
var isPrivate = _s.password ? 'yes' : 'no';
src.isPrivate = isPrivate;
var videoType = '';
if(_s.is360){
src.videoType ='360DegreeVideo';
src.rotationY360DegreeVideo = _s._d.rotationY360DegreeVideo;
}
new FWDEVPlayer({
// Main settings.
instanceName:prt.instName + '_evp',
parentId:prt.instName + '_evp_div',
fontIcon:prt.fontIcon,
mainFolderPath:_s._d.mainFolderPath + 'evp/',
skinPath:'skin',
displayType:'afterparent',
playsinline:'yes',
fillEntireVideoScreen:_d.fillEntireVideoScreen ? 'yes' : 'no',
useVectorIcons:'yes',
privateVideoPassword:_s.password,
preloaderBackgroundColor: _d.preloaderBackgroundColor,
preloaderFillColor: _d.preloaderFillColor,
startAtVideoSource:0,
videoSource:[src],
showErrorInfo:'no',
addKeyboardSupport:_d.addKeyboardSupport_bl ? 'yes' : 'no',
autoPlay:_s.videoAutoPlay ? 'yes' : 'no',
autoPlayText:_d.videoAutoPlayText,
volume:_s.volume,
backgroundColor:'#000000',
// Logo.
showLogo:_d.showLogo ? 'yes' : 'no',
logoPath:_d.logoPath,
hideLogoWithController:'yes',
logoPosition:'topRight',
logoLink:_d.logoLink,
logoMargins:5,
// Controller.
pushBtns:pushBtns,
showControllerWhenVideoIsStopped:'no',
showDefaultControllerForVimeo:_d.showDefaultControllerForVimeo ? 'yes' : 'no',
showScrubberWhenControllerIsHidden:_d.showScrubberWhenControllerIsHidden ? 'yes' : 'no',
showVolumeButton:_d.showVolumeButton ? 'yes' : 'no',
showVolumeScrubber:_d.showVolumeButton ? 'yes' : 'no',
showTime:_d.showTime ? 'yes' : 'no',
showRewindButton:_d.showRewindButton ? 'yes' : 'no',
showShareButton:"no",
showEmbedButton:"no",
showQualityButton:_d.showQualityButton ? 'yes' : 'no',
showChromecastButton:_d.showChromecastButton ? 'yes' : 'no',
showFullScreenButton:_d.videoShowFullScreenButton_bl ? 'yes' : 'no',
showMainScrubberToolTipLabel:_d.showScrubberToolTipLabel ? 'yes' : 'no',
show360DegreeVideoVrButton:_s.show360DegreeVideoVrButton ? 'yes' : 'no',
rotationY360DegreeVideo:_s._d.rotationY360DegreeVideo,
controllerHeight:42,
controllerHideDelay:3,
startSpaceBetweenButtons:startSpaceBetweenButtons,
spaceBetweenButtons:spaceBetweenButtons,
mainScrubberOffestTop:13,
scrubbersOffsetWidth:3,
timeOffsetLeftWidth:3,
timeOffsetRightWidth:5,
volumeScrubberWidth:70,
volumeScrubberOffsetRightWidth:volumeScrubberOffsetRightWidth,
timeColor:_d.timeColor,
youtubeQualityButtonNormalColor:_d.youtubeQualityButtonNormalColor,
youtubeQualityButtonSelectedColor:_d.youtubeQualityButtonSelectedColor,
scrubbersToolTipLabelBackgroundColor:_d.scrubbersToolTipLabelBackgroundColor,
scrubbersToolTipLabelFontColor:_d.scrubbersToolTipLabelFontColor,
// Subtitles.
showSubtitleButton:'no',
startAtSubtitle:1,
subtitlesSource:[{subtitlePath:_s.subtitleSrc, subtileLabel:"test"}],
// Playback rate/speed.
showPlaybackRateButton:_d.showPlaybackRateButton ? 'yes' : 'no',
defaultPlaybackRate:'1', //0.25, 0.5, 1, 1.25, 1.5, 2
// Audio visualizer
audioVisualizerLinesColor:_d.audioVisualizerLinesColor,
audioVisualizerCircleColor:_d.audioVisualizerCircleColor,
// Thumbnails preview.
thumbnailsPreview:'auto',
thumbnailsPreviewWidth:_d.thumbnailsPreviewWidth,
thumbnailsPreviewBackgroundColor:_d.thumbnailsPreviewBackgroundColor,
thumbnailsPreviewBorderColor:_d.thumbnailsPreviewBorderColor,
thumbnailsPreviewLabelBackgroundColor:_d.thumbnailsPreviewLabelBackgroundColor,
thumbnailsPreviewLabelFontColor:_d.thumbnailsPreviewLabelFontColor,
// Ads.
vastSource:_s.thumbVastSrc,
openNewPageAtTheEndOfTheAds:'no',
adsButtonsPosition:'right',
skipToVideoText:_d.skipToVideoText,
skipToVideoButtonText:_d.skipToVideoButtonText,
adsTextNormalColor:'#B9B9B9',
adsTextSelectedColor:'#FFFFFF',
adsBorderNormalColor:'#2e2e2e',
adsBorderSelectedColor:'#FFFFFF',
// Context menu.
contextMenuType:'disabled',
// Password window.
embedWindowCloseButtonMargins:15,
borderColor:"#333333",
mainLabelsColor:"#FFFFFF",
secondaryLabelsColor:"#a1a1a1",
shareAndEmbedTextColor:"#5a5a5a",
inputBackgroundColor:"#000000",
inputColor:"#FFFFFF"
});
setTimeout(function(){
_s.evp._d.thumbnailsPreview = _s.thumbPreviewSrc;
}, 200);
// Register API.
var api_it;
registerAPI();
function registerAPI(){
clearTimeout(api_it);
_s.evp = window[prt.instName + '_evp'];
if(_s.evp){
_s.evp.addListener(FWDEVPlayer.READY, _s.evpReady);
_s.evp.addListener(FWDEVPlayer.FRAMEWORK_LOAD, _s.evpFrLoad);
_s.evp.addListener(FWDEVPlayer.FRAMEWORK_DONE, _s.evpFrDone);
_s.evp.addListener(FWDEVPlayer.SHOW_PLAY_BUTTON, _s.showLargePlayButton);
_s.evp.addListener(FWDEVPlayer.HIDE_PLAY_BUTTON, _s.hideLargePlayButton);
_s.evp.addListener(FWDEVPlayer.ERROR, _s.evpError);
_s.evp.addListener(FWDEVPlayer.HIDER_SHOW, _s.evpShowCursor);
_s.evp.addListener(FWDEVPlayer.SHOW_CURSOR, _s.evpShowCursor);
_s.evp.addListener(FWDEVPlayer.VOLUME_SET, _s.evpVolume);
_s.evp.addListener(FWDEVPlayer.STOP, _s.evpStop);
_s.evp.addListener(FWDEVPlayer.PAUSE, _s.evpPause);
_s.evp.addListener(FWDEVPlayer.PLAY, _s.evpPlay);
_s.evp.addListener(FWDEVPlayer.PLAY_START, _s.evpPlayStart);
_s.evp.addListener(FWDEVPlayer.PLAY_COMPLETE, _s.evpPlayComplete);
_s.evp.addListener(FWDEVPlayer.UPDATE, _s.evpUpdate);
_s.evp.addListener(FWDEVPlayer.GO_FULLSCREEN, _s.evpFS);
_s.evp.addListener(FWDEVPlayer.GO_NORMALSCREEN, _s.evpNS);
}else{
api_it = clearTimeout(api_it, 50);
}
};
}else{
_s.volume = _s.prevVolume;
_s.evp.notShowPlayBtnExternal = false;
_s.evp.controller_do.hide(false, true);
_s.evp.prevVideoSource_str = '';
if(_d.addKeyboardSupport_bl){
_s.evp.addKeyboardSupport();
}else{
_s.evp.removeKeyboardSupport();
}
_s.evp._d.show360DegreeVideoVrButton_bl = _s.show360DegreeVideoVrButton;
_s.evp._d.autoPlay_bl = _s.videoAutoPlay || _s.nextVideoAutoPlay;
if(_s.clicked && !_s.nextVideoAutoPlay){
_s.evp._d.autoPlay_bl = false;
}
// Set subtitle.
_s.evp._d.subtitles_ar[0]["source"] = _s.subtitleSrc;
_s.evp._d.thumbnailsPreview = _s.thumbPreviewSrc || undefined;
_s.evp.setVolume(_s.volume);
// Video type.
var videoType = '';
if(_s.is360){
videoType ='360DegreeVideo';
}
// Set source.
_s.evp._d.privateVideoPassword_str = _s.password;
_s.evp.setVideoSource(_s.videoSrc, '', videoType, '', _s.thumbVastSrc, Boolean(_s.password), _s._d.rotationY360DegreeVideo);
if(_s.nextVideoAutoPlay){
_s.playAudio();
if(_s.type != FWDSISC.AUDIO){
if(_s.tm) _s.tm.pause();
_s.videoStarted = true;
}
}
}
}
_s.evpReady = function(){
_s.isLoading = false;
}
_s.evpFrLoad = function(){
prt.preloader_do.show(true);
prt.preloader_do.positionAndResize();
_s.isLoading = true;
}
_s.evpFrDone = function(){
_s.isLoading = false;
}
_s.hidePassWindow = function(){
if(_s.evp && _s.evp.passWindow_do){
_s.evp.passWindow_do.hide(true);
}
}
_s.showLargePlayButton = function(){
prt.preloader_do.hide(true);
clearTimeout(_s.sh_to);
_s.sh_to = setTimeout(function(){
if(!_s.videoStarted){
_s.playBtnDO.show2(.15);
}else{
_s.playBtnDO.show2();
}
}, 10);
}
_s.evpError = function(e){
_s.isLoading = false;
prt.preloader_do.hide(true);
_s.dispatchEvent(FWDSISC.ERROR, {text:e.error});
}
_s.hideLargePlayButton = function(){
clearTimeout(_s.sh_to);
_s.sh_to = setTimeout(function(){
_s.hidePlayButton(true);
}, 10);
}
_s.evpShowCursor = function(){
_s.updateEVPCursor();
}
_s.evpStop = function(){
_s.videoStarted = false;
if(_s.zoomButton_do){
_s.zoomButton_do.enable();
}
_s.positionVideo();
if(_s.playBtnDO && _s.playBtnDO.isShowed_bl){
_s.playBtnDO.show2(.2);
}
}
_s.evpPlayComplete = function(){
_s.videoStarted = false;
_s.evp.goNormalScreen();
if(_s.nextVideoAutoPlay || _s.tm){
var id = _s.curId;
if (id < _s.totalImages-1){
id += _s.howManyImagesToSkipOnNextAndPrevButtons;
if(id > _s.totalImages - 1 && _s.defaulNrThumbsToDisplay == "all") id = 0;
}else{
id = 0;
}
var type = _s.playlist_ar[_s.curId].type;
if(type == FWDSISC.VIDEO
|| type == FWDSISC.YOUTUBE
|| type == FWDSISC.VIMEO
|| type == FWDSISC.AUDIO
|| _s.tm){
_s.slideshowPreloader.stopSlideshow(_s.transitionDuration, _s.transitionType);
_s.playDondeId_to = setTimeout(function(){
_s.goToImage(id)
}, _s.transitionDuration * 1000);
}
}
if(_s.HTMLTextPosition_str == 'inside'){
_s.centerImage.isTextContentShowed_bl = false;
_s.transitionDuration = .8;
_s.transitionType_str = 'Expo.easeInOut';
_s.wasMaximized = true;
_s.centerImage.animateTextContent(true, true);
_s.wasMaximized = false;
}
}
_s.evpPause = function(){
_s.evp.showLargePlayButton(0);
}
_s.evpPlayStart = function(){
if(_s.tm) _s.tm.pause();
prt.preloader_do.hide(true);
_s.evp.notShowLargePlayButton_bl = false;
_s.videoStarted = true;
_s.positionVideo();
}
_s.playAudio = function(){
if(_s.evp && _s.type == FWDSISC.AUDIO && _s.clicked){
if(FWDSISCUtils.isIOS && !_s.audioPlayed) return;
_s.tm.pause();
_s.evp.play();
_s.positionVideo();
_s.videoStarted = true;
}
}
_s.evpVolume = function(e){
if(!_s.evp._d.autoPlay_bl){
_s.volume = e.volume;
if(_s.type == FWDSISC.YOUTUBE){
_s.youtubePlayed = true;
}else if(_s.type == FWDSISC.VIDEO){
_s.videoPlayed = true;
}else if(_s.type == FWDSISC.AUDIO){
_s.audioPlayed = true;
}
}
}
_s.evpPlay = function(){
if(_s.zoomButton_do && _d.maximizeImageIfVideo) _s.zoomButton_do.disable();
if(_s.isAnim){
_s.evp.pause();
return;
}
if(_s.clicked){
if((FWDSISCUtils.isMAC && (_s.type == FWDSISC.VIDEO && !_s.videoPlayed))){
// Do not change volume, MAC dose not allow it unless the media has played once / THANK YOU APPLE!!!
_s.evp.setupAPT();
}else if((FWDSISCUtils.isIOS
&& (_s.type == FWDSISC.VIDEO && !_s.videoPlayed
|| _s.type == FWDSISC.VIMEO && !_s.vimeoPlayed
|| _s.type == FWDSISC.YOUTUBE && !_s.youtubePlayed))
|| (_s.isMobile_bl && !_s.videoPlayed)
){
// Do not change volume, IOS dose not allow it unless the media has played once / THANK YOU APPLE!!!
_s.evp.setupAPT();
}else{
setTimeout(function(){
_s.evp.setVolume(_s.volume, true);
}, 10);
}
}
if(!FWDSISCUtils.isIOS){
_s.audioPlayed = true;
_s.videoPlayed = true;
}
_s.videoStarted = true;
_s.positionVideo();
};
_s.evpUpdate = function(e){
if(_s.videoStarted){
if(_s.slideshowPreloader && !_s.checkIfThubsTween() && !_s.isDragging_bl){
_s.slideshowPreloader.killTween();
_s.slideshowPreloader.drawFill(e.percent);
}
}
}
_s.evpFS = function(){
_s.vidHld_do.getStyle().transform = 'none';
_s.prt.main_do.getStyle().overflow = 'visible';
prt.main_do.screen.className = prt.main_do.screen.className + ' fwdsisc-clear-padding';
_s.so = FWDSISCUtils.getScrollOffsets();
_s.fsX = _s.so.x;
_s.fsY = _s.so.y;
_s.isEvpFS = _s.isEvpFSDL = _s.isFullScreen = _s.evp.isFullScreen_bl;
if(_s.tm) _s.tm.pause();
_s.updateEVPCursor();
prt.dispatchEvent(FWDSISC.GO_FULL_SCREEN);
};
_s.updateEVPCursor = function(c){
if(_s.evp){
if(_s.addDragSupport_bl && !_s.isEvpFS && !_s.evp.isFullScreen_bl){
if(!c) c = 'grab';
if(_s.evp.dClk_do) _s.evp.dClk_do.style().cursor = c;
}else{
if(_s.evp.dClk_do && !_s.is360) _s.evp.dClk_do.style().cursor = 'default';
}
}
}
_s.evpNS = function(e){
_s.so = FWDSISCUtils.getScrollOffsets();
_s.prt.main_do.getStyle().overflow = 'hidden';
prt.main_do.screen.className = prt.className;
if(prt.fontIcon == 'fwdicon'){
prt.main_do.screen.className = prt.className + ' fwd-reveal-opacity fwdsisc-clear-padding';
}
_s.isEvpFS = _s.evp.isFullScreen_bl;
if(e){
setTimeout(function(){
_s.isEvpFSDL = _s.evp.isFullScreen_bl;
}, 200);
}
if(prt.isFullScreen_bl){
prt.goFullScreen();
}
_s.updateEVPCursor();
_s.resizeAndPosition();
prt.dispatchEvent(FWDSISC.GO_NORMAL_SCREEN);
}
// Disable scroll and touch events for the main browser scrollbar.
_s.addPreventMouseWheel = function(){
window.addEventListener ("mousewheel", _s.mouseDummyHandler, {passive:false});
window.addEventListener('DOMMouseScroll', _s.mouseDummyHandler, {passive:false});
};
_s.removePreventMouseWheel = function(){
window.removeEventListener ("mousewheel", _s.mouseDummyHandler);
window.removeEventListener('DOMMouseScroll', _s.mouseDummyHandler);
};
_s.mouseDummyHandler = function(e){
if(e.preventDefault){
e.preventDefault();
}else{
return false;
}
};
_s.maximizeOrMinimize = function(e){
if( !_s._d.showZoomButton_bl || _s.checkIfThubsTween() || _s.videoStarted) return;
if(_s.type && !_d.maximizeImageIfVideo){
return;
}
var scaleX;
var scaleY;
var finalX;
var finalY;
var finalW;
var finalH;
var totalScale;
var curImageHolder_do = _s.centerImage.imageHolder_do;
_s.curImage_do = _s.centerImage.image_do;
_s.ws = FWDSISCUtils.getViewportSize();
var so = FWDSISCUtils.getScrollOffsets();
_s.isAnimMaximizeOrMinimize_bl = true;
clearTimeout(_s.maximizeCompleteTimeOutId_to);
clearTimeout(_s.minimizeCompleteTimeOutId_to);
if(_s.isMaximized_bl){
_s.isMaximized_bl = false;
_s.showButtons(true);
_s.removePreventMouseWheel();
window.addEventListener("scroll", _s.positionMaximizedImage);
window.addEventListener('mousewheel', _s.dummyMouseWheel);
if(_s.playBtnDO) _s.playBtnDO.setX(0);
if(!_s.displayVertical_bl){
prt.main_do.screen.style.cursor = "grab";
_s.screen.style.cursor = "grab";
}
_s.removeMaxItemScroll();
_s.zoomButton_do.setButtonState(1);
FWDAnimation.to(curImageHolder_do, .8, {x:_s.centerImage.getGlobalX() + so.x + _s.centerImage.borderSize,
y:_s.centerImage.getGlobalY() + so.y + _s.centerImage.borderSize,
w:_s.centerImage.finalW - _s.centerImage.borderSize * 2,
h:_s.centerImage.finalH - _s.centerImage.borderSize * 2,
ease:Expo.easeInOut});
if(_d.maxImageHeight == 'fullscreen' || _s.centerImage.fullScreen){
FWDAnimation.to(_s.curImage_do, .8, {x:Math.round((_s.stageW - _s.centerImage.imageFinalW)/2),
y:Math.round((_s.stageH - _s.centerImage.imageFinalH)/2),
w:_s.centerImage.imageFinalW - _s.centerImage.borderSize * 2,
h:_s.centerImage.imageFinalH - _s.centerImage.borderSize * 2,
ease:Expo.easeInOut});
}else{
FWDAnimation.to(_s.curImage_do, .8, {x:-_s.offsetWidth,
y:0,
w:_s.centerImage.finalW - _s.centerImage.borderSize * 2 + _s.offsetWidth * 2,
h:_s.centerImage.finalH - _s.centerImage.borderSize * 2,
ease:Expo.easeInOut});
}
_s.resizeAndPositionInfoHolder(true, true);
window.removeEventListener("scroll", _s.positionMaximizedImage);
_s.minimizeCompleteTimeOutId_to = setTimeout(_s.minimizeCompleteHandler, 900);
}else{
_s.hideButtons(true, true);
_s.centerImage.imageHolder_do.setOverflow('hidden');
_s.lastScrolledX = so.x;
_s.lastScrolledY = so.y;
_s.addPreventMouseWheel();
if(_s.playBtnDO) _s.playBtnDO.setX(-50000);
_s.isMaximized_bl = true;
_s.zoomButton_do.setButtonState(0);
if(_s.tm){
_s.transitionDuration = .8;
_s.transitionType_str = 'Expo.easeInOut';
_s.tm.stop();
}
setTimeout(function(){
if(_s.tm){
_s.tm.stop();
}
}, 500)
if(!prt.isFullScreen_bl){
_s.setMaximizedImageOnFullscreen();
}else{
if(_s.centerImage.contains(curImageHolder_do)){
_s.centerImage.removeChild(curImageHolder_do);
}
curImageHolder_do.setX(_s.centerImage.finalX + _s.imageBorderSize);
curImageHolder_do.setY(_s.centerImage.finalY + _s.imageBorderSize);
_s.addChild(curImageHolder_do);
_s.addChild(_s.mainInfoHolder_do);
_s.resizeAndPositionInfoHolder(true);
}
prt.main_do.screen.style.cursor = "default";
_s.screen.style.cursor = "default";
scaleX = _s.ws.w/_s.centerImage.imageW;
scaleY = _s.ws.h/_s.centerImage.imageH;
totalScale = 0;
if(scaleX >= scaleY){
totalScale = scaleX;
}else if(scaleX <= scaleY){
totalScale = scaleY;
}
var imageFinalW = parseInt(_s.centerImage.imageW * _s.maxZoom);
var imageFinalH = parseInt(_s.centerImage.imageH * _s.maxZoom);
var imageFinalX = parseInt((_s.ws.w - imageFinalW)/2);
var imageFinalY = parseInt((_s.ws.h - imageFinalH)/2);
FWDAnimation.to(curImageHolder_do, .8, {x:so.x, y:so.y, w:_s.ws.w, h:_s.ws.h, ease:Expo.easeInOut});
FWDAnimation.to(_s.curImage_do, .8, {x:imageFinalX, y:imageFinalY, w:imageFinalW, h:imageFinalH, ease:Expo.easeInOut});
_s.curImage_do.getStyle().cursor = 'grab';
window.addEventListener("scroll", _s.positionMaximizedImage);
_s.maximizeCompleteTimeOutId_to = setTimeout(_s.maximizeCompleteHandler, 800);
}
}
_s.setMaximizedImageOnFullscreen = function(){
if(!_s.isMaximized_bl) return;
var curImageHolder_do = _s.centerImage.imageHolder_do;
var dl_el = document.documentElement;
curImageHolder_do.setX(curImageHolder_do.getGlobalX() + prt.so.x);
curImageHolder_do.setY(curImageHolder_do.getGlobalY() + prt.so.y);
if(_s.centerImage.contains(curImageHolder_do)) _s.centerImage.removeChild(curImageHolder_do);
curImageHolder_do.screen.style.zIndex = 999999998;
dl_el.appendChild(curImageHolder_do.screen);
_s.mainInfoHolder_do.setX(_s.mainInfoHolder_do.getGlobalX() + prt.so.x);
_s.mainInfoHolder_do.setY(_s.mainInfoHolder_do.getGlobalY() + prt.so.y);
_s.mainInfoHolder_do.screen.style.zIndex = 999999999;
dl_el.appendChild(_s.mainInfoHolder_do.screen);
_s.resizeAndPositionInfoHolder(true);
}
_s.minimizeCompleteHandler = function(){
_s.isAnimMaximizeOrMinimize_bl = false;
if(!_d.maxImageHeight != 'fullscreen') _s.centerImage.imageHolder_do.setOverflow('visible');
if(prt.hider) prt.hider.reset();
clearTimeout(_s.startTmOnMinizieCompleteId_to);
if(_s.tm && !_s.isMaximized_bl){
_s.startTmOnMinizieCompleteId_to = setTimeout(function(){
_s.tm.start();
}, 200);
}
if(!_s.centerImage.contains(_s.centerImage.imageHolder_do)){
if(_s.centerImage.border_do){
_s.centerImage.addChildAt(_s.centerImage.imageHolder_do,2);
}else{
_s.centerImage.addChildAt(_s.centerImage.imageHolder_do,1);
}
_s.centerImage.imageHolder_do.screen.style.zIndex = 'auto';
_s.centerImage.isTextContentShowed_bl = false;
if(_s.HTMLTextPosition_str == 'inside'){
_s.transitionDuration = .8;
_s.transitionType_str = 'Expo.easeInOut';
_s.wasMaximized = true;
if(_s.centerImage.overlay_do){
_s.centerImage.addChild(_s.centerImage.overlay_do);
}
_s.centerImage.addChild(_s.centerImage.mainTextHolder_do);
if(_s.playBtnHldDO){
_s.centerImage.addChild(_s.playBtnHldDO, _s.centerImage);
}
_s.centerImage.animateTextContent(true, true);
_s.wasMaximized = false;
}
if(_s.centerImage.overlay_do) _s.centerImage.overlay_do.setAlpha(0);
}
_s.centerImage.imageHolder_do.setX(_s.centerImage.borderSize);
_s.centerImage.imageHolder_do.setY(_s.centerImage.borderSize);
_s.mainInfoHolder_do.screen.style.zIndex = 0;
_s.mainHolder_do.addChild(_s.mainInfoHolder_do);
if(_s.addDragSupport_bl){
_s.curImage_do.getStyle().cursor = 'grab';
}else{
_s.curImage_do.getStyle().cursor = 'default';
}
if(_s.nextButton_do){
_s.nextButton_do.show(true);
_s.prevButton_do.show(true);
}
_s.resizeAndPositionInfoHolder(false);
if(_s.playBtnDO && _s.playBtnDO.isShowed_bl){
_s.playBtnDO.hide2();
_s.playBtnDO.show2(.2);
}
};
_s.maximizeCompleteHandler = function(){
_s.isAnimMaximizeOrMinimize_bl = false;
if(_s.nextButton_do){
_s.nextButton_do.hide(false);
_s.prevButton_do.hide(false);
}
_s.addMaxItemScroll();
};
_s.resizeMaximizedImage = function(){
if(!_s.isMaximized_bl) return;
_s.ws = FWDSISCUtils.getViewportSize();
var curImageHolder_do = _s.centerImage.imageHolder_do;
curImageHolder_do.setOverflow('hidden');
curImageHolder_do.setWidth(_s.ws.w);
curImageHolder_do.setHeight(_s.ws.h);
_s.curImage_do = _s.centerImage.image_do;
var imageFinalW = parseInt(_s.centerImage.imageW * _s.maxZoom);
var imageFinalH = parseInt(_s.centerImage.imageH * _s.maxZoom);
var imageFinalX = parseInt((_s.ws.w - imageFinalW)/2);
var imageFinalY = parseInt((_s.ws.h - imageFinalH)/2);
_s.curImage_do.setX(imageFinalX);
_s.curImage_do.setY(imageFinalY);
_s.curImage_do.setWidth(imageFinalW);
_s.curImage_do.setHeight(imageFinalH);
_s.positionMaximizedImage();
}
_s.positionMaximizedImage = function(e){
if(e) e.preventDefault();
_s.ws = FWDSISCUtils.getViewportSize();
var so = FWDSISCUtils.getScrollOffsets();
var curImageHolder_do = _s.centerImage.imageHolder_do;
_s.curImage_do = _s.centerImage.image_do;
curImageHolder_do.setX(so.x);
curImageHolder_do.setY(so.y);
_s.resizeAndPositionInfoHolder(false);
}
// Add events to scroll the image when maximized.
_s.addMaxItemScroll = function(){
window.addEventListener("mousedown", _s.onMaxScrollStart);
window.addEventListener("mouseup", _s.onMaxScrollEnd);
window.addEventListener("touchstart", _s.onMaxScrollStart);
window.addEventListener("touchend", _s.onMaxScrollEnd);
};
_s.removeMaxItemScroll = function(){
window.removeEventListener("mousedown", _s.onMaxScrollStart);
window.removeEventListener("mouseup", _s.onMaxScrollEnd);
window.removeEventListener("mousemove", _s.onMaxScrollMove);
window.removeEventListener("touchstart", _s.onMaxScrollStart);
window.removeEventListener("touchend", _s.onMaxScrollEnd);
window.removeEventListener("touchmove", _s.onMaxScrollMove);
_s.isDragging_bl = false;
cancelAnimationFrame(_s.updateMax_af);
};
_s.onMaxScrollStart = function(e){
if(e.button && e.button == 2) return;
var vc = FWDSISCUtils.getViewportMouseCoordinates(e);
window.addEventListener("mousemove", _s.onMaxScrollMove);
window.addEventListener("touchmove", _s.onMaxScrollMove, { passive:false});
_s.maxItemX = _s.lastFinalX = _s.curImage_do.x;
_s.maxItemY = _s.lastFinalY = _s.curImage_do.y;
_s.lastPresedX = vc.screenX;
_s.lastPresedY = vc.screenY;
_s.curX = vc.screenX;
_s.curY = vc.screenY;
_s.curImage_do.getStyle().cursor = 'grabbing';
_s.isDragging = true;
_s.startToUpdateDrag();
};
_s.onMaxScrollEnd = function(e){
window.removeEventListener("mousemove", _s.onMaxScrollMove);
window.removeEventListener("touchmove", _s.onMaxScrollMove);
_s.curImage_do.getStyle().cursor = 'grab';
setTimeout(function(){
_s.isDragging_bl = false;
}, 50);
_s.isDragging = false;
};
_s.onMaxScrollMove = function(e){
if(e.preventDefault) e.preventDefault();
var vc = FWDSISCUtils.getViewportMouseCoordinates(e);
var toAddX = vc.screenX - _s.lastPresedX;
_s.maxItemX += toAddX;
_s.maxItemX = Math.round(_s.maxItemX);
_s.lastPresedX = vc.screenX;
_s.curImage_do.setX(_s.maxItemX);
var toAddY = vc.screenY - _s.lastPresedY;
_s.maxItemY += toAddY;
_s.maxItemY = Math.round(_s.maxItemY);
_s.lastPresedY = vc.screenY;
_s.curImage_do.setY(_s.maxItemY);
var difX = _s.curX - vc.screenX;
var difY = _s.curY - vc.screenY;
if(Math.abs(difX) > 2 || Math.abs(difY) > 2){
_s.isDragging_bl = true;
}
};
_s.stopToUpdateDrag = function(){
cancelAnimationFrame(_s.updateMax_af);
}
_s.startToUpdateDrag = function(){
_s.stopToUpdateDrag();
_s.updateMax();
}
_s.updateMax = function(){
_s.updateMax_af = requestAnimationFrame(_s.updateMax);
if(_s.isDragging){
_s.vx = _s.maxItemX - _s.lastFinalX;
_s.lastFinalX = _s.maxItemX;
_s.vy = _s.maxItemY - _s.lastFinalY;
_s.lastFinalY = _s.maxItemY;
var h = Math.sqrt(_s.vx*_s.vx + _s.vy*_s.vy);
if(h < 20){
_s.vx = _s.vy = 0;
}
}else{
_s.vx *= _s.friction;
_s.maxItemX += _s.vx;
if(_s.ws.w <= _s.curImage_do.w){
if(_s.maxItemX >= 0){
_s.vx2 = (0 - _s.maxItemX) * .3;
_s.vx *= _s.friction;
_s.maxItemX += _s.vx2;
}else if(_s.maxItemX <= _s.ws.w - _s.curImage_do.w){
_s.vx2 = (_s.ws.w - _s.curImage_do.w - _s.maxItemX) * .3;
_s.vx *= _s.friction;
_s.maxItemX += _s.vx2;
}
}else{
_s.vx2 =((_s.ws.w - _s.curImage_do.w)/2 - _s.maxItemX) * .3;
_s.vx *= _s.friction;
_s.maxItemX += _s.vx2;
}
_s.vy *= _s.friction;
_s.maxItemY += _s.vy;
if(_s.ws.h <= _s.curImage_do.h){
if(_s.maxItemY >= 0){
_s.vy2 = (0 - _s.maxItemY) * .3;
_s.vy *= _s.friction;
_s.maxItemY += _s.vy2;
}else if(_s.maxItemY <= _s.ws.h - _s.curImage_do.h){
_s.vy2 = (_s.ws.h - _s.curImage_do.h - _s.maxItemY) * .3;
_s.vy *= _s.friction;
_s.maxItemY += _s.vy2;
}
}else{
_s.vy2 =((_s.ws.h - _s.curImage_do.h)/2 - _s.maxItemY) * .3;
_s.vy *= _s.friction;
_s.maxItemY += _s.vy2;
}
_s.maxItemX = parseFloat(_s.maxItemX.toFixed(2));
_s.maxItemY = parseFloat(_s.maxItemY.toFixed(2));
if(_s.prevMaxItemX == _s.maxItemX && _s.prevMaxItemY == _s.maxItemY){
_s.stopToUpdateDrag();
_s.maxItemX = Math.round(_s.maxItemX);
_s.maxItemY = Math.round(_s.maxItemY);
}
_s.curImage_do.setX(_s.maxItemX);
_s.curImage_do.setY(_s.maxItemY);
_s.prevMaxItemX = _s.maxItemX;
_s.prevMaxItemY = _s.maxItemY;
}
};
// Setup next and prev buttons.
_s.setupNextAndPrevButtons = function(){
if(_s.totalImages <= 1) return;
FWDSISCSimpleButton.setPrototype();
_s.nextButton_do = new FWDSISCSimpleButton(_s, _d.nextButtonN_img, _d.nextButtonS_str, undefined,
undefined,
undefined,
undefined,
undefined,
'<div class="table-plugin-fwdsisc-button"><span class="table-cell-fwdsisc-plugin-button ' + prt.fontIcon + '-right' + '"></span></div>',
'fwdsisc-button-normal',
'fwdsisc-button-selected'
);
_s.nextButton_do.screen.className = 'next';
_s.nextButton_do.addListener(FWDSISCSimpleButton.MOUSE_UP, _s.nextButtonClickHandler);
FWDSISCSimpleButton.setPrototype();
_s.prevButton_do = new FWDSISCSimpleButton(_s, _d.prevButtonN_img, _d.prevButtonS_str, undefined,
undefined,
undefined,
undefined,
undefined,
'<div class="table-plugin-fwdsisc-button"><span class="table-cell-fwdsisc-plugin-button ' + prt.fontIcon + '-left' + '"></span></div>',
'fwdsisc-button-normal',
'fwdsisc-button-selected'
);
_s.prevButton_do.screen.className = 'prev';
_s.prevButton_do.addListener(FWDSISCSimpleButton.MOUSE_UP, _s.prevButtonClickHandler);
_s.addChild(_s.nextButton_do);
_s.addChild(_s.prevButton_do);
_s.nextButton_do.hide(false);
_s.prevButton_do.hide(false);
_s.nextButton_do.setX(-5000);
_s.prevButton_do.setX(-5000);
setTimeout(prt.addHeightIfTextIsOutside, 50);
setTimeout(_s.postionNextAndPrevButtons, 500);
}
_s.postionNextAndPrevButtons = function(animate){
if(_s.nextAndPrevButtonsPosition_str == "insideImage"){
_s.nextButtonX = Math.round(_s.centerImage.finalX + _s.centerImage.finalW - _s.nextButton_do.w - _s.imageBorderSize - _s.horizontalButtonsOffset);
_s.prevButtonX = Math.round(_s.centerImage.finalX + _s.imageBorderSize + _s.horizontalButtonsOffset);
_s.buttonsY = Math.round((_s.stageH - _s.nextButton_do.h)/2);
if(_s.nextButtonX > _s.stageW - _s.nextButton_do.w - 10){
_s.nextButtonX = _s.stageW - _s.nextButton_do.w - 10;
}
if(_s.prevButtonX < 10){
_s.prevButtonX = 10;
}
}else if(_s.nextAndPrevButtonsPosition_str == "outsideImage"){
_s.nextButtonX = Math.round(_s.centerImage.finalX + _s.centerImage.finalW + _s.horizontalButtonsOffset + 1);
if(_s.nextButtonX + _s.nextButton_do.w + _s.horizontalButtonsOffset > _s.stageW){
_s.nextButtonX = _s.stageW - _s.nextButton_do.w - _s.horizontalButtonsOffset;
}
_s.prevButtonX = Math.round(_s.centerImage.finalX - _s.prevButton_do.w - _s.horizontalButtonsOffset);
if(_s.prevButtonX < _s.horizontalButtonsOffset){
_s.prevButtonX = _s.horizontalButtonsOffset;
}
_s.buttonsY = Math.round((_s.stageH - _s.nextButton_do.h)/2);
}else if(_s.nextAndPrevButtonsPosition_str == "leftAndRight"){
_s.nextButtonX = Math.round(_s.stageW - _s.nextButton_do.w - _s.horizontalButtonsOffset);
_s.prevButtonX = Math.round(_s.horizontalButtonsOffset);
_s.buttonsY = Math.round((_s.stageH - _s.nextButton_do.h)/2);
}else if(_s.nextAndPrevButtonsPosition_str == "atTheBottomOfImage"){
_s.prevButtonX = Math.round(_s.stageW/2 - _s.nextButton_do.w - _s.horizontalButtonsOffset);
_s.nextButtonX = Math.round(_s.stageW/2 + _s.horizontalButtonsOffset);
if(_s.HTMLTextPosition_str == "outside"){
_s.buttonsY = Math.round(_s.centerImage.finalY + _s.centerImage.finalH + _s.verticalButtonsOffset + _s.getTextHeight());
}else{
_s.buttonsY = Math.round(_s.centerImage.finalY + _s.centerImage.finalH + _s.verticalButtonsOffset);
}
}
if(animate){
FWDAnimation.to(_s.nextButton_do, _s.transitionDuration, {x:_s.nextButtonX, y:_s.buttonsY, ease:Expo.easeInOut});
FWDAnimation.to(_s.prevButton_do, _s.transitionDuration, {x:_s.prevButtonX, y:_s.buttonsY, ease:Expo.easeInOut});
}else{
_s.nextButton_do.setX(_s.nextButtonX);
_s.nextButton_do.setY(_s.buttonsY);
_s.prevButton_do.setX(_s.prevButtonX);
_s.prevButton_do.setY(_s.buttonsY);
}
}
_s.nextButtonClickHandler = function(e){
if(_s.checkIfThubsTween() || _s.isEvpFS || _s.isLoading) return;
var id = _s.curId;
if (id < _s.totalImages-1){
id += _s.howManyImagesToSkipOnNextAndPrevButtons;
if(id > _s.totalImages - 1 && _s.defaulNrThumbsToDisplay == "all") id = 0;
}else{
id = 0;
}
_s.transitionDuration = _s.defaultTransitionDuration;
_s.transitionType_str = _s.defaultTransitionType;
_s.goToImage(id);
}
_s.prevButtonClickHandler = function(e){
if(_s.checkIfThubsTween() || _s.isEvpFS || _s.isLoading) return;
var id = _s.curId;
if (id > 0){
id -= _s.howManyImagesToSkipOnNextAndPrevButtons;
if(id < 0 && _s.defaulNrThumbsToDisplay == "all") id = _s.totalImages - 1;
}else{
id = _s.totalImages-1;
}
_s.transitionDuration = _s.defaultTransitionDuration;
_s.transitionType_str = _s.defaultTransitionType;
_s.goToImage(id);
}
_s.checkIfThubsTween = function(){
for(var i=0; i<_s.totalImages; i++){
if(FWDAnimation.isTweening(_s.images_ar[i])){
return true;;
}
}
return;
}
_s.checkIfThumbsHit = function(){
var menu;
if(window['$']){
menu = $('.vertical-menu-toggle')[0];
}
for(var i=0; i<_s.totalImages; i++){
var image = _s.images_ar[i];
if(image.imageHolder_do && FWDSISCUtils.hitTest(image.imageHolder_do.screen, _s.dMouseX, _s.dMouseY)
&& !((menu && FWDSISCUtils.hitTest(menu, _s.dMouseX, _s.dMouseY))
|| (_s.nextButton_do && FWDSISCUtils.hitTest(_s.nextButton_do.screen, _s.dMouseX, _s.dMouseY))
|| (_s.prevButton_do && FWDSISCUtils.hitTest(_s.prevButton_do.screen, _s.dMouseX, _s.dMouseY)))
){
if(!_s.isMobile_bl){
image.setSelectedState(true);
}
}
}
return;
}
// Add drag support.
_s.addDragSupport = function(){
if(_s.totalImages <= 1) return;
_s.win = window;
_s.dum_do = new FWDSISCDisplayObject("div");
_s.dum_do.getStyle().zIndex = 9999999999;
prt.main_do.addChild(_s.dum_do);
if(_s.hasPointerEvent_bl){
prt.main_do.screen.addEventListener("pointerdown", _s.dragStart);
}else if(!_s.isMobile_bl){
prt.main_do.screen.addEventListener("mousedown", _s.dragStart);
}else{
prt.main_do.screen.addEventListener("touchstart", _s.dragStart, { passive:false});
}
_s.dum_do.screen.style.cursor = "grabbing";
prt.main_do.screen.style.cursor = "grab";
_s.screen.style.cursor = "grab";
}
_s.dragStart = function(e){
if(_s.isAnimMaximizeOrMinimize_bl || _s.isMaximized_bl || _s.isEvpFS || _s.evpTweening || _s.isLoading) return;
var vmc = FWDSISCUtils.getViewportMouseCoordinates(e);
if(_s.is360 && _s.videoStarted){
if(FWDSISCUtils.hitTest(_s.vidHld_do.screen, vmc.screenX, vmc.screenY)){
return;
}
}
if(_s.evp && _s.evp.controller_do
&& (FWDSISCUtils.hitTest(_s.evp.controller_do.mainHolder_do.screen, vmc.screenX, vmc.screenY)
|| FWDSISCUtils.hitTest(_s.playBtnDO.screen, vmc.screenX, vmc.screenY)
|| (_s.evp.apt && FWDSISCUtils.hitTest(_s.evp.apt.screen, vmc.screenX, vmc.screenY)))
|| _s.isEvpFSDL){
return;
}
// Prevent drag if IMA is running, the IMA Iframe is capturing the mouse event and causes bug!
if(_s.evp && _s.evp.IMA && _s.evp.IMA.started){
return;
}
_s.moved = false;
_s.hold = false;
clearTimeout(_s.holdId_to);
_s.holdId_to = setTimeout(function(){
_s.hold = true;
}, 500);
_s.isHorizontal = undefined;
_s.holderX = _s.imageHolder_do.x;
_s.lastPressedX = vmc.screenX;
_s.lastPressedY = vmc.screenY;
prt.main_do.screen.style.cursor = "grabbing";
_s.screen.style.cursor = "grabbing";
clearTimeout(_s.playDondeId_to);
_s.updateEVPCursor('grabbing');
if(_s.hasPointerEvent_bl){
window.addEventListener("pointermove", _s.dragMove);
window.addEventListener("pointerup", _s.dragUp);
}else if(!_s.isMobile_bl){
window.addEventListener("mousemove", _s.dragMove,{bubbles:false});
window.addEventListener("mouseup", _s.dragUp);
}else{
window.addEventListener("touchmove", _s.dragMove, { passive:false });
window.addEventListener("touchend", _s.dragUp);
}
}
_s.dragMove = function(e){
_s.e = e;
var vmc = FWDSISCUtils.getViewportMouseCoordinates(e);
_s.mouseX = vmc.screenX;
_s.mouseY = vmc.screenY;
var angle = Math.atan2(_s.mouseY - _s.lastPressedY, _s.mouseX - _s.lastPressedX);
var posAngle = Math.abs(angle) * 180 / Math.PI;
var difX = Math.abs(_s.mouseX - _s.lastPressedX);
if(!_s.moved){
FWDAnimation.killTweensOf(_s.imageHolder_do);
for(var i=0; i<_s.totalImages; i++){
var image = _s.images_ar[i].stopTransition();
}
}
if(_s.isHorizontal == undefined){
if(difX > 5){
if ((posAngle > 120) || (posAngle < 60)){
_s.isHorizontal = "yes";
}else{
_s.isHorizontal = "no";
}
}
}
if(Math.abs(_s.lastPressedX - vmc.screenX) > 1){
if(_s.tm){
_s.transitionDuration = .8;
_s.transitionType_str = 'Quint.easeOut';
if(!_s.videoStarted){
_s.tm.stop();
}
}
clearTimeout(_s.pint_to);
var pTop = parseInt(window.getComputedStyle(prt.main_do.screen, null).getPropertyValue('padding-top'));
pTop = isNaN(pTop) ? 0 : pTop;
var pBottom = parseInt(window.getComputedStyle(prt.main_do.screen, null).getPropertyValue('padding-bottom'));
pBottom = isNaN(pBottom) ? 0 : pBottom;
_s.moved = true;
_s.dum_do.setWidth(_s.stageW);
_s.dum_do.setHeight(_s.stageH + pTop + pBottom);
clearTimeout(_s.transitionDone_to);
_s.isDragging_bl = true;
}
if(_s.isHorizontal == "yes"){
if(e && e.preventDefault) e.preventDefault();
_s.dif = _s.lastPressedX - _s.mouseX;
if(_s.lastPressedX - vmc.screenX > 80){
_s.dir = "left";
}else if( _s.lastPressedX - vmc.screenX < -80){
_s.dir = "right";
}
_s.imageHolder_do.setX(_s.holderX + _s.dif * -1);
_s.positionVideo(false, true);
}
}
_s.dragUp = function(e){
setTimeout(function(){
_s.dum_do.setWidth(0);
_s.dum_do.setHeight(0);
},50);
if(_s.moved && !_s.hold){
var id = _s.curId;
var image;
if(_s.dir == "left"){
id += 1;
}else if(_s.dir == 'right'){
id -= 1;
}
_s.transitionDuration = .8;
_s.transitionType_str = 'Quint.easeOut';
for(var i=0; i<_s.images_ar.length; i++){
_s.images_ar[i].transitionDuration = .8;
_s.images_ar[i].transitionType_str = "Quint.easeOut";
}
FWDAnimation.to(_s.imageHolder_do, _s.transitionDuration, {x:0, ease:"Quint.easeOut"});
_s.goToImage(id);
_s.transitionDuration = _s.defaultTransitionDuration;
_s.transitionType_str = _s.defaultTransitionType;
for(var i=0; i<_s.images_ar.length; i++){
_s.images_ar[i].transitionDuration = _s.defaultTransitionDuration;
_s.images_ar[i].transitionType_str = _s.defaultTransitionType;
}
}
if(_s.hold){
var l = 100000;
var foundImage;
for(var i=0; i<_s.totalImages; i++){
image = _s.images_ar[i];
image.checkX = _s.imageHolder_do.x + image.x + image.w/2;
var xDiff = image.checkX - _s.stageW/2;
image.diff = Math.sqrt(xDiff * xDiff + 0);
}
for(var i=0; i<_s.totalImages; i++){
image = _s.images_ar[i];
if(image.diff < l){
foundImage = image;
l = image.diff;
}
}
id = foundImage.id;
_s.transitionDuration = .8;
_s.transitionType_str = 'Quint.easeOut';
for(var i=0; i<_s.images_ar.length; i++){
_s.images_ar[i].transitionDuration = .8;
_s.images_ar[i].transitionType_str = "Quint.easeOut";
}
FWDAnimation.to(_s.imageHolder_do, _s.transitionDuration, {x:0, ease:"Quint.easeOut"});
_s.goToImage(id);
_s.transitionType_str = _s.defaultTransitionType;
_s.transitionDuration = _s.defaultTransitionDuration;
for(var i=0; i<_s.images_ar.length; i++){
_s.images_ar[i].transitionDuration = _s.defaultTransitionDuration;
_s.images_ar[i].transitionType_str = _s.defaultTransitionType;
}
}
_s.isDragging_bl = false;
_s.dir = undefined;
prt.main_do.screen.style.cursor = "grab";
_s.screen.style.cursor = "grab";
_s.updateEVPCursor('grab');
if(_s.hasPointerEvent_bl){
window.removeEventListener("pointermove", _s.dragMove);
window.removeEventListener("pointerup", _s.dragUp);
}else if(!_s.isMobile_bl){
window.removeEventListener("mousemove", _s.dragMove);
window.removeEventListener("mouseup", _s.dragUp);
}else{
window.removeEventListener("touchmove", _s.dragMove);
window.removeEventListener("touchend", _s.dragUp);
}
}
// Position images.
_s.positionImages = function(animate){
if(!_s.images_ar) return;
var image;
_s.nextButtonX = 0;
_s.prevButtonX = 0;
_s.buttonsY = 0;
var prevImage;
var scale = 1;
var removeFromSize = 0;
if(prt.displayType == FWDSISC.FLUID_WIDTH_AND_HEIGHT) removeFromSize = prt.sliderOffsetTopAndBottom * 2;
if(_s.centerImage){
_s.centerImage.removeListener(FWDSISCThumb.DOUBLE_CLICK, _s.onThumbImageDoubleClick);
_s.centerImage.removeListener(FWDSISCThumb.MAXIMIZE_SINGLE_CLICK, _s.onThumbImageDoubleClick);
}
if(_s.totalImages == 2){
if(_s.curId == -1){
_s.curId = 0;
}else if(_s.curId == 2){
_s.curId = 1;
}
}
_s.centerImage = _s.images_ar[_s.curId];
setTimeout(function(){
_s.imageHolder_do.addChild(_s.centerImage);
}, 300)
_s.centerImage.addListener(FWDSISCThumb.DOUBLE_CLICK, _s.onThumbImageDoubleClick);
_s.centerImage.addListener(FWDSISCThumb.MAXIMIZE_SINGLE_CLICK, _s.onThumbImageDoubleClick);
if(_d.maxImageHeight == 'fullscreen'){
_s.imageHolder_do.removeChild(_s.centerImage);
_s.imageHolder_do.addChild(_s.centerImage);
var scaleX = _s.stageW/_s.centerImage.imageW;
var scaleY = _s.stageH/_s.centerImage.imageH;
var totalScale = 0;
if(scaleX >= scaleY){
scale = scaleX;
}else if(scaleX <= scaleY){
scale = scaleY;
}
}else{
scale = _s.getScale(_s.stageW, Math.min(_s.stageH, _s.maxCenterImageHeight), _s.centerImage.imageW, _s.centerImage.imageH);
}
_s.centerImage.scale = scale;
_s.centerImage.finalScaledW = Math.round((_s.centerImage.imageW - removeFromSize) * _s.getScale(_s.stageW, _s.stageH, _s.centerImage.imageW, _s.centerImage.imageH));
_s.centerImage.finalScaledH = Math.round((_s.centerImage.imageH - removeFromSize) * _s.getScale(_s.stageW, _s.stageH, _s.centerImage.imageW, _s.centerImage.imageH));
if(_d.maxImageHeight == 'fullscreen'){
_s.centerImage.imageFinalW = Math.round(((_s.centerImage.imageW - removeFromSize) * scale));
_s.centerImage.imageFinalH = Math.round(((_s.centerImage.imageH - removeFromSize) * scale));
_s.centerImage.finalW = _s.stageW;
_s.centerImage.finalH = _s.stageH;
}else{
_s.centerImage.fullScreen = false;
_s.centerImage.finalW = Math.round(((_s.centerImage.imageW - removeFromSize) * scale));
_s.centerImage.finalH = Math.round(((_s.centerImage.imageH - removeFromSize) * scale));
_s.centerImage.imageFinalH = Math.round(((_s.centerImage.imageH - removeFromSize) * scale));
_s.centerImage.finalTextWidth = undefined;
if(_s.stageH > _s.centerImage.imageFinalH && !_s.displayVertical_bl && _s.maxCenterImageHeight == 10000 && !_s.imageBorderSize){
scale = _s.getScale(_s.stageW, Math.min(_s.stageH, _s.maxCenterImageHeight), _s.centerImage.imageW, _s.centerImage.imageH, true);
_s.centerImage.imageFinalW = Math.round(((_s.centerImage.imageW - removeFromSize) * scale));
_s.centerImage.imageFinalH = Math.round(((_s.centerImage.imageH - removeFromSize) * scale));
_s.centerImage.finalW = _s.stageW;
_s.centerImage.finalH = _s.stageH;
_s.centerImage.fullScreen = true;
}
}
_s.centerImage.finalX = Math.round((_s.stageW - _s.centerImage.finalW)/2);
_s.centerImage.finalY = Math.round((_s.stageH - _s.centerImage.finalH)/2);
_s.centerImage.isSelected_bl = false;
_s.centerImage.finalAlpha = 1;
_s.centerImage.finalTextScale = _s.maxCenterImageHeight/_s.centerImage.finalH;
_s.centerImage.finalTextWidthScale = _s.centerImage.finalH/_s.maxCenterImageHeight;
for(var i=_s.curId - 1; i>=0; i--){
prevImage = _s.images_ar[i + 1];
image = _s.images_ar[i];
if(_d.maxImageHeight == 'fullscreen'){
scaleX = _s.stageW/image.imageW;
scaleY = _s.stageH/image.imageH;
totalScale = 0;
if(scaleX >= scaleY){
scale = scaleX;
}else if(scaleX <= scaleY){
scale = scaleY;
}
}else{
scale = _s.getScale(_s.stageW, Math.min(_s.stageH, _s.maxImageHeight), image.imageW, image.imageH);
}
image.finalScaledW = Math.round((image.imageW - removeFromSize) * _s.getScale(_s.stageW, _s.stageH, image.imageW, image.imageH));
image.finalScaledH = Math.round((image.imageH - removeFromSize) * _s.getScale(_s.stageW, _s.stageH, image.imageW, image.imageH));
image.scale = scale;
if(_d.maxImageHeight == 'fullscreen'){
image.imageFinalW = Math.round((image.imageW - removeFromSize) * scale);
image.imageFinalH = Math.round((image.imageH - removeFromSize) * scale);
image.finalW = _s.stageW;
image.finalH = _s.stageH;
}else{
image.fullScreen = false;
image.finalW = Math.round((image.imageW - removeFromSize) * scale);
image.finalH = Math.round((image.imageH - removeFromSize) * scale);
var scale2 = _s.getScale(_s.stageW, Math.min(_s.stageH, _s.maxCenterImageHeight), image.imageW, image.imageH);
image.finalTextWidth = Math.round(((image.imageW - removeFromSize) * scale2));
image.imageFinalH = Math.round(((image.imageH - removeFromSize) * scale));
if(_s.stageH > image.imageFinalH && !_s.displayVertical_bl && _s.maxCenterImageHeight == 10000 && !_s.imageBorderSize){
scale = _s.getScale(_s.stageW, Math.min(_s.stageH, _s.maxImageHeight), image.imageW, image.imageH, true);
image.imageFinalW = Math.round(((image.imageW - removeFromSize) * scale));
image.imageFinalH = Math.round(((image.imageH - removeFromSize) * scale));
image.finalW = _s.stageW;
image.finalH = _s.stageH;
image.fullScreen = true;
}
}
image.finalX = Math.round(prevImage.finalX - image.finalW - _s.spaceBetweenImages);
image.finalY = Math.round((_s.stageH - image.finalH)/2);
image.finalAlpha = 1;
if(_s.nrThumbsToDisplay != "all"){
if(_s.curId - i == _s.nrThumbsToDisplay + 1 && _s.totalImages > 2){
if(prevImage.finalX > 0) image.finalX = -image.finalW;
}
}
image.finalTextScale = image.finalH/_s.centerImage.finalH;
image.finalTextWidthScale = _s.centerImage.finalH/image.finalH;
}
for(var i=_s.curId + 1; i<_s.totalImages; i++){
prevImage = _s.images_ar[i - 1];
image = _s.images_ar[i];
if(_d.maxImageHeight == 'fullscreen'){
scaleX = _s.stageW/image.imageW;
scaleY = _s.stageH/image.imageH;
totalScale = 0;
if(scaleX >= scaleY){
scale = scaleX;
}else if(scaleX <= scaleY){
scale = scaleY;
}
}else{
scale = _s.getScale(_s.stageW, Math.min(_s.stageH, _s.maxImageHeight), image.imageW, image.imageH);
}
image.finalScaledW = Math.round((image.imageW - removeFromSize) * _s.getScale(_s.stageW, _s.stageH, image.imageW, image.imageH));
image.finalScaledH = Math.round((image.imageH - removeFromSize) * _s.getScale(_s.stageW, _s.stageH, image.imageW, image.imageH));
image.scale = scale;
if(_d.maxImageHeight == 'fullscreen'){
image.imageFinalW = Math.round((image.imageW - removeFromSize) * scale);
image.imageFinalH = Math.round((image.imageH - removeFromSize) * scale);
image.finalW = _s.stageW;
image.finalH = _s.stageH;
}else{
image.finalW = Math.round((image.imageW - removeFromSize) * scale);
image.finalH = Math.round((image.imageH - removeFromSize) * scale);
image.imageFinalH = Math.round(((image.imageH - removeFromSize) * scale));
var scale2 = _s.getScale(_s.stageW, Math.min(_s.stageH, _s.maxCenterImageHeight), image.imageW, image.imageH);
image.finalTextWidth = Math.round(((image.imageW - removeFromSize) * scale2));
image.fullScreen = false;
if(_s.stageH > image.imageFinalH && !_s.displayVertical_bl && _s.maxCenterImageHeight == 10000 && !_s.imageBorderSize){
scale = _s.getScale(_s.stageW, Math.min(_s.stageH, _s.maxImageHeight), image.imageW, image.imageH, true);
image.imageFinalW = Math.round(((image.imageW - removeFromSize) * scale));
image.imageFinalH = Math.round(((image.imageH - removeFromSize) * scale));
image.finalW = _s.stageW;
image.finalH = _s.stageH;
image.fullScreen = true;
}
}
image.finalX = Math.round(prevImage.finalX + prevImage.finalW + _s.spaceBetweenImages);
image.finalY = Math.round((_s.stageH - image.finalH)/2);
image.finalAlpha = 1;
if(_s.nrThumbsToDisplay != "all"){
if(i - _s.curId == _s.nrThumbsToDisplay + 1 && _s.totalImages > 2){
if(prevImage.finalX + prevImage.finalW < _s.stageW) image.finalX = _s.stageW;
}
}
image.finalTextScale = image.finalH/_s.centerImage.finalH;
image.finalTextWidthScale = _s.centerImage.finalH/image.finalH;
}
if(_s.displayVertical_bl){
for(var i=0; i<_s.totalImages; i++){
image = _s.images_ar[i];
scaleX = _s.stageW/image.imageW;
scale = scaleX;
image.finalScaledW = _s.stageW;
image.finalScaledH = Math.round((image.imageH - removeFromSize) * scale);
image.scale = scale;
image.imageFinalW = Math.round((image.imageW - removeFromSize) * scale);
image.imageFinalH = Math.round((image.imageH - removeFromSize) * scale);
image.finalW = Math.round((image.imageW - removeFromSize) * scale);
image.finalH = Math.round((image.imageH - removeFromSize) * scale);
image.finalX = 0;
image.finalY = Math.round((i - image.finalH + 30) );
image.finalAlpha = 1;
}
}
var totalH = 0;
for(var i=0; i<_s.totalImages; i++){
image = _s.images_ar[i];
if(_s.displayVertical_bl){
image.finalX = 0;
if(i == 0){
image.finalY = 0;
}else{
image.finalY = _s.images_ar[i-1].finalY + _s.images_ar[i-1].finalH + _s.spaceBetweenImages;
}
}
totalH = image.finalY + image.finalH;
image.resizeImage(animate);
}
if(_s.displayVertical_bl){
prt.setFinalHeight(totalH);
}
_s.getTextHeight();
if(_s.nextButton_do) _s.postionNextAndPrevButtons(animate);
clearTimeout(_s.transitionFinishedId_to);
if(animate){
_s.isStillTransitioning_bl = true;
_s.transitionFinishedId_to = setTimeout(function(){
_s.isStillTransitioning_bl = false;
}, _s.transitionDuration * 1000);
prt.addHeightIfTextIsOutside(true);
}else{
_s.isStillTransitioning_bl = false;
prt.addHeightIfTextIsOutside(false);
}
_s.resizeAndPositionInfoHolder(animate);
_s.animateTextContent(animate);
}
_s.animateTextContent = function(animate){
for(var i=0; i<_s.totalImages; i++){
_s.images_ar[i].animateTextContent(animate);
}
}
_s.checkRightOrLeftSide = function(){
if(_s.nrThumbsToDisplay != "all"){
var countIndexShift = 0;
var prevImage;
var side;
for(var i=_s.totalImages - 1; i>_s.totalImages - (_s.nrThumbsToDisplay - _s.curId + 1); i--){
side = "left";
var splicedImage = _s.images_ar.splice(_s.totalImages - 1, 1)[0];
splicedImage.finalAlpha =0;
_s.images_ar.splice(0, 0, splicedImage);
prevImage = _s.images_ar[1];
splicedImage.finalX = Math.round(prevImage.finalX - splicedImage.finalW - _s.spaceBetweenImages * prt.scale);
if(splicedImage.finalX > -splicedImage.finalW){
splicedImage.finalX = -splicedImage.finalW;
}
splicedImage.setX(splicedImage.finalX);
countIndexShift++;
}
for(var i=_s.curId; i>_s.totalImages - _s.nrThumbsToDisplay - 1; i--){
side = "right";
var splicedImage = _s.images_ar.splice(0, 1)[0];
splicedImage.finalAlpha =0;
_s.images_ar.splice(_s.totalImages-1, 0, splicedImage);
prevImage = _s.images_ar[_s.totalImages-2];
splicedImage.finalX = Math.round(prevImage.finalX + prevImage.finalW + _s.spaceBetweenImages * prt.scale);
if(splicedImage.finalX < _s.stageW){
splicedImage.finalX = _s.stageW;
}
splicedImage.setX(splicedImage.finalX);
prevImage = splicedImage;
countIndexShift++;
}
for(var i=0; i<_s.totalImages; i++){
_s.images_ar[i].id = i;
}
if(side == "left"){
_s.curId += countIndexShift;
}else if(side == "right"){
_s.curId -= countIndexShift;
}
}
_s.positionImages(true);
}
_s.getScale = function(containerW, containerH, width, height, inverse){
var totalScale;
var scaleX = containerW/width;
var scaleY = containerH/height;
var totalScale = 0;
if(scaleX <= scaleY){
totalScale = scaleX;
}else if(scaleX >= scaleY){
totalScale = scaleY;
}
if(inverse){
if(scaleX >= scaleY){
totalScale = scaleX;
}else if(scaleX <= scaleY){
totalScale = scaleY;
}
}
return totalScale;
};
_s.getTextHeight = function(){
if(_s.showHTMLTextContent_str == "center"){
if(_s.images_ar){
return _s.images_ar[_s.curId].getTextHeight();
}else{
return 0;
}
}else{
var lH = 0;
var lH2 = 0;
for(var i=0; i<_s.totalImages; i++){
var image = _s.images_ar[i];
var cLH = image.getTextHeight();
if(image.finalH + cLH > lH2){
lH = cLH;
lH2 += image.finalH + cLH;
}
}
return lH;
}
}
// Load images.
_s.loadImageCenter = function(){
clearTimeout(_s.loadImagecenter_to);
_s.loadedImagecenter = _s.images_ar[_s.loadImagecenterId];
_s.imagecenter_img = new Image();
_s.imagecenter_img.onerror = _s.onimageLoadcenterError;
_s.imagecenter_img.onload = _s.onimageLoadcenterComplete;
_s.imagecenter_img.src = _s.loadedImagecenter.source;
};
_s.onimageLoadcenterError = function(){
var error = "Error loading image <font color='#FF0000'>" + _s.playlist_ar[_s.loadImagecenterId].source + "</font>."
_s.dispatchEvent(FWDSISC.ERROR, {text:error});
}
_s.onimageLoadcenterComplete = function(e){
_s.loadedImagecenter.setImage(_s.imagecenter_img);
_s.loadedImagecenter.hasImage_bl = true;
_s.loadImageRight();
_s.loadImageleft();
if(_s.tm && !_s.isMaximized_bl){
setTimeout(function(){
_s.tm.start();
}, 1200);
}
prt.startStopSlideshowBasedOnVisiblity();
_s.animateTextContent(true);
};
_s.loadImageleft = function(){
clearTimeout(_s.loadImageleft_to);
_s.loadedImageleft = _s.images_ar[_s.loadImageleftId];
if(!_s.loadedImageleft) return;
if(_s.loadedImageleft.hasImage_bl){
_s.loadImageleftId --;
_s.loadImageleft();
return;
}
_s.imageleft_img = new Image();
_s.imageleft_img.onerror = _s.onimageLoadleftError;
_s.imageleft_img.onload = _s.onimageLoadleftComplete;
_s.imageleft_img.src = _s.loadedImageleft.source;
};
_s.onimageLoadleftError = function(){
_s.loadImageleftId --;
_s.loadImageleft_to = setTimeout(_s.loadImageleft, 100);
}
_s.onimageLoadleftComplete = function(e){
_s.loadedImageleft.setImage(_s.imageleft_img);
_s.loadedImageleft.hasImage_bl = true;
_s.loadImageleftId --;
_s.loadImageleft_to = setTimeout(_s.loadImageleft, 100);
};
_s.loadImageRight = function(){
clearTimeout(_s.loadImageRight_to);
_s.loadedImageRight = _s.images_ar[_s.loadImageRightId];
if(_s.loadedImageRight == undefined) return;
if(_s.loadedImageRight.hasImage_bl){
_s.loadImageRightId ++;
_s.loadImageRight();
return;
}
_s.imageRight_img = new Image();
_s.imageRight_img.onerror = _s.onimageLoadRightError;
_s.imageRight_img.onload = _s.onimageLoadRightComplete;
_s.imageRight_img.src = _s.loadedImageRight.source;
};
_s.onimageLoadRightError = function(){
_s.loadImageRightId ++;
_s.loadImageRight_to = setTimeout(_s.loadImageRight, 100);
}
_s.onimageLoadRightComplete = function(e){
_s.loadedImageRight.setImage(_s.imageRight_img);
_s.loadedImageRight.hasImage_bl = true;
_s.loadImageRightId ++;
_s.loadImageRight_to = setTimeout(_s.loadImageRight, 100);
};
_s.stopToLoadThumbanils = function(){
clearTimeout(_s.loadImageleft_to);
if(_s.imageleft_img){
_s.imageleft_img.onload = null;
_s.imageleft_img.onerror = null;
}
clearTimeout(_s.loadImageRight_to);
if(_s.imageRight_img){
_s.imageRight_img.onload = null;
_s.imageRight_img.onerror = null;
}
};
_s.thumbClickHandler = function(e){
_s.dispatchEvent(FWDSISCThumb.CLICK, {id:e.id});
};
_s.thumbHoverHandler = function(){
_s.addDesktopScrollSupport();
};
_s.showButtons = function(overwrite){
if(_s.areButtonsShowed_bl && !overwrite) return;
_s.areButtonsShowed_bl = true;
if(_s.nextButton_do){
_s.nextButton_do.show(true);
_s.prevButton_do.show(true);
}
}
_s.hideButtons = function(animate, overwrite){
if(!_s.areButtonsShowed_bl && !overwrite) return;
_s.areButtonsShowed_bl = false;
if(_s.nextButton_do){
_s.nextButton_do.hide(true);
_s.prevButton_do.hide(true);
}
}
_s.showInfoHolder = function(animate){
_s.mainInfoHolder_do.setAlpha(1);
FWDAnimation.to(_s.infoHolder_do, .8, {y:0, alpha:1, ease:Expo.easeInOut});
}
_s.hideInfoHolder = function(animate){
if(animate){
FWDAnimation.to(_s.infoHolder_do, .8, {y:_s.infoHolderVerticalOffset, alpha:0, ease:Expo.easeInOut});
}else{
_s.infoHolder_do.setAlpha(0);
_s.infoHolder_do.setY(_s.infoHolderVerticalOffset);
}
}
_s.init();
};
// Set prototype.
FWDSISCImageManager.setPrototype = function(){
FWDSISCImageManager.prototype = new FWDSISCDisplayObject("div", "relative");
FWDSISCImageManager.prototype.hasT3D = false;
FWDSISCImageManager.prototype.hasT2D = false;
};
FWDSISCImageManager.prototype = null;
window.FWDSISCImageManager = FWDSISCImageManager;
}(window));/**
* Simple Image Slider Carousel PACKAGED v3.0
* Info window.
*
* @author Tibi - FWDesign [https://webdesign-flash.ro/]
* Copyright © 2006 All Rights Reserved.
*/
(function (window){
'use strict';
var FWDSISCInfo = function(prt, warningIconPath){
var _s = this;
var prototype = FWDSISCInfo.prototype;
_s.warningIconPath_str = warningIconPath;
_s.allowToRemove_bl = true;
// Initialize.
_s.init = function(){
_s.setResizableSizeAfterParent();
_s.bk_do = new FWDSISCDisplayObject("div");
_s.bk_do.setAlpha(.2);
_s.bk_do.setBkColor("#000000");
_s.addChild(_s.bk_do);
_s.textHolder_do = new FWDSISCDisplayObject("div");
if(!FWDSISCUtils.isIEAndLessThen9) _s.textHolder_do.getStyle().font = "Arial";
_s.textHolder_do.getStyle().wordWrap = "break-word";
_s.textHolder_do.getStyle().padding = "10px";
_s.textHolder_do.getStyle().paddingLeft = "42px";
_s.textHolder_do.getStyle().lineHeight = "18px";
_s.textHolder_do.getStyle().color = "#000000";
_s.textHolder_do.setBkColor("#EEEEEE");
var img_img = new Image();
img_img.src = _s.warningIconPath_str;
_s.img_do = new FWDSISCDisplayObject("img");
_s.img_do.setScreen(img_img);
_s.img_do.screen.className = 'warning-icon';
_s.img_do.setWidth(28);
_s.img_do.setHeight(28);
_s.addChild(_s.textHolder_do);
_s.addChild(_s.img_do);
};
_s.showText = function(txt){
if(!_s.isShowedOnce_bl){
if(_s.screen.addEventListener){
_s.screen.addEventListener("click", _s.closeWindow);
}else if(_s.screen.attachEvent){
_s.screen.attachEvent("onclick", _s.closeWindow);
}
_s.isShowedOnce_bl = true;
}
_s.setVisible(false);
_s.textHolder_do.getStyle().paddingBottom = "10px";
_s.textHolder_do.setInnerHTML(txt);
clearTimeout(_s.show_to);
_s.show_to = setTimeout(_s.show, 60);
setTimeout(function(){
_s.positionAndResize();
}, 10);
};
_s.show = function(){
var finalW = Math.min(640, prt.stageWidth - 120);
_s.isShowed_bl = true;
_s.textHolder_do.setWidth(finalW);
setTimeout(function(){
_s.setVisible(true);
_s.positionAndResize();
}, 100);
};
_s.positionAndResize = function(){
var finalW = _s.textHolder_do.getWidth();
var finalH = _s.textHolder_do.getHeight();
var finalX = parseInt((prt.stageWidth - finalW)/2);
var finalY = parseInt((prt.stageHeight - finalH)/2);
_s.bk_do.setWidth(prt.stageWidth);
_s.bk_do.setHeight(prt.stageHeight);
_s.textHolder_do.setX(finalX);
_s.textHolder_do.setY(finalY);
_s.img_do.setX(finalX + 6);
_s.img_do.setY(finalY + parseInt((_s.textHolder_do.getHeight() - _s.img_do.h)/2));
};
_s.closeWindow = function(){
if(!_s.allowToRemove_bl) return;
_s.isShowed_bl = false;
clearTimeout(_s.show_to);
try{prt.main_do.removeChild(_s);}catch(e){}
};
_s.init();
};
// Set prototype.
FWDSISCInfo.setPrototype = function(){
FWDSISCInfo.prototype = new FWDSISCDisplayObject("div", "relative");
};
FWDSISCInfo.prototype = null;
window.FWDSISCInfo = FWDSISCInfo;
}(window));/**
* Simple Image Slider Carousel PACKAGED v3.0
* Simple button.
*
* @author Tibi - FWDesign [https://webdesign-flash.ro/]
* Copyright © 2006 All Rights Reserved.
*/
(function (window){
'use strict';
var FWDSISCSimpleButton = function(prt,
nImg,
sPath,
dPath,
alwaysShowSelectedPath,
useHEXColorsForSkin_bl,
normalButtonsColor_str,
selectedButtonsColor_str,
iconCSSString,
normalClassName,
selectedCalssName){
var _s = this;
var prototype = FWDSISCSimpleButton.prototype;
_s.iconCSSString = iconCSSString;
_s.normalClassName = normalClassName;
_s.selectedCalssName = selectedCalssName;
_s.nImg = nImg;
_s.sPath_str = sPath;
_s.dPath_str = dPath;
_s.toolTipLabel_str;
_s.totalWidth = _s.nImg.width;
_s.totalHeight = _s.nImg.height;
_s.useHEXColorsForSkin_bl = useHEXColorsForSkin_bl;
_s.normalButtonsColor_str = normalButtonsColor_str;
_s.selectedButtonsColor_str = selectedButtonsColor_str;
_s.isShowed_bl = true;
_s.isMobile_bl = FWDSISCUtils.isMobile;
_s.hasPointerEvent_bl = FWDSISCUtils.hasPointerEvent;
_s.allowToCreateSecondButton_bl = true;
_s.useFonticon_bl = Boolean(_s.iconCSSString);
/**
* Initialize.
*/
_s.init = function(){
_s.setupMainContainers();
};
/**
* Setup main containers.
*/
_s.setupMainContainers = function(){
if(_s.useFonticon_bl){
_s.n_do = new FWDSISCDisplayObject("div");
_s.n_do.setInnerHTML(_s.iconCSSString);
_s.addChild(_s.n_do);
_s.setNormalState(false);
_s.setFinalSize();
_s.setOverflow('visible');
}else{
_s.n_sdoHolder = new FWDSISCDisplayObject("div");
_s.n_sdoHolder.setOverflow("visible");
if(_s.useHEXColorsForSkin_bl){
_s.n_sdo = new FWDSISCTransformDisplayObject("div");
_s.n_sdo.setWidth(_s.totalWidth);
_s.n_sdo.setHeight(_s.totalHeight);
_s.n_sdo_canvas = FWDSISCUtils.getCanvasWithModifiedColor(_s.nImg, _s.normalButtonsColor_str).canvas;
_s.n_sdo.screen.appendChild(_s.n_sdo_canvas);
}else{
_s.n_sdo = new FWDSISCTransformDisplayObject("img");
_s.n_sdo.setScreen(_s.nImg);
}
if(_s.allowToCreateSecondButton_bl){
_s.img1 = new Image();
_s.img1.src = _s.sPath_str;
var img2 = new Image();
_s.sImg = img2;
if(_s.useHEXColorsForSkin_bl){
_s.s_sdo = new FWDSISCTransformDisplayObject("div");
_s.s_sdo.setWidth(_s.totalWidth);
_s.s_sdo.setHeight(_s.totalHeight);
_s.img1.onload = function(){
_s.s_sdo_canvas = FWDSISCUtils.getCanvasWithModifiedColor(_s.img1, _s.selectedButtonsColor_str).canvas;
_s.s_sdo.screen.appendChild(_s.s_sdo_canvas);
}
_s.addChild(_s.s_sdo);
}else{
_s.s_sdo = new FWDSISCDisplayObject("img");
_s.s_sdo.setScreen(_s.img1);
_s.s_sdo.setWidth(_s.totalWidth);
_s.s_sdo.setHeight(_s.totalHeight);
_s.addChild(_s.s_sdo);
}
if(_s.dPath_str){
img2.src = _s.dPath_str;
_s.d_sdo = new FWDSISCDisplayObject("img");
_s.d_sdo.setScreen(img2);
_s.d_sdo.setWidth(_s.totalWidth);
_s.d_sdo.setHeight(_s.totalHeight);
_s.d_sdo.setX(-100);
_s.addChild(_s.d_sdo);
};
}
_s.addChild(_s.n_sdoHolder);
_s.n_sdoHolder.addChild(_s.n_sdo);
_s.setWidth(_s.totalWidth);
_s.setHeight(_s.totalHeight);
}
_s.setButtonMode(true);
_s.screen.style.yellowOverlayPointerEvents = "none";
if(_s.isMobile_bl){
if(_s.hasPointerEvent_bl){
_s.screen.addEventListener("pointerup", _s.onMouseUp);
_s.screen.addEventListener("pointerover", _s.onMouseOver);
_s.screen.addEventListener("pointerout", _s.onMouseOut);
}else{
_s.screen.addEventListener("touchend", _s.onMouseUp);
}
}else if(_s.screen.addEventListener){
_s.screen.addEventListener("mouseover", _s.onMouseOver);
_s.screen.addEventListener("mouseout", _s.onMouseOut);
_s.screen.addEventListener("mouseup", _s.onMouseUp);
}else if(_s.screen.attachEvent){
_s.screen.attachEvent("onmouseover", _s.onMouseOver);
_s.screen.attachEvent("onmouseout", _s.onMouseOut);
_s.screen.attachEvent("onmouseup", _s.onMouseUp);
}
};
_s.onMouseOver = function(e){
_s.dispatchEvent(FWDSISCSimpleButton.SHOW_TOOLTIP, {e:e});
if(_s.isDisabledForGood_bl) return;
if(!e.pointerType || e.pointerType == e.MSPOINTER_TYPE_MOUSE || e.pointerType == "mouse"){
if(_s.isDisabled_bl || _s.isSelectedFinal_bl) return;
_s.dispatchEvent(FWDSISCSimpleButton.MOUSE_OVER, {e:e});
_s.setSelectedState(true);
}
};
_s.onMouseOut = function(e){
if(_s.isDisabledForGood_bl) return;
if(!e.pointerType || e.pointerType == e.MSPOINTER_TYPE_MOUSE || e.pointerType == "mouse"){
if(_s.isDisabled_bl || _s.isSelectedFinal_bl) return;
_s.dispatchEvent(FWDSISCSimpleButton.MOUSE_OUT, {e:e});
_s.setNormalState(true);
}
};
_s.onMouseUp = function(e){
if(_s.isDisabledForGood_bl) return;
if(e.preventDefault) e.preventDefault();
if(_s.isDisabled_bl || e.button == 2) return;
if(!_s.isMobile_bl) _s.setSelectedState(true);
_s.dispatchEvent(FWDSISCSimpleButton.MOUSE_UP, {e:e});
};
_s.checkCount = 0;
_s.setFinalSize = function(){
clearInterval(_s.checkId_int);
if(_s.checkCount > 5) return;
_s.lastWidth = _s.n_do.screen.offsetWidth;
_s.checkCount +=1;
_s.checkId_int = setInterval(function(){
_s.setFinalSize();
},100);
if(_s.prevWidth == _s.lastWidth || _s.lastWidth == 0) return;
_s.setWidth(_s.n_do.screen.offsetWidth);
_s.setHeight(_s.n_do.screen.offsetHeight);
_s.n_do.setWidth(_s.w);
_s.n_do.setHeight(_s.h);
_s.buttonWidth = _s.w;
_s.buttonHeight = _s.h;
_s.totalWidth = _s.w;
_s.totalHeight = _s.h;
if(_s.hd_do){
_s.hd_do.setX(_s.w - _s.hd_do.w + 2);
_s.hd_do.setY( -2);
}
_s.prevWidth = _s.lastWidth;
}
/**
* Set normal / selected state.
*/
_s.setNormalState = function(animate){
if(_s.useFonticon_bl){
FWDAnimation.killTweensOf(_s.n_do.screen);
if(animate){
FWDAnimation.to(_s.n_do.screen, .8, {className:_s.normalClassName, ease:Expo.easeOut});
}else{
_s.n_do.screen.className = _s.normalClassName;
}
}else{
FWDAnimation.killTweensOf(_s.n_sdoHolder);
FWDAnimation.to(_s.n_sdoHolder, .5, {alpha:1, ease:Expo.easeOut});
}
};
_s.setSelectedState = function(animate){
if(_s.useFonticon_bl){
FWDAnimation.killTweensOf(_s.n_do.screen);
if(animate){
FWDAnimation.to(_s.n_do.screen, .8, {className:_s.selectedCalssName, ease:Expo.easeOut});
}else{
_s.n_do.screen.className = _s.selectedCalssName;
}
}else{
FWDAnimation.killTweensOf(_s.n_sdoHolder);
if(animate){
FWDAnimation.to(_s.n_sdoHolder, .5, {alpha:0, delay:.1, ease:Expo.easeOut});
}else{
_s.n_sdoHolder.setAlpha(0);
}
}
};
/**
* Disable / enable.
*/
_s.setDisabledState = function(){
if(_s.isSetToDisabledState_bl) return;
_s.isSetToDisabledState_bl = true;
if(_s.d_sdo) _s.d_sdo.setX(0);
};
_s.setEnabledState = function(){
if(!_s.isSetToDisabledState_bl) return;
_s.isSetToDisabledState_bl = false;
if(_s.d_sdo) _s.d_sdo.setX(-100);
};
_s.disable = function(){
if(_s.isDisabledForGood_bl || _s.isDisabled_bl) return;
_s.isDisabled_bl = true;
_s.setButtonMode(false);
FWDAnimation.killTweensOf(_s);
FWDAnimation.to(_s, .6, {alpha:.4});
_s.setNormalState();
};
_s.enable = function(){
if(_s.isDisabledForGood_bl || !_s.isDisabled_bl) return;
_s.isDisabled_bl = false;
_s.setButtonMode(true);
FWDAnimation.killTweensOf(_s);
FWDAnimation.to(_s, .6, {alpha:1});
};
_s.disableForGood = function(){
_s.isDisabledForGood_bl = true;
_s.setButtonMode(false);
};
_s.showDisabledState = function(){
if(_s.d_sdo.x != 0) _s.d_sdo.setX(0);
};
_s.hideDisabledState = function(){
if(_s.d_sdo.x != -100) _s.d_sdo.setX(-100);
};
/**
* Show/hide.
*/
_s.show = function(animate){
if(_s.isShowed_bl) return;
_s.isShowed_bl = true;
var x;
x = 0;
FWDAnimation.killTweensOf(_s.n_do);
FWDAnimation.killTweensOf(_s.n_do);
if(prt.nextAndPrevButtonsPosition_str != "leftAndRight"){
if(animate){
FWDAnimation.to(_s.n_do, .8, {alpha:1, ease:Expo.easeInOut});
}else{
_s.n_do.setAlpha(1);
}
}
if(animate){
FWDAnimation.to(_s.n_do, .8, {x:x, ease:Expo.easeInOut});
}else{
_s.n_do.setX(x);
}
};
_s.hide = function(animate){
if(!_s.isShowed_bl) return;
_s.isShowed_bl = false;
var x;
if(_s.iconCSSString.indexOf('right') != -1){
x = _s.n_do.getWidth() + prt.horizontalButtonsOffset;
}else if(_s.iconCSSString.indexOf('left') != -1){
x = - _s.n_do.getWidth() - prt.horizontalButtonsOffset;
}
FWDAnimation.killTweensOf(_s.n_do);
if(prt.nextAndPrevButtonsPosition_str != "leftAndRight"){
if(animate){
FWDAnimation.to(_s.n_do, .8, {alpha:0, ease:Expo.easeInOut});
}else{
_s.n_do.setAlpha(0);
}
}
if(animate){
FWDAnimation.to(_s.n_do, .8, {x:x, ease:Expo.easeInOut});
}else{
_s.n_do.setX(x);
}
};
_s.show2 = function(dl){
if(_s.isShowed_bl) return;
_s.isShowed_bl = true;
FWDAnimation.killTweensOf(_s);
_s.setScale2(0);
if(dl === undefined) dl = .4;
if(dl == 0){
_s.setScale2(1);
_s.setVisible(true);
}else{
FWDAnimation.to(_s, .8, {scale:1, delay:dl, onStart:function(){_s.setVisible(true);}, ease:Elastic.easeOut});
}
};
_s.hide2 = function(overwrite){
if(!_s.isShowed_bl && !overwrite) return;
_s.isShowed_bl = false;
FWDAnimation.killTweensOf(_s);
_s.setVisible(false);
_s.setScale2(0);
};
/**
* Update HEX color of a canvaas.
*/
_s.updateHEXColors = function(normalColor_str, selectedColor_str){
FWDSISCUtils.changeCanvasHEXColor(_s.nImg, _s.n_sdo_canvas, normalColor_str);
FWDSISCUtils.changeCanvasHEXColor(_s.img1, _s.s_sdo_canvas, selectedColor_str);
}
_s.init();
};
/**
* Set prototype.
*/
FWDSISCSimpleButton.setPrototype = function(){
FWDSISCSimpleButton.prototype = null;
FWDSISCSimpleButton.prototype = new FWDSISCTransformDisplayObject("div");
};
FWDSISCSimpleButton.CLICK = "onClick";
FWDSISCSimpleButton.MOUSE_OVER = "onMouseOver";
FWDSISCSimpleButton.SHOW_TOOLTIP = "showTooltip";
FWDSISCSimpleButton.MOUSE_OUT = "onMouseOut";
FWDSISCSimpleButton.MOUSE_UP = "onMouseDown";
FWDSISCSimpleButton.prototype = null;
window.FWDSISCSimpleButton = FWDSISCSimpleButton;
}(window));/**
* Simple Image Slider Carousel PACKAGED v3.0
* Preloader and slideshow animation.
*
* @author Tibi - FWDesign [https://webdesign-flash.ro/]
* Copyright © 2006 All Rights Reserved.
*/
(function (window){
var FWDSISCSlideshowPreloader = function(prt, preloaderPostion, radius, backgroundColor, fillColor, strokeSize, animDuration, position){
'use strict';
var _s = this;
var prototype = FWDSISCSlideshowPreloader.prototype;
_s.preloaderPostion = preloaderPostion;
_s.bkClr = backgroundColor;
_s.fillClr = fillColor;
_s.radius = radius;
_s.strokeSize = strokeSize;
_s.animDur = animDuration || 3000;
_s.strtAngle = 270;
_s.cntAnim = 0;
_s.isShowed = true;
_s.angle = {n:0};
// Initialize.
_s.init = function(){
_s.getStyle().pointerEvents = 'none';
_s.mm_do = new FWDSISCDisplayObject("div");
_s.mm_do.setOverflow('visible');
_s.main_do = new FWDSISCDisplayObject("div");
_s.main_do.setOverflow("visible");
_s.main_do.setWidth(_s.radius * 2 + _s.strokeSize);
_s.main_do.setHeight(_s.radius * 2 + _s.strokeSize);
_s.setOverflow('visible');
_s.setWidth((_s.radius * 2) + _s.strokeSize);
_s.setHeight((_s.radius * 2) + _s.strokeSize);
_s.mm_do.setWidth(_s.w);
_s.mm_do.setHeight(_s.h);
_s.bkCanvas = new FWDSISCDisplayObject("canvas");
_s.bkCtx = _s.bkCanvas.screen.getContext('2d');
_s.fillCircleCanvas = new FWDSISCDisplayObject("canvas");
_s.fillCtx = _s.fillCircleCanvas.screen.getContext('2d');
if(_s.preloaderPostion == 'bottomright'){
var posCtId_int = setInterval(function(){
_s.positionAndResize();
if(!_s) clearInterval(posCtId_int);
});
}
_s.screen.style.transformOrigin = "50% 50%";
_s.main_do.screen.style.transformOrigin = "50% 50%";
_s.main_do.addChild(_s.bkCanvas);
_s.main_do.addChild(_s.fillCircleCanvas);
_s.mm_do.addChild(_s.main_do);
_s.addChild(_s.mm_do);
_s.drawBackground();
_s.drawFill();
_s.hide();
};
/**
* Set final size.
* @param {int} w
* @param {int} h
*/
_s.setFinalSize = function(w, h){
_s.main_do.setX(Math.round(w-_s.w)/2);
_s.main_do.setY(Math.round(h-_s.h)/2);
_s.setWidth(w);
_s.setHeight(h);
}
// Position and resize.
_s.positionAndResize = function(){
if(!position) return;
var paralax_bl = prt.prt && prt.prt.paralax_bl;
var offsetY = (paralax_bl ? prt.prt.pageYOffset/2 : 0);
var offsetY2 = 0;
if(FWDSISC.posCntDown){
if(_s.preloaderPostion == 'bottomleft' || _s.preloaderPostion == 'bottomright'){
offsetY2 = Math.round(FWDSISC._s.ws.h - prt.stageH)/2 * 2;
}else if(_s.preloaderPostion == 'center'){
offsetY2 = Math.round(FWDSISC._s.ws.h - prt.stageH)/2;
}
}
offsetY2 += parseInt(window.getComputedStyle(prt.main_do.screen)['padding-top']);
if(_s.preloaderPostion == 'bottomleft'){
_s.setX(10);
_s.setY(prt.stageH - _s.h - 10 - Math.round(offsetY) + offsetY2);
}else if(_s.preloaderPostion == 'bottomright'){
if(prt.cnt_do){
var cnt_do = prt.cnt_do;
var cntW = cnt_do.getWidth();
_s.setX(prt.stageW - _s.w - 6);
_s.setY(prt.stageH - _s.h - 5 - Math.round(offsetY));
_s.prevX = cnt_do.x;
}else{
_s.setX(prt.stageW - _s.w - 10);
_s.setY(prt.stageH - _s.h - 10 - Math.round(offsetY) + offsetY2);
}
}else if(_s.preloaderPostion == 'topright'){
_s.setX(prt.stageW - _s.w - 10);
_s.setY(10 - Math.round(offsetY));
}else if(_s.preloaderPostion == 'topleft'){
_s.setX(10);
_s.setY(10 - Math.round(offsetY))
}else if(_s.preloaderPostion == 'center'){
_s.setX(Math.round(prt.stageW - _s.w)/2);
var y = Math.round(prt.stageH - _s.h)/2 + offsetY2 - Math.round(offsetY)
y += prt.offsetParalaxPos;
_s.setY(y);
}
}
// Draw canvas background and fill.
_s.drawBackground = function(){
_s.bkCanvas.screen.width = (_s.radius * 2) + _s.strokeSize * 2;
_s.bkCanvas.screen.height = (_s.radius * 2) + _s.strokeSize * 2;
_s.bkCtx.lineWidth = _s.thicknessSize;
_s.bkCtx.translate(_s.strokeSize/2, _s.strokeSize/2);
_s.bkCtx.shadowColor = '#333333';
_s.bkCtx.shadowBlur = 1;
_s.bkCtx.lineWidth=_s.strokeSize;
_s.bkCtx.strokeStyle = _s.bkClr;
_s.bkCtx.beginPath();
_s.bkCtx.arc(_s.radius, _s.radius, _s.radius, (Math.PI/180) * 0, (Math.PI/180) * 360, false);
_s.bkCtx.stroke();
_s.bkCtx.closePath();
};
_s.drawFill = function(p){
if(p) _s.angle.n = Math.round(p * 360);
_s.fillCircleCanvas.screen.width = (_s.radius * 2) + _s.strokeSize * 2;
_s.fillCircleCanvas.screen.height = (_s.radius * 2) + _s.strokeSize * 2;
_s.fillCtx.lineWidth = _s.thicknessSize;
_s.fillCtx.translate(_s.strokeSize/2, _s.strokeSize/2);
_s.fillCtx.lineWidth=_s.strokeSize;
_s.fillCtx.strokeStyle = _s.fillClr;
_s.fillCtx.beginPath();
_s.fillCtx.arc(_s.radius, _s.radius, _s.radius, (Math.PI/180) * _s.strtAngle, (Math.PI/180) * (_s.strtAngle + _s.angle.n), false);
_s.fillCtx.stroke();
_s.fillCtx.closePath();
};
// Animtion logic.
_s.startSlideshow = function(o){
if(_s == null || _s.isSlideShowRun && !o) return;
_s.isSlideShowRun = true;
_s.resetSlideshow();
FWDAnimation.killTweensOf(_s.angle);
FWDAnimation.to(_s.angle, _s.animDur, {n:360, onUpdate:_s.drawFill, onComplete:_s.stopSlideshow});
};
_s.stopSlideshow = function(o, t){
if(!_s.isSlideShowRun && !o) return;
_s.isSlideShowRun = false;
FWDAnimation.killTweensOf(_s.angle);
FWDAnimation.to(_s.angle, o, {n:0, onUpdate:_s.drawFill, ease:t});
};
_s.resetSlideshow = function(){
FWDAnimation.killTweensOf(_s.angle);
_s.angle.n = 0;
_s.drawFill();
}
_s.killTween = function(){
FWDAnimation.killTweensOf(_s.angle);
}
_s.startPreloader = function(){
_s.stopPreloader();
_s.angle = {n:0};
FWDAnimation.to(_s.angle, _s.animDur, {n:360, onUpdate:_s.drawFill, repeat:100, yoyo:true, ease:Expo.easeInOut});
FWDAnimation.to(_s.main_do.screen, _s.animDur, {rotation:360, repeat:100});
}
_s.stopPreloader = function(){
FWDAnimation.killTweensOf(_s.angle);
FWDAnimation.killTweensOf(_s.main_do.screen);
FWDAnimation.to(_s.main_do.screen, 0.00001, {rotation:0});
}
// Show/hide logic.
_s.show = function(){
if(_s.isShowed) return;
_s.setVisible(true);
FWDAnimation.killTweensOf(_s.mm_do);
FWDAnimation.to(_s.mm_do, 1, {alpha:1, delay:.2});
_s.stopPreloader();
_s.startPreloader();
_s.isShowed = true;
};
_s.hide = function(animate){
if(!_s.isShowed) return;
FWDAnimation.killTweensOf(_s.mm_do);
if(animate){
FWDAnimation.to(_s.mm_do, .2, {alpha:0, onComplete:_s.onHideComplete});
}else{
_s.setVisible(false);
_s.mm_do.setAlpha(0);
}
_s.isShowed = false;
};
_s.show2 = function(){
if(_s.isShowed) return;
_s.isShowed = true;
_s.setVisible(true);
FWDAnimation.killTweensOf(_s.mm_do);
FWDAnimation.to(_s.mm_do, 1, {alpha:1, ease:Expo.easeOut});
}
_s.hide2 = function(){
if(!_s.isShowed) return;
_s.isShowed = false;
FWDAnimation.killTweensOf(_s.mm_do);
FWDAnimation.to(_s.mm_do, 1, {alpha:0, onComplete:_s.onHideComplete, ease:Expo.easeOut});
}
_s.onHideComplete = function(){
_s.setVisible(false);
_s.stopPreloader();
_s.dispatchEvent(FWDSISCSlideshowPreloader.HIDE_COMPLETE);
};
/**
* Set opacitiy when item is dragged.
* @param {String} inst
*/
_s.setHideDrag = function(hide){
FWDAnimation.killTweensOf(_s.main_do);
if(!hide){
FWDAnimation.to(_s.main_do, .4, {alpha:1});
}else{
FWDAnimation.to(_s.main_do, .4, {alpha:.3, delay:.4});
}
}
/**
* Update colors.
* @param {String} bkClr
* @param {String} fillClr
*/
_s.updateColors = function(bkClr, fillClr){
_s.bkClr = bkClr;
_s.fillClr = fillClr;
_s.bkCtx.strokeStyle = _s.bkClr;
_s.fillCtx.strokeStyle = _s.fillClr;
_s.drawBackground();
}
_s.init();
};
// Prototype.
FWDSISCSlideshowPreloader.setPrototype = function(){
FWDSISCSlideshowPreloader.prototype = new FWDSISCDisplayObject("div");
};
FWDSISCSlideshowPreloader.HIDE_COMPLETE = "hideComplete";
window.FWDSISCSlideshowPreloader = FWDSISCSlideshowPreloader;
}(window));
/**
* Simple Image Slider Carousel PACKAGED v3.0
* Slider image.
*
* @author Tibi - FWDesign [https://webdesign-flash.ro/]
* Copyright © 2006 All Rights Reserved.
*/
(function(window){
'use strict';
var FWDSISCThumb = function(
prt,
id,
transitionDuration,
transitionType_str,
animationTextType_str,
showHTMLTextContent_str,
HTMLTextPosition_str,
HTMLTextAlignment_str,
source,
imageW,
imageH,
imageBorderSize,
imageBorderRadius,
backgroundColor,
imageBorderColor,
overlayColor_str,
description_ar,
showImageReflection_bl,
link,
target,
maximizeOnSingleClick
){
var _s = this;
var prototype = FWDSISCThumb.prototype;
_s.source_str = source;
_s.animationTextType_str = animationTextType_str;
_s.HTMLTextPosition_str = HTMLTextPosition_str;
_s.HTMLTextAlignment_str = HTMLTextAlignment_str;
_s.borderColor_str = imageBorderColor;
_s.backgroundColor = backgroundColor;
_s.showHTMLTextContent_str = showHTMLTextContent_str;
_s.showImageReflection_bl = showImageReflection_bl;
_s.link = link;
_s.target = target;
_s.source = source
_s.maximizeOnSingleClick = maximizeOnSingleClick;
_s.id = id;
_s.finalId = id;
_s.borderSize = imageBorderSize;
_s.offsetWidth = prt.offsetWidth;
_s.borderRadius = imageBorderRadius;
_s.imageW = imageW;
_s.imageH = imageH;
_s.finalX = -1;
_s.finalY = -1;
_s.transitionDuration = transitionDuration;
_s.transitionType_str = transitionType_str;
_s.description_ar = description_ar;
_s.htmlContent_ar;
_s.showFirstTime_bl = true;
_s.hasPointerEvent_bl = FWDSISCUtils.hasPointerEvent;
_s.isMobile_bl = FWDSISCUtils.isMobile;
_s.overlayColor_str = overlayColor_str;
// Initialize.
_s.init = function(){
_s.setupScreen();
_s.addLinkSupport();
};
// Setup screen.
_s.setupScreen = function(){
_s.background_do = new FWDSISCDisplayObject("div");
if(_s.borderRadius) _s.getStyle().borderRadius = _s.borderRadius + "px";
if(_s.borderRadius) _s.getStyle().borderRadius = _s.borderRadius + "px";
if(_s.borderSize){
_s.background_do.setX(_s.borderSize);
_s.background_do.setY(_s.borderSize);
_s.border_do = new FWDSISCDisplayObject("div");
_s.border_do.screen.className = 'sisc-border';
_s.border_do.getStyle().backgroundColor = _s.borderColor_str;
_s.addChild(_s.border_do);
}
_s.background_do.getStyle().backgroundColor = _s.backgroundColor;
_s.background_do.screen.className = 'image-background';
_s.addChild(_s.background_do);
if(_s.isMobile_bl){
if(_s.hasPointerEvent_bl){
_s.screen.addEventListener("MSPointerUp", _s.onMouseClickHandler);
}
_s.screen.addEventListener("click", _s.onMouseClickHandler);
_s.screen.addEventListener("touchstart", _s.onTouchStartHandler);
}else if(_s.screen.addEventListener){
_s.screen.addEventListener("mouseover", _s.onMouseOverHandler);
_s.screen.addEventListener("mouseout", _s.onMouseOutHandler);
_s.screen.addEventListener("click", _s.onMouseClickHandler);
}
_s.mainTextHolder_do = new FWDSISCTransformDisplayObject("div", "relative");
if(_s.HTMLTextPosition_str == "outside"){
_s.mainTextHolder_do.screen.className = 'outside';
}else{
_s.mainTextHolder_do.screen.className = 'inside';
}
if(_s.HTMLTextAlignment_str == "top" && HTMLTextPosition_str == "inside"){
_s.mainTextHolder_do.screen.className = 'inside align-top';
}
_s.mainTextHolder_do.getStyle().transformOrigin = "0% 0%";
_s.mainTextHolder_do.setOverflow("hidden");
_s.textHolder_do = new FWDSISCTransformDisplayObject("div");
_s.textHolder_do.setOverflow("visible");
_s.textHolder_do.setAlpha(0);
_s.textHolder_do.getStyle().transformOrigin = "0% 0%";
_s.textHolder_do.getStyle().width = "100%";
if(_s.HTMLTextAlignment_str == "bottom"){
_s.textHolder_do.getStyle().top = 'auto';
_s.textHolder_do.getStyle().bottom = 0;
}
_s.mainTextHolder_do.addChild(_s.textHolder_do);
_s.addChild(_s.mainTextHolder_do);
_s.updateTextContent(_s.description_ar);
};
// Update text.
_s.updateTextContent = function(htmlContent_ar){
_s.htmlContent_ar = [];
for(var i=0; i<htmlContent_ar.length; i++){
var mainHtmlElement = new FWDSISCDisplayObject("div");
mainHtmlElement.getStyle().position = "relative";
mainHtmlElement.getStyle().overflow = 'visible';
mainHtmlElement.screen.className = 'fwd-holder';
mainHtmlElement.getStyle().width = "100%";
var childHtmlElement = new FWDSISCDisplayObject("div");
childHtmlElement.getStyle().position = "relative";
childHtmlElement.getStyle().width = "100%";
childHtmlElement.setInnerHTML(htmlContent_ar[i]);
mainHtmlElement.addChild(childHtmlElement);
_s.textHolder_do.addChild(mainHtmlElement);
_s.htmlContent_ar[i] = {mainHtmlElement:mainHtmlElement, childHtmlElement:childHtmlElement};
}
};
_s.animateTextContent = function(animate, removeDelay){
var dl = 0;
if(_s.showHTMLTextContent_str == "none"){
if(_s.textHolder_do.visible) _s.textHolder_do.setVisible(false);
return;
}else{
if(!_s.textHolder_do.visible) _s.textHolder_do.setVisible(true);
}
if(_s.showHTMLTextContent_str == "center"){
if(_s.id != prt.curId){
if(animate){
FWDAnimation.killTweensOf(_s.textHolder_do);
FWDAnimation.to(_s.textHolder_do, _s.transitionDuration, {alpha:0});
}else{
_s.textHolder_do.setAlpha(0);
}
}else{
if(animate){
var t = _s.transitionDuration
if(!prt.transitionedOnce){
dl = .8;
t = 1;
}
if(_s.showHTMLTextContent_str == "center"){
dl = .6;
if(animationTextType_str == FWDSISC.FADE){
var t = .8
dl = _s.transitionDuration;
if(!prt.transitionedOnce){
t = .8;
dl = .8;
}
}
}
if(removeDelay){
t = .8;
dl = 0;
_s.textHolder_do.setAlpha(0);
}
FWDAnimation.killTweensOf(_s.textHolder_do);
FWDAnimation.to(_s.textHolder_do, t, {alpha:1, delay:dl, ease:Expo.easeInOut});
}
}
}else{
if(!prt.transitionedOnce) dl = .8;
if(_s.textHolder_do.alpha == 0){
FWDAnimation.killTweensOf(_s.textHolder_do);
FWDAnimation.to(_s.textHolder_do, 1, {alpha:1, delay:dl, ease:Expo.easeInOut});
}
}
if(_s.id == prt.curId){
if(_s.link && _s.link != "none" && _s.link.length > 4){
setTimeout(function(){
_s.allowToOpenLink_bl = true;
}, 200);
if(!prt.addDragSupport_bl && !prt.displayVertical_bl) _s.setButtonMode(true);
}else{
_s.allowToOpenLink_bl = false;
if(!prt.addDragSupport_bl) _s.setButtonMode(false);
}
}else{
_s.allowToOpenLink_bl = false;
if(!prt.addDragSupport_bl && !prt.displayVertical_bl) _s.setButtonMode(true);
}
if(animationTextType_str == FWDSISC.FADE_FROM_BOTTOM_TO_TOP
|| animationTextType_str == FWDSISC.MOVE_FROM_LEFT_TO_RIGHT
){
if(animate) dl = .8;
if(removeDelay) dl = 0;
for(var i=0; i<_s.htmlContent_ar.length; i++){
var mainHtmlElement = _s.htmlContent_ar[i].mainHtmlElement;
var childHtmlElement = _s.htmlContent_ar[i].childHtmlElement;
FWDAnimation.killTweensOf(mainHtmlElement);
if(_s.finalX + _s.finalW >= 0 && _s.finalX < prt.stageW + _s.finalW){
if(_s.showHTMLTextContent_str == "all" && !_s.isTextContentShowed_bl){
if(!_s.isTextContentShowed_bl){
if(animationTextType_str == FWDSISC.FADE_FROM_BOTTOM_TO_TOP){
if(_s.textHolder_do.alpha == 0 || removeDelay){
_s.textHolder_do.setAlpha(1);
childHtmlElement.getStyle().opacity = "0";
if(_s.HTMLTextAlignment_str == "top"){
childHtmlElement.getStyle().top = '-20px';
}else{
childHtmlElement.getStyle().top = '20px';
}
FWDAnimation.to(childHtmlElement.screen, 1, {css:{opacity:1, top:0}, delay:dl, ease:Expo.easeInOut});
}
}
}
if(i == _s.htmlContent_ar.length - 1) _s.isTextContentShowed_bl = true;
}else if(_s.showHTMLTextContent_str == "center" && _s.id == prt.curId && animate){
if(!_s.isTextContentShowed_bl){
if(animationTextType_str == FWDSISC.FADE_FROM_BOTTOM_TO_TOP){
if(_s.textHolder_do.alpha == 0 || removeDelay){
var t = .8
dl = _s.transitionDuration;
if(!prt.transitionedOnce){
t = .8;
dl = .8;
}
if(prt.wasMaximized){
dl = 0;
}
childHtmlElement.getStyle().opacity = "0";
if(_s.HTMLTextAlignment_str == "top"){
childHtmlElement.getStyle().top = '-20px';
}else{
childHtmlElement.getStyle().top = '20px';
}
FWDAnimation.to(childHtmlElement.screen, t, {css:{opacity:1, top:0}, delay:dl, ease:Expo.easeInOut});
}
}
}
if(i == _s.htmlContent_ar.length - 1 && _s.id != prt.curId) _s.isTextContentShowed_bl = true;
}
}
dl += .2;
}
}
_s.showFirstTime_bl = false;
}
// Resize and position.
_s.stopTransition = function(){
FWDAnimation.killTweensOf(_s);
FWDAnimation.killTweensOf(_s.background_do);
if(_s.border_do) FWDAnimation.killTweensOf(_s.border_do);
}
_s.resizeImage = function(animate){
FWDAnimation.killTweensOf(_s);
FWDAnimation.killTweensOf(_s.background_do);
_s.offsetHeight = _s.finalH;
if(_s.HTMLTextPosition_str == 'inside'){
if(_s.showImageReflection_bl){
_s.offsetHeight = prt._d.reflectionHeight;
}else{
_s.offsetHeight = 0;
}
}
if(_s.border_do) FWDAnimation.killTweensOf(_s.border_do);
if(animate){
if(prt._d.maxImageHeight == 'fullscreen' || _s.fullScreen){
FWDAnimation.to(_s, _s.transitionDuration, {alpha:_s.finalAlpha, x:_s.finalX, y:0, w:_s.finalW, h:_s.finalH + _s.offsetHeight, ease:_s.transitionType_str, onComplete:_s.imageOnComplete});
}else{
FWDAnimation.to(_s, _s.transitionDuration, {alpha:_s.finalAlpha, x:_s.finalX, y:_s.finalY, w:_s.finalW, h:_s.finalH + _s.offsetHeight, ease:_s.transitionType_str, onComplete:_s.imageOnComplete});
}
FWDAnimation.to(_s.background_do, _s.transitionDuration, {w:_s.finalW - (_s.borderSize * 2), h:_s.finalH - (_s.borderSize * 2), ease:_s.transitionType_str});
if(_s.border_do) FWDAnimation.to(_s.border_do, _s.transitionDuration, {w:_s.finalW , h:_s.finalH, ease:_s.transitionType_str});
}else{
_s.setAlpha(_s.finalAlpha);
_s.setX(_s.finalX);
if(prt._d.maxImageHeight == 'fullscreen' || _s.fullScreen){
_s.setY(0);
}else{
_s.setY(_s.finalY);
}
_s.setWidth(_s.finalW);
_s.setHeight(_s.finalH + _s.offsetHeight);
if(_s.background_do){
_s.background_do.setWidth(_s.finalW - (_s.borderSize * 2));
_s.background_do.setHeight(_s.finalH - (_s.borderSize * 2));
}
if(_s.border_do){
_s.border_do.setWidth(_s.finalW);
_s.border_do.setHeight(_s.finalH);
}
}
if(_s.image_do){
_s.image_do.setAlpha(1);
}
_s.tempScale = Math.min(1, _s.finalTextScale);
if(prt._d.maxImageHeight == 'fullscreen' || _s.fullScreen){
_s.tempScale = 1;
}
if(_s.finalTextScale > 1){
_s.finalTextWidthScale = 1;
}
_s.textX = _s.borderSize;
_s.textY = _s.borderSize;
_s.textW = Math.round(_s.finalW * _s.finalTextWidthScale) - (_s.borderSize * 2) * _s.finalTextWidthScale;
_s.textH = Math.round(_s.finalH * _s.finalTextWidthScale) - (_s.borderSize * 2) * _s.finalTextWidthScale;
if(_s.HTMLTextPosition_str == 'outside'){
_s.textW = Math.round(_s.finalW * _s.finalTextWidthScale);
if(_s.finalTextWidth){
_s.textW = _s.finalTextWidth;
_s.tempScale = _s.finalW/_s.finalTextWidth
}
_s.textH = Math.round(_s.finalH * _s.finalTextWidthScale);
_s.textX = 0;
_s.textY = _s.finalH;
_s.textH = _s.textHolder_do.getHeight();
}
if(prt._d.maxImageHeight == 'fullscreen' || prt.displayVertical_bl){
_s.textW = _s.finalW - (_s.borderSize * 2);
_s.textH = _s.finalH - (_s.borderSize * 2);
_s.tempScale = 1;
}
_s.textX -= _s.offsetWidth;
_s.textW += _s.offsetWidth * 2;
if(animate){
if(_s.HTMLTextPosition_str == 'inside'){
FWDAnimation.to(_s.mainTextHolder_do, _s.transitionDuration, {
y:_s.textY,
w: _s.textW,
h: _s.textH,
scale:_s.tempScale,
ease:_s.transitionType_str});
}else{
FWDAnimation.to(_s.mainTextHolder_do, _s.transitionDuration, {
y:_s.textY,
scale:_s.tempScale,
ease:_s.transitionType_str});
}
}else{
_s.mainTextHolder_do.setX(_s.textX);
_s.mainTextHolder_do.setY(_s.textY);
_s.mainTextHolder_do.setWidth(_s.textW);
_s.mainTextHolder_do.setHeight(_s.textH);
if(_s.HTMLTextPosition_str == 'outside'){
setTimeout(function(){
_s.textH = _s.textHolder_do.getHeight();
_s.mainTextHolder_do.setHeight(_s.textH);
}, 50);
}
_s.mainTextHolder_do.setScale2(_s.tempScale);
}
if(_s.overlay_do){
var overlayAlpha = 0;
if(_s.id != prt.curId && !_s.hit){
overlayAlpha = 1;
}
FWDAnimation.killTweensOf(_s.overlay_do);
if(animate){
FWDAnimation.to(_s.overlay_do, _s.transitionDuration, {alpha:overlayAlpha, w:_s.finalW - _s.borderSize * 2 + _s.offsetWidth * 2, h:_s.finalH - _s.borderSize * 2, ease:_s.transitionType_str});
}else{
_s.overlay_do.setAlpha(overlayAlpha);
_s.overlay_do.setX(_s.borderSize);
_s.overlay_do.setY(_s.borderSize);
_s.overlay_do.setWidth(_s.finalW - _s.borderSize * 2 + _s.offsetWidth * 2);
_s.overlay_do.setHeight(_s.finalH - _s.borderSize * 2);
}
}
if(_s.HTMLTextPosition_str == 'outside'){
var textAlpha = 1;
if(_s.id != prt.curId && !_s.hit){
textAlpha = .3;
}
if(animate){
FWDAnimation.to(_s.mainTextHolder_do, _s.transitionDuration, {alpha:textAlpha, ease:_s.transitionType_str});
}else{
_s.mainTextHolder_do.setAlpha(textAlpha)
}
}
if(_s.prevW != _s.finalW && _s.prevH !=_s.finalH && _s.image_do ){
if(prt._d.maxImageHeight != 'fullscreen' || _s.fullScreen) _s.imageHolder_do.setOverflow('visible');
FWDAnimation.killTweensOf(_s.image_do);
FWDAnimation.killTweensOf(_s.imageHolder_do);
if(animate){
FWDAnimation.to(_s.imageHolder_do, _s.transitionDuration, {x:_s.borderSize, y:_s.borderSize, w:_s.finalW - _s.borderSize * 2, h:_s.finalH - _s.borderSize * 2, ease:_s.transitionType_str});
if(prt._d.maxImageHeight == 'fullscreen' || _s.fullScreen){
FWDAnimation.to(_s.image_do, _s.transitionDuration, {x:(prt.stageW - _s.imageFinalW)/2, y:(prt.stageH - _s.imageFinalH)/2, w:_s.imageFinalW - _s.borderSize * 2, h:_s.imageFinalH - _s.borderSize * 2, ease:_s.transitionType_str});
}else{
FWDAnimation.to(_s.image_do, _s.transitionDuration, {
x:-_s.offsetWidth,
y:0,
w:_s.finalW - _s.borderSize * 2 + _s.offsetWidth * 2,
h:_s.finalH - _s.borderSize * 2,
ease:_s.transitionType_str});
}
}else{
_s.imageHolder_do.setX(_s.borderSize);
_s.imageHolder_do.setY(_s.borderSize);
_s.imageHolder_do.setWidth(_s.finalW - _s.borderSize * 2);
_s.imageHolder_do.setHeight(_s.finalH - _s.borderSize * 2);
if(prt._d.maxImageHeight == 'fullscreen' || _s.fullScreen){
_s.image_do.setX((prt.stageW - _s.imageFinalW)/2);
_s.image_do.setY((prt.stageH - _s.imageFinalH)/2);
_s.image_do.setWidth(_s.imageFinalW - _s.borderSize * 2 + _s.offsetWidth);
_s.image_do.setHeight(_s.imageFinalH - _s.borderSize * 2);
}else{
_s.image_do.setX(-_s.offsetWidth);
_s.image_do.setY(0);
_s.image_do.setWidth(_s.finalW - _s.borderSize * 2 + _s.offsetWidth);
_s.image_do.setHeight(_s.finalH - _s.borderSize * 2);
}
}
}
if(prt._d.maxImageHeight == 'fullscreen' || _s.finalW >= prt.stageW){
_s.setOverflow('hidden');
}else{
_s.setOverflow('visible');
}
_s.resizeReflection(animate);
}
_s.prevW = _s.finalW;
_s.prevH = _s.finalH;
_s.getTextHeight = function(){
_s.curThumbnailTextContentHeight = Math.round(_s.textHolder_do.screen.clientHeight);
return _s.curThumbnailTextContentHeight;
};
_s.addLinkSupport = function(){
_s.screen.addEventListener("click", function(e){
if(!_s.allowToOpenLink_bl || _s.id != prt.curId) return;
var viewportMouseCoordinates = FWDSISCUtils.getViewportMouseCoordinates(e);
if(FWDSISCUtils.hitTest(_s.imageHolder_do.screen, viewportMouseCoordinates.screenX, viewportMouseCoordinates.screenY)){
window.open(_s.link, _s.target);
}
});
}
// Add image.
_s.setImage = function(image){
_s.imageHolder_do = new FWDSISCDisplayObject("div");
_s.imageHolder_do.getStyle().backgroundColor = _s.backgroundColor;
_s.imageHolder_do.screen.className = 'image-background';
_s.image_do = new FWDSISCDisplayObject("img");
_s.image_do.setScreen(image);
_s.image_do.setSelectable(false);
_s.image_do.screen.addEventListener("contextmenu", function(e){
if(e.preventDefault) e.preventDefault();
});
_s.imageHolder_do.addChild(_s.image_do);
_s.addChild(_s.imageHolder_do);
_s.addChild(_s.mainTextHolder_do);
if(_s.maximizeOnSingleClick){
_s.addSingleClickSupport();
}
if(prt._d.maxImageHeight == 'fullscreen' || _s.fullScreen){
if(prt.imageShowType == 'mask'){
_s.imageHolder_do.setX(prt.stageW/2);
_s.imageHolder_do.setY(prt.stageH/2);
_s.image_do.setX(-_s.imageFinalW /2 + _s.borderSize);
_s.image_do.setY(-_s.imageFinalH /2 + _s.borderSize);
_s.image_do.setWidth(_s.imageFinalW - _s.borderSize * 2 + _s.offsetWidth);
_s.image_do.setHeight(_s.imageFinalH - _s.borderSize * 2);
FWDAnimation.to(_s.image_do, .8, {x:(prt.stageW - _s.imageFinalW)/2, y:(prt.stageH - _s.imageFinalH)/2, ease:Expo.easeInOut});
FWDAnimation.to(_s.imageHolder_do, .8, {x:_s.borderSize, y:_s.borderSize, w:prt.stageW - _s.borderSize * 2, h:prt.stageH - _s.borderSize * 2,
ease:Expo.easeInOut, onComplete:function(){ if(prt._d.maxImageHeight != 'fullscreen') _s.imageHolder_do.setOverflow('visible')}});
}else{
_s.imageHolder_do.setX(_s.borderSize);
_s.imageHolder_do.setY(_s.borderSize);
_s.imageHolder_do.setWidth(prt.stageW - _s.borderSize * 2);
_s.imageHolder_do.setHeight(prt.stageH - _s.borderSize * 2);
_s.image_do.setX((prt.stageW - _s.imageFinalW)/2);
_s.image_do.setY((prt.stageH - _s.imageFinalH)/2);
_s.image_do.setWidth(_s.imageFinalW - _s.borderSize * 2 + _s.offsetWidth);
_s.image_do.setHeight(_s.imageFinalH - _s.borderSize * 2);
_s.image_do.setAlpha(0);
FWDAnimation.to(_s.image_do, 1, {alpha:1, ease:Quint.easeOut});
}
}else{
if(prt.imageShowType == 'mask'){
_s.imageHolder_do.setX(_s.finalW/2);
_s.imageHolder_do.setY(_s.finalH/2);
_s.image_do.setX(-_s.finalW /2 + _s.borderSize);
_s.image_do.setY(-_s.finalH /2 + _s.borderSize);
_s.image_do.setWidth(_s.finalW - _s.borderSize * 2 + _s.offsetWidth);
_s.image_do.setHeight(_s.finalH - _s.borderSize * 2);
FWDAnimation.to(_s.image_do, .8, {x:0, y:0, ease:Expo.easeInOut});
FWDAnimation.to(_s.imageHolder_do, .8, {x:_s.borderSize, y:_s.borderSize, w:_s.finalW - _s.borderSize * 2, h:_s.finalH - _s.borderSize * 2,
ease:Expo.easeInOut, onComplete:function(){
if(prt._d.maxImageHeight != 'fullscreen'){
_s.imageHolder_do.setOverflow('visible');
}
_s.removeChild(_s.background_do);
}});
}else{
_s.imageHolder_do.setX(_s.borderSize);
_s.imageHolder_do.setY(_s.borderSize);
_s.imageHolder_do.setWidth(_s.finalW - _s.borderSize * 2);
_s.imageHolder_do.setHeight(_s.finalH - _s.borderSize * 2);
_s.image_do.setWidth(_s.finalW - _s.borderSize * 2 + _s.offsetWidth);
_s.image_do.setHeight(_s.finalH - _s.borderSize * 2);
_s.image_do.setAlpha(0);
FWDAnimation.to(_s.image_do, 1, {alpha:1, ease:Quint.easeOut});
}
}
if(_s.overlayColor_str.length > 1) _s.setupOverlay();
if(_s.showImageReflection_bl) _s.addReflection();
if(prt.id == _s.id) _s.disable();
};
_s.addReflection = function(){
var imgW = _s.finalW - _s.borderSize * 2;
var imgH = _s.finalH - _s.borderSize * 2;
_s.reflHolder_do = new FWDSISCDisplayObject("div");
_s.reflHolder_do.setButtonMode('false');
_s.reflCanvas_do = new FWDSISCDisplayObject("canvas");
_s.reflHolder_do.addChild(_s.reflCanvas_do);
_s.reflCanvas_do.screen.width = _s.finalW;
_s.reflCanvas_do.screen.height = _s.finalH;
var context = _s.reflCanvas_do.screen.getContext("2d");
context.save();
context.translate(0, _s.finalH);
context.scale(1, -1);
if(!_s.borderSize){
_s.borderColor_str = "transparent"
}
context.fillStyle = _s.borderColor_str;
context.fillRect(0, 0, _s.finalW, _s.finalH);
context.drawImage(_s.image_do.screen, _s.borderSize, _s.borderSize, imgW, imgH);
context.restore();
context.globalCompositeOperation = "destination-out";
var gradient = context.createLinearGradient(0, 0, 0, prt._d.reflectionHeight);
if(FWDSISCUtils.isIE){
gradient.addColorStop(0, "black");
gradient.addColorStop(1, "white");
}else{
gradient.addColorStop(0, "rgba(255, 255, 255, .7");
gradient.addColorStop(1, "rgba(255, 255, 255, 1)");
}
context.fillStyle = gradient;
context.fillRect(0, 0, _s.finalScaledW, _s.finalScaledH);
_s.resizeReflection(false);
_s.addChildAt(_s.reflHolder_do, 0);
if(_s.finalX > -_s.finalW && _s.finalX < prt.stageW){
if(prt.imageShowType == 'mask'){
_s.reflHolder_do.setX(_s.finalW/2);
_s.reflHolder_do.setY(_s.finalH/2 + _s.finalH);
_s.reflHolder_do.setWidth(0);
_s.reflHolder_do.setHeight(0);
_s.reflCanvas_do.setX(-_s.finalW /2);
_s.reflCanvas_do.setY(-_s.finalH /2);
FWDAnimation.to(_s.reflCanvas_do, .8, {x:0, y:0, ease:Expo.easeInOut});
FWDAnimation.to(_s.reflHolder_do, .8, {x:0, y:_s.finalH, w:_s.finalW, h:_s.finalH, ease:Expo.easeInOut});
}else{
FWDAnimation.killTweensOf(_s.reflCanvas_do);
FWDAnimation.to(_s.reflCanvas_do, .8, {x:0, y:0, ease:Expo.easeInOut});
}
}
};
_s.resizeReflection = function(animate){
if(_s.showImageReflection_bl && _s.reflCanvas_do){
FWDAnimation.killTweensOf(_s.reflCanvas_do);
FWDAnimation.killTweensOf(_s.reflHolder_do);
if(animate){
FWDAnimation.to(_s.reflCanvas_do, _s.transitionDuration, {w:_s.finalW, h:_s.finalH, ease:_s.transitionType_str});
FWDAnimation.to(_s.reflHolder_do, _s.transitionDuration, {y:_s.finalH, w:_s.finalW, h:_s.finalH, ease:_s.transitionType_str});
}else{
_s.reflHolder_do.setWidth(_s.finalW );
_s.reflHolder_do.setHeight(_s.finalH);
_s.reflHolder_do.setX(0);
_s.reflHolder_do.setY(_s.finalH);
_s.reflCanvas_do.setWidth(_s.finalW + _s.offsetWidth * 2);
_s.reflCanvas_do.setHeight(_s.finalH);
_s.reflCanvas_do.setX(0);
_s.reflCanvas_do.setY(0);
}
}
}
// Setup overlay.
_s.setupOverlay = function(){
_s.overlay_do = new FWDSISCDisplayObject("div");
_s.overlay_do.screen.className = 'overlay';
_s.overlay_do.screen.style.pointerEvents = 'none';
_s.overlay_do.setBkColor(_s.overlayColor_str);
_s.overlay_do.setY(_s.borderSize);
if(prt.spaceBetweenImages == 0){
_s.overlay_do.setWidth(_s.finalW - _s.borderSize * 2);
}else{
_s.overlay_do.setWidth(_s.finalW - (_s.borderSize * 2) + (_s.offsetWidth * 2));
_s.overlay_do.setX(_s.borderSize - _s.offsetWidth);
}
_s.overlay_do.setHeight(_s.finalH - _s.borderSize * 2);
if(_s.id == prt.curId) _s.overlay_do.setAlpha(0);
_s.addChild(_s.overlay_do);
_s.addChild(_s.mainTextHolder_do);
_s.overlay_do.setAlpha(0);
if(_s.id != prt.curId) FWDAnimation.to(_s.overlay_do, .8, {alpha:1, delay:.1});
}
_s.onTouchStartHandler = function(e){
_s.dispatchEvent(FWDSISCThumb.MOVE_VERTICAL, {id:_s.id});
}
_s.onMouseOverHandler = function(e){
if(prt.checkIfThubsTween()) return;
_s.dispatchEvent(FWDSISCThumb.HOVER);
_s.dispatchEvent(FWDSISCThumb.MOVE_VERTICAL, {id:_s.id});
if(_s.isDisabled_bl) return;
if(!e.pointerType || e.pointerType == e.MSPOINTER_TYPE_MOUSE){
_s.setSelectedState(true);
}
};
_s.onMouseOutHandler = function(e){
if(prt.checkIfThubsTween()) return;
if(_s.isDisabled_bl) return;
if(!e.pointerType || e.pointerType == e.MSPOINTER_TYPE_MOUSE){
_s.setNormalState(true);
}
};
_s.onMouseClickHandler = function(e){
if(_s.isDisabled_bl || prt.checkIfThubsTween()) return;
_s.dispatchEvent(FWDSISCThumb.CLICK, {id:_s.id});
};
// Add single click support.
_s.addSingleClickSupport = function(){
if(_s.isMobile_bl){
_s.image_do.screen.addEventListener("touchstart", _s.setStartEvent);
_s.screen.addEventListener("touchstart", _s.setStartEvent);
_s.image_do.screen.addEventListener("touchend", _s.singleClickHandler);
_s.screen.addEventListener("touchend", _s.singleClickHandler);
}else{
_s.image_do.screen.addEventListener("click", _s.singleClickHandler);
_s.screen.addEventListener("click", _s.singleClickHandler);
}
}
_s.setStartEvent = function(e){
_s.e = e;
}
_s.singleClickHandler = function(e){
e = e;
if(_s.e) e = _s.e;
if(_s.id == prt.curId && !prt.isStillTransitioning_bl && _s.maximizeOnSingleClick && !prt.isDragging_bl){
_s.dispatchEvent(FWDSISCThumb.MAXIMIZE_SINGLE_CLICK, {e:e});
}
}
// Set normal/selected display states.
_s.setNormalState = function(animate){
if(!_s.isSelected_bl || _s.id == prt.curId) return;
_s.isSelected_bl = false;
FWDAnimation.killTweensOf(_s.overlay_do);
FWDAnimation.killTweensOf(_s.mainTextHolder_do);
if(_s.overlay_do){
FWDAnimation.to(_s.overlay_do, .8, {alpha:1, delay:.05, ease:Quint.easeOut});
}
if(_s.HTMLTextPosition_str == 'outside'){
if(_s.id != prt.curId){
FWDAnimation.to(_s.mainTextHolder_do, .8, {alpha:.4, delay:.05, ease:Quint.easeOut});
}
}
};
_s.setSelectedState = function(animate){
if(_s.isSelected_bl || _s.id == prt.curId) return;
_s.isSelected_bl = true;
FWDAnimation.killTweensOf(_s.overlay_do);
FWDAnimation.killTweensOf(_s.mainTextHolder_do);
if(_s.overlay_do){
FWDAnimation.to(_s.overlay_do, .8, {alpha:0, delay:.05, ease:Quint.easeOut});
}
if(_s.HTMLTextPosition_str == 'outside'){
if(_s.id != prt.curId){
FWDAnimation.to(_s.mainTextHolder_do, .8, {alpha:1, delay:.05, ease:Quint.easeOut});
}
}
};
// Show/hide thumb.
_s.show = function(animate){
FWDAnimation.killTweensOf(_s);
if(animate){
FWDAnimation.to(_s, _s.transitionDuration, {y:0, ease:_s.transitionType_str});
}else{
_s.setY(0);
}
};
_s.hide = function(animate){
FWDAnimation.killTweensOf(_s);
if(animate){
FWDAnimation.to(_s, _s.transitionDuration, {y:_s.imageOffsetBottom + _s.imageH + 2});
}else{
_s.setY(_s.imageOffsetBottom + _s.imageH + 2);
}
};
_s.init();
};
// Set prototype.
FWDSISCThumb.setPrototype = function(){
FWDSISCThumb.prototype = new FWDSISCDisplayObject("div");
};
FWDSISCThumb.HOVER = "onHover";
FWDSISCThumb.CLICK = "onClick";
FWDSISCThumb.DOUBLE_CLICK = "onDoubleClick";
FWDSISCThumb.MOVE_VERTICAL = 'onMoveVertical';
FWDSISCThumb.MAXIMIZE_SINGLE_CLICK = 'maximizeSingleClick';
FWDSISCThumb.IFRAME = "iframe";
FWDSISCThumb.IMAGE = "image";
FWDSISCThumb.FLASH = "flash";
FWDSISCThumb.AUDIO = "audio";
FWDSISCThumb.VIDEO = "video";
FWDSISCThumb.VIMEO= "vimeo";
FWDSISCThumb.YOUTUBE = "youtube";
FWDSISCThumb.MAPS = "maps";
FWDSISCThumb.AJAX = "ajax";
FWDSISCThumb.HTML = "html";
FWDSISCThumb.prototype = null;
window.FWDSISCThumb = FWDSISCThumb;
}(window));/**
* Simple Image Slider Carousel PACKAGED v3.0
* Slideshow time manager.
*
* @author Tibi - FWDesign [https://webdesign-flash.ro/]
* Copyright © 2006 All Rights Reserved.
*/
(function(window){
'use strict';
var FWDSISCTimerManager = function(delay){
var _s = this;
var prototpype = FWDSISCTimerManager.prototype;
_s.timeOutId;
_s.delay = delay;
_s.isStopped_bl = true;
_s.stop = function(){
if(_s.isStopped_bl) return;
_s.pause();
_s.isStopped_bl = true;
_s.dispatchEvent(FWDSISCTimerManager.STOP);
};
_s.start = function(){
if(!_s.isStopped_bl) return;
_s.isStopped_bl = false;
_s.timeOutId = setTimeout(_s.onTimeHanlder, _s.delay);
_s.dispatchEvent(FWDSISCTimerManager.START);
};
_s.pause = function(){
if(_s.isStopped_bl) return;
clearTimeout(_s.timeOutId);
_s.dispatchEvent(FWDSISCTimerManager.PAUSE);
};
_s.resume = function(){
if(_s.isStopped_bl) return;
clearTimeout(_s.timeOutId);
_s.timeOutId = setTimeout(_s.onTimeHanlder, _s.delay);
_s.dispatchEvent(FWDSISCTimerManager.RESUME);
};
_s.onTimeHanlder = function(){
_s.dispatchEvent(FWDSISCTimerManager.TIME);
};
};
FWDSISCTimerManager.setPrototype = function(){
FWDSISCTimerManager.prototype = new FWDSISCEventDispatcher();
};
FWDSISCTimerManager.START = "start";
FWDSISCTimerManager.STOP = "stop";
FWDSISCTimerManager.RESUME = "resume";
FWDSISCTimerManager.PAUSE = "pause";
FWDSISCTimerManager.TIME = "time";
FWDSISCTimerManager.prototype = null;
window.FWDSISCTimerManager = FWDSISCTimerManager;
}(window));/**
* Simple Image Slider Carousel PACKAGED v3.0
* Transform display object.
*
* @author Tibi - FWDesign [https://webdesign-flash.ro/]
* Copyright © 2006 All Rights Reserved.
*/
(function (window){
'use strict';
/*
* @ type values: div, img.
* @ positon values: relative, absolute.
* @ positon values: hidden.
* @ display values: block, inline-block, _s applies only if the position is relative.
*/
var FWDSISCTransformDisplayObject = function(type, position, overflow, display){
var _s = this;
_s.listeners = {events_ar:[]};
if(type == "div" || type == "img" || type == "canvas"){
_s.type = type;
}else{
throw Error("Type is not valid! " + type);
}
_s.children_ar = [];
_s.position = position || "absolute";
_s.overflow = overflow || "hidden";
_s.display = display || "block";
_s.visible = true;
_s.buttonMode;
_s.x = 0;
_s.y = 0;
_s.scale = 1;
_s.rotation = 0;
_s.w = 0;
_s.h = 0;
_s.rect;
_s.alpha = 1;
_s.innerHTML = "";
_s.opacityType = "";
_s.isHtml5_bl = false;
_s.hasTransform2d_bl = FWDSISCUtils.hasTransform2d;
// Initialize.
_s.init = function(){
_s.setScreen();
};
// Check if it supports transforms.
_s.getTransform = function() {
var properties = ['transform', 'msTransform', 'WebkitTransform', 'MozTransform', 'OTransform'];
var p;
while (p = properties.shift()) {
if (typeof _s.screen.style[p] !== 'undefined') {
return p;
}
}
return false;
};
// Set opacity type.
_s.getOpacityType = function(){
var opacityType;
if (typeof _s.screen.style.opacity != "undefined") {//ie9+
opacityType = "opacity";
}else{ //ie8
opacityType = "filter";
}
return opacityType;
};
// Setup main screen.
_s.setScreen = function(element){
if(_s.type == "img" && element){
_s.screen = element;
_s.setMainProperties();
}else{
_s.screen = document.createElement(_s.type);
_s.setMainProperties();
}
};
// Set main properties.
_s.setMainProperties = function(){
_s.transform = _s.getTransform();
_s.setPosition(_s.position);
_s.setOverflow(_s.overflow);
_s.opacityType = _s.getOpacityType();
if(_s.opacityType == "opacity") _s.isHtml5_bl = true;
if(_s.opacityType == "filter") _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";
if(type == "img"){
_s.setWidth(_s.screen.width);
_s.setHeight(_s.screen.height);
_s.screen.onmousedown = function(e){return false;};
}
};
_s.setBackfaceVisibility = function(){
_s.screen.style.backfaceVisibility = "visible";
_s.screen.style.webkitBackfaceVisibility = "visible";
_s.screen.style.MozBackfaceVisibility = "visible";
};
_s.removeBackfaceVisibility = function(){
_s.screen.style.backfaceVisibility = "hidden";
_s.screen.style.webkitBackfaceVisibility = "hidden";
_s.screen.style.MozBackfaceVisibility = "hidden";
};
// Set / get various props.
_s.setSelectable = function(val){
if(!val){
try{_s.screen.style.userSelect = "none";}catch(e){};
try{_s.screen.style.MozUserSelect = "none";}catch(e){};
try{_s.screen.style.webkitUserSelect = "none";}catch(e){};
try{_s.screen.style.khtmlUserSelect = "none";}catch(e){};
try{_s.screen.style.oUserSelect = "none";}catch(e){};
try{_s.screen.style.msUserSelect = "none";}catch(e){};
try{_s.screen.msUserSelect = "none";}catch(e){};
_s.screen.ondragstart = function(e){return false;};
_s.screen.onselectstart = function(){return false;};
_s.screen.style.webkitTouchCallout='none';
}
};
_s.getScreen = function(){
return _s.screen;
};
_s.setVisible = function(val){
_s.visible = val;
if(_s.visible == true){
_s.screen.style.visibility = "visible";
}else{
_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(val){
_s.overflow = val;
_s.screen.style.overflow = _s.overflow;
};
_s.setPosition = function(val){
_s.position = val;
_s.screen.style.position = _s.position;
};
_s.setDisplay = function(val){
_s.display = val;
_s.screen.style.display = _s.display;
};
_s.setButtonMode = function(val){
_s.buttonMode = val;
if(_s.buttonMode == true){
_s.screen.style.cursor = "pointer";
}else{
_s.screen.style.cursor = "default";
}
};
_s.setBkColor = function(val){
_s.screen.style.backgroundColor = val;
};
_s.setInnerHTML = function(val){
_s.innerHTML = val;
_s.screen.innerHTML = _s.innerHTML;
};
_s.getInnerHTML = function(){
return _s.innerHTML;
};
_s.getRect = function(){
return _s.screen.getBoundingClientRect();
};
_s.setAlpha = function(val){
_s.alpha = val;
if(_s.opacityType == "opacity"){
_s.screen.style.opacity = _s.alpha;
}else if(_s.opacityType == "filter"){
_s.screen.style.filter = "alpha(opacity=" + _s.alpha * 100 + ")";
_s.screen.style.filter = "progid:DXImageTransform.Microsoft.Alpha(Opacity=" + Math.round(_s.alpha * 100) + ")";
}
};
_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(val){
_s.x = val;
if(_s.hasTransform2d_bl){
_s.screen.style[_s.transform] = "translate(" + _s.x + "px," + _s.y + "px) scale(" + _s.scale + " , " + _s.scale + ") rotate(" + _s.rotation + "deg)";
}else{
_s.screen.style.left = _s.x + "px";
}
};
_s.getX = function(){
return _s.x;
};
_s.setY = function(val){
_s.y = val;
if(_s.hasTransform2d_bl){
_s.screen.style[_s.transform] = "translate(" + _s.x + "px," + _s.y + "px) scale(" + _s.scale + " , " + _s.scale + ") rotate(" + _s.rotation + "deg)";
}else{
_s.screen.style.top = _s.y + "px";
}
};
_s.getY = function(){
return _s.y;
};
_s.setScale2 = function(val){
_s.scale = val;
if(_s.hasTransform2d_bl){
_s.screen.style[_s.transform] = "translate(" + _s.x + "px," + _s.y + "px) scale(" + _s.scale + " , " + _s.scale + ") rotate(" + _s.rotation + "deg)";
}
};
_s.getScale = function(){
return _s.scale;
};
_s.setRotation = function(val){
_s.rotation = val;
if(_s.hasTransform2d_bl){
_s.screen.style[_s.transform] = "translate(" + _s.x + "px," + _s.y + "px) scale(" + _s.scale + " , " + _s.scale + ") rotate(" + _s.rotation + "deg)";
}
};
_s.setWidth = function(val){
_s.w = val;
if(_s.type == "img"){
_s.screen.width = _s.w;
}else{
_s.screen.style.width = _s.w + "px";
}
};
_s.getWidth = function(){
if(_s.type == "div"){
if(_s.screen.offsetWidth != 0) return _s.screen.offsetWidth;
return _s.w;
}else if(_s.type == "img"){
if(_s.screen.offsetWidth != 0) return _s.screen.offsetWidth;
if(_s.screen.width != 0) return _s.screen.width;
return _s._w;
}else if( _s.type == "canvas"){
if(_s.screen.offsetWidth != 0) return _s.screen.offsetWidth;
return _s.w;
}
};
_s.setHeight = function(val){
_s.h = val;
if(_s.type == "img"){
_s.screen.height = _s.h;
}else{
_s.screen.style.height = _s.h + "px";
}
};
_s.getHeight = function(){
if(_s.type == "div"){
if(_s.screen.offsetHeight != 0) return _s.screen.offsetHeight;
return _s.h;
}else if(_s.type == "img"){
if(_s.screen.offsetHeight != 0) return _s.screen.offsetHeight;
if(_s.screen.height != 0) return _s.screen.height;
return _s.h;
}else if(_s.type == "canvas"){
if(_s.screen.offsetHeight != 0) return _s.screen.offsetHeight;
return _s.h;
}
};
_s.getNumChildren = function(){
return _s.children_ar.length;
};
// DOM list.
_s.addChild = function(e){
if(_s.contains(e)){
_s.children_ar.splice(FWDSISCUtils.indexOfArray(_s.children_ar, e), 1);
_s.children_ar.push(e);
_s.screen.appendChild(e.screen);
}else{
_s.children_ar.push(e);
_s.screen.appendChild(e.screen);
}
};
_s.removeChild = function(e){
if(_s.contains(e)){
_s.children_ar.splice(FWDSISCUtils.indexOfArray(_s.children_ar, e), 1);
_s.screen.removeChild(e.screen);
}else{
throw Error("##removeChild()## Child doesn't exist, it can't be removed!");
};
};
_s.contains = function(e){
if(FWDSISCUtils.indexOfArray(_s.children_ar, e) == -1){
return false;
}else{
return true;
}
};
_s.addChildAtZero = function(e){
if(_s.numChildren == 0){
_s.children_ar.push(e);
_s.screen.appendChild(e.screen);
}else{
_s.screen.insertBefore(e.screen, _s.children_ar[0].screen);
if(_s.contains(e)){_s.children_ar.splice(FWDSISCUtils.indexOfArray(_s.children_ar, e), 1);}
_s.children_ar.unshift(e);
}
};
_s.getChildAt = function(index){
if(index < 0 || index > _s.numChildren -1) throw Error("##getChildAt()## Index out of bounds!");
if(_s.numChildren == 0) throw Errror("##getChildAt## Child dose not exist!");
return _s.children_ar[index];
};
_s.removeChildAtZero = function(){
_s.screen.removeChild(_s.children_ar[0].screen);
_s.children_ar.shift();
};
// Event dispatcher.
_s.addListener = function (type, listener){
if(type == undefined) throw Error("type is required.");
if(typeof type === "object") throw Error("type must be of type String.");
if(typeof listener != "function") throw Error("listener must be of type Function.");
var event = {};
event.type = type;
event.listener = listener;
event.target = _s;
_s.listeners.events_ar.push(event);
};
_s.dispatchEvent = function(type, props){
if(type == undefined) throw Error("type is required.");
if(typeof type === "object") throw Error("type must be of type String.");
for (var i=0, len=_s.listeners.events_ar.length; i < len; i++){
if(_s.listeners.events_ar[i].target === _s && _s.listeners.events_ar[i].type === type){
if(props){
for(var prop in props){
_s.listeners.events_ar[i][prop] = props[prop];
}
}
_s.listeners.events_ar[i].listener.call(_s, _s.listeners.events_ar[i]);
break;
}
}
};
_s.removeListener = function(type, listener){
if(type == undefined) throw Error("type is required.");
if(typeof type === "object") throw Error("type must be of type String.");
if(typeof listener != "function") throw Error("listener must be of type Function." + type);
for (var i=0, len=_s.listeners.events_ar.length; i < len; i++){
if(_s.listeners.events_ar[i].target === _s
&& _s.listeners.events_ar[i].type === type
&& _s.listeners.events_ar[i].listener === listener
){
_s.listeners.events_ar.splice(i,1);
break;
}
}
};
// Destroy methods.
_s.disposeImage = function(){
if(_s.type == "img") _s.screen.src = null;
};
_s.destroy = function(){
try{_s.screen.parentNode.removeChild(_s.screen);}catch(e){};
_s.screen.onselectstart = null;
_s.screen.ondragstart = null;
_s.screen.ontouchstart = null;
_s.screen.ontouchmove = null;
_s.screen.ontouchend = null;
_s.screen.onmouseover = null;
_s.screen.onmouseout = null;
_s.screen.onmouseup = null;
_s.screen.onmousedown = null;
_s.screen.onmousemove = null;
_s.screen.onclick = null;
delete _s.screen;
delete _s.style;
delete _s.rect;
delete _s.selectable;
delete _s.buttonMode;
delete _s.position;
delete _s.overflow;
delete _s.visible;
delete _s.innerHTML;
delete _s.numChildren;
delete _s.x;
delete _s.y;
delete _s.w;
delete _s.h;
delete _s.opacityType;
delete _s.isHtml5_bl;
delete _s.hasTransform2d_bl;
_s.children_ar = null;
_s.style = null;
_s.screen = null;
_s.numChildren = null;
_s.transform = null;
_s.position = null;
_s.overflow = null;
_s.display= null;
_s.visible= null;
_s.buttonMode = null;
_s.globalX = null;
_s.globalY = 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;
};
// Init.
_s.init();
};
window.FWDSISCTransformDisplayObject = FWDSISCTransformDisplayObject;
}(window));/**
* Simple Image Slider Carousel PACKAGED v3.0
* Utils.
*
* @author Tibi - FWDesign [https://webdesign-flash.ro/]
* Copyright © 2006 All Rights Reserved.
*/
(function (window){
'use strict';
var FWDSISCUtils = function(){};
FWDSISCUtils.dumy = document.createElement("div");
// Strings.
FWDSISCUtils.trim = function(str){
return str.replace(/\s/gi, "");
};
FWDSISCUtils.trimAndFormatUrl = function(str){
str = str.toLocaleLowerCase();
str = str.replace(/ /g, "-");
return str;
};
FWDSISCUtils.splitAndTrim = function(str, trim_bl){
var array = str.split(",");
var length = array.length;
for(var i=0; i<length; i++){
if(trim_bl) array[i] = FWDSISCUtils.trim(array[i]);
};
return array;
};
FWDSISCUtils.formatTime = function(secs){
var hours = Math.floor(secs / (60 * 60));
var divisor_for_minutes = secs % (60 * 60);
var minutes = Math.floor(divisor_for_minutes / 60);
var divisor_for_seconds = divisor_for_minutes % 60;
var seconds = Math.ceil(divisor_for_seconds);
minutes = (minutes >= 10) ? minutes : "0" + minutes;
seconds = (seconds >= 10) ? seconds : "0" + seconds;
if(isNaN(seconds)) return "00:00";
if(_s.hasHours_bl){
return hours + ":" + minutes + ":" + seconds;
}else{
return minutes + ":" + seconds;
}
};
FWDSISCUtils.unescapeHtml = function(html){
var el = document.createElement('div');
return html.replace(/\&[#0-9a-z]+;/gi, function (enc) {
el.innerHTML = enc;
return el.innerText
});
}
FWDSISCUtils.getSecondsFromString = function(str){
var hours = 0;
var minutes = 0;
var seconds = 0;
var duration = 0;
if(!str) return undefined;
str = str.split(":");
hours = str[0];
if(hours[0] == "0" && hours[1] != "0"){
hours = parseInt(hours[1]);
}
if(hours == "00") hours = 0;
minutes = str[1];
if(minutes[0] == "0" && minutes[1] != "0"){
minutes = parseInt(minutes[1]);
}
if(minutes == "00") minutes = 0;
secs = parseInt(str[2].replace(/,.*/ig, ""));
if(secs[0] == "0" && secs[1] != "0"){
secs = parseInt(secs[1]);
}
if(secs == "00") secs = 0;
if(hours != 0){
duration += (hours * 60 * 60)
}
if(minutes != 0){
duration += (minutes * 60)
}
duration += secs;
return duration;
};
// Array.
FWDSISCUtils.indexOfArray = function(array, prop){
var length = array.length;
for(var i=0; i<length; i++){
if(array[i] === prop) return i;
};
return -1;
};
FWDSISCUtils.randomizeArray = function(aArray) {
var randomizedArray = [];
var copyArray = aArray.concat();
var length = copyArray.length;
for(var i=0; i< length; i++) {
var index = Math.floor(Math.random() * copyArray.length);
randomizedArray.push(copyArray[index]);
copyArray.splice(index,1);
}
return randomizedArray;
};
// DOM manipulation.
FWDSISCUtils.prt = function (e, n){
if(n === undefined) n = 1;
while(n-- && e) e = e.parentNode;
if(!e || e.nodeType !== 1) return null;
return e;
};
FWDSISCUtils.sibling = function(e, n){
while (e && n !== 0){
if(n > 0){
if(e.nextElementSibling){
e = e.nextElementSibling;
}else{
for(var e = e.nextSibling; e && e.nodeType !== 1; e = e.nextSibling);
}
n--;
}else{
if(e.previousElementSibling){
e = e.previousElementSibling;
}else{
for(var e = e.previousSibling; e && e.nodeType !== 1; e = e.previousSibling);
}
n++;
}
}
return e;
};
FWDSISCUtils.getChildAt = function (e, n){
var kids = FWDSISCUtils.getChildren(e);
if(n < 0) n += kids.length;
if(n < 0) return null;
return kids[n];
};
FWDSISCUtils.getChildById = function(id){
return document.getElementById(id) || undefined;
};
FWDSISCUtils.getChildren = function(e, allNodesTypes){
var kids = [];
for(var c = e.firstChild; c != null; c = c.nextSibling){
if(allNodesTypes){
kids.push(c);
}else if(c.nodeType === 1){
kids.push(c);
}
}
return kids;
};
FWDSISCUtils.getChildrenFromAttribute = function(e, attr, allNodesTypes){
var kids = [];
for(var c = e.firstChild; c != null; c = c.nextSibling){
if(allNodesTypes && FWDSISCUtils.hasAttribute(c, attr)){
kids.push(c);
}else if(c.nodeType === 1 && FWDSISCUtils.hasAttribute(c, attr)){
kids.push(c);
}
}
return kids.length == 0 ? undefined : kids;
};
FWDSISCUtils.getChildFromNodeListFromAttribute = function(e, attr, allNodesTypes){
for(var c = e.firstChild; c != null; c = c.nextSibling){
if(allNodesTypes && FWDSISCUtils.hasAttribute(c, attr)){
return c;
}else if(c.nodeType === 1 && FWDSISCUtils.hasAttribute(c, attr)){
return c;
}
}
return undefined;
};
FWDSISCUtils.getAttributeValue = function(e, attr){
if(!FWDSISCUtils.hasAttribute(e, attr)) return undefined;
return e.getAttribute(attr);
};
FWDSISCUtils.hasAttribute = function(e, attr){
if(e.hasAttribute){
return e.hasAttribute(attr);
}else {
var test = e.attributes[attr];
return test ? true : false;
}
};
FWDSISCUtils.insertNodeAt = function(prt, child, n){
var children = FWDSISCUtils.children(prt);
if(n < 0 || n > children.length){
throw new Error("invalid index!");
}else {
prt.insertBefore(child, children[n]);
};
};
FWDSISCUtils.hasCanvas = function(){
return Boolean(document.createElement("canvas"));
};
FWDSISCUtils.getCanvasWithModifiedColor = function(img, hexColor, returnImage){
if(!img) return;
var newImage;
var canvas = document.createElement("canvas");
var ctx = canvas.getContext("2d");
var originalPixels = null;
var currentPixels = null;
var long = parseInt(hexColor.replace(/^#/, ""), 16);
var hexColorRGB = {
R: (long >>> 16) & 0xff,
G: (long >>> 8) & 0xff,
B: long & 0xff
};
canvas.style.position = "absolute";
canvas.style.left = "0px";
canvas.style.top = "0px";
canvas.style.margin = "0px";
canvas.style.padding = "0px";
canvas.style.maxWidth = "none";
canvas.style.maxHeight = "none";
canvas.style.border = "none";
canvas.style.lineHeight = "1";
canvas.style.backgroundColor = "transparent";
canvas.style.backfaceVisibility = "hidden";
canvas.style.webkitBackfaceVisibility = "hidden";
canvas.style.MozBackfaceVisibility = "hidden";
canvas.style.MozImageRendering = "optimizeSpeed";
canvas.style.WebkitImageRendering = "optimizeSpeed";
canvas.width = img.width;
canvas.height = img.height;
ctx.drawImage(img, 0, 0, img.naturalWidth, img.naturalHeight, 0, 0, img.width, img.height);
originalPixels = ctx.getImageData(0, 0, img.width, img.height);
currentPixels = ctx.getImageData(0, 0, img.width, img.height);
for(var I = 0, L = originalPixels.data.length; I < L; I += 4){
if(currentPixels.data[I + 3] > 0) // If it's not a transparent pixel
{
currentPixels.data[I] = originalPixels.data[I] / 255 * hexColorRGB.R;
currentPixels.data[I + 1] = originalPixels.data[I + 1] / 255 * hexColorRGB.G;
currentPixels.data[I + 2] = originalPixels.data[I + 2] / 255 * hexColorRGB.B;
}
}
ctx.globalAlpha = .5;
ctx.putImageData(currentPixels, 0, 0);
ctx.drawImage(canvas, 0, 0);
if(returnImage){
newImage = new Image();
newImage.src = canvas.toDataURL();
}
return {canvas:canvas, image:newImage};
};
FWDSISCUtils.changeCanvasHEXColor = function(img, canvas, hexColor, returnNewImage){
if(!img) return;
var canvas = canvas;
var ctx = canvas.getContext("2d");
var originalPixels = null;
var currentPixels = null;
var long = parseInt(hexColor.replace(/^#/, ""), 16);
var hexColorRGB = {
R: (long >>> 16) & 0xff,
G: (long >>> 8) & 0xff,
B: long & 0xff
};
canvas.width = img.width;
canvas.height = img.height;
ctx.drawImage(img, 0, 0, img.naturalWidth, img.naturalHeight, 0, 0, img.width, img.height);
originalPixels = ctx.getImageData(0, 0, img.width, img.height);
currentPixels = ctx.getImageData(0, 0, img.width, img.height);
for(var I = 0, L = originalPixels.data.length; I < L; I += 4){
if(currentPixels.data[I + 3] > 0) // If it's not a transparent pixel
{
currentPixels.data[I] = originalPixels.data[I] / 255 * hexColorRGB.R;
currentPixels.data[I + 1] = originalPixels.data[I + 1] / 255 * hexColorRGB.G;
currentPixels.data[I + 2] = originalPixels.data[I + 2] / 255 * hexColorRGB.B;
}
}
ctx.globalAlpha = .5;
ctx.putImageData(currentPixels, 0, 0);
ctx.drawImage(canvas, 0, 0);
if(returnNewImage){
var newImage = new Image();
newImage.src = canvas.toDataURL();
return newImage;
}
}
// DOM geometry.
FWDSISCUtils.hitTest = function(target, x, y, fixed){
var hit = false;
if(!target) throw Error("Hit test target is null!");
var rect = target.getBoundingClientRect();
if(fixed){
if(x >= rect.left && x <= rect.left +(rect.right - rect.left) && y >= rect.top && y <= rect.top + (rect.bottom - rect.top)) return true;
}else{
if(x > rect.left && x < rect.left +(rect.right - rect.left) && y > rect.top && y < rect.top + (rect.bottom - rect.top)) return true;
}
return false;
};
FWDSISCUtils.getScrollOffsets = function(){
// All browsers.
if(window.pageXOffset != null) return{x:window.pageXOffset, y:window.pageYOffset};
// e7/ie8.
if(document.compatMode == "CSS1Compat"){
return({x:document.documentElement.scrollLeft, y:document.documentElement.scrollTop});
}
};
FWDSISCUtils.getViewportSize = function(){
if(FWDSISCUtils.hasPointerEvent && navigator.msMaxTouchPoints > 1){
return {w:document.documentElement.clientWidth || window.innerWidth, h:document.documentElement.clientHeight || window.innerHeight};
}
if(FWDSISCUtils.isMobile) return {w:window.innerWidth, h:window.innerHeight};
return {w:document.documentElement.clientWidth || window.innerWidth, h:document.documentElement.clientHeight || window.innerHeight};
};
FWDSISCUtils.getViewportMouseCoordinates = function(e){
var offsets = FWDSISCUtils.getScrollOffsets();
if(e.touches){
return{
screenX:e.touches[0] == undefined ? e.touches.pageX - offsets.x :e.touches[0].pageX - offsets.x,
screenY:e.touches[0] == undefined ? e.touches.pageY - offsets.y :e.touches[0].pageY - offsets.y
};
}
return{
screenX: e.clientX == undefined ? e.pageX - offsets.x : e.clientX,
screenY: e.clientY == undefined ? e.pageY - offsets.y : e.clientY
};
};
// Browsers tests.
FWDSISCUtils.hasPointerEvent = (function(){
return Boolean(window.navigator.msPointerEnabled) || Boolean(window.navigator.pointerEnabled);
}());
FWDSISCUtils.isMobile = (function (){
if((FWDSISCUtils.hasPointerEvent && navigator.msMaxTouchPoints > 1) || (FWDSISCUtils.hasPointerEvent && navigator.maxTouchPoints > 1)) return true;
var agents = ['android', 'webos', 'iphone', 'ipad', 'blackberry', 'kfsowi'];
for(var i in agents) {
if(navigator.userAgent.toLowerCase().indexOf(agents[i]) != -1) {
return true;
}
}
if(navigator.platform.toLowerCase() === 'macintel' && navigator.maxTouchPoints > 1 && !window.MSStream) return true;
return false;
}());
FWDSISCUtils.isAndroid = (function(){
return (navigator.userAgent.toLowerCase().indexOf("android".toLowerCase()) != -1);
}());
FWDSISCUtils.hasWEBGL = (function(){
try{
var canvas = document.createElement( 'canvas' );
return !! window.WebGLRenderingContext && (
canvas.getContext( 'webgl' ) || canvas.getContext( 'experimental-webgl' ) );
}catch( e ) { return false; }
}());
FWDSISCUtils.isLocal = (function(){
if(document.location.protocol == "file:"){
return true;
}else{
return false;
}
}());
FWDSISCUtils.isIOS = (function(){
return navigator.userAgent.match(/(iPad|iPhone|iPod)/g);
}());
FWDSISCUtils.isMAC = (function(){
return navigator.appVersion.toLowerCase().indexOf('macintosh') != -1;
}());
FWDSISCUtils.isChrome = (function(){
return navigator.userAgent.toLowerCase().indexOf('chrome') != -1;
}());
FWDSISCUtils.isSafari = (function(){
return navigator.userAgent.toLowerCase().indexOf('safari') != -1 && navigator.userAgent.toLowerCase().indexOf('chrome') == -1;
}());
FWDSISCUtils.isOpera = (function(){
return navigator.userAgent.toLowerCase().indexOf('opr') != -1;
}());
FWDSISCUtils.isFirefox = (function(){
return navigator.userAgent.toLowerCase().indexOf('firefox') != -1;
}());
FWDSISCUtils.isIEWebKit = (function(){
return Boolean(document.documentElement.msRequestFullscreen);
}());
FWDSISCUtils.isIE = (function(){
var isIE = Boolean(navigator.userAgent.toLowerCase().indexOf('msie') != -1) || Boolean(navigator.userAgent.toLowerCase().indexOf('edge') != -1);
return isIE || Boolean(document.documentElement.msRequestFullscreen);
}());
FWDSISCUtils.isIEAndLessThen9 = (function(){
return Boolean(navigator.userAgent.toLowerCase().indexOf("msie 7") != -1) || Boolean(navigator.userAgent.toLowerCase().indexOf("msie 8") != -1);
}());
FWDSISCUtils.isIE7 = (function(){
return Boolean(navigator.userAgent.toLowerCase().indexOf("msie 7") != -1);
}());
FWDSISCUtils.isApple = (function(){
return Boolean(navigator.appVersion.toLowerCase().indexOf('mac') != -1);
}());
FWDSISCUtils.isIphone = (function(){
return navigator.userAgent.match(/(iPhone|iPod)/g);
}());
FWDSISCUtils.hasFullScreen = (function(){
return FWDSISCUtils.dumy.requestFullScreen || FWDSISCUtils.dumy.mozRequestFullScreen || FWDSISCUtils.dumy.webkitRequestFullScreen || FWDSISCUtils.dumy.msieRequestFullScreen;
}());
function get3d(){
if(FWDSISCUtils.hasTransform3d){
return true;
}
var properties = ['transform', 'msTransform', 'WebkitTransform', 'MozTransform', 'OTransform', 'KhtmlTransform'];
var p;
var position;
while (p = properties.shift()) {
if (typeof FWDSISCUtils.dumy.style[p] !== 'undefined') {
FWDSISCUtils.dumy.style.position = "absolute";
position = FWDSISCUtils.dumy.getBoundingClientRect().left;
FWDSISCUtils.dumy.style[p] = 'translate3d(500px, 0px, 0px)';
position = Math.abs(FWDSISCUtils.dumy.getBoundingClientRect().left - position);
if(position > 100 && position < 900){
try{document.documentElement.removeChild(FWDSISCUtils.dumy);}catch(e){}
return true;
}
}
}
try{document.documentElement.removeChild(FWDSISCUtils.dumy);}catch(e){}
};
function get2d(){
var properties = ['transform', 'msTransform', 'WebkitTransform', 'MozTransform', 'OTransform', 'KhtmlTransform'];
var p;
while (p = properties.shift()) {
if (typeof FWDSISCUtils.dumy.style[p] !== 'undefined') {
return true;
}
}
try{document.documentElement.removeChild(FWDSISCUtils.dumy);}catch(e){}
return false;
};
// Media.
FWDSISCUtils.volumeCanBeSet = (function(){
var soundTest_el = document.createElement("audio");
if(!soundTest_el) return;
soundTest_el.volume = 0;
return soundTest_el.volume == 0 ? true : false;
}());
FWDSISCUtils.getVideoFormat = (function(){
var video = document.createElement("video");
if(!video.canPlayType) return;
var extention_str;
if(video.canPlayType("video/mp4") == "probably" || video.canPlayType("video/mp4") == "maybe"){
extention_str = ".mp4";
}else if(video.canPlayType("video/ogg") == "probably" || video.canPlayType("video/ogg") == "maybe"){
extention_str = ".ogg";
}else if(video.canPlayType("video/webm") == "probably" || video.canPlayType("video/webm") == "maybe"){
extention_str = ".webm";
}
video = null;
return extention_str;
})();
// Various utils.
FWDSISCUtils.onReady = function(callbalk){
if (document.addEventListener) {
window.addEventListener("DOMContentLoaded", function(){
FWDSISCUtils.hasFullScreen = FWDSISCUtils.checkIfHasFullscreen();
callbalk();
});
}else{
document.onreadystatechange = function () {
FWDSISCUtils.hasFullScreen = FWDSISCUtils.checkIfHasFullscreen();
if (document.readyState == "complete") callbalk();
};
}
};
FWDSISCUtils.checkIfHasTransforms = function(){
if(FWDSISCUtils.isReadyMethodCalled_bl) return;
document.documentElement.appendChild(FWDSISCUtils.dumy);
FWDSISCUtils.hasTransform3d = get3d();
FWDSISCUtils.hasTransform2d = get2d();
FWDSISCUtils.isReadyMethodCalled_bl = true;
};
FWDSISCUtils.checkIfHasFullscreen = function(){
return Boolean(document.documentElement.requestFullScreen
|| document.documentElement.mozRequestFullScreen
|| document.documentElement.webkitRequestFullScreen
|| document.documentElement.msRequestFullscreen);
};
FWDSISCUtils.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 false;};
};
FWDSISCUtils.getUrlArgs = function urlArgs(string){
var args = {};
var query = string.substr(string.indexOf("?") + 1) || location.search.substring(1);
query = query.replace(/(\?*)(\/*)/g, "");
var pairs = query.split("&");
for(var i=0; i< pairs.length; i++){
var pos = pairs[i].indexOf("=");
var name = pairs[i].substring(0,pos);
var value = pairs[i].substring(pos + 1);
value = decodeURIComponent(value);
args[name] = value;
}
return args;
};
FWDSISCUtils.getHashUrlArgs = function urlArgs(string){
var args = {};
var query = string.substr(string.indexOf("#") + 1) || location.search.substring(1);
query = query.replace(/(\?*)(\/*)/g, "");
var pairs = query.split("&");
for(var i=0; i< pairs.length; i++){
var pos = pairs[i].indexOf("=");
var name = pairs[i].substring(0,pos);
var value = pairs[i].substring(pos + 1);
value = decodeURIComponent(value);
args[name] = value;
}
return args;
};
FWDSISCUtils.validateEmail = function(mail){
if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(mail)){
return true;
}
return false;
};
FWDSISCUtils.isReadyMethodCalled_bl = false;
window.FWDSISCUtils = FWDSISCUtils;
}(window));
(function() {
var lastTime = 0;
var vendors = ['ms', 'moz', 'webkit', 'o'];
for(var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {
window.requestAnimationFrame = window[vendors[x]+'RequestAnimationFrame'];
window.cancelAnimationFrame = window[vendors[x]+'CancelAnimationFrame']
|| window[vendors[x]+'CancelRequestAnimationFrame'];
}
if (!window.requestAnimationFrame)
window.requestAnimationFrame = function(callback, element) {
var currTime = new Date().getTime();
var timeToCall = Math.max(0, 16 - (currTime - lastTime));
var id = window.setTimeout(function() { callback(currTime + timeToCall); },
timeToCall);
lastTime = currTime + timeToCall;
return id;
};
if (!window.cancelAnimationFrame)
window.cancelAnimationFrame = function(id) {
clearTimeout(id);
};
}());/**
* Simple Image Slider Carousel PACKAGED v3.0
* Simple button.
*
* @author Tibi - FWDesign [https://webdesign-flash.ro/]
* Copyright © 2006 All Rights Reserved.
*/
(function (window){
'use strict';
var FWDSISCSimpleButton = function(prt,
nImg,
sPath,
dPath,
alwaysShowSelectedPath,
useHEXColorsForSkin_bl,
normalButtonsColor_str,
selectedButtonsColor_str,
iconCSSString,
normalClassName,
selectedCalssName){
var _s = this;
var prototype = FWDSISCSimpleButton.prototype;
_s.iconCSSString = iconCSSString;
_s.normalClassName = normalClassName;
_s.selectedCalssName = selectedCalssName;
_s.nImg = nImg;
_s.sPath_str = sPath;
_s.dPath_str = dPath;
_s.toolTipLabel_str;
_s.totalWidth = _s.nImg.width;
_s.totalHeight = _s.nImg.height;
_s.useHEXColorsForSkin_bl = useHEXColorsForSkin_bl;
_s.normalButtonsColor_str = normalButtonsColor_str;
_s.selectedButtonsColor_str = selectedButtonsColor_str;
_s.isShowed_bl = true;
_s.isMobile_bl = FWDSISCUtils.isMobile;
_s.hasPointerEvent_bl = FWDSISCUtils.hasPointerEvent;
_s.allowToCreateSecondButton_bl = true;
_s.useFonticon_bl = Boolean(_s.iconCSSString);
/**
* Initialize.
*/
_s.init = function(){
_s.setupMainContainers();
};
/**
* Setup main containers.
*/
_s.setupMainContainers = function(){
if(_s.useFonticon_bl){
_s.n_do = new FWDSISCDisplayObject("div");
_s.n_do.setInnerHTML(_s.iconCSSString);
_s.addChild(_s.n_do);
_s.setNormalState(false);
_s.setFinalSize();
_s.setOverflow('visible');
}else{
_s.n_sdoHolder = new FWDSISCDisplayObject("div");
_s.n_sdoHolder.setOverflow("visible");
if(_s.useHEXColorsForSkin_bl){
_s.n_sdo = new FWDSISCTransformDisplayObject("div");
_s.n_sdo.setWidth(_s.totalWidth);
_s.n_sdo.setHeight(_s.totalHeight);
_s.n_sdo_canvas = FWDSISCUtils.getCanvasWithModifiedColor(_s.nImg, _s.normalButtonsColor_str).canvas;
_s.n_sdo.screen.appendChild(_s.n_sdo_canvas);
}else{
_s.n_sdo = new FWDSISCTransformDisplayObject("img");
_s.n_sdo.setScreen(_s.nImg);
}
if(_s.allowToCreateSecondButton_bl){
_s.img1 = new Image();
_s.img1.src = _s.sPath_str;
var img2 = new Image();
_s.sImg = img2;
if(_s.useHEXColorsForSkin_bl){
_s.s_sdo = new FWDSISCTransformDisplayObject("div");
_s.s_sdo.setWidth(_s.totalWidth);
_s.s_sdo.setHeight(_s.totalHeight);
_s.img1.onload = function(){
_s.s_sdo_canvas = FWDSISCUtils.getCanvasWithModifiedColor(_s.img1, _s.selectedButtonsColor_str).canvas;
_s.s_sdo.screen.appendChild(_s.s_sdo_canvas);
}
_s.addChild(_s.s_sdo);
}else{
_s.s_sdo = new FWDSISCDisplayObject("img");
_s.s_sdo.setScreen(_s.img1);
_s.s_sdo.setWidth(_s.totalWidth);
_s.s_sdo.setHeight(_s.totalHeight);
_s.addChild(_s.s_sdo);
}
if(_s.dPath_str){
img2.src = _s.dPath_str;
_s.d_sdo = new FWDSISCDisplayObject("img");
_s.d_sdo.setScreen(img2);
_s.d_sdo.setWidth(_s.totalWidth);
_s.d_sdo.setHeight(_s.totalHeight);
_s.d_sdo.setX(-100);
_s.addChild(_s.d_sdo);
};
}
_s.addChild(_s.n_sdoHolder);
_s.n_sdoHolder.addChild(_s.n_sdo);
_s.setWidth(_s.totalWidth);
_s.setHeight(_s.totalHeight);
}
_s.setButtonMode(true);
_s.screen.style.yellowOverlayPointerEvents = "none";
if(_s.isMobile_bl){
if(_s.hasPointerEvent_bl){
_s.screen.addEventListener("pointerup", _s.onMouseUp);
_s.screen.addEventListener("pointerover", _s.onMouseOver);
_s.screen.addEventListener("pointerout", _s.onMouseOut);
}else{
_s.screen.addEventListener("touchend", _s.onMouseUp);
}
}else if(_s.screen.addEventListener){
_s.screen.addEventListener("mouseover", _s.onMouseOver);
_s.screen.addEventListener("mouseout", _s.onMouseOut);
_s.screen.addEventListener("mouseup", _s.onMouseUp);
}else if(_s.screen.attachEvent){
_s.screen.attachEvent("onmouseover", _s.onMouseOver);
_s.screen.attachEvent("onmouseout", _s.onMouseOut);
_s.screen.attachEvent("onmouseup", _s.onMouseUp);
}
};
_s.onMouseOver = function(e){
_s.dispatchEvent(FWDSISCSimpleButton.SHOW_TOOLTIP, {e:e});
if(_s.isDisabledForGood_bl) return;
if(!e.pointerType || e.pointerType == e.MSPOINTER_TYPE_MOUSE || e.pointerType == "mouse"){
if(_s.isDisabled_bl || _s.isSelectedFinal_bl) return;
_s.dispatchEvent(FWDSISCSimpleButton.MOUSE_OVER, {e:e});
_s.setSelectedState(true);
}
};
_s.onMouseOut = function(e){
if(_s.isDisabledForGood_bl) return;
if(!e.pointerType || e.pointerType == e.MSPOINTER_TYPE_MOUSE || e.pointerType == "mouse"){
if(_s.isDisabled_bl || _s.isSelectedFinal_bl) return;
_s.dispatchEvent(FWDSISCSimpleButton.MOUSE_OUT, {e:e});
_s.setNormalState(true);
}
};
_s.onMouseUp = function(e){
if(_s.isDisabledForGood_bl) return;
if(e.preventDefault) e.preventDefault();
if(_s.isDisabled_bl || e.button == 2) return;
if(!_s.isMobile_bl) _s.setSelectedState(true);
_s.dispatchEvent(FWDSISCSimpleButton.MOUSE_UP, {e:e});
};
_s.checkCount = 0;
_s.setFinalSize = function(){
clearInterval(_s.checkId_int);
if(_s.checkCount > 5) return;
_s.lastWidth = _s.n_do.screen.offsetWidth;
_s.checkCount +=1;
_s.checkId_int = setInterval(function(){
_s.setFinalSize();
},100);
if(_s.prevWidth == _s.lastWidth || _s.lastWidth == 0) return;
_s.setWidth(_s.n_do.screen.offsetWidth);
_s.setHeight(_s.n_do.screen.offsetHeight);
_s.n_do.setWidth(_s.w);
_s.n_do.setHeight(_s.h);
_s.buttonWidth = _s.w;
_s.buttonHeight = _s.h;
_s.totalWidth = _s.w;
_s.totalHeight = _s.h;
if(_s.hd_do){
_s.hd_do.setX(_s.w - _s.hd_do.w + 2);
_s.hd_do.setY( -2);
}
_s.prevWidth = _s.lastWidth;
}
/**
* Set normal / selected state.
*/
_s.setNormalState = function(animate){
if(_s.useFonticon_bl){
FWDAnimation.killTweensOf(_s.n_do.screen);
if(animate){
FWDAnimation.to(_s.n_do.screen, .8, {className:_s.normalClassName, ease:Expo.easeOut});
}else{
_s.n_do.screen.className = _s.normalClassName;
}
}else{
FWDAnimation.killTweensOf(_s.n_sdoHolder);
FWDAnimation.to(_s.n_sdoHolder, .5, {alpha:1, ease:Expo.easeOut});
}
};
_s.setSelectedState = function(animate){
if(_s.useFonticon_bl){
FWDAnimation.killTweensOf(_s.n_do.screen);
if(animate){
FWDAnimation.to(_s.n_do.screen, .8, {className:_s.selectedCalssName, ease:Expo.easeOut});
}else{
_s.n_do.screen.className = _s.selectedCalssName;
}
}else{
FWDAnimation.killTweensOf(_s.n_sdoHolder);
if(animate){
FWDAnimation.to(_s.n_sdoHolder, .5, {alpha:0, delay:.1, ease:Expo.easeOut});
}else{
_s.n_sdoHolder.setAlpha(0);
}
}
};
/**
* Disable / enable.
*/
_s.setDisabledState = function(){
if(_s.isSetToDisabledState_bl) return;
_s.isSetToDisabledState_bl = true;
if(_s.d_sdo) _s.d_sdo.setX(0);
};
_s.setEnabledState = function(){
if(!_s.isSetToDisabledState_bl) return;
_s.isSetToDisabledState_bl = false;
if(_s.d_sdo) _s.d_sdo.setX(-100);
};
_s.disable = function(){
if(_s.isDisabledForGood_bl || _s.isDisabled_bl) return;
_s.isDisabled_bl = true;
_s.setButtonMode(false);
FWDAnimation.killTweensOf(_s);
FWDAnimation.to(_s, .6, {alpha:.4});
_s.setNormalState();
};
_s.enable = function(){
if(_s.isDisabledForGood_bl || !_s.isDisabled_bl) return;
_s.isDisabled_bl = false;
_s.setButtonMode(true);
FWDAnimation.killTweensOf(_s);
FWDAnimation.to(_s, .6, {alpha:1});
};
_s.disableForGood = function(){
_s.isDisabledForGood_bl = true;
_s.setButtonMode(false);
};
_s.showDisabledState = function(){
if(_s.d_sdo.x != 0) _s.d_sdo.setX(0);
};
_s.hideDisabledState = function(){
if(_s.d_sdo.x != -100) _s.d_sdo.setX(-100);
};
/**
* Show/hide.
*/
_s.show = function(animate){
if(_s.isShowed_bl) return;
_s.isShowed_bl = true;
var x;
x = 0;
FWDAnimation.killTweensOf(_s.n_do);
FWDAnimation.killTweensOf(_s.n_do);
if(prt.nextAndPrevButtonsPosition_str != "leftAndRight"){
if(animate){
FWDAnimation.to(_s.n_do, .8, {alpha:1, ease:Expo.easeInOut});
}else{
_s.n_do.setAlpha(1);
}
}
if(animate){
FWDAnimation.to(_s.n_do, .8, {x:x, ease:Expo.easeInOut});
}else{
_s.n_do.setX(x);
}
};
_s.hide = function(animate){
if(!_s.isShowed_bl) return;
_s.isShowed_bl = false;
var x;
if(_s.iconCSSString.indexOf('right') != -1){
x = _s.n_do.getWidth() + prt.horizontalButtonsOffset;
}else if(_s.iconCSSString.indexOf('left') != -1){
x = - _s.n_do.getWidth() - prt.horizontalButtonsOffset;
}
FWDAnimation.killTweensOf(_s.n_do);
if(prt.nextAndPrevButtonsPosition_str != "leftAndRight"){
if(animate){
FWDAnimation.to(_s.n_do, .8, {alpha:0, ease:Expo.easeInOut});
}else{
_s.n_do.setAlpha(0);
}
}
if(animate){
FWDAnimation.to(_s.n_do, .8, {x:x, ease:Expo.easeInOut});
}else{
_s.n_do.setX(x);
}
};
_s.show2 = function(dl){
if(_s.isShowed_bl) return;
_s.isShowed_bl = true;
FWDAnimation.killTweensOf(_s);
_s.setScale2(0);
if(dl === undefined) dl = .4;
if(dl == 0){
_s.setScale2(1);
_s.setVisible(true);
}else{
FWDAnimation.to(_s, .8, {scale:1, delay:dl, onStart:function(){_s.setVisible(true);}, ease:Elastic.easeOut});
}
};
_s.hide2 = function(overwrite){
if(!_s.isShowed_bl && !overwrite) return;
_s.isShowed_bl = false;
FWDAnimation.killTweensOf(_s);
_s.setVisible(false);
_s.setScale2(0);
};
/**
* Update HEX color of a canvaas.
*/
_s.updateHEXColors = function(normalColor_str, selectedColor_str){
FWDSISCUtils.changeCanvasHEXColor(_s.nImg, _s.n_sdo_canvas, normalColor_str);
FWDSISCUtils.changeCanvasHEXColor(_s.img1, _s.s_sdo_canvas, selectedColor_str);
}
_s.init();
};
/**
* Set prototype.
*/
FWDSISCSimpleButton.setPrototype = function(){
FWDSISCSimpleButton.prototype = null;
FWDSISCSimpleButton.prototype = new FWDSISCTransformDisplayObject("div");
};
FWDSISCSimpleButton.CLICK = "onClick";
FWDSISCSimpleButton.MOUSE_OVER = "onMouseOver";
FWDSISCSimpleButton.SHOW_TOOLTIP = "showTooltip";
FWDSISCSimpleButton.MOUSE_OUT = "onMouseOut";
FWDSISCSimpleButton.MOUSE_UP = "onMouseDown";
FWDSISCSimpleButton.prototype = null;
window.FWDSISCSimpleButton = FWDSISCSimpleButton;
}(window));/**
* Simple Image Slider Carousel PACKAGED v3.0
* Preloader and slideshow animation.
*
* @author Tibi - FWDesign [https://webdesign-flash.ro/]
* Copyright © 2006 All Rights Reserved.
*/
(function (window){
var FWDSISCSlideshowPreloader = function(prt, preloaderPostion, radius, backgroundColor, fillColor, strokeSize, animDuration, position){
'use strict';
var _s = this;
var prototype = FWDSISCSlideshowPreloader.prototype;
_s.preloaderPostion = preloaderPostion;
_s.bkClr = backgroundColor;
_s.fillClr = fillColor;
_s.radius = radius;
_s.strokeSize = strokeSize;
_s.animDur = animDuration || 3000;
_s.strtAngle = 270;
_s.cntAnim = 0;
_s.isShowed = true;
_s.angle = {n:0};
// Initialize.
_s.init = function(){
_s.getStyle().pointerEvents = 'none';
_s.mm_do = new FWDSISCDisplayObject("div");
_s.mm_do.setOverflow('visible');
_s.main_do = new FWDSISCDisplayObject("div");
_s.main_do.setOverflow("visible");
_s.main_do.setWidth(_s.radius * 2 + _s.strokeSize);
_s.main_do.setHeight(_s.radius * 2 + _s.strokeSize);
_s.setOverflow('visible');
_s.setWidth((_s.radius * 2) + _s.strokeSize);
_s.setHeight((_s.radius * 2) + _s.strokeSize);
_s.mm_do.setWidth(_s.w);
_s.mm_do.setHeight(_s.h);
_s.bkCanvas = new FWDSISCDisplayObject("canvas");
_s.bkCtx = _s.bkCanvas.screen.getContext('2d');
_s.fillCircleCanvas = new FWDSISCDisplayObject("canvas");
_s.fillCtx = _s.fillCircleCanvas.screen.getContext('2d');
if(_s.preloaderPostion == 'bottomright'){
var posCtId_int = setInterval(function(){
_s.positionAndResize();
if(!_s) clearInterval(posCtId_int);
});
}
_s.screen.style.transformOrigin = "50% 50%";
_s.main_do.screen.style.transformOrigin = "50% 50%";
_s.main_do.addChild(_s.bkCanvas);
_s.main_do.addChild(_s.fillCircleCanvas);
_s.mm_do.addChild(_s.main_do);
_s.addChild(_s.mm_do);
_s.drawBackground();
_s.drawFill();
_s.hide();
};
/**
* Set final size.
* @param {int} w
* @param {int} h
*/
_s.setFinalSize = function(w, h){
_s.main_do.setX(Math.round(w-_s.w)/2);
_s.main_do.setY(Math.round(h-_s.h)/2);
_s.setWidth(w);
_s.setHeight(h);
}
// Position and resize.
_s.positionAndResize = function(){
if(!position) return;
var paralax_bl = prt.prt && prt.prt.paralax_bl;
var offsetY = (paralax_bl ? prt.prt.pageYOffset/2 : 0);
var offsetY2 = 0;
if(FWDSISC.posCntDown){
if(_s.preloaderPostion == 'bottomleft' || _s.preloaderPostion == 'bottomright'){
offsetY2 = Math.round(FWDSISC._s.ws.h - prt.stageH)/2 * 2;
}else if(_s.preloaderPostion == 'center'){
offsetY2 = Math.round(FWDSISC._s.ws.h - prt.stageH)/2;
}
}
offsetY2 += parseInt(window.getComputedStyle(prt.main_do.screen)['padding-top']);
if(_s.preloaderPostion == 'bottomleft'){
_s.setX(10);
_s.setY(prt.stageH - _s.h - 10 - Math.round(offsetY) + offsetY2);
}else if(_s.preloaderPostion == 'bottomright'){
if(prt.cnt_do){
var cnt_do = prt.cnt_do;
var cntW = cnt_do.getWidth();
_s.setX(prt.stageW - _s.w - 6);
_s.setY(prt.stageH - _s.h - 5 - Math.round(offsetY));
_s.prevX = cnt_do.x;
}else{
_s.setX(prt.stageW - _s.w - 10);
_s.setY(prt.stageH - _s.h - 10 - Math.round(offsetY) + offsetY2);
}
}else if(_s.preloaderPostion == 'topright'){
_s.setX(prt.stageW - _s.w - 10);
_s.setY(10 - Math.round(offsetY));
}else if(_s.preloaderPostion == 'topleft'){
_s.setX(10);
_s.setY(10 - Math.round(offsetY))
}else if(_s.preloaderPostion == 'center'){
_s.setX(Math.round(prt.stageW - _s.w)/2);
var y = Math.round(prt.stageH - _s.h)/2 + offsetY2 - Math.round(offsetY)
y += prt.offsetParalaxPos;
_s.setY(y);
}
}
// Draw canvas background and fill.
_s.drawBackground = function(){
_s.bkCanvas.screen.width = (_s.radius * 2) + _s.strokeSize * 2;
_s.bkCanvas.screen.height = (_s.radius * 2) + _s.strokeSize * 2;
_s.bkCtx.lineWidth = _s.thicknessSize;
_s.bkCtx.translate(_s.strokeSize/2, _s.strokeSize/2);
_s.bkCtx.shadowColor = '#333333';
_s.bkCtx.shadowBlur = 1;
_s.bkCtx.lineWidth=_s.strokeSize;
_s.bkCtx.strokeStyle = _s.bkClr;
_s.bkCtx.beginPath();
_s.bkCtx.arc(_s.radius, _s.radius, _s.radius, (Math.PI/180) * 0, (Math.PI/180) * 360, false);
_s.bkCtx.stroke();
_s.bkCtx.closePath();
};
_s.drawFill = function(p){
if(p) _s.angle.n = Math.round(p * 360);
_s.fillCircleCanvas.screen.width = (_s.radius * 2) + _s.strokeSize * 2;
_s.fillCircleCanvas.screen.height = (_s.radius * 2) + _s.strokeSize * 2;
_s.fillCtx.lineWidth = _s.thicknessSize;
_s.fillCtx.translate(_s.strokeSize/2, _s.strokeSize/2);
_s.fillCtx.lineWidth=_s.strokeSize;
_s.fillCtx.strokeStyle = _s.fillClr;
_s.fillCtx.beginPath();
_s.fillCtx.arc(_s.radius, _s.radius, _s.radius, (Math.PI/180) * _s.strtAngle, (Math.PI/180) * (_s.strtAngle + _s.angle.n), false);
_s.fillCtx.stroke();
_s.fillCtx.closePath();
};
// Animtion logic.
_s.startSlideshow = function(o){
if(_s == null || _s.isSlideShowRun && !o) return;
_s.isSlideShowRun = true;
_s.resetSlideshow();
FWDAnimation.killTweensOf(_s.angle);
FWDAnimation.to(_s.angle, _s.animDur, {n:360, onUpdate:_s.drawFill, onComplete:_s.stopSlideshow});
};
_s.stopSlideshow = function(o, t){
if(!_s.isSlideShowRun && !o) return;
_s.isSlideShowRun = false;
FWDAnimation.killTweensOf(_s.angle);
FWDAnimation.to(_s.angle, o, {n:0, onUpdate:_s.drawFill, ease:t});
};
_s.resetSlideshow = function(){
FWDAnimation.killTweensOf(_s.angle);
_s.angle.n = 0;
_s.drawFill();
}
_s.killTween = function(){
FWDAnimation.killTweensOf(_s.angle);
}
_s.startPreloader = function(){
_s.stopPreloader();
_s.angle = {n:0};
FWDAnimation.to(_s.angle, _s.animDur, {n:360, onUpdate:_s.drawFill, repeat:100, yoyo:true, ease:Expo.easeInOut});
FWDAnimation.to(_s.main_do.screen, _s.animDur, {rotation:360, repeat:100});
}
_s.stopPreloader = function(){
FWDAnimation.killTweensOf(_s.angle);
FWDAnimation.killTweensOf(_s.main_do.screen);
FWDAnimation.to(_s.main_do.screen, 0.00001, {rotation:0});
}
// Show/hide logic.
_s.show = function(){
if(_s.isShowed) return;
_s.setVisible(true);
FWDAnimation.killTweensOf(_s.mm_do);
FWDAnimation.to(_s.mm_do, 1, {alpha:1, delay:.2});
_s.stopPreloader();
_s.startPreloader();
_s.isShowed = true;
};
_s.hide = function(animate){
if(!_s.isShowed) return;
FWDAnimation.killTweensOf(_s.mm_do);
if(animate){
FWDAnimation.to(_s.mm_do, .2, {alpha:0, onComplete:_s.onHideComplete});
}else{
_s.setVisible(false);
_s.mm_do.setAlpha(0);
}
_s.isShowed = false;
};
_s.show2 = function(){
if(_s.isShowed) return;
_s.isShowed = true;
_s.setVisible(true);
FWDAnimation.killTweensOf(_s.mm_do);
FWDAnimation.to(_s.mm_do, 1, {alpha:1, ease:Expo.easeOut});
}
_s.hide2 = function(){
if(!_s.isShowed) return;
_s.isShowed = false;
FWDAnimation.killTweensOf(_s.mm_do);
FWDAnimation.to(_s.mm_do, 1, {alpha:0, onComplete:_s.onHideComplete, ease:Expo.easeOut});
}
_s.onHideComplete = function(){
_s.setVisible(false);
_s.stopPreloader();
_s.dispatchEvent(FWDSISCSlideshowPreloader.HIDE_COMPLETE);
};
/**
* Set opacitiy when item is dragged.
* @param {String} inst
*/
_s.setHideDrag = function(hide){
FWDAnimation.killTweensOf(_s.main_do);
if(!hide){
FWDAnimation.to(_s.main_do, .4, {alpha:1});
}else{
FWDAnimation.to(_s.main_do, .4, {alpha:.3, delay:.4});
}
}
/**
* Update colors.
* @param {String} bkClr
* @param {String} fillClr
*/
_s.updateColors = function(bkClr, fillClr){
_s.bkClr = bkClr;
_s.fillClr = fillClr;
_s.bkCtx.strokeStyle = _s.bkClr;
_s.fillCtx.strokeStyle = _s.fillClr;
_s.drawBackground();
}
_s.init();
};
// Prototype.
FWDSISCSlideshowPreloader.setPrototype = function(){
FWDSISCSlideshowPreloader.prototype = new FWDSISCDisplayObject("div");
};
FWDSISCSlideshowPreloader.HIDE_COMPLETE = "hideComplete";
window.FWDSISCSlideshowPreloader = FWDSISCSlideshowPreloader;
}(window));
/**
* Simple Image Slider Carousel PACKAGED v3.0
* Slider image.
*
* @author Tibi - FWDesign [https://webdesign-flash.ro/]
* Copyright © 2006 All Rights Reserved.
*/
(function(window){
'use strict';
var FWDSISCThumb = function(
prt,
id,
transitionDuration,
transitionType_str,
animationTextType_str,
showHTMLTextContent_str,
HTMLTextPosition_str,
HTMLTextAlignment_str,
source,
imageW,
imageH,
imageBorderSize,
imageBorderRadius,
backgroundColor,
imageBorderColor,
overlayColor_str,
description_ar,
showImageReflection_bl,
link,
target,
maximizeOnSingleClick
){
var _s = this;
var prototype = FWDSISCThumb.prototype;
_s.source_str = source;
_s.animationTextType_str = animationTextType_str;
_s.HTMLTextPosition_str = HTMLTextPosition_str;
_s.HTMLTextAlignment_str = HTMLTextAlignment_str;
_s.borderColor_str = imageBorderColor;
_s.backgroundColor = backgroundColor;
_s.showHTMLTextContent_str = showHTMLTextContent_str;
_s.showImageReflection_bl = showImageReflection_bl;
_s.link = link;
_s.target = target;
_s.source = source
_s.maximizeOnSingleClick = maximizeOnSingleClick;
_s.id = id;
_s.finalId = id;
_s.borderSize = imageBorderSize;
_s.offsetWidth = prt.offsetWidth;
_s.borderRadius = imageBorderRadius;
_s.imageW = imageW;
_s.imageH = imageH;
_s.finalX = -1;
_s.finalY = -1;
_s.transitionDuration = transitionDuration;
_s.transitionType_str = transitionType_str;
_s.description_ar = description_ar;
_s.htmlContent_ar;
_s.showFirstTime_bl = true;
_s.hasPointerEvent_bl = FWDSISCUtils.hasPointerEvent;
_s.isMobile_bl = FWDSISCUtils.isMobile;
_s.overlayColor_str = overlayColor_str;
// Initialize.
_s.init = function(){
_s.setupScreen();
_s.addLinkSupport();
};
// Setup screen.
_s.setupScreen = function(){
_s.background_do = new FWDSISCDisplayObject("div");
if(_s.borderRadius) _s.getStyle().borderRadius = _s.borderRadius + "px";
if(_s.borderRadius) _s.getStyle().borderRadius = _s.borderRadius + "px";
if(_s.borderSize){
_s.background_do.setX(_s.borderSize);
_s.background_do.setY(_s.borderSize);
_s.border_do = new FWDSISCDisplayObject("div");
_s.border_do.screen.className = 'sisc-border';
_s.border_do.getStyle().backgroundColor = _s.borderColor_str;
_s.addChild(_s.border_do);
}
_s.background_do.getStyle().backgroundColor = _s.backgroundColor;
_s.background_do.screen.className = 'image-background';
_s.addChild(_s.background_do);
if(_s.isMobile_bl){
if(_s.hasPointerEvent_bl){
_s.screen.addEventListener("MSPointerUp", _s.onMouseClickHandler);
}
_s.screen.addEventListener("click", _s.onMouseClickHandler);
_s.screen.addEventListener("touchstart", _s.onTouchStartHandler);
}else if(_s.screen.addEventListener){
_s.screen.addEventListener("mouseover", _s.onMouseOverHandler);
_s.screen.addEventListener("mouseout", _s.onMouseOutHandler);
_s.screen.addEventListener("click", _s.onMouseClickHandler);
}
_s.mainTextHolder_do = new FWDSISCTransformDisplayObject("div", "relative");
if(_s.HTMLTextPosition_str == "outside"){
_s.mainTextHolder_do.screen.className = 'outside';
}else{
_s.mainTextHolder_do.screen.className = 'inside';
}
if(_s.HTMLTextAlignment_str == "top" && HTMLTextPosition_str == "inside"){
_s.mainTextHolder_do.screen.className = 'inside align-top';
}
_s.mainTextHolder_do.getStyle().transformOrigin = "0% 0%";
_s.mainTextHolder_do.setOverflow("hidden");
_s.textHolder_do = new FWDSISCTransformDisplayObject("div");
_s.textHolder_do.setOverflow("visible");
_s.textHolder_do.setAlpha(0);
_s.textHolder_do.getStyle().transformOrigin = "0% 0%";
_s.textHolder_do.getStyle().width = "100%";
if(_s.HTMLTextAlignment_str == "bottom"){
_s.textHolder_do.getStyle().top = 'auto';
_s.textHolder_do.getStyle().bottom = 0;
}
_s.mainTextHolder_do.addChild(_s.textHolder_do);
_s.addChild(_s.mainTextHolder_do);
_s.updateTextContent(_s.description_ar);
};
// Update text.
_s.updateTextContent = function(htmlContent_ar){
_s.htmlContent_ar = [];
for(var i=0; i<htmlContent_ar.length; i++){
var mainHtmlElement = new FWDSISCDisplayObject("div");
mainHtmlElement.getStyle().position = "relative";
mainHtmlElement.getStyle().overflow = 'visible';
mainHtmlElement.screen.className = 'fwd-holder';
mainHtmlElement.getStyle().width = "100%";
var childHtmlElement = new FWDSISCDisplayObject("div");
childHtmlElement.getStyle().position = "relative";
childHtmlElement.getStyle().width = "100%";
childHtmlElement.setInnerHTML(htmlContent_ar[i]);
mainHtmlElement.addChild(childHtmlElement);
_s.textHolder_do.addChild(mainHtmlElement);
_s.htmlContent_ar[i] = {mainHtmlElement:mainHtmlElement, childHtmlElement:childHtmlElement};
}
};
_s.animateTextContent = function(animate, removeDelay){
var dl = 0;
if(_s.showHTMLTextContent_str == "none"){
if(_s.textHolder_do.visible) _s.textHolder_do.setVisible(false);
return;
}else{
if(!_s.textHolder_do.visible) _s.textHolder_do.setVisible(true);
}
if(_s.showHTMLTextContent_str == "center"){
if(_s.id != prt.curId){
if(animate){
FWDAnimation.killTweensOf(_s.textHolder_do);
FWDAnimation.to(_s.textHolder_do, _s.transitionDuration, {alpha:0});
}else{
_s.textHolder_do.setAlpha(0);
}
}else{
if(animate){
var t = _s.transitionDuration
if(!prt.transitionedOnce){
dl = .8;
t = 1;
}
if(_s.showHTMLTextContent_str == "center"){
dl = .6;
if(animationTextType_str == FWDSISC.FADE){
var t = .8
dl = _s.transitionDuration;
if(!prt.transitionedOnce){
t = .8;
dl = .8;
}
}
}
if(removeDelay){
t = .8;
dl = 0;
_s.textHolder_do.setAlpha(0);
}
FWDAnimation.killTweensOf(_s.textHolder_do);
FWDAnimation.to(_s.textHolder_do, t, {alpha:1, delay:dl, ease:Expo.easeInOut});
}
}
}else{
if(!prt.transitionedOnce) dl = .8;
if(_s.textHolder_do.alpha == 0){
FWDAnimation.killTweensOf(_s.textHolder_do);
FWDAnimation.to(_s.textHolder_do, 1, {alpha:1, delay:dl, ease:Expo.easeInOut});
}
}
if(_s.id == prt.curId){
if(_s.link && _s.link != "none" && _s.link.length > 4){
setTimeout(function(){
_s.allowToOpenLink_bl = true;
}, 200);
if(!prt.addDragSupport_bl && !prt.displayVertical_bl) _s.setButtonMode(true);
}else{
_s.allowToOpenLink_bl = false;
if(!prt.addDragSupport_bl) _s.setButtonMode(false);
}
}else{
_s.allowToOpenLink_bl = false;
if(!prt.addDragSupport_bl && !prt.displayVertical_bl) _s.setButtonMode(true);
}
if(animationTextType_str == FWDSISC.FADE_FROM_BOTTOM_TO_TOP
|| animationTextType_str == FWDSISC.MOVE_FROM_LEFT_TO_RIGHT
){
if(animate) dl = .8;
if(removeDelay) dl = 0;
for(var i=0; i<_s.htmlContent_ar.length; i++){
var mainHtmlElement = _s.htmlContent_ar[i].mainHtmlElement;
var childHtmlElement = _s.htmlContent_ar[i].childHtmlElement;
FWDAnimation.killTweensOf(mainHtmlElement);
if(_s.finalX + _s.finalW >= 0 && _s.finalX < prt.stageW + _s.finalW){
if(_s.showHTMLTextContent_str == "all" && !_s.isTextContentShowed_bl){
if(!_s.isTextContentShowed_bl){
if(animationTextType_str == FWDSISC.FADE_FROM_BOTTOM_TO_TOP){
if(_s.textHolder_do.alpha == 0 || removeDelay){
_s.textHolder_do.setAlpha(1);
childHtmlElement.getStyle().opacity = "0";
if(_s.HTMLTextAlignment_str == "top"){
childHtmlElement.getStyle().top = '-20px';
}else{
childHtmlElement.getStyle().top = '20px';
}
FWDAnimation.to(childHtmlElement.screen, 1, {css:{opacity:1, top:0}, delay:dl, ease:Expo.easeInOut});
}
}
}
if(i == _s.htmlContent_ar.length - 1) _s.isTextContentShowed_bl = true;
}else if(_s.showHTMLTextContent_str == "center" && _s.id == prt.curId && animate){
if(!_s.isTextContentShowed_bl){
if(animationTextType_str == FWDSISC.FADE_FROM_BOTTOM_TO_TOP){
if(_s.textHolder_do.alpha == 0 || removeDelay){
var t = .8
dl = _s.transitionDuration;
if(!prt.transitionedOnce){
t = .8;
dl = .8;
}
if(prt.wasMaximized){
dl = 0;
}
childHtmlElement.getStyle().opacity = "0";
if(_s.HTMLTextAlignment_str == "top"){
childHtmlElement.getStyle().top = '-20px';
}else{
childHtmlElement.getStyle().top = '20px';
}
FWDAnimation.to(childHtmlElement.screen, t, {css:{opacity:1, top:0}, delay:dl, ease:Expo.easeInOut});
}
}
}
if(i == _s.htmlContent_ar.length - 1 && _s.id != prt.curId) _s.isTextContentShowed_bl = true;
}
}
dl += .2;
}
}
_s.showFirstTime_bl = false;
}
// Resize and position.
_s.stopTransition = function(){
FWDAnimation.killTweensOf(_s);
FWDAnimation.killTweensOf(_s.background_do);
if(_s.border_do) FWDAnimation.killTweensOf(_s.border_do);
}
_s.resizeImage = function(animate){
FWDAnimation.killTweensOf(_s);
FWDAnimation.killTweensOf(_s.background_do);
_s.offsetHeight = _s.finalH;
if(_s.HTMLTextPosition_str == 'inside'){
if(_s.showImageReflection_bl){
_s.offsetHeight = prt._d.reflectionHeight;
}else{
_s.offsetHeight = 0;
}
}
if(_s.border_do) FWDAnimation.killTweensOf(_s.border_do);
if(animate){
if(prt._d.maxImageHeight == 'fullscreen' || _s.fullScreen){
FWDAnimation.to(_s, _s.transitionDuration, {alpha:_s.finalAlpha, x:_s.finalX, y:0, w:_s.finalW, h:_s.finalH + _s.offsetHeight, ease:_s.transitionType_str, onComplete:_s.imageOnComplete});
}else{
FWDAnimation.to(_s, _s.transitionDuration, {alpha:_s.finalAlpha, x:_s.finalX, y:_s.finalY, w:_s.finalW, h:_s.finalH + _s.offsetHeight, ease:_s.transitionType_str, onComplete:_s.imageOnComplete});
}
FWDAnimation.to(_s.background_do, _s.transitionDuration, {w:_s.finalW - (_s.borderSize * 2), h:_s.finalH - (_s.borderSize * 2), ease:_s.transitionType_str});
if(_s.border_do) FWDAnimation.to(_s.border_do, _s.transitionDuration, {w:_s.finalW , h:_s.finalH, ease:_s.transitionType_str});
}else{
_s.setAlpha(_s.finalAlpha);
_s.setX(_s.finalX);
if(prt._d.maxImageHeight == 'fullscreen' || _s.fullScreen){
_s.setY(0);
}else{
_s.setY(_s.finalY);
}
_s.setWidth(_s.finalW);
_s.setHeight(_s.finalH + _s.offsetHeight);
if(_s.background_do){
_s.background_do.setWidth(_s.finalW - (_s.borderSize * 2));
_s.background_do.setHeight(_s.finalH - (_s.borderSize * 2));
}
if(_s.border_do){
_s.border_do.setWidth(_s.finalW);
_s.border_do.setHeight(_s.finalH);
}
}
if(_s.image_do){
_s.image_do.setAlpha(1);
}
_s.tempScale = Math.min(1, _s.finalTextScale);
if(prt._d.maxImageHeight == 'fullscreen' || _s.fullScreen){
_s.tempScale = 1;
}
if(_s.finalTextScale > 1){
_s.finalTextWidthScale = 1;
}
_s.textX = _s.borderSize;
_s.textY = _s.borderSize;
_s.textW = Math.round(_s.finalW * _s.finalTextWidthScale) - (_s.borderSize * 2) * _s.finalTextWidthScale;
_s.textH = Math.round(_s.finalH * _s.finalTextWidthScale) - (_s.borderSize * 2) * _s.finalTextWidthScale;
if(_s.HTMLTextPosition_str == 'outside'){
_s.textW = Math.round(_s.finalW * _s.finalTextWidthScale);
if(_s.finalTextWidth){
_s.textW = _s.finalTextWidth;
_s.tempScale = _s.finalW/_s.finalTextWidth
}
_s.textH = Math.round(_s.finalH * _s.finalTextWidthScale);
_s.textX = 0;
_s.textY = _s.finalH;
_s.textH = _s.textHolder_do.getHeight();
}
if(prt._d.maxImageHeight == 'fullscreen' || prt.displayVertical_bl){
_s.textW = _s.finalW - (_s.borderSize * 2);
_s.textH = _s.finalH - (_s.borderSize * 2);
_s.tempScale = 1;
}
_s.textX -= _s.offsetWidth;
_s.textW += _s.offsetWidth * 2;
if(animate){
if(_s.HTMLTextPosition_str == 'inside'){
FWDAnimation.to(_s.mainTextHolder_do, _s.transitionDuration, {
y:_s.textY,
w: _s.textW,
h: _s.textH,
scale:_s.tempScale,
ease:_s.transitionType_str});
}else{
FWDAnimation.to(_s.mainTextHolder_do, _s.transitionDuration, {
y:_s.textY,
scale:_s.tempScale,
ease:_s.transitionType_str});
}
}else{
_s.mainTextHolder_do.setX(_s.textX);
_s.mainTextHolder_do.setY(_s.textY);
_s.mainTextHolder_do.setWidth(_s.textW);
_s.mainTextHolder_do.setHeight(_s.textH);
if(_s.HTMLTextPosition_str == 'outside'){
setTimeout(function(){
_s.textH = _s.textHolder_do.getHeight();
_s.mainTextHolder_do.setHeight(_s.textH);
}, 50);
}
_s.mainTextHolder_do.setScale2(_s.tempScale);
}
if(_s.overlay_do){
var overlayAlpha = 0;
if(_s.id != prt.curId && !_s.hit){
overlayAlpha = 1;
}
FWDAnimation.killTweensOf(_s.overlay_do);
if(animate){
FWDAnimation.to(_s.overlay_do, _s.transitionDuration, {alpha:overlayAlpha, w:_s.finalW - _s.borderSize * 2 + _s.offsetWidth * 2, h:_s.finalH - _s.borderSize * 2, ease:_s.transitionType_str});
}else{
_s.overlay_do.setAlpha(overlayAlpha);
_s.overlay_do.setX(_s.borderSize);
_s.overlay_do.setY(_s.borderSize);
_s.overlay_do.setWidth(_s.finalW - _s.borderSize * 2 + _s.offsetWidth * 2);
_s.overlay_do.setHeight(_s.finalH - _s.borderSize * 2);
}
}
if(_s.HTMLTextPosition_str == 'outside'){
var textAlpha = 1;
if(_s.id != prt.curId && !_s.hit){
textAlpha = .3;
}
if(animate){
FWDAnimation.to(_s.mainTextHolder_do, _s.transitionDuration, {alpha:textAlpha, ease:_s.transitionType_str});
}else{
_s.mainTextHolder_do.setAlpha(textAlpha)
}
}
if(_s.prevW != _s.finalW && _s.prevH !=_s.finalH && _s.image_do ){
if(prt._d.maxImageHeight != 'fullscreen' || _s.fullScreen) _s.imageHolder_do.setOverflow('visible');
FWDAnimation.killTweensOf(_s.image_do);
FWDAnimation.killTweensOf(_s.imageHolder_do);
if(animate){
FWDAnimation.to(_s.imageHolder_do, _s.transitionDuration, {x:_s.borderSize, y:_s.borderSize, w:_s.finalW - _s.borderSize * 2, h:_s.finalH - _s.borderSize * 2, ease:_s.transitionType_str});
if(prt._d.maxImageHeight == 'fullscreen' || _s.fullScreen){
FWDAnimation.to(_s.image_do, _s.transitionDuration, {x:(prt.stageW - _s.imageFinalW)/2, y:(prt.stageH - _s.imageFinalH)/2, w:_s.imageFinalW - _s.borderSize * 2, h:_s.imageFinalH - _s.borderSize * 2, ease:_s.transitionType_str});
}else{
FWDAnimation.to(_s.image_do, _s.transitionDuration, {
x:-_s.offsetWidth,
y:0,
w:_s.finalW - _s.borderSize * 2 + _s.offsetWidth * 2,
h:_s.finalH - _s.borderSize * 2,
ease:_s.transitionType_str});
}
}else{
_s.imageHolder_do.setX(_s.borderSize);
_s.imageHolder_do.setY(_s.borderSize);
_s.imageHolder_do.setWidth(_s.finalW - _s.borderSize * 2);
_s.imageHolder_do.setHeight(_s.finalH - _s.borderSize * 2);
if(prt._d.maxImageHeight == 'fullscreen' || _s.fullScreen){
_s.image_do.setX((prt.stageW - _s.imageFinalW)/2);
_s.image_do.setY((prt.stageH - _s.imageFinalH)/2);
_s.image_do.setWidth(_s.imageFinalW - _s.borderSize * 2 + _s.offsetWidth);
_s.image_do.setHeight(_s.imageFinalH - _s.borderSize * 2);
}else{
_s.image_do.setX(-_s.offsetWidth);
_s.image_do.setY(0);
_s.image_do.setWidth(_s.finalW - _s.borderSize * 2 + _s.offsetWidth);
_s.image_do.setHeight(_s.finalH - _s.borderSize * 2);
}
}
}
if(prt._d.maxImageHeight == 'fullscreen' || _s.finalW >= prt.stageW){
_s.setOverflow('hidden');
}else{
_s.setOverflow('visible');
}
_s.resizeReflection(animate);
}
_s.prevW = _s.finalW;
_s.prevH = _s.finalH;
_s.getTextHeight = function(){
_s.curThumbnailTextContentHeight = Math.round(_s.textHolder_do.screen.clientHeight);
return _s.curThumbnailTextContentHeight;
};
_s.addLinkSupport = function(){
_s.screen.addEventListener("click", function(e){
if(!_s.allowToOpenLink_bl || _s.id != prt.curId) return;
var viewportMouseCoordinates = FWDSISCUtils.getViewportMouseCoordinates(e);
if(FWDSISCUtils.hitTest(_s.imageHolder_do.screen, viewportMouseCoordinates.screenX, viewportMouseCoordinates.screenY)){
window.open(_s.link, _s.target);
}
});
}
// Add image.
_s.setImage = function(image){
_s.imageHolder_do = new FWDSISCDisplayObject("div");
_s.imageHolder_do.getStyle().backgroundColor = _s.backgroundColor;
_s.imageHolder_do.screen.className = 'image-background';
_s.image_do = new FWDSISCDisplayObject("img");
_s.image_do.setScreen(image);
_s.image_do.setSelectable(false);
_s.image_do.screen.addEventListener("contextmenu", function(e){
if(e.preventDefault) e.preventDefault();
});
_s.imageHolder_do.addChild(_s.image_do);
_s.addChild(_s.imageHolder_do);
_s.addChild(_s.mainTextHolder_do);
if(_s.maximizeOnSingleClick){
_s.addSingleClickSupport();
}
if(prt._d.maxImageHeight == 'fullscreen' || _s.fullScreen){
if(prt.imageShowType == 'mask'){
_s.imageHolder_do.setX(prt.stageW/2);
_s.imageHolder_do.setY(prt.stageH/2);
_s.image_do.setX(-_s.imageFinalW /2 + _s.borderSize);
_s.image_do.setY(-_s.imageFinalH /2 + _s.borderSize);
_s.image_do.setWidth(_s.imageFinalW - _s.borderSize * 2 + _s.offsetWidth);
_s.image_do.setHeight(_s.imageFinalH - _s.borderSize * 2);
FWDAnimation.to(_s.image_do, .8, {x:(prt.stageW - _s.imageFinalW)/2, y:(prt.stageH - _s.imageFinalH)/2, ease:Expo.easeInOut});
FWDAnimation.to(_s.imageHolder_do, .8, {x:_s.borderSize, y:_s.borderSize, w:prt.stageW - _s.borderSize * 2, h:prt.stageH - _s.borderSize * 2,
ease:Expo.easeInOut, onComplete:function(){ if(prt._d.maxImageHeight != 'fullscreen') _s.imageHolder_do.setOverflow('visible')}});
}else{
_s.imageHolder_do.setX(_s.borderSize);
_s.imageHolder_do.setY(_s.borderSize);
_s.imageHolder_do.setWidth(prt.stageW - _s.borderSize * 2);
_s.imageHolder_do.setHeight(prt.stageH - _s.borderSize * 2);
_s.image_do.setX((prt.stageW - _s.imageFinalW)/2);
_s.image_do.setY((prt.stageH - _s.imageFinalH)/2);
_s.image_do.setWidth(_s.imageFinalW - _s.borderSize * 2 + _s.offsetWidth);
_s.image_do.setHeight(_s.imageFinalH - _s.borderSize * 2);
_s.image_do.setAlpha(0);
FWDAnimation.to(_s.image_do, 1, {alpha:1, ease:Quint.easeOut});
}
}else{
if(prt.imageShowType == 'mask'){
_s.imageHolder_do.setX(_s.finalW/2);
_s.imageHolder_do.setY(_s.finalH/2);
_s.image_do.setX(-_s.finalW /2 + _s.borderSize);
_s.image_do.setY(-_s.finalH /2 + _s.borderSize);
_s.image_do.setWidth(_s.finalW - _s.borderSize * 2 + _s.offsetWidth);
_s.image_do.setHeight(_s.finalH - _s.borderSize * 2);
FWDAnimation.to(_s.image_do, .8, {x:0, y:0, ease:Expo.easeInOut});
FWDAnimation.to(_s.imageHolder_do, .8, {x:_s.borderSize, y:_s.borderSize, w:_s.finalW - _s.borderSize * 2, h:_s.finalH - _s.borderSize * 2,
ease:Expo.easeInOut, onComplete:function(){
if(prt._d.maxImageHeight != 'fullscreen'){
_s.imageHolder_do.setOverflow('visible');
}
_s.removeChild(_s.background_do);
}});
}else{
_s.imageHolder_do.setX(_s.borderSize);
_s.imageHolder_do.setY(_s.borderSize);
_s.imageHolder_do.setWidth(_s.finalW - _s.borderSize * 2);
_s.imageHolder_do.setHeight(_s.finalH - _s.borderSize * 2);
_s.image_do.setWidth(_s.finalW - _s.borderSize * 2 + _s.offsetWidth);
_s.image_do.setHeight(_s.finalH - _s.borderSize * 2);
_s.image_do.setAlpha(0);
FWDAnimation.to(_s.image_do, 1, {alpha:1, ease:Quint.easeOut});
}
}
if(_s.overlayColor_str.length > 1) _s.setupOverlay();
if(_s.showImageReflection_bl) _s.addReflection();
if(prt.id == _s.id) _s.disable();
};
_s.addReflection = function(){
var imgW = _s.finalW - _s.borderSize * 2;
var imgH = _s.finalH - _s.borderSize * 2;
_s.reflHolder_do = new FWDSISCDisplayObject("div");
_s.reflHolder_do.setButtonMode('false');
_s.reflCanvas_do = new FWDSISCDisplayObject("canvas");
_s.reflHolder_do.addChild(_s.reflCanvas_do);
_s.reflCanvas_do.screen.width = _s.finalW;
_s.reflCanvas_do.screen.height = _s.finalH;
var context = _s.reflCanvas_do.screen.getContext("2d");
context.save();
context.translate(0, _s.finalH);
context.scale(1, -1);
if(!_s.borderSize){
_s.borderColor_str = "transparent"
}
context.fillStyle = _s.borderColor_str;
context.fillRect(0, 0, _s.finalW, _s.finalH);
context.drawImage(_s.image_do.screen, _s.borderSize, _s.borderSize, imgW, imgH);
context.restore();
context.globalCompositeOperation = "destination-out";
var gradient = context.createLinearGradient(0, 0, 0, prt._d.reflectionHeight);
if(FWDSISCUtils.isIE){
gradient.addColorStop(0, "black");
gradient.addColorStop(1, "white");
}else{
gradient.addColorStop(0, "rgba(255, 255, 255, .7");
gradient.addColorStop(1, "rgba(255, 255, 255, 1)");
}
context.fillStyle = gradient;
context.fillRect(0, 0, _s.finalScaledW, _s.finalScaledH);
_s.resizeReflection(false);
_s.addChildAt(_s.reflHolder_do, 0);
if(_s.finalX > -_s.finalW && _s.finalX < prt.stageW){
if(prt.imageShowType == 'mask'){
_s.reflHolder_do.setX(_s.finalW/2);
_s.reflHolder_do.setY(_s.finalH/2 + _s.finalH);
_s.reflHolder_do.setWidth(0);
_s.reflHolder_do.setHeight(0);
_s.reflCanvas_do.setX(-_s.finalW /2);
_s.reflCanvas_do.setY(-_s.finalH /2);
FWDAnimation.to(_s.reflCanvas_do, .8, {x:0, y:0, ease:Expo.easeInOut});
FWDAnimation.to(_s.reflHolder_do, .8, {x:0, y:_s.finalH, w:_s.finalW, h:_s.finalH, ease:Expo.easeInOut});
}else{
FWDAnimation.killTweensOf(_s.reflCanvas_do);
FWDAnimation.to(_s.reflCanvas_do, .8, {x:0, y:0, ease:Expo.easeInOut});
}
}
};
_s.resizeReflection = function(animate){
if(_s.showImageReflection_bl && _s.reflCanvas_do){
FWDAnimation.killTweensOf(_s.reflCanvas_do);
FWDAnimation.killTweensOf(_s.reflHolder_do);
if(animate){
FWDAnimation.to(_s.reflCanvas_do, _s.transitionDuration, {w:_s.finalW, h:_s.finalH, ease:_s.transitionType_str});
FWDAnimation.to(_s.reflHolder_do, _s.transitionDuration, {y:_s.finalH, w:_s.finalW, h:_s.finalH, ease:_s.transitionType_str});
}else{
_s.reflHolder_do.setWidth(_s.finalW );
_s.reflHolder_do.setHeight(_s.finalH);
_s.reflHolder_do.setX(0);
_s.reflHolder_do.setY(_s.finalH);
_s.reflCanvas_do.setWidth(_s.finalW + _s.offsetWidth * 2);
_s.reflCanvas_do.setHeight(_s.finalH);
_s.reflCanvas_do.setX(0);
_s.reflCanvas_do.setY(0);
}
}
}
// Setup overlay.
_s.setupOverlay = function(){
_s.overlay_do = new FWDSISCDisplayObject("div");
_s.overlay_do.screen.className = 'overlay';
_s.overlay_do.screen.style.pointerEvents = 'none';
_s.overlay_do.setBkColor(_s.overlayColor_str);
_s.overlay_do.setY(_s.borderSize);
if(prt.spaceBetweenImages == 0){
_s.overlay_do.setWidth(_s.finalW - _s.borderSize * 2);
}else{
_s.overlay_do.setWidth(_s.finalW - (_s.borderSize * 2) + (_s.offsetWidth * 2));
_s.overlay_do.setX(_s.borderSize - _s.offsetWidth);
}
_s.overlay_do.setHeight(_s.finalH - _s.borderSize * 2);
if(_s.id == prt.curId) _s.overlay_do.setAlpha(0);
_s.addChild(_s.overlay_do);
_s.addChild(_s.mainTextHolder_do);
_s.overlay_do.setAlpha(0);
if(_s.id != prt.curId) FWDAnimation.to(_s.overlay_do, .8, {alpha:1, delay:.1});
}
_s.onTouchStartHandler = function(e){
_s.dispatchEvent(FWDSISCThumb.MOVE_VERTICAL, {id:_s.id});
}
_s.onMouseOverHandler = function(e){
if(prt.checkIfThubsTween()) return;
_s.dispatchEvent(FWDSISCThumb.HOVER);
_s.dispatchEvent(FWDSISCThumb.MOVE_VERTICAL, {id:_s.id});
if(_s.isDisabled_bl) return;
if(!e.pointerType || e.pointerType == e.MSPOINTER_TYPE_MOUSE){
_s.setSelectedState(true);
}
};
_s.onMouseOutHandler = function(e){
if(prt.checkIfThubsTween()) return;
if(_s.isDisabled_bl) return;
if(!e.pointerType || e.pointerType == e.MSPOINTER_TYPE_MOUSE){
_s.setNormalState(true);
}
};
_s.onMouseClickHandler = function(e){
if(_s.isDisabled_bl || prt.checkIfThubsTween()) return;
_s.dispatchEvent(FWDSISCThumb.CLICK, {id:_s.id});
};
// Add single click support.
_s.addSingleClickSupport = function(){
if(_s.isMobile_bl){
_s.image_do.screen.addEventListener("touchstart", _s.setStartEvent);
_s.screen.addEventListener("touchstart", _s.setStartEvent);
_s.image_do.screen.addEventListener("touchend", _s.singleClickHandler);
_s.screen.addEventListener("touchend", _s.singleClickHandler);
}else{
_s.image_do.screen.addEventListener("click", _s.singleClickHandler);
_s.screen.addEventListener("click", _s.singleClickHandler);
}
}
_s.setStartEvent = function(e){
_s.e = e;
}
_s.singleClickHandler = function(e){
e = e;
if(_s.e) e = _s.e;
if(_s.id == prt.curId && !prt.isStillTransitioning_bl && _s.maximizeOnSingleClick && !prt.isDragging_bl){
_s.dispatchEvent(FWDSISCThumb.MAXIMIZE_SINGLE_CLICK, {e:e});
}
}
// Set normal/selected display states.
_s.setNormalState = function(animate){
if(!_s.isSelected_bl || _s.id == prt.curId) return;
_s.isSelected_bl = false;
FWDAnimation.killTweensOf(_s.overlay_do);
FWDAnimation.killTweensOf(_s.mainTextHolder_do);
if(_s.overlay_do){
FWDAnimation.to(_s.overlay_do, .8, {alpha:1, delay:.05, ease:Quint.easeOut});
}
if(_s.HTMLTextPosition_str == 'outside'){
if(_s.id != prt.curId){
FWDAnimation.to(_s.mainTextHolder_do, .8, {alpha:.4, delay:.05, ease:Quint.easeOut});
}
}
};
_s.setSelectedState = function(animate){
if(_s.isSelected_bl || _s.id == prt.curId) return;
_s.isSelected_bl = true;
FWDAnimation.killTweensOf(_s.overlay_do);
FWDAnimation.killTweensOf(_s.mainTextHolder_do);
if(_s.overlay_do){
FWDAnimation.to(_s.overlay_do, .8, {alpha:0, delay:.05, ease:Quint.easeOut});
}
if(_s.HTMLTextPosition_str == 'outside'){
if(_s.id != prt.curId){
FWDAnimation.to(_s.mainTextHolder_do, .8, {alpha:1, delay:.05, ease:Quint.easeOut});
}
}
};
// Show/hide thumb.
_s.show = function(animate){
FWDAnimation.killTweensOf(_s);
if(animate){
FWDAnimation.to(_s, _s.transitionDuration, {y:0, ease:_s.transitionType_str});
}else{
_s.setY(0);
}
};
_s.hide = function(animate){
FWDAnimation.killTweensOf(_s);
if(animate){
FWDAnimation.to(_s, _s.transitionDuration, {y:_s.imageOffsetBottom + _s.imageH + 2});
}else{
_s.setY(_s.imageOffsetBottom + _s.imageH + 2);
}
};
_s.init();
};
// Set prototype.
FWDSISCThumb.setPrototype = function(){
FWDSISCThumb.prototype = new FWDSISCDisplayObject("div");
};
FWDSISCThumb.HOVER = "onHover";
FWDSISCThumb.CLICK = "onClick";
FWDSISCThumb.DOUBLE_CLICK = "onDoubleClick";
FWDSISCThumb.MOVE_VERTICAL = 'onMoveVertical';
FWDSISCThumb.MAXIMIZE_SINGLE_CLICK = 'maximizeSingleClick';
FWDSISCThumb.IFRAME = "iframe";
FWDSISCThumb.IMAGE = "image";
FWDSISCThumb.FLASH = "flash";
FWDSISCThumb.AUDIO = "audio";
FWDSISCThumb.VIDEO = "video";
FWDSISCThumb.VIMEO= "vimeo";
FWDSISCThumb.YOUTUBE = "youtube";
FWDSISCThumb.MAPS = "maps";
FWDSISCThumb.AJAX = "ajax";
FWDSISCThumb.HTML = "html";
FWDSISCThumb.prototype = null;
window.FWDSISCThumb = FWDSISCThumb;
}(window));// FWDAnimation classs, not allowed to modify or use outside this plugin!
var _fwd_fwdScope;window.FWDAnimation||(((_fwd_fwdScope="undefined"!=typeof fwd_module&&fwd_module.exports&&"undefined"!=typeof fwd_global?fwd_global:this||window)._fwd_fwdQueue||(_fwd_fwdScope._fwd_fwdQueue=[])).push(function(){"use strict";function y(t,e,i,r){i===r&&(i=r-(r-e)/1e6),t===e&&(e=t+(i-t)/1e6),this.a=t,this.b=e,this.c=i,this.d=r,this.da=r-t,this.ca=i-t,this.ba=e-t}function w(t,e,i,r){var s={a:t},n={},a={},o={c:r},l=(t+e)/2,h=(e+i)/2,f=(i+r)/2,u=(l+h)/2,p=(h+f)/2,_=(p-u)/8;return s.b=l+(t-l)/4,n.b=u+_,s.c=n.a=(s.b+n.b)/2,n.c=a.a=(u+p)/2,a.b=p-_,o.b=f+(r-f)/4,a.c=o.a=(a.b+o.b)/2,[s,n,a,o]}function _(t,e,i,r,s,n){var a,o,l,h,f,u,p,_,c={},d=[],m=n||t[0];for(o in s="string"==typeof s?","+s+",":",x,y,z,left,top,right,bottom,marginTop,marginLeft,marginRight,marginBottom,paddingLeft,paddingTop,paddingRight,paddingBottom,backgroundPosition,backgroundPosition_y,",null==e&&(e=1),t[0])d.push(o);if(1<t.length){for(_=t[t.length-1],p=!0,a=d.length;-1<--a;)if(o=d[a],.05<Math.abs(m[o]-_[o])){p=!1;break}p&&(t=t.concat(),n&&t.unshift(n),t.push(t[1]),n=t[t.length-3])}for(T.length=P.length=O.length=0,a=d.length;-1<--a;)o=d[a],g[o]=-1!==s.indexOf(","+o+","),c[o]=function(t,e,i,r){var s,n,a,o,l,h,f=[];if(r)for(n=(t=[r].concat(t)).length;-1<--n;)"string"==typeof(h=t[n][e])&&"="===h.charAt(1)&&(t[n][e]=r[e]+Number(h.charAt(0)+h.substr(2)));if((s=t.length-2)<0)return f[0]=new y(t[0][e],0,0,t[s<-1?0:1][e]),f;for(n=0;n<s;n++)a=t[n][e],o=t[n+1][e],f[n]=new y(a,0,0,o),i&&(l=t[n+2][e],T[n]=(T[n]||0)+(o-a)*(o-a),P[n]=(P[n]||0)+(l-o)*(l-o));return f[n]=new y(t[n][e],0,0,t[n+1][e]),f}(t,o,g[o],n);for(a=T.length;-1<--a;)T[a]=Math.sqrt(T[a]),P[a]=Math.sqrt(P[a]);if(!r){for(a=d.length;-1<--a;)if(g[o])for(u=(l=c[d[a]]).length-1,h=0;h<u;h++)f=l[h+1].da/P[h]+l[h].da/T[h]||0,O[h]=(O[h]||0)+f*f;for(a=O.length;-1<--a;)O[a]=Math.sqrt(O[a])}for(a=d.length,h=i?4:1;-1<--a;)(function(t,e,i,r,s){for(var n,a,o,l,h,f,u,p,_,c,d,m,g=t.length-1,y=0,v=t[0].a,x=0;x<g;x++)n=(l=t[y]).a,a=l.d,o=t[y+1].d,u=s?(c=T[x],m=((d=P[x])+c)*e*.25/(!r&&O[x]||.5),a-((h=a-(a-n)*(r?.5*e:0!==c?m/c:0))+(((f=a+(o-a)*(r?.5*e:0!==d?m/d:0))-h)*(3*c/(c+d)+.5)/4||0))):a-((h=a-(a-n)*e*.5)+(f=a+(o-a)*e*.5))/2,h+=u,f+=u,l.c=p=h,l.b=0!==x?v:v=l.a+.6*(l.c-l.a),l.da=a-n,l.ca=p-n,l.ba=v-n,i?(_=w(n,v,p,a),t.splice(y,1,_[0],_[1],_[2],_[3]),y+=4):y++,v=f;(l=t[y]).b=v,l.c=v+.4*(l.d-v),l.da=l.d-l.a,l.ca=l.c-l.a,l.ba=v-l.a,i&&(_=w(l.a,v,l.c,l.d),t.splice(y,1,_[0],_[1],_[2],_[3]))})(l=c[o=d[a]],e,i,r,g[o]),p&&(l.splice(0,h),l.splice(l.length-h,h));return c}var b,T,P,O,g,i,m,t;_fwd_fwdScope.FWDFWD_fwdDefine("FWDAnimation",["core.FWDAnimation","core.FWDSimpleTimeline","FWDTweenLite"],function(m,f,g){function y(t){for(var e=[],i=t.length,r=0;r!==i;e.push(t[r++]));return e}function v(t,e,i){var r,s,n=t.cycle;for(r in n)s=n[r],t[r]="function"==typeof s?s(i,e[i]):s[i%s.length];delete t.cycle}var m=function(t,e,i){g.call(this,t,e,i),this._cycle=0,this._yoyo=!0===this.vars.yoyo,this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._dirty=!0,this.render=m.prototype.render},x=1e-10,w=g._internals,T=w.isSelector,b=w.isArray,t=m.prototype=g.to({},.1,{}),P=[];m.version="1.19.0",t.constructor=m,t.kill()._gc=!1,m.killTweensOf=m.killDelayedCallsTo=g.killTweensOf,m.getTweensOf=g.getTweensOf,m.lagSmoothing=g.lagSmoothing,m.ticker=g.ticker,m.render=g.render,t.invalidate=function(){return this._yoyo=!0===this.vars.yoyo,this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._uncache(!0),g.prototype.invalidate.call(this)},t.updateTo=function(t,e){var i,r=this.ratio,s=this.vars.immediateRender||t.immediateRender;for(i in e&&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)),t)this.vars[i]=t[i];if(this._initted||s)if(e)this._initted=!1,s&&this.render(0,!0,!0);else if(this._gc&&this._enabled(!0,!1),this._notifyPluginsOfEnabled&&this._firstPT&&g._onPluginEvent("_onDisable",this),.998<this._time/this._duration){var n=this._totalTime;this.render(0,!0,!1),this._initted=!1,this.render(n,!0,!1)}else if(this._initted=!1,this._init(),0<this._time||s)for(var a,o=1/(1-r),l=this._firstPT;l;)a=l.s+l.c,l.c*=o,l.s=a-l.c,l=l._next;return this},t.render=function(t,e,i){this._initted||0===this._duration&&this.vars.repeat&&this.invalidate();var r,s,n,a,o,l,h,f,u,p=this._dirty?this.totalDuration():this._totalDuration,_=this._time,c=this._totalTime,d=this._cycle,m=this._duration,g=this._rawPrevTime;if(p-1e-7<=t?(this._totalTime=p,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=m,this.ratio=this._ease._calcEnd?this._ease.getRatio(1):1),this._reversed||(r=!0,s="onComplete",i=i||this._timeline.autoRemoveChildren),0===m&&(!this._initted&&this.vars.lazy&&!i||(this._startTime===this._timeline._duration&&(t=0),(g<0||t<=0&&-1e-7<=t||g===x&&"isPause"!==this.data)&&g!==t&&(i=!0,x<g&&(s="onReverseComplete")),this._rawPrevTime=f=!e||t||g===t?t:x))):t<1e-7?(this._totalTime=this._time=this._cycle=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0,(0!==c||0===m&&0<g)&&(s="onReverseComplete",r=this._reversed),t<0&&(this._active=!1,0===m&&(!this._initted&&this.vars.lazy&&!i||(0<=g&&(i=!0),this._rawPrevTime=f=!e||t||g===t?t:x))),this._initted||(i=!0)):(this._totalTime=this._time=t,0!==this._repeat&&(a=m+this._repeatDelay,this._cycle=this._totalTime/a>>0,0!==this._cycle&&this._cycle===this._totalTime/a&&c<=t&&this._cycle--,this._time=this._totalTime-this._cycle*a,this._yoyo&&0!=(1&this._cycle)&&(this._time=m-this._time),this._time>m?this._time=m:this._time<0&&(this._time=0)),this._easeType?(o=this._time/m,(1===(l=this._easeType)||3===l&&.5<=o)&&(o=1-o),3===l&&(o*=2),1===(h=this._easePower)?o*=o:2===h?o*=o*o:3===h?o*=o*o*o:4===h&&(o*=o*o*o*o),1===l?this.ratio=1-o:2===l?this.ratio=o:this._time/m<.5?this.ratio=o/2:this.ratio=1-o/2):this.ratio=this._ease.getRatio(this._time/m)),_!==this._time||i||d!==this._cycle){if(!this._initted){if(this._init(),!this._initted||this._gc)return;if(!i&&this._firstPT&&(!1!==this.vars.lazy&&this._duration||this.vars.lazy&&!this._duration))return this._time=_,this._totalTime=c,this._rawPrevTime=g,this._cycle=d,w.lazyTweens.push(this),void(this._lazy=[t,e]);this._time&&!r?this.ratio=this._ease.getRatio(this._time/m):r&&this._ease._calcEnd&&(this.ratio=this._ease.getRatio(0===this._time?0:1))}for(!1!==this._lazy&&(this._lazy=!1),this._active||!this._paused&&this._time!==_&&0<=t&&(this._active=!0),0===c&&(2===this._initted&&0<t&&this._init(),this._startAt&&(0<=t?this._startAt.render(t,e,i):s=s||"_dummyGS"),this.vars.onStart&&(0===this._totalTime&&0!==m||e||this._callback("onStart"))),n=this._firstPT;n;){n.f?n.t[n.p](n.c*this.ratio+n.s):(u=n.c*this.ratio+n.s,"x"==n.p?n.t.setX(u):"y"==n.p?n.t.setY(u):"z"==n.p?n.t.setZ(u):"angleX"==n.p?n.t.setAngleX(u):"angleY"==n.p?n.t.setAngleY(u):"angleZ"==n.p?n.t.setAngleZ(u):"w"==n.p?n.t.setWidth(u):"h"==n.p?n.t.setHeight(u):"alpha"==n.p?n.t.setAlpha(u):"scale"==n.p?n.t.setScale2(u):n.t[n.p]=u),n=n._next}this._onUpdate&&(t<0&&this._startAt&&this._startTime&&this._startAt.render(t,e,i),e||this._totalTime===c&&!s||this._callback("onUpdate")),this._cycle!==d&&(e||this._gc||this.vars.onRepeat&&this._callback("onRepeat")),s&&(this._gc&&!i||(t<0&&this._startAt&&!this._onUpdate&&this._startTime&&this._startAt.render(t,e,i),r&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!e&&this.vars[s]&&this._callback(s),0===m&&this._rawPrevTime===x&&f!==x&&(this._rawPrevTime=0)))}else c!==this._totalTime&&this._onUpdate&&(e||this._callback("onUpdate"))},m.to=function(t,e,i){return new m(t,e,i)},m.from=function(t,e,i){return i.runBackwards=!0,i.immediateRender=0!=i.immediateRender,new m(t,e,i)},m.fromTo=function(t,e,i,r){return r.startAt=i,r.immediateRender=0!=r.immediateRender&&0!=i.immediateRender,new m(t,e,r)},m.staggerTo=m.allTo=function(t,e,i,r,s,n,a){r=r||0;function o(){i.onComplete&&i.onComplete.apply(i.onCompleteScope||this,arguments),s.apply(a||i.callbackScope||this,n||P)}var l,h,f,u,p=0,_=[],c=i.cycle,d=i.startAt&&i.startAt.cycle;for(b(t)||("string"==typeof t&&(t=g.selector(t)||t),T(t)&&(t=y(t))),t=t||[],r<0&&((t=y(t)).reverse(),r*=-1),l=t.length-1,f=0;f<=l;f++){for(u in h={},i)h[u]=i[u];if(c&&(v(h,t,f),null!=h.duration&&(e=h.duration,delete h.duration)),d){for(u in d=h.startAt={},i.startAt)d[u]=i.startAt[u];v(h.startAt,t,f)}h.delay=p+(h.delay||0),f===l&&s&&(h.onComplete=o),_[f]=new m(t[f],e,h),p+=r}return _},m.staggerFrom=m.allFrom=function(t,e,i,r,s,n,a){return i.runBackwards=!0,i.immediateRender=0!=i.immediateRender,m.staggerTo(t,e,i,r,s,n,a)},m.staggerFromTo=m.allFromTo=function(t,e,i,r,s,n,a,o){return r.startAt=i,r.immediateRender=0!=r.immediateRender&&0!=i.immediateRender,m.staggerTo(t,e,r,s,n,a,o)},m.delayedCall=function(t,e,i,r,s){return new m(e,0,{delay:t,onComplete:e,onCompleteParams:i,callbackScope:r,onReverseComplete:e,onReverseCompleteParams:i,immediateRender:!1,useFrames:s,overwrite:0})},m.set=function(t,e){return new m(t,0,e)},m.isTweening=function(t){return 0<g.getTweensOf(t,!0).length};var n=function(t,e){for(var i=[],r=0,s=t._first;s;)s instanceof g?i[r++]=s:(e&&(i[r++]=s),r=(i=i.concat(n(s,e))).length),s=s._next;return i},u=m.getAllTweens=function(t){return n(m._rootTimeline,t).concat(n(m._rootFramesTimeline,t))};m.killAll=function(t,e,i,r){null==e&&(e=!0),null==i&&(i=!0);for(var s,n,a=u(0!=r),o=a.length,l=e&&i&&r,h=0;h<o;h++)n=a[h],(l||n instanceof f||(s=n.target===n.vars.onComplete)&&i||e&&!s)&&(t?n.totalTime(n._reversed?0:n.totalDuration()):n._enabled(!1,!1))},m.killChildTweensOf=function(t,e){if(null!=t){var i,r,s,n,a,o=w.tweenLookup;if("string"==typeof t&&(t=g.selector(t)||t),T(t)&&(t=y(t)),b(t))for(n=t.length;-1<--n;)m.killChildTweensOf(t[n],e);else{for(s in i=[],o)for(r=o[s].target.parentNode;r;)r===t&&(i=i.concat(o[s].tweens)),r=r.parentNode;for(a=i.length,n=0;n<a;n++)e&&i[n].totalTime(i[n].totalDuration()),i[n]._enabled(!1,!1)}}};function r(t,e,i,r){e=!1!==e,i=!1!==i;for(var s,n,a=u(r=!1!==r),o=e&&i&&r,l=a.length;-1<--l;)n=a[l],(o||n instanceof f||(s=n.target===n.vars.onComplete)&&i||e&&!s)&&n.paused(t)}return m.pauseAll=function(t,e,i){r(!0,t,e,i)},m.resumeAll=function(t,e,i){r(!1,t,e,i)},m.globalTimeScale=function(t){var e=m._rootTimeline,i=g.ticker.time;return arguments.length?(t=t||x,e._startTime=i-(i-e._startTime)*e._timeScale/t,e=m._rootFramesTimeline,i=g.ticker.frame,e._startTime=i-(i-e._startTime)*e._timeScale/t,e._timeScale=m._rootTimeline._timeScale=t):e._timeScale},t.progress=function(t,e){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&0!=(1&this._cycle)?1-t:t)+this._cycle*(this._duration+this._repeatDelay),e):this._time/this.duration()},t.totalProgress=function(t,e){return arguments.length?this.totalTime(this.totalDuration()*t,e):this._totalTime/this.totalDuration()},t.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},t.duration=function(t){return arguments.length?m.prototype.duration.call(this,t):this._duration},t.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)},t.repeat=function(t){return arguments.length?(this._repeat=t,this._uncache(!0)):this._repeat},t.repeatDelay=function(t){return arguments.length?(this._repeatDelay=t,this._uncache(!0)):this._repeatDelay},t.yoyo=function(t){return arguments.length?(this._yoyo=t,this):this._yoyo},m},!0),b=180/Math.PI,T=[],P=[],O=[],g={},i=_fwd_fwdScope.FWDFWD_fwdDefine.globals,m=_fwd_fwdScope.FWDFWD_fwdDefine.plugin({propName:"bezier",priority:-1,version:"1.3.7",API:2,fwd_global:!0,init:function(t,e,i){this._target=t,e instanceof Array&&(e={values:e}),this._func={},this._mod={},this._props=[],this._timeRes=null==e.timeResolution?6:parseInt(e.timeResolution,10);var r,s,n,a,o,l,h=e.values||[],f={},u=h[0],p=e.autoRotate||i.vars.orientToBezier;for(r in this._autoRotate=p?p instanceof Array?p:[["x","y","rotation",!0!==p&&Number(p)||0]]:null,u)this._props.push(r);for(n=this._props.length;-1<--n;)r=this._props[n],this._overwriteProps.push(r),s=this._func[r]="function"==typeof t[r],f[r]=s?t[r.indexOf("set")||"function"!=typeof t["get"+r.substr(3)]?r:"get"+r.substr(3)]():parseFloat(t[r]),o||f[r]!==h[0][r]&&(o=f);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):function(t,e,i){var r,s,n,a,o,l,h,f,u,p,_,c={},d="cubic"===(e=e||"soft")?3:2,m="soft"===e,g=[];if(m&&i&&(t=[i].concat(t)),null==t||t.length<1+d)throw"invalid Bezier data";for(u in t[0])g.push(u);for(l=g.length;-1<--l;){for(c[u=g[l]]=o=[],p=0,f=t.length,h=0;h<f;h++)r=null==i?t[h][u]:"string"==typeof(_=t[h][u])&&"="===_.charAt(1)?i[u]+Number(_.charAt(0)+_.substr(2)):Number(_),m&&1<h&&h<f-1&&(o[p++]=(r+o[p-2])/2),o[p++]=r;for(f=p-d+1,h=p=0;h<f;h+=d)r=o[h],s=o[h+1],n=o[h+2],a=2==d?0:o[h+3],o[p++]=_=3==d?new y(r,s,n,a):new y(r,(2*s+r)/3,(2*s+n)/3,n);o.length=p}return c}(h,e.type,f),this._segCount=this._beziers[r].length,this._timeRes&&(l=function(t,e){var i,r,s,n,a=[],o=[],l=0,h=0,f=(e=e>>0||6)-1,u=[],p=[];for(i in t)!function(t,e,i){for(var r,s,n,a,o,l,h,f,u,p,_,c=1/i,d=t.length;-1<--d;)for(n=(p=t[d]).a,a=p.d-n,o=p.c-n,l=p.b-n,r=s=0,f=1;f<=i;f++)r=s-(s=((h=c*f)*h*a+3*(u=1-h)*(h*o+u*l))*h),e[_=d*i+f-1]=(e[_]||0)+r*r}(t[i],a,e);for(s=a.length,r=0;r<s;r++)l+=Math.sqrt(a[r]),p[n=r%e]=l,n===f&&(h+=l,u[n=r/e>>0]=p,o[n]=h,l=0,p=[]);return{length:h,lengths:o,segments:u}}(this._beziers,this._timeRes),this._length=l.length,this._lengths=l.lengths,this._segments=l.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),p=this._autoRotate)for(this._initialRotations=[],p[0]instanceof Array||(this._autoRotate=p=[p]),n=p.length;-1<--n;){for(a=0;a<3;a++)r=p[n][a],this._func[r]="function"==typeof t[r]&&t[r.indexOf("set")||"function"!=typeof t["get"+r.substr(3)]?r:"get"+r.substr(3)];r=p[n][2],this._initialRotations[n]=(this._func[r]?this._func[r].call(this._target):this._target[r])||0,this._overwriteProps.push(r)}return this._startRatio=i.vars.runBackwards?1:0,!0},set:function(t){var e,i,r,s,n,a,o,l,h,f=this._segCount,u=this._func,p=this._target,_=t!==this._startRatio;if(this._timeRes){if(l=this._lengths,h=this._curSeg,t*=this._length,T=this._li,t>this._l2&&T<f-1){for(o=f-1;T<o&&(this._l2=l[++T])<=t;);this._l1=l[T-1],this._li=T,this._curSeg=h=this._segments[T],this._s2=h[this._s1=this._si=0]}else if(t<this._l1&&0<T){for(;0<T&&(this._l1=l[--T])>=t;);0===T&&t<this._l1?this._l1=0:T++,this._l2=l[T],this._li=T,this._curSeg=h=this._segments[T],this._s1=h[(this._si=h.length-1)-1]||0,this._s2=h[this._si]}if(e=T,t-=this._l1,T=this._si,t>this._s2&&T<h.length-1){for(o=h.length-1;T<o&&(this._s2=h[++T])<=t;);this._s1=h[T-1],this._si=T}else if(t<this._s1&&0<T){for(;0<T&&(this._s1=h[--T])>=t;);0===T&&t<this._s1?this._s1=0:T++,this._s2=h[T],this._si=T}n=(T+(t-this._s1)/(this._s2-this._s1))*this._prec||0}else n=(t-(e=t<0?0:1<=t?f-1:f*t>>0)*(1/f))*f;for(i=1-n,T=this._props.length;-1<--T;)r=this._props[T],a=(n*n*(s=this._beziers[r][e]).da+3*i*(n*s.ca+i*s.ba))*n+s.a,this._mod[r]&&(a=this._mod[r](a,p)),u[r]?p[r](a):"x"==r?p.setX(a):"y"==r?p.setY(a):"z"==r?p.setZ(a):"angleX"==r?p.setAngleX(a):"angleY"==r?p.setAngleY(a):"angleZ"==r?p.setAngleZ(a):"w"==r?p.setWidth(a):"h"==r?p.setHeight(a):"alpha"==r?p.setAlpha(a):"scale"==r?p.setScale2(a):p[r]=a;if(this._autoRotate)for(var c,d,m,g,y,v,x,w=this._autoRotate,T=w.length;-1<--T;)r=w[T][2],v=w[T][3]||0,x=!0===w[T][4]?1:b,s=this._beziers[w[T][0]],c=this._beziers[w[T][1]],s&&c&&(s=s[e],c=c[e],d=s.a+(s.b-s.a)*n,d+=((g=s.b+(s.c-s.b)*n)-d)*n,g+=(s.c+(s.d-s.c)*n-g)*n,m=c.a+(c.b-c.a)*n,m+=((y=c.b+(c.c-c.b)*n)-m)*n,y+=(c.c+(c.d-c.c)*n-y)*n,a=_?Math.atan2(y-m,g-d)*x+v:this._initialRotations[T],this._mod[r]&&(a=this._mod[r](a,p)),u[r]?p[r](a):p[r]=a)}}),t=m.prototype,m.bezierThrough=_,m.cubicToQuadratic=w,m._autoCSS=!0,m.quadraticToCubic=function(t,e,i){return new y(t,(2*e+t)/3,(2*e+i)/3,i)},m._cssRegister=function(){var t,_,c,d,e=i.CSSPlugin;e&&(t=e._internals,_=t._parseToProxy,c=t._setPluginRatio,d=t.CSSPropTween,t._registerComplexSpecialProp("bezier",{parser:function(t,e,i,r,s,n){e instanceof Array&&(e={values:e}),n=new m;var a,o,l,h=e.values,f=h.length-1,u=[],p={};if(f<0)return s;for(a=0;a<=f;a++)l=_(t,h[a],r,s,n,f!==a),u[a]=l.end;for(o in e)p[o]=e[o];return p.values=u,(s=new d(t,"bezier",0,0,l.pt,2)).data=l,s.plugin=n,s.setRatio=c,0===p.autoRotate&&(p.autoRotate=!0),!p.autoRotate||p.autoRotate instanceof Array||(a=!0===p.autoRotate?0:Number(p.autoRotate),p.autoRotate=null!=l.end.left?[["left","top","rotation",a,!1]]:null!=l.end.x&&[["x","y","rotation",a,!1]]),p.autoRotate&&(r._transform||r._enableTransforms(!1),l.autoRotate=r._target._fwdTransform,l.proxy.rotation=l.autoRotate.rotation||0,r._overwriteProps.push("rotation")),n._onInitTween(l.proxy,p,r._tween),s}}))},t._mod=function(t){for(var e,i=this._overwriteProps,r=i.length;-1<--r;)(e=t[i[r]])&&"function"==typeof e&&(this._mod[i[r]]=e)},t._kill=function(t){var e,i,r=this._props;for(e in this._beziers)if(e in t)for(delete this._beziers[e],delete this._func[e],i=r.length;-1<--i;)r[i]===e&&r.splice(i,1);if(r=this._autoRotate)for(i=r.length;-1<--i;)t[r[i][2]]&&r.splice(i,1);return this._super._kill.call(this,t)},_fwd_fwdScope.FWDFWD_fwdDefine("plugins.CSSPlugin",["plugins.TweenPlugin","FWDTweenLite"],function(n,B){var c,P,O,d,W=function(){n.call(this,"css"),this._overwriteProps.length=0,this.setRatio=W.prototype.setRatio},h=_fwd_fwdScope.FWDFWD_fwdDefine.globals,m={},t=W.prototype=new n("css");(t.constructor=W).version="1.19.0",W.API=2,W.defaultTransformPerspective=0,W.defaultSkewType="compensated",W.defaultSmoothOrigin=!0,t="px",W.suffixMap={top:t,right:t,bottom:t,left:t,width:t,height:t,fontSize:t,padding:t,margin:t,perspective:t,lineHeight:""};function a(t,e){return e.toUpperCase()}function e(t){return K.createElementNS?K.createElementNS("http://www.w3.org/1999/xhtml",t):K.createElement(t)}function o(t){return N.test("string"==typeof t?t:(t.currentStyle?t.currentStyle.filter:t.style.filter)||"")?parseFloat(RegExp.$1)/100:1}function g(t){window.console&&console.log(t)}function k(t,e){var i,r,s=(e=e||J).style;if(void 0!==s[t])return t;for(t=t.charAt(0).toUpperCase()+t.substr(1),i=["O","Moz","ms","Ms","Webkit"],r=5;-1<--r&&void 0===s[i[r]+t];);return 0<=r?(st="-"+(nt=3===r?"ms":i[r]).toLowerCase()+"-",nt+t):null}function y(t,e){var i,r,s,n={};if(e=e||at(t,null))if(i=e.length)for(;-1<--i;)-1!==(s=e[i]).indexOf("-transform")&&It!==s||(n[s.replace(p,a)]=e.getPropertyValue(s));else for(i in e)-1!==i.indexOf("Transform")&&Xt!==i||(n[i]=e[i]);else if(e=t.currentStyle||t.style)for(i in e)"string"==typeof i&&void 0===n[i]&&(n[i.replace(p,a)]=e[i]);return rt||(n.opacity=o(t)),r=Zt(t,e,!1),n.rotation=r.rotation,n.skewX=r.skewX,n.scaleX=r.scaleX,n.scaleY=r.scaleY,n.x=r.x,n.y=r.y,Yt&&(n.z=r.z,n.rotationX=r.rotationX,n.rotationY=r.rotationY,n.scaleZ=r.scaleZ),n.filters&&delete n.filters,n}function v(t,e,i,r,s){var n,a,o,l={},h=t.style;for(a in i)"cssText"!==a&&"length"!==a&&isNaN(a)&&(e[a]!==(n=i[a])||s&&s[a])&&-1===a.indexOf("Origin")&&("number"!=typeof n&&"string"!=typeof n||(l[a]="auto"!==n||"left"!==a&&"top"!==a?""!==n&&"auto"!==n&&"none"!==n||"string"!=typeof e[a]||""===e[a].replace(f,"")?n:0:ht(t,a),void 0!==h[a]&&(o=new vt(h,a,h[a],o))));if(r)for(a in r)"className"!==a&&(l[a]=r[a]);return{difs:l,firstMPT:o}}function R(t,e){return"function"==typeof t&&(t=t(D,F)),"string"==typeof t&&"="===t.charAt(1)?parseInt(t.charAt(0)+"1",10)*parseFloat(t.substr(2)):parseFloat(t)-parseFloat(e)||0}function S(t,e){return"function"==typeof t&&(t=t(D,F)),null==t?e:"string"==typeof t&&"="===t.charAt(1)?parseInt(t.charAt(0)+"1",10)*parseFloat(t.substr(2))+e:parseFloat(t)||0}function A(t,e,i,r){var s,n,a,o,l;return"function"==typeof t&&(t=t(D,F)),(o=null==t?e:"number"==typeof t?t:(s=360,n=t.split("_"),a=((l="="===t.charAt(1))?parseInt(t.charAt(0)+"1",10)*parseFloat(n[0].substr(2)):parseFloat(n[0]))*(-1===t.indexOf("rad")?1:G)-(l?0:e),n.length&&(r&&(r[i]=e+a),-1!==t.indexOf("short")&&(a%=s)!==a%180&&(a=a<0?a+s:a-s),-1!==t.indexOf("_cw")&&a<0?a=(a+3599999999640)%s-(a/s|0)*s:-1!==t.indexOf("ccw")&&0<a&&(a=(a-3599999999640)%s-(a/s|0)*s)),e+a))<1e-6&&-1e-6<o&&(o=0),o}function _(t,e,i){return 255*(6*(t=t<0?t+1:1<t?t-1:t)<1?e+(i-e)*t*6:t<.5?i:3*t<2?e+(i-e)*(2/3-t)*6:e)+.5|0}function r(t,e){for(var i,r,s=t.match(dt)||[],n=0,a=s.length?"":t,o=0;o<s.length;o++)i=s[o],n+=(r=t.substr(n,t.indexOf(i,n)-n)).length+i.length,3===(i=ct(i,e)).length&&i.push(1),a+=r+(e?"hsla("+i[0]+","+i[1]+"%,"+i[2]+"%,"+i[3]:"rgba("+i.join(","))+")";return a+t.substr(n)}var M,x,w,Y,T,C,F,D,i,s,z=/(?:\-|\.|\b)(\d|\.|e\-)+/g,X=/(?:\d|\-\d|\.\d|\-\.\d|\+=\d|\-=\d|\+=.\d|\-=\.\d)+/g,b=/(?:\+=|\-=|\-|\b)[\d\-\.]+[a-zA-Z0-9]*(?:%|\b)/gi,f=/(?![+-]?\d*\.?\d+|[+-]|e[+-]\d+)[^0-9]/g,I=/(?:\d|\-|\+|=|#|\.)*/g,N=/opacity *= *([^)]*)/i,E=/opacity:([^;]*)/i,l=/alpha\(opacity *=.+?\)/i,L=/^(rgb|hsl)/,u=/([A-Z])/g,p=/-([a-z])/gi,j=/(^(?:url\(\"|url\())|(?:(\"\))$|\)$)/gi,V=/(?:Left|Right|Width)/i,q=/(M11|M12|M21|M22)=[\d\-\.e]+/gi,Z=/progid\:DXImageTransform\.Microsoft\.Matrix\(.+?\)/i,U=/,(?=[^\)]*(?:\(|$))/gi,$=/[\s,\(]/i,Q=Math.PI/180,G=180/Math.PI,H={},K=document,J=e("div"),tt=e("img"),et=W._internals={_specialProps:m},it=navigator.userAgent,rt=(i=it.indexOf("Android"),s=e("a"),w=-1!==it.indexOf("Safari")&&-1===it.indexOf("Chrome")&&(-1===i||3<Number(it.substr(i+8,1))),T=w&&Number(it.substr(it.indexOf("Version/")+8,1))<6,Y=-1!==it.indexOf("Firefox"),(/MSIE ([0-9]{1,}[\.0-9]{0,})/.exec(it)||/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec(it))&&(C=parseFloat(RegExp.$1)),!!s&&(s.style.cssText="top:1px;opacity:.55;",/^0.55/.test(s.style.opacity))),st="",nt="",at=K.defaultView?K.defaultView.getComputedStyle:function(){},ot=W.getStyle=function(t,e,i,r,s){var n;return rt||"opacity"!==e?(!r&&t.style[e]?n=t.style[e]:(i=i||at(t))?n=i[e]||i.getPropertyValue(e)||i.getPropertyValue(e.replace(u,"-$1").toLowerCase()):t.currentStyle&&(n=t.currentStyle[e]),null==s||n&&"none"!==n&&"auto"!==n&&"auto auto"!==n?n:s):o(t)},lt=et.convertToPixels=function(t,e,i,r,s){if("px"===r||!r)return i;if("auto"===r||!i)return 0;var n,a,o,l=V.test(e),h=t,f=J.style,u=i<0,p=1===i;if(u&&(i=-i),p&&(i*=100),"%"===r&&-1!==e.indexOf("border"))n=i/100*(l?t.clientWidth:t.clientHeight);else{if(f.cssText="border:0 solid red;position:"+ot(t,"position")+";line-height:0;","%"!==r&&h.appendChild&&"v"!==r.charAt(0)&&"rem"!==r)f[l?"borderLeftWidth":"borderTopWidth"]=i+r;else{if(a=(h=t.parentNode||K.body)._fwdCache,o=B.ticker.frame,a&&l&&a.time===o)return a.width*i/100;f[l?"width":"height"]=i+r}h.appendChild(J),n=parseFloat(J[l?"offsetWidth":"offsetHeight"]),h.removeChild(J),l&&"%"===r&&!1!==W.cacheWidths&&((a=h._fwdCache=h._fwdCache||{}).time=o,a.width=n/i*100),0!==n||s||(n=lt(t,e,i,r,!0))}return p&&(n/=100),u?-n:n},ht=et.calculateOffset=function(t,e,i){if("absolute"!==ot(t,"position",i))return 0;var r="left"===e?"Left":"Top",s=ot(t,"margin"+r,i);return t["offset"+r]-(lt(t,e,parseFloat(s),s.replace(I,""))||0)},ft={width:["Left","Right"],height:["Top","Bottom"]},ut=["marginLeft","marginRight","marginTop","marginBottom"],pt=function(t,e){if("contain"===t||"auto"===t||"auto auto"===t)return t+" ";null!=t&&""!==t||(t="0 0");var i,r=t.split(" "),s=-1!==t.indexOf("left")?"0%":-1!==t.indexOf("right")?"100%":r[0],n=-1!==t.indexOf("top")?"0%":-1!==t.indexOf("bottom")?"100%":r[1];if(3<r.length&&!e){for(r=t.split(", ").join(",").split(","),t=[],i=0;i<r.length;i++)t.push(pt(r[i]));return t.join(",")}return null==n?n="center"===s?"50%":"0":"center"===n&&(n="50%"),("center"===s||isNaN(parseFloat(s))&&-1===(s+"").indexOf("="))&&(s="50%"),t=s+" "+n+(2<r.length?" "+r[2]:""),e&&(e.oxp=-1!==s.indexOf("%"),e.oyp=-1!==n.indexOf("%"),e.oxr="="===s.charAt(1),e.oyr="="===n.charAt(1),e.ox=parseFloat(s.replace(f,"")),e.oy=parseFloat(n.replace(f,"")),e.v=t),e||t},_t={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]},ct=W.parseColor=function(t,e){var i,r,s,n,a,o,l,h,f,u,p;if(t)if("number"==typeof t)i=[t>>16,t>>8&255,255&t];else{if(","===t.charAt(t.length-1)&&(t=t.substr(0,t.length-1)),_t[t])i=_t[t];else if("#"===t.charAt(0))4===t.length&&(t="#"+(r=t.charAt(1))+r+(s=t.charAt(2))+s+(n=t.charAt(3))+n),i=[(t=parseInt(t.substr(1),16))>>16,t>>8&255,255&t];else if("hsl"===t.substr(0,3))if(i=p=t.match(z),e){if(-1!==t.indexOf("="))return t.match(X)}else a=Number(i[0])%360/360,o=Number(i[1])/100,r=2*(l=Number(i[2])/100)-(s=l<=.5?l*(o+1):l+o-l*o),3<i.length&&(i[3]=Number(t[3])),i[0]=_(a+1/3,r,s),i[1]=_(a,r,s),i[2]=_(a-1/3,r,s);else i=t.match(z)||_t.transparent;i[0]=Number(i[0]),i[1]=Number(i[1]),i[2]=Number(i[2]),3<i.length&&(i[3]=Number(i[3]))}else i=_t.black;return e&&!p&&(r=i[0]/255,s=i[1]/255,n=i[2]/255,l=((h=Math.max(r,s,n))+(f=Math.min(r,s,n)))/2,h===f?a=o=0:(u=h-f,o=.5<l?u/(2-h-f):u/(h+f),a=h===r?(s-n)/u+(s<n?6:0):h===s?(n-r)/u+2:(r-s)/u+4,a*=60),i[0]=a+.5|0,i[1]=100*o+.5|0,i[2]=100*l+.5|0),i},dt="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3}){1,2}\\b";for(t in _t)dt+="|"+t+"\\b";dt=new RegExp(dt+")","gi"),W.colorStringFilter=function(t){var e,i=t[0]+t[1];dt.test(i)&&(e=-1!==i.indexOf("hsl(")||-1!==i.indexOf("hsla("),t[0]=r(t[0],e),t[1]=r(t[1],e)),dt.lastIndex=0},B.defaultStringFilter||(B.defaultStringFilter=W.colorStringFilter);function mt(t,e,n,a){if(null==t)return function(t){return t};var o,l=e?(t.match(dt)||[""])[0]:"",h=t.split(l).join("").match(b)||[],f=t.substr(0,t.indexOf(h[0])),u=")"===t.charAt(t.length-1)?")":"",p=-1!==t.indexOf(" ")?" ":",",_=h.length,c=0<_?h[0].replace(z,""):"";return _?o=e?function(t){var e,i,r,s;if("number"==typeof t)t+=c;else if(a&&U.test(t)){for(s=t.replace(U,"|").split("|"),r=0;r<s.length;r++)s[r]=o(s[r]);return s.join(",")}if(e=(t.match(dt)||[l])[0],r=(i=t.split(e).join("").match(b)||[]).length,_>r--)for(;++r<_;)i[r]=n?i[(r-1)/2|0]:h[r];return f+i.join(p)+p+e+u+(-1!==t.indexOf("inset")?" inset":"")}:function(t){var e,i,r;if("number"==typeof t)t+=c;else if(a&&U.test(t)){for(i=t.replace(U,"|").split("|"),r=0;r<i.length;r++)i[r]=o(i[r]);return i.join(",")}if(r=(e=t.match(b)||[]).length,_>r--)for(;++r<_;)e[r]=n?e[(r-1)/2|0]:h[r];return f+e.join(p)+u}:function(t){return t}}function gt(h){return h=h.split(","),function(t,e,i,r,s,n,a){var o,l=(e+"").split(" ");for(a={},o=0;o<4;o++)a[h[o]]=l[o]=l[o]||l[(o-1)/2>>0];return r.parse(t,a,s,n)}}et._setPluginRatio=function(t){this.plugin.setRatio(t);for(var e,i,r,s,n,a=this.data,o=a.proxy,l=a.firstMPT;l;)e=o[l.v],l.r?e=Math.round(e):e<1e-6&&-1e-6<e&&(e=0),l.t[l.p]=e,l=l._next;if(a.autoRotate&&(a.autoRotate.rotation=a.mod?a.mod(o.rotation,this.t):o.rotation),1===t||0===t)for(l=a.firstMPT,n=1===t?"e":"b";l;){if((i=l.t).type){if(1===i.type){for(s=i.xs0+i.s+i.xs1,r=1;r<i.l;r++)s+=i["xn"+r]+i["xs"+(r+1)];i[n]=s}}else i[n]=i.s+i.xs0;l=l._next}};function yt(t,e,i,r,s,n){var a=new xt(t,e,i,r-i,s,-1,n);return a.b=i,a.e=a.xs0=r,a}var vt=function(t,e,i,r,s){this.t=t,this.p=e,this.v=i,this.r=s,r&&((r._prev=this)._next=r)},xt=(et._parseToProxy=function(t,e,i,r,s,n){var a,o,l,h,f,u=r,p={},_={},c=i._transform,d=H;for(i._transform=null,H=e,r=f=i.parse(t,e,r,s),H=d,n&&(i._transform=c,u&&(u._prev=null,u._prev&&(u._prev._next=null)));r&&r!==u;){if(r.type<=1&&(_[o=r.p]=r.s+r.c,p[o]=r.s,n||(h=new vt(r,"s",o,h,r.r),r.c=0),1===r.type))for(a=r.l;0<--a;)l="xn"+a,_[o=r.p+"_"+l]=r.data[l],p[o]=r[l],n||(h=new vt(r,l,o,h,r.rxp[l]));r=r._next}return{proxy:p,end:_,firstMPT:h,pt:f}},et.CSSPropTween=function(t,e,i,r,s,n,a,o,l,h,f){this.t=t,this.p=e,this.s=i,this.c=r,this.n=a||e,t instanceof xt||d.push(this.n),this.r=o,this.type=n||0,l&&(this.pr=l,c=!0),this.b=void 0===h?i:h,this.e=void 0===f?i+r:f,s&&((this._next=s)._prev=this)}),wt=W.parseComplex=function(t,e,i,r,s,n,a,o,l,h){i=i||n||"","function"==typeof r&&(r=r(D,F)),a=new xt(t,e,0,0,a,h?2:1,null,!1,o,i,r),r+="",s&&dt.test(r+i)&&(r=[i,r],W.colorStringFilter(r),i=r[0],r=r[1]);var f,u,p,_,c,d,m,g,y,v,x,w,T,b=i.split(", ").join(",").split(" "),P=r.split(", ").join(",").split(" "),O=b.length,k=!1!==M;for(-1===r.indexOf(",")&&-1===i.indexOf(",")||(b=b.join(" ").replace(U,", ").split(" "),P=P.join(" ").replace(U,", ").split(" "),O=b.length),O!==P.length&&(O=(b=(n||"").split(" ")).length),a.plugin=l,a.setRatio=h,f=dt.lastIndex=0;f<O;f++)if(_=b[f],c=P[f],(g=parseFloat(_))||0===g)a.appendXtra("",g,R(c,g),c.replace(X,""),k&&-1!==c.indexOf("px"),!0);else if(s&&dt.test(_))w=")"+((w=c.indexOf(")")+1)?c.substr(w):""),T=-1!==c.indexOf("hsl")&&rt,_=ct(_,T),c=ct(c,T),(y=6<_.length+c.length)&&!rt&&0===c[3]?(a["xs"+a.l]+=a.l?" transparent":"transparent",a.e=a.e.split(P[f]).join("transparent")):(rt||(y=!1),T?a.appendXtra(y?"hsla(":"hsl(",_[0],R(c[0],_[0]),",",!1,!0).appendXtra("",_[1],R(c[1],_[1]),"%,",!1).appendXtra("",_[2],R(c[2],_[2]),y?"%,":"%"+w,!1):a.appendXtra(y?"rgba(":"rgb(",_[0],c[0]-_[0],",",!0,!0).appendXtra("",_[1],c[1]-_[1],",",!0).appendXtra("",_[2],c[2]-_[2],y?",":w,!0),y&&(_=_.length<4?1:_[3],a.appendXtra("",_,(c.length<4?1:c[3])-_,w,!1))),dt.lastIndex=0;else if(d=_.match(z)){if(!(m=c.match(X))||m.length!==d.length)return a;for(u=p=0;u<d.length;u++)x=d[u],v=_.indexOf(x,p),a.appendXtra(_.substr(p,v-p),Number(x),R(m[u],x),"",k&&"px"===_.substr(v+x.length,2),0===u),p=v+x.length;a["xs"+a.l]+=_.substr(p)}else a["xs"+a.l]+=a.l||a["xs"+a.l]?" "+c:c;if(-1!==r.indexOf("=")&&a.data){for(w=a.xs0+a.data.s,f=1;f<a.l;f++)w+=a["xs"+f]+a.data["xn"+f];a.e=w+a["xs"+f]}return a.l||(a.type=-1,a.xs0=a.e),a.xfirst||a},Tt=9;for((t=xt.prototype).l=t.pr=0;0<--Tt;)t["xn"+Tt]=0,t["xs"+Tt]="";t.xs0="",t._next=t._prev=t.xfirst=t.data=t.plugin=t.setRatio=t.rxp=null,t.appendXtra=function(t,e,i,r,s,n){var a=this,o=a.l;return a["xs"+o]+=n&&(o||a["xs"+o])?" "+t:t||"",i||0===o||a.plugin?(a.l++,a.type=a.setRatio?2:1,a["xs"+a.l]=r||"",0<o?(a.data["xn"+o]=e+i,a.rxp["xn"+o]=s,a["xn"+o]=e,a.plugin||(a.xfirst=new xt(a,"xn"+o,e,i,a.xfirst||a,0,a.n,s,a.pr),a.xfirst.xs0=0)):(a.data={s:e+i},a.rxp={},a.s=e,a.c=i,a.r=s),a):(a["xs"+o]+=e+(r||""),a)};function bt(t,e){e=e||{},this.p=e.prefix&&k(t)||t,(m[t]=m[this.p]=this).format=e.formatter||mt(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}var Pt=et._registerComplexSpecialProp=function(t,e,i){"object"!=typeof e&&(e={parser:i});var r,s=t.split(","),n=e.defaultValue;for(i=i||[n],r=0;r<s.length;r++)e.prefix=0===r&&e.prefix,e.defaultValue=i[r]||n,new bt(s[r],e)},Ot=et._registerPluginProp=function(t){var l;m[t]||(l=t.charAt(0).toUpperCase()+t.substr(1)+"Plugin",Pt(t,{parser:function(t,e,i,r,s,n,a){var o=h.com.fwd.plugins[l];return o?(o._cssRegister(),m[i].parse(t,e,i,r,s,n,a)):(g("Error: "+l+" js file not loaded."),s)}}))};(t=bt.prototype).parseComplex=function(t,e,i,r,s,n){var a,o,l,h,f,u,p=this.keyword;if(this.multi&&(U.test(i)||U.test(e)?(o=e.replace(U,"|").split("|"),l=i.replace(U,"|").split("|")):p&&(o=[e],l=[i])),l){for(h=l.length>o.length?l.length:o.length,a=0;a<h;a++)e=o[a]=o[a]||this.dflt,i=l[a]=l[a]||this.dflt,p&&(f=e.indexOf(p))!==(u=i.indexOf(p))&&(-1===u?o[a]=o[a].split(p).join(""):-1===f&&(o[a]+=" "+p));e=o.join(", "),i=l.join(", ")}return wt(t,this.p,e,i,this.clrs,this.dflt,r,this.pr,s,n)},t.parse=function(t,e,i,r,s,n,a){return this.parseComplex(t.style,this.format(ot(t,this.p,O,!1,this.dflt)),this.format(e),s,n)},W.registerSpecialProp=function(t,l,h){Pt(t,{parser:function(t,e,i,r,s,n,a){var o=new xt(t,i,0,0,s,2,i,!1,h);return o.plugin=n,o.setRatio=l(t,e,r._tween,i),o},priority:h})},W.useSVGTransformAttr=w||Y;function kt(t,e,i){var r,s=K.createElementNS("http://www.w3.org/2000/svg",t),n=/([a-z])([A-Z])/g;for(r in i)s.setAttributeNS(null,r.replace(n,"$1-$2").toLowerCase(),i[r]);return e.appendChild(s),s}function Rt(t,e,i,r,s,n){var a,o,l,h,f,u,p,_,c,d,m,g,y,v,x=t._fwdTransform,w=qt(t,!0);x&&(y=x.xOrigin,v=x.yOrigin),(!r||(a=r.split(" ")).length<2)&&(p=t.getBBox(),a=[(-1!==(e=pt(e).split(" "))[0].indexOf("%")?parseFloat(e[0])/100*p.width:parseFloat(e[0]))+p.x,(-1!==e[1].indexOf("%")?parseFloat(e[1])/100*p.height:parseFloat(e[1]))+p.y]),i.xOrigin=h=parseFloat(a[0]),i.yOrigin=f=parseFloat(a[1]),r&&w!==Vt&&(u=w[0],p=w[1],_=w[2],c=w[3],d=w[4],o=h*(c/(g=u*c-p*_))+f*(-_/g)+(_*(m=w[5])-c*d)/g,l=h*(-p/g)+f*(u/g)-(u*m-p*d)/g,h=i.xOrigin=a[0]=o,f=i.yOrigin=a[1]=l),x&&(n&&(i.xOffset=x.xOffset,i.yOffset=x.yOffset,x=i),s||!1!==s&&!1!==W.defaultSmoothOrigin?(o=h-y,l=f-v,x.xOffset+=o*w[0]+l*w[2]-o,x.yOffset+=o*w[1]+l*w[3]-l):x.xOffset=x.yOffset=0),n||t.setAttribute("data-svg-origin",a.join(" "))}function St(t){var e,i,r=this.data,s=-r.rotation*Q,n=s+r.skewX*Q,a=1e5,o=(Math.cos(s)*r.scaleX*a|0)/a,l=(Math.sin(s)*r.scaleX*a|0)/a,h=(Math.sin(n)*-r.scaleY*a|0)/a,f=(Math.cos(n)*r.scaleY*a|0)/a,u=this.t.style,p=this.t.currentStyle;if(p){i=l,l=-h,h=-i,e=p.filter,u.filter="";var _=this.t.offsetWidth,c=this.t.offsetHeight,d="absolute"!==p.position,m="progid:DXImageTransform.Microsoft.Matrix(M11="+o+", M12="+l+", M21="+h+", M22="+f,g=r.x+_*r.xPercent/100,y=r.y+c*r.yPercent/100;if(null!=r.ox&&(g+=(b=(r.oxp?_*r.ox*.01:r.ox)-_/2)-(b*o+(P=(r.oyp?c*r.oy*.01:r.oy)-c/2)*l),y+=P-(b*h+P*f)),m+=d?", Dx="+((b=_/2)-(b*o+(P=c/2)*l)+g)+", Dy="+(P-(b*h+P*f)+y)+")":", sizingMethod='auto expand')",-1!==e.indexOf("DXImageTransform.Microsoft.Matrix(")?u.filter=e.replace(Z,m):u.filter=m+" "+e,0!==t&&1!==t||1==o&&0===l&&0===h&&1==f&&(d&&-1===m.indexOf("Dx=0, Dy=0")||N.test(e)&&100!==parseFloat(RegExp.$1)||-1===e.indexOf(e.indexOf("Alpha"))&&u.removeAttribute("filter")),!d){var v,x,w,T=C<8?1:-1,b=r.ieOffsetX||0,P=r.ieOffsetY||0;for(r.ieOffsetX=Math.round((_-((o<0?-o:o)*_+(l<0?-l:l)*c))/2+g),r.ieOffsetY=Math.round((c-((f<0?-f:f)*c+(h<0?-h:h)*_))/2+y),Tt=0;Tt<4;Tt++)w=(i=-1!==(v=p[x=ut[Tt]]).indexOf("px")?parseFloat(v):lt(this.t,x,parseFloat(v),v.replace(I,""))||0)!==r[x]?Tt<2?-r.ieOffsetX:-r.ieOffsetY:Tt<2?b-r.ieOffsetX:P-r.ieOffsetY,u[x]=(r[x]=Math.round(i-w*(0===Tt||2===Tt?1:T)))+"px"}}}var At,Mt,Ct,Ft,Dt,zt="scaleX,scaleY,scaleZ,x,y,z,skewX,skewY,rotation,rotationX,rotationY,perspective,xPercent,yPercent".split(","),Xt=k("transform"),It=st+"transform",Nt=k("transformOrigin"),Yt=null!==k("perspective"),Et=et.Transform=function(){this.perspective=parseFloat(W.defaultTransformPerspective)||0,this.force3D=!(!1===W.defaultForce3D||!Yt)&&(W.defaultForce3D||"auto")},Bt=window.SVGElement,Wt=K.documentElement,Lt=(Dt=C||/Android/i.test(it)&&!window.chrome,K.createElementNS&&!Dt&&(Mt=kt("svg",Wt),Ft=(Ct=kt("rect",Mt,{width:100,height:50,x:100})).getBoundingClientRect().width,Ct.style[Nt]="50% 50%",Ct.style[Xt]="scaleX(0.5)",Dt=Ft===Ct.getBoundingClientRect().width&&!(Y&&Yt),Wt.removeChild(Mt)),Dt),jt=function(t){return!!(Bt&&t.getBBox&&t.getCTM&&function(t){try{return t.getBBox()}catch(t){}}(t)&&(!t.parentNode||t.parentNode.getBBox&&t.parentNode.getCTM))},Vt=[1,0,0,1,0,0],qt=function(t,e){var i,r,s,n,a,o,l=t._fwdTransform||new Et,h=t.style;if(Xt?r=ot(t,It,null,!0):t.currentStyle&&(r=(r=t.currentStyle.filter.match(q))&&4===r.length?[r[0].substr(4),Number(r[2].substr(4)),Number(r[1].substr(4)),r[3].substr(4),l.x||0,l.y||0].join(","):""),(i=!r||"none"===r||"matrix(1, 0, 0, 1, 0, 0)"===r)&&Xt&&((o="none"===at(t).display)||!t.parentNode)&&(o&&(n=h.display,h.display="block"),t.parentNode||(a=1,Wt.appendChild(t)),i=!(r=ot(t,It,null,!0))||"none"===r||"matrix(1, 0, 0, 1, 0, 0)"===r,n?h.display=n:o&&Gt(h,"display"),a&&Wt.removeChild(t)),(l.svg||t.getBBox&&jt(t))&&(i&&-1!==(h[Xt]+"").indexOf("matrix")&&(r=h[Xt],i=0),s=t.getAttribute("transform"),i&&s&&(-1!==s.indexOf("matrix")?(r=s,i=0):-1!==s.indexOf("translate")&&(r="matrix(1,0,0,1,"+s.match(/(?:\-|\b)[\d\-\.e]+\b/gi).join(",")+")",i=0))),i)return Vt;for(s=(r||"").match(z)||[],Tt=s.length;-1<--Tt;)n=Number(s[Tt]),s[Tt]=(a=n-(n|=0))?(1e5*a+(a<0?-.5:.5)|0)/1e5+n:n;return e&&6<s.length?[s[0],s[1],s[4],s[5],s[12],s[13]]:s},Zt=et.getTransform=function(t,e,i,r){if(t._fwdTransform&&i&&!r)return t._fwdTransform;var s,n,a,o,l,h,f,u,p,_,c,d,m,g,y,v,x,w,T,b,P,O,k,R,S,A,M,C,F,D,z,X,I=i&&t._fwdTransform||new Et,N=I.scaleX<0,Y=Yt&&(parseFloat(ot(t,Nt,e,!1,"0 0 0").split(" ")[2])||I.zOrigin)||0,E=parseFloat(W.defaultTransformPerspective)||0;if(I.svg=!(!t.getBBox||!jt(t)),I.svg&&(Rt(t,ot(t,Nt,e,!1,"50% 50%")+"",I,t.getAttribute("data-svg-origin")),At=W.useSVGTransformAttr||Lt),(s=qt(t))!==Vt)for(n in 16===s.length?(f=s[0],u=s[1],p=s[2],_=s[3],c=s[4],d=s[5],m=s[6],g=s[7],y=s[8],v=s[9],x=s[10],w=s[12],T=s[13],b=s[14],P=s[11],O=Math.atan2(m,x),I.zOrigin&&(w=y*(b=-I.zOrigin)-s[12],T=v*b-s[13],b=x*b+I.zOrigin-s[14]),I.rotationX=O*G,O&&(k=c*(A=Math.cos(-O))+y*(M=Math.sin(-O)),R=d*A+v*M,S=m*A+x*M,y=c*-M+y*A,v=d*-M+v*A,x=m*-M+x*A,P=g*-M+P*A,c=k,d=R,m=S),O=Math.atan2(-p,x),I.rotationY=O*G,O&&(R=u*(A=Math.cos(-O))-v*(M=Math.sin(-O)),S=p*A-x*M,v=u*M+v*A,x=p*M+x*A,P=_*M+P*A,f=k=f*A-y*M,u=R,p=S),O=Math.atan2(u,f),I.rotation=O*G,O&&(f=f*(A=Math.cos(-O))+c*(M=Math.sin(-O)),R=u*A+d*M,d=u*-M+d*A,m=p*-M+m*A,u=R),I.rotationX&&359.9<Math.abs(I.rotationX)+Math.abs(I.rotation)&&(I.rotationX=I.rotation=0,I.rotationY=180-I.rotationY),I.scaleX=(1e5*Math.sqrt(f*f+u*u)+.5|0)/1e5,I.scaleY=(1e5*Math.sqrt(d*d+v*v)+.5|0)/1e5,I.scaleZ=(1e5*Math.sqrt(m*m+x*x)+.5|0)/1e5,I.rotationX||I.rotationY?I.skewX=0:(I.skewX=c||d?Math.atan2(c,d)*G+I.rotation:I.skewX||0,90<Math.abs(I.skewX)&&Math.abs(I.skewX)<270&&(N?(I.scaleX*=-1,I.skewX+=I.rotation<=0?180:-180,I.rotation+=I.rotation<=0?180:-180):(I.scaleY*=-1,I.skewX+=I.skewX<=0?180:-180))),I.perspective=P?1/(P<0?-P:P):0,I.x=w,I.y=T,I.z=b,I.svg&&(I.x-=I.xOrigin-(I.xOrigin*f-I.yOrigin*c),I.y-=I.yOrigin-(I.yOrigin*u-I.xOrigin*d))):Yt&&!r&&s.length&&I.x===s[4]&&I.y===s[5]&&(I.rotationX||I.rotationY)||(F=(C=6<=s.length)?s[0]:1,D=s[1]||0,z=s[2]||0,X=C?s[3]:1,I.x=s[4]||0,I.y=s[5]||0,a=Math.sqrt(F*F+D*D),o=Math.sqrt(X*X+z*z),l=F||D?Math.atan2(D,F)*G:I.rotation||0,h=z||X?Math.atan2(z,X)*G+l:I.skewX||0,90<Math.abs(h)&&Math.abs(h)<270&&(N?(a*=-1,h+=l<=0?180:-180,l+=l<=0?180:-180):(o*=-1,h+=h<=0?180:-180)),I.scaleX=a,I.scaleY=o,I.rotation=l,I.skewX=h,Yt&&(I.rotationX=I.rotationY=I.z=0,I.perspective=E,I.scaleZ=1),I.svg&&(I.x-=I.xOrigin-(I.xOrigin*F+I.yOrigin*z),I.y-=I.yOrigin-(I.xOrigin*D+I.yOrigin*X))),I.zOrigin=Y,I)I[n]<2e-5&&-2e-5<I[n]&&(I[n]=0);return i&&(t._fwdTransform=I).svg&&(At&&t.style[Xt]?B.delayedCall(.001,function(){Gt(t.style,Xt)}):!At&&t.getAttribute("transform")&&B.delayedCall(.001,function(){t.removeAttribute("transform")})),I},Ut=et.set3DTransformRatio=et.setTransformRatio=function(t){var e,i,r,s,n,a,o,l,h,f,u,p,_,c,d,m,g,y,v,x,w,T,b,P=this.data,O=this.t.style,k=P.rotation,R=P.rotationX,S=P.rotationY,A=P.scaleX,M=P.scaleY,C=P.scaleZ,F=P.x,D=P.y,z=P.z,X=P.svg,I=P.perspective,N=P.force3D;if(!((1!==t&&0!==t||"auto"!==N||this.tween._totalTime!==this.tween._totalDuration&&this.tween._totalTime)&&N||z||I||S||R||1!==C)||At&&X||!Yt)k||P.skewX||X?(k*=Q,T=P.skewX*Q,b=1e5,e=Math.cos(k)*A,s=Math.sin(k)*A,i=Math.sin(k-T)*-M,n=Math.cos(k-T)*M,T&&"simple"===P.skewType&&(g=Math.tan(T-P.skewY*Q),i*=g=Math.sqrt(1+g*g),n*=g,P.skewY&&(g=Math.tan(P.skewY*Q),e*=g=Math.sqrt(1+g*g),s*=g)),X&&(F+=P.xOrigin-(P.xOrigin*e+P.yOrigin*i)+P.xOffset,D+=P.yOrigin-(P.xOrigin*s+P.yOrigin*n)+P.yOffset,At&&(P.xPercent||P.yPercent)&&(c=this.t.getBBox(),F+=.01*P.xPercent*c.width,D+=.01*P.yPercent*c.height),F<(c=1e-6)&&-c<F&&(F=0),D<c&&-c<D&&(D=0)),v=(e*b|0)/b+","+(s*b|0)/b+","+(i*b|0)/b+","+(n*b|0)/b+","+F+","+D+")",X&&At?this.t.setAttribute("transform","matrix("+v):O[Xt]=(P.xPercent||P.yPercent?"translate("+P.xPercent+"%,"+P.yPercent+"%) matrix(":"matrix(")+v):O[Xt]=(P.xPercent||P.yPercent?"translate("+P.xPercent+"%,"+P.yPercent+"%) matrix(":"matrix(")+A+",0,0,"+M+","+F+","+D+")";else{if(Y&&(A<(c=1e-4)&&-c<A&&(A=C=2e-5),M<c&&-c<M&&(M=C=2e-5),!I||P.z||P.rotationX||P.rotationY||(I=0)),k||P.skewX)k*=Q,d=e=Math.cos(k),m=s=Math.sin(k),P.skewX&&(k-=P.skewX*Q,d=Math.cos(k),m=Math.sin(k),"simple"===P.skewType&&(g=Math.tan((P.skewX-P.skewY)*Q),d*=g=Math.sqrt(1+g*g),m*=g,P.skewY&&(g=Math.tan(P.skewY*Q),e*=g=Math.sqrt(1+g*g),s*=g))),i=-m,n=d;else{if(!(S||R||1!==C||I||X))return void(O[Xt]=(P.xPercent||P.yPercent?"translate("+P.xPercent+"%,"+P.yPercent+"%) translate3d(":"translate3d(")+F+"px,"+D+"px,"+z+"px)"+(1!==A||1!==M?" scale("+A+","+M+")":""));e=n=1,i=s=0}h=1,r=a=o=l=f=u=0,p=I?-1/I:0,_=P.zOrigin,c=1e-6,x=",",w="0",(k=S*Q)&&(d=Math.cos(k),f=p*(o=-(m=Math.sin(k))),r=e*m,a=s*m,p*=h=d,e*=d,s*=d),(k=R*Q)&&(g=i*(d=Math.cos(k))+r*(m=Math.sin(k)),y=n*d+a*m,l=h*m,u=p*m,r=i*-m+r*d,a=n*-m+a*d,h*=d,p*=d,i=g,n=y),1!==C&&(r*=C,a*=C,h*=C,p*=C),1!==M&&(i*=M,n*=M,l*=M,u*=M),1!==A&&(e*=A,s*=A,o*=A,f*=A),(_||X)&&(_&&(F+=r*-_,D+=a*-_,z+=h*-_+_),X&&(F+=P.xOrigin-(P.xOrigin*e+P.yOrigin*i)+P.xOffset,D+=P.yOrigin-(P.xOrigin*s+P.yOrigin*n)+P.yOffset),F<c&&-c<F&&(F=w),D<c&&-c<D&&(D=w),z<c&&-c<z&&(z=0)),v=P.xPercent||P.yPercent?"translate("+P.xPercent+"%,"+P.yPercent+"%) matrix3d(":"matrix3d(",v+=(e<c&&-c<e?w:e)+x+(s<c&&-c<s?w:s)+x+(o<c&&-c<o?w:o),v+=x+(f<c&&-c<f?w:f)+x+(i<c&&-c<i?w:i)+x+(n<c&&-c<n?w:n),R||S||1!==C?(v+=x+(l<c&&-c<l?w:l)+x+(u<c&&-c<u?w:u)+x+(r<c&&-c<r?w:r),v+=x+(a<c&&-c<a?w:a)+x+(h<c&&-c<h?w:h)+x+(p<c&&-c<p?w:p)+x):v+=",0,0,0,0,1,0,",v+=F+x+D+x+z+x+(I?1+-z/I:1)+")",O[Xt]=v}};(t=Et.prototype).x=t.y=t.z=t.skewX=t.skewY=t.rotation=t.rotationX=t.rotationY=t.zOrigin=t.xPercent=t.yPercent=t.xOffset=t.yOffset=0,t.scaleX=t.scaleY=t.scaleZ=1,Pt("transform,scale,scaleX,scaleY,scaleZ,x,y,z,rotation,rotationX,rotationY,rotationZ,skewX,skewY,shortRotation,shortRotationX,shortRotationY,shortRotationZ,transformOrigin,svgOrigin,transformPerspective,directionalRotation,parseTransform,force3D,skewType,xPercent,yPercent,smoothOrigin",{parser:function(t,e,i,r,s,n,a){if(r._lastParsedTransform===a)return s;var o;"function"==typeof(r._lastParsedTransform=a)[i]&&(o=a[i],a[i]=e);var l,h,f,u,p,_,c,d,m,g=t._fwdTransform,y=t.style,v=zt.length,x=a,w={},T="transformOrigin",b=Zt(t,O,!0,x.parseTransform),P=x.transform&&("function"==typeof x.transform?x.transform(D,F):x.transform);if(r._transform=b,P&&"string"==typeof P&&Xt)(h=J.style)[Xt]=P,h.display="block",h.position="absolute",K.body.appendChild(J),l=Zt(J,null,!1),b.svg&&(_=b.xOrigin,c=b.yOrigin,l.x-=b.xOffset,l.y-=b.yOffset,(x.transformOrigin||x.svgOrigin)&&(P={},Rt(t,pt(x.transformOrigin),P,x.svgOrigin,x.smoothOrigin,!0),_=P.xOrigin,c=P.yOrigin,l.x-=P.xOffset-b.xOffset,l.y-=P.yOffset-b.yOffset),(_||c)&&(d=qt(J,!0),l.x-=_-(_*d[0]+c*d[2]),l.y-=c-(_*d[1]+c*d[3]))),K.body.removeChild(J),l.perspective||(l.perspective=b.perspective),null!=x.xPercent&&(l.xPercent=S(x.xPercent,b.xPercent)),null!=x.yPercent&&(l.yPercent=S(x.yPercent,b.yPercent));else if("object"==typeof x){if(l={scaleX:S(null!=x.scaleX?x.scaleX:x.scale,b.scaleX),scaleY:S(null!=x.scaleY?x.scaleY:x.scale,b.scaleY),scaleZ:S(x.scaleZ,b.scaleZ),x:S(x.x,b.x),y:S(x.y,b.y),z:S(x.z,b.z),xPercent:S(x.xPercent,b.xPercent),yPercent:S(x.yPercent,b.yPercent),perspective:S(x.transformPerspective,b.perspective)},null!=(p=x.directionalRotation))if("object"==typeof p)for(h in p)x[h]=p[h];else x.rotation=p;"string"==typeof x.x&&-1!==x.x.indexOf("%")&&(l.x=0,l.xPercent=S(x.x,b.xPercent)),"string"==typeof x.y&&-1!==x.y.indexOf("%")&&(l.y=0,l.yPercent=S(x.y,b.yPercent)),l.rotation=A("rotation"in x?x.rotation:"shortRotation"in x?x.shortRotation+"_short":"rotationZ"in x?x.rotationZ:b.rotation-b.skewY,b.rotation-b.skewY,"rotation",w),Yt&&(l.rotationX=A("rotationX"in x?x.rotationX:"shortRotationX"in x?x.shortRotationX+"_short":b.rotationX||0,b.rotationX,"rotationX",w),l.rotationY=A("rotationY"in x?x.rotationY:"shortRotationY"in x?x.shortRotationY+"_short":b.rotationY||0,b.rotationY,"rotationY",w)),l.skewX=A(x.skewX,b.skewX-b.skewY),(l.skewY=A(x.skewY,b.skewY))&&(l.skewX+=l.skewY,l.rotation+=l.skewY)}for(Yt&&null!=x.force3D&&(b.force3D=x.force3D,u=!0),b.skewType=x.skewType||b.skewType||W.defaultSkewType,(f=b.force3D||b.z||b.rotationX||b.rotationY||l.z||l.rotationX||l.rotationY||l.perspective)||null==x.scale||(l.scaleZ=1);-1<--v;)(1e-6<(P=l[m=zt[v]]-b[m])||P<-1e-6||null!=x[m]||null!=H[m])&&(u=!0,s=new xt(b,m,b[m],P,s),m in w&&(s.e=w[m]),s.xs0=0,s.plugin=n,r._overwriteProps.push(s.n));return P=x.transformOrigin,b.svg&&(P||x.svgOrigin)&&(_=b.xOffset,c=b.yOffset,Rt(t,pt(P),l,x.svgOrigin,x.smoothOrigin),s=yt(b,"xOrigin",(g?b:l).xOrigin,l.xOrigin,s,T),s=yt(b,"yOrigin",(g?b:l).yOrigin,l.yOrigin,s,T),_===b.xOffset&&c===b.yOffset||(s=yt(b,"xOffset",g?_:b.xOffset,b.xOffset,s,T),s=yt(b,"yOffset",g?c:b.yOffset,b.yOffset,s,T)),P=At?null:"0px 0px"),(P||Yt&&f&&b.zOrigin)&&(Xt?(u=!0,m=Nt,P=(P||ot(t,m,O,!1,"50% 50%"))+"",(s=new xt(y,m,0,0,s,-1,T)).b=y[m],s.plugin=n,Yt?(h=b.zOrigin,P=P.split(" "),b.zOrigin=(2<P.length&&(0===h||"0px"!==P[2])?parseFloat(P[2]):h)||0,s.xs0=s.e=P[0]+" "+(P[1]||"50%")+" 0px",(s=new xt(b,"zOrigin",0,0,s,-1,s.n)).b=h,s.xs0=s.e=b.zOrigin):s.xs0=s.e=P):pt(P+"",b)),u&&(r._transformType=b.svg&&At||!f&&3!==this._transformType?2:3),o&&(a[i]=o),s},prefix:!0}),Pt("boxShadow",{defaultValue:"0px 0px 0px 0px #999",prefix:!0,color:!0,multi:!0,keyword:"inset"}),Pt("borderRadius",{defaultValue:"0px",parser:function(t,e,i,r,s,n){e=this.format(e);for(var a,o,l,h,f,u,p,_,c,d,m,g,y=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],v=t.style,x=parseFloat(t.offsetWidth),w=parseFloat(t.offsetHeight),T=e.split(" "),b=0;b<y.length;b++)this.p.indexOf("border")&&(y[b]=k(y[b])),-1!==(l=o=ot(t,y[b],O,!1,"0px")).indexOf(" ")&&(l=(o=l.split(" "))[0],o=o[1]),h=a=T[b],f=parseFloat(l),_=l.substr((f+"").length),""===(p=(c="="===h.charAt(1))?(u=parseInt(h.charAt(0)+"1",10),h=h.substr(2),u*=parseFloat(h),h.substr((u+"").length-(u<0?1:0))||""):(u=parseFloat(h),h.substr((u+"").length)))&&(p=P[i]||_),p!==_&&(d=lt(t,"borderLeft",f,_),m=lt(t,"borderTop",f,_),o="%"===p?(l=d/x*100+"%",m/w*100+"%"):"em"===p?(l=d/(g=lt(t,"borderLeft",1,"em"))+"em",m/g+"em"):(l=d+"px",m+"px"),c&&(h=parseFloat(l)+u+p,a=parseFloat(o)+u+p)),s=wt(v,y[b],l+" "+o,h+" "+a,!1,"0px",s);return s},prefix:!0,formatter:mt("0px 0px 0px 0px",!1,!0)}),Pt("borderBottomLeftRadius,borderBottomRightRadius,borderTopLeftRadius,borderTopRightRadius",{defaultValue:"0px",parser:function(t,e,i,r,s,n){return wt(t.style,i,this.format(ot(t,i,O,!1,"0px 0px")),this.format(e),!1,"0px",s)},prefix:!0,formatter:mt("0px 0px",!1,!0)}),Pt("backgroundPosition",{defaultValue:"0 0",parser:function(t,e,i,r,s,n){var a,o,l,h,f,u,p="background-position",_=O||at(t,null),c=this.format((_?C?_.getPropertyValue(p+"-x")+" "+_.getPropertyValue(p+"-y"):_.getPropertyValue(p):t.currentStyle.backgroundPositionX+" "+t.currentStyle.backgroundPositionY)||"0 0"),d=this.format(e);if(-1!==c.indexOf("%")!=(-1!==d.indexOf("%"))&&d.split(",").length<2&&(u=ot(t,"backgroundImage").replace(j,""))&&"none"!==u){for(a=c.split(" "),o=d.split(" "),tt.setAttribute("src",u),l=2;-1<--l;)(h=-1!==(c=a[l]).indexOf("%"))!=(-1!==o[l].indexOf("%"))&&(f=0===l?t.offsetWidth-tt.width:t.offsetHeight-tt.height,a[l]=h?parseFloat(c)/100*f+"px":parseFloat(c)/f*100+"%");c=a.join(" ")}return this.parseComplex(t.style,c,d,s,n)},formatter:pt}),Pt("backgroundSize",{defaultValue:"0 0",formatter:function(t){return pt(-1===(t+="").indexOf(" ")?t+" "+t:t)}}),Pt("perspective",{defaultValue:"0px",prefix:!0}),Pt("perspectiveOrigin",{defaultValue:"50% 50%",prefix:!0}),Pt("transformStyle",{prefix:!0}),Pt("backfaceVisibility",{prefix:!0}),Pt("userSelect",{prefix:!0}),Pt("margin",{parser:gt("marginTop,marginRight,marginBottom,marginLeft")}),Pt("padding",{parser:gt("paddingTop,paddingRight,paddingBottom,paddingLeft")}),Pt("clip",{defaultValue:"rect(0px,0px,0px,0px)",parser:function(t,e,i,r,s,n){var a,o,l;return e=C<9?(o=t.currentStyle,l=C<8?" ":",",a="rect("+o.clipTop+l+o.clipRight+l+o.clipBottom+l+o.clipLeft+")",this.format(e).split(",").join(l)):(a=this.format(ot(t,this.p,O,!1,this.dflt)),this.format(e)),this.parseComplex(t.style,a,e,s,n)}}),Pt("textShadow",{defaultValue:"0px 0px 0px #999",color:!0,multi:!0}),Pt("autoRound,strictUnits",{parser:function(t,e,i,r,s){return s}}),Pt("border",{defaultValue:"0px solid #000",parser:function(t,e,i,r,s,n){var a=ot(t,"borderTopWidth",O,!1,"0px"),o=this.format(e).split(" "),l=o[0].replace(I,"");return"px"!==l&&(a=parseFloat(a)/lt(t,"borderTopWidth",1,l)+l),this.parseComplex(t.style,this.format(a+" "+ot(t,"borderTopStyle",O,!1,"solid")+" "+ot(t,"borderTopColor",O,!1,"#000")),o.join(" "),s,n)},color:!0,formatter:function(t){var e=t.split(" ");return e[0]+" "+(e[1]||"solid")+" "+(t.match(dt)||["#000"])[0]}}),Pt("borderWidth",{parser:gt("borderTopWidth,borderRightWidth,borderBottomWidth,borderLeftWidth")}),Pt("float,cssFloat,styleFloat",{parser:function(t,e,i,r,s,n){var a=t.style,o="cssFloat"in a?"cssFloat":"styleFloat";return new xt(a,o,0,0,s,-1,i,!1,0,a[o],e)}});function $t(t){var e,i=this.t,r=i.filter||ot(this.data,"filter")||"",s=this.s+this.c*t|0;100==s&&(e=-1===r.indexOf("atrix(")&&-1===r.indexOf("radient(")&&-1===r.indexOf("oader(")?(i.removeAttribute("filter"),!ot(this.data,"filter")):(i.filter=r.replace(l,""),!0)),e||(this.xn1&&(i.filter=r=r||"alpha(opacity="+s+")"),-1===r.indexOf("pacity")?0==s&&this.xn1||(i.filter=r+" alpha(opacity="+s+")"):i.filter=r.replace(N,"opacity="+s))}Pt("opacity,alpha,autoAlpha",{defaultValue:"1",parser:function(t,e,i,r,s,n){var a=parseFloat(ot(t,"opacity",O,!1,"1")),o=t.style,l="autoAlpha"===i;return"string"==typeof e&&"="===e.charAt(1)&&(e=("-"===e.charAt(0)?-1:1)*parseFloat(e.substr(2))+a),l&&1===a&&"hidden"===ot(t,"visibility",O)&&0!==e&&(a=0),rt?s=new xt(o,"opacity",a,e-a,s):((s=new xt(o,"opacity",100*a,100*(e-a),s)).xn1=l?1:0,o.zoom=1,s.type=2,s.b="alpha(opacity="+s.s+")",s.e="alpha(opacity="+(s.s+s.c)+")",s.data=t,s.plugin=n,s.setRatio=$t),l&&((s=new xt(o,"visibility",0,0,s,-1,null,!1,0,0!==a?"inherit":"hidden",0===e?"hidden":"inherit")).xs0="inherit",r._overwriteProps.push(s.n),r._overwriteProps.push(i)),s}});function Qt(t){if(this.t._fwdClassPT=this,1===t||0===t){this.t.setAttribute("class",0===t?this.b:this.e);for(var e=this.data,i=this.t.style;e;)e.v?i[e.p]=e.v:Gt(i,e.p),e=e._next;1===t&&this.t._fwdClassPT===this&&(this.t._fwdClassPT=null)}else this.t.getAttribute("class")!==this.e&&this.t.setAttribute("class",this.e)}var Gt=function(t,e){e&&(t.removeProperty?("ms"!==e.substr(0,2)&&"webkit"!==e.substr(0,6)||(e="-"+e),t.removeProperty(e.replace(u,"-$1").toLowerCase())):t.removeAttribute(e))};Pt("className",{parser:function(t,e,i,r,s,n,a){var o,l,h,f,u,p=t.getAttribute("class")||"",_=t.style.cssText;if((s=r._classNamePT=new xt(t,i,0,0,s,2)).setRatio=Qt,s.pr=-11,c=!0,s.b=p,l=y(t,O),h=t._fwdClassPT){for(f={},u=h.data;u;)f[u.p]=1,u=u._next;h.setRatio(1)}return(t._fwdClassPT=s).e="="!==e.charAt(1)?e:p.replace(new RegExp("(?:\\s|^)"+e.substr(2)+"(?![\\w-])"),"")+("+"===e.charAt(0)?" "+e.substr(2):""),t.setAttribute("class",s.e),o=v(t,l,y(t),a,f),t.setAttribute("class",p),s.data=o.firstMPT,t.style.cssText=_,s=s.xfirst=r.parse(t,o.difs,s,n)}});function Ht(t){if((1===t||0===t)&&this.data._totalTime===this.data._totalDuration&&"isFromStart"!==this.data.data){var e,i,r,s,n,a=this.t.style,o=m.transform.parse;if("all"===this.e)s=!(a.cssText="");else for(r=(e=this.e.split(" ").join("").split(",")).length;-1<--r;)i=e[r],m[i]&&(m[i].parse===o?s=!0:i="transformOrigin"===i?Nt:m[i].p),Gt(a,i);s&&(Gt(a,Xt),(n=this.t._fwdTransform)&&(n.svg&&(this.t.removeAttribute("data-svg-origin"),this.t.removeAttribute("transform")),delete this.t._fwdTransform))}}for(Pt("clearProps",{parser:function(t,e,i,r,s){return(s=new xt(t,i,0,0,s,2)).setRatio=Ht,s.e=e,s.pr=-10,s.data=r._tween,c=!0,s}}),t="bezier,throwProps,physicsProps,physics2D".split(","),Tt=t.length;Tt--;)Ot(t[Tt]);(t=W.prototype)._firstPT=t._lastParsedTransform=t._transform=null,t._onInitTween=function(t,e,i,r){if(!t.nodeType)return!1;this._target=F=t,this._tween=i,this._vars=e,D=r,M=e.autoRound,c=!1,P=e.suffixMap||W.suffixMap,O=at(t,""),d=this._overwriteProps;var s,n,a,o,l,h,f,u,p,_=t.style;if(x&&""===_.zIndex&&("auto"!==(s=ot(t,"zIndex",O))&&""!==s||this._addLazySet(_,"zIndex",0)),"string"==typeof e&&(o=_.cssText,s=y(t,O),_.cssText=o+";"+e,s=v(t,s,y(t)).difs,!rt&&E.test(e)&&(s.opacity=parseFloat(RegExp.$1)),e=s,_.cssText=o),e.className?this._firstPT=n=m.className.parse(t,e.className,"className",this,null,null,e):this._firstPT=n=this.parse(t,e,null),this._transformType){for(p=3===this._transformType,Xt?w&&(x=!0,""===_.zIndex&&("auto"!==(f=ot(t,"zIndex",O))&&""!==f||this._addLazySet(_,"zIndex",0)),T&&this._addLazySet(_,"WebkitBackfaceVisibility",this._vars.WebkitBackfaceVisibility||(p?"visible":"hidden"))):_.zoom=1,a=n;a&&a._next;)a=a._next;u=new xt(t,"transform",0,0,null,2),this._linkCSSP(u,null,a),u.setRatio=Xt?Ut:St,u.data=this._transform||Zt(t,O,!0),u.tween=i,u.pr=-1,d.pop()}if(c){for(;n;){for(h=n._next,a=o;a&&a.pr>n.pr;)a=a._next;(n._prev=a?a._prev:l)?n._prev._next=n:o=n,(n._next=a)?a._prev=n:l=n,n=h}this._firstPT=o}return!0},t.parse=function(t,e,i,r){var s,n,a,o,l,h,f,u,p,_,c=t.style;for(s in e)"function"==typeof(h=e[s])&&(h=h(D,F)),(n=m[s])?i=n.parse(t,h,s,this,i,r,e):(l=ot(t,s,O)+"",p="string"==typeof h,"color"===s||"fill"===s||"stroke"===s||-1!==s.indexOf("Color")||p&&L.test(h)?(p||(h=(3<(h=ct(h)).length?"rgba(":"rgb(")+h.join(",")+")"),i=wt(c,s,l,h,!0,"transparent",i,0,r)):p&&$.test(h)?i=wt(c,s,l,h,!0,null,i,0,r):(f=(a=parseFloat(l))||0===a?l.substr((a+"").length):"",""!==l&&"auto"!==l||(f="width"===s||"height"===s?(a=function(t,e,i){if("svg"===(t.nodeName+"").toLowerCase())return(i||at(t))[e]||0;if(t.getBBox&&jt(t))return t.getBBox()[e]||0;var r=parseFloat("width"===e?t.offsetWidth:t.offsetHeight),s=ft[e],n=s.length;for(i=i||at(t,null);-1<--n;)r-=parseFloat(ot(t,"padding"+s[n],i,!0))||0,r-=parseFloat(ot(t,"border"+s[n]+"Width",i,!0))||0;return r}(t,s,O),"px"):"left"===s||"top"===s?(a=ht(t,s,O),"px"):(a="opacity"!==s?0:1,"")),""===(u=(_=p&&"="===h.charAt(1))?(o=parseInt(h.charAt(0)+"1",10),h=h.substr(2),o*=parseFloat(h),h.replace(I,"")):(o=parseFloat(h),p?h.replace(I,""):""))&&(u=s in P?P[s]:f),h=o||0===o?(_?o+a:o)+u:e[s],f!==u&&""!==u&&(o||0===o)&&a&&(a=lt(t,s,a,f),"%"===u?(a/=lt(t,s,100,"%")/100,!0!==e.strictUnits&&(l=a+"%")):"em"===u||"rem"===u||"vw"===u||"vh"===u?a/=lt(t,s,1,u):"px"!==u&&(o=lt(t,s,o,u),u="px"),_&&(!o&&0!==o||(h=o+a+u))),_&&(o+=a),!a&&0!==a||!o&&0!==o?void 0!==c[s]&&(h||h+""!="NaN"&&null!=h)?(i=new xt(c,s,o||a||0,0,i,-1,s,!1,0,l,h)).xs0="none"!==h||"display"!==s&&-1===s.indexOf("Style")?h:l:g("invalid "+s+" tween value: "+e[s]):(i=new xt(c,s,a,o-a,i,0,s,!1!==M&&("px"===u||"zIndex"===s),0,l,h)).xs0=u)),r&&i&&!i.plugin&&(i.plugin=r);return i},t.setRatio=function(t){var e,i,r,s=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(;s;){if(e=s.c*t+s.s,s.r?e=Math.round(e):e<1e-6&&-1e-6<e&&(e=0),s.type)if(1===s.type)if(2===(r=s.l))s.t[s.p]=s.xs0+e+s.xs1+s.xn1+s.xs2;else if(3===r)s.t[s.p]=s.xs0+e+s.xs1+s.xn1+s.xs2+s.xn2+s.xs3;else if(4===r)s.t[s.p]=s.xs0+e+s.xs1+s.xn1+s.xs2+s.xn2+s.xs3+s.xn3+s.xs4;else if(5===r)s.t[s.p]=s.xs0+e+s.xs1+s.xn1+s.xs2+s.xn2+s.xs3+s.xn3+s.xs4+s.xn4+s.xs5;else{for(i=s.xs0+e+s.xs1,r=1;r<s.l;r++)i+=s["xn"+r]+s["xs"+(r+1)];s.t[s.p]=i}else-1===s.type?s.t[s.p]=s.xs0:s.setRatio&&s.setRatio(t);else s.t[s.p]=e+s.xs0;s=s._next}else for(;s;)2!==s.type?s.t[s.p]=s.b:s.setRatio(t),s=s._next;else for(;s;){if(2!==s.type)if(s.r&&-1!==s.type)if(e=Math.round(s.s+s.c),s.type){if(1===s.type){for(r=s.l,i=s.xs0+e+s.xs1,r=1;r<s.l;r++)i+=s["xn"+r]+s["xs"+(r+1)];s.t[s.p]=i}}else s.t[s.p]=e+s.xs0;else s.t[s.p]=s.e;else s.setRatio(t);s=s._next}},t._enableTransforms=function(t){this._transform=this._transform||Zt(this._target,O,!0),this._transformType=this._transform.svg&&At||!t&&3!==this._transformType?2:3};function Kt(t){this.t[this.p]=this.e,this.data._linkCSSP(this,this._next,null,!0)}t._addLazySet=function(t,e,i){var r=this._firstPT=new xt(t,e,0,0,this._firstPT,2);r.e=i,r.setRatio=Kt,r.data=this},t._linkCSSP=function(t,e,i,r){return t&&(e&&(e._prev=t),t._next&&(t._next._prev=t._prev),t._prev?t._prev._next=t._next:this._firstPT===t&&(this._firstPT=t._next,r=!0),i?i._next=t:r||null!==this._firstPT||(this._firstPT=t),t._next=e,t._prev=i),t},t._mod=function(t){for(var e=this._firstPT;e;)"function"==typeof t[e.p]&&t[e.p]===Math.round&&(e.r=1),e=e._next},t._kill=function(t){var e,i,r,s=t;if(t.autoAlpha||t.alpha){for(i in s={},t)s[i]=t[i];s.opacity=1,s.autoAlpha&&(s.visibility=1)}for(t.className&&(e=this._classNamePT)&&((r=e.xfirst)&&r._prev?this._linkCSSP(r._prev,e._next,r._prev._prev):r===this._firstPT&&(this._firstPT=e._next),e._next&&this._linkCSSP(e._next,e._next._next,r._prev),this._classNamePT=null),e=this._firstPT;e;)e.plugin&&e.plugin!==i&&e.plugin._kill&&(e.plugin._kill(t),i=e.plugin),e=e._next;return n.prototype._kill.call(this,s)};var Jt=function(t,e,i){var r,s,n,a;if(t.slice)for(s=t.length;-1<--s;)Jt(t[s],e,i);else for(s=(r=t.childNodes).length;-1<--s;)a=(n=r[s]).type,n.style&&(e.push(y(n)),i&&i.push(n)),1!==a&&9!==a&&11!==a||!n.childNodes.length||Jt(n,e,i)};return W.cascadeTo=function(t,e,i){var r,s,n,a,o=B.to(t,e,i),l=[o],h=[],f=[],u=[],p=B._internals.reservedProps;for(t=o._targets||o.target,Jt(t,h,u),o.render(e,!0,!0),Jt(t,f),o.render(0,!0,!0),o._enabled(!0),r=u.length;-1<--r;)if((s=v(u[r],h[r],f[r])).firstMPT){for(n in s=s.difs,i)p[n]&&(s[n]=i[n]);for(n in a={},s)a[n]=h[r][n];l.push(B.fromTo(u[r],e,a,s))}return l},n.activate([W]),W},!0),_fwd_fwdScope.FWDFWD_fwdDefine("easing.Back",["easing.Ease"],function(m){function t(t,e){var i=f("easing."+t,function(){},!0),r=i.prototype=new m;return r.constructor=i,r.getRatio=e,i}function e(t,e,i,r,s){var n=f("easing."+t,{easeOut:new e,easeIn:new i,easeInOut:new r},!0);return u(n,t),n}function g(t,e,i){this.t=t,this.v=e,i&&(((this.next=i).prev=this).c=i.v-e,this.gap=i.t-t)}function i(t,e){var i=f("easing."+t,function(t){this._p1=t||0===t?t:1.70158,this._p2=1.525*this._p1},!0),r=i.prototype=new m;return r.constructor=i,r.getRatio=e,r.config=function(t){return new i(t)},i}var r,s,n,a=_fwd_fwdScope.FWDGlobals||_fwd_fwdScope,o=a.com.fwd,l=2*Math.PI,h=Math.PI/2,f=o._class,u=m.register||function(){},p=e("Back",i("BackOut",function(t){return--t*t*((this._p1+1)*t+this._p1)+1}),i("BackIn",function(t){return t*t*((this._p1+1)*t-this._p1)}),i("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)})),_=f("easing.SlowMo",function(t,e,i){e=e||0===e?e:.7,null==t?t=.7:1<t&&(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),c=_.prototype=new m;return c.constructor=_,c.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},_.ease=new _(.7,.7),c.config=_.config=function(t,e,i){return new _(t,e,i)},(c=(r=f("easing.SteppedEase",function(t){t=t||1,this._p1=1/t,this._p2=t+1},!0)).prototype=new m).constructor=r,c.getRatio=function(t){return t<0?t=0:1<=t&&(t=.999999999),(this._p2*t>>0)*this._p1},c.config=r.config=function(t){return new r(t)},(c=(s=f("easing.RoughEase",function(t){for(var e,i,r,s,n,a,o=(t=t||{}).taper||"none",l=[],h=0,f=0|(t.points||20),u=f,p=!1!==t.randomize,_=!0===t.clamp,c=t.template instanceof m?t.template:null,d="number"==typeof t.strength?.4*t.strength:.4;-1<--u;)e=p?Math.random():1/f*u,i=c?c.getRatio(e):e,r="none"===o?d:"out"===o?(s=1-e)*s*d:"in"===o?e*e*d:e<.5?(s=2*e)*s*.5*d:(s=2*(1-e))*s*.5*d,p?i+=Math.random()*r-.5*r:u%2?i+=.5*r:i-=.5*r,_&&(1<i?i=1:i<0&&(i=0)),l[h++]={x:e,y:i};for(l.sort(function(t,e){return t.x-e.x}),a=new g(1,1,null),u=f;-1<--u;)n=l[u],a=new g(n.x,n.y,a);this._prev=new g(0,0,0!==a.t?a:a.next)},!0)).prototype=new m).constructor=s,c.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).v+(t-e.t)/e.gap*e.c},c.config=function(t){return new s(t)},s.ease=new s,e("Bounce",t("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}),t("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)}),t("BounceInOut",function(t){var e=t<.5;return(t=e?1-2*t:2*t-1)<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})),e("Circ",t("CircOut",function(t){return Math.sqrt(1- --t*t)}),t("CircIn",function(t){return-(Math.sqrt(1-t*t)-1)}),t("CircInOut",function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)})),e("Elastic",(n=function(t,e,i){var r=f("easing."+t,function(t,e){this._p1=1<=t?t:1,this._p2=(e||i)/(t<1?t:1),this._p3=this._p2/l*(Math.asin(1/this._p1)||0),this._p2=l/this._p2},!0),s=r.prototype=new m;return s.constructor=r,s.getRatio=e,s.config=function(t,e){return new r(t,e)},r})("ElasticOut",function(t){return this._p1*Math.pow(2,-10*t)*Math.sin((t-this._p3)*this._p2)+1},.3),n("ElasticIn",function(t){return-(this._p1*Math.pow(2,10*--t)*Math.sin((t-this._p3)*this._p2))},.3),n("ElasticInOut",function(t){return(t*=2)<1?this._p1*Math.pow(2,10*--t)*Math.sin((t-this._p3)*this._p2)*-.5:this._p1*Math.pow(2,-10*--t)*Math.sin((t-this._p3)*this._p2)*.5+1},.45)),e("Expo",t("ExpoOut",function(t){return 1-Math.pow(2,-10*t)}),t("ExpoIn",function(t){return Math.pow(2,10*(t-1))-.001}),t("ExpoInOut",function(t){return(t*=2)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*(t-1)))})),e("Sine",t("SineOut",function(t){return Math.sin(t*h)}),t("SineIn",function(t){return 1-Math.cos(t*h)}),t("SineInOut",function(t){return-.5*(Math.cos(Math.PI*t)-1)})),f("easing.EaseLookup",{find:function(t){return m.map[t]}},!0),u(a.SlowMo,"SlowMo","ease,"),u(s,"RoughEase","ease,"),u(r,"SteppedEase","ease,"),p},!0)}),_fwd_fwdScope.FWDFWD_fwdDefine&&_fwd_fwdScope._fwd_fwdQueue.pop()(),function(_,c){"use strict";var d={},m=_.FWDGlobals=_.FWDGlobals||_;if(!m.FWDTweenLite){var g,e,i,y=function(t){for(var e=t.split("."),i=m,r=0;r<e.length;r++)i[e[r]]=i=i[e[r]]||{};return i},u=y("com.fwd"),v=1e-10,l=function(t){for(var e=[],i=t.length,r=0;r!==i;e.push(t[r++]));return e},r=function(){},x=(e=Object.prototype.toString,i=e.call([]),function(t){return null!=t&&(t instanceof Array||"object"==typeof t&&!!t.push&&e.call(t)===i)}),w={},T=function(l,h,f,u){this.sc=w[l]?w[l].sc:[],(w[l]=this).gsClass=null,this.func=f;var p=[];this.check=function(t){for(var e,i,r,s,n,a=h.length,o=a;-1<--a;)(e=w[h[a]]||new T(h[a],[])).gsClass?(p[a]=e.gsClass,o--):t&&e.sc.push(this);if(0===o&&f){if(r=(i=("com.fwd."+l).split(".")).pop(),s=y(i.join("."))[r]=this.gsClass=f.apply(f,p),u)if(m[r]=d[r]=s,!(n="undefined"!=typeof fwd_module&&fwd_module.exports)&&"function"==typeof define&&define.amd)define((_.FWDAMDPath?_.FWDAMDPath+"/":"")+l.split(".").pop(),[],function(){return s});else if(n)if(l===c)for(a in fwd_module.exports=d[c]=s,d)s[a]=d[a];else d[c]&&(d[c][r]=s);for(a=0;a<this.sc.length;a++)this.sc[a].check()}},this.check(!0)},s=_.FWDFWD_fwdDefine=function(t,e,i,r){return new T(t,e,i,r)},p=u._class=function(t,e,i){return e=e||function(){},s(t,[],function(){return e},i),e};s.globals=m;var t,n=[0,0,1,1],b=p("easing.Ease",function(t,e,i,r){this._func=t,this._type=i||0,this._power=r||0,this._params=e?n.concat(e):n},!0),P=b.map={},a=b.register=function(t,e,i,r){for(var s,n,a,o,l=e.split(","),h=l.length,f=(i||"easeIn,easeOut,easeInOut").split(",");-1<--h;)for(n=l[h],s=r?p("easing."+n,null,!0):u.easing[n]||{},a=f.length;-1<--a;)o=f[a],P[n+"."+o]=P[o+n]=s[o]=t.getRatio?t:t[o]||new t};for((t=b.prototype)._calcEnd=!1,t.getRatio=function(t){if(this._func)return this._params[0]=t,this._func.apply(null,this._params);var e=this._type,i=this._power,r=1===e?1-t:2===e?t:t<.5?2*t:2*(1-t);return 1===i?r*=r:2===i?r*=r*r:3===i?r*=r*r*r:4===i&&(r*=r*r*r*r),1===e?1-r:2===e?r:t<.5?r/2:1-r/2},h=(o=["Linear","Quad","Cubic","Quart","Quint,Strong"]).length;-1<--h;)t=o[h]+",Power"+h,a(new b(null,null,1,h),t,"easeOut",!0),a(new b(null,null,2,h),t,"easeIn"+(0===h?",easeNone":"")),a(new b(null,null,3,h),t,"easeInOut");P.linear=u.easing.Linear.easeIn,P.swing=u.easing.Quad.easeInOut;var O=p("events.EventDispatcher",function(t){this._listeners={},this._eventTarget=t||this});(t=O.prototype).addEventListener=function(t,e,i,r,s){s=s||0;var n,a,o=this._listeners[t],l=0;for(this!==M||g||M.wake(),null==o&&(this._listeners[t]=o=[]),a=o.length;-1<--a;)(n=o[a]).c===e&&n.s===i?o.splice(a,1):0===l&&n.pr<s&&(l=a+1);o.splice(l,0,{c:e,s:i,up:r,pr:s})},t.removeEventListener=function(t,e){var i,r=this._listeners[t];if(r)for(i=r.length;-1<--i;)if(r[i].c===e)return void r.splice(i,1)},t.dispatchEvent=function(t){var e,i,r,s=this._listeners[t];if(s)for(1<(e=s.length)&&(s=s.slice(0)),i=this._eventTarget;-1<--e;)(r=s[e])&&(r.up?r.c.call(r.s||i,{type:t,target:i}):r.c.call(r.s||i))};for(var o,k=_.requestAnimationFrame,R=_.cancelAnimationFrame,S=Date.now||function(){return(new Date).getTime()},A=S(),h=(o=["ms","moz","webkit","o"]).length;-1<--h&&!k;)k=_[o[h]+"RequestAnimationFrame"],R=_[o[h]+"CancelAnimationFrame"]||_[o[h]+"CancelRequestAnimationFrame"];p("Ticker",function(t,e){var s,n,a,o,l,h=this,f=S(),i=!(!1===e||!k)&&"auto",u=500,p=33,_=function(t){var e,i,r=S()-A;u<r&&(f+=r-p),A+=r,h.time=(A-f)/1e3,e=h.time-l,(!s||0<e||!0===t)&&(h.frame++,l+=e+(o<=e?.004:o-e),i=!0),!0!==t&&(a=n(_)),i&&h.dispatchEvent("tick")};O.call(h),h.time=h.frame=0,h.tick=function(){_(!0)},h.lagSmoothing=function(t,e){u=t||1e10,p=Math.min(e,u,0)},h.sleep=function(){null!=a&&((i&&R?R:clearTimeout)(a),n=r,a=null,h===M&&(g=!1))},h.wake=function(t){null!==a?h.sleep():t?f+=-A+(A=S()):10<h.frame&&(A=S()-u+5),n=0===s?r:i&&k?k:function(t){return setTimeout(t,1e3*(l-h.time)+1|0)},h===M&&(g=!0),_(2)},h.fps=function(t){if(!arguments.length)return s;o=1/((s=t)||60),l=this.time+o,h.wake()},h.useRAF=function(t){if(!arguments.length)return i;h.sleep(),i=t,h.fps(s)},h.fps(t),setTimeout(function(){"auto"===i&&h.frame<5&&"hidden"!==document.visibilityState&&h.useRAF(!1)},1500)}),(t=u.Ticker.prototype=new u.events.EventDispatcher).constructor=u.Ticker;var f=p("core.FWDAnimation",function(t,e){var i;this.vars=e=e||{},this._duration=this._totalDuration=t||0,this._delay=Number(e.delay)||0,this._timeScale=1,this._active=!0===e.immediateRender,this.data=e.data,this._reversed=!0===e.reversed,$&&(g||M.wake(),(i=this.vars.useFrames?U:$).add(this,i._time),this.vars.paused&&this.paused(!0))}),M=f.ticker=new u.Ticker;(t=f.prototype)._dirty=t._gc=t._initted=t._paused=!1,t._totalTime=t._time=0,t._rawPrevTime=-1,t._next=t._last=t._onUpdate=t._timeline=t.timeline=null,t._paused=!1;var C=function(){g&&2e3<S()-A&&M.wake(),setTimeout(C,2e3)};C(),t.play=function(t,e){return null!=t&&this.seek(t,e),this.reversed(!1).paused(!1)},t.pause=function(t,e){return null!=t&&this.seek(t,e),this.paused(!0)},t.resume=function(t,e){return null!=t&&this.seek(t,e),this.paused(!1)},t.seek=function(t,e){return this.totalTime(Number(t),!1!==e)},t.restart=function(t,e){return this.reversed(!1).paused(!1).totalTime(t?-this._delay:0,!1!==e,!0)},t.reverse=function(t,e){return null!=t&&this.seek(t||this.totalDuration(),e),this.reversed(!0).paused(!1)},t.render=function(t,e,i){},t.invalidate=function(){return this._time=this._totalTime=0,this._initted=this._gc=!1,this._rawPrevTime=-1,!this._gc&&this.timeline||this._enabled(!0),this},t.isActive=function(){var t,e=this._timeline,i=this._startTime;return!e||!this._gc&&!this._paused&&e.isActive()&&(t=e.rawTime())>=i&&t<i+this.totalDuration()/this._timeScale},t._enabled=function(t,e){return g||M.wake(),this._gc=!t,this._active=this.isActive(),!0!==e&&(t&&!this.timeline?this._timeline.add(this,this._startTime-this._delay):!t&&this.timeline&&this._timeline._remove(this,!0)),!1},t._kill=function(t,e){return this._enabled(!1,!1)},t.kill=function(t,e){return this._kill(t,e),this},t._uncache=function(t){for(var e=t?this:this.timeline;e;)e._dirty=!0,e=e.timeline;return this},t._swapSelfInParams=function(t){for(var e=t.length,i=t.concat();-1<--e;)"{self}"===t[e]&&(i[e]=this);return i},t._callback=function(t){var e=this.vars,i=e[t],r=e[t+"Params"],s=e[t+"Scope"]||e.callbackScope||this;switch(r?r.length:0){case 0:i.call(s);break;case 1:i.call(s,r[0]);break;case 2:i.call(s,r[0],r[1]);break;default:i.apply(s,r)}},t.eventCallback=function(t,e,i,r){if("on"===(t||"").substr(0,2)){var s=this.vars;if(1===arguments.length)return s[t];null==e?delete s[t]:(s[t]=e,s[t+"Params"]=x(i)&&-1!==i.join("").indexOf("{self}")?this._swapSelfInParams(i):i,s[t+"Scope"]=r),"onUpdate"===t&&(this._onUpdate=e)}return this},t.delay=function(t){return arguments.length?(this._timeline.smoothChildTiming&&this.startTime(this._startTime+t-this._delay),this._delay=t,this):this._delay},t.duration=function(t){return arguments.length?(this._duration=this._totalDuration=t,this._uncache(!0),this._timeline.smoothChildTiming&&0<this._time&&this._time<this._duration&&0!==t&&this.totalTime(this._totalTime*(t/this._duration),!0),this):(this._dirty=!1,this._duration)},t.totalDuration=function(t){return this._dirty=!1,arguments.length?this.duration(t):this._totalDuration},t.time=function(t,e){return arguments.length?(this._dirty&&this.totalDuration(),this.totalTime(t>this._duration?this._duration:t,e)):this._time},t.totalTime=function(t,e,i){if(g||M.wake(),!arguments.length)return this._totalTime;if(this._timeline){if(t<0&&!i&&(t+=this.totalDuration()),this._timeline.smoothChildTiming){this._dirty&&this.totalDuration();var r=this._totalDuration,s=this._timeline;if(r<t&&!i&&(t=r),this._startTime=(this._paused?this._pauseTime:s._time)-(this._reversed?r-t:t)/this._timeScale,s._dirty||this._uncache(!1),s._timeline)for(;s._timeline;)s._timeline._time!==(s._startTime+s._totalTime)/s._timeScale&&s.totalTime(s._totalTime,!0),s=s._timeline}this._gc&&this._enabled(!0,!1),this._totalTime===t&&0!==this._duration||(X.length&&G(),this.render(t,e,!1),X.length&&G())}return this},t.progress=t.totalProgress=function(t,e){var i=this.duration();return arguments.length?this.totalTime(i*t,e):i?this._time/i:this.ratio},t.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},t.endTime=function(t){return this._startTime+(0!=t?this.totalDuration():this.duration())/this._timeScale},t.timeScale=function(t){return arguments.length?(t=t||v,this._timeline&&this._timeline.smoothChildTiming&&(i=(e=this._pauseTime)||0===e?e:this._timeline.totalTime(),this._startTime=i-(i-this._startTime)*this._timeScale/t),this._timeScale=t,this._uncache(!1)):this._timeScale;var e,i},t.reversed=function(t){return arguments.length?(t!=this._reversed&&(this._reversed=t,this.totalTime(this._timeline&&!this._timeline.smoothChildTiming?this.totalDuration()-this._totalTime:this._totalTime,!0)),this):this._reversed},t.paused=function(t){if(!arguments.length)return this._paused;var e,i,r=this._timeline;return t!=this._paused&&r&&(g||t||M.wake(),i=(e=r.rawTime())-this._pauseTime,!t&&r.smoothChildTiming&&(this._startTime+=i,this._uncache(!1)),this._pauseTime=t?e:null,this._paused=t,this._active=this.isActive(),!t&&0!=i&&this._initted&&this.duration()&&(e=r.smoothChildTiming?this._totalTime:(e-this._startTime)/this._timeScale,this.render(e,e===this._totalTime,!0))),this._gc&&!t&&this._enabled(!0,!1),this};var F=p("core.FWDSimpleTimeline",function(t){f.call(this,0,t),this.autoRemoveChildren=this.smoothChildTiming=!0});(t=F.prototype=new f).constructor=F,t.kill()._gc=!1,t._first=t._last=t._recent=null,t._sortChildren=!1,t.add=t.insert=function(t,e,i,r){var s,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),s=this._last,this._sortChildren)for(n=t._startTime;s&&s._startTime>n;)s=s._prev;return s?(t._next=s._next,s._next=t):(t._next=this._first,this._first=t),t._next?t._next._prev=t:this._last=t,t._prev=s,this._recent=t,this._timeline&&this._uncache(!0),this},t._remove=function(t,e){return t.timeline===this&&(e||t._enabled(!1,!0),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),t._next=t._prev=t.timeline=null,t===this._recent&&(this._recent=this._last),this._timeline&&this._uncache(!0)),this},t.render=function(t,e,i){var r,s=this._first;for(this._totalTime=this._time=this._rawPrevTime=t;s;)r=s._next,(s._active||t>=s._startTime&&!s._paused)&&(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=r},t.rawTime=function(){return g||M.wake(),this._totalTime};var D=p("FWDTweenLite",function(t,e,i){if(f.call(this,e,i),this.render=D.prototype.render,null==t)throw"Cannot tween a null target.";this.target=t="string"==typeof t&&D.selector(t)||t;var r,s,n,a=t.jquery||t.length&&t!==_&&t[0]&&(t[0]===_||t[0].nodeType&&t[0].style&&!t.nodeType),o=this.vars.overwrite;if(this._overwrite=o=null==o?Z[D.defaultOverwrite]:"number"==typeof o?o>>0:Z[o],(a||t instanceof Array||t.push&&x(t))&&"number"!=typeof t[0])for(this._targets=n=l(t),this._propLookup=[],this._siblings=[],r=0;r<n.length;r++)(s=n[r])?"string"!=typeof s?s.length&&s!==_&&s[0]&&(s[0]===_||s[0].nodeType&&s[0].style&&!s.nodeType)?(n.splice(r--,1),this._targets=n=n.concat(l(s))):(this._siblings[r]=H(s,this,!1),1===o&&1<this._siblings[r].length&&J(s,this,null,1,this._siblings[r])):"string"==typeof(s=n[r--]=D.selector(s))&&n.splice(r+1,1):n.splice(r--,1);else this._propLookup={},this._siblings=H(t,this,!1),1===o&&1<this._siblings.length&&J(t,this,null,1,this._siblings);(this.vars.immediateRender||0===e&&0===this._delay&&!1!==this.vars.immediateRender)&&(this._time=-v,this.render(Math.min(0,-this._delay)))},!0),z=function(t){return t&&t.length&&t!==_&&t[0]&&(t[0]===_||t[0].nodeType&&t[0].style&&!t.nodeType)};(t=D.prototype=new f).constructor=D,t.kill()._gc=!1,t.ratio=0,t._firstPT=t._targets=t._overwrittenProps=t._startAt=null,t._notifyPluginsOfEnabled=t._lazy=!1,D.version="1.19.0",D.defaultEase=t._ease=new b(null,null,1,1),D.defaultOverwrite="auto",D.ticker=M,D.autoSleep=120,D.lagSmoothing=function(t,e){M.lagSmoothing(t,e)},D.selector=_.$||_.jQuery||function(t){var e=_.$||_.jQuery;return e?(D.selector=e)(t):"undefined"==typeof document?t:document.querySelectorAll?document.querySelectorAll(t):document.getElementById("#"===t.charAt(0)?t.substr(1):t)};var X=[],I={},N=/(?:(-|-=|\+=)?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/gi,Y=function(t){for(var e,i=this._firstPT;i;)e=i.blob?t?this.join(""):this.start:i.c*t+i.s,i.m?e=i.m(e,this._target||i.t):e<1e-6&&-1e-6<e&&(e=0),i.f?i.fp?i.t[i.p](i.fp,e):i.t[i.p](e):i.t[i.p]=e,i=i._next},E=function(t,e,i,r){var s,n,a,o,l,h,f,u=[t,e],p=0,_="",c=0;for(u.start=t,i&&(i(u),t=u[0],e=u[1]),u.length=0,s=t.match(N)||[],n=e.match(N)||[],r&&(r._next=null,r.blob=1,u._firstPT=u._applyPT=r),l=n.length,o=0;o<l;o++)f=n[o],_+=(h=e.substr(p,e.indexOf(f,p)-p))||!o?h:",",p+=h.length,c?c=(c+1)%5:"rgba("===h.substr(-5)&&(c=1),f===s[o]||s.length<=o?_+=f:(_&&(u.push(_),_=""),a=parseFloat(s[o]),u.push(a),u._firstPT={_next:u._firstPT,t:u,p:u.length-1,s:a,c:("="===f.charAt(1)?parseInt(f.charAt(0)+"1",10)*parseFloat(f.substr(2)):parseFloat(f)-a)||0,f:0,m:c&&c<4?Math.round:0}),p+=f.length;return(_+=e.substr(p))&&u.push(_),u.setRatio=Y,u},B=function(t,e,i,r,s,n,a,o,l){"function"==typeof r&&(r=r(l||0,t));var h,f="get"===i?t[e]:i,u=typeof t[e],p="string"==typeof r&&"="===r.charAt(1),_={t:t,p:e,s:f,f:"function"==u,pg:0,n:s||e,m:n?"function"==typeof n?n:Math.round:0,pr:0,c:p?parseInt(r.charAt(0)+"1",10)*parseFloat(r.substr(2)):parseFloat(r)-f||0};if("number"!=u&&("function"==u&&"get"===i&&(h=e.indexOf("set")||"function"!=typeof t["get"+e.substr(3)]?e:"get"+e.substr(3),_.s=f=a?t[h](a):t[h]()),"string"==typeof f&&(a||isNaN(f))?(_.fp=a,_={t:E(f,r,o||D.defaultStringFilter,_),p:"setRatio",s:0,c:1,f:2,pg:0,n:s||e,pr:0,m:0}):p||(_.s=parseFloat(f),_.c=parseFloat(r)-_.s||0)),_.c)return(_._next=this._firstPT)&&(_._next._prev=_),this._firstPT=_},W=D._internals={isArray:x,isSelector:z,lazyTweens:X,blobDif:E},L=D._plugins={},j=W.tweenLookup={},V=0,q=W.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,lazy:1,onOverwrite:1,callbackScope:1,stringFilter:1,id:1},Z={none:0,all:1,auto:2,concurrent:3,allOnStart:4,preexisting:5,true:1,false:0},U=f._rootFramesTimeline=new F,$=f._rootTimeline=new F,Q=30,G=W.lazyRender=function(){var t,e=X.length;for(I={};-1<--e;)(t=X[e])&&!1!==t._lazy&&(t.render(t._lazy[0],t._lazy[1],!0),t._lazy=!1);X.length=0};$._startTime=M.time,U._startTime=M.frame,$._active=U._active=!0,setTimeout(G,1),f._updateRoot=D.render=function(){var t,e,i;if(X.length&&G(),$.render((M.time-$._startTime)*$._timeScale,!1,!1),U.render((M.frame-U._startTime)*U._timeScale,!1,!1),X.length&&G(),M.frame>=Q){for(i in Q=M.frame+(parseInt(D.autoSleep,10)||120),j){for(t=(e=j[i].tweens).length;-1<--t;)e[t]._gc&&e.splice(t,1);0===e.length&&delete j[i]}if((!(i=$._first)||i._paused)&&D.autoSleep&&!U._first&&1===M._listeners.tick.length){for(;i&&i._paused;)i=i._next;i||M.sleep()}}},M.addEventListener("tick",f._updateRoot);var H=function(t,e,i){var r,s,n=t._fwdTweenID;if(j[n||(t._fwdTweenID=n="t"+V++)]||(j[n]={target:t,tweens:[]}),e&&((r=j[n].tweens)[s=r.length]=e,i))for(;-1<--s;)r[s]===e&&r.splice(s,1);return j[n].tweens},K=function(t,e,i,r){var s,n,a=t.vars.onOverwrite;return a&&(s=a(t,e,i,r)),(a=D.onOverwrite)&&(n=a(t,e,i,r)),!1!==s&&!1!==n},J=function(t,e,i,r,s){var n,a,o;if(1===r||4<=r){for(o=s.length,_=0;_<o;_++)if((a=s[_])!==e)a._gc||a._kill(null,t,e)&&(n=!0);else if(5===r)break;return n}for(var l,h=e._startTime+v,f=[],u=0,p=0===e._duration,_=s.length;-1<--_;)(a=s[_])===e||a._gc||a._paused||(a._timeline!==e._timeline?(l=l||tt(e,0,p),0===tt(a,l,p)&&(f[u++]=a)):a._startTime<=h&&a._startTime+a.totalDuration()/a._timeScale>h&&((p||!a._initted)&&h-a._startTime<=2e-10||(f[u++]=a)));for(_=u;-1<--_;)if(a=f[_],2===r&&a._kill(i,t,e)&&(n=!0),2!==r||!a._firstPT&&a._initted){if(2!==r&&!K(a,e))continue;a._enabled(!1,!1)&&(n=!0)}return n},tt=function(t,e,i){for(var r=t._timeline,s=r._timeScale,n=t._startTime;r._timeline;){if(n+=r._startTime,s*=r._timeScale,r._paused)return-100;r=r._timeline}return e<(n/=s)?n-e:i&&n===e||!t._initted&&n-e<2*v?v:(n+=t.totalDuration()/t._timeScale/s)>e+v?0:n-e-v};t._init=function(){var t,e,i,r,s,n,a=this.vars,o=this._overwrittenProps,l=this._duration,h=!!a.immediateRender,f=a.ease;if(a.startAt){for(r in this._startAt&&(this._startAt.render(-1,!0),this._startAt.kill()),s={},a.startAt)s[r]=a.startAt[r];if(s.overwrite=!1,s.immediateRender=!0,s.lazy=h&&!1!==a.lazy,s.startAt=s.delay=null,this._startAt=D.to(this.target,0,s),h)if(0<this._time)this._startAt=null;else if(0!==l)return}else if(a.runBackwards&&0!==l)if(this._startAt)this._startAt.render(-1,!0),this._startAt.kill(),this._startAt=null;else{for(r in 0!==this._time&&(h=!1),i={},a)q[r]&&"autoCSS"!==r||(i[r]=a[r]);if(i.overwrite=0,i.data="isFromStart",i.lazy=h&&!1!==a.lazy,i.immediateRender=h,this._startAt=D.to(this.target,0,i),h){if(0===this._time)return}else this._startAt._init(),this._startAt._enabled(!1),this.vars.immediateRender&&(this._startAt=null)}if(this._ease=f=f?f instanceof b?f:"function"==typeof f?new b(f,a.easeParams):P[f]||D.defaultEase:D.defaultEase,a.easeParams instanceof Array&&f.config&&(this._ease=f.config.apply(f,a.easeParams)),this._easeType=this._ease._type,this._easePower=this._ease._power,this._firstPT=null,this._targets)for(n=this._targets.length,t=0;t<n;t++)this._initProps(this._targets[t],this._propLookup[t]={},this._siblings[t],o?o[t]:null,t)&&(e=!0);else e=this._initProps(this.target,this._propLookup,this._siblings,o,0);if(e&&D._onPluginEvent("_onInitAllProps",this),o&&(this._firstPT||"function"!=typeof this.target&&this._enabled(!1,!1)),a.runBackwards)for(i=this._firstPT;i;)i.s+=i.c,i.c=-i.c,i=i._next;this._onUpdate=a.onUpdate,this._initted=!0},t._initProps=function(t,e,i,r,s){var n,a,o,l,h,f;if(null==t)return!1;for(n in I[t._fwdTweenID]&&G(),this.vars.css||t.style&&t!==_&&t.nodeType&&L.css&&!1!==this.vars.autoCSS&&function(t,e){var i,r={};for(i in t)q[i]||i in e&&"transform"!==i&&"x"!==i&&"y"!==i&&"width"!==i&&"height"!==i&&"className"!==i&&"border"!==i||!(!L[i]||L[i]&&L[i]._autoCSS)||(r[i]=t[i],delete t[i]);t.css=r}(this.vars,t),this.vars)if(f=this.vars[n],q[n])f&&(f instanceof Array||f.push&&x(f))&&-1!==f.join("").indexOf("{self}")&&(this.vars[n]=f=this._swapSelfInParams(f,this));else if(L[n]&&(l=new L[n])._onInitTween(t,this.vars[n],this,s)){for(this._firstPT=h={_next:this._firstPT,t:l,p:"setRatio",s:0,c:1,f:1,n:n,pg:1,pr:l._priority,m:0},a=l._overwriteProps.length;-1<--a;)e[l._overwriteProps[a]]=this._firstPT;(l._priority||l._onInitAllProps)&&(o=!0),(l._onDisable||l._onEnable)&&(this._notifyPluginsOfEnabled=!0),h._next&&(h._next._prev=h)}else e[n]=B.call(this,t,n,"get",f,n,0,null,this.vars.stringFilter,s);return r&&this._kill(r,t)?this._initProps(t,e,i,r,s):1<this._overwrite&&this._firstPT&&1<i.length&&J(t,this,e,this._overwrite,i)?(this._kill(e,t),this._initProps(t,e,i,r,s)):(this._firstPT&&(!1!==this.vars.lazy&&this._duration||this.vars.lazy&&!this._duration)&&(I[t._fwdTweenID]=!0),o)},t.render=function(t,e,i){var r,s,n,a,o,l,h,f=this._time,u=this._duration,p=this._rawPrevTime;if(u-1e-7<=t?(this._totalTime=this._time=u,this.ratio=this._ease._calcEnd?this._ease.getRatio(1):1,this._reversed||(r=!0,s="onComplete",i=i||this._timeline.autoRemoveChildren),0===u&&(!this._initted&&this.vars.lazy&&!i||(this._startTime===this._timeline._duration&&(t=0),(p<0||t<=0&&-1e-7<=t||p===v&&"isPause"!==this.data)&&p!==t&&(i=!0,v<p&&(s="onReverseComplete")),this._rawPrevTime=a=!e||t||p===t?t:v))):t<1e-7?(this._totalTime=this._time=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0,(0!==f||0===u&&0<p)&&(s="onReverseComplete",r=this._reversed),t<0&&(this._active=!1,0===u&&(!this._initted&&this.vars.lazy&&!i||(0<=p&&(p!==v||"isPause"!==this.data)&&(i=!0),this._rawPrevTime=a=!e||t||p===t?t:v))),this._initted||(i=!0)):(this._totalTime=this._time=t,this._easeType?(o=t/u,(1===(l=this._easeType)||3===l&&.5<=o)&&(o=1-o),3===l&&(o*=2),1===(h=this._easePower)?o*=o:2===h?o*=o*o:3===h?o*=o*o*o:4===h&&(o*=o*o*o*o),this.ratio=1===l?1-o:2===l?o:t/u<.5?o/2:1-o/2):this.ratio=this._ease.getRatio(t/u)),this._time!==f||i){if(!this._initted){if(this._init(),!this._initted||this._gc)return;if(!i&&this._firstPT&&(!1!==this.vars.lazy&&this._duration||this.vars.lazy&&!this._duration))return this._time=this._totalTime=f,this._rawPrevTime=p,X.push(this),void(this._lazy=[t,e]);this._time&&!r?this.ratio=this._ease.getRatio(this._time/u):r&&this._ease._calcEnd&&(this.ratio=this._ease.getRatio(0===this._time?0:1))}for(!1!==this._lazy&&(this._lazy=!1),this._active||!this._paused&&this._time!==f&&0<=t&&(this._active=!0),0===f&&(this._startAt&&(0<=t?this._startAt.render(t,e,i):s=s||"_dummyGS"),this.vars.onStart&&(0===this._time&&0!==u||e||this._callback("onStart"))),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&&-1e-4!==t&&this._startAt.render(t,e,i),e||(this._time!==f||r||i)&&this._callback("onUpdate")),s&&(this._gc&&!i||(t<0&&this._startAt&&!this._onUpdate&&-1e-4!==t&&this._startAt.render(t,e,i),r&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!e&&this.vars[s]&&this._callback(s),0===u&&this._rawPrevTime===v&&a!==v&&(this._rawPrevTime=0)))}},t._kill=function(t,e,i){if("all"===t&&(t=null),null==t&&(null==e||e===this.target))return this._lazy=!1,this._enabled(!1,!1);e="string"!=typeof e?e||this._targets||this.target:D.selector(e)||e;var r,s,n,a,o,l,h,f,u,p=i&&this._time&&i._startTime===this._startTime&&this._timeline===i._timeline;if((x(e)||z(e))&&"number"!=typeof e[0])for(r=e.length;-1<--r;)this._kill(t,e[r],i)&&(l=!0);else{if(this._targets){for(r=this._targets.length;-1<--r;)if(e===this._targets[r]){o=this._propLookup[r]||{},this._overwrittenProps=this._overwrittenProps||[],s=this._overwrittenProps[r]=t?this._overwrittenProps[r]||{}:"all";break}}else{if(e!==this.target)return!1;o=this._propLookup,s=this._overwrittenProps=t?this._overwrittenProps||{}:"all"}if(o){if(h=t||o,f=t!==s&&"all"!==s&&t!==o&&("object"!=typeof t||!t._tempKill),i&&(D.onOverwrite||this.vars.onOverwrite)){for(n in h)o[n]&&(u=u||[]).push(n);if((u||!t)&&!K(this,i,e,u))return!1}for(n in h)(a=o[n])&&(p&&(a.f?a.t[a.p](a.s):a.t[a.p]=a.s,l=!0),a.pg&&a.t._kill(h)&&(l=!0),a.pg&&0!==a.t._overwriteProps.length||(a._prev?a._prev._next=a._next:a===this._firstPT&&(this._firstPT=a._next),a._next&&(a._next._prev=a._prev),a._next=a._prev=null),delete o[n]),f&&(s[n]=1);!this._firstPT&&this._initted&&this._enabled(!1,!1)}}return l},t.invalidate=function(){return this._notifyPluginsOfEnabled&&D._onPluginEvent("_onDisable",this),this._firstPT=this._overwrittenProps=this._startAt=this._onUpdate=null,this._notifyPluginsOfEnabled=this._active=this._lazy=!1,this._propLookup=this._targets?{}:[],f.prototype.invalidate.call(this),this.vars.immediateRender&&(this._time=-v,this.render(Math.min(0,-this._delay))),this},t._enabled=function(t,e){if(g||M.wake(),t&&this._gc){var i,r=this._targets;if(r)for(i=r.length;-1<--i;)this._siblings[i]=H(r[i],this,!0);else this._siblings=H(this.target,this,!0)}return f.prototype._enabled.call(this,t,e),!(!this._notifyPluginsOfEnabled||!this._firstPT)&&D._onPluginEvent(t?"_onEnable":"_onDisable",this)},D.to=function(t,e,i){return new D(t,e,i)},D.from=function(t,e,i){return i.runBackwards=!0,i.immediateRender=0!=i.immediateRender,new D(t,e,i)},D.fromTo=function(t,e,i,r){return r.startAt=i,r.immediateRender=0!=r.immediateRender&&0!=i.immediateRender,new D(t,e,r)},D.delayedCall=function(t,e,i,r,s){return new D(e,0,{delay:t,onComplete:e,onCompleteParams:i,callbackScope:r,onReverseComplete:e,onReverseCompleteParams:i,immediateRender:!1,lazy:!1,useFrames:s,overwrite:0})},D.set=function(t,e){return new D(t,0,e)},D.getTweensOf=function(t,e){if(null==t)return[];var i,r,s,n;if(t="string"==typeof t&&D.selector(t)||t,(x(t)||z(t))&&"number"!=typeof t[0]){for(i=t.length,r=[];-1<--i;)r=r.concat(D.getTweensOf(t[i],e));for(i=r.length;-1<--i;)for(n=r[i],s=i;-1<--s;)n===r[s]&&r.splice(i,1)}else for(i=(r=H(t).concat()).length;-1<--i;)(r[i]._gc||e&&!r[i].isActive())&&r.splice(i,1);return r},D.killTweensOf=D.killDelayedCallsTo=function(t,e,i){"object"==typeof e&&(i=e,e=!1);for(var r=D.getTweensOf(t,e),s=r.length;-1<--s;)r[s]._kill(i,t)};var et=p("plugins.TweenPlugin",function(t,e){this._overwriteProps=(t||"").split(","),this._propName=this._overwriteProps[0],this._priority=e||0,this._super=et.prototype},!0);if(t=et.prototype,et.version="1.19.0",et.API=2,t._firstPT=null,t._addTween=B,t.setRatio=Y,t._kill=function(t){var e,i=this._overwriteProps,r=this._firstPT;if(null!=t[this._propName])this._overwriteProps=[];else for(e=i.length;-1<--e;)null!=t[i[e]]&&i.splice(e,1);for(;r;)null!=t[r.n]&&(r._next&&(r._next._prev=r._prev),r._prev?(r._prev._next=r._next,r._prev=null):this._firstPT===r&&(this._firstPT=r._next)),r=r._next;return!1},t._mod=t._roundProps=function(t){for(var e,i=this._firstPT;i;)(e=t[this._propName]||null!=i.n&&t[i.n.split(this._propName+"_").join("")])&&"function"==typeof e&&(2===i.f?i.t._applyPT.m=e:i.m=e),i=i._next},D._onPluginEvent=function(t,e){var i,r,s,n,a,o=e._firstPT;if("_onInitAllProps"===t){for(;o;){for(a=o._next,r=s;r&&r.pr>o.pr;)r=r._next;(o._prev=r?r._prev:n)?o._prev._next=o:s=o,(o._next=r)?r._prev=o:n=o,o=a}o=e._firstPT=s}for(;o;)o.pg&&"function"==typeof o.t[t]&&o.t[t]()&&(i=!0),o=o._next;return i},et.activate=function(t){for(var e=t.length;-1<--e;)t[e].API===et.API&&(L[(new t[e])._propName]=t[e]);return!0},s.plugin=function(t){if(!(t&&t.propName&&t.init&&t.API))throw"illegal plugin definition.";var e,i=t.propName,r=t.priority||0,s=t.overwriteProps,n={init:"_onInitTween",set:"setRatio",kill:"_kill",round:"_mod",mod:"_mod",initAll:"_onInitAllProps"},a=p("plugins."+i.charAt(0).toUpperCase()+i.substr(1)+"Plugin",function(){et.call(this,i,r),this._overwriteProps=s||[]},!0===t.fwd_global),o=a.prototype=new et(i);for(e in(o.constructor=a).API=t.API,n)"function"==typeof t[e]&&(o[n[e]]=t[e]);return a.version=t.version,et.activate([a]),a},o=_._fwd_fwdQueue){for(h=0;h<o.length;h++)o[h]();for(t in w)w[t].func||_.console.log("FWDAnimation encountered missing dependency: "+t)}g=!1}}("undefined"!=typeof fwd_module&&fwd_module.exports&&"undefined"!=typeof fwd_global?fwd_global:this||window,"FWDAnimation"));