$Jssor$=window.$Jssor$=window.$Jssor$||{};var $JssorDebug$=new function(){this.$DebugMode=!0;this.$Log=function(msg,important){var console=window.console||{};var debug=this.$DebugMode;if(debug&&console.log){console.log(msg)}else if(debug&&important){alert(msg)}};this.$Error=function(msg,e){var console=window.console||{};var debug=this.$DebugMode;if(debug&&console.error){console.error(msg)}else if(debug){alert(msg)}
if(debug){throw e||new Error(msg)}};this.$Fail=function(msg){throw new Error(msg)};this.$Assert=function(value,msg){var debug=this.$DebugMode;if(debug){if(!value)
throw new Error("Assert failed "+msg||"")}};this.$Trace=function(msg){var console=window.console||{};var debug=this.$DebugMode;if(debug&&console.log){console.log(msg)}};this.$Execute=function(func){var debug=this.$DebugMode;if(debug)
func()};this.$LiveStamp=function(obj,id){var stamp=document.createElement("DIV");stamp.setAttribute("id",id);obj.$Live=stamp}};var $JssorEventManager$=function(){var self=this;var listeners={};self.$On=self.addEventListener=function(eventName,handler){if(typeof(handler)!="function"){return}
if(!listeners[eventName]){listeners[eventName]=[]}
listeners[eventName].push(handler)};self.$Off=self.removeEventListener=function(eventName,handler){var handlers=listeners[eventName];if(typeof(handler)!="function"){return}else if(!handlers){return}
for(var i=0;i<handlers.length;i++){if(handler==handlers[i]){handlers.splice(i,1);return}}};self.$ClearEventListeners=function(eventName){if(listeners[eventName]){delete listeners[eventName]}};self.$TriggerEvent=function(eventName){var handlers=listeners[eventName];var args=[];if(!handlers){return}
for(var i=1;i<arguments.length;i++){args.push(arguments[i])}
for(var i=0;i<handlers.length;i++){try{handlers[i].apply(window,args)}catch(e){$JssorDebug$.$Error(e.name+" while executing "+eventName+" handler: "+e.message,e)}}}}