Notice: Undefined index: HTTP_ACCEPT_ENCODING in /home/databas6/public_html/functions/lib__javascripts__combine_multiple__determine_technical.php on line 10

Notice: Undefined index: HTTP_ACCEPT_ENCODING in /home/databas6/public_html/functions/lib__javascripts__combine_multiple__determine_technical.php on line 11
(function(window,undefined){var S={version:"3.0.3"},ua=navigator.userAgent.toLowerCase();if(ua.indexOf("windows")>-1||ua.indexOf("win32")>-1){S.isWindows=true}else if(ua.indexOf("macintosh")>-1||ua.indexOf("mac os x")>-1){S.isMac=true}else if(ua.indexOf("linux")>-1)S.isLinux=true;S.isIE=ua.indexOf("msie")>-1;S.isIE6=ua.indexOf("msie 6")>-1;S.isIE7=ua.indexOf("msie 7")>-1;S.isGecko=ua.indexOf("gecko")>-1&&ua.indexOf("safari")==-1;S.isWebKit=ua.indexOf("applewebkit/")>-1;var inlineId=/#(.+)$/,galleryName=/^(light|shadow)box\[(.*?)\]/i,inlineParam=/\s*([a-z_]*?)\s*=\s*(.+)\s*/,fileExtension=/[0-9a-z]+$/i,scriptPath=/(.+\/)shadowbox\.js/i,open=false,initialized=false,lastOptions={},slideDelay=0,slideStart,slideTimer;S.current=-1;S.dimensions=null;S.ease=function(state){return 1+Math.pow(state-1,3)};S.errorInfo={fla:{name:"Flash",url:"http://www.adobe.com/products/flashplayer/"},qt:{name:"QuickTime",url:"http://www.apple.com/quicktime/download/"},wmp:{name:"Windows Media Player",url:"http://www.microsoft.com/windows/windowsmedia/"},f4m:{name:"Flip4Mac",url:"http://www.flip4mac.com/wmv_download.htm"}};S.gallery=[];S.onReady=noop;S.path=null;S.player=null;S.playerId="sb-player";S.options={animate:true,animateFade:true,autoplayMovies:true,continuous:false,enableKeys:true,flashParams:{bgcolor:"#000000",allowfullscreen:true},flashVars:{},flashVersion:"9.0.115",handleOversize:"resize",handleUnsupported:"link",onChange:noop,onClose:noop,onFinish:noop,onOpen:noop,showMovieControls:true,skipSetup:false,slideshowDelay:0,viewportPadding:20};S.getCurrent=function(){return S.current>-1?S.gallery[S.current]:null};S.hasNext=function(){return S.gallery.length>1&&(S.current!=S.gallery.length-1||S.options.continuous)};S.isOpen=function(){return open};S.isPaused=function(){return slideTimer=="pause"};S.applyOptions=function(options){lastOptions=apply({},S.options);apply(S.options,options)};S.revertOptions=function(){apply(S.options,lastOptions)};S.init=function(options,callback){if(initialized)return;initialized=true;if(S.skin.options)apply(S.options,S.skin.options);if(options)apply(S.options,options);if(!S.path){var path,scripts=document.getElementsByTagName("script");for(var i=0,len=scripts.length;imaxHeight)height=maxHeight-extraHeight;var extraWidth=2*padding+leftRight;if(width+extraWidth>maxWidth)width=maxWidth-extraWidth;var changeHeight=(originalHeight-height)/originalHeight,changeWidth=(originalWidth-width)/originalWidth,oversized=(changeHeight>0||changeWidth>0);if(preserveAspect&&oversized)if(changeHeight>changeWidth){width=Math.round((originalWidth/originalHeight)*height)}else if(changeWidth>changeHeight)height=Math.round((originalHeight/originalWidth)*width);S.dimensions={height:height+topBottom,width:width+leftRight,innerHeight:height,innerWidth:width,top:Math.floor((maxHeight-(height+extraHeight))/2+padding),left:Math.floor((maxWidth-(width+extraWidth))/2+padding),oversized:oversized};return S.dimensions};S.makeGallery=function(obj){var gallery=[],current=-1;if(typeof obj=="string")obj=[obj];if(typeof obj.length=="number"){each(obj,function(i,o){if(o.content){gallery[i]=o}else gallery[i]={content:o}});current=0}else{if(obj.tagName){var cacheObj=S.getCache(obj);obj=cacheObj?cacheObj:S.makeObject(obj)};if(obj.gallery){gallery=[];var o;for(var key in S.cache){o=S.cache[key];if(o.gallery&&o.gallery==obj.gallery){if(current==-1&&o.content==obj.content)current=gallery.length;gallery.push(o)}};if(current==-1){gallery.unshift(obj);current=0}}else{gallery=[obj];current=0}};each(gallery,function(i,o){gallery[i]=apply({},o)});return[gallery,current]};S.makeObject=function(link,options){var obj={content:link.href,title:link.getAttribute("title")||"",link:link};if(options){options=apply({},options);each(["player","title","height","width","gallery"],function(i,o){if(typeof options[o]!="undefined"){obj[o]=options[o];delete options[o]}});obj.options=options}else obj.options={};if(!obj.player)obj.player=S.getPlayer(obj.content);var rel=link.getAttribute("rel");if(rel){var match=rel.match(galleryName);if(match)obj.gallery=escape(match[2]);each(rel.split(";"),function(i,p){match=p.match(inlineParam);if(match)obj[match[1]]=match[2]})};return obj};S.getPlayer=function(content){if(content.indexOf("#")>-1&&content.indexOf(document.location.href)==0)return"inline";var q=content.indexOf("?");if(q>-1)content=content.substring(0,q);var ext,m=content.match(fileExtension);if(m)ext=m[0].toLowerCase();if(ext){if(S.img&&S.img.ext.indexOf(ext)>-1)return"img";if(S.swf&&S.swf.ext.indexOf(ext)>-1)return"swf";if(S.flv&&S.flv.ext.indexOf(ext)>-1)return"flv";if(S.qt&&S.qt.ext.indexOf(ext)>-1)if(S.wmp&&S.wmp.ext.indexOf(ext)>-1){return"qtwmp"}else return"qt";if(S.wmp&&S.wmp.ext.indexOf(ext)>-1)return"wmp"};return"iframe"} function filterGallery(){var err=S.errorInfo,plugins=S.plugins,obj,remove,needed,m,format,replace,inlineEl,flashVersion;for(var i=0;i'+sprintf(S.lang.errors[format],replace)+""}else remove=true}else if(obj.player=="inline"){m=inlineId.exec(obj.content);if(m){inlineEl=get(m[1]);if(inlineEl){obj.content=inlineEl.innerHTML}else remove=true}else remove=true}else if(obj.player=="swf"||obj.player=="flv"){flashVersion=(obj.options&&obj.options.flashVersion)||S.options.flashVersion;if(S.flash&&!S.flash.hasFlashPlayerVersion(flashVersion)){obj.width=310;obj.height=177}};if(remove){S.gallery.splice(i,1);if(i0?i-1:i;--i}}} function listenKeys(on){if(!S.options.enableKeys)return;(on?addEvent:removeEvent)(document,"keydown",handleKey)} function handleKey(e){if(e.metaKey||e.shiftKey||e.altKey||e.ctrlKey)return;var code=keyCode(e),handler;switch(code){case 81:case 88:case 27:handler=S.close;break;case 37:handler=S.previous;break;case 39:handler=S.next;break;case 32:handler=typeof slideTimer=="number"?S.pause:S.play;break};if(handler){preventDefault(e);handler()}} function load(changing){listenKeys(false);var obj=S.getCurrent(),player=(obj.player=="inline"?"html":obj.player);if(typeof S[player]!="function")throw"unknown player "+player;if(changing){S.player.remove();S.revertOptions();S.applyOptions(obj.options||{})};S.player=new S[player](obj,S.playerId);if(S.gallery.length>1){var next=S.gallery[S.current+1]||S.gallery[0];if(next.player=="img"){var a=new Image();a.src=next.content};var prev=S.gallery[S.current-1]||S.gallery[S.gallery.length-1];if(prev.player=="img"){var b=new Image();b.src=prev.content}};S.skin.onLoad(changing,waitReady)} function waitReady(){if(!open)return;if(typeof S.player.ready!="undefined"){var timer=setInterval(function(){if(open){if(S.player.ready){clearInterval(timer);timer=null;S.skin.onReady(show)}}else{clearInterval(timer);timer=null}},10)}else S.skin.onReady(show)} function show(){if(!open)return;S.player.append(S.skin.body,S.dimensions);S.skin.onShow(finish)} function finish(){if(!open)return;if(S.player.onLoad)S.player.onLoad();S.options.onFinish(S.getCurrent());if(!S.isPaused())S.play();listenKeys(true)};if(!Array.prototype.indexOf)Array.prototype.indexOf=function(obj,from){var len=this.length>>>0;from=from||0;if(from<0)from+=len;for(;from-1;S.plugins={fla:names.indexOf("Shockwave Flash")>-1,qt:names.indexOf("QuickTime")>-1,wmp:!f4m&&names.indexOf("Windows Media")>-1,f4m:f4m}}else{var detectPlugin=function(name){var axo;try{axo=new ActiveXObject(name)}catch(e){};return!!axo};S.plugins={fla:detectPlugin("ShockwaveFlash.ShockwaveFlash"),qt:detectPlugin("QuickTime.QuickTime"),wmp:detectPlugin("wmplayer.ocx"),f4m:false}};var relAttr=/^(light|shadow)box/i,expando="shadowboxCacheKey",cacheKey=1;S.cache={};S.select=function(selector){var links=[];if(!selector){var rel;each(document.getElementsByTagName("a"),function(i,el){rel=el.getAttribute("rel");if(rel&&relAttr.test(rel))links.push(el)})}else{var length=selector.length;if(length){if(typeof selector=="string"){if(S.find)links=S.find(selector)}else if(length==2&&typeof selector[0]=="string"&&selector[1].nodeType){if(S.find)links=S.find(selector[0],selector[1])}else for(var i=0;i+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,done=0,toString=Object.prototype.toString,hasDuplicate=false,baseHasDuplicate=true;[0,0].sort(function(){baseHasDuplicate=false;return 0});var Sizzle=function(selector,context,results,seed){results=results||[];var origContext=context=context||document;if(context.nodeType!==1&&context.nodeType!==9)return[];if(!selector||typeof selector!=="string")return results;var parts=[],m,set,checkSet,extra,prune=true,contextXML=isXML(context),soFar=selector;while((chunker.exec(""),m=chunker.exec(soFar))!==null){soFar=m[3];parts.push(m[1]);if(m[2]){extra=m[3];break}};if(parts.length>1&&origPOS.exec(selector)){if(parts.length===2&&Expr.relative[parts[0]]){set=posProcess(parts[0]+parts[1],context)}else{set=Expr.relative[parts[0]]?[context]:Sizzle(parts.shift(),context);while(parts.length){selector=parts.shift();if(Expr.relative[selector])selector+=parts.shift();set=posProcess(selector,set)}}}else{if(!seed&&parts.length>1&&context.nodeType===9&&!contextXML&&Expr.match.ID.test(parts[0])&&!Expr.match.ID.test(parts[parts.length-1])){var ret=Sizzle.find(parts.shift(),context,contextXML);context=ret.expr?Sizzle.filter(ret.expr,ret.set)[0]:ret.set[0]};if(context){var ret=seed?{expr:parts.pop(),set:makeArray(seed)}:Sizzle.find(parts.pop(),parts.length===1&&(parts[0]==="~"||parts[0]==="+")&&context.parentNode?context.parentNode:context,contextXML);set=ret.expr?Sizzle.filter(ret.expr,ret.set):ret.set;if(parts.length>0){checkSet=makeArray(set)}else prune=false;while(parts.length){var cur=parts.pop(),pop=cur;if(!Expr.relative[cur]){cur=""}else pop=parts.pop();if(pop==null)pop=context;Expr.relative[cur](checkSet,pop,contextXML)}}else checkSet=parts=[]};if(!checkSet)checkSet=set;if(!checkSet)throw"Syntax error, unrecognized expression: "+(cur||selector);if(toString.call(checkSet)==="[object Array]"){if(!prune){results.push.apply(results,checkSet)}else if(context&&context.nodeType===1){for(var i=0;checkSet[i]!=null;i++)if(checkSet[i]&&(checkSet[i]===true||checkSet[i].nodeType===1&&contains(context,checkSet[i])))results.push(set[i])}else for(var i=0;checkSet[i]!=null;i++)if(checkSet[i]&&checkSet[i].nodeType===1)results.push(set[i])}else makeArray(checkSet,results);if(extra){Sizzle(extra,origContext,results,seed);Sizzle.uniqueSort(results)};return results};Sizzle.uniqueSort=function(results){if(sortOrder){hasDuplicate=baseHasDuplicate;results.sort(sortOrder);if(hasDuplicate)for(var i=1;i":function(checkSet,part){var isPartStr=typeof part==="string";if(isPartStr&&!/\W/.test(part)){part=part.toLowerCase();for(var i=0,l=checkSet.length;i=0)){if(!inplace)result.push(elem)}else if(inplace)curLoop[i]=false;return false},ID:function(match){return match[1].replace(/\\/g,"")},TAG:function(match,curLoop){return match[1].toLowerCase()},CHILD:function(match){if(match[1]==="nth"){var test=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(match[2]==="even"&&"2n"||match[2]==="odd"&&"2n+1"||!/\D/.test(match[2])&&"0n+"+match[2]||match[2]);match[2]=(test[1]+(test[2]||1))-0;match[3]=test[3]-0};match[0]=done++;return match},ATTR:function(match,curLoop,inplace,result,not,isXML){var name=match[1].replace(/\\/g,"");if(!isXML&&Expr.attrMap[name])match[1]=Expr.attrMap[name];if(match[2]==="~=")match[4]=" "+match[4]+" ";return match},PSEUDO:function(match,curLoop,inplace,result,not){if(match[1]==="not"){if((chunker.exec(match[3])||"").length>1||/^\w/.test(match[3])){match[3]=Sizzle(match[3],null,null,curLoop)}else{var ret=Sizzle.filter(match[3],curLoop,inplace,true^not);if(!inplace)result.push.apply(result,ret);return false}}else if(Expr.match.POS.test(match[0])||Expr.match.CHILD.test(match[0]))return true;return match},POS:function(match){match.unshift(true);return match}},filters:{enabled:function(elem){return elem.disabled===false&&elem.type!=="hidden"},disabled:function(elem){return elem.disabled===true},checked:function(elem){return elem.checked===true},selected:function(elem){elem.parentNode.selectedIndex;return elem.selected===true},parent:function(elem){return!!elem.firstChild},empty:function(elem){return!elem.firstChild},has:function(elem,i,match){return!!Sizzle(match[3],elem).length},header:function(elem){return/h\d/i.test(elem.nodeName)},text:function(elem){return"text"===elem.type},radio:function(elem){return"radio"===elem.type},checkbox:function(elem){return"checkbox"===elem.type},file:function(elem){return"file"===elem.type},password:function(elem){return"password"===elem.type},submit:function(elem){return"submit"===elem.type},image:function(elem){return"image"===elem.type},reset:function(elem){return"reset"===elem.type},button:function(elem){return"button"===elem.type||elem.nodeName.toLowerCase()==="button"},input:function(elem){return/input|select|textarea|button/i.test(elem.nodeName)}},setFilters:{first:function(elem,i){return i===0},last:function(elem,i,match,array){return i===array.length-1},even:function(elem,i){return i%2===0},odd:function(elem,i){return i%2===1},lt:function(elem,i,match){return imatch[3]-0},nth:function(elem,i,match){return match[3]-0===i},eq:function(elem,i,match){return match[3]-0===i}},filter:{PSEUDO:function(elem,match,i,array){var name=match[1],filter=Expr.filters[name];if(filter){return filter(elem,i,match,array)}else if(name==="contains"){return(elem.textContent||elem.innerText||getText([elem])||"").indexOf(match[3])>=0}else if(name==="not"){var not=match[3];for(var i=0,l=not.length;i=0)}},ID:function(elem,match){return elem.nodeType===1&&elem.getAttribute("id")===match},TAG:function(elem,match){return(match==="*"&&elem.nodeType===1)||elem.nodeName.toLowerCase()===match},CLASS:function(elem,match){return(" "+(elem.className||elem.getAttribute("class"))+" ").indexOf(match)>-1},ATTR:function(elem,match){var name=match[1],result=Expr.attrHandle[name]?Expr.attrHandle[name](elem):elem[name]!=null?elem[name]:elem.getAttribute(name),value=result+"",type=match[2],check=match[4];return result==null?type==="!=":type==="="?value===check:type==="*="?value.indexOf(check)>=0:type==="~="?(" "+value+" ").indexOf(check)>=0:!check?value&&result!==false:type==="!="?value!==check:type==="^="?value.indexOf(check)===0:type==="$="?value.substr(value.length-check.length)===check:type==="|="?value===check||value.substr(0,check.length+1)===check+"-":false},POS:function(elem,match,i,array){var name=match[2],filter=Expr.setFilters[name];if(filter)return filter(elem,i,match,array)}}},origPOS=Expr.match.POS;for(var type in Expr.match){Expr.match[type]=new RegExp(Expr.match[type].source+/(?![^\[]*\])(?![^\(]*\))/.source);Expr.leftMatch[type]=new RegExp(/(^(?:.|\r|\n)*?)/.source+Expr.match[type].source)};var makeArray=function(array,results){array=Array.prototype.slice.call(array,0);if(results){results.push.apply(results,array);return results};return array};try{Array.prototype.slice.call(document.documentElement.childNodes,0)}catch(e){makeArray=function(array,results){var ret=results||[];if(toString.call(array)==="[object Array]"){Array.prototype.push.apply(ret,array)}else if(typeof array.length==="number"){for(var i=0,l=array.length;i";var root=document.documentElement;root.insertBefore(form,root.firstChild);if(document.getElementById(id)){Expr.find.ID=function(match,context,isXML){if(typeof context.getElementById!=="undefined"&&!isXML){var m=context.getElementById(match[1]);return m?m.id===match[1]||typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id").nodeValue===match[1]?[m]:undefined:[]}};Expr.filter.ID=function(elem,match){var node=typeof elem.getAttributeNode!=="undefined"&&elem.getAttributeNode("id");return elem.nodeType===1&&node&&node.nodeValue===match}};root.removeChild(form);root=form=null})();(function(){var div=document.createElement("div");div.appendChild(document.createComment(""));if(div.getElementsByTagName("*").length>0)Expr.find.TAG=function(match,context){var results=context.getElementsByTagName(match[1]);if(match[1]==="*"){var tmp=[];for(var i=0;results[i];i++)if(results[i].nodeType===1)tmp.push(results[i]);results=tmp};return results};div.innerHTML="";if(div.firstChild&&typeof div.firstChild.getAttribute!=="undefined"&&div.firstChild.getAttribute("href")!=="#")Expr.attrHandle.href=function(elem){return elem.getAttribute("href",2)};div=null})();if(document.querySelectorAll)(function(){var oldSizzle=Sizzle,div=document.createElement("div");div.innerHTML="

";if(div.querySelectorAll&&div.querySelectorAll(".TEST").length===0)return;Sizzle=function(query,context,extra,seed){context=context||document;if(!seed&&context.nodeType===9&&!isXML(context))try{return makeArray(context.querySelectorAll(query),extra)}catch(e){};return oldSizzle(query,context,extra,seed)};for(var prop in oldSizzle)Sizzle[prop]=oldSizzle[prop];div=null})();(function(){var div=document.createElement("div");div.innerHTML="
";if(!div.getElementsByClassName||div.getElementsByClassName("e").length===0)return;div.lastChild.className="e";if(div.getElementsByClassName("e").length===1)return;Expr.order.splice(1,0,"CLASS");Expr.find.CLASS=function(match,context,isXML){if(typeof context.getElementsByClassName!=="undefined"&&!isXML)return context.getElementsByClassName(match[1])};div=null})() function dirNodeCheck(dir,cur,doneName,checkSet,nodeCheck,isXML){for(var i=0,l=checkSet.length;i0){match=elem;break}};elem=elem[dir]};checkSet[i]=match}}};var contains=document.compareDocumentPosition?function(a,b){return a.compareDocumentPosition(b)&16}:function(a,b){return a!==b&&(a.contains?a.contains(b):true)},isXML=function(elem){var documentElement=(elem?elem.ownerDocument||elem:0).documentElement;return documentElement?documentElement.nodeName!=="HTML":false},posProcess=function(selector,context){var tmpSet=[],later="",match,root=context.nodeType?[context]:context;while((match=Expr.match.PSEUDO.exec(selector))){later+=match[0];selector=selector.replace(Expr.match.PSEUDO,"")};selector=Expr.relative[selector]?selector+"*":selector;for(var i=0,l=root.length;i<\/script>");script=getElementById("__ie_ondomload");if(script)addListener(script,"onreadystatechange",checkReadyState)}catch(e){};if(ua.webkit&&typeof doc.readyState!=UNDEF)timer=setInterval(function(){if(/loaded|complete/.test(doc.readyState))callDomLoadFunctions()},10);if(typeof doc.addEventListener!=UNDEF)doc.addEventListener("DOMContentLoaded",callDomLoadFunctions,null);addLoadEvent(callDomLoadFunctions)}() function checkReadyState(){if(script.readyState=="complete"){script.parentNode.removeChild(script);callDomLoadFunctions()}} function callDomLoadFunctions(){if(isDomLoaded)return;if(ua.ie&&ua.win){var s=createElement("span");try{var t=doc.getElementsByTagName("body")[0].appendChild(s);t.parentNode.removeChild(t)}catch(e){return}};isDomLoaded=true;if(timer){clearInterval(timer);timer=null};var dl=domLoadFnArr.length;for(var i=0;i0){var obj=getElementById(id);if(obj){regObjArr[i].width=obj.getAttribute("width")?obj.getAttribute("width"):"0";regObjArr[i].height=obj.getAttribute("height")?obj.getAttribute("height"):"0";if(hasPlayerVersion(regObjArr[i].swfVersion)){if(ua.webkit&&ua.webkit<312)fixParams(obj);setVisibility(id,true)}else if(regObjArr[i].expressInstall&&!isExpressInstallActive&&hasPlayerVersion("6.0.65")&&(ua.win||ua.mac)){showExpressInstall(regObjArr[i])}else displayAltContent(obj)}}else setVisibility(id,true)}} function fixParams(obj){var nestedObj=obj.getElementsByTagName(OBJECT)[0];if(nestedObj){var e=createElement("embed"),a=nestedObj.attributes;if(a){var al=a.length;for(var i=0;i';el.outerHTML='"+par+"";objIdArr[objIdArr.length]=attObj.id;r=getElementById(attObj.id)}else if(ua.webkit&&ua.webkit<312){var e=createElement("embed");e.setAttribute("type",FLASH_MIME_TYPE);for(var k in attObj)if(attObj[k]!=Object.prototype[k])if(k.toLowerCase()=="data"){e.setAttribute("src",attObj[k])}else if(k.toLowerCase()=="styleclass"){e.setAttribute("class",attObj[k])}else if(k.toLowerCase()!="classid")e.setAttribute(k,attObj[k]);for(var l in parObj)if(parObj[l]!=Object.prototype[l])if(l.toLowerCase()!="movie")e.setAttribute(l,parObj[l]);el.parentNode.replaceChild(e,el);r=e}else{var o=createElement(OBJECT);o.setAttribute("type",FLASH_MIME_TYPE);for(var m in attObj)if(attObj[m]!=Object.prototype[m])if(m.toLowerCase()=="styleclass"){o.setAttribute("class",attObj[m])}else if(m.toLowerCase()!="classid")o.setAttribute(m,attObj[m]);for(var n in parObj)if(parObj[n]!=Object.prototype[n]&&n.toLowerCase()!="movie")createObjParam(o,n,parObj[n]);el.parentNode.replaceChild(o,el);r=o}};return r} function createObjParam(el,pName,pValue){var p=createElement("param");p.setAttribute("name",pName);p.setAttribute("value",pValue);el.appendChild(p)} function removeSWF(id){var obj=getElementById(id);if(obj&&(obj.nodeName=="OBJECT"||obj.nodeName=="EMBED"))if(ua.ie&&ua.win){if(obj.readyState==4){removeObjectInIE(id)}else win.attachEvent("onload",function(){removeObjectInIE(id)})}else obj.parentNode.removeChild(obj)} function removeObjectInIE(id){var obj=getElementById(id);if(obj){for(var i in obj)if(typeof obj[i]=="function")obj[i]=null;obj.parentNode.removeChild(obj)}} function getElementById(id){var el=null;try{el=doc.getElementById(id)}catch(e){};return el} function createElement(el){return doc.createElement(el)} function addListener(target,eventType,fn){target.attachEvent(eventType,fn);listenersArr[listenersArr.length]=[target,eventType,fn]} function hasPlayerVersion(rv){var pv=ua.pv,v=rv.split(".");v[0]=parseInt(v[0],10);v[1]=parseInt(v[1],10)||0;v[2]=parseInt(v[2],10)||0;return(pv[0]>v[0]||(pv[0]==v[0]&&pv[1]>v[1])||(pv[0]==v[0]&&pv[1]==v[1]&&pv[2]>=v[2]))?true:false} function createCSS(sel,decl){if(ua.ie&&ua.mac)return;var h=doc.getElementsByTagName("head")[0],s=createElement("style");s.setAttribute("type","text/css");s.setAttribute("media","screen");if(!(ua.ie&&ua.win)&&typeof doc.createTextNode!=UNDEF)s.appendChild(doc.createTextNode(sel+" {"+decl+"}"));h.appendChild(s);if(ua.ie&&ua.win&&typeof doc.styleSheets!=UNDEF&&doc.styleSheets.length>0){var ls=doc.styleSheets[doc.styleSheets.length-1];if(typeof ls.addRule==OBJECT)ls.addRule(sel,decl)}} function setVisibility(id,isVisible){var v=isVisible?"visible":"hidden";if(isDomLoaded&&getElementById(id)){getElementById(id).style.visibility=v}else createCSS("#"+id,"visibility:"+v)} function urlEncodeIfNecessary(s){var regex=/[\\\"<>\.;]/,hasBadChars=regex.exec(s)!=null;return hasBadChars?encodeURIComponent(s):s};var cleanup=function(){if(ua.ie&&ua.win)window.attachEvent("onunload",function(){var ll=listenersArr.length;for(var i=0;i{1} browser plugin to view this content.',shared:'You must install both the {1} and {3} browser plugins to view this content.',either:'You must install either the {1} or the {3} browser plugin to view this content.'}};var pre,proxyId="sb-drag-proxy",dragData,dragProxy,dragTarget function resetDrag(){dragData={x:0,y:0,startX:null,startY:null}} function updateProxy(){var dims=S.dimensions;apply(dragProxy.style,{height:dims.innerHeight+"px",width:dims.innerWidth+"px"})} function enableDrag(){resetDrag();var style=["position:absolute","cursor:"+(S.isGecko?"-moz-grab":"move"),"background-color:"+(S.isIE?"#fff;filter:alpha(opacity=0)":"transparent")].join(";");S.appendHTML(S.skin.body,'
');dragProxy=get(proxyId);updateProxy();addEvent(dragProxy,"mousedown",startDrag)} function disableDrag(){if(dragProxy){removeEvent(dragProxy,"mousedown",startDrag);remove(dragProxy);dragProxy=null};dragTarget=null} function startDrag(e){preventDefault(e);var xy=getPageXY(e);dragData.startX=xy[0];dragData.startY=xy[1];dragTarget=get(S.player.id);addEvent(document,"mousemove",positionDrag);addEvent(document,"mouseup",endDrag);if(S.isGecko)dragProxy.style.cursor="-moz-grabbing"} function positionDrag(e){var player=S.player,dims=S.dimensions,xy=getPageXY(e),moveX=xy[0]-dragData.startX;dragData.startX+=moveX;dragData.x=Math.max(Math.min(0,dragData.x+moveX),dims.innerWidth-player.width);var moveY=xy[1]-dragData.startY;dragData.startY+=moveY;dragData.y=Math.max(Math.min(0,dragData.y+moveY),dims.innerHeight-player.height);apply(dragTarget.style,{left:dragData.x+"px",top:dragData.y+"px"})} function endDrag(){removeEvent(document,"mousemove",positionDrag);removeEvent(document,"mouseup",endDrag);if(S.isGecko)dragProxy.style.cursor="-moz-grab"};S.img=function(obj,id){this.obj=obj;this.id=id;this.ready=false;var self=this;pre=new Image();pre.onload=function(){self.height=obj.height?parseInt(obj.height,10):pre.height;self.width=obj.width?parseInt(obj.width,10):pre.width;self.ready=true;pre.onload=null;pre=null};pre.src=obj.content};S.img.ext=["bmp","gif","jpg","jpeg","png"];S.img.prototype={append:function(body,dims){var img=document.createElement("img");img.id=this.id;img.src=this.obj.content;img.style.position="absolute";var height,width;if(dims.oversized&&S.options.handleOversize=="resize"){height=dims.innerHeight;width=dims.innerWidth}else{height=this.height;width=this.width};img.setAttribute("height",height);img.setAttribute("width",width);body.appendChild(img)},remove:function(){var el=get(this.id);if(el)remove(el);disableDrag();if(pre){pre.onload=null;pre=null}},onLoad:function(){var dims=S.dimensions;if(dims.oversized&&S.options.handleOversize=="drag")enableDrag()},onWindowResize:function(){var dims=S.dimensions;switch(S.options.handleOversize){case"resize":var el=get(this.id);el.height=dims.innerHeight;el.width=dims.innerWidth;break;case"drag":if(dragTarget){var top=parseInt(S.getStyle(dragTarget,"top")),left=parseInt(S.getStyle(dragTarget,"left"));if(top+this.height';html+="";body.innerHTML=html},remove:function(){try{document[this.id].Stop()}catch(e){};var el=get(this.id);if(el)remove(el)}};var wmpControllerHeight=(S.isIE?70:45);S.wmp=function(obj,id){this.obj=obj;this.id=id;this.height=obj.height?parseInt(obj.height,10):300;if(S.options.showMovieControls)this.height+=wmpControllerHeight;this.width=obj.width?parseInt(obj.width,10):300};S.wmp.ext=["asf","avi","mpg","mpeg","wm","wmv"];S.wmp.prototype={append:function(body,dims){var opt=S.options,autoplay=opt.autoplayMovies?1:0,movie='";for(var p in params)movie+='';movie+="";body.innerHTML=movie},remove:function(){if(S.isIE)try{window[this.id].controls.stop();window[this.id].URL="movie"+now()+".wmv";window[this.id]=function(){}}catch(e){};var el=get(this.id);if(el)setTimeout(function(){remove(el)},10)}};var overlayOn=false,visibilityCache=[],pngIds=["sb-nav-close","sb-nav-next","sb-nav-play","sb-nav-pause","sb-nav-previous"],container,overlay,wrapper,doWindowResize=true function animate(el,property,to,duration,callback){var isOpacity=(property=="opacity"),anim=isOpacity?S.setOpacity:function(el,value){el.style[property]=""+value+"px"};if(duration==0||(!isOpacity&&!S.options.animate)||(isOpacity&&!S.options.animateFade)){anim(el,to);if(callback)callback();return};var from=parseFloat(S.getStyle(el,property))||0,delta=to-from;if(delta==0){if(callback)callback();return};duration*=1e3;var begin=now(),ease=S.ease,end=begin+duration,time,interval=setInterval(function(){time=now();if(time>=end){clearInterval(interval);interval=null;anim(el,to);if(callback)callback()}else anim(el,from+ease((time-begin)/duration)*delta)},10)} function setSize(){container.style.height=S.getWindowSize("Height")+"px";container.style.width=S.getWindowSize("Width")+"px"} function setPosition(){container.style.top=document.documentElement.scrollTop+"px";container.style.left=document.documentElement.scrollLeft+"px"} function toggleTroubleElements(on){if(on){each(visibilityCache,function(i,el){el[0].style.visibility=el[1]||""})}else{visibilityCache=[];each(S.options.troubleElements,function(i,tag){each(document.getElementsByTagName(tag),function(j,el){visibilityCache.push([el,el.style.visibility]);el.style.visibility="hidden"})})}} function toggleNav(id,on){var el=get("sb-nav-"+id);if(el)el.style.display=on?"":"none"} function toggleLoading(on,callback){var loading=get("sb-loading"),playerName=S.getCurrent().player,anim=(playerName=="img"||playerName=="html");if(on){S.setOpacity(loading,0);loading.style.display="block";var wrapped=function(){S.clearOpacity(loading);if(callback)callback()};if(anim){animate(loading,"opacity",1,S.options.fadeDuration,wrapped)}else wrapped()}else{var wrapped=function(){loading.style.display="none";S.clearOpacity(loading);if(callback)callback()};if(anim){animate(loading,"opacity",0,S.options.fadeDuration,wrapped)}else wrapped()}} function buildBars(callback){var obj=S.getCurrent();get("sb-title-inner").innerHTML=obj.title||"";var close,next,play,pause,previous;if(S.options.displayNav){close=true;var len=S.gallery.length;if(len>1)if(S.options.continuous){next=previous=true}else{next=(len-1)>S.current;previous=S.current>0};if(S.options.slideshowDelay>0&&S.hasNext()){pause=!S.isPaused();play=!pause}}else close=next=play=pause=previous=false;toggleNav("close",close);toggleNav("next",next);toggleNav("play",play);toggleNav("pause",pause);toggleNav("previous",previous);var counter="";if(S.options.displayCounter&&S.gallery.length>1){var len=S.gallery.length;if(S.options.counterType=="skip"){var i=0,end=len,limit=parseInt(S.options.counterLimit)||0;if(limit2){var h=Math.floor(limit/2);i=S.current-h;if(i<0)i+=len;end=S.current+(limit-h);if(end>len)end-=len};while(i!=end){if(i==len)i=0;counter+='"}}else counter=[S.current+1,S.lang.of,len].join(" ")};get("sb-counter").innerHTML=counter;callback()} function showBars(callback){var titleInner=get("sb-title-inner"),infoInner=get("sb-info-inner"),duration=0.35;titleInner.style.visibility=infoInner.style.visibility="";if(titleInner.innerHTML!="")animate(titleInner,"marginTop",0,duration);animate(infoInner,"marginTop",0,duration,callback)} function hideBars(anim,callback){var title=get("sb-title"),info=get("sb-info"),titleHeight=title.offsetHeight,infoHeight=info.offsetHeight,titleInner=get("sb-title-inner"),infoInner=get("sb-info-inner"),duration=(anim?0.35:0);animate(titleInner,"marginTop",titleHeight,duration);animate(infoInner,"marginTop",infoHeight*-1,duration,function(){titleInner.style.visibility=infoInner.style.visibility="hidden";callback()})} function adjustHeight(height,top,anim,callback){var wrapperInner=get("sb-wrapper-inner"),duration=(anim?S.options.resizeDuration:0);animate(wrapper,"top",top,duration);animate(wrapperInner,"height",height,duration,callback)} function adjustWidth(width,left,anim,callback){var duration=(anim?S.options.resizeDuration:0);animate(wrapper,"left",left,duration);animate(wrapper,"width",width,duration,callback)} function setDimensions(height,width){var bodyInner=get("sb-body-inner"),height=parseInt(height),width=parseInt(width),topBottom=wrapper.offsetHeight-bodyInner.offsetHeight,leftRight=wrapper.offsetWidth-bodyInner.offsetWidth,maxHeight=overlay.offsetHeight,maxWidth=overlay.offsetWidth,padding=parseInt(S.options.viewportPadding)||20,preserveAspect=(S.player&&S.options.handleOversize!="drag");return S.setDimensions(height,width,maxHeight,maxWidth,topBottom,leftRight,padding,preserveAspect)};var K={};K.markup='';K.options={animSequence:"sync",counterLimit:10,counterType:"default",displayCounter:true,displayNav:true,fadeDuration:0.35,initialHeight:160,initialWidth:320,modal:false,overlayColor:"#000",overlayOpacity:0.5,resizeDuration:0.35,showOverlay:true,troubleElements:["select","object","embed","canvas"]};K.init=function(){S.appendHTML(document.body,sprintf(K.markup,S.lang));K.body=get("sb-body-inner");container=get("sb-container");overlay=get("sb-overlay");wrapper=get("sb-wrapper");if(!supportsFixed)container.style.position="absolute";if(!supportsOpacity){var el,m,re=/url\("(.*\.png)"\)/;each(pngIds,function(i,id){el=get(id);if(el){m=S.getStyle(el,"backgroundImage").match(re);if(m){el.style.backgroundImage="none";el.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true,src="+m[1]+",sizingMethod=scale);"}}})};var timer;addEvent(window,"resize",function(){if(timer){clearTimeout(timer);timer=null};if(open)timer=setTimeout(K.onWindowResize,10)})};K.onOpen=function(obj,callback){doWindowResize=false;container.style.display="block";setSize();var dims=setDimensions(S.options.initialHeight,S.options.initialWidth);adjustHeight(dims.innerHeight,dims.top);adjustWidth(dims.width,dims.left);if(S.options.showOverlay){overlay.style.backgroundColor=S.options.overlayColor;S.setOpacity(overlay,0);if(!S.options.modal)addEvent(overlay,"click",S.close);overlayOn=true};if(!supportsFixed){setPosition();addEvent(window,"scroll",setPosition)};toggleTroubleElements();container.style.visibility="visible";if(overlayOn){animate(overlay,"opacity",S.options.overlayOpacity,S.options.fadeDuration,callback)}else callback()};K.onLoad=function(changing,callback){toggleLoading(true);while(K.body.firstChild)remove(K.body.firstChild);hideBars(changing,function(){if(!open)return;if(!changing)wrapper.style.visibility="visible";buildBars(callback)})};K.onReady=function(callback){if(!open)return;var player=S.player,dims=setDimensions(player.height,player.width),wrapped=function(){showBars(callback)};switch(S.options.animSequence){case"hw":adjustHeight(dims.innerHeight,dims.top,true,function(){adjustWidth(dims.width,dims.left,true,wrapped)});break;case"wh":adjustWidth(dims.width,dims.left,true,function(){adjustHeight(dims.innerHeight,dims.top,true,wrapped)});break;default:adjustWidth(dims.width,dims.left,true);adjustHeight(dims.innerHeight,dims.top,true,wrapped)}};K.onShow=function(callback){toggleLoading(false,callback);doWindowResize=true};K.onClose=function(){if(!supportsFixed)removeEvent(window,"scroll",setPosition);removeEvent(overlay,"click",S.close);wrapper.style.visibility="hidden";var callback=function(){container.style.visibility="hidden";container.style.display="none";toggleTroubleElements(true)};if(overlayOn){animate(overlay,"opacity",0,S.options.fadeDuration,callback)}else callback()};K.onPlay=function(){toggleNav("play",false);toggleNav("pause",true)};K.onPause=function(){toggleNav("pause",false);toggleNav("play",true)};K.onWindowResize=function(){if(!doWindowResize)return;setSize();var player=S.player,dims=setDimensions(player.height,player.width);adjustWidth(dims.width,dims.left);adjustHeight(dims.innerHeight,dims.top);if(player.onWindowResize)player.onWindowResize()};S.skin=K;window.Shadowbox=S})(window); function openShadowboxHW(p,t,h,w){h=h||2e3;w=w||3e3;Shadowbox.open({player:'iframe',title:t,content:p,height:h,width:w})}; /* * Jssor.Core 16.0 * http://www.jssor.com/ * * TERMS OF USE - Jssor.Core * * Copyright 2014 Jssor * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*! Jssor */ $Jssor$ = window.$Jssor$ = window.$Jssor$ || {}; //$JssorDebug$ var $JssorDebug$ = new function () { this.$DebugMode = true; // Methods 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) { // since we're debugging, fail fast by crashing 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; }; }; //$JssorEventManager$ var $JssorEventManager$ = function () { var self = this; // Fields var listeners = {}; // dictionary of eventName --> array of handlers // Methods 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) { // handler threw an error, ignore, go on to next one $JssorDebug$.$Error(e.name + " while executing " + eventName + " handler: " + e.message, e); } } }; };; /// /* * Jssor.Utils 16.0 * http://www.jssor.com/ * * TERMS OF USE - Jssor.Utils * * Copyright 2014 Jssor * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ //$JssorPoint$ var $JssorPoint$; (function () { $JssorPoint$ = function (x, y) { // Properties this.x = typeof (x) == "number" ? x : 0; this.y = typeof (y) == "number" ? y : 0; }; // Methods var SDPointPrototype = $JssorPoint$.prototype; SDPointPrototype.$Plus = function (point) { return new $JssorPoint$(this.x + point.x, this.y + point.y); }; SDPointPrototype.$Minus = function (point) { return new $JssorPoint$(this.x - point.x, this.y - point.y); }; SDPointPrototype.$Times = function (factor) { return new $JssorPoint$(this.x * factor, this.y * factor); }; SDPointPrototype.$Divide = function (factor) { return new $JssorPoint$(this.x / factor, this.y / factor); }; SDPointPrototype.$Negate = function () { return new $JssorPoint$(-this.x, -this.y); }; SDPointPrototype.$DistanceTo = function (point) { return Math.sqrt(Math.pow(this.x - point.x, 2) + Math.pow(this.y - point.y, 2)); }; SDPointPrototype.$Apply = function (func) { return new $JssorPoint$(func(this.x), func(this.y)); }; SDPointPrototype.$Equals = function (point) { return (point instanceof $JssorPoint$) && (this.x === point.x) && (this.y === point.y); }; SDPointPrototype.$ToString = function () { return "(" + this.x + "," + this.y + ")"; }; })(); //$JssorEasing$ var $JssorEasing$ = window.$JssorEasing$ = { $EaseLinear: function (t) { return t; }, $EaseGoBack: function (t) { return 1 - Math.abs((t *= 2) - 1); }, $EaseSwing: function (t) { return -Math.cos(t * Math.PI) / 2 + .5; }, $EaseInQuad: function (t) { return t * t; }, $EaseOutQuad: function (t) { return -t * (t - 2); }, $EaseInOutQuad: function (t) { return (t *= 2) < 1 ? 1 / 2 * t * t : -1 / 2 * (--t * (t - 2) - 1); }, $EaseInCubic: function (t) { return t * t * t; }, $EaseOutCubic: function (t) { return (t -= 1) * t * t + 1; }, $EaseInOutCubic: function (t) { return (t *= 2) < 1 ? 1 / 2 * t * t * t : 1 / 2 * ((t -= 2) * t * t + 2); }, $EaseInQuart: function (t) { return t * t * t * t; }, $EaseOutQuart: function (t) { return -((t -= 1) * t * t * t - 1); }, $EaseInOutQuart: function (t) { return (t *= 2) < 1 ? 1 / 2 * t * t * t * t : -1 / 2 * ((t -= 2) * t * t * t - 2); }, $EaseInQuint: function (t) { return t * t * t * t * t; }, $EaseOutQuint: function (t) { return (t -= 1) * t * t * t * t + 1; }, $EaseInOutQuint: function (t) { return (t *= 2) < 1 ? 1 / 2 * t * t * t * t * t : 1 / 2 * ((t -= 2) * t * t * t * t + 2); }, $EaseInSine: function (t) { return 1 - Math.cos(t * Math.PI / 2) }, $EaseOutSine: function (t) { return Math.sin(t * Math.PI / 2); }, $EaseInOutSine: function (t) { return -1 / 2 * (Math.cos(Math.PI * t) - 1); }, $EaseInExpo: function (t) { return t == 0 ? 0 : Math.pow(2, 10 * (t - 1)); }, $EaseOutExpo: function (t) { return t == 1 ? 1 : -Math.pow(2, -10 * t) + 1; }, $EaseInOutExpo: function (t) { return t == 0 || t == 1 ? t : (t *= 2) < 1 ? 1 / 2 * Math.pow(2, 10 * (t - 1)) : 1 / 2 * (-Math.pow(2, -10 * --t) + 2); }, $EaseInCirc: function (t) { return -(Math.sqrt(1 - t * t) - 1); }, $EaseOutCirc: function (t) { return Math.sqrt(1 - (t -= 1) * t); }, $EaseInOutCirc: function (t) { return (t *= 2) < 1 ? -1 / 2 * (Math.sqrt(1 - t * t) - 1) : 1 / 2 * (Math.sqrt(1 - (t -= 2) * t) + 1); }, $EaseInElastic: function (t) { if (!t || t == 1) return t; var p = .3, s = .075; return -(Math.pow(2, 10 * (t -= 1)) * Math.sin((t - s) * 2 * Math.PI / p)); }, $EaseOutElastic: function (t) { if (!t || t == 1) return t; var p = .3, s = .075; return Math.pow(2, -10 * t) * Math.sin((t - s) * 2 * Math.PI / p) + 1; }, $EaseInOutElastic: function (t) { if (!t || t == 1) return t; var p = .45, s = .1125; return (t *= 2) < 1 ? -.5 * Math.pow(2, 10 * (t -= 1)) * Math.sin((t - s) * 2 * Math.PI / p) : Math.pow(2, -10 * (t -= 1)) * Math.sin((t - s) * 2 * Math.PI / p) * .5 + 1; }, $EaseInBack: function (t) { var s = 1.70158; return t * t * ((s + 1) * t - s); }, $EaseOutBack: function (t) { var s = 1.70158; return (t -= 1) * t * ((s + 1) * t + s) + 1; }, $EaseInOutBack: function (t) { var s = 1.70158; return (t *= 2) < 1 ? 1 / 2 * t * t * (((s *= 1.525) + 1) * t - s) : 1 / 2 * ((t -= 2) * t * (((s *= 1.525) + 1) * t + s) + 2); }, $EaseInBounce: function (t) { return 1 - $JssorEasing$.$EaseOutBounce(1 - t) }, $EaseOutBounce: 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; }, $EaseInOutBounce: function (t) { return t < 1 / 2 ? $JssorEasing$.$EaseInBounce(t * 2) * .5 : $JssorEasing$.$EaseOutBounce(t * 2 - 1) * .5 + .5; }, $EaseInWave: function (t) { return 1 - Math.cos(t * Math.PI * 2) }, $EaseOutWave: function (t) { return Math.sin(t * Math.PI * 2); }, $EaseOutJump: function (t) { return 1 - (((t *= 2) < 1) ? (t = 1 - t) * t * t : (t -= 1) * t * t); }, $EaseInJump: function (t) { return ((t *= 2) < 1) ? t * t * t : (t = 2 - t) * t * t; } }; var $JssorDirection$ = window.$JssorDirection$ = { $TO_LEFT: 0x0001, $TO_RIGHT: 0x0002, $TO_TOP: 0x0004, $TO_BOTTOM: 0x0008, $HORIZONTAL: 0x0003, $VERTICAL: 0x000C, $LEFTRIGHT: 0x0003, $TOPBOTOM: 0x000C, $TOPLEFT: 0x0005, $TOPRIGHT: 0x0006, $BOTTOMLEFT: 0x0009, $BOTTOMRIGHT: 0x000A, $AROUND: 0x000F, $GetDirectionHorizontal: function (direction) { return direction & 0x0003; }, $GetDirectionVertical: function (direction) { return direction & 0x000C; }, $ChessHorizontal: function (direction) { return (~direction & 0x0003) + (direction & 0x000C); }, $ChessVertical: function (direction) { return (~direction & 0x000C) + (direction & 0x0003); }, $IsToLeft: function (direction) { return (direction & 0x0003) == 0x0001; }, $IsToRight: function (direction) { return (direction & 0x0003) == 0x0002; }, $IsToTop: function (direction) { return (direction & 0x000C) == 0x0004; }, $IsToBottom: function (direction) { return (direction & 0x000C) == 0x0008; }, $IsHorizontal: function (direction) { return (direction & 0x0003) > 0; }, $IsVertical: function (direction) { return (direction & 0x000C) > 0; } }; var $JssorKeyCode$ = { $BACKSPACE: 8, $COMMA: 188, $DELETE: 46, $DOWN: 40, $END: 35, $ENTER: 13, $ESCAPE: 27, $HOME: 36, $LEFT: 37, $NUMPAD_ADD: 107, $NUMPAD_DECIMAL: 110, $NUMPAD_DIVIDE: 111, $NUMPAD_ENTER: 108, $NUMPAD_MULTIPLY: 106, $NUMPAD_SUBTRACT: 109, $PAGE_DOWN: 34, $PAGE_UP: 33, $PERIOD: 190, $RIGHT: 39, $SPACE: 32, $TAB: 9, $UP: 38 }; var $JssorAlignment$ = { $TopLeft: 0x11, $TopCenter: 0x12, $TopRight: 0x14, $MiddleLeft: 0x21, $MiddleCenter: 0x22, $MiddleRight: 0x24, $BottomLeft: 0x41, $BottomCenter: 0x42, $BottomRight: 0x44, $IsTop: function (aligment) { return aligment & 0x10 > 0; }, $IsMiddle: function (alignment) { return alignment & 0x20 > 0; }, $IsBottom: function (alignment) { return alignment & 0x40 > 0; }, $IsLeft: function (alignment) { return alignment & 0x01 > 0; }, $IsCenter: function (alignment) { return alignment & 0x02 > 0; }, $IsRight: function (alignment) { return alignment & 0x04 > 0; } }; var $JssorMatrix$; var $JssorBrowser$ = { $UNKNOWN: 0, $IE: 1, $FIREFOX: 2, $SAFARI: 3, $CHROME: 4, $OPERA: 5 }; var $ROWSER_UNKNOWN$ = 0; var $ROWSER_IE$ = 1; var $ROWSER_FIREFOX$ = 2; var $ROWSER_SAFARI$ = 3; var $ROWSER_CHROME$ = 4; var $ROWSER_OPERA$ = 5; var $JssorAnimator$; // $JssorUtils$ is a static class, so make it singleton instance var $JssorUtils$ = window.$JssorUtils$ = new function () { // Fields var self = this; var arrActiveX = ["Msxml2.XMLHTTP", "Msxml3.XMLHTTP", "Microsoft.XMLHTTP"]; var supportedImageFormats = { "bmp": false, "jpeg": true, "jpg": true, "png": true, "tif": false, "wdp": false }; var browser = $JssorBrowser$.$UNKNOWN; var browserRuntimeVersion = 0; var browserEngineVersion = 0; var browserJavascriptVersion = 0; var webkitVersion = 0; var app = navigator.appName; var ver = navigator.appVersion; var ua = navigator.userAgent; var urlParams = {}; function DetectBrowser() { if (!browser) { if (app == "Microsoft Internet Explorer" && !!window.attachEvent && !!window.ActiveXObject) { var ieOffset = ua.indexOf("MSIE"); browser = $JssorBrowser$.$IE; browserEngineVersion = parseFloat(ua.substring(ieOffset + 5, ua.indexOf(";", ieOffset))); //check IE javascript version /*@cc_on browserJavascriptVersion = @_jscript_version; @*/ // update: for intranet sites and compat view list sites, IE sends // an IE7 User-Agent to the server to be interoperable, and even if // the page requests a later IE version, IE will still report the // IE7 UA to JS. we should be robust to self. //var docMode = document.documentMode; //if (typeof docMode !== "undefined") { // browserRuntimeVersion = docMode; //} browserRuntimeVersion = document.documentMode || browserEngineVersion; } else if (app == "Netscape" && !!window.addEventListener) { var ffOffset = ua.indexOf("Firefox"); var saOffset = ua.indexOf("Safari"); var chOffset = ua.indexOf("Chrome"); var webkitOffset = ua.indexOf("AppleWebKit"); if (ffOffset >= 0) { browser = $JssorBrowser$.$FIREFOX; browserRuntimeVersion = parseFloat(ua.substring(ffOffset + 8)); } else if (saOffset >= 0) { var slash = ua.substring(0, saOffset).lastIndexOf("/"); browser = (chOffset >= 0) ? $JssorBrowser$.$CHROME : $JssorBrowser$.$SAFARI; browserRuntimeVersion = parseFloat(ua.substring(slash + 1, saOffset)); } if (webkitOffset >= 0) webkitVersion = parseFloat(ua.substring(webkitOffset + 12)); } else { var match = /(opera)(?:.*version|)[ \/]([\w.]+)/i.exec(ua); if (match) { browser = $JssorBrowser$.$OPERA; browserRuntimeVersion = parseFloat(match[2]); } } } } function IsBrowserIE() { DetectBrowser(); return browser == $ROWSER_IE$; } function IsBrowserIeQuirks() { return IsBrowserIE() && (browserRuntimeVersion < 6 || document.compatMode == "BackCompat"); //Composite to "CSS1Compat" } function IsBrowserFireFox() { DetectBrowser(); return browser == $ROWSER_FIREFOX$; } function IsBrowserSafari() { DetectBrowser(); return browser == $ROWSER_SAFARI$; } function IsBrowserChrome() { DetectBrowser(); return browser == $ROWSER_CHROME$; } function IsBrowserOpera() { DetectBrowser(); return browser == $ROWSER_OPERA$; } function IsBrowserBadTransform() { return IsBrowserSafari() && (webkitVersion > 534) && (webkitVersion < 535); } function IsBrowserSafeHWA() { return IsBrowserSafari() && (webkitVersion < 535); } function IsBrowserIe9Earlier() { //IE 8- and chrome 1 won't fade well return IsBrowserIE() && browserRuntimeVersion < 9; // || (IsBrowserChrome() && browserRuntimeVersion < 2); } var _TransformProperty; function GetTransformProperty(elmt) { if (!_TransformProperty) { // Note that in some versions of IE9 it is critical that // msTransform appear in this list before MozTransform each(['transform', 'WebkitTransform', 'msTransform', 'MozTransform', 'OTransform'], function (property) { if (!self.$IsUndefined(elmt.style[property])) { _TransformProperty = property; return true; } }); _TransformProperty = _TransformProperty || "transform"; } return _TransformProperty; } // Constructor { //Ignore urlParams // // Url parameters // var query = window.location.search.substring(1); // ignore '?' // var parts = query.split('&'); // for (var i = 0; i < parts.length; i++) { // var part = parts[i]; // var sep = part.indexOf('='); // if (sep > 0) { // urlParams[part.substring(0, sep)] = // decodeURIComponent(part.substring(sep + 1)); // } // } // Browser behaviors } // Helpers function getOffsetParent(elmt, isFixed) { // IE and Opera "fixed" position elements don't have offset parents. // regardless, if it's fixed, its offset parent is the body. if (isFixed && elmt != document.body) { return document.body; } else { return elmt.offsetParent; } } function toString(obj) { return Object.prototype.toString.call(obj); } // [[Class]] -> type pairs var class2type; function each(object, callback) { if (toString(object) == "[object Array]") { for (var i = 0; i < object.length; i++) { if (callback(object[i], i, object)) { break; } } } else { for (var name in object) { if (callback(object[name], name, object)) { break; } } } } function GetClass2Type() { if (!class2type) { class2type = {}; each(["Boolean", "Number", "String", "Function", "Array", "Date", "RegExp", "Object"], function (name) { class2type["[object " + name + "]"] = name.toLowerCase(); }); } return class2type; } function type(obj) { return obj == null ? String(obj) : GetClass2Type()[toString(obj)] || "object"; } function isPlainObject(obj) { // Must be an Object. // Because of IE, we also have to check the presence of the constructor property. // Make sure that DOM nodes and window objects don't pass through, as well if (!obj || type(obj) !== "object" || obj.nodeType || self.$IsWindow(obj)) { return false; } var hasOwn = Object.prototype.hasOwnProperty; try { // Not own constructor property must be Object if (obj.constructor && !hasOwn.call(obj, "constructor") && !hasOwn.call(obj.constructor.prototype, "isPrototypeOf")) { return false; } } catch (e) { // IE8,9 Will throw exceptions on certain host objects #9897 return false; } // Own properties are enumerated firstly, so to speed up, // if last one is own, then all properties are own. var key; for (key in obj) { } return key === undefined || hasOwn.call(obj, key); } function Delay(code, delay) { setTimeout(code, delay || 0); } function RemoveByReg(str, reg) { var m = reg.exec(str); if (m) { var header = str.substr(0, m.index); var tailer = str.substr(m.lastIndex + 1, str.length - (m.lastIndex + 1)); str = header + tailer; } return str; } function BuildNewCss(oldCss, removeRegs, replaceValue) { var css = (!oldCss || oldCss == "inherit") ? "" : oldCss; each(removeRegs, function (removeReg) { var m = removeReg.exec(css); if (m) { var header = css.substr(0, m.index); var tailer = css.substr(m.lastIndex + 1, css.length - (m.lastIndex + 1)); css = header + tailer; } }); css = replaceValue + (css.indexOf(" ") != 0 ? " " : "") + css; return css; } function SetStyleFilterIE(elmt, value) { if (browserRuntimeVersion < 9) { elmt.style.filter = value; } } function SetStyleMatrixIE(elmt, matrix, offset) { //matrix is not for ie9+ running in ie8- mode if (browserJavascriptVersion < 9) { var oldFilterValue = elmt.style.filter; var matrixReg = new RegExp(/[\s]*progid:DXImageTransform\.Microsoft\.Matrix\([^\)]*\)/g); var matrixValue = matrix ? "progid:DXImageTransform.Microsoft.Matrix(" + "M11=" + matrix[0][0] + ", M12=" + matrix[0][1] + ", M21=" + matrix[1][0] + ", M22=" + matrix[1][1] + ", SizingMethod='auto expand')" : ""; var newFilterValue = BuildNewCss(oldFilterValue, [matrixReg], matrixValue); SetStyleFilterIE(elmt, newFilterValue); self.$CssMarginTop(elmt, offset.y); self.$CssMarginLeft(elmt, offset.x); } } // Methods self.$IsBrowserIE = IsBrowserIE; self.$IsBrowserIeQuirks = IsBrowserIeQuirks; self.$IsBrowserFireFox = IsBrowserFireFox; self.$IsBrowserSafari = IsBrowserSafari; self.$IsBrowserChrome = IsBrowserChrome; self.$IsBrowserOpera = IsBrowserOpera; self.$IsBrowserBadTransform = IsBrowserBadTransform; self.$IsBrowserSafeHWA = IsBrowserSafeHWA; self.$IsBrowserIe9Earlier = IsBrowserIe9Earlier; self.$GetBrowserVersion = function () { return browserRuntimeVersion; }; self.$GetBrowserEngineVersion = function () { return browserEngineVersion || browserRuntimeVersion; }; self.$GetWebKitVersion = function () { return webkitVersion; }; self.$Delay = Delay; self.$GetElement = function (elmt) { if (self.$IsString(elmt)) { elmt = document.getElementById(elmt); } return elmt; }; self.$GetElementPosition = function (elmt) { elmt = self.$GetElement(elmt); var result = new $JssorPoint$(); // technique from: // http://www.quirksmode.org/js/findpos.html // with special check for "fixed" elements. while (elmt) { result.x += elmt.offsetLeft; result.y += elmt.offsetTop; var isFixed = self.$GetElementStyle(elmt).position == "fixed"; if (isFixed) { result = result.$Plus(self.$GetPageScroll(window)); } elmt = getOffsetParent(elmt, isFixed); } return result; }; self.$GetElementSize = function (elmt) { elmt = self.$GetElement(elmt); return new $JssorPoint$(elmt.clientWidth, elmt.clientHeight); }; self.$GetEvent = function (event) { return event ? event : window.event; }; self.$GetEventSrcElement = function (event) { event = self.$GetEvent(event); return event.target || event.srcElement || document; }; self.$GetEventDstElement = function (event) { event = self.$GetEvent(event); return event.relatedTarget || event.toElement; }; self.$GetMousePosition = function (event) { event = self.$GetEvent(event); var result = new $JssorPoint$(); // technique from: // http://www.quirksmode.org/js/events_properties.html if (event.type == "DOMMouseScroll" && IsBrowserFireFox() && browserRuntimeVersion < 3) { // hack for FF2 which reports incorrect position for mouse scroll result.x = event.screenX; result.y = event.screenY; } else if (typeof (event.pageX) == "number") { result.x = event.pageX; result.y = event.pageY; } else if (typeof (event.clientX) == "number") { result.x = event.clientX + document.body.scrollLeft + document.documentElement.scrollLeft; result.y = event.clientY + document.body.scrollTop + document.documentElement.scrollTop; } else { $JssorDebug$.$Fail("Unknown event mouse position, no known technique."); } return result; }; self.$GetMouseScroll = function (event) { event = self.$GetEvent(event); var delta = 0; // default value // technique from: // http://blog.paranoidferret.com/index.php/2007/10/31/javascript-tutorial-the-scroll-wheel/ if (typeof (event.wheelDelta) == "number") { delta = event.wheelDelta; } else if (typeof (event.detail) == "number") { delta = event.detail * -1; } else { $JssorDebug$.$Fail("Unknown event mouse scroll, no known technique."); } // normalize value to [-1, 1] return delta ? delta / Math.abs(delta) : 0; }; self.$GetPageScroll = function (window) { var result = new $JssorPoint$(); var docElmt = window.document.documentElement || {}; var body = window.document.body || {}; // technique from: // http://www.howtocreate.co.uk/tutorials/javascript/browserwindow if (typeof (window.pageXOffset) == "number") { // most browsers result.x = window.pageXOffset; result.y = window.pageYOffset; } else if (body.scrollLeft || body.scrollTop) { // W3C spec, IE6+ in quirks mode result.x = body.scrollLeft; result.y = body.scrollTop; } else if (docElmt.scrollLeft || docElmt.scrollTop) { // IE6+ in standards mode result.x = docElmt.scrollLeft; result.y = docElmt.scrollTop; } // note: we specifically aren't testing for typeof here, because IE sets // the appropriate variables undefined instead of 0 under certain // conditions. self means we also shouldn't fail if none of the three // cases are hit; we'll just assume the page scroll is 0. return result; }; self.$GetWindowSize = function (window) { var result = new $JssorPoint$(); // technique from: // http://www.howtocreate.co.uk/tutorials/javascript/browserwindow //jQuery way to get window size, but support ie quirks mode var checkElement = (IsBrowserIeQuirks() ? window.document.body : window.document.documentElement); result.x = checkElement.clientWidth; result.y = checkElement.clientHeight; return result; }; //self.$MakeAjaxRequest = function (url, callback) { // var async = typeof (callback) == "function"; // var req = null; // if (async) { // var actual = callback; // var callback = function () { // Delay($JssorUtils$.$CreateCallback(null, actual, req), 1); // }; // } // if (window.ActiveXObject) { // for (var i = 0; i < arrActiveX.length; i++) { // try { // req = new ActiveXObject(arrActiveX[i]); // break; // } catch (e) { // continue; // } // } // } else if (window.XMLHttpRequest) { // req = new XMLHttpRequest(); // } // if (!req) { // $JssorDebug$.$Fail("Browser doesn't support XMLHttpRequest."); // } // if (async) { // req.onreadystatechange = function () { // if (req.readyState == 4) { // // prevent memory leaks by breaking circular reference now // req.onreadystatechange = new Function(); // callback(); // } // }; // } // try { // req.open("GET", url, async); // req.send(null); // } catch (e) { // $JssorDebug$.$Log(e.name + " while making AJAX request: " + e.message); // req.onreadystatechange = null; // req = null; // if (async) { // callback(); // } // } // return async ? null : req; //}; //self.$ParseXml = function (string) { // var xmlDoc = null; // if (window.ActiveXObject) { // try { // xmlDoc = new ActiveXObject("Microsoft.XMLDOM"); // xmlDoc.async = false; // xmlDoc.loadXML(string); // } catch (e) { // $JssorDebug$.$Log(e.name + " while parsing XML (ActiveX): " + e.message); // } // } else if (window.DOMParser) { // try { // var parser = new DOMParser(); // xmlDoc = parser.parseFromString(string, "text/xml"); // } catch (e) { // $JssorDebug$.$Log(e.name + " while parsing XML (DOMParser): " + e.message); // } // } else { // $JssorDebug$.$Fail("Browser doesn't support XML DOM."); // } // return xmlDoc; //}; function Css(elmt, name, value) { /// /// access css /// $JssorUtils$.$Css(elmt, name); //get css value /// $JssorUtils$.$Css(elmt, name, value); //set css value /// /// /// the element to access css /// /// /// the name of css property /// /// /// the value to set /// if (value != undefined) { elmt.style[name] = value; } else { var style = elmt.currentStyle || elmt.style; value = style[name]; if(value == "" && window.getComputedStyle) { style = elmt.ownerDocument.defaultView.getComputedStyle(elmt, null); style && (value = style.getPropertyValue(name) || style[name]); } return value; } } function CssN(elmt, name, value, isDimensional) { /// /// access css as numeric /// $JssorUtils$.$CssN(elmt, name); //get css value /// $JssorUtils$.$CssN(elmt, name, value); //set css value /// /// /// the element to access css /// /// /// the name of css property /// /// /// the value to set /// if (value != undefined) { isDimensional && (value += "px"); Css(elmt, name, value); } else { return parseFloat(Css(elmt, name)); } } function CssP(elmt, name, value) { /// /// access css in pixel as numeric, like 'top', 'left', 'width', 'height' /// $JssorUtils$.$CssP(elmt, name); //get css value /// $JssorUtils$.$CssP(elmt, name, value); //set css value /// /// /// the element to access css /// /// /// the name of css property /// /// /// the value to set /// return CssN(elmt, name, value, true); } function CssProxy(name, numericOrDimension) { /// /// create proxy to access css, CssProxy(name[, numericOrDimension]); /// /// /// the element to access css /// /// /// not set: access original css, 1: access css as numeric, 2: access css in pixel as numeric /// var isDimensional = numericOrDimension & 2; var cssAccessor = numericOrDimension ? CssN : Css; return function (elmt, value) { return cssAccessor(elmt, name, value, isDimensional); }; } function GetStyleOpacity(elmt) { if (IsBrowserIE() && browserEngineVersion < 9) { var match = /opacity=([^)]*)/.exec(elmt.style.filter || ""); return match ? (parseFloat(match[1]) / 100) : 1; } else return parseFloat(elmt.style.opacity || "1"); } function SetStyleOpacity(elmt, opacity, ie9EarlierForce) { if (IsBrowserIE() && browserEngineVersion < 9) { //var filterName = "filter"; // browserEngineVersion < 8 ? "filter" : "-ms-filter"; var finalFilter = elmt.style.filter || ""; // for CSS filter browsers (IE), remove alpha filter if it's unnecessary. // update: doing self always since IE9 beta seems to have broken the // behavior if we rely on the programmatic filters collection. var alphaReg = new RegExp(/[\s]*alpha\([^\)]*\)/g); // important: note the lazy star! self protects against // multiple filters; we don't want to delete the other ones. // update: also trimming extra whitespace around filter. var ieOpacity = Math.round(100 * opacity); var alphaFilter = ""; if (ieOpacity < 100 || ie9EarlierForce) { alphaFilter = "alpha(opacity=" + ieOpacity + ") "; //elmt.style["-ms-filter"] = "progid:DXImageTransform.Microsoft.Alpha(opacity=" + ieOpacity + ") "; } var newFilterValue = BuildNewCss(finalFilter, [alphaReg], alphaFilter); SetStyleFilterIE(elmt, newFilterValue); } //if (!IsBrowserIE() || browserEngineVersion >= 9) else { elmt.style.opacity = opacity == 1 ? "" : Math.round(opacity * 100) / 100; } } function SetStyleTransformInternal(elmt, transform) { var rotate = transform.$Rotate || 0; var scale = transform.$Scale || 1; if (IsBrowserIe9Earlier()) { var matrix = self.$CreateMatrix(rotate / 180 * Math.PI, scale, scale); SetStyleMatrixIE(elmt, (!rotate && scale == 1) ? null : matrix, self.$GetMatrixOffset(matrix, transform.$OriginalWidth, transform.$OriginalHeight)); } else { //rotate(15deg) scale(.5) translateZ(0) var transformProperty = GetTransformProperty(elmt); if (transformProperty) { var transformValue = "rotate(" + rotate % 360 + "deg) scale(" + scale + ")"; if ($JssorUtils$.$IsBrowserChrome() && webkitVersion > 535) transformValue += " perspective(2000px)"; elmt.style[transformProperty] = transformValue; } } } self.$SetStyleTransform = function (elmt, transform) { if (IsBrowserBadTransform()) { Delay(self.$CreateCallback(null, SetStyleTransformInternal, elmt, transform)); } else { SetStyleTransformInternal(elmt, transform); } }; self.$SetStyleTransformOrigin = function (elmt, transformOrigin) { var transformProperty = GetTransformProperty(elmt); if (transformProperty) elmt.style[transformProperty + "Origin"] = transformOrigin; }; self.$SetStyleScale = function (elmt, scale) { if (IsBrowserIE() && browserEngineVersion < 9 || (browserEngineVersion < 10 && IsBrowserIeQuirks())) { elmt.style.zoom = (scale == 1) ? "" : scale; } else { var transformProperty = GetTransformProperty(elmt); if (transformProperty) { //rotate(15deg) scale(.5) var transformValue = "scale(" + scale + ")"; var oldTransformValue = elmt.style[transformProperty]; var scaleReg = new RegExp(/[\s]*scale\(.*?\)/g); var newTransformValue = BuildNewCss(oldTransformValue, [scaleReg], transformValue); elmt.style[transformProperty] = newTransformValue; } } }; self.$EnableHWA = function (elmt) { if (!elmt.style[GetTransformProperty(elmt)] || elmt.style[GetTransformProperty(elmt)] == "none") elmt.style[GetTransformProperty(elmt)] = "perspective(2000px)"; }; self.$DisableHWA = function (elmt) { //if (force || elmt.style[GetTransformProperty(elmt)] == "perspective(2000px)") elmt.style[GetTransformProperty(elmt)] = "none"; }; var ie8OffsetWidth = 0; var ie8OffsetHeight = 0; var ie8WindowResizeCallbackHandlers; //var ie8LastVerticalScrollbar; //var toggleInfo = ""; function Ie8WindowResizeFilter(window) { var trigger = true; var checkElement = (IsBrowserIeQuirks() ? window.document.body : window.document.documentElement); if (checkElement) { //check vertical bar //var hasVerticalBar = checkElement.scrollHeight > checkElement.clientHeight; //var verticalBarToggle = hasVerticalBar != ie8LastVerticalScrollbar; //ie8LastVerticalScrollbar = hasVerticalBar; var widthChange = checkElement.offsetWidth - ie8OffsetWidth; var heightChange = checkElement.offsetHeight - ie8OffsetHeight; if (widthChange || heightChange) { ie8OffsetWidth += widthChange; ie8OffsetHeight += heightChange; } else trigger = false; } trigger && each(ie8WindowResizeCallbackHandlers, function (handler) { handler(); }); } self.$OnWindowResize = function (window, handler) { if (IsBrowserIE() && browserEngineVersion < 9) { if (!ie8WindowResizeCallbackHandlers) { ie8WindowResizeCallbackHandlers = [handler]; handler = self.$CreateCallback(null, Ie8WindowResizeFilter, window); } else { ie8WindowResizeCallbackHandlers.push(handler); return; } } self.$AddEvent(window, "resize", handler); }; self.$AddEvent = function (elmt, eventName, handler, useCapture) { elmt = self.$GetElement(elmt); // technique from: // http://blog.paranoidferret.com/index.php/2007/08/10/javascript-working-with-events/ if (elmt.addEventListener) { if (eventName == "mousewheel") { elmt.addEventListener("DOMMouseScroll", handler, useCapture); } // we are still going to add the mousewheel -- not a mistake! // self is for opera, since it uses onmousewheel but needs addEventListener. elmt.addEventListener(eventName, handler, useCapture); } else if (elmt.attachEvent) { elmt.attachEvent("on" + eventName, handler); if (useCapture && elmt.setCapture) { elmt.setCapture(); } } $JssorDebug$.$Execute(function () { if (!elmt.addEventListener && !elmt.attachEvent) { $JssorDebug$.$Fail("Unable to attach event handler, no known technique."); } }); }; self.$RemoveEvent = function (elmt, eventName, handler, useCapture) { elmt = self.$GetElement(elmt); // technique from: // http://blog.paranoidferret.com/index.php/2007/08/10/javascript-working-with-events/ if (elmt.removeEventListener) { if (eventName == "mousewheel") { elmt.removeEventListener("DOMMouseScroll", handler, useCapture); } // we are still going to remove the mousewheel -- not a mistake! // self is for opera, since it uses onmousewheel but needs removeEventListener. elmt.removeEventListener(eventName, handler, useCapture); } else if (elmt.detachEvent) { elmt.detachEvent("on" + eventName, handler); if (useCapture && elmt.releaseCapture) { elmt.releaseCapture(); } } $JssorDebug$.$Execute(function () { if (!elmt.removeEventListener && !elmt.detachEvent) { $JssorDebug$.$Fail("Unable to detach event handler, no known technique."); } }); }; self.$FireEvent = function (elmt, eventName) { //var document = elmt.document; $JssorDebug$.$Execute(function () { if (!document.createEvent && !document.createEventObject) { $JssorDebug$.$Fail("Unable to fire event, no known technique."); } if (!elmt.dispatchEvent && !elmt.fireEvent) { $JssorDebug$.$Fail("Unable to fire event, no known technique."); } }); var evento; if (document.createEvent) { evento = document.createEvent("HTMLEvents"); evento.initEvent(eventName, false, false); elmt.dispatchEvent(evento); } else { var ieEventName = "on" + eventName; evento = document.createEventObject(); //event.eventType = ieEventName; //event.eventName = ieEventName; elmt.fireEvent(ieEventName, evento); } }; self.$AddEventBrowserMouseUp = function (handler, userCapture) { self.$AddEvent((IsBrowserIe9Earlier()) ? document : window, "mouseup", handler, userCapture); }; self.$RemoveEventBrowserMouseUp = function (handler, userCapture) { self.$RemoveEvent((IsBrowserIe9Earlier()) ? document : window, "mouseup", handler, userCapture); }; self.$AddEventBrowserMouseDown = function (handler, userCapture) { self.$AddEvent((IsBrowserIe9Earlier()) ? document : window, "mousedown", handler, userCapture); }; self.$RemoveEventBrowserMouseDown = function (handler, userCapture) { self.$RemoveEvent((IsBrowserIe9Earlier()) ? document : window, "mousedown", handler, userCapture); }; self.$CancelEvent = function (event) { event = self.$GetEvent(event); // technique from: // http://blog.paranoidferret.com/index.php/2007/08/10/javascript-working-with-events/ if (event.preventDefault) { event.preventDefault(); // W3C for preventing default } event.cancel = true; // legacy for preventing default event.returnValue = false; // IE for preventing default }; self.$StopEvent = function (event) { event = self.$GetEvent(event); // technique from: // http://blog.paranoidferret.com/index.php/2007/08/10/javascript-working-with-events/ if (event.stopPropagation) { event.stopPropagation(); // W3C for stopping propagation } event.cancelBubble = true; // IE for stopping propagation }; self.$CreateCallback = function (object, method) { // create callback args var initialArgs = []; for (var i = 2; i < arguments.length; i++) { initialArgs.push(arguments[i]); } // create closure to apply method var callback = function () { // concatenate new args, but make a copy of initialArgs first var args = initialArgs.concat([]); for (var i = 0; i < arguments.length; i++) { args.push(arguments[i]); } return method.apply(object, args); }; $JssorDebug$.$LiveStamp(callback, "callback_" + ($JssorUtils$.$GetNow() & 11111111)); return callback; }; var _Freeer; self.$FreeElement = function (elmt) { if (!_Freeer) _Freeer = self.$CreateDivElement(); if (elmt) { $JssorUtils$.$AppendChild(_Freeer, elmt); $JssorUtils$.$ClearInnerHtml(_Freeer); } }; self.$SetInnerText = function (elmt, text) { var textNode = document.createTextNode(text); self.$ClearInnerHtml(elmt); elmt.appendChild(textNode); }; self.$GetInnerText = function (elmt) { return elmt.textContent || elmt.innerText; }; self.$GetInnerHtml = function (elmt) { return elmt.innerHTML; }; self.$SetInnerHtml = function (elmt, html) { elmt.innerHTML = html; }; self.$ClearInnerHtml = function (elmt) { elmt.innerHTML = ""; }; self.$EncodeHtml = function (text) { var div = self.$CreateDivElement(); self.$SetInnerText(div, text); return self.$GetInnerHtml(div); }; self.$DecodeHtml = function (html) { var div = self.$CreateDivElement(); self.$SetInnerHtml(div, html); return self.$GetInnerText(div); }; self.$SelectElement = function (elmt) { var userSelection; if (window.getSelection) { //W3C default userSelection = window.getSelection(); } var theRange = null; if (document.createRange) { theRange = document.createRange(); theRange.selectNode(elmt); } else { theRange = document.body.createTextRange(); theRange.moveToElementText(elmt); theRange.select(); } //set user selection if (userSelection) userSelection.addRange(theRange); }; self.$DeselectElements = function () { if (document.selection) { document.selection.empty(); } else if (window.getSelection) { window.getSelection().removeAllRanges(); } }; self.$GetChildren = function (elmt) { var children = []; for (var tmpEl = elmt.firstChild; tmpEl; tmpEl = tmpEl.nextSibling) { if (tmpEl.nodeType == 1) { children.push(tmpEl); } } return children; }; function FindFirstChildByAttribute(elmt, attrValue, attrName, deep) { if (!attrName) attrName = "u"; for (elmt = elmt ? elmt.firstChild : null; elmt; elmt = elmt.nextSibling) { if (elmt.nodeType == 1) { if (self.$GetAttributeEx(elmt, attrName) == attrValue) return elmt; if (deep) { var childRet = FindFirstChildByAttribute(elmt, attrValue, attrName, deep); if (childRet) return childRet; } } } } self.$FindFirstChildByAttribute = FindFirstChildByAttribute; function FindChildrenByAttribute(elmt, attrValue, attrName, deep) { if (!attrName) attrName = "u"; var ret = []; for (elmt = elmt ? elmt.firstChild : null; elmt; elmt = elmt.nextSibling) { if (elmt.nodeType == 1) { if (self.$GetAttributeEx(elmt, attrName) == attrValue) ret.push(elmt); if (deep) { var childRet = FindChildrenByAttribute(elmt, attrValue, attrName, deep); if (childRet.length) ret = ret.concat(childRet); } } } return ret; } self.$FindChildrenByAttribute = FindChildrenByAttribute; function FindFirstChildByTag(elmt, tagName, deep) { for (elmt = elmt ? elmt.firstChild : null; elmt; elmt = elmt.nextSibling) { if (elmt.nodeType == 1) { if (elmt.tagName == tagName) return elmt; if (deep) { var childRet = FindFirstChildByTag(elmt, tagName, deep); if (childRet) return childRet; } } } } self.$FindFirstChildByTag = FindFirstChildByTag; function FindChildrenByTag(elmt, tagName, deep) { var ret = []; for (elmt = elmt ? elmt.firstChild : null; elmt; elmt = elmt.nextSibling) { if (elmt.nodeType == 1) { if (!tagName || elmt.tagName == tagName) ret.push(elmt); if (deep) { var childRet = FindChildrenByTag(elmt, tagName, true); if (childRet.length) ret = ret.concat(childRet); } } } return ret; } self.$FindChildrenByTag = FindChildrenByTag; self.$GetElementsByTagName = function (elmt, tagName) { return elmt.getElementsByTagName(tagName); }; self.$Extend = function (target) { for (var i = 1; i < arguments.length; i++) { var options = arguments[i]; // Only deal with non-null/undefined values if (options) { // Extend the base object for (var name in options) { target[name] = options[name]; } } } // Return the modified object return target; }; self.$Unextend = function (target, options) { $JssorDebug$.$Assert(options); var unextended = {}; // Extend the base object for (var name in target) { if (target[name] != options[name]) { unextended[name] = target[name]; } } // Return the modified object return unextended; }; self.$IsUndefined = function (obj) { return type(obj) == "undefined"; }; self.$IsFunction = function (obj) { return type(obj) == "function"; }; self.$IsArray = Array.isArray || function (obj) { return type(obj) == "array"; }; self.$IsString = function (obj) { return type(obj) == "string"; }; self.$IsNumeric = function (obj) { return !isNaN(parseFloat(obj)) && isFinite(obj); }; self.$IsWindow = function (obj) { return obj != null && obj == obj.window; }; self.$Type = type; // args is for internal usage only self.$Each = each; self.$IsPlainObject = isPlainObject; self.$CreateDivElement = function (doc) { return self.$CreateElement("DIV", doc); }; self.$CreateSpanElement = function (doc) { return self.$CreateElement("SPAN", doc); }; self.$CreateElement = function (tagName, doc) { doc = doc || document; return doc.createElement(tagName); }; self.$EmptyFunction = function () { }; self.$GetAttribute = function (elmt, name) { return elmt.getAttribute(name); }; self.$GetAttributeEx = function (elmt, name) { return self.$GetAttribute(elmt, name) || self.$GetAttribute(elmt, "data-" + name); }; self.$SetAttribute = function (elmt, name, value) { elmt.setAttribute(name, value); }; self.$GetClassName = function (elmt) { return elmt.className; }; self.$SetClassName = function (elmt, className) { elmt.className = className || ""; }; self.$GetParentNode = function (elmt) { return elmt.parentNode; }; self.$HideElement = function (elmt) { self.$CssDisplay(elmt, "none"); }; self.$HideElements = function (elmts) { for (var i = 0; i < elmts.length; i++) { self.$HideElement(elmts[i]); } }; self.$ShowElement = function (elmt, show) { self.$CssDisplay(elmt, show == false ? "none" : ""); }; self.$ShowElements = function (elmts) { for (var i = 0; i < elmts.length; i++) { self.$ShowElement(elmts[i]); } }; self.$RemoveAttribute = function (elmt, attrbuteName) { elmt.removeAttribute(attrbuteName); }; self.$CanClearClip = function () { //return !IsBrowserIE() || browserEngineVersion > 9 || (browserRuntimeVersion > 7 && !IsBrowserIeQuirks()); return IsBrowserIE() && browserRuntimeVersion < 10; }; self.$SetStyleClip = function (elmt, clip) { if (clip) { elmt.style.clip = "rect(" + Math.round(clip.$Top) + "px " + Math.round(clip.$Right) + "px " + Math.round(clip.$Bottom) + "px " + Math.round(clip.$Left) + "px)"; } else { var cssText = elmt.style.cssText; var clipRegs = [ new RegExp(/[\s]*clip: rect\(.*?\)[;]?/i), new RegExp(/[\s]*cliptop: .*?[;]?/i), new RegExp(/[\s]*clipright: .*?[;]?/i), new RegExp(/[\s]*clipbottom: .*?[;]?/i), new RegExp(/[\s]*clipleft: .*?[;]?/i) ]; var newCssText = BuildNewCss(cssText, clipRegs, ""); $JssorUtils$.$CssCssText(elmt, newCssText); } }; self.$GetNow = function () { return new Date().getTime(); }; self.$AppendChild = function (elmt, child) { elmt.appendChild(child); }; self.$AppendChildren = function (elmt, children) { each(children, function (child) { self.$AppendChild(elmt, child); }); }; self.$InsertBefore = function (elmt, child, refObject) { elmt.insertBefore(child, refObject); }; self.$InsertAdjacentHtml = function (elmt, where, text) { elmt.insertAdjacentHTML(where, text); }; self.$RemoveChild = function (elmt, child) { elmt.removeChild(child); }; self.$RemoveChildren = function (elmt, children) { each(children, function (child) { self.$RemoveChild(elmt, child); }); }; self.$ClearChildren = function (elmt) { self.$RemoveChildren(elmt, self.$GetChildren(elmt)); }; self.$ParseInt = function (str, radix) { return parseInt(str, radix || 10); }; self.$ParseFloat = function (str) { return parseFloat(str); }; self.$IsChild = function (elmtA, elmtB) { var body = document.body; while (elmtB && elmtA != elmtB && body != elmtB) { try { elmtB = elmtB.parentNode; } catch (e) { // Firefox sometimes fires events for XUL elements, which throws // a "permission denied" error. so this is not a child. return false; } } return elmtA == elmtB; }; self.$ToLowerCase = function (value) { if (value) value = value.toLowerCase(); return value; }; self.$CloneNode = function (elmt, deep) { return elmt.cloneNode(deep); }; function LoadImageCallback(callback, image, abort) { image.onload = null; image.abort = null; if (callback) callback(image, abort); } self.$LoadImage = function (src, callback) { if (self.$IsBrowserOpera() && browserRuntimeVersion < 11.6 || !src) { LoadImageCallback(callback, null); } else { var image = new Image(); image.onload = self.$CreateCallback(null, LoadImageCallback, callback, image); image.onabort = self.$CreateCallback(null, LoadImageCallback, callback, image, true); image.src = src; } }; self.$LoadImages = function (imageElmts, mainImageElmt, callback) { var _ImageLoading = imageElmts.length + 1; function LoadImageCompleteEventHandler(image, abort) { _ImageLoading--; if (mainImageElmt && image && image.src == mainImageElmt.src) mainImageElmt = image; !_ImageLoading && callback && callback(mainImageElmt); } $JssorUtils$.$Each(imageElmts, function (imageElmt) { $JssorUtils$.$LoadImage(imageElmt.src, LoadImageCompleteEventHandler); }); LoadImageCompleteEventHandler(); }; self.$BuildElement = function (template, tagName, replacer, createCopy) { if (createCopy) template = $JssorUtils$.$CloneNode(template, true); var templateHolders = $JssorUtils$.$GetElementsByTagName(template, tagName); for (var j = templateHolders.length - 1; j > -1; j--) { var templateHolder = templateHolders[j]; var replaceItem = $JssorUtils$.$CloneNode(replacer, true); $JssorUtils$.$SetClassName(replaceItem, $JssorUtils$.$GetClassName(templateHolder)); $JssorUtils$.$CssCssText(replaceItem, templateHolder.style.cssText); var thumbnailPlaceHolderParent = $JssorUtils$.$GetParentNode(templateHolder); $JssorUtils$.$InsertBefore(thumbnailPlaceHolderParent, replaceItem, templateHolder); $JssorUtils$.$RemoveChild(thumbnailPlaceHolderParent, templateHolder); } return template; }; var _MouseDownButtons; var _MouseOverButtons = []; function JssorButtonEx(elmt) { var _Self = this; var _OriginClassName; var _IsMouseDown; //class name 'dn' var _IsActive; //class name 'av' function Highlight() { var className = _OriginClassName; if (_IsMouseDown) { className += 'dn'; } else if (_IsActive) { className += "av"; } $JssorUtils$.$SetClassName(elmt, className); } function OnMouseDown(event) { _MouseDownButtons.push(_Self); _IsMouseDown = true; Highlight(); } _Self.$MouseUp = function () { /// /// Internal member function, do not use it. /// /// _IsMouseDown = false; Highlight(); }; _Self.$Activate = function (activate) { _IsActive = activate; Highlight(); }; //JssorButtonEx Constructor { elmt = self.$GetElement(elmt); if (!_MouseDownButtons) { self.$AddEventBrowserMouseUp(function () { var oldMouseDownButtons = _MouseDownButtons; _MouseDownButtons = []; each(oldMouseDownButtons, function (button) { button.$MouseUp(); }); }); _MouseDownButtons = []; } _OriginClassName = self.$GetClassName(elmt); $JssorUtils$.$AddEvent(elmt, "mousedown", OnMouseDown); } } self.$Buttonize = function (elmt) { return new JssorButtonEx(elmt); }; self.$Css = Css; self.$CssN = CssN; self.$CssP = CssP; self.$CssOverflow = CssProxy("overflow"); self.$CssCssText = CssProxy("cssText"); self.$CssTop = CssProxy("top", 2); self.$CssLeft = CssProxy("left", 2); self.$CssWidth = CssProxy("width", 2); self.$CssHeight = CssProxy("height", 2); self.$CssMarginLeft = CssProxy("marginLeft", 2); self.$CssMarginTop = CssProxy("marginTop", 2); self.$CssPosition = CssProxy("position"); self.$CssDisplay = CssProxy("display"); self.$CssZIndex = CssProxy("zIndex", 1); self.$CssFloat = function (elmt, float) { return Css(elmt, IsBrowserIE() ? "styleFloat" : "cssFloat", float); }; self.$CssOpacity = function (elmt, opacity, ie9EarlierForce) { if (opacity != undefined) { SetStyleOpacity(elmt, opacity, ie9EarlierForce); } else { return GetStyleOpacity(elmt); } }; var _StyleGetter = { $Opacity: self.$CssOpacity, $Top: self.$CssTop, $Left: self.$CssLeft, $Width: self.$CssWidth, $Height: self.$CssHeight, $Position: self.$CssPosition, $Display: self.$CssDisplay, $ZIndex: self.$CssZIndex }; //var _StyleGetter = { // $Opacity: self.$GetStyleOpacity, // $Top: self.$GetStyleTop, // $Left: self.$GetStyleLeft, // $Width: self.$GetStyleWidth, // $Height: self.$GetStyleHeight, // $Position: self.$GetStylePosition, // $Display: self.$GetStyleDisplay, // $ZIndex: self.$GetStyleZIndex //}; var _StyleSetterReserved; //var _StyleSetterReserved = { // $Opacity: self.$SetStyleOpacity, // $Top: self.$SetStyleTop, // $Left: self.$SetStyleLeft, // $Width: self.$SetStyleWidth, // $Height: self.$SetStyleHeight, // $Display: self.$SetStyleDisplay, // $Clip: self.$SetStyleClip, // $MarginLeft: self.$SetStyleMarginLeft, // $MarginTop: self.$SetStyleMarginTop, // $Transform: self.$SetStyleTransform, // $Position: self.$SetStylePosition, // $ZIndex: self.$SetStyleZIndex //}; function GetStyleSetter() { if (!_StyleSetterReserved) { _StyleSetterReserved = self.$Extend({ $MarginTop: self.$CssMarginTop, $MarginLeft: self.$CssMarginLeft, $Clip: self.$SetStyleClip, $Transform: self.$SetStyleTransform }, _StyleGetter); } return _StyleSetterReserved; } function GetStyleSetterEx() { GetStyleSetter(); //For Compression Only _StyleSetterReserved.$Transform = _StyleSetterReserved.$Transform; return _StyleSetterReserved; } self.$GetStyleSetter = GetStyleSetter; self.$GetStyleSetterEx = GetStyleSetterEx; self.$GetStyles = function (elmt, originStyles) { GetStyleSetter(); var styles = {}; each(originStyles, function (value, key) { if (_StyleGetter[key]) { styles[key] = _StyleGetter[key](elmt); } }); return styles; }; self.$SetStyles = function (elmt, styles) { var styleSetter = GetStyleSetter(); each(styles, function (value, key) { styleSetter[key] && styleSetter[key](elmt, value); }); }; self.$SetStylesEx = function (elmt, styles) { GetStyleSetterEx(); self.$SetStyles(elmt, styles); }; $JssorMatrix$ = new function () { var _This = this; function Multiply(ma, mb) { var acs = ma[0].length; var rows = ma.length; var cols = mb[0].length; var matrix = []; for (var r = 0; r < rows; r++) { var row = matrix[r] = []; for (var c = 0; c < cols; c++) { var unitValue = 0; for (var ac = 0; ac < acs; ac++) { unitValue += ma[r][ac] * mb[ac][c]; } row[c] = unitValue; } } return matrix; } _This.$ScaleX = function (matrix, sx) { return _This.$ScaleXY(matrix, sx, 0); }; _This.$ScaleY = function (matrix, sy) { return _This.$ScaleXY(matrix, 0, sy); }; _This.$ScaleXY = function (matrix, sx, sy) { return Multiply(matrix, [[sx, 0], [0, sy]]); }; _This.$TransformPoint = function (matrix, p) { var pMatrix = Multiply(matrix, [[p.x], [p.y]]); return new $JssorPoint$(pMatrix[0][0], pMatrix[1][0]); }; }; self.$CreateMatrix = function (alpha, scaleX, scaleY) { var cos = Math.cos(alpha); var sin = Math.sin(alpha); //var r11 = cos; //var r21 = sin; //var r12 = -sin; //var r22 = cos; //var m11 = cos * scaleX; //var m12 = -sin * scaleY; //var m21 = sin * scaleX; //var m22 = cos * scaleY; return [[cos * scaleX, -sin * scaleY], [sin * scaleX, cos * scaleY]]; }; self.$GetMatrixOffset = function (matrix, width, height) { var p1 = $JssorMatrix$.$TransformPoint(matrix, new $JssorPoint$(-width / 2, -height / 2)); var p2 = $JssorMatrix$.$TransformPoint(matrix, new $JssorPoint$(width / 2, -height / 2)); var p3 = $JssorMatrix$.$TransformPoint(matrix, new $JssorPoint$(width / 2, height / 2)); var p4 = $JssorMatrix$.$TransformPoint(matrix, new $JssorPoint$(-width / 2, height / 2)); return new $JssorPoint$(Math.min(p1.x, p2.x, p3.x, p4.x) + width / 2, Math.min(p1.y, p2.y, p3.y, p4.y) + height / 2); }; }; $JssorAnimator$ = function (delay, duration, options, elmt, fromStyles, toStyles) { delay = delay || 0; var _This = this; var _AutoPlay; var _Hiden; var _CombineMode; var _PlayToPosition; var _PlayDirection; var _NoStop; var _TimeStampLastFrame = 0; var _SubEasings; var _SubRounds; var _SubDurings; var _Callback; var _Position_Current = 0; var _Position_Display = 0; var _Hooked; var _Position_InnerBegin = delay; var _Position_InnerEnd = delay + duration; var _Position_OuterBegin; var _Position_OuterEnd; var _LoopLength; var _NestedAnimators = []; var _StyleSetter; function GetPositionRange(position, begin, end) { var range = 0; if (position < begin) range = -1; else if (position > end) range = 1; return range; } function GetInnerPositionRange(position) { return GetPositionRange(position, _Position_InnerBegin, _Position_InnerEnd); } function GetOuterPositionRange(position) { return GetPositionRange(position, _Position_OuterBegin, _Position_OuterEnd); } function Shift(offset) { _Position_OuterBegin += offset; _Position_OuterEnd += offset; _Position_InnerBegin += offset; _Position_InnerEnd += offset; _Position_Current += offset; _Position_Display += offset; $JssorUtils$.$Each(_NestedAnimators, function (animator) { animator, animator.$Shift(offset); }); } function Locate(position, relative) { var offset = position - _Position_OuterBegin + delay * relative; Shift(offset); //$JssorDebug$.$Execute(function () { // _This.$Position_InnerBegin = _Position_InnerBegin; // _This.$Position_InnerEnd = _Position_InnerEnd; // _This.$Position_OuterBegin = _Position_OuterBegin; // _This.$Position_OuterEnd = _Position_OuterEnd; //}); return _Position_OuterEnd; } function GoToPosition(positionOuter, force) { var trimedPositionOuter = positionOuter; if (_LoopLength && (trimedPositionOuter >= _Position_OuterEnd || trimedPositionOuter <= _Position_OuterBegin)) { trimedPositionOuter = ((trimedPositionOuter - _Position_OuterBegin) % _LoopLength + _LoopLength) % _LoopLength + _Position_OuterBegin; } if (!_Hooked || _NoStop || force || _Position_Current != trimedPositionOuter) { var positionToDisplay = Math.min(trimedPositionOuter, _Position_OuterEnd); positionToDisplay = Math.max(positionToDisplay, _Position_OuterBegin); if (!_Hooked || _NoStop || force || positionToDisplay != _Position_Display) { if (toStyles) { var currentStyles = toStyles; if (fromStyles) { var interPosition = (positionToDisplay - _Position_InnerBegin) / (duration || 1); if (options.$Optimize && $JssorUtils$.$IsBrowserChrome() && duration) interPosition = Math.round(interPosition * duration / 16) / duration * 16; if (options.$Reverse) interPosition = 1 - interPosition; currentStyles = {}; for (var key in toStyles) { var round = _SubRounds[key] || 1; var during = _SubDurings[key] || [0, 1]; var propertyInterPosition = (interPosition - during[0]) / during[1]; propertyInterPosition = Math.min(Math.max(propertyInterPosition, 0), 1); propertyInterPosition = propertyInterPosition * round; var floorPosition = Math.floor(propertyInterPosition); if (propertyInterPosition != floorPosition) propertyInterPosition -= floorPosition; var easing = _SubEasings[key] || _SubEasings.$Default; var easingValue = easing(propertyInterPosition); var currentPropertyValue; var value = fromStyles[key]; var toValue = toStyles[key]; if ($JssorUtils$.$IsNumeric(toValue)) { currentPropertyValue = value + (toValue - value) * easingValue; } else { currentPropertyValue = $JssorUtils$.$Extend({ $Offset: {} }, fromStyles[key]); $JssorUtils$.$Each(toValue.$Offset, function (rectX, n) { var offsetValue = rectX * easingValue; currentPropertyValue.$Offset[n] = offsetValue; currentPropertyValue[n] += offsetValue; }); } currentStyles[key] = currentPropertyValue; } } if (fromStyles.$Zoom) { currentStyles.$Transform = { $Rotate: currentStyles.$Rotate || 0, $Scale: currentStyles.$Zoom, $OriginalWidth: options.$OriginalWidth, $OriginalHeight: options.$OriginalHeight }; } if (toStyles.$Clip && options.$Move) { var styleFrameNClipOffset = currentStyles.$Clip.$Offset; var offsetY = (styleFrameNClipOffset.$Top || 0) + (styleFrameNClipOffset.$Bottom || 0); var offsetX = (styleFrameNClipOffset.$Left || 0) + (styleFrameNClipOffset.$Right || 0); currentStyles.$Left = (currentStyles.$Left || 0) + offsetX; currentStyles.$Top = (currentStyles.$Top || 0) + offsetY; currentStyles.$Clip.$Left -= offsetX; currentStyles.$Clip.$Right -= offsetX; currentStyles.$Clip.$Top -= offsetY; currentStyles.$Clip.$Bottom -= offsetY; } if (currentStyles.$Clip && $JssorUtils$.$CanClearClip() && !currentStyles.$Clip.$Top && !currentStyles.$Clip.$Left && (currentStyles.$Clip.$Right == options.$OriginalWidth) && (currentStyles.$Clip.$Bottom == options.$OriginalHeight)) currentStyles.$Clip = null; $JssorUtils$.$Each(currentStyles, function (value, key) { _StyleSetter[key] && _StyleSetter[key](elmt, value); }); } _This.$OnInnerOffsetChange(_Position_Display - _Position_InnerBegin, positionToDisplay - _Position_InnerBegin); } _Position_Display = positionToDisplay; $JssorUtils$.$Each(_NestedAnimators, function (animator, i) { var nestedAnimator = positionOuter < _Position_Current ? _NestedAnimators[_NestedAnimators.length - i - 1] : animator; nestedAnimator.$GoToPosition(positionOuter, force); }); var positionOld = _Position_Current; var positionNew = positionOuter; _Position_Current = trimedPositionOuter; _Hooked = true; _This.$OnPositionChange(positionOld, positionNew); } } function Join(animator, combineMode) { /// /// Combine another animator as nested animator /// /// /// An instance of $JssorAnimator$ /// /// /// 0: parallel - place the animator parallel to this animator. /// 1: chain - chain the animator at the _Position_InnerEnd of this animator. /// $JssorDebug$.$Execute(function () { if (combineMode !== 0 && combineMode !== 1) $JssorDebug$.$Fail("Argument out of range, the value of 'combineMode' should be either 0 or 1."); }); if (combineMode) animator.$Locate(_Position_OuterEnd, 1); _Position_OuterEnd = Math.max(_Position_OuterEnd, animator.$GetPosition_OuterEnd()); _NestedAnimators.push(animator); } function PlayFrame() { if (_AutoPlay) { var now = $JssorUtils$.$GetNow(); var timeOffset = Math.min(now - _TimeStampLastFrame, $JssorUtils$.$IsBrowserOpera() ? 80 : 20); var timePosition = _Position_Current + timeOffset * _PlayDirection; _TimeStampLastFrame = now; if (timePosition * _PlayDirection >= _PlayToPosition * _PlayDirection) timePosition = _PlayToPosition; GoToPosition(timePosition); if (!_NoStop && timePosition * _PlayDirection >= _PlayToPosition * _PlayDirection) { Stop(_Callback); } else { $JssorUtils$.$Delay(PlayFrame, options.$Interval); } } } function PlayToPosition(toPosition, callback, noStop) { if (!_AutoPlay) { _AutoPlay = true; _NoStop = noStop _Callback = callback; toPosition = Math.max(toPosition, _Position_OuterBegin); toPosition = Math.min(toPosition, _Position_OuterEnd); _PlayToPosition = toPosition; _PlayDirection = _PlayToPosition < _Position_Current ? -1 : 1; _This.$OnStart(); _TimeStampLastFrame = $JssorUtils$.$GetNow(); PlayFrame(); } } function Stop(callback) { if (_AutoPlay) { _NoStop = _AutoPlay = _Callback = false; _This.$OnStop(); if (callback) callback(); } } _This.$Play = function (positionLength, callback, noStop) { PlayToPosition(positionLength ? _Position_Current + positionLength : _Position_OuterEnd, callback, noStop); }; _This.$PlayToPosition = function (position, callback, noStop) { PlayToPosition(position, callback, noStop); }; _This.$PlayToBegin = function (callback, noStop) { PlayToPosition(_Position_OuterBegin, callback, noStop); }; _This.$PlayToEnd = function (callback, noStop) { PlayToPosition(_Position_OuterEnd, callback, noStop); }; _This.$Stop = function () { Stop(); }; _This.$Continue = function (toPosition) { PlayToPosition(toPosition); }; _This.$GetPosition = function () { return _Position_Current; }; _This.$GetPlayToPosition = function () { return _PlayToPosition; }; _This.$GetPosition_Display = function () { return _Position_Display; }; _This.$GoToPosition = GoToPosition; _This.$GoToBegin = function () { GoToPosition(_Position_OuterBegin, true); }; _This.$GoToEnd = function () { GoToPosition(_Position_OuterEnd, true); }; _This.$Move = function (offset) { GoToPosition(_Position_Current + offset); }; _This.$CombineMode = function () { return _CombineMode; }; _This.$GetDuration = function () { return duration; }; _This.$IsPlaying = function () { return _AutoPlay; }; _This.$IsOnTheWay = function () { return _Position_Current > _Position_InnerBegin && _Position_Current <= _Position_InnerEnd; }; _This.$SetLoopLength = function (length) { _LoopLength = length; }; _This.$Locate = Locate; _This.$Shift = Shift; _This.$Join = Join; _This.$Combine = function (animator) { /// /// Combine another animator parallel to this animator /// /// /// An instance of $JssorAnimator$ /// Join(animator, 0); }; _This.$Chain = function (animator) { /// /// Chain another animator at the _Position_InnerEnd of this animator /// /// /// An instance of $JssorAnimator$ /// Join(animator, 1); }; _This.$GetPosition_InnerBegin = function () { /// /// Internal member function, do not use it. /// /// /// return _Position_InnerBegin; }; _This.$GetPosition_InnerEnd = function () { /// /// Internal member function, do not use it. /// /// /// return _Position_InnerEnd; }; _This.$GetPosition_OuterBegin = function () { /// /// Internal member function, do not use it. /// /// /// return _Position_OuterBegin; }; _This.$GetPosition_OuterEnd = function () { /// /// Internal member function, do not use it. /// /// /// return _Position_OuterEnd; }; _This.$OnPositionChange = $JssorUtils$.$EmptyFunction; _This.$OnStart = $JssorUtils$.$EmptyFunction; _This.$OnStop = $JssorUtils$.$EmptyFunction; _This.$OnInnerOffsetChange = $JssorUtils$.$EmptyFunction; _This.$Version = $JssorUtils$.$GetNow(); //Constructor` 1 { options = $JssorUtils$.$Extend({ $Interval: 15 }, options); //Sodo statement, for development time intellisence only $JssorDebug$.$Execute(function () { options = $JssorUtils$.$Extend({ $LoopLength: undefined, $Setter: undefined, $Easing: undefined }, options); }); _LoopLength = options.$LoopLength; _StyleSetter = $JssorUtils$.$Extend({}, $JssorUtils$.$GetStyleSetter(), options.$Setter); _Position_OuterBegin = _Position_InnerBegin = delay; _Position_OuterEnd = _Position_InnerEnd = delay + duration; var _SubRounds = options.$Round || {}; var _SubDurings = options.$During || {}; _SubEasings = $JssorUtils$.$Extend({ $Default: $JssorUtils$.$IsFunction(options.$Easing) && options.$Easing || $JssorEasing$.$EaseSwing }, options.$Easing); } }; function $JssorPlayerClass$() { var _SelfPlayer = this; var _PlayerControllers = []; function PlayerController(playerElement) { var _SelfPlayerController = this; var _PlayerInstance; var _PlayerInstantces = []; function OnPlayerInstanceDataAvailable(event) { var srcElement = $JssorUtils$.$GetEventSrcElement(event); _PlayerInstance = srcElement.pInstance; $JssorUtils$.$RemoveEvent(srcElement, "dataavailable", OnPlayerInstanceDataAvailable); $JssorUtils$.$Each(_PlayerInstantces, function (playerInstance) { if (playerInstance != _PlayerInstance) { playerInstance.$Remove(); } }); playerElement.pTagName = _PlayerInstance.tagName; _PlayerInstantces = null; } function HandlePlayerInstance(playerInstanceElement) { var playerHandler; if (!playerInstanceElement.pInstance) { var playerHandlerAttribute = $JssorUtils$.$GetAttributeEx(playerInstanceElement, "pHandler"); if ($JssorPlayer$[playerHandlerAttribute]) { $JssorUtils$.$AddEvent(playerInstanceElement, "dataavailable", OnPlayerInstanceDataAvailable); playerHandler = new $JssorPlayer$[playerHandlerAttribute](playerElement, playerInstanceElement); _PlayerInstantces.push(playerHandler); $JssorDebug$.$Execute(function () { if ($JssorUtils$.$Type(playerHandler.$Remove) != "function") { $JssorDebug$.$Fail("'pRemove' interface not implemented for player handler '" + playerHandlerAttribute + "'."); } }); } } return playerHandler; } _SelfPlayerController.$InitPlayerController = function () { if (!playerElement.pInstance && !HandlePlayerInstance(playerElement)) { var playerInstanceElements = $JssorUtils$.$GetChildren(playerElement); $JssorUtils$.$Each(playerInstanceElements, function (playerInstanceElement) { HandlePlayerInstance(playerInstanceElement); }); } }; } _SelfPlayer.$EVT_SWITCH = 21; _SelfPlayer.$FetchPlayers = function (elmt) { elmt = elmt || document.body; var playerElements = $JssorUtils$.$FindChildrenByAttribute(elmt, "player", null, true); $JssorUtils$.$Each(playerElements, function (playerElement) { if (!_PlayerControllers[playerElement.pId]) { playerElement.pId = _PlayerControllers.length; _PlayerControllers.push(new PlayerController(playerElement)); } var playerController = _PlayerControllers[playerElement.pId]; playerController.$InitPlayerController(); }); }; }; (function(k,f,c,j,d,l,g){/*! Jssor */ new(function(){});var e=k.$JssorEasing$={$EaseSwing:function(a){return-c.cos(a*c.PI)/2+.5},$EaseLinear:function(a){return a},$EaseInQuad:function(a){return a*a},$EaseOutQuad:function(a){return-a*(a-2)},$EaseInOutQuad:function(a){return(a*=2)<1?1/2*a*a:-1/2*(--a*(a-2)-1)},$EaseInCubic:function(a){return a*a*a},$EaseOutCubic:function(a){return(a-=1)*a*a+1},$EaseInOutCubic:function(a){return(a*=2)<1?1/2*a*a*a:1/2*((a-=2)*a*a+2)},$EaseInQuart:function(a){return a*a*a*a},$EaseOutQuart:function(a){return-((a-=1)*a*a*a-1)},$EaseInOutQuart:function(a){return(a*=2)<1?1/2*a*a*a*a:-1/2*((a-=2)*a*a*a-2)},$EaseInQuint:function(a){return a*a*a*a*a},$EaseOutQuint:function(a){return(a-=1)*a*a*a*a+1},$EaseInOutQuint:function(a){return(a*=2)<1?1/2*a*a*a*a*a:1/2*((a-=2)*a*a*a*a+2)},$EaseInSine:function(a){return 1-c.cos(a*c.PI/2)},$EaseOutSine:function(a){return c.sin(a*c.PI/2)},$EaseInOutSine:function(a){return-1/2*(c.cos(c.PI*a)-1)},$EaseInExpo:function(a){return a==0?0:c.pow(2,10*(a-1))},$EaseOutExpo:function(a){return a==1?1:-c.pow(2,-10*a)+1},$EaseInOutExpo:function(a){return a==0||a==1?a:(a*=2)<1?1/2*c.pow(2,10*(a-1)):1/2*(-c.pow(2,-10*--a)+2)},$EaseInCirc:function(a){return-(c.sqrt(1-a*a)-1)},$EaseOutCirc:function(a){return c.sqrt(1-(a-=1)*a)},$EaseInOutCirc:function(a){return(a*=2)<1?-1/2*(c.sqrt(1-a*a)-1):1/2*(c.sqrt(1-(a-=2)*a)+1)},$EaseInElastic:function(a){if(!a||a==1)return a;var b=.3,d=.075;return-(c.pow(2,10*(a-=1))*c.sin((a-d)*2*c.PI/b))},$EaseOutElastic:function(a){if(!a||a==1)return a;var b=.3,d=.075;return c.pow(2,-10*a)*c.sin((a-d)*2*c.PI/b)+1},$EaseInOutElastic:function(a){if(!a||a==1)return a;var b=.45,d=.1125;return(a*=2)<1?-.5*c.pow(2,10*(a-=1))*c.sin((a-d)*2*c.PI/b):c.pow(2,-10*(a-=1))*c.sin((a-d)*2*c.PI/b)*.5+1},$EaseInBack:function(a){var b=1.70158;return a*a*((b+1)*a-b)},$EaseOutBack:function(a){var b=1.70158;return(a-=1)*a*((b+1)*a+b)+1},$EaseInOutBack:function(a){var b=1.70158;return(a*=2)<1?1/2*a*a*(((b*=1.525)+1)*a-b):1/2*((a-=2)*a*(((b*=1.525)+1)*a+b)+2)},$EaseInBounce:function(a){return 1-e.$EaseOutBounce(1-a)},$EaseOutBounce:function(a){return a<1/2.75?7.5625*a*a:a<2/2.75?7.5625*(a-=1.5/2.75)*a+.75:a<2.5/2.75?7.5625*(a-=2.25/2.75)*a+.9375:7.5625*(a-=2.625/2.75)*a+.984375},$EaseInOutBounce:function(a){return a<1/2?e.$EaseInBounce(a*2)*.5:e.$EaseOutBounce(a*2-1)*.5+.5},$EaseGoBack:function(a){return 1-c.abs(2-1)},$EaseInWave:function(a){return 1-c.cos(a*c.PI*2)},$EaseOutWave:function(a){return c.sin(a*c.PI*2)},$EaseOutJump:function(a){return 1-((a*=2)<1?(a=1-a)*a*a:(a-=1)*a*a)},$EaseInJump:function(a){return(a*=2)<1?a*a*a:(a=2-a)*a*a}},h=k.$Jease$={$Swing:e.$EaseSwing,$Linear:e.$EaseLinear,$InQuad:e.$EaseInQuad,$OutQuad:e.$EaseOutQuad,$InOutQuad:e.$EaseInOutQuad,$InCubic:e.$EaseInCubic,$OutCubic:e.$EaseOutCubic,$InOutCubic:e.$EaseInOutCubic,$InQuart:e.$EaseInQuart,$OutQuart:e.$EaseOutQuart,$InOutQuart:e.$EaseInOutQuart,$InQuint:e.$EaseInQuint,$OutQuint:e.$EaseOutQuint,$InOutQuint:e.$EaseInOutQuint,$InSine:e.$EaseInSine,$OutSine:e.$EaseOutSine,$InOutSine:e.$EaseInOutSine,$InExpo:e.$EaseInExpo,$OutExpo:e.$EaseOutExpo,$InOutExpo:e.$EaseInOutExpo,$InCirc:e.$EaseInCirc,$OutCirc:e.$EaseOutCirc,$InOutCirc:e.$EaseInOutCirc,$InElastic:e.$EaseInElastic,$OutElastic:e.$EaseOutElastic,$InOutElastic:e.$EaseInOutElastic,$InBack:e.$EaseInBack,$OutBack:e.$EaseOutBack,$InOutBack:e.$EaseInOutBack,$InBounce:e.$EaseInBounce,$OutBounce:e.$EaseOutBounce,$InOutBounce:e.$EaseInOutBounce,$GoBack:e.$EaseGoBack,$InWave:e.$EaseInWave,$OutWave:e.$EaseOutWave,$OutJump:e.$EaseOutJump,$InJump:e.$EaseInJump};var b=new function(){var h=this,Ab=/\S+/g,L=1,jb=2,nb=3,mb=4,rb=5,M,s=0,i=0,t=0,z=0,A=0,D=navigator,vb=D.appName,o=D.userAgent,q=parseFloat;function Jb(){if(!M){M={Wf:"ontouchstart"in k||"createTouch"in f};var a;if(D.pointerEnabled||(a=D.msPointerEnabled))M.ld=a?"msTouchAction":"touchAction"}return M}function v(h){if(!s){s=-1;if(vb=="Microsoft Internet Explorer"&&!!k.attachEvent&&!!k.ActiveXObject){var e=o.indexOf("MSIE");s=L;t=q(o.substring(e+5,o.indexOf(";",e)));/*@cc_on z=@_jscript_version@*/;i=f.documentMode||t}else if(vb=="Netscape"&&!!k.addEventListener){var d=o.indexOf("Firefox"),b=o.indexOf("Safari"),g=o.indexOf("Chrome"),c=o.indexOf("AppleWebKit");if(d>=0){s=jb;i=q(o.substring(d+8))}else if(b>=0){var j=o.substring(0,b).lastIndexOf("/");s=g>=0?mb:nb;i=q(o.substring(j+1,b))}else{var a=/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/i.exec(o);if(a){s=L;i=t=q(a[1])}}if(c>=0)A=q(o.substring(c+12))}else{var a=/(opera)(?:.*version|)[ \/]([\w.]+)/i.exec(o);if(a){s=rb;i=q(a[2])}}}return h==s}function r(){return v(L)}function T(){return r()&&(i<6||f.compatMode=="BackCompat")}function lb(){return v(nb)}function qb(){return v(rb)}function gb(){return lb()&&A>534&&A<535}function H(){v();return A>537||i>42||s==L&&i>=11}function R(){return r()&&i<9}function hb(a){var b,c;return function(f){if(!b){b=d;var e=a.substr(0,1).toUpperCase()+a.substr(1);n([a].concat(["WebKit","ms","Moz","O","webkit"]),function(h,d){var b=a;if(d)b=h+e;if(f.style[b]!=g)return c=b})}return c}}function fb(b){var a;return function(c){a=a||hb(b)(c)||b;return a}}var N=fb("transform");function ub(a){return{}.toString.call(a)}var K;function Gb(){if(!K){K={};n(["Boolean","Number","String","Function","Array","Date","RegExp","Object"],function(a){K["[object "+a+"]"]=a.toLowerCase()})}return K}function n(b,d){var a,c;if(ub(b)=="[object Array]"){for(a=0;a-1;f--){var d=c[f],e=ab(i);x(e,x(d));b.cc(e,d.style.cssText);b.Wb(e,d);b.Ab(d)}return a};function Hb(a){var l=this,p="",r=["av","pv","ds","dn"],e=[],q,k=0,i=0,d=0;function j(){J(a,q,e[d||k||i&2||i]);b.X(a,"pointer-events",d?"none":"")}function c(){k=0;j();h.J(f,"mouseup",c);h.J(f,"touchend",c);h.J(f,"touchcancel",c)}function o(a){if(d)h.Kb(a);else{k=4;j();h.e(f,"mouseup",c);h.e(f,"touchend",c);h.e(f,"touchcancel",c)}}l.Qc=function(a){if(a===g)return i;i=a&2||a&1;j()};l.$Enable=function(a){if(a===g)return!d;d=a?0:3;j()};l.$Elmt=a=h.nb(a);var m=b.gg(x(a));if(m)p=m.shift();n(r,function(a){e.push(p+a)});q=eb(" ",e);e.unshift("");h.e(a,"mousedown",o);h.e(a,"touchstart",o)}h.Lb=function(a){return new Hb(a)};h.X=G;h.hb=m("overflow");h.z=m("top",2);h.v=m("left",2);h.k=m("width",2);h.m=m("height",2);h.Af=m("marginLeft",2);h.Qf=m("marginTop",2);h.D=m("position");h.V=m("display");h.E=m("zIndex",1);h.yb=function(b,a,c){if(a!=g)Fb(b,a,c);else return Db(b)};h.cc=function(a,b){if(b!=g)a.style.cssText=b;else return a.style.cssText};var X={$Opacity:h.yb,$Top:h.z,$Left:h.v,P:h.k,O:h.m,Db:h.D,Ih:h.V,$ZIndex:h.E};function w(f,l){var e=R(),b=H(),d=gb(),i=N(f);function k(b,d,a){var e=b.gb(p(-d/2,-a/2)),f=b.gb(p(d/2,-a/2)),g=b.gb(p(d/2,a/2)),h=b.gb(p(-d/2,a/2));b.gb(p(300,300));return p(c.min(e.x,f.x,g.x,h.x)+d/2,c.min(e.y,f.y,g.y,h.y)+a/2)}function a(d,a){a=a||{};var f=a.$TranslateZ||0,l=(a.$RotateX||0)%360,m=(a.$RotateY||0)%360,o=(a.$Rotate||0)%360,p=a.Jh;if(e){f=0;l=0;m=0;p=0}var c=new Cb(a.$TranslateX,a.$TranslateY,f);c.$RotateX(l);c.$RotateY(m);c.Wd(o);c.Ud(a.$SkewX,a.$SkewY);c.$Scale(a.$ScaleX,a.$ScaleY,p);if(b){c.$Move(a.Eb,a.Bb);d.style[i]=c.Oe()}else if(!z||z<9){var j="";if(o||a.$ScaleX!=g&&a.$ScaleX!=1||a.$ScaleY!=g&&a.$ScaleY!=1){var n=k(c,a.$OriginalWidth,a.$OriginalHeight);h.Qf(d,n.y);h.Af(d,n.x);j=c.Ne()}var r=d.style.filter,s=new RegExp(/[\s]*progid:DXImageTransform\.Microsoft\.Matrix\([^\)]*\)/g),q=C(r,[s],j);U(d,q)}}w=function(e,c){c=c||{};var i=c.Eb,k=c.Bb,f;n(X,function(a,b){f=c[b];f!==g&&a(e,f)});h.eg(e,c.$Clip);if(!b){i!=g&&h.v(e,c.Uc+i);k!=g&&h.z(e,c.Vc+k)}if(c.Le)if(d)yb(h.G(j,P,e,c));else a(e,c)};h.Cb=P;if(d)h.Cb=w;if(e)h.Cb=a;else if(!b)a=P;h.I=w;w(f,l)}h.Cb=w;h.I=w;function Cb(k,l,p){var d=this,b=[1,0,0,0,0,1,0,0,0,0,1,0,k||0,l||0,p||0,1],i=c.sin,h=c.cos,m=c.tan;function f(a){return a*c.PI/180}function o(a,b){return{x:a,y:b}}function n(b,c,f,g,i,l,n,o,q,t,u,w,y,A,C,F,a,d,e,h,j,k,m,p,r,s,v,x,z,B,D,E){return[b*a+c*j+f*r+g*z,b*d+c*k+f*s+g*B,b*e+c*m+f*v+g*D,b*h+c*p+f*x+g*E,i*a+l*j+n*r+o*z,i*d+l*k+n*s+o*B,i*e+l*m+n*v+o*D,i*h+l*p+n*x+o*E,q*a+t*j+u*r+w*z,q*d+t*k+u*s+w*B,q*e+t*m+u*v+w*D,q*h+t*p+u*x+w*E,y*a+A*j+C*r+F*z,y*d+A*k+C*s+F*B,y*e+A*m+C*v+F*D,y*h+A*p+C*x+F*E]}function e(c,a){return n.apply(j,(a||b).concat(c))}d.$Scale=function(a,c,d){if(a==g)a=1;if(c==g)c=1;if(d==g)d=1;if(a!=1||c!=1||d!=1)b=e([a,0,0,0,0,c,0,0,0,0,d,0,0,0,0,1])};d.$Move=function(a,c,d){b[12]+=a||0;b[13]+=c||0;b[14]+=d||0};d.$RotateX=function(c){if(c){a=f(c);var d=h(a),g=i(a);b=e([1,0,0,0,0,d,g,0,0,-g,d,0,0,0,0,1])}};d.$RotateY=function(c){if(c){a=f(c);var d=h(a),g=i(a);b=e([d,0,-g,0,0,1,0,0,g,0,d,0,0,0,0,1])}};d.Wd=function(c){if(c){a=f(c);var d=h(a),g=i(a);b=e([d,g,0,0,-g,d,0,0,0,0,1,0,0,0,0,1])}};d.Ud=function(a,c){if(a||c){k=f(a);l=f(c);b=e([1,m(l),0,0,m(k),1,0,0,0,0,1,0,0,0,0,1])}};d.gb=function(c){var a=e(b,[1,0,0,0,0,1,0,0,0,0,1,0,c.x,c.y,0,1]);return o(a[12],a[13])};d.Oe=function(){return"matrix3d("+b.join(",")+")"};d.Ne=function(){return"progid:DXImageTransform.Microsoft.Matrix(M11="+b[0]+", M12="+b[4]+", M21="+b[1]+", M22="+b[5]+", SizingMethod='auto expand')"}}new(function(){var a=this;function b(d,g){for(var j=d[0].length,i=d.length,h=g[0].length,f=[],c=0;c=e||j<=f))j=((j-f)%p+p)%p+f;if(!D||v||g!=j){var k=c.min(j,e);k=c.max(k,f);if(!D||v||k!=m){if(J){var l=(k-i)/(C||1);if(h.$Reverse)l=1-l;var n=b.Yc(O,J,l,H,G,I,h);if(x)b.a(n,function(b,a){x[a]&&x[a](L,b)});else b.I(L,n)}a.oc(m-i,k-i);m=k;b.a(w,function(b,c){var a=o=n*o)a=n;u(a);if(!v&&a*o>=n*o)M(B);else r(K)}}function t(h,i,j){if(!q){q=d;v=j;B=i;h=c.max(h,f);h=c.min(h,e);n=h;o=n=0&&c=0&&h=0&&c=0&&df||d>h){switch(e){case j:case m:a++;break;case k:case l:case o:case i:b++;break;case p:case n:default:a--}if(a<0||b<0||a>f||b>h){switch(e){case j:case m:a=f;b++;break;case o:case i:b=h;a++;break;case k:case l:b=h;a--;break;case p:case n:default:a=0;b++}if(b>h)b=h;else if(b<0)b=0;else if(a>f)a=f;else if(a<0)a=0}d=b;c=a}}return r};h.$FormationSquare=function(i){var a=i.$Cols||1,b=i.$Rows||1,j=[],d,e,f,h,k;f=ab?(a-b)/2:0;k=c.round(c.max(a/2,b/2))+1;for(d=0;d1||a.$Clip;if(a.$Zoom||a.$Rotate){var H=d;if(b.lb())if(a.$Cols*a.$Rows>1)H=l;else I=l;if(H){e.$Zoom=a.$Zoom?a.$Zoom-1:1;f.$Zoom=1;if(b.lb()||b.Ad())e.$Zoom=c.min(e.$Zoom,2);var N=a.$Rotate||0;e.$Rotate=N*360*(x?-1:1);f.$Rotate=0}}if(I){var h=u.Ib={};if(a.$Clip){var w=a.$ScaleClip||1;if(C&&z){h.$Top=g.O/2*w;h.$Bottom=-h.$Top}else if(C)h.$Bottom=-g.O*w;else if(z)h.$Top=g.O*w;if(B&&A){h.$Left=g.P/2*w;h.$Right=-h.$Left}else if(B)h.$Right=-g.P*w;else if(A)h.$Left=g.P*w}s.$Clip=u;f.$Clip=g[t]}var L=n?1:-1,M=p?1:-1;if(a.x)e.$Left+=o*a.x*L;if(a.y)e.$Top+=m*a.y*M;b.a(e,function(a,c){if(b.Ub(a))if(a!=f[c])s[c]=a-f[c]});v[t]=k?f:e;var D=a.ke,y=c.round(j*a.$Delay/a.$Interval);i[t]=new Array(y);i[t].he=y;i[t].ge=y+D-1;for(var F=0;F<=D;F++){var E=b.Yc(f,s,F/D,a.$Easing,a.$During,a.$Round,{$Move:a.$Move,$OriginalWidth:o,$OriginalHeight:m});E.$ZIndex=E.$ZIndex||1;i[t].push(E)}})});p.reverse();b.a(p,function(a){b.a(a,function(c){var f=c[0],e=c[1],d=f+","+e,a=h;if(e||f)a=b.ab(h);b.I(a,v[d]);b.hb(a,"hidden");b.D(a,"absolute");B.ie(a);n[d]=a;b.C(a,!k)})})}function v(){var b=this,c=0;m.call(b,0,u);b.Nb=function(d,b){if(b-c>h){c=b;a&&a.ac(b);g&&g.ac(b)}};b.wc=r}f.Qd=function(){var a=0,b=t.$Transitions,d=b.length;if(w)a=x++%d;else a=c.floor(c.random()*d);b[a]&&(b[a].bb=a);return b[a]};f.Zd=function(w,x,l,m,b){r=b;b=i(b,h);var j=m.td,e=l.td;j["no-image"]=!m.Hb;e["no-image"]=!l.Hb;var n=j,p=e,v=b,d=b.$Brother||i({},h);if(!b.$SlideOut){n=e;p=j}var t=d.$Shift||0;g=new o(k,p,d,c.max(t-d.$Interval,0),s,q);a=new o(k,n,v,c.max(d.$Interval-t,0),s,q);g.ac(0);a.ac(0);u=c.max(g.jd,a.jd);f.bb=w};f.tb=function(){k.tb();g=j;a=j};f.Qe=function(){var b=j;if(a)b=new v;return b};if(b.lb()||b.Ad()||y&&b.lf()<537)h=16;n.call(f);m.call(f,-1e7,1e7)};var i=k.$JssorSlider$=function(p,hc){var h=this;function Fc(){var a=this;m.call(a,-1e8,2e8);a.Je=function(){var b=a.pb(),d=c.floor(b),f=t(d),e=b-c.floor(b);return{bb:f,Me:d,Db:e}};a.Nb=function(b,a){var e=c.floor(a);if(e!=a&&a>b)e++;Wb(e,d);h.l(i.$EVT_POSITION_CHANGE,t(a),t(b),a,b)}}function Ec(){var a=this;m.call(a,0,0,{od:r});b.a(C,function(b){D&1&&b.Ge(r);a.pc(b);b.$Shift(fb/dc)})}function Dc(){var a=this,b=Vb.$Elmt;m.call(a,-1,2,{$Easing:e.$EaseLinear,te:{Db:bc},od:r},b,{Db:1},{Db:-2});a.Pb=b}function rc(o,n){var b=this,e,f,g,k,c;m.call(b,-1e8,2e8,{Kc:100});b.Rc=function(){O=d;R=j;h.l(i.$EVT_SWIPE_START,t(w.W()),w.W())};b.Mc=function(){O=l;k=l;var a=w.Je();h.l(i.$EVT_SWIPE_END,t(w.W()),w.W());!a.Db&&Hc(a.Me,s)};b.Nb=function(i,h){var b;if(k)b=c;else{b=f;if(g){var d=h/g;b=a.$SlideEasing(d)*(f-e)+e}}w.u(b)};b.Sb=function(a,d,c,h){e=a;f=d;g=c;w.u(a);b.u(0);b.Gc(c,h)};b.ve=function(a){k=d;c=a;b.$Play(a,j,d)};b.ye=function(a){c=a};w=new Fc;w.wb(o);w.wb(n)}function sc(){var c=this,a=Zb();b.E(a,0);b.X(a,"pointerEvents","none");c.$Elmt=a;c.ie=function(c){b.H(a,c);b.C(a)};c.tb=function(){b.K(a);b.tc(a)}}function Bc(k,f){var e=this,q,H,x,o,y=[],w,B,W,G,Q,F,g,v,p;m.call(e,-u,u+1,{});function E(a){q&&q.Bd();T(k,a,0);F=d;q=new I.$Class(k,I,b.mg(b.j(k,"idle"))||qc);q.u(0)}function Y(){q.ncK||c>J)){var j=l,q=K/J*c/g;if(a.$FillMode&1)j=q>1;else if(a.$FillMode&2)j=q<1;m=j?g*J/c:K;k=j?J:c*K/g}b.k(o,m);b.m(o,k);b.z(o,(J-k)/2);b.v(o,(K-m)/2)}b.D(o,"absolute");h.l(i.$EVT_LOAD_END,f)}}b.K(r);p&&p(e)}function X(b,c,d,g){if(g==R&&s==f&&P)if(!Gc){var a=t(b);A.Zd(a,f,c,e,d);c.De();U.$Shift(a-U.mc()-1);U.u(a);z.Sb(b,b,0)}}function ab(b){if(b==R&&s==f){if(!g){var a=j;if(A)if(A.bb==f)a=A.Qe();else A.tb();Y();g=new zc(k,f,a,q);g.Md(p)}!g.$IsPlaying()&&g.hc()}}function S(d,h,l){if(d==f){if(d!=h)C[h]&&C[h].Ee();else!l&&g&&g.Fe();p&&p.$Enable();var m=R=b.L();e.xb(b.G(j,ab,m))}else{var k=c.min(f,d),i=c.max(f,d),o=c.min(i-k,k+r-i),n=u+a.$LazyLoading-1;(!Q||o<=n)&&e.xb()}}function bb(){if(s==f&&g){g.kb();p&&p.$Quit();p&&p.$Disable();g.gd()}}function db(){s==f&&g&&g.kb()}function Z(a){!M&&h.l(i.$EVT_CLICK,f,a)}function O(){p=v.pInstance;g&&g.Md(p)}e.xb=function(c,a){a=a||x;if(y.length&&!G){b.C(a);if(!W){W=d;h.l(i.$EVT_LOAD_START,f);b.a(y,function(a){if(!b.A(a,"src")){a.src=b.j(a,"src2");b.V(a,a["display-origin"])}})}b.pg(y,o,b.G(j,N,c,a))}else N(c,a)};e.We=function(){var h=f;if(a.$AutoPlaySteps<0)h-=r;var d=h+a.$AutoPlaySteps*xc;if(D&2)d=t(d);if(!(D&1))d=c.max(0,c.min(d,r-u));if(d!=f){if(A){var e=A.Qd(r);if(e){var i=R=b.L(),g=C[t(d)];return g.xb(b.G(j,X,d,g,e,i),x)}}nb(d)}};e.zc=function(){S(f,f,d)};e.Ee=function(){p&&p.$Quit();p&&p.$Disable();e.Ic();g&&g.ae();g=j;E()};e.De=function(){b.K(k)};e.Ic=function(){b.C(k)};e.Rd=function(){p&&p.$Enable()};function T(a,c,e){if(b.A(a,"jssor-slider"))return;if(!F){if(a.tagName=="IMG"){y.push(a);if(!b.A(a,"src")){Q=d;a["display-origin"]=b.V(a);b.K(a)}}b.lb()&&b.E(a,(b.E(a)||0)+1)}var f=b.zb(a);b.a(f,function(f){var h=f.tagName,i=b.j(f,"u");if(i=="player"&&!v){v=f;if(v.pInstance)O();else b.e(v,"dataavailable",O)}if(i=="caption"){if(c){b.Jc(f,b.j(f,"to"));b.zf(f,b.j(f,"bf"));b.j(f,"3d")&&b.yf(f,"preserve-3d")}else if(!b.Ld()){var g=b.ab(f,l,d);b.Wb(g,f,a);b.Ab(f,a);f=g;c=d}}else if(!F&&!e&&!o){if(h=="A"){if(b.j(f,"u")=="image")o=b.Jg(f,"IMG");else o=b.B(f,"image",d);if(o){w=f;b.V(w,"block");b.I(w,V);B=b.ab(w,d);b.D(w,"relative");b.yb(B,0);b.X(B,"backgroundColor","#000")}}else if(h=="IMG"&&b.j(f,"u")=="image")o=f;if(o){o.border=0;b.I(o,V)}}T(f,c,e+1)})}e.oc=function(c,b){var a=u-b;bc(H,a)};e.bb=f;n.call(e);b.xf(k,b.j(k,"p"));b.qf(k,b.j(k,"po"));var L=b.B(k,"thumb",d);if(L){e.ce=b.ab(L);b.K(L)}b.C(k);x=b.ab(cb);b.E(x,1e3);b.e(k,"click",Z);E(d);e.Hb=o;e.Pc=B;e.td=k;e.Pb=H=k;b.H(H,x);h.$On(203,S);h.$On(28,db);h.$On(24,bb)}function zc(y,f,p,q){var a=this,n=0,u=0,g,j,e,c,k,t,r,o=C[f];m.call(a,0,0);function v(){b.tc(N);fc&&k&&o.Pc&&b.H(N,o.Pc);b.C(N,!k&&o.Hb)}function w(){a.hc()}function x(b){r=b;a.kb();a.hc()}a.hc=function(){var b=a.pb();if(!B&&!O&&!r&&s==f){if(!b){if(g&&!k){k=d;a.gd(d);h.l(i.$EVT_SLIDESHOW_START,f,n,u,g,c)}v()}var l,p=i.$EVT_STATE_CHANGE;if(b!=c)if(b==e)l=c;else if(b==j)l=e;else if(!b)l=j;else l=a.Fd();h.l(p,f,b,n,j,e,c);var m=P&&(!E||F);if(b==c)(e!=c&&!(E&12)||m)&&o.We();else(m||b!=e)&&a.Gc(l,w)}};a.Fe=function(){e==c&&e==a.pb()&&a.u(j)};a.ae=function(){A&&A.bb==f&&A.tb();var b=a.pb();b=g){k=l;v();o.Ic();A.tb();h.l(i.$EVT_SLIDESHOW_END,f,n,u,g,c)}h.l(i.$EVT_PROGRESS_CHANGE,f,a,n,j,e,c)};a.Md=function(a){if(a&&!t){t=a;a.$On($JssorPlayer$.we,x)}};p&&a.pc(p);g=a.Yb();a.pc(q);j=g+q.cd;e=g+q.id;c=a.Yb()}function Mb(a,c,d){b.v(a,c);b.z(a,d)}function bc(c,b){var a=x>0?x:gb,d=Bb*b*(a&1),e=Cb*b*(a>>1&1);Mb(c,d,e)}function Rb(){pb=O;Kb=z.Fd();G=w.W()}function ic(){Rb();if(B||!F&&E&12){z.kb();h.l(i.kg)}}function gc(f){if(!B&&(F||!(E&12))&&!z.$IsPlaying()){var d=w.W(),b=c.ceil(G);if(f&&c.abs(H)>=a.$MinDragOffsetToSlide){b=c.ceil(d);b+=eb}if(!(D&1))b=c.min(r-u,c.max(b,0));var e=c.abs(b-d);e=1-c.pow(1-e,5);if(!M&&pb)z.Ce(Kb);else if(d==b){tb.Rd();tb.zc()}else z.Sb(d,b,e*Xb)}}function Ib(a){!b.j(b.kc(a),"nodrag")&&b.Kb(a)}function vc(a){ac(a,1)}function ac(a,c){a=b.Dd(a);var k=b.kc(a);if(!L&&!b.j(k,"nodrag")&&wc()&&(!c||a.touches.length==1)){B=d;Ab=l;R=j;b.e(f,c?"touchmove":"mousemove",Db);b.L();M=0;ic();if(!pb)x=0;if(c){var g=a.touches[0];vb=g.clientX;wb=g.clientY}else{var e=b.Kd(a);vb=e.x;wb=e.y}H=0;bb=0;eb=0;h.l(i.$EVT_DRAG_START,t(G),G,a)}}function Db(e){if(B){e=b.Dd(e);var f;if(e.type!="mousemove"){var l=e.touches[0];f={x:l.clientX,y:l.clientY}}else f=b.Kd(e);if(f){var j=f.x-vb,k=f.y-wb;if(c.floor(G)!=G)x=x||gb&L;if((j||k)&&!x){if(L==3)if(c.abs(k)>c.abs(j))x=2;else x=1;else x=L;if(jb&&x==1&&c.abs(k)-c.abs(j)>3)Ab=d}if(x){var a=k,i=Cb;if(x==1){a=j;i=Bb}if(!(D&1)){if(a>0){var g=i*s,h=a-g;if(h>0)a=g+c.sqrt(h)*5}if(a<0){var g=i*(r-u-s),h=-a-g;if(h>0)a=-g-c.sqrt(h)*5}}if(H-bb<-2)eb=0;else if(H-bb>2)eb=-1;bb=H;H=a;sb=G-H/i/(Z||1);if(H&&x&&!Ab){b.Kb(e);if(!O)z.ve(sb);else z.ye(sb)}}}}}function mb(){tc();if(B){B=l;b.L();b.J(f,"mousemove",Db);b.J(f,"touchmove",Db);M=H;z.kb();var a=w.W();h.l(i.$EVT_DRAG_END,t(a),a,t(G),G);E&12&&Rb();gc(d)}}function mc(c){if(M){b.rf(c);var a=b.kc(c);while(a&&v!==a){a.tagName=="A"&&b.Kb(c);try{a=a.parentNode}catch(d){break}}}}function Lb(a){C[s];s=t(a);tb=C[s];Wb(a);return s}function Hc(a,b){x=0;Lb(a);h.l(i.$EVT_PARK,t(a),b)}function Wb(a,c){yb=a;b.a(S,function(b){b.Dc(t(a),a,c)})}function wc(){var b=i.Zc||0,a=Y;if(jb)a&1&&(a&=1);i.Zc|=a;return L=a&~b}function tc(){if(L){i.Zc&=~Y;L=0}}function Zb(){var a=b.eb();b.I(a,V);b.D(a,"absolute");return a}function t(a){return(a%r+r)%r}function nc(b,d){if(d)if(!D){b=c.min(c.max(b+yb,0),r-u);d=l}else if(D&2){b=t(b+yb);d=l}nb(b,a.$SlideDuration,d)}function zb(){b.a(S,function(a){a.gc(a.Tb.$ChanceToShow<=F)})}function kc(){if(!F){F=1;zb();if(!B){E&12&&gc();E&3&&C[s].zc()}}}function jc(){if(F){F=0;zb();B||!(E&12)||ic()}}function lc(){V={P:K,O:J,$Top:0,$Left:0};b.a(T,function(a){b.I(a,V);b.D(a,"absolute");b.hb(a,"hidden");b.K(a)});b.I(cb,V)}function lb(b,a){nb(b,a,d)}function nb(h,f,k){if(Tb&&(!B&&(F||!(E&12))||a.$NaviQuitDrag)){O=d;B=l;z.kb();if(f==g)f=Xb;var e=Eb.pb(),b=h;if(k){b=e+h;if(h>0)b=c.ceil(b);else b=c.floor(b)}if(D&2)b=t(b);if(!(D&1))b=c.max(0,c.min(b,r-u));var j=(b-e)%r;b=e+j;var i=e==b?0:f*c.abs(j);i=c.min(i,f*u*1.5);z.Sb(e,b,i||1)}}h.$PlayTo=nb;h.$GoTo=function(a){w.u(Lb(a))};h.$Next=function(){lb(1)};h.$Prev=function(){lb(-1)};h.$Pause=function(){P=l};h.$Play=function(){if(!P){P=d;C[s]&&C[s].zc()}};h.$SetSlideshowTransitions=function(b){a.$SlideshowOptions.$Transitions=b};h.$SetCaptionTransitions=function(a){I.$Transitions=a;I.nc=b.L()};h.$SlidesCount=function(){return T.length};h.$CurrentIndex=function(){return s};h.$IsAutoPlaying=function(){return P};h.$IsDragging=function(){return B};h.$IsSliding=function(){return O};h.$IsMouseOver=function(){return!F};h.$LastDragSucceded=function(){return M};function X(){return b.k(y||p)}function ib(){return b.m(y||p)}h.$OriginalWidth=h.$GetOriginalWidth=X;h.$OriginalHeight=h.$GetOriginalHeight=ib;function Gb(c,d){if(c==g)return b.k(p);if(!y){var a=b.eb(f);b.ad(a,b.ad(p));b.cc(a,b.cc(p));b.V(a,"block");b.D(a,"relative");b.z(a,0);b.v(a,0);b.hb(a,"visible");y=b.eb(f);b.D(y,"absolute");b.z(y,0);b.v(y,0);b.k(y,b.k(p));b.m(y,b.m(p));b.Jc(y,"0 0");b.H(y,a);var i=b.zb(p);b.H(p,y);b.X(p,"backgroundImage","");b.a(i,function(c){b.H(b.j(c,"noscale")?p:a,c);b.j(c,"autocenter")&&Nb.push(c)})}Z=c/(d?b.m:b.k)(y);b.pf(y,Z);var h=d?Z*X():c,e=d?c:Z*ib();b.k(p,h);b.m(p,e);b.a(Nb,function(a){var c=b.vc(b.j(a,"autocenter"));b.wg(a,c)})}h.$ScaleHeight=h.$GetScaleHeight=function(a){if(a==g)return b.m(p);Gb(a,d)};h.$ScaleWidth=h.$SetScaleWidth=h.$GetScaleWidth=Gb;h.kd=function(a){var d=c.ceil(t(fb/dc)),b=t(a-s+d);if(b>u){if(a-s>r/2)a-=r;else if(a-s<=-r/2)a+=r}else a=s+b-d;return a};n.call(h);h.$Elmt=p=b.nb(p);var a=b.p({$FillMode:0,$LazyLoading:1,$ArrowKeyNavigation:1,$StartIndex:0,$AutoPlay:l,$Loop:1,$HWA:d,$NaviQuitDrag:d,$AutoPlaySteps:1,$AutoPlayInterval:3e3,$PauseOnHover:1,$SlideDuration:500,$SlideEasing:e.$EaseOutQuad,$MinDragOffsetToSlide:20,$SlideSpacing:0,$Cols:1,$Align:0,$UISearchMode:1,$PlayOrientation:1,$DragOrientation:1},hc);a.$HWA=a.$HWA&&b.nf();if(a.$Idle!=g)a.$AutoPlayInterval=a.$Idle;if(a.$ParkingPosition!=g)a.$Align=a.$ParkingPosition;var gb=a.$PlayOrientation&3,xc=(a.$PlayOrientation&4)/-4||1,db=a.$SlideshowOptions,I=b.p({$Class:q,$PlayInMode:1,$PlayOutMode:1,$HWA:a.$HWA},a.$CaptionSliderOptions);I.$Transitions=I.$Transitions||I.$CaptionTransitions;var qb=a.$BulletNavigatorOptions,W=a.$ArrowNavigatorOptions,ab=a.$ThumbnailNavigatorOptions,Q=!a.$UISearchMode,y,v=b.B(p,"slides",Q),cb=b.B(p,"loading",Q)||b.eb(f),Jb=b.B(p,"navigator",Q),ec=b.B(p,"arrowleft",Q),cc=b.B(p,"arrowright",Q),Hb=b.B(p,"thumbnavigator",Q),pc=b.k(v),oc=b.m(v),V,T=[],yc=b.zb(v);b.a(yc,function(a){if(a.tagName=="DIV"&&!b.j(a,"u"))T.push(a);else b.lb()&&b.E(a,(b.E(a)||0)+1)});var s=-1,yb,tb,r=T.length,K=a.$SlideWidth||pc,J=a.$SlideHeight||oc,Yb=a.$SlideSpacing,Bb=K+Yb,Cb=J+Yb,dc=gb&1?Bb:Cb,u=c.min(a.$Cols,r),hb,x,L,Ab,S=[],Sb,Ub,Qb,fc,Gc,P,E=a.$PauseOnHover,qc=a.$AutoPlayInterval,Xb=a.$SlideDuration,rb,ub,fb,Tb=u1&&rb&&(!b.Ld()||b.Hd()>=8)}fb=ub||u>=r||!(D&1)?0:a.$Align;Y=(u>1||fb?gb:-1)&a.$DragOrientation;var xb=v,C=[],A,N,Fb=b.kf(),jb=Fb.Wf,G,pb,Kb,sb;Fb.ld&&b.X(xb,Fb.ld,([j,"pan-y","pan-x","none"])[Y]||"");U=new Dc;if(ub)A=new rb(Vb,K,J,db,jb);b.H(hb,U.Pb);b.hb(v,"hidden");N=Zb();b.X(N,"backgroundColor","#000");b.yb(N,0);b.Wb(N,xb.firstChild,xb);for(var ob=0;ob=q-h.$Cols);r=c}c.Dc=function(b,a,c){if(c)e=a;else{e=b;p(r)}};c.gc=p;var m;c.yc=function(c){q=c;e=0;if(!m){b.e(a,"click",b.G(j,k,-i));b.e(g,"click",b.G(j,k,i));b.Lb(a);b.Lb(g);m=d}};c.Tb=f=b.p({$Steps:1},h);i=f.$Steps;if(f.$Scale==l){b.A(a,"noscale",d);b.A(g,"noscale",d)}if(f.$AutoCenter){b.A(a,"autocenter",f.$AutoCenter);b.A(g,"autocenter",f.$AutoCenter)}};k.$JssorThumbnailNavigator$=function(g,B){var h=this,y,p,a,v=[],z,x,e,q,r,u,t,m,s,f,k;n.call(h);g=b.nb(g);function A(n,f){var g=this,c,m,l;function q(){m.Qc(p==f)}function i(d){if(d||!s.$LastDragSucceded()){var a=e-f%e,b=s.kd((f+a)/e-1),c=b*e+e-a;h.l(o.Vb,c)}}g.bb=f;g.md=q;l=n.ce||n.Hb||b.eb();g.Pb=c=b.Hc(k,"thumbnailtemplate",l,d);m=b.Lb(c);a.$ActionMode&1&&b.e(c,"click",b.G(j,i,0));a.$ActionMode&2&&b.e(c,"mouseover",b.Jb(b.G(j,i,1),c))}h.Dc=function(b,d,f){var a=p;p=b;a!=-1&&v[a].md();v[b].md();!f&&s.$PlayTo(s.kd(c.floor(d/e)))};h.gc=function(a){b.C(g,a)};var w;h.yc=function(F,D){if(!w){y=F;c.ceil(y/e);p=-1;m=c.min(m,D.length);var h=a.$Orientation&1,n=u+(u+q)*(e-1)*(1-h),k=t+(t+r)*(e-1)*h,B=n+(n+q)*(m-1)*h,o=k+(k+r)*(m-1)*(1-h);b.D(f,"absolute");b.hb(f,"hidden");a.$AutoCenter&1&&b.v(f,(z-B)/2);a.$AutoCenter&2&&b.z(f,(x-o)/2);b.k(f,B);b.m(f,o);var j=[];b.a(D,function(l,g){var i=new A(l,g),d=i.Pb,a=c.floor(g/e),k=g%e;b.v(d,(u+q)*k*(1-h));b.z(d,(t+r)*k*h);if(!j[a]){j[a]=b.eb();b.H(f,j[a])}b.H(j[a],d);v.push(i)});var E=b.p({$AutoPlay:l,$NaviQuitDrag:l,$SlideWidth:n,$SlideHeight:k,$SlideSpacing:q*h+r*(1-h),$MinDragOffsetToSlide:12,$SlideDuration:200,$PauseOnHover:1,$PlayOrientation:a.$Orientation,$DragOrientation:a.$NoDrag||a.$DisableDrag?0:a.$Orientation},a);s=new i(g,E);w=d}};h.Tb=a=b.p({$SpacingX:0,$SpacingY:0,$Cols:1,$Orientation:1,$AutoCenter:3,$ActionMode:1},B);z=b.k(g);x=b.m(g);f=b.B(g,"slides",d);k=b.B(f,"prototype");u=b.k(k);t=b.m(k);b.Ab(k,f);e=a.$Rows||1;q=a.$SpacingX;r=a.$SpacingY;m=a.$Cols;a.$Scale==l&&b.A(g,"noscale",d)};function q(e,d,c){var a=this;m.call(a,0,c);a.Bd=b.Tc;a.cd=0;a.id=c}k.$JssorCaptionSlideo$=function(n,f,l){var a=this,o,g={},i=f.$Transitions,c=new m(0,0);m.call(a,0,0);function j(d,c){var a={};b.a(d,function(d,f){var e=g[f];if(e){if(b.Eg(d))d=j(d,c||f=="e");else if(c)if(b.Ub(d))d=o[d];a[e]=d}});return a}function k(e,c){var a=[],d=b.zb(e);b.a(d,function(d){var h=b.j(d,"u")=="caption";if(h){var e=b.j(d,"t"),g=i[b.vc(e)]||i[e],f={$Elmt:d,wc:g};a.push(f)}if(c<5)a=a.concat(k(d,c+1))});return a}function r(d,e,a){b.a(e,function(g){var e=j(g),f=b.jc(e.$Easing);if(e.$Left){e.Eb=e.$Left;f.Eb=f.$Left;delete e.$Left}if(e.$Top){e.Bb=e.$Top;f.Bb=f.$Top;delete e.$Top}var h={$Easing:f,$OriginalWidth:a.P,$OriginalHeight:a.O},i=new m(g.b,g.d,h,d,a,e);c.wb(i);a=b.Ue(a,e)});return a}function q(a){b.a(a,function(f){var a=f.$Elmt,e=b.k(a),d=b.m(a),c={$Left:b.v(a),$Top:b.z(a),Eb:0,Bb:0,$Opacity:1,$ZIndex:b.E(a)||0,$Rotate:0,$RotateX:0,$RotateY:0,$ScaleX:1,$ScaleY:1,$TranslateX:0,$TranslateY:0,$TranslateZ:0,$SkewX:0,$SkewY:0,P:e,O:d,$Clip:{$Top:0,$Right:e,$Bottom:d,$Left:0}};c.Uc=c.$Left;c.Vc=c.$Top;r(a,f.wc,c)})}function t(g,f,h){var e=g.b-f;if(e){var b=new m(f,e);b.wb(c,d);b.$Shift(h);a.wb(b)}a.He(g.d);return e}function s(f){var d=c.mc(),e=0;b.a(f,function(c,f){c=b.p({d:l},c);t(c,d,e);d=c.b;e+=c.d;if(!f||c.t==2){a.cd=d;a.id=d+c.d}})}a.Bd=function(){a.u(-1,d)};o=[h.$Swing,h.$Linear,h.$InQuad,h.$OutQuad,h.$InOutQuad,h.$InCubic,h.$OutCubic,h.$InOutCubic,h.$InQuart,h.$OutQuart,h.$InOutQuart,h.$InQuint,h.$OutQuint,h.$InOutQuint,h.$InSine,h.$OutSine,h.$InOutSine,h.$InExpo,h.$OutExpo,h.$InOutExpo,h.$InCirc,h.$OutCirc,h.$InOutCirc,h.$InElastic,h.$OutElastic,h.$InOutElastic,h.$InBack,h.$OutBack,h.$InOutBack,h.$InBounce,h.$OutBounce,h.$InOutBounce,h.$GoBack,h.$InWave,h.$OutWave,h.$OutJump,h.$InJump];var u={$Top:"y",$Left:"x",$Bottom:"m",$Right:"t",$Rotate:"r",$RotateX:"rX",$RotateY:"rY",$ScaleX:"sX",$ScaleY:"sY",$TranslateX:"tX",$TranslateY:"tY",$TranslateZ:"tZ",$SkewX:"kX",$SkewY:"kY",$Opacity:"o",$Easing:"e",$ZIndex:"i",$Clip:"c"};b.a(u,function(b,a){g[b]=a});q(k(n,1));c.u(-1);var p=f.$Breaks||[],e=[].concat(p[b.vc(b.j(n,"b"))]||[]);e.push({b:c.Yb(),d:e.length?0:l});s(e);a.u(-1)}})(window,document,Math,null,true,false); (function(root,factory){if(typeof define==='function'&&define.amd){define(['jquery'],factory)}else if(typeof exports==='object'){module.exports=factory(require('jquery'))}else root.lightbox=factory(root.jQuery)}(this,function($){function Lightbox(options){this.album=[];this.currentImageIndex=void(0);this.init();this.options=$.extend({},this.constructor.defaults);this.option(options)};Lightbox.defaults={albumLabel:'Image %1 of %2',alwaysShowNavOnTouchDevices:false,fadeDuration:500,fitImagesInViewport:true,positionFromTop:50,resizeDuration:700,showImageNumberLabel:true,wrapAround:false,disableScrolling:false};Lightbox.prototype.option=function(options){$.extend(this.options,options)};Lightbox.prototype.imageCountLabel=function(currentImageNum,totalImages){return this.options.albumLabel.replace(/%1/g,currentImageNum).replace(/%2/g,totalImages)};Lightbox.prototype.init=function(){this.enable();this.build()};Lightbox.prototype.enable=function(){var self=this;$('body').on('click','a[rel^=lightbox], area[rel^=lightbox], a[data-lightbox], area[data-lightbox]',function(event){self.start($(event.currentTarget));return false})};Lightbox.prototype.build=function(){var self=this;$('
').appendTo($('body'));this.$lightbox=$('#lightbox');this.$overlay=$('#lightboxOverlay');this.$outerContainer=this.$lightbox.find('.lb-outerContainer');this.$container=this.$lightbox.find('.lb-container');this.containerTopPadding=parseInt(this.$container.css('padding-top'),10);this.containerRightPadding=parseInt(this.$container.css('padding-right'),10);this.containerBottomPadding=parseInt(this.$container.css('padding-bottom'),10);this.containerLeftPadding=parseInt(this.$container.css('padding-left'),10);this.$overlay.hide().on('click',function(){self.end();return false});this.$lightbox.hide().on('click',function(event){if($(event.target).attr('id')==='lightbox')self.end();return false});this.$outerContainer.on('click',function(event){if($(event.target).attr('id')==='lightbox')self.end();return false});this.$lightbox.find('.lb-prev').on('click',function(){if(self.currentImageIndex===0){self.changeImage(self.album.length-1)}else self.changeImage(self.currentImageIndex-1);return false});this.$lightbox.find('.lb-next').on('click',function(){if(self.currentImageIndex===self.album.length-1){self.changeImage(0)}else self.changeImage(self.currentImageIndex+1);return false});this.$lightbox.find('.lb-loader, .lb-close').on('click',function(){self.end();return false})};Lightbox.prototype.start=function($link){var self=this,$window=$(window);$window.on('resize',$.proxy(this.sizeOverlay,this));$('select, object, embed').css({visibility:'hidden'});this.sizeOverlay();this.album=[];var imageNumber=0 function addToAlbum($link){self.album.push({link:$link.attr('href'),title:$link.attr('data-title')||$link.attr('title')})};var dataLightboxValue=$link.attr('data-lightbox'),$links;if(dataLightboxValue){$links=$($link.prop('tagName')+'[data-lightbox="'+dataLightboxValue+'"]');for(var i=0;i<$links.length;i=++i){addToAlbum($($links[i]));if($links[i]===$link[0])imageNumber=i}}else if($link.attr('rel')==='lightbox'){addToAlbum($link)}else{$links=$($link.prop('tagName')+'[rel="'+$link.attr('rel')+'"]');for(var j=0;j<$links.length;j=++j){addToAlbum($($links[j]));if($links[j]===$link[0])imageNumber=j}};var top=$window.scrollTop()+this.options.positionFromTop,left=$window.scrollLeft();this.$lightbox.css({top:top+'px',left:left+'px'}).fadeIn(this.options.fadeDuration);if(this.options.disableScrolling)$('body').addClass('lb-disable-scrolling');this.changeImage(imageNumber)};Lightbox.prototype.changeImage=function(imageNumber){var self=this;this.disableKeyboardNav();var $image=this.$lightbox.find('.lb-image');this.$overlay.fadeIn(this.options.fadeDuration);$('.lb-loader').fadeIn('slow');this.$lightbox.find('.lb-image, .lb-nav, .lb-prev, .lb-next, .lb-dataContainer, .lb-numbers, .lb-caption').hide();this.$outerContainer.addClass('animating');var preloader=new Image();preloader.onload=function(){var $preloader,imageHeight,imageWidth,maxImageHeight,maxImageWidth,windowHeight,windowWidth;$image.attr('src',self.album[imageNumber].link);$preloader=$(preloader);$image.width(preloader.width);$image.height(preloader.height);if(self.options.fitImagesInViewport){windowWidth=$(window).width();windowHeight=$(window).height();maxImageWidth=windowWidth-self.containerLeftPadding-self.containerRightPadding-20;maxImageHeight=windowHeight-self.containerTopPadding-self.containerBottomPadding-120;if(self.options.maxWidth&&self.options.maxWidthmaxImageWidth)||(preloader.height>maxImageHeight))if((preloader.width/maxImageWidth)>(preloader.height/maxImageHeight)){imageWidth=maxImageWidth;imageHeight=parseInt(preloader.height/(preloader.width/imageWidth),10);$image.width(imageWidth);$image.height(imageHeight)}else{imageHeight=maxImageHeight;imageWidth=parseInt(preloader.width/(preloader.height/imageHeight),10);$image.width(imageWidth);$image.height(imageHeight)}};self.sizeContainer($image.width(),$image.height())};preloader.src=this.album[imageNumber].link;this.currentImageIndex=imageNumber};Lightbox.prototype.sizeOverlay=function(){this.$overlay.width($(document).width()).height($(document).height())};Lightbox.prototype.sizeContainer=function(imageWidth,imageHeight){var self=this,oldWidth=this.$outerContainer.outerWidth(),oldHeight=this.$outerContainer.outerHeight(),newWidth=imageWidth+this.containerLeftPadding+this.containerRightPadding,newHeight=imageHeight+this.containerTopPadding+this.containerBottomPadding function postResize(){self.$lightbox.find('.lb-dataContainer').width(newWidth);self.$lightbox.find('.lb-prevLink').height(newHeight);self.$lightbox.find('.lb-nextLink').height(newHeight);self.showImage()};if(oldWidth!==newWidth||oldHeight!==newHeight){this.$outerContainer.animate({width:newWidth,height:newHeight},this.options.resizeDuration,'swing',function(){postResize()})}else postResize()};Lightbox.prototype.showImage=function(){this.$lightbox.find('.lb-loader').stop(true).hide();this.$lightbox.find('.lb-image').fadeIn('slow');this.updateNav();this.updateDetails();this.preloadNeighboringImages();this.enableKeyboardNav()};Lightbox.prototype.updateNav=function(){var alwaysShowNav=false;try{document.createEvent('TouchEvent');alwaysShowNav=(this.options.alwaysShowNavOnTouchDevices)?true:false}catch(e){};this.$lightbox.find('.lb-nav').show();if(this.album.length>1)if(this.options.wrapAround){if(alwaysShowNav)this.$lightbox.find('.lb-prev, .lb-next').css('opacity','1');this.$lightbox.find('.lb-prev, .lb-next').show()}else{if(this.currentImageIndex>0){this.$lightbox.find('.lb-prev').show();if(alwaysShowNav)this.$lightbox.find('.lb-prev').css('opacity','1')};if(this.currentImageIndex1&&this.options.showImageNumberLabel){var labelText=this.imageCountLabel(this.currentImageIndex+1,this.album.length);this.$lightbox.find('.lb-number').text(labelText).fadeIn('fast')}else this.$lightbox.find('.lb-number').hide();this.$outerContainer.removeClass('animating');this.$lightbox.find('.lb-dataContainer').fadeIn(this.options.resizeDuration,function(){return self.sizeOverlay()})};Lightbox.prototype.preloadNeighboringImages=function(){if(this.album.length>this.currentImageIndex+1){var preloadNext=new Image();preloadNext.src=this.album[this.currentImageIndex+1].link};if(this.currentImageIndex>0){var preloadPrev=new Image();preloadPrev.src=this.album[this.currentImageIndex-1].link}};Lightbox.prototype.enableKeyboardNav=function(){$(document).on('keyup.keyboard',$.proxy(this.keyboardAction,this))};Lightbox.prototype.disableKeyboardNav=function(){$(document).off('.keyboard')};Lightbox.prototype.keyboardAction=function(event){var KEYCODE_ESC=27,KEYCODE_LEFTARROW=37,KEYCODE_RIGHTARROW=39,keycode=event.keyCode,key=String.fromCharCode(keycode).toLowerCase();if(keycode===KEYCODE_ESC||key.match(/x|o|c/)){this.end()}else if(key==='p'||keycode===KEYCODE_LEFTARROW){if(this.currentImageIndex!==0){this.changeImage(this.currentImageIndex-1)}else if(this.options.wrapAround&&this.album.length>1)this.changeImage(this.album.length-1)}else if(key==='n'||keycode===KEYCODE_RIGHTARROW)if(this.currentImageIndex!==this.album.length-1){this.changeImage(this.currentImageIndex+1)}else if(this.options.wrapAround&&this.album.length>1)this.changeImage(0)};Lightbox.prototype.end=function(){this.disableKeyboardNav();$(window).off('resize',this.sizeOverlay);this.$lightbox.fadeOut(this.options.fadeDuration);this.$overlay.fadeOut(this.options.fadeDuration);$('select, object, embed').css({visibility:'visible'});if(this.options.disableScrolling)$('body').removeClass('lb-disable-scrolling')};return new Lightbox()})); if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1||b[0]>3)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4")}(jQuery),+function(a){"use strict" function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void(0)!==a.style[c])return{end:b[c]};return!1};a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){if(a(b.target).is(this))return b.handleObj.handler.apply(this,arguments)}})})}(jQuery),+function(a){"use strict" function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})};var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.7",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()};var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a("#"===f?[]:f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict" function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})};var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.7",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c).prop(c,!0)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c).prop(c,!1))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")?(c.prop("checked")&&(a=!1),b.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==c.prop("type")&&(c.prop("checked")!==this.$element.hasClass("active")&&(a=!1),this.$element.toggleClass("active")),c.prop("checked",this.$element.hasClass("active")),a&&c.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target).closest(".btn");b.call(d,"toggle"),a(c.target).is('input[type="radio"], input[type="checkbox"]')||(c.preventDefault(),d.is("input,button")?d.trigger("focus"):d.find("input:visible,button:visible").first().trigger("focus"))}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict" function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})};var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.7",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return};a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(a>this.$items.length-1||a<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){if(!this.sliding)return this.slide("next")},c.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")};var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict" function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)} function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&/show|hide/.test(b)&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})};var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a('[data-toggle="collapse"][href="#'+b.id+'"],[data-toggle="collapse"][data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.7",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void(this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION)):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":e.data();c.call(f,h)})}(jQuery),+function(a){"use strict" function b(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()} function c(c){c&&3===c.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=b(d),f={relatedTarget:this};e.hasClass("open")&&(c&&"click"==c.type&&/input|textarea/i.test(c.target.tagName)&&a.contains(e[0],c.target)||(e.trigger(c=a.Event("hide.bs.dropdown",f)),c.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger(a.Event("hidden.bs.dropdown",f)))))}))} function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})};var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.7",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=b(e),g=f.hasClass("open");if(c(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click",c);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger(a.Event("shown.bs.dropdown",h))};return!1}},g.prototype.keydown=function(c){if(/(38|40|27|32)/.test(c.which)&&!/input|textarea/i.test(c.target.tagName)){var d=a(this);if(c.preventDefault(),c.stopPropagation(),!d.is(".disabled, :disabled")){var e=b(d),g=e.hasClass("open");if(!g&&27!=c.which||g&&27==c.which)return 27==c.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.disabled):visible a",i=e.find(".dropdown-menu"+h);if(i.length){var j=i.index(c.target);38==c.which&&j>0&&j--,40==c.which&&jdocument.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:""})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},c.prototype.checkScrollbar=function(){var a=window.innerWidth;if(!a){var b=document.documentElement.getBoundingClientRect();a=b.right-Math.abs(b.left)};this.bodyIsOverflowing=document.body.clientWidth
',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(a.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g){this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this))}else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}};this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusin"==b.type?"focus":"hover"]=!0),c.tip().hasClass("in")||"in"==c.hoverState?void((c.hoverState="in")):(clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void((c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show))):c.show())},c.prototype.isInStateTrue=function(){for(var a in this.inState)if(this.inState[a])return!0;return!1},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);if(c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusout"==b.type?"focus":"hover"]=!1),!c.isInStateTrue())return clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void((c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide))):c.hide()},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.getPosition(this.$viewport);h="bottom"==h&&k.bottom+m>o.bottom?"top":"top"==h&&k.top-mo.width?"left":"left"==h&&k.left-lg.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;jg.right&&(e.left=g.left+g.width-k)};return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do{a+=~~(1e6*Math.random())}while(document.getElementById(a));return a},c.prototype.tip=function(){if(!this.$tip&&(this.$tip=a(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),b?(c.inState.click=!c.inState.click,c.isInStateTrue()?c.enter(c):c.leave(c)):c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type),a.$tip&&a.$tip.detach(),a.$tip=null,a.$arrow=null,a.$viewport=null,a.$element=null})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict" function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;!e&&/destroy|hide/.test(b)||(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})};var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.7",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict" function b(c,d){this.$body=a(document.body),this.$scrollElement=a(a(c).is(document.body)?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()} function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})};b.VERSION="3.3.7",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c="offset",d=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(c="position",d=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var b=a(this),e=b.data("target")||b.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b=e[a]&&(void(0)===e[a+1]||b .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()};var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict" function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})};var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.7",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return e=a-d&&"bottom"},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=Math.max(a(document).height(),a(document.body).height());"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")};"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery); (function(){'use strict';if(navigator.userAgent.match(/IEMobile\/10\.0/)){var msViewportStyle=document.createElement('style');msViewportStyle.appendChild(document.createTextNode('@-ms-viewport{width:auto!important}'));document.querySelector('head').appendChild(msViewportStyle)}})(); (function(root,factory){"use strict";if(typeof define==="function"&&define.amd){define(["jquery"],factory)}else if(typeof exports==="object"){if(typeof $==="undefined"){module.exports=factory(require("jquery"))}else module.exports=factory($)}else root.bootbox=factory(root.jQuery)}(this,function init($,undefined){"use strict";var templates={dialog:"",header:"",footer:"",closeButton:"",form:"
",group:"
",label:"",inputWrapper:"
",inputs:{text:"",textarea:"",email:"",select:"",checkbox:"
",date:"",time:"",number:"",password:""}},defaults={locale:"en",backdrop:"static",animate:true,className:null,closeButton:true,show:true,container:"body"},exports={} function _t(key){var locale=locales[defaults.locale];return locale?locale[key]:locales.en[key]} function processCallback(e,dialog,callback){e.stopPropagation();e.preventDefault();var preserveDialog=$.isFunction(callback)&&callback.call(dialog,e)===false;if(!preserveDialog)dialog.modal("hide")} function getKeyLength(obj){if(Object.keys)return Object.keys(obj).length;var k,t=0;for(k in obj)t++;return t} function each(collection,iterator){var index=0;$.each(collection,function(key,value){iterator(key,value,index++)})} function sanitize(options){var buttons,total;if(typeof options!=="object")throw new Error("Please supply an object of options");if(!options.message)throw new Error("Please specify a message");options=$.extend({},defaults,options);if(!options.buttons)options.buttons={};buttons=options.buttons;total=getKeyLength(buttons);each(buttons,function(key,button,index){var isLast=index===total-1;if($.isFunction(button))button=buttons[key]={callback:button};if($.type(button)!=="object")throw new Error("button with key "+key+" must be an object");if(!button.label)button.label=key;if(!button.className)if(total<=2&&isLast){button.className="btn-primary"}else button.className="btn-default"});return options} function mapArguments(args,properties){var argn=args.length,options={};if(argn<1||argn>2)throw new Error("Invalid argument length");if(argn===2||typeof args[0]==="string"){options[properties[0]]=args[0];options[properties[1]]=args[1]}else options=args[0];return options} function mergeArguments(defaults,args,properties){return $.extend(true,{},defaults,mapArguments(args,properties))} function mergeDialogOptions(className,labels,properties,args){var baseOptions={className:"bootbox-"+className,buttons:createLabels.apply(null,labels)};return validateButtons(mergeArguments(baseOptions,args,properties),labels)} function createLabels(){var buttons={};for(var i=0,j=arguments.length;i").attr("label",option.group);elem=groups[option.group]};elem.append("")});each(groups,function(_,group){input.append(group)});input.val(options.value);break;case"checkbox":var values=$.isArray(options.value)?options.value:[options.value];inputOptions=options.inputOptions||[];if(!inputOptions.length)throw new Error("prompt with checkbox requires options");if(!inputOptions[0].value||!inputOptions[0].text)throw new Error("each option needs a `value` and a `text` property");input=$("
");each(inputOptions,function(_,option){var checkbox=$(templates.inputs[options.inputType]);checkbox.find("input").attr("value",option.value);checkbox.find("label").append(option.text);each(values,function(_,value){if(value===option.value)checkbox.find("input").prop("checked",true)});input.append(checkbox)});break};if(options.placeholder)input.attr("placeholder",options.placeholder);if(options.pattern)input.attr("pattern",options.pattern);if(options.maxlength)input.attr("maxlength",options.maxlength);form.append(input);form.on("submit",function(e){e.preventDefault();e.stopPropagation();dialog.find(".btn-primary").click()});dialog=exports.dialog(options);dialog.off("shown.bs.modal");dialog.on("shown.bs.modal",function(){input.focus()});if(shouldShow===true)dialog.modal("show");return dialog};exports.form=function(){var options,defaults,dialog,form,inputs,shouldShow;form=$(templates.form);defaults={className:"bootbox-prompt",buttons:createLabels("cancel","confirm"),fields:{}};options=validateButtons(mergeArguments(defaults,arguments,["title","callback"]),["cancel","confirm"]);shouldShow=(options.show===undefined)?true:options.show;options.message=form;form.addClass('form-horizontal');options.buttons.cancel.callback=options.onEscape=function(){return options.callback(null)};options.buttons.confirm.callback=function(){var values={};each(options.fields,function(field,opts){switch(opts.type){case"text":case"textarea":case"email":case"select":case"password":values[field]=inputs[field].val();break;case"checkbox":if(options.fields[field].options){var checkedItems=inputs[field].find("input:checked");values[field]=[];each(checkedItems,function(_,item){values[field].push($(item).val())})}else values[field]=inputs[field].find("input").is(":checked");break}});return options.callback(values)};options.show=false;if(!options.title)throw new Error("prompt requires a title");if(!$.isFunction(options.callback))throw new Error("prompt requires a callback");inputs={};each(options.fields,function(field,opts){if(!templates.inputs[opts.type])throw new Error("invalid prompt type: "+opts.type);inputs[field]=$(templates.inputs[opts.type]);switch(opts.type){case"text":case"textarea":case"email":case"password":inputs[field].val(opts.value);break;case"select":var groups={},inputOptions=opts.options||[];if(!inputOptions.length)throw new Error("select field requires options");each(inputOptions,function(_,option){var elem=inputs[field];if(option.value===undefined||option.text===undefined)throw new Error("given options in wrong format");if(option.group){if(!groups[option.group])groups[option.group]=$("").attr("label",option.group);elem=groups[option.group]};elem.append("")});each(groups,function(_,group){inputs[field].append(group)});inputs[field].val(options.value);break;case"checkbox":var vls=$.isArray(opts.value)?opts.value:[opts.value];inputOptions=opts.options||[{value:true,text:' '}];if(!inputOptions.length)throw new Error("checkbox field requires options");if(!inputOptions[0].value||!inputOptions[0].text)throw new Error("checkbox options given in wrong format");inputs[field]=$("
");each(inputOptions,function(_,option){var checkbox=$(templates.inputs[opts.type]);checkbox.find("input").attr("value",option.value);checkbox.find("label").append(option.text);each(vls,function(_,value){if(value===option.value)checkbox.find("input").prop("checked",true)});inputs[field].append(checkbox)});break};if(opts.placeholder)inputs[field].attr("placeholder",opts.placeholder)});each(inputs,function(name,input){var group=$(templates.group),label=$(templates.label),wrapper=$(templates.inputWrapper);label.html(options.fields[name].label);wrapper.append(input);group.append(label);group.append(wrapper);form.append(group)});form.on("submit",function(e){e.preventDefault();dialog.find(".btn-primary").click()});dialog=exports.dialog(options);dialog.off("shown.bs.modal");if(shouldShow===true)dialog.modal("show");return dialog};exports.dialog=function(options){options=sanitize(options);var dialog=$(templates.dialog),innerDialog=dialog.find(".modal-dialog"),body=dialog.find(".modal-body"),buttons=options.buttons,buttonStr="",callbacks={onEscape:options.onEscape};if($.fn.modal===undefined)throw new Error("$.fn.modal is not defined; please double check you have included the Bootstrap JavaScript library. See http://getbootstrap.com/javascript/ for more details.");each(buttons,function(key,button){buttonStr+="";callbacks[key]=button.callback});body.find(".bootbox-body").html(options.message);if(options.animate===true)dialog.addClass("fade");if(options.className)dialog.addClass(options.className);if(options.size==="large"){innerDialog.addClass("modal-lg")}else if(options.size==="small")innerDialog.addClass("modal-sm");if(options.title)body.before(templates.header);if(options.closeButton){var closeButton=$(templates.closeButton);if(options.title){dialog.find(".modal-header").prepend(closeButton)}else closeButton.css("margin-top","-2px").prependTo(body)};if(options.title)dialog.find(".modal-title").html(options.title);if(buttonStr.length){body.after(templates.footer);dialog.find(".modal-footer").html(buttonStr)};dialog.one("hide.bs.modal",function(){dialog.off("escape.close.bb");dialog.off("click")});dialog.one("hidden.bs.modal",function(e){if(e.target===this)dialog.remove()});dialog.one("shown.bs.modal",function(){dialog.find(".btn-primary:first").focus()});if(options.backdrop!=="static")dialog.on("click.dismiss.bs.modal",function(e){if(dialog.children(".modal-backdrop").length)e.currentTarget=dialog.children(".modal-backdrop").get(0);if(e.target!==e.currentTarget)return;dialog.trigger("escape.close.bb")});dialog.on("escape.close.bb",function(e){if(callbacks.onEscape)processCallback(e,dialog,callbacks.onEscape)});dialog.on("click",".modal-footer button",function(e){var callbackKey=$(this).data("bb-handler");processCallback(e,dialog,callbacks[callbackKey])});dialog.on("click",".bootbox-close-button",function(e){processCallback(e,dialog,callbacks.onEscape)});dialog.on("keyup",function(e){if(e.which===27)dialog.trigger("escape.close.bb")});$(options.container).append(dialog);dialog.modal({backdrop:options.backdrop?"static":false,keyboard:false,show:false});if(options.show)dialog.modal("show");return dialog};exports.setDefaults=function(){var values={};if(arguments.length===2){values[arguments[0]]=arguments[1]}else values=arguments[0];$.extend(defaults,values)};exports.hideAll=function(){$(".bootbox").modal("hide");return exports};var locales={ar:{OK:"موافق",CANCEL:"الغاء",CONFIRM:"تأكيد"},bg_BG:{OK:"Ок",CANCEL:"Отказ",CONFIRM:"Потвърждавам"},br:{OK:"OK",CANCEL:"Cancelar",CONFIRM:"Sim"},cs:{OK:"OK",CANCEL:"Zrušit",CONFIRM:"Potvrdit"},da:{OK:"OK",CANCEL:"Annuller",CONFIRM:"Accepter"},de:{OK:"OK",CANCEL:"Abbrechen",CONFIRM:"Akzeptieren"},el:{OK:"Εντάξει",CANCEL:"Ακύρωση",CONFIRM:"Επιβεβαίωση"},en:{OK:"OK",CANCEL:"Cancel",CONFIRM:"OK"},es:{OK:"OK",CANCEL:"Cancelar",CONFIRM:"Aceptar"},et:{OK:"OK",CANCEL:"Katkesta",CONFIRM:"OK"},fa:{OK:"قبول",CANCEL:"لغو",CONFIRM:"تایید"},fi:{OK:"OK",CANCEL:"Peruuta",CONFIRM:"OK"},fr:{OK:"OK",CANCEL:"Annuler",CONFIRM:"Confirmer"},he:{OK:"אישור",CANCEL:"ביטול",CONFIRM:"אישור"},hu:{OK:"OK",CANCEL:"Mégsem",CONFIRM:"Megerősít"},hr:{OK:"OK",CANCEL:"Odustani",CONFIRM:"Potvrdi"},id:{OK:"OK",CANCEL:"Batal",CONFIRM:"OK"},it:{OK:"OK",CANCEL:"Annulla",CONFIRM:"Conferma"},ja:{OK:"OK",CANCEL:"キャンセル",CONFIRM:"確認"},lt:{OK:"Gerai",CANCEL:"Atšaukti",CONFIRM:"Patvirtinti"},lv:{OK:"Labi",CANCEL:"Atcelt",CONFIRM:"Apstiprināt"},nl:{OK:"OK",CANCEL:"Annuleren",CONFIRM:"Accepteren"},no:{OK:"OK",CANCEL:"Avbryt",CONFIRM:"OK"},pl:{OK:"OK",CANCEL:"Anuluj",CONFIRM:"Potwierdź"},pt:{OK:"OK",CANCEL:"Cancelar",CONFIRM:"Confirmar"},ru:{OK:"OK",CANCEL:"Отмена",CONFIRM:"Применить"},sq:{OK:"OK",CANCEL:"Anulo",CONFIRM:"Prano"},sv:{OK:"OK",CANCEL:"Avbryt",CONFIRM:"OK"},th:{OK:"ตกลง",CANCEL:"ยกเลิก",CONFIRM:"ยืนยัน"},tr:{OK:"Tamam",CANCEL:"İptal",CONFIRM:"Onayla"},zh_CN:{OK:"OK",CANCEL:"取消",CONFIRM:"确认"},zh_TW:{OK:"OK",CANCEL:"取消",CONFIRM:"確認"}};exports.addLocale=function(name,values){$.each(["OK","CANCEL","CONFIRM"],function(_,v){if(!values[v])throw new Error("Please supply a translation for '"+v+"'")});locales[name]={OK:values.OK,CANCEL:values.CANCEL,CONFIRM:values.CONFIRM};return exports};exports.removeLocale=function(name){delete locales