Linux business72.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
LiteSpeed
: 162.0.229.97 | : 3.22.61.180
Cant Read [ /etc/named.conf ]
8.1.30
temmmp
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
home /
temmmp /
rishtehirishte.ca /
javascripts /
[ HOME SHELL ]
Name
Size
Permission
Action
i18n
[ DIR ]
drwxr-xr-x
plugins
[ DIR ]
drwxr-xr-x
rl94y2
[ DIR ]
drwxr-xr-x
asterion050a.js
391.37
KB
-rw-r--r--
i18n050a.js
21.89
KB
-rw-r--r--
jquery-1.12.4.min.js
94.89
KB
-rw-r--r--
jquery-ui-1.12.1.min.js
247.72
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : asterion050a.js
var swfobject=function(){var b="undefined",Q="object",n="Shockwave Flash",p="ShockwaveFlash.ShockwaveFlash",P="application/x-shockwave-flash",m="SWFObjectExprInst",j=window,K=document,T=navigator,o=[],N=[],i=[],d=[],J,Z=null,M=null,l=null,e=false,A=false;var h=function(){var v=typeof K.getElementById!=b&&typeof K.getElementsByTagName!=b&&typeof K.createElement!=b,AC=[0,0,0],x=null;if(typeof T.plugins!=b&&typeof T.plugins[n]==Q){x=T.plugins[n].description;if(x&&!(typeof T.mimeTypes!=b&&T.mimeTypes[P]&&!T.mimeTypes[P].enabledPlugin)){x=x.replace(/^.*\s+(\S+\s+\S+$)/,"$1");AC[0]=parseInt(x.replace(/^(.*)\..*$/,"$1"),10);AC[1]=parseInt(x.replace(/^.*\.(.*)\s.*$/,"$1"),10);AC[2]=/r/.test(x)?parseInt(x.replace(/^.*r(.*)$/,"$1"),10):0}}else{if(typeof j.ActiveXObject!=b){var y=null,AB=false;try{y=new ActiveXObject(p+".7")}catch(t){try{y=new ActiveXObject(p+".6");AC=[6,0,21];y.AllowScriptAccess="always"}catch(t){if(AC[0]==6){AB=true}}if(!AB){try{y=new ActiveXObject(p)}catch(t){}}}if(!AB&&y){try{x=y.GetVariable("$version");if(x){x=x.split(" ")[1].split(",");AC=[parseInt(x[0],10),parseInt(x[1],10),parseInt(x[2],10)]}}catch(t){}}}}var AD=T.userAgent.toLowerCase(),r=T.platform.toLowerCase(),AA=/webkit/.test(AD)?parseFloat(AD.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,q=false,z=r?/win/.test(r):/win/.test(AD),w=r?/mac/.test(r):/mac/.test(AD);/*@cc_on q=true;@if(@_win32)z=true;@elif(@_mac)w=true;@end@*/return{w3cdom:v,pv:AC,webkit:AA,ie:q,win:z,mac:w}}();var L=function(){if(!h.w3cdom){return }f(H);if(h.ie&&h.win){try{K.write("<script id=__ie_ondomload defer=true src=//:><\/script>");J=C("__ie_ondomload");if(J){I(J,"onreadystatechange",S)}}catch(q){}}if(h.webkit&&typeof K.readyState!=b){Z=setInterval(function(){if(/loaded|complete/.test(K.readyState)){E()}},10)}if(typeof K.addEventListener!=b){K.addEventListener("DOMContentLoaded",E,null)}R(E)}();function S(){if(J.readyState=="complete"){J.parentNode.removeChild(J);E()}}function E(){if(e){return }if(h.ie&&h.win){var v=a("span");try{var u=K.getElementsByTagName("body")[0].appendChild(v);u.parentNode.removeChild(u)}catch(w){return }}e=true;if(Z){clearInterval(Z);Z=null}var q=o.length;for(var r=0;r<q;r++){o[r]()}}function f(q){if(e){q()}else{o[o.length]=q}}function R(r){if(typeof j.addEventListener!=b){j.addEventListener("load",r,false)}else{if(typeof K.addEventListener!=b){K.addEventListener("load",r,false)}else{if(typeof j.attachEvent!=b){I(j,"onload",r)}else{if(typeof j.onload=="function"){var q=j.onload;j.onload=function(){q();r()}}else{j.onload=r}}}}}function H(){var t=N.length;for(var q=0;q<t;q++){var u=N[q].id;if(h.pv[0]>0){var r=C(u);if(r){N[q].width=r.getAttribute("width")?r.getAttribute("width"):"0";N[q].height=r.getAttribute("height")?r.getAttribute("height"):"0";if(c(N[q].swfVersion)){if(h.webkit&&h.webkit<312){Y(r)}W(u,true)}else{if(N[q].expressInstall&&!A&&c("6.0.65")&&(h.win||h.mac)){k(N[q])}else{O(r)}}}}else{W(u,true)}}}function Y(t){var q=t.getElementsByTagName(Q)[0];if(q){var w=a("embed"),y=q.attributes;if(y){var v=y.length;for(var u=0;u<v;u++){if(y[u].nodeName=="DATA"){w.setAttribute("src",y[u].nodeValue)}else{w.setAttribute(y[u].nodeName,y[u].nodeValue)}}}var x=q.childNodes;if(x){var z=x.length;for(var r=0;r<z;r++){if(x[r].nodeType==1&&x[r].nodeName=="PARAM"){w.setAttribute(x[r].getAttribute("name"),x[r].getAttribute("value"))}}}t.parentNode.replaceChild(w,t)}}function k(w){A=true;var u=C(w.id);if(u){if(w.altContentId){var y=C(w.altContentId);if(y){M=y;l=w.altContentId}}else{M=G(u)}if(!(/%$/.test(w.width))&&parseInt(w.width,10)<310){w.width="310"}if(!(/%$/.test(w.height))&&parseInt(w.height,10)<137){w.height="137"}K.title=K.title.slice(0,47)+" - Flash Player Installation";var z=h.ie&&h.win?"ActiveX":"PlugIn",q=K.title,r="MMredirectURL="+j.location+"&MMplayerType="+z+"&MMdoctitle="+q,x=w.id;if(h.ie&&h.win&&u.readyState!=4){var t=a("div");x+="SWFObjectNew";t.setAttribute("id",x);u.parentNode.insertBefore(t,u);u.style.display="none";var v=function(){u.parentNode.removeChild(u)};I(j,"onload",v)}U({data:w.expressInstall,id:m,width:w.width,height:w.height},{flashvars:r},x)}}function O(t){if(h.ie&&h.win&&t.readyState!=4){var r=a("div");t.parentNode.insertBefore(r,t);r.parentNode.replaceChild(G(t),r);t.style.display="none";var q=function(){t.parentNode.removeChild(t)};I(j,"onload",q)}else{t.parentNode.replaceChild(G(t),t)}}function G(v){var u=a("div");if(h.win&&h.ie){u.innerHTML=v.innerHTML}else{var r=v.getElementsByTagName(Q)[0];if(r){var w=r.childNodes;if(w){var q=w.length;for(var t=0;t<q;t++){if(!(w[t].nodeType==1&&w[t].nodeName=="PARAM")&&!(w[t].nodeType==8)){u.appendChild(w[t].cloneNode(true))}}}}}return u}function U(AG,AE,t){var q,v=C(t);if(v){if(typeof AG.id==b){AG.id=t}if(h.ie&&h.win){var AF="";for(var AB in AG){if(AG[AB]!=Object.prototype[AB]){if(AB.toLowerCase()=="data"){AE.movie=AG[AB]}else{if(AB.toLowerCase()=="styleclass"){AF+=' class="'+AG[AB]+'"'}else{if(AB.toLowerCase()!="classid"){AF+=" "+AB+'="'+AG[AB]+'"'}}}}}var AD="";for(var AA in AE){if(AE[AA]!=Object.prototype[AA]){AD+='<param name="'+AA+'" value="'+AE[AA]+'" />'}}v.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+AF+">"+AD+"</object>";i[i.length]=AG.id;q=C(AG.id)}else{if(h.webkit&&h.webkit<312){var AC=a("embed");AC.setAttribute("type",P);for(var z in AG){if(AG[z]!=Object.prototype[z]){if(z.toLowerCase()=="data"){AC.setAttribute("src",AG[z])}else{if(z.toLowerCase()=="styleclass"){AC.setAttribute("class",AG[z])}else{if(z.toLowerCase()!="classid"){AC.setAttribute(z,AG[z])}}}}}for(var y in AE){if(AE[y]!=Object.prototype[y]){if(y.toLowerCase()!="movie"){AC.setAttribute(y,AE[y])}}}v.parentNode.replaceChild(AC,v);q=AC}else{var u=a(Q);u.setAttribute("type",P);for(var x in AG){if(AG[x]!=Object.prototype[x]){if(x.toLowerCase()=="styleclass"){u.setAttribute("class",AG[x])}else{if(x.toLowerCase()!="classid"){u.setAttribute(x,AG[x])}}}}for(var w in AE){if(AE[w]!=Object.prototype[w]&&w.toLowerCase()!="movie"){F(u,w,AE[w])}}v.parentNode.replaceChild(u,v);q=u}}}return q}function F(t,q,r){var u=a("param");u.setAttribute("name",q);u.setAttribute("value",r);t.appendChild(u)}function X(r){var q=C(r);if(q&&(q.nodeName=="OBJECT"||q.nodeName=="EMBED")){if(h.ie&&h.win){if(q.readyState==4){B(r)}else{j.attachEvent("onload",function(){B(r)})}}else{q.parentNode.removeChild(q)}}}function B(t){var r=C(t);if(r){for(var q in r){if(typeof r[q]=="function"){r[q]=null}}r.parentNode.removeChild(r)}}function C(t){var q=null;try{q=K.getElementById(t)}catch(r){}return q}function a(q){return K.createElement(q)}function I(t,q,r){t.attachEvent(q,r);d[d.length]=[t,q,r]}function c(t){var r=h.pv,q=t.split(".");q[0]=parseInt(q[0],10);q[1]=parseInt(q[1],10)||0;q[2]=parseInt(q[2],10)||0;return(r[0]>q[0]||(r[0]==q[0]&&r[1]>q[1])||(r[0]==q[0]&&r[1]==q[1]&&r[2]>=q[2]))?true:false}function V(v,r){if(h.ie&&h.mac){return }var u=K.getElementsByTagName("head")[0],t=a("style");t.setAttribute("type","text/css");t.setAttribute("media","screen");if(!(h.ie&&h.win)&&typeof K.createTextNode!=b){t.appendChild(K.createTextNode(v+" {"+r+"}"))}u.appendChild(t);if(h.ie&&h.win&&typeof K.styleSheets!=b&&K.styleSheets.length>0){var q=K.styleSheets[K.styleSheets.length-1];if(typeof q.addRule==Q){q.addRule(v,r)}}}function W(t,q){var r=q?"visible":"hidden";if(e&&C(t)){C(t).style.visibility=r}else{V("#"+t,"visibility:"+r)}}function g(s){var r=/[\\\"<>\.;]/;var q=r.exec(s)!=null;return q?encodeURIComponent(s):s}var D=function(){if(h.ie&&h.win){window.attachEvent("onunload",function(){var w=d.length;for(var v=0;v<w;v++){d[v][0].detachEvent(d[v][1],d[v][2])}var t=i.length;for(var u=0;u<t;u++){X(i[u])}for(var r in h){h[r]=null}h=null;for(var q in swfobject){swfobject[q]=null}swfobject=null})}}();return{registerObject:function(u,q,t){if(!h.w3cdom||!u||!q){return }var r={};r.id=u;r.swfVersion=q;r.expressInstall=t?t:false;N[N.length]=r;W(u,false)},getObjectById:function(v){var q=null;if(h.w3cdom){var t=C(v);if(t){var u=t.getElementsByTagName(Q)[0];if(!u||(u&&typeof t.SetVariable!=b)){q=t}else{if(typeof u.SetVariable!=b){q=u}}}}return q},embedSWF:function(x,AE,AB,AD,q,w,r,z,AC){if(!h.w3cdom||!x||!AE||!AB||!AD||!q){return }AB+="";AD+="";if(c(q)){W(AE,false);var AA={};if(AC&&typeof AC===Q){for(var v in AC){if(AC[v]!=Object.prototype[v]){AA[v]=AC[v]}}}AA.data=x;AA.width=AB;AA.height=AD;var y={};if(z&&typeof z===Q){for(var u in z){if(z[u]!=Object.prototype[u]){y[u]=z[u]}}}if(r&&typeof r===Q){for(var t in r){if(r[t]!=Object.prototype[t]){if(typeof y.flashvars!=b){y.flashvars+="&"+t+"="+r[t]}else{y.flashvars=t+"="+r[t]}}}}f(function(){U(AA,y,AE);if(AA.id==AE){W(AE,true)}})}else{if(w&&!A&&c("6.0.65")&&(h.win||h.mac)){A=true;W(AE,false);f(function(){var AF={};AF.id=AF.altContentId=AE;AF.width=AB;AF.height=AD;AF.expressInstall=w;k(AF)})}}},getFlashPlayerVersion:function(){return{major:h.pv[0],minor:h.pv[1],release:h.pv[2]}},hasFlashPlayerVersion:c,createSWF:function(t,r,q){if(h.w3cdom){return U(t,r,q)}else{return undefined}},removeSWF:function(q){if(h.w3cdom){X(q)}},createCSS:function(r,q){if(h.w3cdom){V(r,q)}},addDomLoadEvent:f,addLoadEvent:R,getQueryParamValue:function(v){var u=K.location.search||K.location.hash;if(v==null){return g(u)}if(u){var t=u.substring(1).split("&");for(var r=0;r<t.length;r++){if(t[r].substring(0,t[r].indexOf("="))==v){return g(t[r].substring((t[r].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(A&&M){var q=C(m);if(q){q.parentNode.replaceChild(M,q);if(l){W(l,true);if(h.ie&&h.win){M.style.display="block"}}M=null;l=null;A=false}}}}}();$j=jQuery.noConflict();(function($){Number.prototype.bytes=function(){return this};Number.prototype.kilobytes=function(){return this*1024};Number.prototype.megabytes=function(){return this*1024..kilobytes()};Number.prototype.gigabytes=function(){return this*1024..megabytes()};Number.prototype.terabytes=function(){return this*1024..gigabytes()};Number.prototype.petabytes=function(){return this*1024..terabytes()};Number.prototype.exabytes=function(){return this*1024..petabytes()};$.each(["byte","kilobyte","megabyte","gigabyte","terabyte","petabyte","exabyte"],function(){Number.prototype[this]=Number.prototype[this+"s"]});Number.prototype.toPercentage=function(precision){precision=parseInt(precision)||1;return(this*100).toFixed(precision)+"%"};Number.prototype.toHumanSize=function(precision){precision=parseInt(precision)||1;if(this<1..kilobyte())return this+" Bytes";if(this<1..megabyte())return(this/1..kilobyte()).toFixed(precision)+" KB";if(this<1..gigabytes())return(this/1..megabyte()).toFixed(precision)+" MB";if(this<1..terabytes())return(this/1..gigabytes()).toFixed(precision)+" GB";if(this<1..petabytes())return(this/1..terabytes()).toFixed(precision)+" TB";if(this<1..exabytes())return(this/1..petabytes()).toFixed(precision)+" PB";return(this/1..exabytes()).toFixed(precision)+" EB"};$.asterion=$.asterion||{};$.asterion.required=[];$.createCallbacks=function(object,names){names=$.makeArray(names);$.each(names,function(){var name=this;object._callbacks=object._callbacks||{};object._callbacks[name]=[];object[name]=function(){if(typeof arguments[0]=="function"&&arguments.length==1){var callback=arguments[0];this._callbacks[name][this._callbacks[name].length]=callback;return this}else{var result;for(var i=0;i<this._callbacks[name].length;i++){result=this._callbacks[name][i].apply(this,$.makeArray(arguments));if(result===false)return false}return true}}})};$.asterion.clearAddressBar=function(){setTimeout(function(){window.history.replaceState({when:Date.now()},"",window.location.href.replace(window.location.hash,""))},250)};$.asterion.clearIframes=function(element,callback,context){context=context||this;var iframes=$("iframe",element);if(iframes.length&&navigator&&navigator.appName=="Microsoft Internet Explorer"){iframes.each(function(){var $this=$(this);$this.attr("data-src",$this.attr("src")).attr("src","")});setTimeout(function(){callback.call(context)},100)}else{callback.call(context)}};$.asterion.restoreIframes=function(element){if(navigator&&navigator.appName=="Microsoft Internet Explorer"){$("iframe",element).each(function(){var $this=$(this);if($this.attr("src")==="")$this.attr("src",$this.attr("data-src"))})}};$.asterion.humanize=function(text){return text.replace("_"," ").replace(/\w+/g,function(a){return a.charAt(0).toUpperCase()+a.slice(1).toLowerCase()})};$.asterion.confirm_dialog=function(title,msg,buttons,options){options=options||{};$.asterion.dialog.confirm(msg,$.extend(options,{buttons:buttons,title:title}))};$.asterion.rjs=function(url,data){$.ajax({url:url,dataType:"script",data:data,type:"POST",beforeSend:function(xhr){xhr.setRequestHeader("Accept","text/javascript")}})};$.asterion.logout=function(msg){if(msg){alert(msg)}window.location.replace("resource/website/logout")};$.asterion.confirm_delete=function(params){var link_target=params.link_target,dtitle=params.title,msg_target=params.msg_target,button1_txt=params.button1_txt||I18n.t("js.delete"),button2_txt=params.button2_txt||I18n.t("js.cancel");$(link_target).click(function(e){var location=$(this).attr("href"),title=dtitle,msg=$(msg_target).html(),buttons=[{text:button1_txt,click:function(){$.asterion.rjs(location,{confirm:true});$(this).dialog("close")}},{text:button2_txt,click:function(){$(this).dialog("close")}}];$.asterion.confirm_dialog(title,msg,buttons);return false})};$.asterion.alert=function(title,msg,ok_callback){var buttons=[{text:"OK",click:function(){$(this).dialog("close");if(ok_callback&&$.isFunction(ok_callback))ok_callback()}}];$.asterion.confirm_dialog(title,msg,buttons)};$.asterion.checkGuestbooks=function(){if($(".guestbook_component").length>0){$.asterion.alert(I18n.t("js.guestbook_component"),I18n.t("js.only_one_guestbook"))}else{$.asterion.componentIndicators.enable();$.asterion.dialog.close()}};$.asterion.offer_blog=function(){var title=I18n.t("js.no_blog_component"),msg="<p>"+I18n.t("js.no_blog_component_msg").replace("\n","</p><p>")+"</p>",buttons=[{text:I18n.t("js.yes_add_blog"),click:function(){var loc="/resource/component/add";$.asterion.rjs(loc,{confirm:true});$(this).dialog("close")}},{text:I18n.t("js.no_add_blog"),click:function(){var loc="/resource/blog/post/manage";$.asterion.dialog.open(loc,{});$(this).dialog("close")}}];$.asterion.confirm_dialog(title,msg,buttons)};$.asterion.title_link=function(value,target){$("#component_title_link").val(value);$("#component_title_target").val(target);$.asterion.dialog.close();$(document).trigger("title_link_change",[value,target])};$.asterion.button_link=function(component_id,html){var new_element=$(html),content=null;$("#component_"+component_id+" .component_content a").replaceWith(new_element);content=$("#component_"+component_id+" .component_content").html();$.post("/resource/components/button/edit/"+component_id,{"component[html]":content}).done(function(){$(document).trigger({type:"button_target:update",new_target:new_element});$.asterion.dialog.close()})};$.asterion.remove_diacritics=function(str){var defaultDiacriticsRemovalMap={A:/[\u0041\u24B6\uFF21\u00C0\u00C1\u00C2\u1EA6\u1EA4\u1EAA\u1EA8\u00C3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\u00C4\u01DE\u1EA2\u00C5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F]/g,AA:/[\uA732]/g,AE:/[\u00C6\u01FC\u01E2]/g,AO:/[\uA734]/g,AU:/[\uA736]/g,AV:/[\uA738\uA73A]/g,AY:/[\uA73C]/g,B:/[\u0042\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0182\u0181]/g,C:/[\u0043\u24B8\uFF23\u0106\u0108\u010A\u010C\u00C7\u1E08\u0187\u023B\uA73E]/g,D:/[\u0044\u24B9\uFF24\u1E0A\u010E\u1E0C\u1E10\u1E12\u1E0E\u0110\u018B\u018A\u0189\uA779]/g,DZ:/[\u01F1\u01C4]/g,Dz:/[\u01F2\u01C5]/g,E:/[\u0045\u24BA\uFF25\u00C8\u00C9\u00CA\u1EC0\u1EBE\u1EC4\u1EC2\u1EBC\u0112\u1E14\u1E16\u0114\u0116\u00CB\u1EBA\u011A\u0204\u0206\u1EB8\u1EC6\u0228\u1E1C\u0118\u1E18\u1E1A\u0190\u018E]/g,F:/[\u0046\u24BB\uFF26\u1E1E\u0191\uA77B]/g,G:/[\u0047\u24BC\uFF27\u01F4\u011C\u1E20\u011E\u0120\u01E6\u0122\u01E4\u0193\uA7A0\uA77D\uA77E]/g,H:/[\u0048\u24BD\uFF28\u0124\u1E22\u1E26\u021E\u1E24\u1E28\u1E2A\u0126\u2C67\u2C75\uA78D]/g,I:/[\u0049\u24BE\uFF29\u00CC\u00CD\u00CE\u0128\u012A\u012C\u0130\u00CF\u1E2E\u1EC8\u01CF\u0208\u020A\u1ECA\u012E\u1E2C\u0197]/g,J:/[\u004A\u24BF\uFF2A\u0134\u0248]/g,K:/[\u004B\u24C0\uFF2B\u1E30\u01E8\u1E32\u0136\u1E34\u0198\u2C69\uA740\uA742\uA744\uA7A2]/g,L:/[\u004C\u24C1\uFF2C\u013F\u0139\u013D\u1E36\u1E38\u013B\u1E3C\u1E3A\u0141\u023D\u2C62\u2C60\uA748\uA746\uA780]/g,LJ:/[\u01C7]/g,Lj:/[\u01C8]/g,M:/[\u004D\u24C2\uFF2D\u1E3E\u1E40\u1E42\u2C6E\u019C]/g,N:/[\u004E\u24C3\uFF2E\u01F8\u0143\u00D1\u1E44\u0147\u1E46\u0145\u1E4A\u1E48\u0220\u019D\uA790\uA7A4]/g,NJ:/[\u01CA]/g,Nj:/[\u01CB]/g,O:/[\u004F\u24C4\uFF2F\u00D2\u00D3\u00D4\u1ED2\u1ED0\u1ED6\u1ED4\u00D5\u1E4C\u022C\u1E4E\u014C\u1E50\u1E52\u014E\u022E\u0230\u00D6\u022A\u1ECE\u0150\u01D1\u020C\u020E\u01A0\u1EDC\u1EDA\u1EE0\u1EDE\u1EE2\u1ECC\u1ED8\u01EA\u01EC\u00D8\u01FE\u0186\u019F\uA74A\uA74C]/g,OI:/[\u01A2]/g,OO:/[\uA74E]/g,OU:/[\u0222]/g,P:/[\u0050\u24C5\uFF30\u1E54\u1E56\u01A4\u2C63\uA750\uA752\uA754]/g,Q:/[\u0051\u24C6\uFF31\uA756\uA758\u024A]/g,R:/[\u0052\u24C7\uFF32\u0154\u1E58\u0158\u0210\u0212\u1E5A\u1E5C\u0156\u1E5E\u024C\u2C64\uA75A\uA7A6\uA782]/g,S:/[\u0053\u24C8\uFF33\u1E9E\u015A\u1E64\u015C\u1E60\u0160\u1E66\u1E62\u1E68\u0218\u015E\u2C7E\uA7A8\uA784]/g,T:/[\u0054\u24C9\uFF34\u1E6A\u0164\u1E6C\u021A\u0162\u1E70\u1E6E\u0166\u01AC\u01AE\u023E\uA786]/g,TZ:/[\uA728]/g,U:/[\u0055\u24CA\uFF35\u00D9\u00DA\u00DB\u0168\u1E78\u016A\u1E7A\u016C\u00DC\u01DB\u01D7\u01D5\u01D9\u1EE6\u016E\u0170\u01D3\u0214\u0216\u01AF\u1EEA\u1EE8\u1EEE\u1EEC\u1EF0\u1EE4\u1E72\u0172\u1E76\u1E74\u0244]/g,V:/[\u0056\u24CB\uFF36\u1E7C\u1E7E\u01B2\uA75E\u0245]/g,VY:/[\uA760]/g,W:/[\u0057\u24CC\uFF37\u1E80\u1E82\u0174\u1E86\u1E84\u1E88\u2C72]/g,X:/[\u0058\u24CD\uFF38\u1E8A\u1E8C]/g,Y:/[\u0059\u24CE\uFF39\u1EF2\u00DD\u0176\u1EF8\u0232\u1E8E\u0178\u1EF6\u1EF4\u01B3\u024E\u1EFE]/g,Z:/[\u005A\u24CF\uFF3A\u0179\u1E90\u017B\u017D\u1E92\u1E94\u01B5\u0224\u2C7F\u2C6B\uA762]/g,a:/[\u0061\u24D0\uFF41\u1E9A\u00E0\u00E1\u00E2\u1EA7\u1EA5\u1EAB\u1EA9\u00E3\u0101\u0103\u1EB1\u1EAF\u1EB5\u1EB3\u0227\u01E1\u00E4\u01DF\u1EA3\u00E5\u01FB\u01CE\u0201\u0203\u1EA1\u1EAD\u1EB7\u1E01\u0105\u2C65\u0250]/g,aa:/[\uA733]/g,ae:/[\u00E6\u01FD\u01E3]/g,ao:/[\uA735]/g,au:/[\uA737]/g,av:/[\uA739\uA73B]/g,ay:/[\uA73D]/g,b:/[\u0062\u24D1\uFF42\u1E03\u1E05\u1E07\u0180\u0183\u0253]/g,c:/[\u0063\u24D2\uFF43\u0107\u0109\u010B\u010D\u00E7\u1E09\u0188\u023C\uA73F\u2184]/g,d:/[\u0064\u24D3\uFF44\u1E0B\u010F\u1E0D\u1E11\u1E13\u1E0F\u0111\u018C\u0256\u0257\uA77A]/g,dz:/[\u01F3\u01C6]/g,e:/[\u0065\u24D4\uFF45\u00E8\u00E9\u00EA\u1EC1\u1EBF\u1EC5\u1EC3\u1EBD\u0113\u1E15\u1E17\u0115\u0117\u00EB\u1EBB\u011B\u0205\u0207\u1EB9\u1EC7\u0229\u1E1D\u0119\u1E19\u1E1B\u0247\u025B\u01DD]/g,f:/[\u0066\u24D5\uFF46\u1E1F\u0192\uA77C]/g,g:/[\u0067\u24D6\uFF47\u01F5\u011D\u1E21\u011F\u0121\u01E7\u0123\u01E5\u0260\uA7A1\u1D79\uA77F]/g,h:/[\u0068\u24D7\uFF48\u0125\u1E23\u1E27\u021F\u1E25\u1E29\u1E2B\u1E96\u0127\u2C68\u2C76\u0265]/g,hv:/[\u0195]/g,i:/[\u0069\u24D8\uFF49\u00EC\u00ED\u00EE\u0129\u012B\u012D\u00EF\u1E2F\u1EC9\u01D0\u0209\u020B\u1ECB\u012F\u1E2D\u0268\u0131]/g,j:/[\u006A\u24D9\uFF4A\u0135\u01F0\u0249]/g,k:/[\u006B\u24DA\uFF4B\u1E31\u01E9\u1E33\u0137\u1E35\u0199\u2C6A\uA741\uA743\uA745\uA7A3]/g,l:/[\u006C\u24DB\uFF4C\u0140\u013A\u013E\u1E37\u1E39\u013C\u1E3D\u1E3B\u017F\u0142\u019A\u026B\u2C61\uA749\uA781\uA747]/g,lj:/[\u01C9]/g,m:/[\u006D\u24DC\uFF4D\u1E3F\u1E41\u1E43\u0271\u026F]/g,n:/[\u006E\u24DD\uFF4E\u01F9\u0144\u00F1\u1E45\u0148\u1E47\u0146\u1E4B\u1E49\u019E\u0272\u0149\uA791\uA7A5]/g,nj:/[\u01CC]/g,o:/[\u006F\u24DE\uFF4F\u00F2\u00F3\u00F4\u1ED3\u1ED1\u1ED7\u1ED5\u00F5\u1E4D\u022D\u1E4F\u014D\u1E51\u1E53\u014F\u022F\u0231\u00F6\u022B\u1ECF\u0151\u01D2\u020D\u020F\u01A1\u1EDD\u1EDB\u1EE1\u1EDF\u1EE3\u1ECD\u1ED9\u01EB\u01ED\u00F8\u01FF\u0254\uA74B\uA74D\u0275]/g,oi:/[\u01A3]/g,ou:/[\u0223]/g,oo:/[\uA74F]/g,p:/[\u0070\u24DF\uFF50\u1E55\u1E57\u01A5\u1D7D\uA751\uA753\uA755]/g,q:/[\u0071\u24E0\uFF51\u024B\uA757\uA759]/g,r:/[\u0072\u24E1\uFF52\u0155\u1E59\u0159\u0211\u0213\u1E5B\u1E5D\u0157\u1E5F\u024D\u027D\uA75B\uA7A7\uA783]/g,s:/[\u0073\u24E2\uFF53\u00DF\u015B\u1E65\u015D\u1E61\u0161\u1E67\u1E63\u1E69\u0219\u015F\u023F\uA7A9\uA785\u1E9B]/g,t:/[\u0074\u24E3\uFF54\u1E6B\u1E97\u0165\u1E6D\u021B\u0163\u1E71\u1E6F\u0167\u01AD\u0288\u2C66\uA787]/g,tz:/[\uA729]/g,u:/[\u0075\u24E4\uFF55\u00F9\u00FA\u00FB\u0169\u1E79\u016B\u1E7B\u016D\u00FC\u01DC\u01D8\u01D6\u01DA\u1EE7\u016F\u0171\u01D4\u0215\u0217\u01B0\u1EEB\u1EE9\u1EEF\u1EED\u1EF1\u1EE5\u1E73\u0173\u1E77\u1E75\u0289]/g,v:/[\u0076\u24E5\uFF56\u1E7D\u1E7F\u028B\uA75F\u028C]/g,vy:/[\uA761]/g,w:/[\u0077\u24E6\uFF57\u1E81\u1E83\u0175\u1E87\u1E85\u1E98\u1E89\u2C73]/g,x:/[\u0078\u24E7\uFF58\u1E8B\u1E8D]/g,y:/[\u0079\u24E8\uFF59\u1EF3\u00FD\u0177\u1EF9\u0233\u1E8F\u00FF\u1EF7\u1E99\u1EF5\u01B4\u024F\u1EFF]/g,z:/[\u007A\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763]/g};for(var key in defaultDiacriticsRemovalMap){str=str.replace(defaultDiacriticsRemovalMap[key],key)}return str};$(document).on("click","a.delete_component",function(event){var location=$(this).attr("href"),title=I18n.t("js.remove_component"),buttons=[{text:I18n.t("js.remove_component"),click:function(){$.asterion.rjs(location,{confirm:true});$(this).dialog("close")}},{text:I18n.t("js.cancel"),click:function(){$(this).dialog("close")}}],readonly=false;$($(this).parents()).each(function(i,e){if($(e).hasClass("asterion_readonly_component_editor")){readonly=true}});if(readonly){$.asterion.alert(I18n.t("js.readonly_component"),I18n.t("js.cannot_delete_component"));event.preventDefault();return false}$.spinner().show();$.get(location,function(msg){$.spinner().hide();$.asterion.confirm_dialog(title,msg,buttons)});event.preventDefault()});$(document).on("click","a.unpin_component",function(event){var $link=$(this);var uri=$link.attr("href");var element_id=$link.closest(".asterion_component_editor").attr("data-id");var $element=$("#component_"+element_id);$.post(uri,function(json){var component_id=json.component_id;$.ajax({url:"/resource/component/content/"+component_id,ifModified:true,type:"GET",cache:true,dataType:"html",statusCode:{200:function(content,status,jqXHR){$.asterion.component.update(element_id,content,function(){})},304:function(){}}})});event.preventDefault();return false});$(document).on("click","a.pin_component",function(event){var $link=$(this);var uri=$link.attr("href");var component_id=uri.split("/").pop();var $element=$("#component_"+component_id).first();var title="Pin Component";var buttons=[{text:"Pin Component",click:function(){$.spinner().show();$.post(uri,function(){$.asterion.component.refresh(component_id,function(component_id,content){$.spinner().hide();var editor=$.asterion.componentEditor.instances[component_id];editor.show();$("a.asterion_component_pinned",editor.editorElements.main).trigger("mouseover")})});$(this).dialog("close")}},{text:I18n.t("js.cancel"),click:function(){$(this).dialog("close")}}];$.spinner().show();$.get(uri,function(msg){$.spinner().hide();$.asterion.confirm_dialog(title,msg,buttons)});event.preventDefault()});$(document).on("click","a.copy_component",function(event){var $link=$(this);var component_id=$link.attr("href").split("/").pop();var $element=$("#component_"+component_id+', [data-proxy-id="'+component_id+'"]').first();var location=$link.attr("href");var title=I18n.t("js.copy_component");var readonly=false;var buttons=[{text:"Copy",click:function(){copy_component(this,{});$(this).dialog("close")}},{text:I18n.t("js.cancel"),click:function(){$(this).dialog("close")}}];var copy_component=function(el,data){var page=$(el).closest(".ui-dialog").find("select").val();var same_page=page==window.location.pathname;data=$.extend({id:component_id,page_uri:escape(page),insert_after_id:same_page?component_id:undefined},data);$.asterion.component.copy(data,function(new_component){if(same_page){var $element=$("#component_"+component_id);$element.after(new_component);$.asterion.behaviors.addLocationHelperClasses();$(document).trigger("component.setup",$element)}else{window.location=page}})};$(this).parents().each(function(i,e){if($(e).hasClass("asterion_readonly_component_editor")){readonly=true}});if(readonly){$.asterion.alert(I18n.t("js.readonly_component"),I18n.t("js.cannot_copy_component"));event.preventDefault();return false}$.spinner().show();$.get(location,function(msg){$.spinner().hide();$.asterion.confirm_dialog(title,msg,buttons)});event.preventDefault()});$(document).on("click","a.restore_theme_image",function(e){var location=$(this).attr("href"),title=I18n.t("js.restore_theme_image"),msg="<p>"+I18n.t("js.restore_theme_image_msg")+"</p>",buttons=[{text:I18n.t("js.use_default_image"),click:function(){$.spinner().show();$.asterion.rjs(location,{confirm:true});$(this).dialog("close")}},{text:I18n.t("js.cancel"),click:function(){$(this).dialog("close")}}];$.asterion.confirm_dialog(title,msg,buttons);e.preventDefault()});$(document).on("click","a.confirm_delete_page",function(e){var location=$(this).attr("href"),title=I18n.t("js.delete_page"),msg="<p>"+I18n.t("js.delete_page_msg").replace("\n","</p><p>")+"</p>",buttons=[{text:I18n.t("js.delete_page"),click:function(){$.asterion.rjs(location,{confirm:true});$(this).dialog("close")}},{text:I18n.t("js.cancel"),click:function(){$(this).dialog("close")}}];$.asterion.confirm_dialog(title,msg,buttons);e.preventDefault()});$(document).on("click","#component_editor_container .delete_comment",function(e){var location=$(this).attr("href"),title=I18n.t("js.delete_message"),msg="<p>"+I18n.t("js.delete_message_msg").replace("\n","</p><p>")+"</p>",buttons=[{text:I18n.t("js.delete_message"),click:function(){$.asterion.rjs(location,{confirm:true});$(this).dialog("close")}},{text:I18n.t("js.cancel"),click:function(){$(this).dialog("close")}}];$.asterion.confirm_dialog(title,msg,buttons);e.preventDefault()});$.asterion.showTooltip=function(contents,x,y){$('<div id="asterion_tooltip">'+contents+"</div>").css({top:y+5,left:x+5}).appendTo("body").fadeIn(200)};$.asterion.hideTooltip=function(){$j("#asterion_tooltip").remove()};$.asterion.parseBackgroundPosition=function(strg){if(typeof strg!=="string"||strg.length===0){return[0,"px",0,"px"]}strg=strg.replace(/left|top/g,"0px");strg=strg.replace(/right|bottom/g,"100%");strg=strg.replace(/center/g,"50%");strg=strg.replace(/(\d+)(\s|\)|$)/g,"$1px$2");var res=strg.match(/(\d+)(px|%|em|pt)\s(\d+)(px|%|em|pt)/);if(!res)res=[0,0,0,0];return[parseFloat(res[1]||0),res[2]||0,parseFloat(res[3]||0),res[4]||0]};var iframe_scrollbar_width;$.asterion.iframeScrollbarWidth=function(){if(iframe_scrollbar_width)return iframe_scrollbar_width;var $iframe=$("<iframe>");$iframe.attr("src","/stylesheets/setup.css");$iframe.css({position:"absolute",top:-400,left:-400,width:200,height:50});$("body").append($iframe);iframe_scrollbar_width=$iframe.width()-$iframe.contents().find("body").width();$iframe.remove();return iframe_scrollbar_width};$.asterion.showLinkedAccounts=function(type){$("#select_"+type+"_account ul.account_selector").show()};$.asterion.changeLinkedAccount=function(type,account){$("#announce_"+type).val(account);$("#select_"+type+"_account label a").text($("#"+type+"_account_"+account+" a").text());$("#select_"+type+"_account ul.account_selector").hide()};$.asterion.flickrSelect=function(callback){var options=arguments[1]||{};var params="";if(options.username){params="?search_filter="+options.username}return this.dialog.open("/resource/flickr/browse"+params,{name:"flickr_browse",close:function(){if(arguments[0]&&arguments[1]){callback.apply(this,$.makeArray(arguments))}}})};$.asterion.youtubeSelect=function(callback){return $.asterion.dialog.open("/resource/youtube/search",{name:"youtube_browse",close:function(){if(arguments[0]){callback.apply(this,$.makeArray(arguments))}}})};$.asterion.assetSelect=function(callback,options){var url;var queryOpts=[];options=options||{};options.type=options.type||"all";options.selection_type=options.selection_type||"all";var wrapped_callback=function(){if(arguments[0]&&arguments[1]){callback.apply(this,$.makeArray(arguments))}else{$.asterion.dialog.closeAll()}};if(options.upload){url=options.type=="all"?"/resource/select/all/upload":"/resource/select;"+options.type+"/upload";if(options.collection!==""&&typeof options.collection!=="undefined"){url+="/collection/"+options.collection}url+="?direct_upload=true&active_tab=upload_files";if(options.selection_type!==""&&typeof options.selection_type!=="undefined"){url+="&selection_type="+options.selection_type}if(options.content_type!==""&&typeof options.content_type!=="undefined"){url+="&content_type="+options.content_type}if(options.file_types!==""&&typeof options.file_types!=="undefined"){url+="&file_types="+options.file_types}if(options.file_types_description!==""&&typeof options.file_types_description!=="undefined"){url+="&file_types_description="+options.file_types_description}if(options.component!==""&&typeof options.component!=="undefined"){url+="&component="+options.component}return $.asterion.dialog.open(url,{name:"asset_manager_browse",close:wrapped_callback})}else if(options.library){url="/resource/image_library?lock_type=true&selector=true&type=all&active_tab=stock_photos";if(options.selection_type!==""&&typeof options.selection_type!=="undefined"){url+="&selection_type="+options.selection_type}return $.asterion.dialog.open(url,{name:"asset_manager_browse",close:wrapped_callback})}else{url=options.type=="all"?"/resource/select":"/resource/select;"+options.type;if(options.url!==""&&typeof options.url!=="undefined"){url+=options.url}if(options.content_type!==""&&typeof options.content_type!=="undefined"){queryOpts.push("content_type="+options.content_type)}if(options.selection_type!==""&&typeof options.selection_type!=="undefined"){queryOpts.push("&selection_type="+options.selection_type)}if(options.file_types!==""&&typeof options.file_types!=="undefined"){queryOpts.push("&file_types="+options.file_types)}if(options.file_types_description!==""&&typeof options.file_types_description!=="undefined"){queryOpts.push("&file_types_description="+options.file_types_description)}if(queryOpts.length)url+="?active_tab=browse_files&"+queryOpts.join("&");return $.asterion.dialog.open(url,{name:"asset_manager_browse",close:wrapped_callback})}};$.asterion.makePermalink=function(text){if(window.XRegExp){return XRegExp.replace(text.toLowerCase(),XRegExp("[^\\p{L}\\p{N}/\\-]","g"),"-").replace(/-{2,}/,"-")}else{return text.toLowerCase().replace(/[&#'"\(\)\:%\$\?\+;,?\/\s.]/g,"-").replace(/--+/g,"-")}};$.bind_function=function(func,obj){return function(){return func.apply(obj,$.makeArray(arguments))}};$.asterion.relativeDate=function(time){var date=new Date(parseInt(time,10)),diff=((new Date).getTime()-date.getTime())/1e3,day_diff=Math.floor(diff/86400);if(isNaN(day_diff)||day_diff<0||day_diff>=365)return"";return day_diff===0&&(diff<60&&I18n.t("js.time.just_now")||diff<120&&I18n.t("js.time.one_minute_ago")||diff<3600&&I18n.t("js.time.n_minutes_ago",{n:Math.floor(diff/60)})||diff<7200&&I18n.t("js.time.one_hour_ago")||diff<86400&&I18n.t("js.time.n_hours_ago",{n:Math.floor(diff/3600)}))||day_diff==1&&I18n.t("js.time.yesterday")||day_diff<7&&I18n.t("js.time.n_days_ago",{n:day_diff})||day_diff<31&&I18n.t("js.time.n_weeks_ago",{n:Math.ceil(day_diff/7)})||day_diff<360&&I18n.t("js.time.n_months_ago",{n:Math.ceil(day_diff/30)})||I18n.t("js.time.n_years_ago",{n:Math.ceil(day_diff/365)})};$.fn.relativeDate=function(){return this.each(function(){var date=$.asterion.relativeDate(this.title);if(date){$(this).text(date)}})};$.fn.replaceWith=function(content){return this.before(content).remove()};$.fn.disableSelection=function(){return this.each(function(){this.unselectable="on";this.onselectstart=function(){return false};if(this.style){this.style.MozUserSelect="none"}})};$.fn.reverse=[].reverse;$.fn.contains_coordinates=function(x,y,max_distance){max_distance=max_distance||0;var container=false;this.each(function(){var position=$(this).offset();position.right=position.left+$(this).get(0).offsetWidth;position.bottom=position.top+$(this).get(0).offsetHeight;var distance=Math.max(position.left-x,x-position.right,0)+Math.max(position.top-y,y-position.bottom,0);if(distance<=max_distance){container=$(this);return false}});return container};$.fn.overlap=function(x,y,axis){var container=$(this).contains_coordinates(x,y);if(!container)return false;var height=container.get(0).offsetHeight;var relative_position=y-container.offset().top;return relative_position/height};$.fn.observe=function(time,callback){return this.each(function(){var element=this,prevVal=$(element).serialize(),observer,newValConfirm;observer=setInterval(function(){if(!$j(element).parents("body")[0]){clearInterval(observer);return}var newVal;newVal=$(element).serialize();if(prevVal!=newVal){if(newVal==newValConfirm){newValConfirm="";prevVal=newVal;callback.call(element)}else{newValConfirm=newVal}}},time*1e3)})};$.fn.fadeOutAndRemove=function(duration,callback){var $this=$(this);if(!$this.length)return;if($.isFunction(duration)){callback=duration;duration=null}duration=duration||400;var lastItem=$this.last();var items=$this.not(lastItem);items.fadeOut(duration,function(){items.remove()});lastItem.fadeOut(duration,function(){$(this).remove();if($.isFunction(callback)){callback()}})};$.fn.ajaxScroll=function(options){var $this=$(this);var defaults={data:{},start:1,error:function(){return false},success:function(){return true}};options=$.extend(defaults,options);var in_progress=false;var inner_wrap=null;var prev_height=$this.height();$.asterion._ajax_page_counter=options.start;$(this).unbind("scroll");$(this).unbind("refresh");function load_content(refresh){refresh=refresh||false;in_progress=true;$.spinner().show();$.ajax($.extend({},options,{data:$.extend({page:$.asterion._ajax_page_counter},options.data),error:function(jqXHR,textStatus,errorThrown){$.spinner().hide();options.error.apply(this,arguments)},success:function(data,textStatus,jqXHR){$.spinner().hide();[].push.call(arguments,refresh);options.success.apply(this,arguments);$.asterion._ajax_page_counter++;var new_height=$this.height();if(new_height!=prev_height){prev_height=new_height}in_progress=false}}))}$this.scroll(function(e,refresh){inner_wrap=$(".ajax_scroll_inner_wrap",this);if(inner_wrap.length===0){$(this).wrapInner('<div class="ajax_scroll_inner_wrap"></div>');inner_wrap=$(".ajax_scroll_inner_wrap",this)}if(Math.ceil(this.scrollTop)>=this.scrollHeight-this.offsetHeight-10&&!in_progress){load_content()}});$this.bind("refresh",function(e){$.asterion._ajax_page_counter=1;load_content(true)})};$.extend($.fx.step,{backgroundPosition:function(fx){if(fx.state===0&&typeof fx.end==="string"){var start=$.curCSS(fx.elem,"backgroundPosition");start=$.asterion.parseBackgroundPosition(start);fx.start=[start[0],start[2]];var end=$.asterion.parseBackgroundPosition(fx.end);fx.end=[end[0],end[2]];fx.unit=[end[1],end[3]]}var nowPosX=[];nowPosX[0]=(fx.end[0]-fx.start[0])*fx.pos+fx.start[0]+fx.unit[0];nowPosX[1]=(fx.end[1]-fx.start[1])*fx.pos+fx.start[1]+fx.unit[1];fx.elem.style.backgroundPosition=nowPosX[0]+" "+nowPosX[1]}});$.ajaxSetup({converters:{"text asterionjavascript":function(textValue){return textValue}}});if($.ui){$.ui.draggable.prototype.reset_position=function(newCursorAt){var o=this.options;if(newCursorAt)o.cursorAt=$.extend(o.cursorAt,newCursorAt);this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()};if(o.cursorAt){if(o.cursorAt.left!==undefined)this.offset.click.left=o.cursorAt.left+this.margins.left;if(o.cursorAt.right!==undefined)this.offset.click.left=this.helperProportions.width-o.cursorAt.right+this.margins.left;if(o.cursorAt.top!==undefined)this.offset.click.top=o.cursorAt.top+this.margins.top;if(o.cursorAt.bottom!==undefined)this.offset.click.top=this.helperProportions.height-o.cursorAt.bottom+this.margins.top}};$.ui.sortable.prototype._originalIntersectsWithEdge=$.ui.sortable.prototype._intersectsWithEdge;$.ui.sortable.prototype._intersectsWithEdge=function(item){if(this.options.tolerance=="static"){var x1=this.positionAbs.left,x2=x1+this.helperProportions.width,y1=this.positionAbs.top,y2=y1+this.helperProportions.height;var l=item.left,r=l+item.width,t=item.top,b=t+item.height;var dyClick=this.offset.click.top,dxClick=this.offset.click.left;var isOverElement=y1+dyClick>t&&y1+dyClick<b&&x1+dxClick>l&&x1+dxClick<r;if(!isOverElement){return false}if(this.floating){return(l+r)/2>dxClick+x1?1:2}else{return(t+b)/2>dyClick+y1?1:2}return false}else{return this._originalIntersectsWithEdge(item)}}}$.fn.confirmAction=function(options){var settings={title:I18n.t("js.default_confirm_title"),message:I18n.t("js.default_confirm_msg"),action_button:I18n.t("js.default_confirm_action_button"),cancel_button:I18n.t("js.cancel"),click:function(){},error:function(jqXHR,textStatus,errorThrown){},success:function(content,textStatus,jqXHR){}};settings=$.extend(settings,options);$(document).on("click",this.selector,function(event){var $this=$(this),url=$this.attr("href");var execute_it=function(){$.ajax({url:url+"?confirm=true",dataType:"json",type:"POST",statusCode:{200:function(content,textStatus,jqXHR){settings.success.call($this,content,textStatus,jqXHR)}},error:function(jqXHR,textStatus,errorThrown){settings.error.call(jqXHR,textStatus,errorThrown)}})};if(settings.click.call(this,event,execute_it)===false){return false}var dialog_opts={title:$.isFunction(settings.title)?settings.title.call($this):settings.title,buttons:[{text:$.isFunction(settings.action_button)?settings.action_button.call($this):settings.action_button,click:function(){execute_it();$(this).dialog("close")}},{text:$.isFunction(settings.cancel_button)?settings.cancel_button.call($this):settings.cancel_button,click:function(){$(this).dialog("close")}}]};$.asterion.dialog.confirm($.isFunction(settings.message)?settings.message.call($this):settings.message,dialog_opts);return false})};$.fn.preload=function(callback){var $images=$("img",this),to_load=$images.length;if($images.length===0)callback();$images.each(function(){var img=new Image;img.src=this.src;img.onload=function(){to_load--;if(to_load<=0)callback()}})};$.fn.spinner=function(){var $spinner=$("#spinner");if(!$spinner.length)$spinner=$('<div id="spinner"></div>').hide();if(!$spinner.parent().length&&!$(this).length){if($.asterion.dialog&&$.asterion.dialog.visible()){$(".dialog_core",$.asterion.dialog.visibleDialog()).append($spinner)}else{$("body").append($spinner)}}if($(this).length)$(this).append($spinner);if($("body > #spinner").length){$spinner.css({position:"fixed"})}else{$spinner.css({position:"absolute"})}return $spinner};$.fn.attention=function(){$(this).css({backgroundColor:"#FFEAE8"}).animate({backgroundColor:"#fff"},1e3,function(){$(this).css("backgroundColor","transparent")})};$.fn.serializeObject=function(){var o={};var a=this.serializeArray();$.each(a,function(){if(o[this.name]){if(!o[this.name].push){o[this.name]=[o[this.name]]}o[this.name].push(this.value||"")}else{o[this.name]=this.value||""}});return o};$.extend({containerWidth:function(){var loc=$("#"+$.cookie("editing_location")),w=null,component=$('<div class="component"></div>'),component_content=$('<div class="component_content"></div>'),spacer=$("<div></div>");if($(loc).hasClass("location")){$(loc).append(component);component.append(component_content);component_content.append(spacer);w=spacer.width();component.remove()}else if($(loc).hasClass("component")){$(loc).append(component_content);component_content.append(spacer);w=spacer.width();component_content.remove()}else{w=loc.width()}return w},spinner:function(){return $().spinner()},browser:function(){var ie=function(){var v=3,div=document.createElement("div"),all=div.getElementsByTagName("i");while(div.innerHTML="\x3c!--[if gt IE "+ ++v+"]><i></i><![endif]--\x3e",all[0]);return v>4?v:false}();return{msie:ie,version:ie}}(),deparam:function(querystring){querystring=querystring.substring(querystring.indexOf("?")+1);var params={},queries=querystring.split("&"),temp;for(var i=0,l=queries.length;i<l;i++){temp=queries[i].split("=");params[temp[0]]=temp[1]}return params},decodeEntities:function(){var $element=$("<div>");function decodeHTMLEntities(str){if(str&&typeof str==="string"){str=str.replace(/<script[^>]*>([\S\s]*?)<\/script>/gim,"");str=str.replace(/<\/?\w(?:[^"'>]|"[^"]*"|'[^']*')*>/gim,"");str=$element.html(str).text();$element.html("")}return str}return decodeHTMLEntities}()});$(document).on("keyup",".sanitize",function(e){$(this).val(sanitize_filename($(this).val()))})})($j);String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")};String.prototype.permalink=function(){return this.replace(/\W+/g," ").trim().toLowerCase().replace(/\s+/g,"-")};function urldecode(str){return unescape(str.replace(/\+/g," "))}function flashMessage(message){var msg=$j("#flash_message");if(!msg.length)return;msg.html(message);msg.fadeIn("slow",function(){setTimeout(function(){msg.fadeOut("slow")},3e3)})}function padLeft(str,pad_limit,pad_with){str=String(str);pad_with=String(pad_with);var pad_length=pad_limit-str.length;for(i=0;i<pad_length;i++)str=pad_with+str;return str}function padRight(str,pad_limit,pad_with){str=String(str);pad_with=String(pad_with);var pad_length=pad_limit-str.length;for(i=0;i<pad_length;i++)str+=pad_with;return str}function sleep(ms){ms+=(new Date).getTime();while(new Date<ms){}}if(!Array.prototype.indexOf){Array.prototype.indexOf=function(obj,start){for(var i=start||0,j=this.length;i<j;i++){if(this[i]===obj){return i}}return-1}}function get_id(component,element_type){return $j(component).attr("id").replace(element_type+"_","")}function getId(element){var id=$j(element).attr("id");var matches=id.match(/_(\d+)$/);if(matches)return parseInt(matches[1]);return null}function show_loading_indicator(el,message){$j("#"+el).addClass("loading_indicator")}function remove_loading_indicator(){$j(".loading_indicator").removeClass("loading_indicator")}$j(document).on("component.drop",function(){$j(window).trigger("resize.twentytwenty");if(window.lightbox){window.lightbox.enable()}});function button_change(element){var checked=$j(element).is(":checked"),name=$j(element).attr("name");elements=$j("#label_"+name+", #div_"+name);if(checked){elements.addClass("asterion_button_change_on")}else{elements.removeClass("asterion_button_change_on")}}function submit_dialog_form(element_id){var form=$j(element_id).parents().andSelf().filter("form")[0];if(form){$j(form).submit();return false}}function dialog_form_disable(form){$j(form).addClass("disabled").find(".asterion_dialog_submit .dialog_button").addClass("button_disabled")}function dialog_form_enable(form){$j(form).removeClass("disabled").find(".asterion_dialog_submit .dialog_button").removeClass("button_disabled")}function sanitize_filename(filename){var regex=/[^0-9a-zA-Z\_]/g;if(regex.test(filename)){return filename.toLowerCase().replace(regex,"_")}else{return filename}}(function($){$.asterion=$.asterion||{};$.asterion.behaviors={removeScripts:function(){setTimeout(function(){$(".component:not(.html_component) script").remove()},1)},attachToRelativeDates:function(){$(".relative_date").relativeDate().removeClass("relative_date")},attachToDialogHeaders:function(){},attachToGraphicalSelect:function(){$("ul.account_selector").bind("mouseleave",function(){$(this).hide()});var select_items=$(".graphical_select");var images=select_items.find("img");var text=select_items.find("span");var inputs=select_items.find("input[type='radio']");var checked_input=$("input[type='radio']:checked").parent();checked_input.find("img").css("border","3px solid #3f98d7");checked_input.find("span").css("color","#3f98d7");inputs.css("display","none");images.click(function(){var list_item=$(this).parent().parent();list_item.find("input").get(0).checked="checked";images.css("border","3px solid #bfbeb6");text.css("color","#4F4B40");$(this).css("border","3px solid #3f98d7");list_item.find("span").css("color","#3f98d7")})},addLocationHelperClasses:function(){$(".location").each(function(loc){var bitem;var c=$(this).find(".component").removeClass("first last even odd").filter(":first").addClass("first").end().filter(":even").addClass("even").end().filter(":odd").addClass("odd").end().filter(":last").addClass("last").end();for(i=0;i<c.length;i++){bitem=$(c[i]).attr("class").match(/(item_\d+)/);if(bitem)$(c[i]).removeClass(bitem[0]);$(c[i]).addClass("item_"+i.toString())}})},attachToCodeEditors:function(){if($("#dialog_main iframe").length===0||$(".richtext_field").length!==0){$.each($(".code_editor"),function(){var editors=$("textarea",$.asterion.dialog.visibleDialog());var file_type=$(this).attr("class").split(" ")[1];var code_type=file_type=="html"?"xml":file_type;if(file_type=="js"){var parser_files=["parsejavascript.js","tokenizejavascript.js"]}else if(file_type=="html"){parser_files=["parsexml.js"]}else{parser_files=["parse"+file_type+".js"]}footer=$(".footer_dialog").length;width=footer?"97%":"960px";height=footer?"95%":"100%";var options={path:"/codemirror/js/",parserfile:parser_files,stylesheet:"/codemirror/css/"+code_type+"colors.css",height:height,width:width,lineNumbers:true,tabMode:"spaces",enterMode:"indent",autofocus:true};var editor=new CodeMirror.fromTextArea(this.id,options);window.$active_code_editor=editor;editors.css("visibility","visible");var $this=$(this),dialog=$.asterion.dialog.visibleDialog();$this.parents("form",dialog).data("codeMirror",editor);$this.parents("form",dialog).submit(function(e){$this.val(editor.getCode());$this.trigger("save",[e,editor.getCode()])})})}},attachToColorPicker:function(){$.each($(".color_picker_box"),function(){hex_raw=$(this).find(".hex_value").val();hex_value=hex_raw.match(/^(([a-fA-F0-9]){3}){1,2}$/)?hex_raw:"FFFFFF";$(this).find(".current_picker_color").css("backgroundColor","#"+hex_value);$(this).hover(function(){$(this).find(".color_picker_container").show()},function(){$(this).find(".color_picker_container").hide()});var that=this;$(this).find(".color_picker_container").ColorPicker({flat:true,color:"#00ff00",onChange:function(hsb,hex,rgb){hex_value=hex.match(/^(([a-fA-F0-9]){3}){1,2}$/)?hex:"FFFFFF";$(that).find(".current_picker_color").css("backgroundColor","#"+hex_value);$(that).find(".hex_value").val(hex_value).trigger("colorchange")}})})},attachToLengthListeners:function(){$("textarea.length_tracked").each(function(index,element){if(!$(element).attr("maxlength"))return;var countdown=$(element).siblings(".length_tracker").children(".length_countdown");var maxlength=$(element).attr("maxlength");countdown.text(maxlength-$(element).val().length);$(element).change(function(){countdown.text(maxlength-$(this).val().length)});$(element).keypress(function(){countdown.text(maxlength-$(this).val().length)})})}};$.createCallbacks($.asterion.behaviors,["attach","beforeSubmit","afterSubmitFailure"]);$.asterion.behaviors.attach($.asterion.behaviors.attachToCodeEditors);$.asterion.behaviors.attach($.asterion.behaviors.removeScripts);$.asterion.behaviors.attach($.asterion.behaviors.attachToGraphicalSelect);$.asterion.behaviors.attach($.asterion.behaviors.attachToRelativeDates);$.asterion.behaviors.attach($.asterion.behaviors.addLocationHelperClasses);$.asterion.behaviors.attach($.asterion.behaviors.attachToColorPicker);$.asterion.behaviors.attach($.asterion.behaviors.attachToLengthListeners);$.asterion.commentNotification=function(text){text=text.replace(/^\s+|\s+$/g,"");if(!text.length)return;if($("#comments_item").length==0)$("#asterion_top_row_nav").prepend('<li id="comments_item"></li>');$("#comments_item").html(text)};$(function(){$.asterion.behaviors.attach();$(document).ajaxComplete(function(){$.asterion.behaviors.attach()})});$(document).on("click","a.ajax_link",function(e){e.preventDefault();var link=$(this);var parent_dialog=link.parents(".dialog_scroll_wrapper");if(link.data("triggered")){return}link.data("triggered",true);$.ajax({url:$(this).attr("href"),dataType:"script",type:"POST",beforeSend:function(xhr){if(parent_dialog.data("current_url")){xhr.setRequestHeader("X-Asterion-Dialog-Referer",parent_dialog.data("current_url"))}xhr.setRequestHeader("Accept","text/javascript");if($.spinner&&$.spinner().is(":hidden")){$.spinner().show();$.spinner().data("is_ajaxy",true)}},complete:function(){link.removeData("triggered");if($.spinner&&$.spinner().is(":visible")&&$.spinner().data("is_ajaxy")){$.spinner().hide();$.spinner().data("is_ajaxy")}}})});$(document).on("submit","form.ajax_form",function(event){event.preventDefault();var form=this,$form=$(this);var options=arguments[1]||{};if($form.hasClass("disabled"))return false;dialog_form_disable(form);if($.asterion.behaviors.beforeSubmit(form)){var post_data={},processData=false,contentType="application/x-www-form-urlencoded; charset=UTF-8";if($form.hasClass("serialize_visible")){post_data=$(":input:visible, input[type=hidden]",form).serialize();processData=true}else if($form.hasClass("attachments")){post_data=new FormData($(this)[0]);contentType=false}else{post_data=$(form).serialize();processData=true}$.spinner().show();var parent_dialog=$(form).parents(".dialog_scroll_wrapper");$.ajax({url:$(form).attr("action"),data:post_data,dataType:"asterionjavascript",type:"post",cache:false,contentType:contentType,processData:processData,beforeSend:function(xhr){if(parent_dialog.data("current_url")){xhr.setRequestHeader("X-Asterion-Dialog-Referer",parent_dialog.data("current_url"))}},error:function(response,textStatus,errorThrown){$form.trigger("error",arguments);dialog_form_enable(form);if($.asterion.behaviors.afterSubmitFailure(response,textStatus,errorThrown)){$.globalEval(response)}$.spinner().hide()},success:function(response,textStatus){$form.trigger("success",arguments);if(typeof form.saved=="function"){form.saved()}if(typeof options.success=="function"&&!options.success()){return}$.globalEval(response);$.spinner().hide()},complete:function(){$form.trigger("complete",arguments);$.spinner().hide()}})}else{dialog_form_enable(form)}return false});$(document).on("mouseenter",".asterion_selection",function(){if($(this).hasClass("inactive"))return false;$(this).addClass("active");$(this).find("ul").show()}).on("mouseleave",".asterion_selection",function(){if($(this).hasClass("inactive"))return false;$(this).removeClass("active");$(this).find("ul").hide()});$("#component_editor_container .delete_blog_post").confirmAction({title:I18n.t("js.delete_blog_post_title"),message:I18n.t("js.delete_blog_post_confirm_msg"),action_button:I18n.t("js.delete_blog_post_button"),success:function(content,textStatus,jqXHR){var $this=$(this),url=$this.attr("href"),id=url.split("/").pop(),post=$(".blog_post_"+id);$(document).trigger("blog.delete",id);post.attention().fadeOut();var paging=$(".blog_component .paging_info b"),count=paging.html();if(count){count=count.replace(/([a-zA-Z ]+)?(\d+)/,function(match,$1,$2){var n=parseInt($2)-1;return!$1||n==1?n:$1+n});paging.html(count)}}});$(document).on("click","#dialog_wrapper .delete_blog_post",function(){var tr=$(this).closest("tr"),href=$(this).attr("href");var buttons={};buttons[I18n.t("js.delete_blog_post_button")]=function(){tr.css("backgroundColor","#fdd");$.ajax({url:href,dataType:"json",type:"post",error:function(response,textStatus,errorThrown){tr.css("backgroundColor","")},success:function(response,textStatus){$.asterion.dialog.reloadPageOnClose();tr.fadeOutAndRemove(function(){$.asterion.dialog.reload()})}});$(this).dialog("close")};buttons[I18n.t("js.cancel")]=function(){$(this).dialog("close")};var options={title:I18n.t("js.delete_blog_post_title"),buttons:buttons};var message=I18n.t("js.delete_blog_post_confirm_msg");$.asterion.dialog.confirm(message,options);return false});$(document).on("click","a.inline_delete_blog_post",function(e){var link=$(this),id=link.attr("id").replace(/post_/,"");post=$(".blog_post_"+id),href=link.attr("href");var buttons={};buttons[I18n.t("js.delete_blog_post_button")]=function(){$.ajax({url:href,dataType:"json",type:"post",error:function(response,textStatus,errorThrown){},success:function(response,textStatus){post.fadeOutAndRemove(function(){$(".delete_post_"+id).closest("div").remove()})}});$(this).dialog("close")};buttons[I18n.t("js.cancel")]=function(){$(this).dialog("close")};var options={title:I18n.t("js.delete_blog_post_title"),buttons:buttons};var message=I18n.t("js.delete_blog_post_confirm_msg");$.asterion.dialog.confirm(message,options);return false});$(document).on("click","#categories .edit_category",function(){var $this=$(this),$form=$("#edit_category form"),$name=$this.closest("tr").find("td.name"),name=$this.attr("alt");$form.data("editing",$name).attr("action",$this.attr("href"));$("#edit_category_name").val(name);$("#create_category").hide();$("#edit_category").show().attention();return false});$(document).on("click","#edit_category .cancel_edit",function(){$("#edit_category").fadeOut(200,function(){$("#create_category").fadeIn(200)});return false});$(document).on("submit","#edit_category form",function(){var $form=$(this);$.post($form.attr("action"),$form.serialize(),function(name){$form.data("editing").html(name).attr("alt",name).closest("tr").attention();$("#edit_category").fadeOut(200,function(){$("#create_category").fadeIn(200)})});return false});$("#categories .delete_category").confirmAction({title:I18n.t("js.delete_blog_category_title"),message:function(){var name=$(this).closest("tr").find("td.name").attr("abbr");return I18n.t("js.delete_blog_category_confirm_msg",{name:"<b>"+name+"</b>"})},action_button:function(){var name=$(this).closest("tr").find("td.name").attr("abbr");return I18n.t("js.delete_blog_category_button",{name:name})},success:function(content,textStatus,jqXHR){$(this).closest("tr").attention();$.asterion.dialog.reload()}});$(document).on("submit","#create_category_form",function(){var name=$("#category_name");if(name.val()=="")return false;var post_data=$(this).serialize();$.ajax({url:$(this).attr("action"),data:post_data,dataType:"json",type:"POST",error:function(response,textStatus,errorThrown){},success:function(response,textStatus){$.asterion.dialog.reload()}});return false});$(function(){setTimeout(function(){$("[data-animation]").on("inview",function(e){var $element=$(this);var animation=$element.attr("data-animation");if($element.hasClass(animation))return;if($element.hasClass("pre-animation")){$element.removeClass("pre-animation");var visible=$element.is(":visible");$element.addClass("pre-animation");if(!visible)return}$element.addClass(animation);setTimeout(function(){$element.removeClass("pre-animation")},500)}).on("mouseover",function(){var $element=$(this);var animation=$element.attr("data-animation");if(["spin","spinSlow","wavering"].indexOf(animation)==-1)return;$element.attr("data-animation-saved",$element.attr("data-animation")).removeAttr("data-animation").removeClass(animation)}).on("mouseout",function(){var $element=$(this);var animation=$element.attr("data-animation-saved");if(!animation)return;$element.attr("data-animation",$element.attr("data-animation-saved")).removeAttr("data-animation-saved").addClass(animation)})},100);$(document).on("click","[data-toggle-class]",function(evt){evt.preventDefault();$(this.hash).toggleClass($(this).data("toggle"))});$(".custom_component a > img").each(function(i,element){var img=$(element);var anchor=img.parent("a");if(!img.attr("title")){img.attr("title","Links to "+anchor.attr("href"))}})});$(document).on("click",'button[data-toggle="credential-logout"]',function(evt){evt.preventDefault();$.ajax("/resource/security/invalidate",{method:"POST",beforeSend:function(){$.spinner().show()}}).done(function(){$.spinner().hide()})});$(document).on("click",".credential_bar",function(evt){evt.preventDefault();var daddy=$(this).parents(".credential_logged_in");daddy.toggleClass("open")})})($j);(function($){$.asterion=$.asterion||{};$.asterion.mapComponent={setupMap:function(map_element,id,data){var latlng=new google.maps.LatLng(data.center[0],data.center[1]);var options={zoom:data.zoom,styles:eval(data.styles),center:latlng,mapTypeControl:true,mapTypeControlOptions:{style:google.maps.MapTypeControlStyle.DROPDOWN_MENU},mapTypeId:google.maps.MapTypeId.ROADMAP,navigationControl:true,navigationControlOptions:{style:google.maps.NavigationControlStyle.DEFAULT}};var map=new google.maps.Map(document.getElementById(map_element),options);if(data.allow_directions===true){var directionsDisplay=new google.maps.DirectionsRenderer({draggable:true});var directionsPanel=map_element+"_panel";directionsDisplay.setMap(map);directionsDisplay.setPanel(document.getElementById(directionsPanel));$j("#component_"+id+"_google_map_directions_form").submit(function(){$j.asterion.mapComponent.directions(directionsDisplay,directionsPanel,$j("#component_"+id+"_google_map_directions_form input#start_point").val(),data.center[0]+","+data.center[1]);return false})}var marker=new google.maps.Marker({position:latlng,title:"",map:map});var markerHtml=data.marker_content;if(markerHtml){var infoWindow=new google.maps.InfoWindow({content:"<div>"+markerHtml+"</div>"});infoWindow.open(map,marker);google.maps.event.addListener(marker,"click",function(){infoWindow.open(map,marker)})}if(data.feed_url!==""){$j.asterion.mapComponent.loadFeed(map,data.feed_url)}},setupAdminMap:function(map,data){var admin_latlng=new google.maps.LatLng(data.center[0],data.center[1]);var admin_options={zoom:data.zoom,styles:eval(data.styles),center:admin_latlng,mapTypeControl:true,mapTypeControlOptions:{style:google.maps.MapTypeControlStyle.DROPDOWN_MENU},mapTypeId:google.maps.MapTypeId.ROADMAP,navigationControl:true,navigationControlOptions:{style:google.maps.NavigationControlStyle.DEFAULT}};var admin_map=new google.maps.Map(document.getElementById(map),admin_options);$(document).on("map_style_change",function(e){var styles=eval(e.message);admin_map.setOptions({styles:styles})});var admin_marker=new google.maps.Marker({position:admin_latlng,title:"",draggable:true,map:admin_map});google.maps.event.addListener(admin_marker,"dragend",function(){$j("input#component_latitude").val(admin_marker.getPosition().lat());$j("input#component_longitude").val(admin_marker.getPosition().lng())});google.maps.event.addListener(admin_map,"zoom_changed",function(){$j("input#component_zoom").val(admin_map.getZoom())});$j.asterion.mapComponent.adminMarker=admin_marker;$j.asterion.mapComponent.adminMap=admin_map;if(data.feed_url!==""){$j.asterion.mapComponent.loadFeed(admin_map,data.feed_url)}},lookupAddress:function(address_id){var address=$("#"+address_id).get(0).value;var geocoder=new google.maps.Geocoder;var lookup_map=$j.asterion.mapComponent.adminMap;var lookup_marker=$j.asterion.mapComponent.adminMarker;geocoder.geocode({address:address},function(results,status){if(status==google.maps.GeocoderStatus.OK){$j("#geocode_errors").html("");lookup_map.setCenter(results[0].geometry.location);lookup_marker.setPosition(results[0].geometry.location);google.maps.event.trigger($.asterion.mapComponent.adminMarker,"dragend");if($("textarea#component_marker_content").length){$("textarea#component_marker_content").val(results[0].formatted_address);var markerHtml=results[0].formatted_address;var infoWindow=new google.maps.InfoWindow({content:"<div>"+markerHtml+"</div>"});infoWindow.open(lookup_map,lookup_marker)}}else{$j("#geocode_errors").html(I18n.t("js.could_not_find_address",{status:status}))}})},addFeed:function(url){var map=$j.asterion.mapComponent.adminMap;$j.asterion.mapComponent.loadFeed(map,url)},directions:function(display,panel,start,end){var directionsService=new google.maps.DirectionsService;var request={origin:start,destination:end,travelMode:google.maps.DirectionsTravelMode.DRIVING};directionsService.route(request,function(response,status){if(status==google.maps.DirectionsStatus.OK){$j("#"+panel).empty();display.setDirections(response)}else{$j("#"+panel).empty().html("<p>"+I18n.t("js.could_not_find_route")+"<p>")}})},loadFeed:function(map,url){var feedLayer=new google.maps.KmlLayer(url);feedLayer.setMap(map)}}})($j);(function($){$.asterion=$.asterion||{};$.asterion.videoPlayerComponent={updateBuffering:function(component_id,is_buffering){var progress_width=$j("#"+component_id+" .video_player_controls .progress").width()-$j("#"+component_id+" .video_player_controls .progress .total_time").width()*2-25;$j("#"+component_id+" .video_player_controls .progress_bar").css("width",progress_width);if(is_buffering){$j("#"+component_id+" .video_player_controls .is_buffering").css("display","block")}else{$j("#"+component_id+" .video_player_controls .is_buffering").css("display","none")}},updateLoadedBytes:function(component_id,bytes,total_bytes){$j("#"+component_id+" .video_player_controls .loaded_bytes").text(bytes);$j("#"+component_id+" .video_player_controls .total_bytes").text(total_bytes);var percent=bytes/total_bytes;var progress_bar_width=$j("#"+component_id+" .video_player_controls .progress_bar").width();var bar_width=progress_bar_width*percent;$j("#"+component_id+" .video_player_controls .progress_bar .buffer_progress_bar").width(bar_width);$j("#"+component_id+" .video_player_controls .progress_bar .panner").width(bar_width)},updateCurrentTime:function(component_id,time,total_time,time_string,total_time_string){$j("#"+component_id+" .video_player_controls .current_time").text(time_string);$j("#"+component_id+" .video_player_controls .total_time").text(total_time_string);var percent=time/total_time;var progress_bar_width=$j("#"+component_id+" .video_player_controls .progress_bar").width();var bar_width=progress_bar_width*percent;$j("#"+component_id+" .video_player_controls .progress_bar .playback_progress_bar").width(bar_width);$j("#"+component_id+" .video_player_controls .progress_bar .playhead").css("left",bar_width+"px")},playbackComplete:function(component_id){},playStateChange:function(component_id,play_state){if(play_state=="paused"){$j("#"+component_id+" .video_player_controls .playback_button").removeClass("pause_button").addClass("play_button")}else if(play_state=="playing"){$j("#"+component_id+" .video_player_controls .playback_button").removeClass("play_button").addClass("pause_button")}},currentVolume:function(component_id,volume){volumeChanged(component_id,volume)},muteChanged:function(component_id,muted){if(muted===true){$j("#"+component_id+" .video_player_controls .volume .toggle_mute").removeClass("active").addClass("muted")}else{$j("#"+component_id+" .video_player_controls .volume .toggle_mute").removeClass("muted").addClass("active")}},volumeChanged:function(component_id,volume){switch(volume){case 1:$j("#"+component_id+" .video_player_controls .volume").removeClass("percent_66").removeClass("percent_33").removeClass("percent_0").addClass("percent_100");break;case.66:$j("#"+component_id+" .video_player_controls .volume").removeClass("percent_100").removeClass("percent_33").removeClass("percent_0").addClass("percent_66");break;case.33:$j("#"+component_id+" .video_player_controls .volume").removeClass("percent_66").removeClass("percent_100").removeClass("percent_0").addClass("percent_33");break;case 0:$j("#"+component_id+" .video_player_controls .volume").removeClass("percent_66").removeClass("percent_33").removeClass("percent_100").addClass("percent_0");break;default:$j("#"+component_id+" .video_player_controls .volume").removeClass("percent_66").removeClass("percent_33").removeClass("percent_0").addClass("percent_100");break}},togglePlayback:function(flash_object){document.getElementById(flash_object).togglePlayback()},setVolume:function(flash_object,volume){document.getElementById(flash_object).setVolume(volume)},toggleMute:function(flash_object){document.getElementById(flash_object).toggleMute()},panTo:function(flash_object,time){document.getElementById(flash_object).panTo(time)},replay:function(flash_object){document.getElementById(flash_object).replay()},setup:function(component_id){$j("#"+component_id+" .video_player_container").bind("mouseenter",function(){$j(".video_player_caption",this).animate({height:"show",opacity:"show"},"slow");$j(".video_player_controls",this).animate({height:"show",opacity:"show"},"slow")}).bind("mouseleave",function(){$j(".video_player_caption",this).animate({height:"hide",opacity:"hide"},"slow");$j(".video_player_controls",this).animate({height:"hide",opacity:"hide"},"slow")});$j("#"+component_id+" .panner").click(function(e){flash_object="video_player_"+component_id.replace(/component_/,"");var position=e.pageX-$j(this).offset().left;var width=$j(this).width();var percentage=position/width;var time=$j("#"+component_id+" .video_player_controls .total_time").text().split(":");var converted_time=parseInt(time[0]*60,10)+parseInt(time[1],10);var calculated=converted_time*percentage;$j.asterion.videoPlayerComponent.panTo(flash_object,calculated)})}}})($j);(function($){$.fn.asterion_expandable=function(options){var url=options.url||"",params=options.params||{},template=options.template||function(data){return I18n.t("js.no_template_found")},listener=function(){var self=$(this),pending=false,clicked=function(event){var etarget=$(event.target),ajax_response=function(data){pending=false;etarget.removeClass("loading");etarget.after(template(data));$(etarget.siblings()[0]).slideToggle();etarget.toggleClass("asterion_expand asterion_collapsed")};if(etarget.is("a")&&etarget.parent().is("li")){if(etarget.siblings().length===0&&pending!==true){etarget.addClass("loading");pending=true;$.ajax({type:"GET",url:url+etarget.attr("id"),data:params,cache:false,success:ajax_response,dataType:"json"})}else if(pending!==true){$(etarget.siblings()[0]).slideToggle();etarget.toggleClass("asterion_expand asterion_collapsed")}}};self.bind("click",clicked)};return this.each(listener)}})($j);(function($){$.asterion=$.asterion||{};$.asterion.Modal=function(content){var body;var object;var domID;var options={name:"main",force:false,reload_on_close:false,loaded:function(){},show:function(){},shown:function(){},close:function(){},closed:function(){}};var self=this;var listenToForm;this.source=null;if(arguments[1]){$.extend(options,arguments[1])}this.show=function(){prepareDocument();loadContent(doShow)};this.hide=function(){log("Hide invoked with arguments:");log(arguments);var localOptions={force:false};if(arguments[0]&&arguments[0]instanceof Object){$.extend(localOptions,arguments[0])}if(options["close"]){options.close(self)}log("Are we being forced? "+localOptions.force);if(localOptions.force){destroy();return}if(listenToForm){var currentState=listenToForm.serializeArray();if(JSON.stringify(currentState)!==JSON.stringify(listenToForm.data("original-form-state"))){if(listenToForm.hasClass("confirm_leave_save")){$.asterion.Modal.confirm(I18n.t("js.save_changes_msg"),{title:I18n.t("js.save_changes"),buttons:[{label:I18n.t("js.save"),click:function(modal){modal.hide({force:true});listenToForm.submit()},type:"ok"},{label:I18n.t("js.discard"),click:function(modal){modal.hide({force:true});destroy()},type:"cancel"}]})}else if(listenToForm.hasClass("confirm_leave_discard")){$.asterion.Modal.confirm(I18n.t("js.discard_changes_msg"),{title:I18n.t("js.save_changes"),buttons:[{label:I18n.t("js.ok"),click:function(modal){modal.hide({force:true});destroy()},type:"ok"},{label:I18n.t("js.cancel"),click:function(modal){modal.hide({force:true})},type:"cancel"}]})}}else{destroy()}}else{destroy()}};this.supersede=function(){$(".subordinate_overlay",self.object).show()};this.restore=function(){$(".subordinate_overlay",self.object).hide()};this.setFooter=function(footer){content["footer"]=footer};this.reloadPageOnClose=function(){options.reload_on_close=true};this.getObject=function(){return object};this.getDomID-function(){return domID};function destroy(){var index=$.asterion.Modal.active.indexOf(self);if(index===-1)return false;$.asterion.Modal.active.splice(index,1);object.remove();if(options["closed"]){options.closed(self)}var next=$.asterion.Modal.visible();if(next){next.restore()}cleanDocument();if(options.reload_on_close){setTimeout(function(){$.spinner().show();location.reload(true)},5)}return true}function loadContent(callback){if(typeof content==="string"){loadURL(content,callback)}else if(content instanceof Object){this.source="dynamic";callback(content)}else{log("Unable to locate supplied contnet");log(content);throw new $.asterion.Modal.ContentException("Unloadable content")}}function loadURL(url,callback){var referrer=$.asterion.Modal.visible()?$.asterion.Modal.visible().referrer:false;var data=options.data||{};self.source=url;data["format"]="json";$.spinner().show();$.ajax({url:url,type:"get",data:data,beforeSend:function(xhr){xhr.setRequestHeader("X-Asterion-Invoker","modal");if(referrer){xhr.setRequestHeader("X-Asterion-Dialog-Referer",referrer)}},success:callback,error:function(response){log("A Fatal error occurred trying to load the modal content");log("URL: "+url);log("Data: ");log(data);log("Response:");log(response);if(response.responseText==="Authorization required"){$.asterion.Modal.alert($.asterion.dialog.markup.authenticationError,{title:I18n.t("js.session_expired")})}else{$.asterion.Modal.alert($.asterion.dialog.markup.error,{title:I18n.t("js.error_loading_dialog"),okay:function(modal){window.location="/";modal.hide({force:true})}})}}})}function log(msg){if(window["console"]){console.log(msg)}}function doShow(response){console.log("--- BEGIN DOSHOW RESPONSE ---");console.log(response);console.log("--- END DOSHOW RESPONSE ---");$.extend(options,response);console.log("--- BEGIN DOSHOW OPTIONS ---");console.log(options);console.log("--- END DOSHOW OPTIONS ---");$.spinner().hide();if(options["loaded"]){options.loaded(self,response)}var modal=$("<article />",{id:"modal_"+options.name,class:"modal_container "+options.size,css:{"z-index":++$.asterion.Modal.currentZ}});body=response;object=modal;modal.append(createHeader(options));modal.append(createMain(options));if(options["footer"]){response["footer"]=options.footer}if(response["footer"]){modal.append(createFooter(options))}modal.append($("<div />",{class:"subordinate_overlay"}));modal.data("modal",self);var last=$.asterion.Modal.visible();if(last){last.supersede()}if(options["show"]){options.show(self)}$("#modal_wrapper").append(modal);$.asterion.Modal.active.push(self);registerListeners();if(options["shown"]){options.shown(self)}console.log("Triggering");$(document).trigger("dialog-content-loaded",[object])}function registerListeners(){var listenForSave=$("form.confirm_leave, form.confirm_leave_save, form.confirm_leave_discard",self.getObject());if(listenForSave.length>0){listenToForm=listenForSave.first();listenToForm.data("original-form-state",listenToForm.serializeArray());listenToForm.submit(function(){$(this).data("original-form-state",$(this).serializeArray())})}}function createHeader(response){var header=$("<header />");var tools=$("<ul />",{class:"tools"});for(var i in response.tools){tools.append($("<li />").html(response.tools[i]))}if(!response.tools||response.tools.length===0){if(response.help&&response.help.path&&response.help.label){tools.append($("<li />").append($("<a />",{href:response.help.path,class:"general transparent mini dialog_button icon white_question_icon","data-dialog-action":"link",target:"_blank"}).html(response.help.label)))}tools.append($("<li />").append($("<button />",{class:"dialog_button bare","data-dialog-action":"close"}).html("×")))}header.append("<h1>"+response.heading+"</h1>");header.append(tools);return header}function createMain(response){var main=$("<main />");main.append(createSection(response));return main}function createSection(response){var section=$("<section />",{class:"modal_body"});section.html(response.content);return section.cleanModalContent()}function createFooter(response){var footer=$("<footer />");if(typeof response.footer==="string"){footer.html(response.footer)}else if(response.footer instanceof jQuery||response.footer instanceof $j){footer.append(response.footer)}else{throw new $.asterion.Modal.ContentException("Invalid/unknown footer content")}return footer}function prepareDocument(){if($("#modal_wrapper").length===0){var wrapper=$("<section />",{id:"modal_wrapper"}).appendTo(document.body);wrapper.append($("<div />",{id:"modal_content_overlay"}))}}function cleanDocument(){var wrapper=$("#modal_wrapper");if($(".modal_container",wrapper).length===0){wrapper.remove()}}};$.asterion.Modal.active=[];$.asterion.Modal.currentZ=16384;$.asterion.Modal.pop=function(){if($.asterion.Modal.active.length===0){return false}var window=$.asterion.Modal.visible();window.hide.apply(window,arguments)};$.asterion.Modal.open=function(content){var modal=new $.asterion.Modal(content,arguments[1]||{});modal.show();return modal};$.asterion.Modal.visible=function(){if($.asterion.Modal.active.length===0){return false}return $.asterion.Modal.active[$.asterion.Modal.active.length-1]};$.asterion.Modal.findByID=function(id){for(var i in $.asterion.Modal.active){if($.asterion.Modal.active[i].getDomID()===id){return $.asterion.Modal.active[i]}}return false};$.asterion.Modal.reloadPageOnClose=function(){var modal=$.asterion.Modal.visible();modal.reloadPageOnClose();return modal};$.asterion.Modal.openLink=function(anchor){var href=urldecode(anchor.href);var pathname=urldecode(anchor.pathname);var url=href.substr(href.indexOf(pathname));if(url.substring(0,1)!=="/"){url="/"+url}return $.asterion.Modal.open(url)};$.asterion.Modal.confirm=function(message){var options=arguments[1]||{};function buildButton(specs,modal){var button=$("<button />",{class:"dialog_button "+(specs["type"]||"action")}).text(specs.label);button.click(function(evt){evt.preventDefault();evt.stopPropagation();specs.click(modal)});return button}var defaults={name:"confirm",title:"Confirm",buttons:[{label:"Okay",click:function(modal){active.okay(modal);modal.hide()},type:"ok"},{label:"Cancel",click:function(modal){active.cancel(modal);modal.hide()},type:"cancel"}],okay:function(modal){},cancel:function(modal){}};var active=$.extend({},defaults,options);var modal=new $.asterion.Modal({size:"alert",help_path:null,heading:active.title,tools:[],tabs:[],content:message},active);var footer=$("<nav />",{class:"modal_footer_buttonbar"});if(active["buttons"]){for(var i in active.buttons){footer.append(buildButton(active.buttons[i],modal))}}console.log("--- BEGIN CONFIRM FOOTER ---");console.log(footer);console.log("--- END CONFIRM FOOTER ---");modal.setFooter(footer);modal.show()};$.asterion.Modal.alert=function(message){var options=arguments[1]||{};var defaults={name:"alert",title:"Attention",buttons:[{label:"Okay",click:function(modal){active.okay(modal)},type:"ok"}],okay:function(modal){modal.hide({force:true});if(options["callback"]){options.callback()}}};var active=$.extend({},defaults,options);$.asterion.Modal.confirm(message,active)};$.asterion.Modal.ContentException=function(message){this.message=message;this.toString=function(){return"Content Exception: "+this.message}};$.fn.parentModal=function(){if(this.length===0)return false;var parent=this.first().parents(".modal_container");if(parent.length===0)return false;return parent.first().data("modal")};$.fn.cleanModalContent=function(){$("[data-dialog-action]",this).removeAttr("onclick");return this};$(function($){$(document).on("click","a.modal_link",function(evt){evt.preventDefault();$.asterion.Modal.openLink(this)});$(document).on("click",".modal_container [data-dialog-action]",function(evt){var action=$(this).data("dialog-action");if(["submit","link"].indexOf(action)>-1)return true;evt.preventDefault();evt.stopPropagation();var modal=$(this).parentModal();switch(action){case"cancel":case"done":case"close":modal.hide();break;default:$.asterion.Modal.alert('Unknown button action "'+action+"'")}});$(document).on("click",".modal_body ul.modal_tabs a",function(evt){evt.preventDefault();var parentLI=$(this).parent("li");var parentUL=parentLI.parent("ul.modal_tabs");var parentTabbing=parentUL.parent(".modal_tabbing");if(parentLI.is(".active")){return}var activeLI=parentUL.find("li.active");var activePanel=$(activeLI.find("a").attr("href"));var targetPanel=$($(this).attr("href"));activeLI.removeClass("active");activePanel.removeClass("active");parentLI.addClass("active");targetPanel.addClass("active")});$(document).on("click",".modal_body a.modal_ajax_link",function(evt){evt.preventDefault();var source=$(this);if(source.data("confirm")){if(!confirm(source.data("confirm"))){return false}}$.ajax(source.attr("href"),{dataType:"script",type:"POST",beforeSend:function(){$.spinner().show()},error:function(){$.asterion.Modal.alert("Unhandled failure condition")},complete:function(){$.spinner().hide()}})});$(document).on("submit",".modal_body form.modal_ajax_form",function(evt){evt.preventDefault();var source=$(this);if(source.prop("disabled"))return false;$.ajax(source.attr("action"),{data:source.serialize(),dataType:"script",type:source.attr("method")||"POST",cache:false,beforeSend:function(){$.spinner().show();source.prop("disabled",true)},error:function(){$.asterion.Modal.alert("Unhandled failure condition")},complete:function(){$.spinner().hide();source.prop("disabled",false)}})})})})($j);(function(module){if(typeof define==="function"&&define.amd){define(["jquery"],module)}else{module(jQuery)}})(function(jQuery,undefined){var threshold=6,add=jQuery.event.add,remove=jQuery.event.remove,trigger=function(node,type,data){jQuery.event.trigger(type,data,node)},requestFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(fn,element){return window.setTimeout(function(){fn()},25)}}(),ignoreTags={textarea:true,input:true,select:true,button:true},mouseevents={move:"mousemove",cancel:"mouseup dragstart",end:"mouseup"},touchevents={move:"touchmove",cancel:"touchend",end:"touchend"};function Timer(fn){var callback=fn,active=false,running=false;function trigger(time){if(active){callback();requestFrame(trigger);running=true;active=false}else{running=false}}this.kick=function(fn){active=true;if(!running){trigger()}};this.end=function(fn){var cb=callback;if(!fn){return}if(!running){fn()}else{callback=active?function(){cb();fn()}:fn;active=true}}}function returnTrue(){return true}function returnFalse(){return false}function preventDefault(e){e.preventDefault()}function preventIgnoreTags(e){if(ignoreTags[e.target.tagName.toLowerCase()]){return}e.preventDefault()}function isLeftButton(e){return e.which===1&&!e.ctrlKey&&!e.altKey}function identifiedTouch(touchList,id){var i,l;if(touchList.identifiedTouch){return touchList.identifiedTouch(id)}i=-1;l=touchList.length;while(++i<l){if(touchList[i].identifier===id){return touchList[i]}}}function changedTouch(e,event){var touch=identifiedTouch(e.changedTouches,event.identifier);if(!touch){return}if(touch.pageX===event.pageX&&touch.pageY===event.pageY){return}return touch}function mousedown(e){var data;if(!isLeftButton(e)){return}data={target:e.target,startX:e.pageX,startY:e.pageY,timeStamp:e.timeStamp};add(document,mouseevents.move,mousemove,data);add(document,mouseevents.cancel,mouseend,data)}function mousemove(e){var data=e.data;checkThreshold(e,data,e,removeMouse)}function mouseend(e){removeMouse()}function removeMouse(){remove(document,mouseevents.move,mousemove);remove(document,mouseevents.cancel,mouseend)}function touchstart(e){var touch,template;if(ignoreTags[e.target.tagName.toLowerCase()]){return}touch=e.changedTouches[0];template={target:touch.target,startX:touch.pageX,startY:touch.pageY,timeStamp:e.timeStamp,identifier:touch.identifier};add(document,touchevents.move+"."+touch.identifier,touchmove,template);add(document,touchevents.cancel+"."+touch.identifier,touchend,template)}function touchmove(e){var data=e.data,touch=changedTouch(e,data);if(!touch){return}checkThreshold(e,data,touch,removeTouch)}function touchend(e){var template=e.data,touch=identifiedTouch(e.changedTouches,template.identifier);if(!touch){return}removeTouch(template.identifier)}function removeTouch(identifier){remove(document,"."+identifier,touchmove);remove(document,"."+identifier,touchend)}function checkThreshold(e,template,touch,fn){var distX=touch.pageX-template.startX,distY=touch.pageY-template.startY;if(distX*distX+distY*distY<threshold*threshold){return}triggerStart(e,template,touch,distX,distY,fn)}function handled(){this._handled=returnTrue;return false}function flagAsHandled(e){e._handled()}function triggerStart(e,template,touch,distX,distY,fn){var node=template.target,touches,time;touches=e.targetTouches;time=e.timeStamp-template.timeStamp;template.type="movestart";template.distX=distX;template.distY=distY;template.deltaX=distX;template.deltaY=distY;template.pageX=touch.pageX;template.pageY=touch.pageY;template.velocityX=distX/time;template.velocityY=distY/time;template.targetTouches=touches;template.finger=touches?touches.length:1;template._handled=handled;template._preventTouchmoveDefault=function(){e.preventDefault()};trigger(template.target,template);fn(template.identifier)}function activeMousemove(e){var timer=e.data.timer;e.data.touch=e;e.data.timeStamp=e.timeStamp;timer.kick()}function activeMouseend(e){var event=e.data.event,timer=e.data.timer;removeActiveMouse();endEvent(event,timer,function(){setTimeout(function(){remove(event.target,"click",returnFalse)},0)})}function removeActiveMouse(event){remove(document,mouseevents.move,activeMousemove);remove(document,mouseevents.end,activeMouseend)}function activeTouchmove(e){var event=e.data.event,timer=e.data.timer,touch=changedTouch(e,event);if(!touch){return}e.preventDefault();event.targetTouches=e.targetTouches;e.data.touch=touch;e.data.timeStamp=e.timeStamp;timer.kick()}function activeTouchend(e){var event=e.data.event,timer=e.data.timer,touch=identifiedTouch(e.changedTouches,event.identifier);if(!touch){return}removeActiveTouch(event);endEvent(event,timer)}function removeActiveTouch(event){remove(document,"."+event.identifier,activeTouchmove);remove(document,"."+event.identifier,activeTouchend)}function updateEvent(event,touch,timeStamp,timer){var time=timeStamp-event.timeStamp;event.type="move";event.distX=touch.pageX-event.startX;event.distY=touch.pageY-event.startY;event.deltaX=touch.pageX-event.pageX;event.deltaY=touch.pageY-event.pageY;event.velocityX=.3*event.velocityX+.7*event.deltaX/time;event.velocityY=.3*event.velocityY+.7*event.deltaY/time;event.pageX=touch.pageX;event.pageY=touch.pageY}function endEvent(event,timer,fn){timer.end(function(){event.type="moveend";trigger(event.target,event);return fn&&fn()})}function setup(data,namespaces,eventHandle){add(this,"movestart.move",flagAsHandled);return true}function teardown(namespaces){remove(this,"dragstart drag",preventDefault);remove(this,"mousedown touchstart",preventIgnoreTags);remove(this,"movestart",flagAsHandled);return true}function addMethod(handleObj){if(handleObj.namespace==="move"||handleObj.namespace==="moveend"){return}add(this,"dragstart."+handleObj.guid+" drag."+handleObj.guid,preventDefault,undefined,handleObj.selector);add(this,"mousedown."+handleObj.guid,preventIgnoreTags,undefined,handleObj.selector)}function removeMethod(handleObj){if(handleObj.namespace==="move"||handleObj.namespace==="moveend"){return}remove(this,"dragstart."+handleObj.guid+" drag."+handleObj.guid);remove(this,"mousedown."+handleObj.guid)}jQuery.event.special.movestart={setup:setup,teardown:teardown,add:addMethod,remove:removeMethod,_default:function(e){var event,data;if(!e._handled()){return}function update(time){updateEvent(event,data.touch,data.timeStamp);trigger(e.target,event)}event={target:e.target,startX:e.startX,startY:e.startY,pageX:e.pageX,pageY:e.pageY,distX:e.distX,distY:e.distY,deltaX:e.deltaX,deltaY:e.deltaY,velocityX:e.velocityX,velocityY:e.velocityY,timeStamp:e.timeStamp,identifier:e.identifier,targetTouches:e.targetTouches,finger:e.finger};data={event:event,timer:new Timer(update),touch:undefined,timeStamp:undefined};if(e.identifier===undefined){add(e.target,"click",returnFalse);add(document,mouseevents.move,activeMousemove,data);add(document,mouseevents.end,activeMouseend,data)}else{e._preventTouchmoveDefault();add(document,touchevents.move+"."+e.identifier,activeTouchmove,data);add(document,touchevents.end+"."+e.identifier,activeTouchend,data)}}};jQuery.event.special.move={setup:function(){add(this,"movestart.move",jQuery.noop)},teardown:function(){remove(this,"movestart.move",jQuery.noop)}};jQuery.event.special.moveend={setup:function(){add(this,"movestart.moveend",jQuery.noop)},teardown:function(){remove(this,"movestart.moveend",jQuery.noop)}};add(document,"mousedown.move",mousedown);add(document,"touchstart.move",touchstart);if(typeof Array.prototype.indexOf==="function"){(function(jQuery,undefined){var props=["changedTouches","targetTouches"],l=props.length;while(l--){if(jQuery.event.props.indexOf(props[l])===-1){jQuery.event.props.push(props[l])}}})(jQuery)}});(function($){$.fn.twentytwenty=function(options){options=$.extend({default_offset_pct:.5,orientation:"horizontal",before_label:"Before",after_label:"After",no_overlay:false,move_slider_on_hover:false,move_with_handle_only:true,click_to_move:false},options);return this.each(function(){var sliderPct=options.default_offset_pct;var container=$(this);var sliderOrientation=options.orientation;var beforeDirection=sliderOrientation==="vertical"?"down":"left";var afterDirection=sliderOrientation==="vertical"?"up":"right";container.wrap("<div class='twentytwenty-wrapper twentytwenty-"+sliderOrientation+"'></div>");if(!options.no_overlay){container.append("<div class='twentytwenty-overlay'></div>");var overlay=container.find(".twentytwenty-overlay");overlay.append("<div class='twentytwenty-before-label' data-content='"+options.before_label+"'></div>");overlay.append("<div class='twentytwenty-after-label' data-content='"+options.after_label+"'></div>")}var beforeImg=container.find("img:first");var afterImg=container.find("img:last");container.append("<div class='twentytwenty-handle'></div>");var slider=container.find(".twentytwenty-handle");slider.append("<span class='twentytwenty-"+beforeDirection+"-arrow'></span>");slider.append("<span class='twentytwenty-"+afterDirection+"-arrow'></span>");container.addClass("twentytwenty-container");beforeImg.addClass("twentytwenty-before");afterImg.addClass("twentytwenty-after");var calcOffset=function(dimensionPct){var w=beforeImg.width();var h=beforeImg.height();return{w:w+"px",h:h+"px",cw:dimensionPct*w+"px",ch:dimensionPct*h+"px"}};var adjustContainer=function(offset){if(sliderOrientation==="vertical"){beforeImg.css("clip","rect(0,"+offset.w+","+offset.ch+",0)");afterImg.css("clip","rect("+offset.ch+","+offset.w+","+offset.h+",0)")}else{beforeImg.css("clip","rect(0,"+offset.cw+","+offset.h+",0)");afterImg.css("clip","rect(0,"+offset.w+","+offset.h+","+offset.cw+")")}container.css("height",offset.h)};var adjustSlider=function(pct){var offset=calcOffset(pct);slider.css(sliderOrientation==="vertical"?"top":"left",sliderOrientation==="vertical"?offset.ch:offset.cw);adjustContainer(offset)};var minMaxNumber=function(num,min,max){return Math.max(min,Math.min(max,num))};var getSliderPercentage=function(positionX,positionY){var sliderPercentage=sliderOrientation==="vertical"?(positionY-offsetY)/imgHeight:(positionX-offsetX)/imgWidth;return minMaxNumber(sliderPercentage,0,1)};$(window).on("resize.twentytwenty",function(e){adjustSlider(sliderPct)});var offsetX=0;var offsetY=0;var imgWidth=0;var imgHeight=0;var onMoveStart=function(e){if((e.distX>e.distY&&e.distX<-e.distY||e.distX<e.distY&&e.distX>-e.distY)&&sliderOrientation!=="vertical"){e.preventDefault()}else if((e.distX<e.distY&&e.distX<-e.distY||e.distX>e.distY&&e.distX>-e.distY)&&sliderOrientation==="vertical"){e.preventDefault()}container.addClass("active");offsetX=container.offset().left;offsetY=container.offset().top;imgWidth=beforeImg.width();imgHeight=beforeImg.height()};var onMove=function(e){if(container.hasClass("active")){sliderPct=getSliderPercentage(e.pageX,e.pageY);adjustSlider(sliderPct)}};var onMoveEnd=function(){container.removeClass("active")};var moveTarget=options.move_with_handle_only?slider:container;moveTarget.on("movestart",onMoveStart);moveTarget.on("move",onMove);moveTarget.on("moveend",onMoveEnd);if(options.move_slider_on_hover){container.on("mouseenter",onMoveStart);container.on("mousemove",onMove);container.on("mouseleave",onMoveEnd)}slider.on("touchmove",function(e){e.preventDefault()});container.find("img").on("mousedown",function(event){event.preventDefault()});if(options.click_to_move){container.on("click",function(e){offsetX=container.offset().left;offsetY=container.offset().top;imgWidth=beforeImg.width();imgHeight=beforeImg.height();sliderPct=getSliderPercentage(e.pageX,e.pageY);adjustSlider(sliderPct)})}$(window).trigger("resize.twentytwenty")})}})(jQuery);(function($){var isLoading=false;$.prettyPhoto={version:"3.1.4"};$.fn.prettyPhoto=function(pp_settings){pp_settings=jQuery.extend({gallery_url:false,hook:"rel",animation_speed:"fast",ajaxcallback:function(){},slideshow:5e3,autoplay_slideshow:false,opacity:.8,show_title:true,allow_resize:true,allow_expand:true,default_width:500,default_height:344,counter_separator_label:"/",theme:"pp_default",horizontal_padding:20,hideflash:false,wmode:"opaque",autoplay:true,modal:false,deeplinking:true,overlay_gallery:true,overlay_gallery_max:30,keyboard_shortcuts:true,changepicturecallback:function(){},callback:function(){},ie6_fallback:true,markup:'<div class="pp_pic_holder"> \t\t\t\t\t\t<div class="ppt"> \t\t\t\t\t\t\t<a class="pp_close" href="#">Close</a> <span> </span> </div> \t\t\t\t\t\t<div class="pp_top"> \t\t\t\t\t\t\t<div class="pp_left"></div> \t\t\t\t\t\t\t<div class="pp_middle"></div> \t\t\t\t\t\t\t<div class="pp_right"></div> \t\t\t\t\t\t</div> \t\t\t\t\t\t<div class="pp_content_container"> \t\t\t\t\t\t\t<div class="pp_left"> \t\t\t\t\t\t\t<div class="pp_right"> \t\t\t\t\t\t\t\t<div class="pp_content"> \t\t\t\t\t\t\t\t\t<div class="pp_loaderIcon"></div> \t\t\t\t\t\t\t\t\t<div class="pp_fade"> \t\t\t\t\t\t <a href="#" class="pp_expand" title="Expand the image">Expand</a> \t\t\t\t\t\t\t\t\t\t<div class="pp_hoverContainer"> \t\t\t\t\t\t\t\t\t\t\t<a class="pp_next" href="#">next</a> \t\t\t\t\t\t\t\t\t\t\t<a class="pp_previous" href="#">previous</a> \t\t\t\t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t\t\t\t<div id="pp_full_res"></div> \t\t\t\t\t\t\t\t\t\t<div class="pp_details"> \t\t\t\t\t\t\t\t\t\t\t<div class="pp_nav"> \t\t\t\t\t\t\t\t\t\t\t\t<a href="#" class="pp_arrow_previous">Previous</a> \t\t\t\t\t\t\t\t\t\t\t\t<p class="currentTextHolder">0/0</p> \t\t\t\t\t\t\t\t\t\t\t\t<a href="#" class="pp_arrow_next">Next</a> \t\t\t\t\t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t\t\t\t\t<p class="pp_description"></p> \t\t\t\t\t\t\t\t\t\t\t<div class="pp_social">{pp_social}</div> \t\t\t\t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t</div> \t\t\t\t\t\t</div> \t\t\t\t\t\t<div class="pp_bottom"> \t\t\t\t\t\t\t<div class="pp_left"></div> \t\t\t\t\t\t\t<div class="pp_middle"></div> \t\t\t\t\t\t\t<div class="pp_right"></div> \t\t\t\t\t\t</div> \t\t\t\t\t</div> \t\t\t\t\t<div class="pp_overlay"></div>',gallery_markup:'<div class="pp_gallery"> \t\t\t\t\t\t\t\t<a href="#" class="pp_arrow_previous">Previous</a> \t\t\t\t\t\t\t\t<div> \t\t\t\t\t\t\t\t\t<ul> \t\t\t\t\t\t\t\t\t\t{gallery} \t\t\t\t\t\t\t\t\t</ul> \t\t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t\t<a href="#" class="pp_arrow_next">Next</a> \t\t\t\t\t\t\t</div>',image_markup:'<img id="fullResImage" src="{path}" />',flash_markup:'<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="{width}" height="{height}"><param name="wmode" value="{wmode}" /><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="{path}" /><embed src="{path}" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="{width}" height="{height}" wmode="{wmode}"></embed></object>',quicktime_markup:'<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" height="{height}" width="{width}"><param name="src" value="{path}"><param name="autoplay" value="{autoplay}"><param name="type" value="video/quicktime"><embed src="{path}" height="{height}" width="{width}" autoplay="{autoplay}" type="video/quicktime" pluginspage="http://www.apple.com/quicktime/download/"></embed></object>',iframe_markup:'<iframe src ="{path}" width="{width}" height="{height}" frameborder="no"></iframe>',inline_markup:'<div class="pp_inline">{content}</div>',custom_markup:"",social_tools:'<div class="twitter"><a href="http://twitter.com/share" class="twitter-share-button" data-count="none">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"><\/script></div><div class="facebook"><iframe src="//www.facebook.com/plugins/like.php?locale=en_US&href={location_href}&layout=button_count&show_faces=true&width=500&action=like&font&colorscheme=light&height=23" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:23px;" allowTransparency="true"></iframe></div>'},pp_settings);var matchedObjects=this,percentBased=false,pp_dimensions,pp_open,pp_contentHeight,pp_contentWidth,pp_containerHeight,pp_containerWidth,windowHeight=$(window).height(),windowWidth=$(window).width(),pp_slideshow;doresize=true,scroll_pos=_get_scroll();$(window).unbind("resize.prettyphoto").bind("resize.prettyphoto",function(){_center_overlay();_resize_overlay()});if(pp_settings.keyboard_shortcuts){$(document).unbind("keydown.prettyphoto").bind("keydown.prettyphoto",function(e){if(typeof $pp_pic_holder!="undefined"){if($pp_pic_holder.is(":visible")){switch(e.keyCode){case 37:$.prettyPhoto.changePage("previous");e.preventDefault();break;case 39:$.prettyPhoto.changePage("next");e.preventDefault();break;case 27:if(!settings.modal)$.prettyPhoto.close();e.preventDefault();break}}}})}$.prettyPhoto.initialize=function(e){settings=pp_settings;if(settings.theme=="pp_default")settings.horizontal_padding=16;if(settings.ie6_fallback&&$.browser.msie&&parseInt($.browser.version)==6)settings.theme="light_square";theRel=$(this).attr(settings.hook);galleryRegExp=/\[(?:.*)\]/;isSet=galleryRegExp.exec(theRel)?true:false;pp_images=pp_titles=pp_descriptions=[];set_position=0;rel_index=0;var $this=$(this);function open_lightbox(){if(pp_images.length>settings.overlay_gallery_max)settings.overlay_gallery=false;set_position=jQuery.inArray($this.attr("href"),pp_images);rel_index=isSet?set_position:$("a["+settings.hook+"^='"+theRel+"']").index($this);_build_overlay($this[0]);if(settings.allow_resize)$(window).bind("scroll.prettyphoto",function(){_center_overlay()});$.prettyPhoto.open()}if(settings.gallery_url){if(isLoading==false){isLoading=true;$j.ajax({url:settings.gallery_url,dataType:"json",success:function(data){isLoading=false;pp_images=data.images;pp_titles=data.titles;pp_descriptions=data.descriptions;open_lightbox()}})}}else{pp_images=isSet?jQuery.map(matchedObjects,function(n,i){if($(n).attr(settings.hook).indexOf(theRel)!=-1)return $(n).attr("href")}):$.makeArray($(this).attr("href"));pp_titles=isSet?jQuery.map(matchedObjects,function(n,i){if($(n).attr(settings.hook).indexOf(theRel)!=-1)return $(n).find("img").attr("alt")?$(n).find("img").attr("alt"):""}):$.makeArray($(this).find("img").attr("alt"));pp_descriptions=isSet?jQuery.map(matchedObjects,function(n,i){if($(n).attr(settings.hook).indexOf(theRel)!=-1)return $(n).attr("title")?$(n).attr("title"):""}):$.makeArray($(this).attr("title"));open_lightbox()}return false};$.prettyPhoto.open=function(event){if(typeof settings=="undefined"){settings=pp_settings;if($.browser.msie&&$.browser.version==6)settings.theme="light_square";pp_images=$.makeArray(arguments[0]);pp_titles=arguments[1]?$.makeArray(arguments[1]):$.makeArray("");pp_descriptions=arguments[2]?$.makeArray(arguments[2]):$.makeArray("");isSet=pp_images.length>1?true:false;set_position=arguments[3]?arguments[3]:0;_build_overlay(event.target)}if($.browser.msie&&$.browser.version==6)$("select").css("visibility","hidden");if(settings.hideflash)$("object,embed,iframe[src*=youtube],iframe[src*=vimeo]").css("visibility","hidden");_checkPosition($(pp_images).size());$(".pp_loaderIcon").show();if(settings.deeplinking)setHashtag();if(settings.social_tools){facebook_like_link=settings.social_tools.replace("{location_href}",encodeURIComponent(location.href));$pp_pic_holder.find(".pp_social").html(facebook_like_link)}if($ppt.is(":hidden"))$ppt.css("opacity",0).show();$pp_overlay.show().fadeTo(settings.animation_speed,settings.opacity);$pp_pic_holder.find(".currentTextHolder").text(set_position+1+settings.counter_separator_label+$(pp_images).size());if(typeof pp_descriptions[set_position]!="undefined"&&pp_descriptions[set_position]!=""){$pp_pic_holder.find(".pp_description").show().html(unescape(pp_descriptions[set_position]))}else{$pp_pic_holder.find(".pp_description").hide()}movie_width=parseFloat(getParam("width",pp_images[set_position]))?getParam("width",pp_images[set_position]):settings.default_width.toString();movie_height=parseFloat(getParam("height",pp_images[set_position]))?getParam("height",pp_images[set_position]):settings.default_height.toString();percentBased=false;if(movie_height.indexOf("%")!=-1){movie_height=parseFloat($(window).height()*parseFloat(movie_height)/100-150);percentBased=true}if(movie_width.indexOf("%")!=-1){movie_width=parseFloat($(window).width()*parseFloat(movie_width)/100-150);percentBased=true}$pp_pic_holder.fadeIn(function(){settings.show_title&&pp_titles[set_position]!=""&&typeof pp_titles[set_position]!="undefined"?$ppt.find("span").html(unescape(pp_titles[set_position])):$ppt.find("span").html(" ");imgPreloader="";skipInjection=false;switch(_getFileType(pp_images[set_position])){case"image":imgPreloader=new Image;nextImage=new Image;if(isSet&&set_position<$(pp_images).size()-1)nextImage.src=pp_images[set_position+1];prevImage=new Image;if(isSet&&pp_images[set_position-1])prevImage.src=pp_images[set_position-1];$pp_pic_holder.find("#pp_full_res")[0].innerHTML=settings.image_markup.replace(/{path}/g,pp_images[set_position]);imgPreloader.onload=function(){pp_dimensions=_fitToViewport(imgPreloader.width,imgPreloader.height);_showContent()};imgPreloader.onerror=function(){alert("Image cannot be loaded. Make sure the path is correct and image exist.");$.prettyPhoto.close()};imgPreloader.src=pp_images[set_position];break;case"youtube":pp_dimensions=_fitToViewport(movie_width,movie_height);movie_id=getParam("v",pp_images[set_position]);if(movie_id==""){movie_id=pp_images[set_position].split("youtu.be/");movie_id=movie_id[1];if(movie_id.indexOf("?")>0)movie_id=movie_id.substr(0,movie_id.indexOf("?"));if(movie_id.indexOf("&")>0)movie_id=movie_id.substr(0,movie_id.indexOf("&"))}movie="http://www.youtube.com/embed/"+movie_id;getParam("rel",pp_images[set_position])?movie+="?rel="+getParam("rel",pp_images[set_position]):movie+="?rel=1";if(settings.autoplay)movie+="&autoplay=1";toInject=settings.iframe_markup.replace(/{width}/g,pp_dimensions["width"]).replace(/{height}/g,pp_dimensions["height"]).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,movie);break;case"vimeo":pp_dimensions=_fitToViewport(movie_width,movie_height);movie_id=pp_images[set_position];var regExp=/http:\/\/(www\.)?vimeo.com\/(\d+)/;var match=movie_id.match(regExp);movie="http://player.vimeo.com/video/"+match[2]+"?title=0&byline=0&portrait=0";if(settings.autoplay)movie+="&autoplay=1;";vimeo_width=pp_dimensions["width"]+"/embed/?moog_width="+pp_dimensions["width"];toInject=settings.iframe_markup.replace(/{width}/g,vimeo_width).replace(/{height}/g,pp_dimensions["height"]).replace(/{path}/g,movie);break;case"quicktime":pp_dimensions=_fitToViewport(movie_width,movie_height);pp_dimensions["height"]+=15;pp_dimensions["contentHeight"]+=15;pp_dimensions["containerHeight"]+=15;toInject=settings.quicktime_markup.replace(/{width}/g,pp_dimensions["width"]).replace(/{height}/g,pp_dimensions["height"]).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,pp_images[set_position]).replace(/{autoplay}/g,settings.autoplay);break;case"flash":pp_dimensions=_fitToViewport(movie_width,movie_height);flash_vars=pp_images[set_position];flash_vars=flash_vars.substring(pp_images[set_position].indexOf("flashvars")+10,pp_images[set_position].length);filename=pp_images[set_position];filename=filename.substring(0,filename.indexOf("?"));toInject=settings.flash_markup.replace(/{width}/g,pp_dimensions["width"]).replace(/{height}/g,pp_dimensions["height"]).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,filename+"?"+flash_vars);break;case"iframe":pp_dimensions=_fitToViewport(movie_width,movie_height);frame_url=pp_images[set_position];frame_url=frame_url.substr(0,frame_url.indexOf("iframe")-1);toInject=settings.iframe_markup.replace(/{width}/g,pp_dimensions["width"]).replace(/{height}/g,pp_dimensions["height"]).replace(/{path}/g,frame_url);break;case"ajax":doresize=false;pp_dimensions=_fitToViewport(movie_width,movie_height);doresize=true;skipInjection=true;$.get(pp_images[set_position],function(responseHTML){toInject=settings.inline_markup.replace(/{content}/g,responseHTML);$pp_pic_holder.find("#pp_full_res")[0].innerHTML=toInject;_showContent()});break;case"custom":pp_dimensions=_fitToViewport(movie_width,movie_height);toInject=settings.custom_markup;break;case"inline":myClone=$(pp_images[set_position]).clone().append('<br clear="all" />').css({width:settings.default_width}).wrapInner('<div id="pp_full_res"><div class="pp_inline"></div></div>').appendTo($("body")).show();doresize=false;pp_dimensions=_fitToViewport($(myClone).width(),$(myClone).height());doresize=true;$(myClone).remove();toInject=settings.inline_markup.replace(/{content}/g,$(pp_images[set_position]).html());break}if(!imgPreloader&&!skipInjection){$pp_pic_holder.find("#pp_full_res")[0].innerHTML=toInject;_showContent()}});return false};$.prettyPhoto.changePage=function(direction){currentGalleryPage=0;if(direction=="previous"){set_position--;if(set_position<0)set_position=$(pp_images).size()-1}else if(direction=="next"){set_position++;if(set_position>$(pp_images).size()-1)set_position=0}else{set_position=direction}rel_index=set_position;if(!doresize)doresize=true;if(settings.allow_expand){$(".pp_contract").removeClass("pp_contract").addClass("pp_expand")}_hideContent(function(){$.prettyPhoto.open()})};$.prettyPhoto.changeGalleryPage=function(direction){if(direction=="next"){currentGalleryPage++;if(currentGalleryPage>totalPage)currentGalleryPage=0}else if(direction=="previous"){currentGalleryPage--;if(currentGalleryPage<0)currentGalleryPage=totalPage}else{currentGalleryPage=direction}slide_speed=direction=="next"||direction=="previous"?settings.animation_speed:0;slide_to=currentGalleryPage*(itemsPerPage*itemWidth);$pp_gallery.find("ul").animate({left:-slide_to},slide_speed)};$.prettyPhoto.startSlideshow=function(){if(typeof pp_slideshow=="undefined"){$pp_pic_holder.find(".pp_play").unbind("click").removeClass("pp_play").addClass("pp_pause").click(function(){$.prettyPhoto.stopSlideshow();return false});pp_slideshow=setInterval($.prettyPhoto.startSlideshow,settings.slideshow)}else{$.prettyPhoto.changePage("next")}};$.prettyPhoto.stopSlideshow=function(){$pp_pic_holder.find(".pp_pause").unbind("click").removeClass("pp_pause").addClass("pp_play").click(function(){$.prettyPhoto.startSlideshow();return false});clearInterval(pp_slideshow);pp_slideshow=undefined};$.prettyPhoto.close=function(){if($pp_overlay.is(":animated"))return;$.prettyPhoto.stopSlideshow();$pp_pic_holder.stop().find("object,embed").css("visibility","hidden");$("div.pp_pic_holder,div.ppt,.pp_fade").fadeOut(settings.animation_speed,function(){$(this).remove()});$pp_overlay.fadeOut(settings.animation_speed,function(){if($.browser.msie&&$.browser.version==6)$("select").css("visibility","visible");if(settings.hideflash)$("object,embed,iframe[src*=youtube],iframe[src*=vimeo]").css("visibility","visible");$(this).remove();$(window).unbind("scroll.prettyphoto");clearHashtag();if($.isFunction(settings.callback))settings.callback();doresize=true;pp_open=false;delete settings})};function _showContent(){$(".pp_loaderIcon").hide();projectedTop=scroll_pos["scrollTop"]+(windowHeight/2-pp_dimensions["containerHeight"]/2);if(projectedTop<0)projectedTop=0;$ppt.fadeTo(settings.animation_speed,1);$pp_pic_holder.find(".pp_content").animate({height:pp_dimensions["contentHeight"],width:pp_dimensions["contentWidth"]},settings.animation_speed);$pp_pic_holder.animate({top:projectedTop,left:windowWidth/2-pp_dimensions["containerWidth"]/2<0?0:windowWidth/2-pp_dimensions["containerWidth"]/2,width:pp_dimensions["containerWidth"]},settings.animation_speed,function(){$pp_pic_holder.find(".pp_hoverContainer,#fullResImage").height(pp_dimensions["height"]).width(pp_dimensions["width"]);$pp_pic_holder.find(".pp_fade").fadeIn(settings.animation_speed);if(isSet&&_getFileType(pp_images[set_position])=="image"){$pp_pic_holder.find(".pp_hoverContainer").show()}else{$pp_pic_holder.find(".pp_hoverContainer").hide()}if(settings.allow_expand){if(pp_dimensions["resized"]){$("a.pp_expand,a.pp_contract").show()}else{$("a.pp_expand").hide()}}if(settings.autoplay_slideshow&&!pp_slideshow&&!pp_open)$.prettyPhoto.startSlideshow();if($.isFunction(settings.changepicturecallback))settings.changepicturecallback();pp_open=true});_insert_gallery();if($.isFunction(pp_settings.ajaxcallback))pp_settings.ajaxcallback()}function _hideContent(callback){$pp_pic_holder.find("#pp_full_res object,#pp_full_res embed").css("visibility","hidden");$pp_pic_holder.find(".pp_fade").fadeOut(settings.animation_speed,function(){$(".pp_loaderIcon").show();if($.isFunction(callback))callback()})}function _checkPosition(setCount){setCount>1?$(".pp_nav").show():$(".pp_nav").hide()}function _fitToViewport(width,height){resized=false;_getDimensions(width,height);imageWidth=width,imageHeight=height;if((pp_containerWidth>windowWidth||pp_containerHeight>windowHeight)&&doresize&&settings.allow_resize&&!percentBased){resized=true,fitting=false;while(!fitting){if(pp_containerWidth>windowWidth){imageWidth=windowWidth-200;imageHeight=height/width*imageWidth}else if(pp_containerHeight>windowHeight){imageHeight=windowHeight-200;imageWidth=width/height*imageHeight}else{fitting=true}pp_containerHeight=imageHeight,pp_containerWidth=imageWidth}_getDimensions(imageWidth,imageHeight);if(pp_containerWidth>windowWidth||pp_containerHeight>windowHeight){_fitToViewport(pp_containerWidth,pp_containerHeight)}}return{width:Math.floor(imageWidth),height:Math.floor(imageHeight),containerHeight:Math.floor(pp_containerHeight),containerWidth:Math.floor(pp_containerWidth)+settings.horizontal_padding*2,contentHeight:Math.floor(pp_contentHeight),contentWidth:Math.floor(pp_contentWidth),resized:resized}}function _getDimensions(width,height){width=parseFloat(width);height=parseFloat(height);$pp_details=$pp_pic_holder.find(".pp_details");$pp_details.width(width);detailsHeight=parseFloat($pp_details.css("marginTop"))+parseFloat($pp_details.css("marginBottom"));$pp_details=$pp_details.clone().addClass(settings.theme).width(width).appendTo($("body")).css({position:"absolute",top:-1e4});detailsHeight+=$pp_details.height();detailsHeight=detailsHeight<=34?36:detailsHeight;if($.browser.msie&&$.browser.version==7)detailsHeight+=8;$pp_details.remove();$pp_title=$pp_pic_holder.find(".ppt");titleHeight=parseFloat($pp_title.css("marginTop"))+parseFloat($pp_title.css("marginBottom"));$pp_title=$pp_title.clone().appendTo($("body")).css({position:"absolute",top:-1e4});titleHeight+=$pp_title.height();$pp_title.remove();pp_contentHeight=height+detailsHeight;pp_contentWidth=width;pp_containerHeight=pp_contentHeight+titleHeight+$pp_pic_holder.find(".pp_top").height()+$pp_pic_holder.find(".pp_bottom").height();pp_containerWidth=width}function _getFileType(itemSrc){if(itemSrc.match(/youtube\.com\/watch/i)||itemSrc.match(/youtu\.be/i)){return"youtube"}else if(itemSrc.match(/vimeo\.com/i)){return"vimeo"}else if(itemSrc.match(/\b.mov\b/i)){return"quicktime"}else if(itemSrc.match(/\b.swf\b/i)){return"flash"}else if(itemSrc.match(/\biframe=true\b/i)){return"iframe"}else if(itemSrc.match(/\bajax=true\b/i)){return"ajax"}else if(itemSrc.match(/\bcustom=true\b/i)){return"custom"}else if(itemSrc.substr(0,1)=="#"){return"inline"}else{return"image"}}function _center_overlay(){if(doresize&&typeof $pp_pic_holder!="undefined"){scroll_pos=_get_scroll();contentHeight=$pp_pic_holder.height(),contentwidth=$pp_pic_holder.width();projectedTop=windowHeight/2+scroll_pos["scrollTop"]-contentHeight/2;if(projectedTop<0)projectedTop=0;if(contentHeight>windowHeight)return;$pp_pic_holder.css({top:projectedTop,left:windowWidth/2+scroll_pos["scrollLeft"]-contentwidth/2})}}function _get_scroll(){if(self.pageYOffset){return{scrollTop:self.pageYOffset,scrollLeft:self.pageXOffset}}else if(document.documentElement&&document.documentElement.scrollTop){return{scrollTop:document.documentElement.scrollTop,scrollLeft:document.documentElement.scrollLeft}}else if(document.body){return{scrollTop:document.body.scrollTop,scrollLeft:document.body.scrollLeft}}}function _resize_overlay(){windowHeight=$(window).height(),windowWidth=$(window).width();if(typeof $pp_overlay!="undefined")$pp_overlay.height($(document).height()).width(windowWidth)}function _insert_gallery(){if(isSet&&settings.overlay_gallery&&_getFileType(pp_images[set_position])=="image"&&(settings.ie6_fallback&&!($.browser.msie&&parseInt($.browser.version)==6))){itemWidth=52+5;navWidth=settings.theme=="facebook"||settings.theme=="pp_default"?50:30;itemsPerPage=Math.floor((pp_dimensions["containerWidth"]-100-navWidth)/itemWidth);itemsPerPage=itemsPerPage<pp_images.length?itemsPerPage:pp_images.length;totalPage=Math.ceil(pp_images.length/itemsPerPage)-1;if(totalPage==0){navWidth=0;$pp_gallery.find(".pp_arrow_next,.pp_arrow_previous").hide()}else{$pp_gallery.find(".pp_arrow_next,.pp_arrow_previous").show()}galleryWidth=itemsPerPage*itemWidth;fullGalleryWidth=pp_images.length*itemWidth;$pp_gallery.css("margin-left",-(galleryWidth/2+navWidth/2)).find("div:first").width(galleryWidth+5).find("ul").width(fullGalleryWidth).find("li.selected").removeClass("selected");goToPage=Math.floor(set_position/itemsPerPage)<totalPage?Math.floor(set_position/itemsPerPage):totalPage;$.prettyPhoto.changeGalleryPage(goToPage);$pp_gallery_li.filter(":eq("+set_position+")").addClass("selected")}else{$pp_pic_holder.find(".pp_content").unbind("mouseenter mouseleave")}}function _build_overlay(caller){if(settings.social_tools)facebook_like_link=settings.social_tools.replace("{location_href}",encodeURIComponent(location.href));settings.markup=settings.markup.replace("{pp_social}","");$("body").append(settings.markup);$pp_pic_holder=$(".pp_pic_holder"),$ppt=$(".ppt"),$pp_overlay=$("div.pp_overlay");if(isSet&&settings.overlay_gallery){currentGalleryPage=0;toInject="";for(var i=0;i<pp_images.length;i++){if(!pp_images[i].match(/\b(jpg|jpeg|png|gif)\b/gi)){classname="default";img_src=""}else{classname="";img_src=pp_images[i]}toInject+="<li class='"+classname+"'><a href='#'><img src='"+img_src+"' width='50' alt='' /></a></li>"}toInject=settings.gallery_markup.replace(/{gallery}/g,toInject);$pp_pic_holder.find("#pp_full_res").after(toInject);$pp_gallery=$(".pp_pic_holder .pp_gallery"),$pp_gallery_li=$pp_gallery.find("li");$pp_gallery.find(".pp_arrow_next").click(function(){$.prettyPhoto.changeGalleryPage("next");$.prettyPhoto.stopSlideshow();return false});$pp_gallery.find(".pp_arrow_previous").click(function(){$.prettyPhoto.changeGalleryPage("previous");$.prettyPhoto.stopSlideshow();return false});$pp_pic_holder.find(".pp_content").hover(function(){$pp_pic_holder.find(".pp_gallery:not(.disabled)").fadeIn()},function(){$pp_pic_holder.find(".pp_gallery:not(.disabled)").fadeOut()});itemWidth=52+5;$pp_gallery_li.each(function(i){$(this).find("a").click(function(){$.prettyPhoto.changePage(i);$.prettyPhoto.stopSlideshow();return false})})}if(settings.slideshow){$pp_pic_holder.find(".pp_nav").prepend('<a href="#" class="pp_play">Play</a>');$pp_pic_holder.find(".pp_nav .pp_play").click(function(){$.prettyPhoto.startSlideshow();return false})}$pp_pic_holder.attr("class","pp_pic_holder "+settings.theme);$pp_overlay.css({opacity:0,height:$(document).height(),width:$(window).width()}).bind("click",function(){if(!settings.modal)$.prettyPhoto.close()});$("a.pp_close").bind("click",function(){$.prettyPhoto.close();return false});if(settings.allow_expand){$("a.pp_expand").bind("click",function(e){if($(this).hasClass("pp_expand")){$(this).removeClass("pp_expand").addClass("pp_contract");doresize=false}else{$(this).removeClass("pp_contract").addClass("pp_expand");doresize=true}_hideContent(function(){$.prettyPhoto.open()});return false})}$pp_pic_holder.find(".pp_previous, .pp_nav .pp_arrow_previous").bind("click",function(){$.prettyPhoto.changePage("previous");$.prettyPhoto.stopSlideshow();return false});$pp_pic_holder.find(".pp_next, .pp_nav .pp_arrow_next").bind("click",function(){$.prettyPhoto.changePage("next");$.prettyPhoto.stopSlideshow();return false});_center_overlay()}if(!pp_alreadyInitialized&&getHashtag()){pp_alreadyInitialized=true;hashIndex=getHashtag();hashRel=hashIndex;hashIndex=hashIndex.substring(hashIndex.indexOf("/")+1,hashIndex.length-1);hashRel=hashRel.substring(0,hashRel.indexOf("/"));setTimeout(function(){$("a["+pp_settings.hook+"^='"+hashRel+"']:eq("+hashIndex+")").trigger("click")},50)}return this.unbind("click.prettyphoto").bind("click.prettyphoto",$.prettyPhoto.initialize)};function getHashtag(){url=location.href;hashtag=url.indexOf("#prettyPhoto")!==-1?decodeURI(url.substring(url.indexOf("#prettyPhoto")+1,url.length)):false;return hashtag}function setHashtag(){if(typeof theRel=="undefined")return;location.hash=theRel+"/"+rel_index+"/"}function clearHashtag(){if(location.href.indexOf("#prettyPhoto")!==-1)location.hash="prettyPhoto"}function getParam(name,url){name=name.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var regexS="[\\?&]"+name+"=([^&#]*)";var regex=new RegExp(regexS);var results=regex.exec(url);return results==null?"":results[1]}})(jQuery);var pp_alreadyInitialized=false;var fadeSlideShow_descpanel={controls:[["/images/component/image_gallery/x.png",7,7],["/images/component/image_gallery/restore.png",10,11],["/images/component/image_gallery/loading.gif",54,55]],fontStyle:"normal 11px Verdana",slidespeed:200};function fadeSlideShow(settingarg){this.setting=settingarg;settingarg=null;var setting=this.setting;setting.fadeduration=setting.fadeduration?parseInt(setting.fadeduration,10):500;setting.curimage=setting.persist?fadeSlideShow.routines.getCookie("gallery-"+setting.wrapperid):0;setting.curimage=setting.curimage||0;setting.currentstep=0;setting.totalsteps=setting.imagearray.length*(setting.displaymode.cycles>0?setting.displaymode.cycles:Infinity);setting.fglayer=0;setting.bglayer=1;setting.oninit=setting.oninit||function(){};setting.onslide=setting.onslide||function(){};if(setting.displaymode.randomize)setting.imagearray.sort(function(){return.5-Math.random()});var preloadimages=[];setting.longestdesc="";for(var i=0;i<setting.imagearray.length;i++){preloadimages[i]=new Image;preloadimages[i].src=setting.imagearray[i][0];if(setting.imagearray[i][3]&&setting.imagearray[i][3].length>setting.longestdesc.length)setting.longestdesc=setting.imagearray[i][3]}var closebutt=fadeSlideShow_descpanel.controls[0];setting.closebutton=setting.descreveal=="always"?'<img class="close" src="'+closebutt[0]+'" style="float:right;cursor:hand;cursor:pointer;width:'+closebutt[1]+"px;height:"+closebutt[2]+'px;margin-left:2px" title="Hide Description" />':"";var slideshow=this;jQuery(document).ready(function($){var setting=slideshow.setting;var fullhtml=fadeSlideShow.routines.getFullHTML(setting.imagearray);setting.$wrapperdiv=$("#"+setting.wrapperid).css({position:"relative",visibility:"visible",background:"black",overflow:"hidden",width:setting.dimensions[0],height:setting.dimensions[1]}).empty();if(setting.$wrapperdiv.length===0){alert('Error: DIV with ID "'+setting.wrapperid+'" not found on page.');return}setting.$gallerylayers=$('<div class="gallerylayer"></div><div class="gallerylayer"></div>').css({position:"absolute",left:0,top:0,width:"100%",height:"100%",background:"black"}).appendTo(setting.$wrapperdiv);var $loadingimg=$('<img src="'+fadeSlideShow_descpanel.controls[2][0]+'" style="position:absolute;width:'+fadeSlideShow_descpanel.controls[2][1]+";height:"+fadeSlideShow_descpanel.controls[2][2]+'" />').css({left:setting.dimensions[0]/2-fadeSlideShow_descpanel.controls[2][1]/2,top:setting.dimensions[1]/2-fadeSlideShow_descpanel.controls[2][2]}).appendTo(setting.$wrapperdiv);var $curimage=setting.$gallerylayers.html(fullhtml).find("img").hide().eq(setting.curimage);if(setting.longestdesc!==""){fadeSlideShow.routines.adddescpanel($,setting);if(setting.descreveal=="always"){setting.$descpanel.css({top:setting.dimensions[1]-setting.panelheight});setting.$descinner.click(function(e){if(e.target.className=="close"){slideshow.showhidedescpanel("hide")}});setting.$restorebutton.click(function(e){slideshow.showhidedescpanel("show");$(this).css({visibility:"hidden"})})}else{setting.$wrapperdiv.bind("mouseenter",function(){slideshow.showhidedescpanel("show")});setting.$wrapperdiv.bind("mouseleave",function(){slideshow.showhidedescpanel("hide")})}}setting.$wrapperdiv.bind("mouseenter",function(){setting.ismouseover=true});setting.$wrapperdiv.bind("mouseleave",function(){setting.ismouseover=false});if($curimage.get(0).complete){$loadingimg.hide();slideshow.paginateinit($);slideshow.showslide(setting.curimage)}else{$loadingimg.hide();slideshow.paginateinit($);$curimage.bind("load",function(){slideshow.showslide(setting.curimage)})}setting.oninit.call(slideshow);$(window).bind("unload",function(){if(slideshow.setting.persist)fadeSlideShow.routines.setCookie("gallery-"+setting.wrapperid,setting.curimage);jQuery.each(slideshow.setting,function(k){if(slideshow.setting[k]instanceof Array){for(var i=0;i<slideshow.setting[k].length;i++){if(slideshow.setting[k][i].tagName=="DIV")slideshow.setting[k][i].innerHTML=null;slideshow.setting[k][i]=null}}});slideshow=slideshow.setting=null})})}fadeSlideShow.prototype={navigate:function(keyword){var setting=this.setting;clearTimeout(setting.playtimer);if(setting.displaymode.type=="auto"){setting.displaymode.type="manual";setting.displaymode.wraparound=true}if(!isNaN(parseInt(keyword,10))){this.showslide(parseInt(keyword,10))}else if(/(prev)|(next)/i.test(keyword)){this.showslide(keyword.toLowerCase())}},showslide:function(keyword){var slideshow=this;var setting=slideshow.setting;if(setting.displaymode.type=="auto"&&setting.ismouseover&&setting.currentstep<=setting.totalsteps){setting.playtimer=setTimeout(function(){slideshow.showslide("next")},setting.displaymode.pause);return}var totalimages=setting.imagearray.length;var imgindex=keyword=="next"?setting.curimage<totalimages-1?setting.curimage+1:0:keyword=="prev"?setting.curimage>0?setting.curimage-1:totalimages-1:Math.min(keyword,totalimages-1);var $slideimage=setting.$gallerylayers.eq(setting.bglayer).find("img").hide().eq(imgindex).show();var imgdimensions=[$slideimage.width(),$slideimage.height()];$slideimage.css({marginLeft:imgdimensions[0]>0&&imgdimensions[0]<setting.dimensions[0]?setting.dimensions[0]/2-imgdimensions[0]/2:0});$slideimage.css({marginTop:imgdimensions[1]>0&&imgdimensions[1]<setting.dimensions[1]?setting.dimensions[1]/2-imgdimensions[1]/2:0});setting.$gallerylayers.eq(setting.bglayer).css({zIndex:300,opacity:0}).stop().css({opacity:0}).animate({opacity:1},setting.fadeduration,function(){clearTimeout(setting.playtimer);try{setting.onslide.call(slideshow,setting.$gallerylayers.eq(setting.fglayer).get(0),setting.curimage)}catch(e){alert('Fade In Slideshow error: An error has occured somwhere in your code attached to the "onslide" event: '+e)}setting.currentstep+=1;if(setting.displaymode.type=="auto"){if(setting.currentstep<=setting.totalsteps||setting.displaymode.cycles===0)setting.playtimer=setTimeout(function(){slideshow.showslide("next")},setting.displaymode.pause)}});setting.$gallerylayers.eq(setting.fglayer).css({zIndex:299});setting.fglayer=setting.bglayer;setting.bglayer=setting.bglayer===0?1:0;setting.curimage=imgindex;if(setting.$descpanel)setting.$descpanel.css({visibility:setting.imagearray[imgindex][3]?"visible":"hidden"});if(setting.imagearray[imgindex][3])setting.$descinner.empty().html(setting.closebutton+setting.imagearray[imgindex][3]);if(setting.displaymode.type=="manual"&&!setting.displaymode.wraparound){this.paginatecontrol()}if(setting.$status){setting.$status.html(setting.curimage+1+"/"+totalimages)}if(setting.$links){jQuery(".fss_links a").each(function(i,a){if(i==setting.curimage){jQuery(a).addClass("active")}else{jQuery(a).removeClass("active")}})}},showhidedescpanel:function(state,showcontrol){var setting=this.setting;var endpoint=state=="show"?setting.dimensions[1]-setting.panelheight:this.setting.dimensions[1];setting.$descpanel.stop().animate({top:endpoint},fadeSlideShow_descpanel.slidespeed,function(){if(setting.descreveal=="always"&&state=="hide")setting.$restorebutton.css({visibility:"visible"})})},paginateinit:function($){var slideshow=this;var setting=this.setting;if(setting.togglerid){setting.$togglerdiv=$("#"+setting.togglerid);setting.$prev=setting.$togglerdiv.find(".prev").data("action","prev");setting.$next=setting.$togglerdiv.find(".next").data("action","next");setting.$prev.add(setting.$next).click(function(e){var $target=$(this);slideshow.navigate($target.data("action"));e.preventDefault()});setting.$status=setting.$togglerdiv.find(".status");setting.$links=setting.$togglerdiv.find(".fss_links");if(setting.$links){totalimages=setting.imagearray.length;for(i=1;i<=totalimages;i++){a=jQuery('<a href="#'+i+'">'+i+"</a>");a.click(function(e){n=jQuery(e.delegateTarget).html();slideshow.navigate(parseInt(n)-1);e.preventDefault()});a.appendTo(setting.$links)}}}},paginatecontrol:function(){var setting=this.setting;setting.$prev.css({opacity:setting.curimage===0?.4:1}).data("action",setting.curimage===0?"none":"prev");setting.$next.css({opacity:setting.curimage==setting.imagearray.length-1?.4:1}).data("action",setting.curimage==setting.imagearray.length-1?"none":"next");if(document.documentMode==8){setting.$prev.find("img:eq(0)").css({opacity:setting.curimage===0?.4:1});setting.$next.find("img:eq(0)").css({opacity:setting.curimage==setting.imagearray.length-1?.4:1})}}};fadeSlideShow.routines={getSlideHTML:function(imgelement){var layerHTML=imgelement[1]?'<a href="'+imgelement[1]+'" target="'+imgelement[2]+'">\n':"";layerHTML+='<img src="'+imgelement[0]+'" style="border-width:0;" />\n';layerHTML+=imgelement[1]?"</a>\n":"";return layerHTML},getFullHTML:function(imagearray){var preloadhtml="";for(var i=0;i<imagearray.length;i++)preloadhtml+=this.getSlideHTML(imagearray[i]);return preloadhtml},adddescpanel:function($,setting){setting.$descpanel=$('<div class="fadeslidedescdiv"></div>').css({position:"absolute",visibility:"hidden",width:"100%",left:0,top:setting.dimensions[1],font:fadeSlideShow_descpanel.fontStyle,zIndex:"301"}).appendTo(setting.$wrapperdiv);$('<div class="descpanelbg"></div><div class="descpanelfg"></div>').css({position:"absolute",left:0,top:0,width:setting.$descpanel.width()-8,padding:"4px"}).eq(0).css({background:"black",opacity:.7}).end().eq(1).css({color:"white"}).html(setting.closebutton+setting.longestdesc).end().appendTo(setting.$descpanel);setting.$descinner=setting.$descpanel.find("div.descpanelfg");setting.panelheight=setting.$descinner.outerHeight();setting.$descpanel.css({height:setting.panelheight}).find("div").css({height:"100%"});if(setting.descreveal=="always"){setting.$restorebutton=$('<img class="restore" title="Restore Description" src="'+fadeSlideShow_descpanel.controls[1][0]+'" style="position:absolute;visibility:hidden;right:0;bottom:0;z-index:1002;width:'+fadeSlideShow_descpanel.controls[1][1]+"px;height:"+fadeSlideShow_descpanel.controls[1][2]+'px;cursor:pointer;cursor:hand" />').appendTo(setting.$wrapperdiv)}},getCookie:function(Name){var re=new RegExp(Name+"=[^;]+","i");if(document.cookie.match(re))return document.cookie.match(re)[0].split("=")[1];return null},setCookie:function(name,value){document.cookie=name+"="+value+";path=/"}};(function($,document,undefined){var pluses=/\+/g;function raw(s){return s}function decoded(s){return decodeURIComponent(s.replace(pluses," "))}var config=$.cookie=function(key,value,options){if(value!==undefined){options=$.extend({},config.defaults,options);if(value===null){options.expires=-1}if(typeof options.expires==="number"){var days=options.expires,t=options.expires=new Date;t.setDate(t.getDate()+days)}value=config.json?JSON.stringify(value):String(value);return document.cookie=[encodeURIComponent(key),"=",config.raw?value:encodeURIComponent(value),options.expires?"; expires="+options.expires.toUTCString():"",options.path?"; path="+options.path:"",options.domain?"; domain="+options.domain:"",options.secure?"; secure":""].join("")}var decode=config.raw?raw:decoded;var cookies=document.cookie.split("; ");for(var i=0,l=cookies.length;i<l;i++){var parts=cookies[i].split("=");if(decode(parts.shift())===key){var cookie=decode(parts.join("="));return config.json?JSON.parse(cookie):cookie}}return null};config.defaults={};$.removeCookie=function(key,options){if($.cookie(key)!==null){$.cookie(key,null,options);return true}return false}})($j,document);!function(a){function b(){}function c(a){function c(b){b.prototype.option||(b.prototype.option=function(b){a.isPlainObject(b)&&(this.options=a.extend(!0,this.options,b))})}function e(b,c){a.fn[b]=function(e){if("string"==typeof e){for(var g=d.call(arguments,1),h=0,i=this.length;i>h;h++){var j=this[h],k=a.data(j,b);if(k)if(a.isFunction(k[e])&&"_"!==e.charAt(0)){var l=k[e].apply(k,g);if(void 0!==l)return l}else f("no such method '"+e+"' for "+b+" instance");else f("cannot call methods on "+b+" prior to initialization; attempted to call '"+e+"'")}return this}return this.each(function(){var d=a.data(this,b);d?(d.option(e),d._init()):(d=new c(this,e),a.data(this,b,d))})}}if(a){var f="undefined"==typeof console?b:function(a){console.error(a)};return a.bridget=function(a,b){c(b),e(a,b)},a.bridget}}var d=Array.prototype.slice;"function"==typeof define&&define.amd?define("jquery-bridget/jquery.bridget",["jquery"],c):c("object"==typeof exports?require("jquery"):a.jQuery)}(window),function(a){function b(b){var c=a.event;return c.target=c.target||c.srcElement||b,c}var c=document.documentElement,d=function(){};c.addEventListener?d=function(a,b,c){a.addEventListener(b,c,!1)}:c.attachEvent&&(d=function(a,c,d){a[c+d]=d.handleEvent?function(){var c=b(a);d.handleEvent.call(d,c)}:function(){var c=b(a);d.call(a,c)},a.attachEvent("on"+c,a[c+d])});var e=function(){};c.removeEventListener?e=function(a,b,c){a.removeEventListener(b,c,!1)}:c.detachEvent&&(e=function(a,b,c){a.detachEvent("on"+b,a[b+c]);try{delete a[b+c]}catch(d){a[b+c]=void 0}});var f={bind:d,unbind:e};"function"==typeof define&&define.amd?define("eventie/eventie",f):"object"==typeof exports?module.exports=f:a.eventie=f}(window),function(){"use strict";function a(){}function b(a,b){for(var c=a.length;c--;)if(a[c].listener===b)return c;return-1}function c(a){return function(){return this[a].apply(this,arguments)}}var d=a.prototype,e=this,f=e.EventEmitter;d.getListeners=function(a){var b,c,d=this._getEvents();if(a instanceof RegExp){b={};for(c in d)d.hasOwnProperty(c)&&a.test(c)&&(b[c]=d[c])}else b=d[a]||(d[a]=[]);return b},d.flattenListeners=function(a){var b,c=[];for(b=0;b<a.length;b+=1)c.push(a[b].listener);return c},d.getListenersAsObject=function(a){var b,c=this.getListeners(a);return c instanceof Array&&(b={},b[a]=c),b||c},d.addListener=function(a,c){var d,e=this.getListenersAsObject(a),f="object"==typeof c;for(d in e)e.hasOwnProperty(d)&&-1===b(e[d],c)&&e[d].push(f?c:{listener:c,once:!1});return this},d.on=c("addListener"),d.addOnceListener=function(a,b){return this.addListener(a,{listener:b,once:!0})},d.once=c("addOnceListener"),d.defineEvent=function(a){return this.getListeners(a),this},d.defineEvents=function(a){for(var b=0;b<a.length;b+=1)this.defineEvent(a[b]);return this},d.removeListener=function(a,c){var d,e,f=this.getListenersAsObject(a);for(e in f)f.hasOwnProperty(e)&&(d=b(f[e],c),-1!==d&&f[e].splice(d,1));return this},d.off=c("removeListener"),d.addListeners=function(a,b){return this.manipulateListeners(!1,a,b)},d.removeListeners=function(a,b){return this.manipulateListeners(!0,a,b)},d.manipulateListeners=function(a,b,c){var d,e,f=a?this.removeListener:this.addListener,g=a?this.removeListeners:this.addListeners;if("object"!=typeof b||b instanceof RegExp)for(d=c.length;d--;)f.call(this,b,c[d]);else for(d in b)b.hasOwnProperty(d)&&(e=b[d])&&("function"==typeof e?f.call(this,d,e):g.call(this,d,e));return this},d.removeEvent=function(a){var b,c=typeof a,d=this._getEvents();if("string"===c)delete d[a];else if(a instanceof RegExp)for(b in d)d.hasOwnProperty(b)&&a.test(b)&&delete d[b];else delete this._events;return this},d.removeAllListeners=c("removeEvent"),d.emitEvent=function(a,b){var c,d,e,f,g=this.getListenersAsObject(a);for(e in g)if(g.hasOwnProperty(e))for(d=g[e].length;d--;)c=g[e][d],c.once===!0&&this.removeListener(a,c.listener),f=c.listener.apply(this,b||[]),f===this._getOnceReturnValue()&&this.removeListener(a,c.listener);return this},d.trigger=c("emitEvent"),d.emit=function(a){var b=Array.prototype.slice.call(arguments,1);return this.emitEvent(a,b)},d.setOnceReturnValue=function(a){return this._onceReturnValue=a,this},d._getOnceReturnValue=function(){return this.hasOwnProperty("_onceReturnValue")?this._onceReturnValue:!0},d._getEvents=function(){return this._events||(this._events={})},a.noConflict=function(){return e.EventEmitter=f,a},"function"==typeof define&&define.amd?define("eventEmitter/EventEmitter",[],function(){return a}):"object"==typeof module&&module.exports?module.exports=a:e.EventEmitter=a}.call(this),function(a){function b(a){if(a){if("string"==typeof d[a])return a;a=a.charAt(0).toUpperCase()+a.slice(1);for(var b,e=0,f=c.length;f>e;e++)if(b=c[e]+a,"string"==typeof d[b])return b}}var c="Webkit Moz ms Ms O".split(" "),d=document.documentElement.style;"function"==typeof define&&define.amd?define("get-style-property/get-style-property",[],function(){return b}):"object"==typeof exports?module.exports=b:a.getStyleProperty=b}(window),function(a,b){function c(a){var b=parseFloat(a),c=-1===a.indexOf("%")&&!isNaN(b);return c&&b}function d(){}function e(){for(var a={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},b=0,c=h.length;c>b;b++){var d=h[b];a[d]=0}return a}function f(b){function d(){if(!m){m=!0;var d=a.getComputedStyle;if(j=function(){var a=d?function(a){return d(a,null)}:function(a){return a.currentStyle};return function(b){var c=a(b);return c||g("Style returned "+c+". Are you running this code in a hidden iframe on Firefox? See http://bit.ly/getsizebug1"),c}}(),k=b("boxSizing")){var e=document.createElement("div");e.style.width="200px",e.style.padding="1px 2px 3px 4px",e.style.borderStyle="solid",e.style.borderWidth="1px 2px 3px 4px",e.style[k]="border-box";var f=document.body||document.documentElement;f.appendChild(e);var h=j(e);l=200===c(h.width),f.removeChild(e)}}}function f(a){if(d(),"string"==typeof a&&(a=document.querySelector(a)),a&&"object"==typeof a&&a.nodeType){var b=j(a);if("none"===b.display)return e();var f={};f.width=a.offsetWidth,f.height=a.offsetHeight;for(var g=f.isBorderBox=!(!k||!b[k]||"border-box"!==b[k]),m=0,n=h.length;n>m;m++){var o=h[m],p=b[o];p=i(a,p);var q=parseFloat(p);f[o]=isNaN(q)?0:q}var r=f.paddingLeft+f.paddingRight,s=f.paddingTop+f.paddingBottom,t=f.marginLeft+f.marginRight,u=f.marginTop+f.marginBottom,v=f.borderLeftWidth+f.borderRightWidth,w=f.borderTopWidth+f.borderBottomWidth,x=g&&l,y=c(b.width);y!==!1&&(f.width=y+(x?0:r+v));var z=c(b.height);return z!==!1&&(f.height=z+(x?0:s+w)),f.innerWidth=f.width-(r+v),f.innerHeight=f.height-(s+w),f.outerWidth=f.width+t,f.outerHeight=f.height+u,f}}function i(b,c){if(a.getComputedStyle||-1===c.indexOf("%"))return c;var d=b.style,e=d.left,f=b.runtimeStyle,g=f&&f.left;return g&&(f.left=b.currentStyle.left),d.left=c,c=d.pixelLeft,d.left=e,g&&(f.left=g),c}var j,k,l,m=!1;return f}var g="undefined"==typeof console?d:function(a){console.error(a)},h=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"];"function"==typeof define&&define.amd?define("get-size/get-size",["get-style-property/get-style-property"],f):"object"==typeof exports?module.exports=f(require("desandro-get-style-property")):a.getSize=f(a.getStyleProperty)}(window),function(a){function b(a){"function"==typeof a&&(b.isReady?a():g.push(a))}function c(a){var c="readystatechange"===a.type&&"complete"!==f.readyState;b.isReady||c||d()}function d(){b.isReady=!0;for(var a=0,c=g.length;c>a;a++){var d=g[a];d()}}function e(e){return"complete"===f.readyState?d():(e.bind(f,"DOMContentLoaded",c),e.bind(f,"readystatechange",c),e.bind(a,"load",c)),b}var f=a.document,g=[];b.isReady=!1,"function"==typeof define&&define.amd?define("doc-ready/doc-ready",["eventie/eventie"],e):"object"==typeof exports?module.exports=e(require("eventie")):a.docReady=e(a.eventie)}(window),function(a){"use strict";function b(a,b){return a[g](b)}function c(a){if(!a.parentNode){var b=document.createDocumentFragment();b.appendChild(a)}}function d(a,b){c(a);for(var d=a.parentNode.querySelectorAll(b),e=0,f=d.length;f>e;e++)if(d[e]===a)return!0;return!1}function e(a,d){return c(a),b(a,d)}var f,g=function(){if(a.matches)return"matches";if(a.matchesSelector)return"matchesSelector";for(var b=["webkit","moz","ms","o"],c=0,d=b.length;d>c;c++){var e=b[c],f=e+"MatchesSelector";if(a[f])return f}}();if(g){var h=document.createElement("div"),i=b(h,"div");f=i?b:e}else f=d;"function"==typeof define&&define.amd?define("matches-selector/matches-selector",[],function(){return f}):"object"==typeof exports?module.exports=f:window.matchesSelector=f}(Element.prototype),function(a,b){"use strict";"function"==typeof define&&define.amd?define("fizzy-ui-utils/utils",["doc-ready/doc-ready","matches-selector/matches-selector"],function(c,d){return b(a,c,d)}):"object"==typeof exports?module.exports=b(a,require("doc-ready"),require("desandro-matches-selector")):a.fizzyUIUtils=b(a,a.docReady,a.matchesSelector)}(window,function(a,b,c){var d={};d.extend=function(a,b){for(var c in b)a[c]=b[c];return a},d.modulo=function(a,b){return(a%b+b)%b};var e=Object.prototype.toString;d.isArray=function(a){return"[object Array]"==e.call(a)},d.makeArray=function(a){var b=[];if(d.isArray(a))b=a;else if(a&&"number"==typeof a.length)for(var c=0,e=a.length;e>c;c++)b.push(a[c]);else b.push(a);return b},d.indexOf=Array.prototype.indexOf?function(a,b){return a.indexOf(b)}:function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},d.removeFrom=function(a,b){var c=d.indexOf(a,b);-1!=c&&a.splice(c,1)},d.isElement="function"==typeof HTMLElement||"object"==typeof HTMLElement?function(a){return a instanceof HTMLElement}:function(a){return a&&"object"==typeof a&&1==a.nodeType&&"string"==typeof a.nodeName},d.setText=function(){function a(a,c){b=b||(void 0!==document.documentElement.textContent?"textContent":"innerText"),a[b]=c}var b;return a}(),d.getParent=function(a,b){for(;a!=document.body;)if(a=a.parentNode,c(a,b))return a},d.getQueryElement=function(a){return"string"==typeof a?document.querySelector(a):a},d.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},d.filterFindElements=function(a,b){a=d.makeArray(a);for(var e=[],f=0,g=a.length;g>f;f++){var h=a[f];if(d.isElement(h))if(b){c(h,b)&&e.push(h);for(var i=h.querySelectorAll(b),j=0,k=i.length;k>j;j++)e.push(i[j])}else e.push(h)}return e},d.debounceMethod=function(a,b,c){var d=a.prototype[b],e=b+"Timeout";a.prototype[b]=function(){var a=this[e];a&&clearTimeout(a);var b=arguments,f=this;this[e]=setTimeout(function(){d.apply(f,b),delete f[e]},c||100)}},d.toDashed=function(a){return a.replace(/(.)([A-Z])/g,function(a,b,c){return b+"-"+c}).toLowerCase()};var f=a.console;return d.htmlInit=function(c,e){b(function(){for(var b=d.toDashed(e),g=document.querySelectorAll(".js-"+b),h="data-"+b+"-options",i=0,j=g.length;j>i;i++){var k,l=g[i],m=l.getAttribute(h);try{k=m&&JSON.parse(m)}catch(n){f&&f.error("Error parsing "+h+" on "+l.nodeName.toLowerCase()+(l.id?"#"+l.id:"")+": "+n);continue}var o=new c(l,k),p=a.jQuery;p&&p.data(l,e,o)}})},d}),function(a,b){"use strict";"function"==typeof define&&define.amd?define("outlayer/item",["eventEmitter/EventEmitter","get-size/get-size","get-style-property/get-style-property","fizzy-ui-utils/utils"],function(c,d,e,f){return b(a,c,d,e,f)}):"object"==typeof exports?module.exports=b(a,require("wolfy87-eventemitter"),require("get-size"),require("desandro-get-style-property"),require("fizzy-ui-utils")):(a.Outlayer={},a.Outlayer.Item=b(a,a.EventEmitter,a.getSize,a.getStyleProperty,a.fizzyUIUtils))}(window,function(a,b,c,d,e){"use strict";function f(a){for(var b in a)return!1;return b=null,!0}function g(a,b){a&&(this.element=a,this.layout=b,this.position={x:0,y:0},this._create())}function h(a){return a.replace(/([A-Z])/g,function(a){return"-"+a.toLowerCase()})}var i=a.getComputedStyle,j=i?function(a){return i(a,null)}:function(a){return a.currentStyle},k=d("transition"),l=d("transform"),m=k&&l,n=!!d("perspective"),o={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"otransitionend",transition:"transitionend"}[k],p=["transform","transition","transitionDuration","transitionProperty"],q=function(){for(var a={},b=0,c=p.length;c>b;b++){var e=p[b],f=d(e);f&&f!==e&&(a[e]=f)}return a}();e.extend(g.prototype,b.prototype),g.prototype._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},g.prototype.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},g.prototype.getSize=function(){this.size=c(this.element)},g.prototype.css=function(a){var b=this.element.style;for(var c in a){var d=q[c]||c;b[d]=a[c]}},g.prototype.getPosition=function(){var a=j(this.element),b=this.layout.options,c=b.isOriginLeft,d=b.isOriginTop,e=a[c?"left":"right"],f=a[d?"top":"bottom"],g=this.layout.size,h=-1!=e.indexOf("%")?parseFloat(e)/100*g.width:parseInt(e,10),i=-1!=f.indexOf("%")?parseFloat(f)/100*g.height:parseInt(f,10);h=isNaN(h)?0:h,i=isNaN(i)?0:i,h-=c?g.paddingLeft:g.paddingRight,i-=d?g.paddingTop:g.paddingBottom,this.position.x=h,this.position.y=i},g.prototype.layoutPosition=function(){var a=this.layout.size,b=this.layout.options,c={},d=b.isOriginLeft?"paddingLeft":"paddingRight",e=b.isOriginLeft?"left":"right",f=b.isOriginLeft?"right":"left",g=this.position.x+a[d];c[e]=this.getXValue(g),c[f]="";var h=b.isOriginTop?"paddingTop":"paddingBottom",i=b.isOriginTop?"top":"bottom",j=b.isOriginTop?"bottom":"top",k=this.position.y+a[h];c[i]=this.getYValue(k),c[j]="",this.css(c),this.emitEvent("layout",[this])},g.prototype.getXValue=function(a){var b=this.layout.options;return b.percentPosition&&!b.isHorizontal?a/this.layout.size.width*100+"%":a+"px"},g.prototype.getYValue=function(a){var b=this.layout.options;return b.percentPosition&&b.isHorizontal?a/this.layout.size.height*100+"%":a+"px"},g.prototype._transitionTo=function(a,b){this.getPosition();var c=this.position.x,d=this.position.y,e=parseInt(a,10),f=parseInt(b,10),g=e===this.position.x&&f===this.position.y;if(this.setPosition(a,b),g&&!this.isTransitioning)return void this.layoutPosition();var h=a-c,i=b-d,j={};j.transform=this.getTranslate(h,i),this.transition({to:j,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})},g.prototype.getTranslate=function(a,b){var c=this.layout.options;return a=c.isOriginLeft?a:-a,b=c.isOriginTop?b:-b,n?"translate3d("+a+"px, "+b+"px, 0)":"translate("+a+"px, "+b+"px)"},g.prototype.goTo=function(a,b){this.setPosition(a,b),this.layoutPosition()},g.prototype.moveTo=m?g.prototype._transitionTo:g.prototype.goTo,g.prototype.setPosition=function(a,b){this.position.x=parseInt(a,10),this.position.y=parseInt(b,10)},g.prototype._nonTransition=function(a){this.css(a.to),a.isCleaning&&this._removeStyles(a.to);for(var b in a.onTransitionEnd)a.onTransitionEnd[b].call(this)},g.prototype._transition=function(a){if(!parseFloat(this.layout.options.transitionDuration))return void this._nonTransition(a);var b=this._transn;for(var c in a.onTransitionEnd)b.onEnd[c]=a.onTransitionEnd[c];for(c in a.to)b.ingProperties[c]=!0,a.isCleaning&&(b.clean[c]=!0);if(a.from){this.css(a.from);var d=this.element.offsetHeight;d=null}this.enableTransition(a.to),this.css(a.to),this.isTransitioning=!0};var r="opacity,"+h(q.transform||"transform");g.prototype.enableTransition=function(){this.isTransitioning||(this.css({transitionProperty:r,transitionDuration:this.layout.options.transitionDuration}),this.element.addEventListener(o,this,!1))},g.prototype.transition=g.prototype[k?"_transition":"_nonTransition"],g.prototype.onwebkitTransitionEnd=function(a){this.ontransitionend(a)},g.prototype.onotransitionend=function(a){this.ontransitionend(a)};var s={"-webkit-transform":"transform","-moz-transform":"transform","-o-transform":"transform"};g.prototype.ontransitionend=function(a){if(a.target===this.element){var b=this._transn,c=s[a.propertyName]||a.propertyName;if(delete b.ingProperties[c],f(b.ingProperties)&&this.disableTransition(),c in b.clean&&(this.element.style[a.propertyName]="",delete b.clean[c]),c in b.onEnd){var d=b.onEnd[c];d.call(this),delete b.onEnd[c]}this.emitEvent("transitionEnd",[this])}},g.prototype.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(o,this,!1),this.isTransitioning=!1},g.prototype._removeStyles=function(a){var b={};for(var c in a)b[c]="";this.css(b)};var t={transitionProperty:"",transitionDuration:""};return g.prototype.removeTransitionStyles=function(){this.css(t)},g.prototype.removeElem=function(){this.element.parentNode.removeChild(this.element),this.css({display:""}),this.emitEvent("remove",[this])},g.prototype.remove=function(){if(!k||!parseFloat(this.layout.options.transitionDuration))return void this.removeElem();var a=this;this.once("transitionEnd",function(){a.removeElem()}),this.hide()},g.prototype.reveal=function(){delete this.isHidden,this.css({display:""});var a=this.layout.options,b={},c=this.getHideRevealTransitionEndProperty("visibleStyle");b[c]=this.onRevealTransitionEnd,this.transition({from:a.hiddenStyle,to:a.visibleStyle,isCleaning:!0,onTransitionEnd:b})},g.prototype.onRevealTransitionEnd=function(){this.isHidden||this.emitEvent("reveal")},g.prototype.getHideRevealTransitionEndProperty=function(a){var b=this.layout.options[a];if(b.opacity)return"opacity";for(var c in b)return c},g.prototype.hide=function(){this.isHidden=!0,this.css({display:""});var a=this.layout.options,b={},c=this.getHideRevealTransitionEndProperty("hiddenStyle");b[c]=this.onHideTransitionEnd,this.transition({from:a.visibleStyle,to:a.hiddenStyle,isCleaning:!0,onTransitionEnd:b})},g.prototype.onHideTransitionEnd=function(){this.isHidden&&(this.css({display:"none"}),this.emitEvent("hide"))},g.prototype.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},g}),function(a,b){"use strict";"function"==typeof define&&define.amd?define("outlayer/outlayer",["eventie/eventie","eventEmitter/EventEmitter","get-size/get-size","fizzy-ui-utils/utils","./item"],function(c,d,e,f,g){return b(a,c,d,e,f,g)}):"object"==typeof exports?module.exports=b(a,require("eventie"),require("wolfy87-eventemitter"),require("get-size"),require("fizzy-ui-utils"),require("./item")):a.Outlayer=b(a,a.eventie,a.EventEmitter,a.getSize,a.fizzyUIUtils,a.Outlayer.Item)}(window,function(a,b,c,d,e,f){"use strict";function g(a,b){var c=e.getQueryElement(a);if(!c)return void(h&&h.error("Bad element for "+this.constructor.namespace+": "+(c||a)));this.element=c,i&&(this.$element=i(this.element)),this.options=e.extend({},this.constructor.defaults),this.option(b);var d=++k;this.element.outlayerGUID=d,l[d]=this,this._create(),this.options.isInitLayout&&this.layout()}var h=a.console,i=a.jQuery,j=function(){},k=0,l={};return g.namespace="outlayer",g.Item=f,g.defaults={containerStyle:{position:"relative"},isInitLayout:!0,isOriginLeft:!0,isOriginTop:!0,isResizeBound:!0,isResizingContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}},e.extend(g.prototype,c.prototype),g.prototype.option=function(a){e.extend(this.options,a)},g.prototype._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),e.extend(this.element.style,this.options.containerStyle),this.options.isResizeBound&&this.bindResize()},g.prototype.reloadItems=function(){this.items=this._itemize(this.element.children)},g.prototype._itemize=function(a){for(var b=this._filterFindItemElements(a),c=this.constructor.Item,d=[],e=0,f=b.length;f>e;e++){var g=b[e],h=new c(g,this);d.push(h)}return d},g.prototype._filterFindItemElements=function(a){return e.filterFindElements(a,this.options.itemSelector)},g.prototype.getItemElements=function(){for(var a=[],b=0,c=this.items.length;c>b;b++)a.push(this.items[b].element);return a},g.prototype.layout=function(){this._resetLayout(),this._manageStamps();var a=void 0!==this.options.isLayoutInstant?this.options.isLayoutInstant:!this._isLayoutInited;this.layoutItems(this.items,a),this._isLayoutInited=!0},g.prototype._init=g.prototype.layout,g.prototype._resetLayout=function(){this.getSize()},g.prototype.getSize=function(){this.size=d(this.element)},g.prototype._getMeasurement=function(a,b){var c,f=this.options[a];f?("string"==typeof f?c=this.element.querySelector(f):e.isElement(f)&&(c=f),this[a]=c?d(c)[b]:f):this[a]=0},g.prototype.layoutItems=function(a,b){a=this._getItemsForLayout(a),this._layoutItems(a,b),this._postLayout()},g.prototype._getItemsForLayout=function(a){for(var b=[],c=0,d=a.length;d>c;c++){var e=a[c];e.isIgnored||b.push(e)}return b},g.prototype._layoutItems=function(a,b){if(this._emitCompleteOnItems("layout",a),a&&a.length){for(var c=[],d=0,e=a.length;e>d;d++){var f=a[d],g=this._getItemLayoutPosition(f);g.item=f,g.isInstant=b||f.isLayoutInstant,c.push(g)}this._processLayoutQueue(c)}},g.prototype._getItemLayoutPosition=function(){return{x:0,y:0}},g.prototype._processLayoutQueue=function(a){for(var b=0,c=a.length;c>b;b++){var d=a[b];this._positionItem(d.item,d.x,d.y,d.isInstant)}},g.prototype._positionItem=function(a,b,c,d){d?a.goTo(b,c):a.moveTo(b,c)},g.prototype._postLayout=function(){this.resizeContainer()},g.prototype.resizeContainer=function(){if(this.options.isResizingContainer){var a=this._getContainerSize();a&&(this._setContainerMeasure(a.width,!0),this._setContainerMeasure(a.height,!1))}},g.prototype._getContainerSize=j,g.prototype._setContainerMeasure=function(a,b){if(void 0!==a){var c=this.size;c.isBorderBox&&(a+=b?c.paddingLeft+c.paddingRight+c.borderLeftWidth+c.borderRightWidth:c.paddingBottom+c.paddingTop+c.borderTopWidth+c.borderBottomWidth),a=Math.max(a,0),this.element.style[b?"width":"height"]=a+"px"}},g.prototype._emitCompleteOnItems=function(a,b){function c(){e.dispatchEvent(a+"Complete",null,[b])}function d(){g++,g===f&&c()}var e=this,f=b.length;if(!b||!f)return void c();for(var g=0,h=0,i=b.length;i>h;h++){var j=b[h];j.once(a,d)}},g.prototype.dispatchEvent=function(a,b,c){var d=b?[b].concat(c):c;if(this.emitEvent(a,d),i)if(this.$element=this.$element||i(this.element),b){var e=i.Event(b);e.type=a,this.$element.trigger(e,c)}else this.$element.trigger(a,c)},g.prototype.ignore=function(a){var b=this.getItem(a);b&&(b.isIgnored=!0)},g.prototype.unignore=function(a){var b=this.getItem(a);b&&delete b.isIgnored},g.prototype.stamp=function(a){if(a=this._find(a)){this.stamps=this.stamps.concat(a);for(var b=0,c=a.length;c>b;b++){var d=a[b];this.ignore(d)}}},g.prototype.unstamp=function(a){if(a=this._find(a))for(var b=0,c=a.length;c>b;b++){var d=a[b];e.removeFrom(this.stamps,d),this.unignore(d)}},g.prototype._find=function(a){return a?("string"==typeof a&&(a=this.element.querySelectorAll(a)),a=e.makeArray(a)):void 0},g.prototype._manageStamps=function(){if(this.stamps&&this.stamps.length){this._getBoundingRect();for(var a=0,b=this.stamps.length;b>a;a++){var c=this.stamps[a];this._manageStamp(c)}}},g.prototype._getBoundingRect=function(){var a=this.element.getBoundingClientRect(),b=this.size;this._boundingRect={left:a.left+b.paddingLeft+b.borderLeftWidth,top:a.top+b.paddingTop+b.borderTopWidth,right:a.right-(b.paddingRight+b.borderRightWidth),bottom:a.bottom-(b.paddingBottom+b.borderBottomWidth)}},g.prototype._manageStamp=j,g.prototype._getElementOffset=function(a){var b=a.getBoundingClientRect(),c=this._boundingRect,e=d(a),f={left:b.left-c.left-e.marginLeft,top:b.top-c.top-e.marginTop,right:c.right-b.right-e.marginRight,bottom:c.bottom-b.bottom-e.marginBottom};return f},g.prototype.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},g.prototype.bindResize=function(){this.isResizeBound||(b.bind(a,"resize",this),this.isResizeBound=!0)},g.prototype.unbindResize=function(){this.isResizeBound&&b.unbind(a,"resize",this),this.isResizeBound=!1},g.prototype.onresize=function(){function a(){b.resize(),delete b.resizeTimeout}this.resizeTimeout&&clearTimeout(this.resizeTimeout);var b=this;this.resizeTimeout=setTimeout(a,100)},g.prototype.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},g.prototype.needsResizeLayout=function(){var a=d(this.element),b=this.size&&a;return b&&a.innerWidth!==this.size.innerWidth},g.prototype.addItems=function(a){var b=this._itemize(a);return b.length&&(this.items=this.items.concat(b)),b},g.prototype.appended=function(a){var b=this.addItems(a);b.length&&(this.layoutItems(b,!0),this.reveal(b))},g.prototype.prepended=function(a){var b=this._itemize(a);if(b.length){var c=this.items.slice(0);this.items=b.concat(c),this._resetLayout(),this._manageStamps(),this.layoutItems(b,!0),this.reveal(b),this.layoutItems(c)}},g.prototype.reveal=function(a){this._emitCompleteOnItems("reveal",a);for(var b=a&&a.length,c=0;b&&b>c;c++){var d=a[c];d.reveal()}},g.prototype.hide=function(a){this._emitCompleteOnItems("hide",a);for(var b=a&&a.length,c=0;b&&b>c;c++){var d=a[c];d.hide()}},g.prototype.revealItemElements=function(a){var b=this.getItems(a);this.reveal(b)},g.prototype.hideItemElements=function(a){var b=this.getItems(a);this.hide(b)},g.prototype.getItem=function(a){for(var b=0,c=this.items.length;c>b;b++){var d=this.items[b];if(d.element===a)return d}},g.prototype.getItems=function(a){a=e.makeArray(a);for(var b=[],c=0,d=a.length;d>c;c++){var f=a[c],g=this.getItem(f);g&&b.push(g)}return b},g.prototype.remove=function(a){var b=this.getItems(a);if(this._emitCompleteOnItems("remove",b),b&&b.length)for(var c=0,d=b.length;d>c;c++){var f=b[c];f.remove(),e.removeFrom(this.items,f)}},g.prototype.destroy=function(){var a=this.element.style;a.height="",a.position="",a.width="";for(var b=0,c=this.items.length;c>b;b++){var d=this.items[b];d.destroy()}this.unbindResize();var e=this.element.outlayerGUID;delete l[e],delete this.element.outlayerGUID,i&&i.removeData(this.element,this.constructor.namespace)},g.data=function(a){a=e.getQueryElement(a);var b=a&&a.outlayerGUID;return b&&l[b]},g.create=function(a,b){function c(){g.apply(this,arguments)}return Object.create?c.prototype=Object.create(g.prototype):e.extend(c.prototype,g.prototype),c.prototype.constructor=c,c.defaults=e.extend({},g.defaults),e.extend(c.defaults,b),c.prototype.settings={},c.namespace=a,c.data=g.data,c.Item=function(){f.apply(this,arguments)},c.Item.prototype=new f,e.htmlInit(c,a),i&&i.bridget&&i.bridget(a,c),c},g.Item=f,g}),function(a,b){"use strict";"function"==typeof define&&define.amd?define("isotope/js/item",["outlayer/outlayer"],b):"object"==typeof exports?module.exports=b(require("outlayer")):(a.Isotope=a.Isotope||{},a.Isotope.Item=b(a.Outlayer))}(window,function(a){"use strict";function b(){a.Item.apply(this,arguments)}b.prototype=new a.Item,b.prototype._create=function(){this.id=this.layout.itemGUID++,a.Item.prototype._create.call(this),this.sortData={}},b.prototype.updateSortData=function(){if(!this.isIgnored){this.sortData.id=this.id,this.sortData["original-order"]=this.id,this.sortData.random=Math.random();var a=this.layout.options.getSortData,b=this.layout._sorters;for(var c in a){var d=b[c];this.sortData[c]=d(this.element,this)}}};var c=b.prototype.destroy;return b.prototype.destroy=function(){c.apply(this,arguments),this.css({display:""})},b}),function(a,b){"use strict";"function"==typeof define&&define.amd?define("isotope/js/layout-mode",["get-size/get-size","outlayer/outlayer"],b):"object"==typeof exports?module.exports=b(require("get-size"),require("outlayer")):(a.Isotope=a.Isotope||{},a.Isotope.LayoutMode=b(a.getSize,a.Outlayer))}(window,function(a,b){"use strict";function c(a){this.isotope=a,a&&(this.options=a.options[this.namespace],this.element=a.element,this.items=a.filteredItems,this.size=a.size)}return function(){function a(a){return function(){return b.prototype[a].apply(this.isotope,arguments)}}for(var d=["_resetLayout","_getItemLayoutPosition","_manageStamp","_getContainerSize","_getElementOffset","needsResizeLayout"],e=0,f=d.length;f>e;e++){var g=d[e];c.prototype[g]=a(g)}}(),c.prototype.needsVerticalResizeLayout=function(){var b=a(this.isotope.element),c=this.isotope.size&&b;return c&&b.innerHeight!=this.isotope.size.innerHeight},c.prototype._getMeasurement=function(){this.isotope._getMeasurement.apply(this,arguments)},c.prototype.getColumnWidth=function(){this.getSegmentSize("column","Width")},c.prototype.getRowHeight=function(){this.getSegmentSize("row","Height")},c.prototype.getSegmentSize=function(a,b){var c=a+b,d="outer"+b;if(this._getMeasurement(c,d),!this[c]){var e=this.getFirstItemSize();this[c]=e&&e[d]||this.isotope.size["inner"+b]}},c.prototype.getFirstItemSize=function(){var b=this.isotope.filteredItems[0];return b&&b.element&&a(b.element)},c.prototype.layout=function(){this.isotope.layout.apply(this.isotope,arguments)},c.prototype.getSize=function(){this.isotope.getSize(),this.size=this.isotope.size},c.modes={},c.create=function(a,b){function d(){c.apply(this,arguments)}return d.prototype=new c,b&&(d.options=b),d.prototype.namespace=a,c.modes[a]=d,d},c}),function(a,b){"use strict";"function"==typeof define&&define.amd?define("masonry/masonry",["outlayer/outlayer","get-size/get-size","fizzy-ui-utils/utils"],b):"object"==typeof exports?module.exports=b(require("outlayer"),require("get-size"),require("fizzy-ui-utils")):a.Masonry=b(a.Outlayer,a.getSize,a.fizzyUIUtils)}(window,function(a,b,c){var d=a.create("masonry");return d.prototype._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns();var a=this.cols;for(this.colYs=[];a--;)this.colYs.push(0);this.maxY=0},d.prototype.measureColumns=function(){if(this.getContainerWidth(),!this.columnWidth){var a=this.items[0],c=a&&a.element;this.columnWidth=c&&b(c).outerWidth||this.containerWidth}var d=this.columnWidth+=this.gutter,e=this.containerWidth+this.gutter,f=e/d,g=d-e%d,h=g&&1>g?"round":"floor";f=Math[h](f),this.cols=Math.max(f,1)},d.prototype.getContainerWidth=function(){var a=this.options.isFitWidth?this.element.parentNode:this.element,c=b(a);this.containerWidth=c&&c.innerWidth},d.prototype._getItemLayoutPosition=function(a){a.getSize();var b=a.size.outerWidth%this.columnWidth,d=b&&1>b?"round":"ceil",e=Math[d](a.size.outerWidth/this.columnWidth);e=Math.min(e,this.cols);for(var f=this._getColGroup(e),g=Math.min.apply(Math,f),h=c.indexOf(f,g),i={x:this.columnWidth*h,y:g},j=g+a.size.outerHeight,k=this.cols+1-f.length,l=0;k>l;l++)this.colYs[h+l]=j;return i},d.prototype._getColGroup=function(a){if(2>a)return this.colYs;for(var b=[],c=this.cols+1-a,d=0;c>d;d++){var e=this.colYs.slice(d,d+a);b[d]=Math.max.apply(Math,e)}return b},d.prototype._manageStamp=function(a){var c=b(a),d=this._getElementOffset(a),e=this.options.isOriginLeft?d.left:d.right,f=e+c.outerWidth,g=Math.floor(e/this.columnWidth);g=Math.max(0,g);var h=Math.floor(f/this.columnWidth);h-=f%this.columnWidth?0:1,h=Math.min(this.cols-1,h);for(var i=(this.options.isOriginTop?d.top:d.bottom)+c.outerHeight,j=g;h>=j;j++)this.colYs[j]=Math.max(i,this.colYs[j])},d.prototype._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var a={height:this.maxY};return this.options.isFitWidth&&(a.width=this._getContainerFitWidth()),a},d.prototype._getContainerFitWidth=function(){for(var a=0,b=this.cols;--b&&0===this.colYs[b];)a++;return(this.cols-a)*this.columnWidth-this.gutter},d.prototype.needsResizeLayout=function(){var a=this.containerWidth;return this.getContainerWidth(),a!==this.containerWidth},d}),function(a,b){"use strict";"function"==typeof define&&define.amd?define("isotope/js/layout-modes/masonry",["../layout-mode","masonry/masonry"],b):"object"==typeof exports?module.exports=b(require("../layout-mode"),require("masonry-layout")):b(a.Isotope.LayoutMode,a.Masonry)}(window,function(a,b){"use strict";function c(a,b){for(var c in b)a[c]=b[c];return a}var d=a.create("masonry"),e=d.prototype._getElementOffset,f=d.prototype.layout,g=d.prototype._getMeasurement;c(d.prototype,b.prototype),d.prototype._getElementOffset=e,d.prototype.layout=f,d.prototype._getMeasurement=g;var h=d.prototype.measureColumns;d.prototype.measureColumns=function(){this.items=this.isotope.filteredItems,h.call(this)};var i=d.prototype._manageStamp;return d.prototype._manageStamp=function(){this.options.isOriginLeft=this.isotope.options.isOriginLeft,this.options.isOriginTop=this.isotope.options.isOriginTop,i.apply(this,arguments)},d}),function(a,b){"use strict";"function"==typeof define&&define.amd?define("isotope/js/layout-modes/fit-rows",["../layout-mode"],b):"object"==typeof exports?module.exports=b(require("../layout-mode")):b(a.Isotope.LayoutMode)}(window,function(a){"use strict";var b=a.create("fitRows");return b.prototype._resetLayout=function(){this.x=0,this.y=0,this.maxY=0,this._getMeasurement("gutter","outerWidth")},b.prototype._getItemLayoutPosition=function(a){a.getSize();var b=a.size.outerWidth+this.gutter,c=this.isotope.size.innerWidth+this.gutter;0!==this.x&&b+this.x>c&&(this.x=0,this.y=this.maxY);var d={x:this.x,y:this.y};return this.maxY=Math.max(this.maxY,this.y+a.size.outerHeight),this.x+=b,d},b.prototype._getContainerSize=function(){return{height:this.maxY}},b}),function(a,b){"use strict";"function"==typeof define&&define.amd?define("isotope/js/layout-modes/vertical",["../layout-mode"],b):"object"==typeof exports?module.exports=b(require("../layout-mode")):b(a.Isotope.LayoutMode)}(window,function(a){"use strict";var b=a.create("vertical",{horizontalAlignment:0});return b.prototype._resetLayout=function(){this.y=0},b.prototype._getItemLayoutPosition=function(a){a.getSize();var b=(this.isotope.size.innerWidth-a.size.outerWidth)*this.options.horizontalAlignment,c=this.y;return this.y+=a.size.outerHeight,{x:b,y:c}},b.prototype._getContainerSize=function(){return{height:this.y}},b}),function(a,b){"use strict";"function"==typeof define&&define.amd?define(["outlayer/outlayer","get-size/get-size","matches-selector/matches-selector","fizzy-ui-utils/utils","isotope/js/item","isotope/js/layout-mode","isotope/js/layout-modes/masonry","isotope/js/layout-modes/fit-rows","isotope/js/layout-modes/vertical"],function(c,d,e,f,g,h){return b(a,c,d,e,f,g,h)}):"object"==typeof exports?module.exports=b(a,require("outlayer"),require("get-size"),require("desandro-matches-selector"),require("fizzy-ui-utils"),require("./item"),require("./layout-mode"),require("./layout-modes/masonry"),require("./layout-modes/fit-rows"),require("./layout-modes/vertical")):a.Isotope=b(a,a.Outlayer,a.getSize,a.matchesSelector,a.fizzyUIUtils,a.Isotope.Item,a.Isotope.LayoutMode)}(window,function(a,b,c,d,e,f,g){function h(a,b){return function(c,d){for(var e=0,f=a.length;f>e;e++){var g=a[e],h=c.sortData[g],i=d.sortData[g];if(h>i||i>h){var j=void 0!==b[g]?b[g]:b,k=j?1:-1;return(h>i?1:-1)*k}}return 0}}var i=a.jQuery,j=String.prototype.trim?function(a){return a.trim()}:function(a){return a.replace(/^\s+|\s+$/g,"")},k=document.documentElement,l=k.textContent?function(a){return a.textContent}:function(a){return a.innerText},m=b.create("isotope",{layoutMode:"masonry",isJQueryFiltering:!0,sortAscending:!0});m.Item=f,m.LayoutMode=g,m.prototype._create=function(){this.itemGUID=0,this._sorters={},this._getSorters(),b.prototype._create.call(this),this.modes={},this.filteredItems=this.items,this.sortHistory=["original-order"];for(var a in g.modes)this._initLayoutMode(a)},m.prototype.reloadItems=function(){this.itemGUID=0,b.prototype.reloadItems.call(this)},m.prototype._itemize=function(){for(var a=b.prototype._itemize.apply(this,arguments),c=0,d=a.length;d>c;c++){var e=a[c];e.id=this.itemGUID++}return this._updateItemsSortData(a),a},m.prototype._initLayoutMode=function(a){var b=g.modes[a],c=this.options[a]||{};this.options[a]=b.options?e.extend(b.options,c):c,this.modes[a]=new b(this)},m.prototype.layout=function(){return!this._isLayoutInited&&this.options.isInitLayout?void this.arrange():void this._layout()},m.prototype._layout=function(){var a=this._getIsInstant();this._resetLayout(),this._manageStamps(),this.layoutItems(this.filteredItems,a),this._isLayoutInited=!0},m.prototype.arrange=function(a){function b(){d.reveal(c.needReveal),d.hide(c.needHide)}this.option(a),this._getIsInstant();var c=this._filter(this.items);this.filteredItems=c.matches;var d=this;this._bindArrangeComplete(),this._isInstant?this._noTransition(b):b(),this._sort(),this._layout()},m.prototype._init=m.prototype.arrange,m.prototype._getIsInstant=function(){var a=void 0!==this.options.isLayoutInstant?this.options.isLayoutInstant:!this._isLayoutInited;return this._isInstant=a,a},m.prototype._bindArrangeComplete=function(){function a(){b&&c&&d&&e.dispatchEvent("arrangeComplete",null,[e.filteredItems])}var b,c,d,e=this;this.once("layoutComplete",function(){b=!0,a()}),this.once("hideComplete",function(){c=!0,a()}),this.once("revealComplete",function(){d=!0,a()})},m.prototype._filter=function(a){var b=this.options.filter;b=b||"*";for(var c=[],d=[],e=[],f=this._getFilterTest(b),g=0,h=a.length;h>g;g++){var i=a[g];if(!i.isIgnored){var j=f(i);j&&c.push(i),j&&i.isHidden?d.push(i):j||i.isHidden||e.push(i)}}return{matches:c,needReveal:d,needHide:e}},m.prototype._getFilterTest=function(a){return i&&this.options.isJQueryFiltering?function(b){return i(b.element).is(a)}:"function"==typeof a?function(b){return a(b.element)}:function(b){return d(b.element,a)}},m.prototype.updateSortData=function(a){var b;a?(a=e.makeArray(a),b=this.getItems(a)):b=this.items,this._getSorters(),this._updateItemsSortData(b)},m.prototype._getSorters=function(){var a=this.options.getSortData;for(var b in a){var c=a[b];this._sorters[b]=n(c)}},m.prototype._updateItemsSortData=function(a){for(var b=a&&a.length,c=0;b&&b>c;c++){var d=a[c];d.updateSortData()}};var n=function(){function a(a){if("string"!=typeof a)return a;var c=j(a).split(" "),d=c[0],e=d.match(/^\[(.+)\]$/),f=e&&e[1],g=b(f,d),h=m.sortDataParsers[c[1]];return a=h?function(a){return a&&h(g(a))}:function(a){return a&&g(a)}}function b(a,b){var c;return c=a?function(b){return b.getAttribute(a)}:function(a){var c=a.querySelector(b);return c&&l(c)}}return a}();m.sortDataParsers={parseInt:function(a){return parseInt(a,10)},parseFloat:function(a){return parseFloat(a)}},m.prototype._sort=function(){var a=this.options.sortBy;if(a){var b=[].concat.apply(a,this.sortHistory),c=h(b,this.options.sortAscending);this.filteredItems.sort(c),a!=this.sortHistory[0]&&this.sortHistory.unshift(a)}},m.prototype._mode=function(){var a=this.options.layoutMode,b=this.modes[a];if(!b)throw new Error("No layout mode: "+a);return b.options=this.options[a],b},m.prototype._resetLayout=function(){b.prototype._resetLayout.call(this),this._mode()._resetLayout()},m.prototype._getItemLayoutPosition=function(a){return this._mode()._getItemLayoutPosition(a)},m.prototype._manageStamp=function(a){this._mode()._manageStamp(a)},m.prototype._getContainerSize=function(){return this._mode()._getContainerSize()},m.prototype.needsResizeLayout=function(){return this._mode().needsResizeLayout()},m.prototype.appended=function(a){var b=this.addItems(a);if(b.length){var c=this._filterRevealAdded(b);this.filteredItems=this.filteredItems.concat(c)}},m.prototype.prepended=function(a){var b=this._itemize(a);if(b.length){this._resetLayout(),this._manageStamps();var c=this._filterRevealAdded(b);this.layoutItems(this.filteredItems),this.filteredItems=c.concat(this.filteredItems),this.items=b.concat(this.items)}},m.prototype._filterRevealAdded=function(a){var b=this._filter(a);return this.hide(b.needHide),this.reveal(b.matches),this.layoutItems(b.matches,!0),b.matches},m.prototype.insert=function(a){var b=this.addItems(a);if(b.length){var c,d,e=b.length;for(c=0;e>c;c++)d=b[c],this.element.appendChild(d.element);var f=this._filter(b).matches;for(c=0;e>c;c++)b[c].isLayoutInstant=!0;for(this.arrange(),c=0;e>c;c++)delete b[c].isLayoutInstant;this.reveal(f)}};var o=m.prototype.remove;return m.prototype.remove=function(a){a=e.makeArray(a);var b=this.getItems(a);o.call(this,a);var c=b&&b.length;if(c)for(var d=0;c>d;d++){var f=b[d];e.removeFrom(this.filteredItems,f)}},m.prototype.shuffle=function(){for(var a=0,b=this.items.length;b>a;a++){var c=this.items[a];c.sortData.random=Math.random()}this.options.sortBy="random",this._sort(),this._layout()},m.prototype._noTransition=function(a){var b=this.options.transitionDuration;this.options.transitionDuration=0;var c=a.call(this);return this.options.transitionDuration=b,c},m.prototype.getFilteredItemElements=function(){for(var a=[],b=0,c=this.filteredItems.length;c>b;b++)a.push(this.filteredItems[b].element);return a},m});window.Modernizr=function(a,b,c){function B(a){j.cssText=a}function C(a,b){return B(n.join(a+";")+(b||""))}function D(a,b){return typeof a===b}function E(a,b){return!!~(""+a).indexOf(b)}function F(a,b){for(var d in a){var e=a[d];if(!E(e,"-")&&j[e]!==c)return b=="pfx"?e:!0}return!1}function G(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:D(f,"function")?f.bind(d||b):f}return!1}function H(a,b,c){var d=a.charAt(0).toUpperCase()+a.slice(1),e=(a+" "+p.join(d+" ")+d).split(" ");return D(b,"string")||D(b,"undefined")?F(e,b):(e=(a+" "+q.join(d+" ")+d).split(" "),G(e,b,c))}var d="2.8.3",e={},f=!0,g=b.documentElement,h="modernizr",i=b.createElement(h),j=i.style,k,l=":)",m={}.toString,n=" -webkit- -moz- -o- -ms- ".split(" "),o="Webkit Moz O ms",p=o.split(" "),q=o.toLowerCase().split(" "),r={},s={},t={},u=[],v=u.slice,w,x=function(a,c,d,e){var f,i,j,k,l=b.createElement("div"),m=b.body,n=m||b.createElement("body");if(parseInt(d,10))while(d--)j=b.createElement("div"),j.id=e?e[d]:h+(d+1),l.appendChild(j);return f=["­",'<style id="s',h,'">',a,"</style>"].join(""),l.id=h,(m?l:n).innerHTML+=f,n.appendChild(l),m||(n.style.background="",n.style.overflow="hidden",k=g.style.overflow,g.style.overflow="hidden",g.appendChild(n)),i=c(l,a),m?l.parentNode.removeChild(l):(n.parentNode.removeChild(n),g.style.overflow=k),!!i},y=function(b){var c=a.matchMedia||a.msMatchMedia;if(c)return c(b)&&c(b).matches||!1;var d;return x("@media "+b+" { #"+h+" { position: absolute; } }",function(b){d=(a.getComputedStyle?getComputedStyle(b,null):b.currentStyle)["position"]=="absolute"}),d},z={}.hasOwnProperty,A;!D(z,"undefined")&&!D(z.call,"undefined")?A=function(a,b){return z.call(a,b)}:A=function(a,b){return b in a&&D(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=v.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(v.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(v.call(arguments)))};return e}),r.rgba=function(){return B("background-color:rgba(150,255,150,.5)"),E(j.backgroundColor,"rgba")},r.multiplebgs=function(){return B("background:url(https://),url(https://),red url(https://)"),/(url\s*\(.*?){3}/.test(j.background)},r.backgroundsize=function(){return H("backgroundSize")},r.borderimage=function(){return H("borderImage")},r.borderradius=function(){return H("borderRadius")},r.boxshadow=function(){return H("boxShadow")},r.textshadow=function(){return b.createElement("div").style.textShadow===""},r.opacity=function(){return C("opacity:.55"),/^0.55$/.test(j.opacity)},r.cssanimations=function(){return H("animationName")},r.csscolumns=function(){return H("columnCount")},r.cssgradients=function(){var a="background-image:",b="gradient(linear,left top,right bottom,from(#9f9),to(white));",c="linear-gradient(left top,#9f9, white);";return B((a+"-webkit- ".split(" ").join(b+a)+n.join(c+a)).slice(0,-a.length)),E(j.backgroundImage,"gradient")},r.cssreflections=function(){return H("boxReflect")},r.csstransforms=function(){return!!H("transform")},r.csstransforms3d=function(){var a=!!H("perspective");return a&&"webkitPerspective"in g.style&&x("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}",function(b,c){a=b.offsetLeft===9&&b.offsetHeight===3}),a},r.csstransitions=function(){return H("transition")},r.fontface=function(){var a;return x('@font-face {font-family:"font";src:url("https://")}',function(c,d){var e=b.getElementById("smodernizr"),f=e.sheet||e.styleSheet,g=f?f.cssRules&&f.cssRules[0]?f.cssRules[0].cssText:f.cssText||"":"";a=/src/i.test(g)&&g.indexOf(d.split(" ")[0])===0}),a},r.generatedcontent=function(){var a;return x(["#",h,"{font:0/0 a}#",h,':after{content:"',l,'";visibility:hidden;font:3px/1 a}'].join(""),function(b){a=b.offsetHeight>=3}),a};for(var I in r)A(r,I)&&(w=I.toLowerCase(),e[w]=r[I](),u.push((e[w]?"":"no-")+w));return e.addTest=function(a,b){if(typeof a=="object")for(var d in a)A(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,typeof f!="undefined"&&f&&(g.className+=" "+(b?"":"no-")+a),e[a]=b}return e},B(""),i=k=null,function(a,b){function l(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x<style>"+b+"</style>",d.insertBefore(c.lastChild,d.firstChild)}function m(){var a=s.elements;return typeof a=="string"?a.split(" "):a}function n(a){var b=j[a[h]];return b||(b={},i++,a[h]=i,j[i]=b),b}function o(a,c,d){c||(c=b);if(k)return c.createElement(a);d||(d=n(c));var g;return d.cache[a]?g=d.cache[a].cloneNode():f.test(a)?g=(d.cache[a]=d.createElem(a)).cloneNode():g=d.createElem(a),g.canHaveChildren&&!e.test(a)&&!g.tagUrn?d.frag.appendChild(g):g}function p(a,c){a||(a=b);if(k)return a.createDocumentFragment();c=c||n(a);var d=c.frag.cloneNode(),e=0,f=m(),g=f.length;for(;e<g;e++)d.createElement(f[e]);return d}function q(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return s.shivMethods?o(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+m().join().replace(/[\w\-]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(s,b.frag)}function r(a){a||(a=b);var c=n(a);return s.shivCSS&&!g&&!c.hasCSS&&(c.hasCSS=!!l(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),k||q(a,c),a}var c="3.7.0",d=a.html5||{},e=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,f=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,g,h="_html5shiv",i=0,j={},k;(function(){try{var a=b.createElement("a");a.innerHTML="<xyz></xyz>",g="hidden"in a,k=a.childNodes.length==1||function(){b.createElement("a");var a=b.createDocumentFragment();return typeof a.cloneNode=="undefined"||typeof a.createDocumentFragment=="undefined"||typeof a.createElement=="undefined"}()}catch(c){g=!0,k=!0}})();var s={elements:d.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:c,shivCSS:d.shivCSS!==!1,supportsUnknownElements:k,shivMethods:d.shivMethods!==!1,type:"default",shivDocument:r,createElement:o,createDocumentFragment:p};a.html5=s,r(b)}(this,b),e._version=d,e._prefixes=n,e._domPrefixes=q,e._cssomPrefixes=p,e.mq=y,e.testProp=function(a){return F([a])},e.testAllProps=H,e.testStyles=x,g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+u.join(" "):""),e}(this,this.document),function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){("c"==a.t?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),"img"!=a&&(r||2===y[c]?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i("c"==b?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),1==p.length&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&"[object Opera]"==o.call(a.opera),l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return"[object Array]"==o.call(a)},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f<d;f++)g=a[f].split("="),(e=z[g.shift()])&&(c=e(c,g));for(f=0;f<b;f++)c=x[f](c);return c}function g(a,e,f,g,h){var i=b(a),j=i.autoCallback;i.url.split(".").pop().split("?").shift(),i.bypass||(e&&(e=d(e)?e:e[a]||e[g]||e[a.split("/").pop().split("?")[0]]),i.instead?i.instead(a,e,f,g,h):(y[i.url]?i.noexec=!0:y[i.url]=1,f.load(i.url,i.forceCSS||!i.forceJS&&"css"==i.url.split(".").pop().split("?").shift()?"c":c,i.noexec,i.attrs,i.timeout),(d(e)||d(j))&&f.load(function(){k(),e&&e(i.origUrl,h,g),j&&j(i.origUrl,h,g),y[i.url]=2})))}function h(a,b){function c(a,c){if(a){if(e(a))c||(j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}),g(a,j,b,0,h);else if(Object(a)===a)for(n in m=function(){var b=0,c;for(c in a)a.hasOwnProperty(c)&&b++;return b}(),a)a.hasOwnProperty(n)&&(!c&&!--m&&(d(j)?j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}:j[n]=function(a){return function(){var b=[].slice.call(arguments);a&&a.apply(this,b),l()}}(k[n])),g(a[n],j,b,n,h))}else!c&&l()}var h=!!a.test,i=a.load||a.both,j=a.callback||f,k=j,l=a.complete||f,m,n;c(h?a.yep:a.nope,!!i),i&&c(i)}var i,j,l=this.yepnope.loader;if(e(a))g(a,0,l,0);else if(w(a))for(i=0;i<a.length;i++)j=a[i],e(j)?g(j,0,l,0):w(j)?B(j):Object(j)===j&&h(j,l);else Object(a)===a&&h(a,l)},B.addPrefix=function(a,b){z[a]=b},B.addFilter=function(a){x.push(a)},B.errorTimeout=1e4,null==b.readyState&&b.addEventListener&&(b.readyState="loading",b.addEventListener("DOMContentLoaded",A=function(){b.removeEventListener("DOMContentLoaded",A,0),b.readyState="complete"},0)),a.yepnope=k(),a.yepnope.executeStack=h,a.yepnope.injectJs=function(a,c,d,e,i,j){var k=b.createElement("script"),l,o,e=e||B.errorTimeout;k.src=a;for(o in d)k.setAttribute(o,d[o]);c=j?h:c||f,k.onreadystatechange=k.onload=function(){!l&&g(k.readyState)&&(l=1,c(),k.onload=k.onreadystatechange=null)},m(function(){l||(l=1,c(1))},e),i?k.onload():n.parentNode.insertBefore(k,n)},a.yepnope.injectCss=function(a,c,d,e,g,i){var e=b.createElement("link"),j,c=i?h:c||f;e.href=a,e.rel="stylesheet",e.type="text/css";for(j in d)e.setAttribute(j,d[j]);g||(n.parentNode.insertBefore(e,n),m(c,0))}}(this,document),Modernizr.load=function(){yepnope.apply(window,[].slice.call(arguments,0))};!function(a){function b(){return a("body").height()>a(window).height()}var c=function(b,c){this.settings=c,this.checkSettings(),this.imgAnalyzerTimeout=null,this.entries=null,this.buildingRow={entriesBuff:[],width:0,height:0,aspectRatio:0},this.lastFetchedEntry=null,this.lastAnalyzedIndex=-1,this.yield={every:2,flushed:0},this.border=c.border>=0?c.border:c.margins,this.maxRowHeight=this.retrieveMaxRowHeight(),this.suffixRanges=this.retrieveSuffixRanges(),this.offY=this.border,this.rows=0,this.spinner={phase:0,timeSlot:150,$el:a('<div class="spinner"><span></span><span></span><span></span></div>'),intervalId:null},this.checkWidthIntervalId=null,this.galleryWidth=b.width(),this.$gallery=b};c.prototype.getSuffix=function(a,b){var c,d;for(c=a>b?a:b,d=0;d<this.suffixRanges.length;d++)if(c<=this.suffixRanges[d])return this.settings.sizeRangeSuffixes[this.suffixRanges[d]];return this.settings.sizeRangeSuffixes[this.suffixRanges[d-1]]},c.prototype.removeSuffix=function(a,b){return a.substring(0,a.length-b.length)},c.prototype.endsWith=function(a,b){return-1!==a.indexOf(b,a.length-b.length)},c.prototype.getUsedSuffix=function(a){for(var b in this.settings.sizeRangeSuffixes)if(this.settings.sizeRangeSuffixes.hasOwnProperty(b)){if(0===this.settings.sizeRangeSuffixes[b].length)continue;if(this.endsWith(a,this.settings.sizeRangeSuffixes[b]))return this.settings.sizeRangeSuffixes[b]}return""},c.prototype.newSrc=function(a,b,c,d){var e;if(this.settings.thumbnailPath)e=this.settings.thumbnailPath(a,b,c,d);else{var f=a.match(this.settings.extension),g=null!==f?f[0]:"";e=a.replace(this.settings.extension,""),e=this.removeSuffix(e,this.getUsedSuffix(e)),e+=this.getSuffix(b,c)+g}return e},c.prototype.showImg=function(a,b){this.settings.cssAnimation?(a.addClass("entry-visible"),b&&b()):(a.stop().fadeTo(this.settings.imagesAnimationDuration,1,b),a.find("> img, > a > img").stop().fadeTo(this.settings.imagesAnimationDuration,1,b))},c.prototype.extractImgSrcFromImage=function(a){var b="undefined"!=typeof a.data("safe-src")?a.data("safe-src"):a.attr("src");return a.data("jg.originalSrc",b),b},c.prototype.imgFromEntry=function(a){var b=a.find("> img");return 0===b.length&&(b=a.find("> a > img")),0===b.length?null:b},c.prototype.captionFromEntry=function(a){var b=a.find("> .caption");return 0===b.length?null:b},c.prototype.displayEntry=function(b,c,d,e,f,g){b.width(e),b.height(g),b.css("top",d),b.css("left",c);var h=this.imgFromEntry(b);if(null!==h){h.css("width",e),h.css("height",f),h.css("margin-left",-e/2),h.css("margin-top",-f/2);var i=h.attr("src"),j=this.newSrc(i,e,f,h[0]);h.one("error",function(){h.attr("src",h.data("jg.originalSrc"))});var k=function(){i!==j&&h.attr("src",j)};"skipped"===b.data("jg.loaded")?this.onImageEvent(i,a.proxy(function(){this.showImg(b,k),b.data("jg.loaded",!0)},this)):this.showImg(b,k)}else this.showImg(b);this.displayEntryCaption(b)},c.prototype.displayEntryCaption=function(b){var c=this.imgFromEntry(b);if(null!==c&&this.settings.captions){var d=this.captionFromEntry(b);if(null===d){var e=c.attr("alt");this.isValidCaption(e)||(e=b.attr("title")),this.isValidCaption(e)&&(d=a('<div class="caption">'+e+"</div>"),b.append(d),b.data("jg.createdCaption",!0))}null!==d&&(this.settings.cssAnimation||d.stop().fadeTo(0,this.settings.captionSettings.nonVisibleOpacity),this.addCaptionEventsHandlers(b))}else this.removeCaptionEventsHandlers(b)},c.prototype.isValidCaption=function(a){return"undefined"!=typeof a&&a.length>0},c.prototype.onEntryMouseEnterForCaption=function(b){var c=this.captionFromEntry(a(b.currentTarget));this.settings.cssAnimation?c.addClass("caption-visible").removeClass("caption-hidden"):c.stop().fadeTo(this.settings.captionSettings.animationDuration,this.settings.captionSettings.visibleOpacity)},c.prototype.onEntryMouseLeaveForCaption=function(b){var c=this.captionFromEntry(a(b.currentTarget));this.settings.cssAnimation?c.removeClass("caption-visible").removeClass("caption-hidden"):c.stop().fadeTo(this.settings.captionSettings.animationDuration,this.settings.captionSettings.nonVisibleOpacity)},c.prototype.addCaptionEventsHandlers=function(b){var c=b.data("jg.captionMouseEvents");"undefined"==typeof c&&(c={mouseenter:a.proxy(this.onEntryMouseEnterForCaption,this),mouseleave:a.proxy(this.onEntryMouseLeaveForCaption,this)},b.on("mouseenter",void 0,void 0,c.mouseenter),b.on("mouseleave",void 0,void 0,c.mouseleave),b.data("jg.captionMouseEvents",c))},c.prototype.removeCaptionEventsHandlers=function(a){var b=a.data("jg.captionMouseEvents");"undefined"!=typeof b&&(a.off("mouseenter",void 0,b.mouseenter),a.off("mouseleave",void 0,b.mouseleave),a.removeData("jg.captionMouseEvents"))},c.prototype.prepareBuildingRow=function(a){var b,c,d,e,f,g=!0,h=0,i=this.galleryWidth-2*this.border-(this.buildingRow.entriesBuff.length-1)*this.settings.margins,j=i/this.buildingRow.aspectRatio,k=this.settings.rowHeight,l=this.buildingRow.width/i>this.settings.justifyThreshold;if(a&&"hide"===this.settings.lastRow&&!l){for(b=0;b<this.buildingRow.entriesBuff.length;b++)c=this.buildingRow.entriesBuff[b],this.settings.cssAnimation?c.removeClass("entry-visible"):(c.stop().fadeTo(0,.1),c.find("> img, > a > img").fadeTo(0,0));return-1}for(a&&!l&&"justify"!==this.settings.lastRow&&"hide"!==this.settings.lastRow&&(g=!1,this.rows>0&&(k=(this.offY-this.border-this.settings.margins*this.rows)/this.rows,g=k*this.buildingRow.aspectRatio/i>this.settings.justifyThreshold)),b=0;b<this.buildingRow.entriesBuff.length;b++)c=this.buildingRow.entriesBuff[b],d=c.data("jg.width")/c.data("jg.height"),g?(e=b===this.buildingRow.entriesBuff.length-1?i:j*d,f=j):(e=k*d,f=k),i-=Math.round(e),c.data("jg.jwidth",Math.round(e)),c.data("jg.jheight",Math.ceil(f)),(0===b||h>f)&&(h=f);return this.buildingRow.height=h,g},c.prototype.clearBuildingRow=function(){this.buildingRow.entriesBuff=[],this.buildingRow.aspectRatio=0,this.buildingRow.width=0},c.prototype.flushRow=function(a){var b,c,d,e=this.settings,f=this.border;if(c=this.prepareBuildingRow(a),a&&"hide"===e.lastRow&&-1===c)return void this.clearBuildingRow();if(this.maxRowHeight&&(this.maxRowHeight.isPercentage&&this.maxRowHeight.value*e.rowHeight<this.buildingRow.height?this.buildingRow.height=this.maxRowHeight.value*e.rowHeight:this.maxRowHeight.value>=e.rowHeight&&this.maxRowHeight.value<this.buildingRow.height&&(this.buildingRow.height=this.maxRowHeight.value)),"center"===e.lastRow||"right"===e.lastRow){var g=this.galleryWidth-2*this.border-(this.buildingRow.entriesBuff.length-1)*e.margins;for(d=0;d<this.buildingRow.entriesBuff.length;d++)b=this.buildingRow.entriesBuff[d],g-=b.data("jg.jwidth");"center"===e.lastRow?f+=g/2:"right"===e.lastRow&&(f+=g)}for(d=0;d<this.buildingRow.entriesBuff.length;d++)b=this.buildingRow.entriesBuff[d],this.displayEntry(b,f,this.offY,b.data("jg.jwidth"),b.data("jg.jheight"),this.buildingRow.height),f+=b.data("jg.jwidth")+e.margins;this.galleryHeightToSet=this.offY+this.buildingRow.height+this.border,this.$gallery.height(this.galleryHeightToSet+this.getSpinnerHeight()),(!a||this.buildingRow.height<=e.rowHeight&&c)&&(this.offY+=this.buildingRow.height+e.margins,this.rows+=1,this.clearBuildingRow(),this.$gallery.trigger("jg.rowflush"))};var d=!1;c.prototype.checkWidth=function(){this.checkWidthIntervalId=setInterval(a.proxy(function(){var a=parseFloat(this.$gallery.width());b()===d?Math.abs(a-this.galleryWidth)>this.settings.refreshSensitivity&&(this.galleryWidth=a,this.rewind(),this.startImgAnalyzer(!0)):(d=b(),this.galleryWidth=a)},this),this.settings.refreshTime)},c.prototype.isSpinnerActive=function(){return null!==this.spinner.intervalId},c.prototype.getSpinnerHeight=function(){return this.spinner.$el.innerHeight()},c.prototype.stopLoadingSpinnerAnimation=function(){clearInterval(this.spinner.intervalId),this.spinner.intervalId=null,this.$gallery.height(this.$gallery.height()-this.getSpinnerHeight()),this.spinner.$el.detach()},c.prototype.startLoadingSpinnerAnimation=function(){var a=this.spinner,b=a.$el.find("span");clearInterval(a.intervalId),this.$gallery.append(a.$el),this.$gallery.height(this.offY+this.buildingRow.height+this.getSpinnerHeight()),a.intervalId=setInterval(function(){a.phase<b.length?b.eq(a.phase).fadeTo(a.timeSlot,1):b.eq(a.phase-b.length).fadeTo(a.timeSlot,0),a.phase=(a.phase+1)%(2*b.length)},a.timeSlot)},c.prototype.rewind=function(){this.lastFetchedEntry=null,this.lastAnalyzedIndex=-1,this.offY=this.border,this.rows=0,this.clearBuildingRow()},c.prototype.updateEntries=function(b){var c;return b&&null!=this.lastFetchedEntry?c=a(this.lastFetchedEntry).nextAll(this.settings.selector).toArray():(this.entries=[],c=this.$gallery.children(this.settings.selector).toArray()),c.length>0&&(a.isFunction(this.settings.sort)?c=this.sortArray(c):this.settings.randomize&&(c=this.shuffleArray(c)),this.lastFetchedEntry=c[c.length-1],this.settings.filter?c=this.filterArray(c):this.resetFilters(c)),this.entries=this.entries.concat(c),!0},c.prototype.insertToGallery=function(b){var c=this;a.each(b,function(){a(this).appendTo(c.$gallery)})},c.prototype.shuffleArray=function(a){var b,c,d;for(b=a.length-1;b>0;b--)c=Math.floor(Math.random()*(b+1)),d=a[b],a[b]=a[c],a[c]=d;return this.insertToGallery(a),a},c.prototype.sortArray=function(a){return a.sort(this.settings.sort),this.insertToGallery(a),a},c.prototype.resetFilters=function(b){for(var c=0;c<b.length;c++)a(b[c]).removeClass("jg-filtered")},c.prototype.filterArray=function(b){var c=this.settings;if("string"===a.type(c.filter))return b.filter(function(b){var d=a(b);return d.is(c.filter)?(d.removeClass("jg-filtered"),!0):(d.addClass("jg-filtered").removeClass("jg-visible"),!1)});if(a.isFunction(c.filter)){for(var d=b.filter(c.filter),e=0;e<b.length;e++)-1==d.indexOf(b[e])?a(b[e]).addClass("jg-filtered").removeClass("jg-visible"):a(b[e]).removeClass("jg-filtered");return d}},c.prototype.destroy=function(){clearInterval(this.checkWidthIntervalId),a.each(this.entries,a.proxy(function(b,c){var d=a(c);d.css("width",""),d.css("height",""),d.css("top",""),d.css("left",""),d.data("jg.loaded",void 0),d.removeClass("jg-entry");var e=this.imgFromEntry(d);e.css("width",""),e.css("height",""),e.css("margin-left",""),e.css("margin-top",""),e.attr("src",e.data("jg.originalSrc")),e.data("jg.originalSrc",void 0),this.removeCaptionEventsHandlers(d);var f=this.captionFromEntry(d);d.data("jg.createdCaption")?(d.data("jg.createdCaption",void 0),null!==f&&f.remove()):null!==f&&f.fadeTo(0,1)},this)),this.$gallery.css("height",""),this.$gallery.removeClass("justified-gallery"),this.$gallery.data("jg.controller",void 0)},c.prototype.analyzeImages=function(b){for(var c=this.lastAnalyzedIndex+1;c<this.entries.length;c++){var d=a(this.entries[c]);if(d.data("jg.loaded")===!0||"skipped"===d.data("jg.loaded")){var e=this.galleryWidth-2*this.border-(this.buildingRow.entriesBuff.length-1)*this.settings.margins,f=d.data("jg.width")/d.data("jg.height");if(e/(this.buildingRow.aspectRatio+f)<this.settings.rowHeight&&(this.flushRow(!1),++this.yield.flushed>=this.yield.every))return void this.startImgAnalyzer(b);this.buildingRow.entriesBuff.push(d),this.buildingRow.aspectRatio+=f,this.buildingRow.width+=f*this.settings.rowHeight,this.lastAnalyzedIndex=c}else if("error"!==d.data("jg.loaded"))return}this.buildingRow.entriesBuff.length>0&&this.flushRow(!0),this.isSpinnerActive()&&this.stopLoadingSpinnerAnimation(),this.stopImgAnalyzerStarter(),this.$gallery.trigger(b?"jg.resize":"jg.complete"),this.$gallery.height(this.galleryHeightToSet)},c.prototype.stopImgAnalyzerStarter=function(){this.yield.flushed=0,null!==this.imgAnalyzerTimeout&&clearTimeout(this.imgAnalyzerTimeout)},c.prototype.startImgAnalyzer=function(a){var b=this;this.stopImgAnalyzerStarter(),this.imgAnalyzerTimeout=setTimeout(function(){b.analyzeImages(a)},.001)},c.prototype.onImageEvent=function(b,c,d){if(c||d){var e=new Image,f=a(e);c&&f.one("load",function(){f.off("load error"),c(e)}),d&&f.one("error",function(){f.off("load error"),d(e)}),e.src=b}},c.prototype.init=function(){var b=!1,c=!1,d=this;a.each(this.entries,function(e,f){var g=a(f),h=d.imgFromEntry(g);if(g.addClass("jg-entry"),g.data("jg.loaded")!==!0&&"skipped"!==g.data("jg.loaded"))if(null!==d.settings.rel&&g.attr("rel",d.settings.rel),null!==d.settings.target&&g.attr("target",d.settings.target),null!==h){var i=d.extractImgSrcFromImage(h);if(h.attr("src",i),d.settings.waitThumbnailsLoad===!1){var j=parseFloat(h.attr("width")),k=parseFloat(h.attr("height"));if(!isNaN(j)&&!isNaN(k))return g.data("jg.width",j),g.data("jg.height",k),g.data("jg.loaded","skipped"),c=!0,d.startImgAnalyzer(!1),!0}g.data("jg.loaded",!1),b=!0,d.isSpinnerActive()||d.startLoadingSpinnerAnimation(),d.onImageEvent(i,function(a){g.data("jg.width",a.width),g.data("jg.height",a.height),g.data("jg.loaded",!0),d.startImgAnalyzer(!1)},function(){g.data("jg.loaded","error"),d.startImgAnalyzer(!1)})}else g.data("jg.loaded",!0),g.data("jg.width",g.width()|parseFloat(g.css("width"))|1),g.data("jg.height",g.height()|parseFloat(g.css("height"))|1)}),b||c||this.startImgAnalyzer(!1),this.checkWidth()},c.prototype.checkOrConvertNumber=function(b,c){if("string"===a.type(b[c])&&(b[c]=parseFloat(b[c])),"number"!==a.type(b[c]))throw c+" must be a number";if(isNaN(b[c]))throw"invalid number for "+c},c.prototype.checkSizeRangesSuffixes=function(){if("object"!==a.type(this.settings.sizeRangeSuffixes))throw"sizeRangeSuffixes must be defined and must be an object";var b=[];for(var c in this.settings.sizeRangeSuffixes)this.settings.sizeRangeSuffixes.hasOwnProperty(c)&&b.push(c);for(var d={0:""},e=0;e<b.length;e++)if("string"===a.type(b[e]))try{var f=parseInt(b[e].replace(/^[a-z]+/,""),10);d[f]=this.settings.sizeRangeSuffixes[b[e]]}catch(g){throw"sizeRangeSuffixes keys must contains correct numbers ("+g+")"}else d[b[e]]=this.settings.sizeRangeSuffixes[b[e]];this.settings.sizeRangeSuffixes=d},c.prototype.retrieveMaxRowHeight=function(){var b={};if("string"===a.type(this.settings.maxRowHeight))this.settings.maxRowHeight.match(/^[0-9]+%$/)?(b.value=parseFloat(this.settings.maxRowHeight.match(/^([0-9]+)%$/)[1])/100,b.isPercentage=!1):(b.value=parseFloat(this.settings.maxRowHeight),b.isPercentage=!0);else{if("number"!==a.type(this.settings.maxRowHeight)){if(this.settings.maxRowHeight===!1||null===this.settings.maxRowHeight||"undefined"==typeof this.settings.maxRowHeight)return null;throw"maxRowHeight must be a number or a percentage"}b.value=this.settings.maxRowHeight,b.isPercentage=!1}if(isNaN(b.value))throw"invalid number for maxRowHeight";return b.isPercentage&&b.value<100&&(b.value=100),b},c.prototype.checkSettings=function(){this.checkSizeRangesSuffixes(),this.checkOrConvertNumber(this.settings,"rowHeight"),this.checkOrConvertNumber(this.settings,"margins"),this.checkOrConvertNumber(this.settings,"border");var b=["justify","nojustify","left","center","right","hide"];if(-1===b.indexOf(this.settings.lastRow))throw"lastRow must be one of: "+b.join(", ");if(this.checkOrConvertNumber(this.settings,"justifyThreshold"),this.settings.justifyThreshold<0||this.settings.justifyThreshold>1)throw"justifyThreshold must be in the interval [0,1]";if("boolean"!==a.type(this.settings.cssAnimation))throw"cssAnimation must be a boolean";if("boolean"!==a.type(this.settings.captions))throw"captions must be a boolean";if(this.checkOrConvertNumber(this.settings.captionSettings,"animationDuration"),this.checkOrConvertNumber(this.settings.captionSettings,"visibleOpacity"),this.settings.captionSettings.visibleOpacity<0||this.settings.captionSettings.visibleOpacity>1)throw"captionSettings.visibleOpacity must be in the interval [0, 1]";if(this.checkOrConvertNumber(this.settings.captionSettings,"nonVisibleOpacity"),this.settings.captionSettings.nonVisibleOpacity<0||this.settings.captionSettings.nonVisibleOpacity>1)throw"captionSettings.nonVisibleOpacity must be in the interval [0, 1]";if(this.checkOrConvertNumber(this.settings,"imagesAnimationDuration"),this.checkOrConvertNumber(this.settings,"refreshTime"),this.checkOrConvertNumber(this.settings,"refreshSensitivity"),"boolean"!==a.type(this.settings.randomize))throw"randomize must be a boolean";if("string"!==a.type(this.settings.selector))throw"selector must be a string";if(this.settings.sort!==!1&&!a.isFunction(this.settings.sort))throw"sort must be false or a comparison function";if(this.settings.filter!==!1&&!a.isFunction(this.settings.filter)&&"string"!==a.type(this.settings.filter))throw"filter must be false, a string or a filter function"},c.prototype.retrieveSuffixRanges=function(){var a=[];for(var b in this.settings.sizeRangeSuffixes)this.settings.sizeRangeSuffixes.hasOwnProperty(b)&&a.push(parseInt(b,10));return a.sort(function(a,b){return a>b?1:b>a?-1:0}),a},c.prototype.updateSettings=function(b){this.settings=a.extend({},this.settings,b),this.checkSettings(),this.border=this.settings.border>=0?this.settings.border:this.settings.margins,this.maxRowHeight=this.retrieveMaxRowHeight(),this.suffixRanges=this.retrieveSuffixRanges()},a.fn.justifiedGallery=function(b){return this.each(function(d,e){var f=a(e);f.addClass("justified-gallery");var g=f.data("jg.controller");if("undefined"==typeof g){if("undefined"!=typeof b&&null!==b&&"object"!==a.type(b)){if("destroy"===b)return;throw"The argument must be an object"}g=new c(f,a.extend({},a.fn.justifiedGallery.defaults,b)),f.data("jg.controller",g)}else if("norewind"===b);else{if("destroy"===b)return void g.destroy();g.updateSettings(b),g.rewind()}g.updateEntries("norewind"===b)&&g.init()})},a.fn.justifiedGallery.defaults={sizeRangeSuffixes:{},thumbnailPath:void 0,rowHeight:120,maxRowHeight:!1,margins:1,border:-1,lastRow:"nojustify",justifyThreshold:.9,waitThumbnailsLoad:!0,captions:!0,cssAnimation:!0,imagesAnimationDuration:500,captionSettings:{animationDuration:500,visibleOpacity:.7,nonVisibleOpacity:0},rel:null,target:null,extension:/\.[^.\\/]+$/,refreshTime:200,refreshSensitivity:0,randomize:!1,sort:!1,filter:!1,selector:"a, div:not(.spinner)"}}(jQuery);(function($){$.fn.superfish=function(op){var sf=$.fn.superfish,c=sf.c,$arrow=$('<span class="'+c.arrowClass+' arrow_down"> ▼</span>'),over=function(){var $this=$(this),o=getOptions($this);clearTimeout(o.sfTimer);$this.showSuperfishUl().siblings().hideSuperfishUl()},out=function(e){var $this=$(this),o=getOptions($this);if(e.type==="click"||sf.ios){$.proxy(close,$this,o)()}else{clearTimeout(o.sfTimer);o.sfTimer=setTimeout($.proxy(close,$this,o),o.delay)}},close=function(o){o.retainPath=$.inArray(this[0],o.$path)>-1;this.hideSuperfishUl();if(!this.parents("."+o.hoverClass).length){o.onIdle.call(getMenu(this));if(o.$path.length){$.proxy(over,o.$path)()}}},getMenu=function($el){return $el.closest("."+c.menuClass)},getOptions=function($el){return getMenu($el).data("sf-options")},applyTouchAction=function($menu){$menu.css("ms-touch-action","none")},applyHandlers=function($menu,o){var targets="li:has(ul)";if(!o.useClick){if($.fn.hoverIntent&&!o.disableHI){$menu.hoverIntent(over,out,targets)}else{$menu.on("mouseenter",targets,over).on("mouseleave",targets,out)}}var touchstart="MSPointerDown";if(!sf.ios){touchstart+=" touchstart"}if(sf.wp7){touchstart+=" mousedown"}$menu.on("focusin","li",over).on("focusout","li",out).on("click","a",o,clickHandler).on(touchstart,"a",touchHandler)},touchHandler=function(e){var $this=$(this),$ul=$this.siblings("ul");if($ul.length>0&&$ul.is(":hidden")){$this.data("follow",false);if(e.type==="MSPointerDown"){$this.trigger("focus");return false}}},clickHandler=function(e){var $a=$(this),o=e.data,$submenu=$a.siblings("ul"),follow=$a.data("follow")===false?false:true;if($submenu.length&&(o.useClick||!follow)){e.preventDefaolt();if($submenu.is(":hidden")){$.proxy(over,$a.parent("li"))()}else if(o.useClick&&follow){$.proxy(out,$a.parent("li"),e)()}}},setPathToCurrent=function($menu,o){return $menu.find("li."+o.pathClass).slice(0,o.pathLevels).addClass(o.hoverClass+" "+c.bcClass).filter(function(){return $(this).children("ul").hide().show().length}).removeClass(o.pathClass)},addArrows=function($li,o){if(o.autoArrows){$li.children("a").each(function(){addArrow($(this))})}},addArrow=function($a){$a.addClass(c.anchorClass).append($arrow.clone())};sf.getOptions=getOptions;return this.addClass(c.menuClass).each(function(){var $this=$(this),o=$.extend({},sf.defaults,op),$liHasUl=$this.find("li:has(ul)");o.$path=setPathToCurrent($this,o);$this.data("sf-options",o);addArrows($liHasUl,o);applyTouchAction($this);applyHandlers($this,o);$liHasUl.not("."+c.bcClass).hideSuperfishUl(true);o.onInit.call(this)})};var sf=$.fn.superfish;sf.o=[];sf.op={};sf.c={bcClass:"sf-breadcrumb",menuClass:"sf-js-enabled",anchorClass:"sf-with-ul",arrowClass:"sf-sub-indicator"};sf.defaults={hoverClass:"sfHover",appendTo:null,pathClass:"overrideThisToUse",pathLevels:1,delay:800,animation:{opacity:"show"},animationOut:{opacity:"hide"},speed:"normal",speedOut:"fast",autoArrows:true,disableHI:false,useClick:false,onInit:$.noop,onBeforeShow:$.noop,onShow:$.noop,onBeforeHide:$.noop,onHide:$.noop,onIdle:$.noop};sf.ios=/iPhone|iPad|iPod/i.test(navigator.userAgent);sf.wp7=function(){var style=document.documentElement.style;return"behavior"in style&&"fill"in style&&/iemobile/i.test(navigator.userAgent)}();$.fn.extend({hideSuperfishUl:function(instant){if(this.length){var $this=this,o=sf.getOptions($this),not=o.retainPath===true?o.$path:"",$ul=$this.find("li."+o.hoverClass).add(this).not(not).removeClass(o.hoverClass).children("ul"),speed=o.speedOut;if(instant){$ul.show();speed=0}o.retainPath=false;o.onBeforeHide.call($ul);$ul.stop(true,true).animate(o.animationOut,speed,function(){var $this=$(this);o.onHide.call($this);if(o.useClick){$this.siblings("a").data("follow",false)}})}return this},showSuperfishUl:function(){var o=sf.getOptions(this),$this=this.addClass(o.hoverClass),$ul=$this.children("ul");o.onBeforeShow.call($ul);$ul.stop(true,true).animate(o.animation,o.speed,function(){o.onShow.call($ul);$this.children("a").data("follow",true)});return this}});if(sf.ios){$(window).load(function(){$("body").children().on("click",$.noop)})}})($j);(function(){var b=void 0,f=!0,j=null,l=!1;function m(){return function(){}}function n(a){return function(){return this[a]}}function p(a){return function(){return a}}var s;document.createElement("video");document.createElement("audio");document.createElement("track");function t(a,c,d){if("string"===typeof a){0===a.indexOf("#")&&(a=a.slice(1));if(t.Aa[a])return c&&t.log.warn('Player "'+a+'" is already initialised. Options will not be applied.'),d&&t.Aa[a].I(d),t.Aa[a];a=t.m(a)}if(!a||!a.nodeName)throw new TypeError("The element or ID supplied is not valid. (videojs)");return a.player||new t.Player(a,c,d)}var videojs=window.videojs=t;t.jc="4.12";t.xd="https:"==document.location.protocol?"https://":"http://";t.VERSION="4.12.9";t.options={techOrder:["html5","flash"],html5:{},flash:{},width:300,height:150,defaultVolume:0,playbackRates:[],inactivityTimeout:2e3,children:{mediaLoader:{},posterImage:{},loadingSpinner:{},textTrackDisplay:{},bigPlayButton:{},controlBar:{},errorDisplay:{},textTrackSettings:{}},language:document.getElementsByTagName("html")[0].getAttribute("lang")||navigator.languages&&navigator.languages[0]||navigator.Lf||navigator.language||"en",languages:{},notSupportedMessage:"No compatible source was found for this video."};"GENERATED_CDN_VSN"!==t.jc&&(videojs.options.flash.swf=t.xd+"vjs.zencdn.net/"+t.jc+"/video-js.swf");t.Ld=function(a,c){t.options.languages[a]=t.options.languages[a]!==b?t.$.ya(t.options.languages[a],c):c;return t.options.languages};t.Aa={};"function"===typeof define&&define.amd?define("videojs",[],function(){return videojs}):"object"===typeof exports&&"object"===typeof module&&(module.exports=videojs);t.Ea=t.CoreObject=m();t.Ea.extend=function(a){var c,d;a=a||{};c=a.init||a.l||this.prototype.init||this.prototype.l||m();d=function(){c.apply(this,arguments)};d.prototype=t.i.create(this.prototype);d.prototype.constructor=d;d.extend=t.Ea.extend;d.create=t.Ea.create;for(var e in a)a.hasOwnProperty(e)&&(d.prototype[e]=a[e]);return d};t.Ea.create=function(){var a=t.i.create(this.prototype);this.apply(a,arguments);return a};t.b=function(a,c,d){if(t.i.isArray(c))return v(t.b,a,c,d);var e=t.getData(a);e.G||(e.G={});e.G[c]||(e.G[c]=[]);d.s||(d.s=t.s++);e.G[c].push(d);e.ca||(e.disabled=l,e.ca=function(c){if(!e.disabled){c=t.Qb(c);var d=e.G[c.type];if(d)for(var d=d.slice(0),k=0,q=d.length;k<q&&!c.Rc();k++)d[k].call(a,c)}});1==e.G[c].length&&(a.addEventListener?a.addEventListener(c,e.ca,l):a.attachEvent&&a.attachEvent("on"+c,e.ca))};t.n=function(a,c,d){if(t.Mc(a)){var e=t.getData(a);if(e.G){if(t.i.isArray(c))return v(t.n,a,c,d);if(c){var g=e.G[c];if(g){if(d){if(d.s)for(e=0;e<g.length;e++)g[e].s===d.s&&g.splice(e--,1)}else e.G[c]=[];t.Bc(a,c)}}else for(g in e.G)c=g,e.G[c]=[],t.Bc(a,c)}}};t.Bc=function(a,c){var d=t.getData(a);0===d.G[c].length&&(delete d.G[c],a.removeEventListener?a.removeEventListener(c,d.ca,l):a.detachEvent&&a.detachEvent("on"+c,d.ca));t.kb(d.G)&&(delete d.G,delete d.ca,delete d.disabled);t.kb(d)&&t.dd(a)};t.Qb=function(a){function c(){return f}function d(){return l}if(!a||!a.Wb){var e=a||window.event;a={};for(var g in e)"layerX"!==g&&("layerY"!==g&&"keyLocation"!==g)&&("returnValue"==g&&e.preventDefault||(a[g]=e[g]));a.target||(a.target=a.srcElement||document);a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;a.preventDefault=function(){e.preventDefault&&e.preventDefault();a.returnValue=l;a.ke=c;a.defaultPrevented=f};a.ke=d;a.defaultPrevented=l;a.stopPropagation=function(){e.stopPropagation&&e.stopPropagation();a.cancelBubble=f;a.Wb=c};a.Wb=d;a.stopImmediatePropagation=function(){e.stopImmediatePropagation&&e.stopImmediatePropagation();a.Rc=c;a.stopPropagation()};a.Rc=d;if(a.clientX!=j){g=document.documentElement;var h=document.body;a.pageX=a.clientX+(g&&g.scrollLeft||h&&h.scrollLeft||0)-(g&&g.clientLeft||h&&h.clientLeft||0);a.pageY=a.clientY+(g&&g.scrollTop||h&&h.scrollTop||0)-(g&&g.clientTop||h&&h.clientTop||0)}a.which=a.charCode||a.keyCode;a.button!=j&&(a.button=a.button&1?0:a.button&4?1:a.button&2?2:0)}return a};t.o=function(a,c){var d=t.Mc(a)?t.getData(a):{},e=a.parentNode||a.ownerDocument;"string"===typeof c&&(c={type:c,target:a});c=t.Qb(c);d.ca&&d.ca.call(a,c);if(e&&!c.Wb()&&c.bubbles!==l)t.o(e,c);else if(!e&&!c.defaultPrevented&&(d=t.getData(c.target),c.target[c.type])){d.disabled=f;if("function"===typeof c.target[c.type])c.target[c.type]();d.disabled=l}return!c.defaultPrevented};t.N=function(a,c,d){function e(){t.n(a,c,e);d.apply(this,arguments)}if(t.i.isArray(c))return v(t.N,a,c,d);e.s=d.s=d.s||t.s++;t.b(a,c,e)};function v(a,c,d,e){t.xc.forEach(d,function(d){a(c,d,e)})}var w=Object.prototype.hasOwnProperty;t.e=function(a,c){var d;c=c||{};d=document.createElement(a||"div");t.i.da(c,function(a,c){-1!==a.indexOf("aria-")||"role"==a?d.setAttribute(a,c):d[a]=c});return d};t.ua=function(a){return a.charAt(0).toUpperCase()+a.slice(1)};t.i={};t.i.create=Object.create||function(a){function c(){}c.prototype=a;return new c};t.i.da=function(a,c,d){for(var e in a)w.call(a,e)&&c.call(d||this,e,a[e])};t.i.D=function(a,c){if(!c)return a;for(var d in c)w.call(c,d)&&(a[d]=c[d]);return a};t.i.Td=function(a,c){var d,e,g;a=t.i.copy(a);for(d in c)w.call(c,d)&&(e=a[d],g=c[d],a[d]=t.i.lb(e)&&t.i.lb(g)?t.i.Td(e,g):c[d]);return a};t.i.copy=function(a){return t.i.D({},a)};t.i.lb=function(a){return!!a&&"object"===typeof a&&"[object Object]"===a.toString()&&a.constructor===Object};t.i.isArray=Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)};t.me=function(a){return a!==a};t.bind=function(a,c,d){function e(){return c.apply(a,arguments)}c.s||(c.s=t.s++);e.s=d?d+"_"+c.s:c.s;return e};t.ta={};t.s=1;t.expando="vdata"+(new Date).getTime();t.getData=function(a){var c=a[t.expando];c||(c=a[t.expando]=t.s++);t.ta[c]||(t.ta[c]={});return t.ta[c]};t.Mc=function(a){a=a[t.expando];return!(!a||t.kb(t.ta[a]))};t.dd=function(a){var c=a[t.expando];if(c){delete t.ta[c];try{delete a[t.expando]}catch(d){a.removeAttribute?a.removeAttribute(t.expando):a[t.expando]=j}}};t.kb=function(a){for(var c in a)if(a[c]!==j)return l;return f};t.Qa=function(a,c){return-1!==(" "+a.className+" ").indexOf(" "+c+" ")};t.p=function(a,c){t.Qa(a,c)||(a.className=""===a.className?c:a.className+" "+c)};t.r=function(a,c){var d,e;if(t.Qa(a,c)){d=a.className.split(" ");for(e=d.length-1;0<=e;e--)d[e]===c&&d.splice(e,1);a.className=d.join(" ")}};t.A=t.e("video");var x=document.createElement("track");x.Xb="captions";x.jd="en";x.label="English";t.A.appendChild(x);t.P=navigator.userAgent;t.Ed=/iPhone/i.test(t.P);t.Dd=/iPad/i.test(t.P);t.Fd=/iPod/i.test(t.P);t.Cd=t.Ed||t.Dd||t.Fd;var aa=t,y;var z=t.P.match(/OS (\d+)_/i);y=z&&z[1]?z[1]:b;aa.nf=y;t.Bd=/Android/i.test(t.P);var ba=t,B;var C=t.P.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i),D,E;C?(D=C[1]&&parseFloat(C[1]),E=C[2]&&parseFloat(C[2]),B=D&&E?parseFloat(C[1]+"."+C[2]):D?D:j):B=j;ba.ic=B;t.Gd=t.Bd&&/webkit/i.test(t.P)&&2.3>t.ic;t.kc=/Firefox/i.test(t.P);t.of=/Chrome/i.test(t.P);t.oa=/MSIE\s8\.0/.test(t.P);t.Gb=!!("ontouchstart"in window||window.zd&&document instanceof window.zd);t.yd="backgroundSize"in t.A.style;t.fd=function(a,c){t.i.da(c,function(c,e){e===j||"undefined"===typeof e||e===l?a.removeAttribute(c):a.setAttribute(c,e===f?"":e)})};t.Pa=function(a){var c,d,e,g;c={};if(a&&a.attributes&&0<a.attributes.length){d=a.attributes;for(var h=d.length-1;0<=h;h--){e=d[h].name;g=d[h].value;if("boolean"===typeof a[e]||-1!==",autoplay,controls,loop,muted,default,".indexOf(","+e+","))g=g!==j?f:l;c[e]=g}}return c};t.yf=function(a,c){var d="";document.defaultView&&document.defaultView.getComputedStyle?d=document.defaultView.getComputedStyle(a,"").getPropertyValue(c):a.currentStyle&&(d=a["client"+c.substr(0,1).toUpperCase()+c.substr(1)]+"px");return d};t.Vb=function(a,c){c.firstChild?c.insertBefore(a,c.firstChild):c.appendChild(a)};t.fb={};t.m=function(a){0===a.indexOf("#")&&(a=a.slice(1));return document.getElementById(a)};t.Oa=function(a,c){c=c||a;var d=Math.floor(a%60),e=Math.floor(a/60%60),g=Math.floor(a/3600),h=Math.floor(c/60%60),k=Math.floor(c/3600);if(isNaN(a)||Infinity===a)g=e=d="-";g=0<g||0<k?g+":":"";return g+(((g||10<=h)&&10>e?"0"+e:e)+":")+(10>d?"0"+d:d)};t.Nd=function(){document.body.focus();document.onselectstart=p(l)};t.cf=function(){document.onselectstart=p(f)};t.trim=function(a){return(a+"").replace(/^\s+|\s+$/g,"")};t.round=function(a,c){c||(c=0);return Math.round(a*Math.pow(10,c))/Math.pow(10,c)};t.Ka=function(a,c){return a===b&&c===b?{length:0,start:function(){throw Error("This TimeRanges object is empty")},end:function(){throw Error("This TimeRanges object is empty")}}:{length:1,start:function(){return a},end:function(){return c}}};t.Oe=function(a){try{var c=window.localStorage||l;c&&(c.volume=a)}catch(d){22==d.code||1014==d.code?t.log("LocalStorage Full (VideoJS)",d):18==d.code?t.log("LocalStorage not allowed (VideoJS)",d):t.log("LocalStorage Error (VideoJS)",d)}};t.be=function(a){a.match(/^https?:\/\//)||(a=t.e("div",{innerHTML:'<a href="'+a+'">x</a>'}).firstChild.href);return a};t.Ge=function(a){var c,d,e,g;g="protocol hostname port pathname search hash host".split(" ");d=t.e("a",{href:a});if(e=""===d.host&&"file:"!==d.protocol)c=t.e("div"),c.innerHTML='<a href="'+a+'"></a>',d=c.firstChild,c.setAttribute("style","display:none; position:absolute;"),document.body.appendChild(c);a={};for(var h=0;h<g.length;h++)a[g[h]]=d[g[h]];"http:"===a.protocol&&(a.host=a.host.replace(/:80$/,""));"https:"===a.protocol&&(a.host=a.host.replace(/:443$/,""));e&&document.body.removeChild(c);return a};function F(a,c){var d,e;d=Array.prototype.slice.call(c);e=m();e=window.console||{log:e,warn:e,error:e};a?d.unshift(a.toUpperCase()+":"):a="log";t.log.history.push(d);d.unshift("VIDEOJS:");if(e[a].apply)e[a].apply(e,d);else e[a](d.join(" "))}t.log=function(){F(j,arguments)};t.log.history=[];t.log.error=function(){F("error",arguments)};t.log.warn=function(){F("warn",arguments)};t.$d=function(a){var c,d;a.getBoundingClientRect&&a.parentNode&&(c=a.getBoundingClientRect());if(!c)return{left:0,top:0};a=document.documentElement;d=document.body;return{left:t.round(c.left+(window.pageXOffset||d.scrollLeft)-(a.clientLeft||d.clientLeft||0)),top:t.round(c.top+(window.pageYOffset||d.scrollTop)-(a.clientTop||d.clientTop||0))}};t.xc={};t.xc.forEach=function(a,c,d){if(t.i.isArray(a)&&c instanceof Function)for(var e=0,g=a.length;e<g;++e)c.call(d||t,a[e],e,a);return a};t.jf=function(a,c){var d,e,g,h,k,q,r;"string"===typeof a&&(a={uri:a});videojs.$.ya({method:"GET",timeout:45e3},a);c=c||m();q=function(){window.clearTimeout(k);c(j,e,e.response||e.responseText)};r=function(a){window.clearTimeout(k);if(!a||"string"===typeof a)a=Error(a);c(a,e)};d=window.XMLHttpRequest;"undefined"===typeof d&&(d=function(){try{return new window.ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(a){}try{return new window.ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(c){}try{return new window.ActiveXObject("Msxml2.XMLHTTP")}catch(d){}throw Error("This browser does not support XMLHttpRequest.")});e=new d;e.uri=a.uri;d=t.Ge(a.uri);g=window.location;d.protocol+d.host!==g.protocol+g.host&&window.XDomainRequest&&!("withCredentials"in e)?(e=new window.XDomainRequest,e.onload=q,e.onerror=r,e.onprogress=m(),e.ontimeout=m()):(h="file:"==d.protocol||"file:"==g.protocol,e.onreadystatechange=function(){if(4===e.readyState){if(e.$e)return r("timeout");200===e.status||h&&0===e.status?q():r()}},a.timeout&&(k=window.setTimeout(function(){4!==e.readyState&&(e.$e=f,e.abort())},a.timeout)));try{e.open(a.method||"GET",a.uri,f)}catch(u){r(u);return}a.withCredentials&&(e.withCredentials=f);a.responseType&&(e.responseType=a.responseType);try{e.send()}catch(A){r(A)}};t.$={};t.$.ya=function(a,c){var d,e,g;a=t.i.copy(a);for(d in c)c.hasOwnProperty(d)&&(e=a[d],g=c[d],a[d]=t.i.lb(e)&&t.i.lb(g)?t.$.ya(e,g):c[d]);return a};t.z=m();s=t.z.prototype;s.eb={};s.b=function(a,c){var d=this.addEventListener;this.addEventListener=Function.prototype;t.b(this,a,c);this.addEventListener=d};s.addEventListener=t.z.prototype.b;s.n=function(a,c){t.n(this,a,c)};s.removeEventListener=t.z.prototype.n;s.N=function(a,c){t.N(this,a,c)};s.o=function(a){var c=a.type||a;"string"===typeof a&&(a={type:c});a=t.Qb(a);if(this.eb[c]&&this["on"+c])this["on"+c](a);t.o(this,a)};s.dispatchEvent=t.z.prototype.o;t.a=t.Ea.extend({l:function(a,c,d){this.d=a;this.q=t.i.copy(this.q);c=this.options(c);this.Ra=c.id||c.el&&c.el.id;this.Ra||(this.Ra=(a.id&&a.id()||"no_player")+"_component_"+t.s++);this.ve=c.name||j;this.c=c.el||this.e();this.R=[];this.hb={};this.ib={};this.Oc();this.I(d);if(c.ed!==l){var e,g;this.k().reportUserActivity&&(e=t.bind(this.k(),this.k().reportUserActivity),this.b("touchstart",function(){e();this.clearInterval(g);g=this.setInterval(e,250)}),a=function(){e();this.clearInterval(g)},this.b("touchmove",e),this.b("touchend",a),this.b("touchcancel",a))}}});s=t.a.prototype;s.dispose=function(){this.o({type:"dispose",bubbles:l});if(this.R)for(var a=this.R.length-1;0<=a;a--)this.R[a].dispose&&this.R[a].dispose();this.ib=this.hb=this.R=j;this.n();this.c.parentNode&&this.c.parentNode.removeChild(this.c);t.dd(this.c);this.c=j};s.d=f;s.k=n("d");s.options=function(a){return a===b?this.q:this.q=t.$.ya(this.q,a)};s.e=function(a,c){return t.e(a,c)};s.v=function(a){var c=this.d.language(),d=this.d.languages();return d&&d[c]&&d[c][a]?d[c][a]:a};s.m=n("c");s.va=function(){return this.B||this.c};s.id=n("Ra");s.name=n("ve");s.children=n("R");s.ce=function(a){return this.hb[a]};s.ea=function(a){return this.ib[a]};s.ba=function(a,c){var d,e;"string"===typeof a?(e=a,c=c||{},d=c.componentClass||t.ua(e),c.name=e,d=new window.videojs[d](this.d||this,c)):d=a;this.R.push(d);"function"===typeof d.id&&(this.hb[d.id()]=d);(e=e||d.name&&d.name())&&(this.ib[e]=d);"function"===typeof d.el&&d.el()&&this.va().appendChild(d.el());return d};s.removeChild=function(a){"string"===typeof a&&(a=this.ea(a));if(a&&this.R){for(var c=l,d=this.R.length-1;0<=d;d--)if(this.R[d]===a){c=f;this.R.splice(d,1);break}c&&(this.hb[a.id()]=j,this.ib[a.name()]=j,(c=a.m())&&c.parentNode===this.va()&&this.va().removeChild(a.m()))}};s.Oc=function(){var a,c,d,e,g,h;a=this;c=a.options();if(d=c.children)if(h=function(d,e){c[d]!==b&&(e=c[d]);e!==l&&(a[d]=a.ba(d,e))},t.i.isArray(d))for(var k=0;k<d.length;k++)e=d[k],"string"==typeof e?(g=e,e={}):g=e.name,h(g,e);else t.i.da(d,h)};s.V=p("");s.b=function(a,c,d){var e,g,h;"string"===typeof a||t.i.isArray(a)?t.b(this.c,a,t.bind(this,c)):(e=t.bind(this,d),h=this,g=function(){h.n(a,c,e)},g.s=e.s,this.b("dispose",g),d=function(){h.n("dispose",g)},d.s=e.s,a.nodeName?(t.b(a,c,e),t.b(a,"dispose",d)):"function"===typeof a.b&&(a.b(c,e),a.b("dispose",d)));return this};s.n=function(a,c,d){!a||"string"===typeof a||t.i.isArray(a)?t.n(this.c,a,c):(d=t.bind(this,d),this.n("dispose",d),a.nodeName?(t.n(a,c,d),t.n(a,"dispose",d)):(a.n(c,d),a.n("dispose",d)));return this};s.N=function(a,c,d){var e,g,h;"string"===typeof a||t.i.isArray(a)?t.N(this.c,a,t.bind(this,c)):(e=t.bind(this,d),g=this,h=function(){g.n(a,c,h);e.apply(this,arguments)},h.s=e.s,this.b(a,c,h));return this};s.o=function(a){t.o(this.c,a);return this};s.I=function(a){a&&(this.wa?a.call(this):(this.pb===b&&(this.pb=[]),this.pb.push(a)));return this};s.Ya=function(){this.wa=f;var a=this.pb;if(a&&0<a.length){for(var c=0,d=a.length;c<d;c++)a[c].call(this);this.pb=[];this.o("ready")}};s.Qa=function(a){return t.Qa(this.c,a)};s.p=function(a){t.p(this.c,a);return this};s.r=function(a){t.r(this.c,a);return this};s.show=function(){this.r("vjs-hidden");return this};s.Y=function(){this.p("vjs-hidden");return this};function G(a){a.r("vjs-lock-showing")}s.width=function(a,c){return ca(this,"width",a,c)};s.height=function(a,c){return ca(this,"height",a,c)};s.Vd=function(a,c){return this.width(a,f).height(c)};function ca(a,c,d,e){if(d!==b){if(d===j||t.me(d))d=0;a.c.style[c]=-1!==(""+d).indexOf("%")||-1!==(""+d).indexOf("px")?d:"auto"===d?"":d+"px";e||a.o("resize");return a}if(!a.c)return 0;d=a.c.style[c];e=d.indexOf("px");return-1!==e?parseInt(d.slice(0,e),10):parseInt(a.c["offset"+t.ua(c)],10)}function da(a){var c,d,e,g,h,k,q,r;c=0;d=j;a.b("touchstart",function(a){1===a.touches.length&&(d=t.i.copy(a.touches[0]),c=(new Date).getTime(),g=f)});a.b("touchmove",function(a){1<a.touches.length?g=l:d&&(k=a.touches[0].pageX-d.pageX,q=a.touches[0].pageY-d.pageY,r=Math.sqrt(k*k+q*q),10<r&&(g=l))});h=function(){g=l};a.b("touchleave",h);a.b("touchcancel",h);a.b("touchend",function(a){d=j;g===f&&(e=(new Date).getTime()-c,200>e&&(a.preventDefault(),this.o("tap")))})}s.setTimeout=function(a,c){function d(){this.clearTimeout(e)}a=t.bind(this,a);var e=setTimeout(a,c);d.s="vjs-timeout-"+e;this.b("dispose",d);return e};s.clearTimeout=function(a){function c(){}clearTimeout(a);c.s="vjs-timeout-"+a;this.n("dispose",c);return a};s.setInterval=function(a,c){function d(){this.clearInterval(e)}a=t.bind(this,a);var e=setInterval(a,c);d.s="vjs-interval-"+e;this.b("dispose",d);return e};s.clearInterval=function(a){function c(){}clearInterval(a);c.s="vjs-interval-"+a;this.n("dispose",c);return a};t.w=t.a.extend({l:function(a,c){t.a.call(this,a,c);da(this);this.b("tap",this.u);this.b("click",this.u);this.b("focus",this.nb);this.b("blur",this.mb)}});s=t.w.prototype;s.e=function(a,c){var d;c=t.i.D({className:this.V(),role:"button","aria-live":"polite",tabIndex:0},c);d=t.a.prototype.e.call(this,a,c);c.innerHTML||(this.B=t.e("div",{className:"vjs-control-content"}),this.Lb=t.e("span",{className:"vjs-control-text",innerHTML:this.v(this.sa)||"Need Text"}),this.B.appendChild(this.Lb),d.appendChild(this.B));return d};s.V=function(){return"vjs-control "+t.a.prototype.V.call(this)};s.u=m();s.nb=function(){t.b(document,"keydown",t.bind(this,this.ka))};s.ka=function(a){if(32==a.which||13==a.which)a.preventDefault(),this.u()};s.mb=function(){t.n(document,"keydown",t.bind(this,this.ka))};t.U=t.a.extend({l:function(a,c){t.a.call(this,a,c);this.Md=this.ea(this.q.barName);this.handle=this.ea(this.q.handleName);this.b("mousedown",this.ob);this.b("touchstart",this.ob);this.b("focus",this.nb);this.b("blur",this.mb);this.b("click",this.u);this.b(a,"controlsvisible",this.update);this.b(a,this.Zc,this.update)}});s=t.U.prototype;s.e=function(a,c){c=c||{};c.className+=" vjs-slider";c=t.i.D({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},c);return t.a.prototype.e.call(this,a,c)};s.ob=function(a){a.preventDefault();t.Nd();this.p("vjs-sliding");this.b(document,"mousemove",this.la);this.b(document,"mouseup",this.za);this.b(document,"touchmove",this.la);this.b(document,"touchend",this.za);this.la(a)};s.la=m();s.za=function(){t.cf();this.r("vjs-sliding");this.n(document,"mousemove",this.la);this.n(document,"mouseup",this.za);this.n(document,"touchmove",this.la);this.n(document,"touchend",this.za);this.update()};s.update=function(){if(this.c){var a,c=this.Tb(),d=this.handle,e=this.Md;if("number"!==typeof c||c!==c||0>c||Infinity===c)c=0;a=c;if(d){a=this.c.offsetWidth;var g=d.m().offsetWidth;a=g?g/a:0;c*=1-a;a=c+a/2;d.m().style.left=t.round(100*c,2)+"%"}e&&(e.m().style.width=t.round(100*a,2)+"%")}};function ea(a,c){var d,e,g,h;d=a.c;e=t.$d(d);h=g=d.offsetWidth;d=a.handle;if(a.options().vertical)return h=e.top,e=c.changedTouches?c.changedTouches[0].pageY:c.pageY,d&&(d=d.m().offsetHeight,h+=d/2,g-=d),Math.max(0,Math.min(1,(h-e+g)/g));g=e.left;e=c.changedTouches?c.changedTouches[0].pageX:c.pageX;d&&(d=d.m().offsetWidth,g+=d/2,h-=d);return Math.max(0,Math.min(1,(e-g)/h))}s.nb=function(){this.b(document,"keydown",this.ka)};s.ka=function(a){if(37==a.which||40==a.which)a.preventDefault(),this.kd();else if(38==a.which||39==a.which)a.preventDefault(),this.ld()};s.mb=function(){this.n(document,"keydown",this.ka)};s.u=function(a){a.stopImmediatePropagation();a.preventDefault()};t.ha=t.a.extend();t.ha.prototype.defaultValue=0;t.ha.prototype.e=function(a,c){c=c||{};c.className+=" vjs-slider-handle";c=t.i.D({innerHTML:'<span class="vjs-control-text">'+this.defaultValue+"</span>"},c);return t.a.prototype.e.call(this,"div",c)};t.pa=t.a.extend();function fa(a,c){a.ba(c);c.b("click",t.bind(a,function(){G(this)}))}t.pa.prototype.e=function(){var a=this.options().Dc||"ul";this.B=t.e(a,{className:"vjs-menu-content"});a=t.a.prototype.e.call(this,"div",{append:this.B,className:"vjs-menu"});a.appendChild(this.B);t.b(a,"click",function(a){a.preventDefault();a.stopImmediatePropagation()});return a};t.M=t.w.extend({l:function(a,c){t.w.call(this,a,c);this.selected(c.selected)}});t.M.prototype.e=function(a,c){return t.w.prototype.e.call(this,"li",t.i.D({className:"vjs-menu-item",innerHTML:this.v(this.q.label)},c))};t.M.prototype.u=function(){this.selected(f)};t.M.prototype.selected=function(a){a?(this.p("vjs-selected"),this.c.setAttribute("aria-selected",f)):(this.r("vjs-selected"),this.c.setAttribute("aria-selected",l))};t.O=t.w.extend({l:function(a,c){t.w.call(this,a,c);this.update();this.b("keydown",this.ka);this.c.setAttribute("aria-haspopup",f);this.c.setAttribute("role","button")}});s=t.O.prototype;s.update=function(){var a=this.Ja();this.xa&&this.removeChild(this.xa);this.xa=a;this.ba(a);this.H&&0===this.H.length?this.Y():this.H&&1<this.H.length&&this.show()};s.Ha=l;s.Ja=function(){var a=new t.pa(this.d);this.options().title&&a.va().appendChild(t.e("li",{className:"vjs-menu-title",innerHTML:t.ua(this.options().title),Ye:-1}));if(this.H=this.createItems())for(var c=0;c<this.H.length;c++)fa(a,this.H[c]);return a};s.Ia=m();s.V=function(){return this.className+" vjs-menu-button "+t.w.prototype.V.call(this)};s.nb=m();s.mb=m();s.u=function(){this.N("mouseout",t.bind(this,function(){G(this.xa);this.c.blur()}));this.Ha?H(this):ga(this)};s.ka=function(a){32==a.which||13==a.which?(this.Ha?H(this):ga(this),a.preventDefault()):27==a.which&&(this.Ha&&H(this),a.preventDefault())};function ga(a){a.Ha=f;a.xa.p("vjs-lock-showing");a.c.setAttribute("aria-pressed",f);a.H&&0<a.H.length&&a.H[0].m().focus()}function H(a){a.Ha=l;G(a.xa);a.c.setAttribute("aria-pressed",l)}t.J=function(a){"number"===typeof a?this.code=a:"string"===typeof a?this.message=a:"object"===typeof a&&t.i.D(this,a);this.message||(this.message=t.J.Ud[this.code]||"")};t.J.prototype.code=0;t.J.prototype.message="";t.J.prototype.status=j;t.J.jb="MEDIA_ERR_CUSTOM MEDIA_ERR_ABORTED MEDIA_ERR_NETWORK MEDIA_ERR_DECODE MEDIA_ERR_SRC_NOT_SUPPORTED MEDIA_ERR_ENCRYPTED".split(" ");t.J.Ud={1:"You aborted the video playback",2:"A network error caused the video download to fail part-way.",3:"The video playback was aborted due to a corruption problem or because the video used features your browser did not support.",4:"The video could not be loaded, either because the server or network failed or because the format is not supported.",5:"The video is encrypted and we do not have the keys to decrypt it."};for(var I=0;I<t.J.jb.length;I++)t.J[t.J.jb[I]]=I,t.J.prototype[t.J.jb[I]]=I;var J,ha,K,L;J=["requestFullscreen exitFullscreen fullscreenElement fullscreenEnabled fullscreenchange fullscreenerror".split(" "),"webkitRequestFullscreen webkitExitFullscreen webkitFullscreenElement webkitFullscreenEnabled webkitfullscreenchange webkitfullscreenerror".split(" "),"webkitRequestFullScreen webkitCancelFullScreen webkitCurrentFullScreenElement webkitCancelFullScreen webkitfullscreenchange webkitfullscreenerror".split(" "),"mozRequestFullScreen mozCancelFullScreen mozFullScreenElement mozFullScreenEnabled mozfullscreenchange mozfullscreenerror".split(" "),"msRequestFullscreen msExitFullscreen msFullscreenElement msFullscreenEnabled MSFullscreenChange MSFullscreenError".split(" ")];ha=J[0];for(L=0;L<J.length;L++)if(J[L][1]in document){K=J[L];break}if(K){t.fb.Sb={};for(L=0;L<K.length;L++)t.fb.Sb[ha[L]]=K[L]}t.Player=t.a.extend({l:function(a,c,d){this.L=a;a.id=a.id||"vjs_video_"+t.s++;this.Ze=a&&t.Pa(a);c=t.i.D(ia(a),c);this.Tc=c.language||t.options.language;this.pe=c.languages||t.options.languages;this.K={};this.$c=c.poster||"";this.Mb=!!c.controls;a.controls=l;c.ed=l;ja(this,"audio"===this.L.nodeName.toLowerCase());t.a.call(this,this,c,d);this.controls()?this.p("vjs-controls-enabled"):this.p("vjs-controls-disabled");ja(this)&&this.p("vjs-audio");t.Aa[this.Ra]=this;c.plugins&&t.i.da(c.plugins,function(a,c){this[a](c)},this);var e,g,h,k,q;e=t.bind(this,this.reportUserActivity);this.b("mousedown",function(){e();this.clearInterval(g);g=this.setInterval(e,250)});this.b("mousemove",function(a){if(a.screenX!=k||a.screenY!=q)k=a.screenX,q=a.screenY,e()});this.b("mouseup",function(){e();this.clearInterval(g)});this.b("keydown",e);this.b("keyup",e);this.setInterval(function(){if(this.Da){this.Da=l;this.userActive(f);this.clearTimeout(h);var a=this.options().inactivityTimeout;0<a&&(h=this.setTimeout(function(){this.Da||this.userActive(l)},a))}},250)}});s=t.Player.prototype;s.language=function(a){if(a===b)return this.Tc;this.Tc=a;return this};s.languages=n("pe");s.q=t.options;s.dispose=function(){this.o("dispose");this.n("dispose");t.Aa[this.Ra]=j;this.L&&this.L.player&&(this.L.player=j);this.c&&this.c.player&&(this.c.player=j);this.h&&this.h.dispose();t.a.prototype.dispose.call(this)};function ia(a){var c,d,e={sources:[],tracks:[]};c=t.Pa(a);d=c["data-setup"];d!==j&&t.i.D(c,t.JSON.parse(d||"{}"));t.i.D(e,c);if(a.hasChildNodes()){var g,h;a=a.childNodes;g=0;for(h=a.length;g<h;g++)c=a[g],d=c.nodeName.toLowerCase(),"source"===d?e.sources.push(t.Pa(c)):"track"===d&&e.tracks.push(t.Pa(c))}return e}s.e=function(){var a=this.c=t.a.prototype.e.call(this,"div"),c=this.L,d;c.removeAttribute("width");c.removeAttribute("height");d=t.Pa(c);t.i.da(d,function(c){"class"==c?a.className=d[c]:a.setAttribute(c,d[c])});c.id+="_html5_api";c.className="vjs-tech";c.player=a.player=this;this.p("vjs-paused");this.width(this.q.width,f);this.height(this.q.height,f);c.ie=c.networkState;c.parentNode&&c.parentNode.insertBefore(a,c);t.Vb(c,a);this.c=a;this.b("loadstart",this.ze);this.b("waiting",this.Fe);this.b(["canplay","canplaythrough","playing","ended"],this.Ee);this.b("seeking",this.Ce);this.b("seeked",this.Be);this.b("ended",this.we);this.b("play",this.ac);this.b("firstplay",this.xe);this.b("pause",this.$b);this.b("progress",this.Ae);this.b("durationchange",this.Wc);this.b("fullscreenchange",this.ye);return a};function ka(a,c,d){a.h&&(a.wa=l,a.h.dispose(),a.h=l);"Html5"!==c&&a.L&&(t.f.Nb(a.L),a.L=j);a.Wa=c;a.wa=l;var e=t.i.D({source:d,parentEl:a.c},a.q[c.toLowerCase()]);d&&(a.Gc=d.type,d.src==a.K.src&&0<a.K.currentTime&&(e.startTime=a.K.currentTime),a.K.src=d.src);a.h=new window.videojs[c](a,e);a.h.I(function(){this.d.Ya()})}s.ze=function(){this.r("vjs-ended");this.error(j);this.paused()?la(this,l):this.o("firstplay")};s.Nc=l;function la(a,c){c!==b&&a.Nc!==c&&((a.Nc=c)?(a.p("vjs-has-started"),a.o("firstplay")):a.r("vjs-has-started"))}s.ac=function(){this.r("vjs-ended");this.r("vjs-paused");this.p("vjs-playing");la(this,f)};s.Fe=function(){this.p("vjs-waiting")};s.Ee=function(){this.r("vjs-waiting")};s.Ce=function(){this.p("vjs-seeking")};s.Be=function(){this.r("vjs-seeking")};s.xe=function(){this.q.starttime&&this.currentTime(this.q.starttime);this.p("vjs-has-started")};s.$b=function(){this.r("vjs-playing");this.p("vjs-paused")};s.Ae=function(){1==this.bufferedPercent()&&this.o("loadedalldata")};s.we=function(){this.p("vjs-ended");this.q.loop?(this.currentTime(0),this.play()):this.paused()||this.pause()};s.Wc=function(){var a=M(this,"duration");a&&(0>a&&(a=Infinity),this.duration(a),Infinity===a?this.p("vjs-live"):this.r("vjs-live"))};s.ye=function(){this.isFullscreen()?this.p("vjs-fullscreen"):this.r("vjs-fullscreen")};function N(a,c,d){if(a.h&&!a.h.wa)a.h.I(function(){this[c](d)});else try{a.h[c](d)}catch(e){throw t.log(e),e}}function M(a,c){if(a.h&&a.h.wa)try{return a.h[c]()}catch(d){throw a.h[c]===b?t.log("Video.js: "+c+" method not defined for "+a.Wa+" playback technology.",d):"TypeError"==d.name?(t.log("Video.js: "+c+" unavailable on "+a.Wa+" playback technology element.",d),a.h.wa=l):t.log(d),d}}s.play=function(){N(this,"play");return this};s.pause=function(){N(this,"pause");return this};s.paused=function(){return M(this,"paused")===l?l:f};s.currentTime=function(a){return a!==b?(N(this,"setCurrentTime",a),this):this.K.currentTime=M(this,"currentTime")||0};s.duration=function(a){if(a!==b)return this.K.duration=parseFloat(a),this;this.K.duration===b&&this.Wc();return this.K.duration||0};s.remainingTime=function(){return this.duration()-this.currentTime()};s.buffered=function(){var a=M(this,"buffered");if(!a||!a.length)a=t.Ka(0,0);return a};s.bufferedPercent=function(){var a=this.duration(),c=this.buffered(),d=0,e,g;if(!a)return 0;for(var h=0;h<c.length;h++)e=c.start(h),g=c.end(h),g>a&&(g=a),d+=g-e;return d/a};s.volume=function(a){if(a!==b)return a=Math.max(0,Math.min(1,parseFloat(a))),this.K.volume=a,N(this,"setVolume",a),t.Oe(a),this;a=parseFloat(M(this,"volume"));return isNaN(a)?1:a};s.muted=function(a){return a!==b?(N(this,"setMuted",a),this):M(this,"muted")||l};s.Va=function(){return M(this,"supportsFullScreen")||l};s.Qc=l;s.isFullscreen=function(a){return a!==b?(this.Qc=!!a,this):this.Qc};s.isFullScreen=function(a){t.log.warn('player.isFullScreen() has been deprecated, use player.isFullscreen() with a lowercase "s")');return this.isFullscreen(a)};s.requestFullscreen=function(){var a=t.fb.Sb;this.isFullscreen(f);a?(t.b(document,a.fullscreenchange,t.bind(this,function(c){this.isFullscreen(document[a.fullscreenElement]);this.isFullscreen()===l&&t.n(document,a.fullscreenchange,arguments.callee);this.o("fullscreenchange")})),this.c[a.requestFullscreen]()):this.h.Va()?N(this,"enterFullScreen"):(this.Jc(),this.o("fullscreenchange"));return this};s.requestFullScreen=function(){t.log.warn('player.requestFullScreen() has been deprecated, use player.requestFullscreen() with a lowercase "s")');return this.requestFullscreen()};s.exitFullscreen=function(){var a=t.fb.Sb;this.isFullscreen(l);if(a)document[a.exitFullscreen]();else this.h.Va()?N(this,"exitFullScreen"):(this.Ob(),this.o("fullscreenchange"));return this};s.cancelFullScreen=function(){t.log.warn("player.cancelFullScreen() has been deprecated, use player.exitFullscreen()");return this.exitFullscreen()};s.Jc=function(){this.le=f;this.Wd=document.documentElement.style.overflow;t.b(document,"keydown",t.bind(this,this.Kc));document.documentElement.style.overflow="hidden";t.p(document.body,"vjs-full-window");this.o("enterFullWindow")};s.Kc=function(a){27===a.keyCode&&(this.isFullscreen()===f?this.exitFullscreen():this.Ob())};s.Ob=function(){this.le=l;t.n(document,"keydown",this.Kc);document.documentElement.style.overflow=this.Wd;t.r(document.body,"vjs-full-window");this.o("exitFullWindow")};s.selectSource=function(a){for(var c=0,d=this.q.techOrder;c<d.length;c++){var e=t.ua(d[c]),g=window.videojs[e];if(g){if(g.isSupported())for(var h=0,k=a;h<k.length;h++){var q=k[h];if(g.canPlaySource(q))return{source:q,h:e}}}else t.log.error('The "'+e+'" tech is undefined. Skipped browser support check for that tech.')}return l};s.src=function(a){if(a===b)return M(this,"src");t.i.isArray(a)?ma(this,a):"string"===typeof a?this.src({src:a}):a instanceof Object&&(a.type&&!window.videojs[this.Wa].canPlaySource(a)?ma(this,[a]):(this.K.src=a.src,this.Gc=a.type||"",this.I(function(){window.videojs[this.Wa].prototype.hasOwnProperty("setSource")?N(this,"setSource",a):N(this,"src",a.src);"auto"==this.q.preload&&this.load();this.q.autoplay&&this.play()})));return this};function ma(a,c){var d=a.selectSource(c);d?d.h===a.Wa?a.src(d.source):ka(a,d.h,d.source):(a.setTimeout(function(){this.error({code:4,message:this.v(this.options().notSupportedMessage)})},0),a.Ya())}s.load=function(){N(this,"load");return this};s.currentSrc=function(){var a=M(this,"currentSrc");return a===b?this.K.src||"":a};s.Sd=function(){return this.Gc||""};s.Sa=function(a){return a!==b?(N(this,"setPreload",a),this.q.preload=a,this):M(this,"preload")};s.autoplay=function(a){return a!==b?(N(this,"setAutoplay",a),this.q.autoplay=a,this):M(this,"autoplay")};s.loop=function(a){return a!==b?(N(this,"setLoop",a),this.q.loop=a,this):M(this,"loop")};s.poster=function(a){if(a===b)return this.$c;a||(a="");this.$c=a;N(this,"setPoster",a);this.o("posterchange");return this};s.controls=function(a){return a!==b?(a=!!a,this.Mb!==a&&((this.Mb=a)?(this.r("vjs-controls-disabled"),this.p("vjs-controls-enabled"),this.o("controlsenabled")):(this.r("vjs-controls-enabled"),this.p("vjs-controls-disabled"),this.o("controlsdisabled"))),this):this.Mb};t.Player.prototype.fc;s=t.Player.prototype;s.usingNativeControls=function(a){return a!==b?(a=!!a,this.fc!==a&&((this.fc=a)?(this.p("vjs-using-native-controls"),this.o("usingnativecontrols")):(this.r("vjs-using-native-controls"),this.o("usingcustomcontrols"))),this):this.fc};s.ja=j;s.error=function(a){if(a===b)return this.ja;if(a===j)return this.ja=a,this.r("vjs-error"),this;this.ja=a instanceof t.J?a:new t.J(a);this.o("error");this.p("vjs-error");t.log.error("(CODE:"+this.ja.code+" "+t.J.jb[this.ja.code]+")",this.ja.message,this.ja);return this};s.ended=function(){return M(this,"ended")};s.seeking=function(){return M(this,"seeking")};s.seekable=function(){return M(this,"seekable")};s.Da=f;s.reportUserActivity=function(){this.Da=f};s.ec=f;s.userActive=function(a){return a!==b?(a=!!a,a!==this.ec&&((this.ec=a)?(this.Da=f,this.r("vjs-user-inactive"),this.p("vjs-user-active"),this.o("useractive")):(this.Da=l,this.h&&this.h.N("mousemove",function(a){a.stopPropagation();a.preventDefault()}),this.r("vjs-user-active"),this.p("vjs-user-inactive"),this.o("userinactive"))),this):this.ec};s.playbackRate=function(a){return a!==b?(N(this,"setPlaybackRate",a),this):this.h&&this.h.featuresPlaybackRate?M(this,"playbackRate"):1};s.Pc=l;function ja(a,c){return c!==b?(a.Pc=!!c,a):a.Pc}s.networkState=function(){return M(this,"networkState")};s.readyState=function(){return M(this,"readyState")};s.textTracks=function(){return this.h&&this.h.textTracks()};s.Z=function(){return this.h&&this.h.remoteTextTracks()};s.addTextTrack=function(a,c,d){return this.h&&this.h.addTextTrack(a,c,d)};s.ia=function(a){return this.h&&this.h.addRemoteTextTrack(a)};s.Ba=function(a){this.h&&this.h.removeRemoteTextTrack(a)};t.wb=t.a.extend();t.wb.prototype.q={zf:"play",children:{playToggle:{},currentTimeDisplay:{},timeDivider:{},durationDisplay:{},remainingTimeDisplay:{},liveDisplay:{},progressControl:{},fullscreenToggle:{},volumeControl:{},muteToggle:{},playbackRateMenuButton:{},subtitlesButton:{},captionsButton:{},chaptersButton:{}}};t.wb.prototype.e=function(){return t.e("div",{className:"vjs-control-bar"})};t.lc=t.a.extend({l:function(a,c){t.a.call(this,a,c)}});t.lc.prototype.e=function(){var a=t.a.prototype.e.call(this,"div",{className:"vjs-live-controls vjs-control"});this.B=t.e("div",{className:"vjs-live-display",innerHTML:'<span class="vjs-control-text">'+this.v("Stream Type")+"</span>"+this.v("LIVE"),"aria-live":"off"});a.appendChild(this.B);return a};t.oc=t.w.extend({l:function(a,c){t.w.call(this,a,c);this.b(a,"play",this.ac);this.b(a,"pause",this.$b)}});s=t.oc.prototype;s.sa="Play";s.V=function(){return"vjs-play-control "+t.w.prototype.V.call(this)};s.u=function(){this.d.paused()?this.d.play():this.d.pause()};s.ac=function(){this.r("vjs-paused");this.p("vjs-playing");this.c.children[0].children[0].innerHTML=this.v("Pause")};s.$b=function(){this.r("vjs-playing");this.p("vjs-paused");this.c.children[0].children[0].innerHTML=this.v("Play")};t.xb=t.a.extend({l:function(a,c){t.a.call(this,a,c);this.b(a,"timeupdate",this.ga)}});t.xb.prototype.e=function(){var a=t.a.prototype.e.call(this,"div",{className:"vjs-current-time vjs-time-controls vjs-control"});this.B=t.e("div",{className:"vjs-current-time-display",innerHTML:'<span class="vjs-control-text">Current Time </span>0:00',"aria-live":"off"});a.appendChild(this.B);return a};t.xb.prototype.ga=function(){var a=this.d.qb?this.d.K.currentTime:this.d.currentTime();this.B.innerHTML='<span class="vjs-control-text">'+this.v("Current Time")+"</span> "+t.Oa(a,this.d.duration())};t.yb=t.a.extend({l:function(a,c){t.a.call(this,a,c);this.b(a,"timeupdate",this.ga);this.b(a,"loadedmetadata",this.ga)}});t.yb.prototype.e=function(){var a=t.a.prototype.e.call(this,"div",{className:"vjs-duration vjs-time-controls vjs-control"});this.B=t.e("div",{className:"vjs-duration-display",innerHTML:'<span class="vjs-control-text">'+this.v("Duration Time")+"</span> 0:00","aria-live":"off"});a.appendChild(this.B);return a};t.yb.prototype.ga=function(){var a=this.d.duration();a&&(this.B.innerHTML='<span class="vjs-control-text">'+this.v("Duration Time")+"</span> "+t.Oa(a))};t.uc=t.a.extend({l:function(a,c){t.a.call(this,a,c)}});t.uc.prototype.e=function(){return t.a.prototype.e.call(this,"div",{className:"vjs-time-divider",innerHTML:"<div><span>/</span></div>"})};t.Fb=t.a.extend({l:function(a,c){t.a.call(this,a,c);this.b(a,"timeupdate",this.ga)}});t.Fb.prototype.e=function(){var a=t.a.prototype.e.call(this,"div",{className:"vjs-remaining-time vjs-time-controls vjs-control"});this.B=t.e("div",{className:"vjs-remaining-time-display",innerHTML:'<span class="vjs-control-text">'+this.v("Remaining Time")+"</span> -0:00","aria-live":"off"});a.appendChild(this.B);return a};t.Fb.prototype.ga=function(){this.d.duration()&&(this.B.innerHTML='<span class="vjs-control-text">'+this.v("Remaining Time")+"</span> -"+t.Oa(this.d.remainingTime()))};t.ab=t.w.extend({l:function(a,c){t.w.call(this,a,c)}});t.ab.prototype.sa="Fullscreen";t.ab.prototype.V=function(){return"vjs-fullscreen-control "+t.w.prototype.V.call(this)};t.ab.prototype.u=function(){this.d.isFullscreen()?(this.d.exitFullscreen(),this.Lb.innerHTML=this.v("Fullscreen")):(this.d.requestFullscreen(),this.Lb.innerHTML=this.v("Non-Fullscreen"))};t.Eb=t.a.extend({l:function(a,c){t.a.call(this,a,c)}});t.Eb.prototype.q={children:{seekBar:{}}};t.Eb.prototype.e=function(){return t.a.prototype.e.call(this,"div",{className:"vjs-progress-control vjs-control"})};t.rc=t.U.extend({l:function(a,c){t.U.call(this,a,c);this.b(a,"timeupdate",this.Ca);a.I(t.bind(this,this.Ca))}});s=t.rc.prototype;s.q={children:{loadProgressBar:{},playProgressBar:{},seekHandle:{}},barName:"playProgressBar",handleName:"seekHandle"};s.Zc="timeupdate";s.e=function(){return t.U.prototype.e.call(this,"div",{className:"vjs-progress-holder","aria-label":"video progress bar"})};s.Ca=function(){var a=this.d.qb?this.d.K.currentTime:this.d.currentTime();this.c.setAttribute("aria-valuenow",t.round(100*this.Tb(),2));this.c.setAttribute("aria-valuetext",t.Oa(a,this.d.duration()))};s.Tb=function(){return this.d.currentTime()/this.d.duration()};s.ob=function(a){t.U.prototype.ob.call(this,a);this.d.qb=f;this.d.p("vjs-scrubbing");this.gf=!this.d.paused();this.d.pause()};s.la=function(a){a=ea(this,a)*this.d.duration();a==this.d.duration()&&(a-=.1);this.d.currentTime(a)};s.za=function(a){t.U.prototype.za.call(this,a);this.d.qb=l;this.d.r("vjs-scrubbing");this.gf&&this.d.play()};s.ld=function(){this.d.currentTime(this.d.currentTime()+5)};s.kd=function(){this.d.currentTime(this.d.currentTime()-5)};t.Bb=t.a.extend({l:function(a,c){t.a.call(this,a,c);this.b(a,"progress",this.update)}});t.Bb.prototype.e=function(){return t.a.prototype.e.call(this,"div",{className:"vjs-load-progress",innerHTML:'<span class="vjs-control-text"><span>'+this.v("Loaded")+"</span>: 0%</span>"})};t.Bb.prototype.update=function(){var a,c,d,e,g=this.d.buffered();a=this.d.duration();var h,k=this.d;h=k.buffered();k=k.duration();h=h.end(h.length-1);h>k&&(h=k);k=this.c.children;this.c.style.width=100*(h/a||0)+"%";for(a=0;a<g.length;a++)c=g.start(a),d=g.end(a),(e=k[a])||(e=this.c.appendChild(t.e())),e.style.left=100*(c/h||0)+"%",e.style.width=100*((d-c)/h||0)+"%";for(a=k.length;a>g.length;a--)this.c.removeChild(k[a-1])};t.nc=t.a.extend({l:function(a,c){t.a.call(this,a,c)}});t.nc.prototype.e=function(){return t.a.prototype.e.call(this,"div",{className:"vjs-play-progress",innerHTML:'<span class="vjs-control-text"><span>'+this.v("Progress")+"</span>: 0%</span>"})};t.bb=t.ha.extend({l:function(a,c){t.ha.call(this,a,c);this.b(a,"timeupdate",this.ga)}});t.bb.prototype.defaultValue="00:00";t.bb.prototype.e=function(){return t.ha.prototype.e.call(this,"div",{className:"vjs-seek-handle","aria-live":"off"})};t.bb.prototype.ga=function(){var a=this.d.qb?this.d.K.currentTime:this.d.currentTime();this.c.innerHTML='<span class="vjs-control-text">'+t.Oa(a,this.d.duration())+"</span>"};t.Ib=t.a.extend({l:function(a,c){t.a.call(this,a,c);a.h&&a.h.featuresVolumeControl===l&&this.p("vjs-hidden");this.b(a,"loadstart",function(){a.h.featuresVolumeControl===l?this.p("vjs-hidden"):this.r("vjs-hidden")})}});t.Ib.prototype.q={children:{volumeBar:{}}};t.Ib.prototype.e=function(){return t.a.prototype.e.call(this,"div",{className:"vjs-volume-control vjs-control"})};t.Hb=t.U.extend({l:function(a,c){t.U.call(this,a,c);this.b(a,"volumechange",this.Ca);a.I(t.bind(this,this.Ca))}});s=t.Hb.prototype;s.Ca=function(){this.c.setAttribute("aria-valuenow",t.round(100*this.d.volume(),2));this.c.setAttribute("aria-valuetext",t.round(100*this.d.volume(),2)+"%")};s.q={children:{volumeLevel:{},volumeHandle:{}},barName:"volumeLevel",handleName:"volumeHandle"};s.Zc="volumechange";s.e=function(){return t.U.prototype.e.call(this,"div",{className:"vjs-volume-bar","aria-label":"volume level"})};s.la=function(a){this.d.muted()&&this.d.muted(l);this.d.volume(ea(this,a))};s.Tb=function(){return this.d.muted()?0:this.d.volume()};s.ld=function(){this.d.volume(this.d.volume()+.1)};s.kd=function(){this.d.volume(this.d.volume()-.1)};t.vc=t.a.extend({l:function(a,c){t.a.call(this,a,c)}});t.vc.prototype.e=function(){return t.a.prototype.e.call(this,"div",{className:"vjs-volume-level",innerHTML:'<span class="vjs-control-text"></span>'})};t.Jb=t.ha.extend();t.Jb.prototype.defaultValue="00:00";t.Jb.prototype.e=function(){return t.ha.prototype.e.call(this,"div",{className:"vjs-volume-handle"})};t.qa=t.w.extend({l:function(a,c){t.w.call(this,a,c);this.b(a,"volumechange",this.update);a.h&&a.h.featuresVolumeControl===l&&this.p("vjs-hidden");this.b(a,"loadstart",function(){a.h.featuresVolumeControl===l?this.p("vjs-hidden"):this.r("vjs-hidden")})}});t.qa.prototype.e=function(){return t.w.prototype.e.call(this,"div",{className:"vjs-mute-control vjs-control",innerHTML:'<div><span class="vjs-control-text">'+this.v("Mute")+"</span></div>"})};t.qa.prototype.u=function(){this.d.muted(this.d.muted()?l:f)};t.qa.prototype.update=function(){var a=this.d.volume(),c=3;0===a||this.d.muted()?c=0:.33>a?c=1:.67>a&&(c=2);this.d.muted()?this.c.children[0].children[0].innerHTML!=this.v("Unmute")&&(this.c.children[0].children[0].innerHTML=this.v("Unmute")):this.c.children[0].children[0].innerHTML!=this.v("Mute")&&(this.c.children[0].children[0].innerHTML=this.v("Mute"));for(a=0;4>a;a++)t.r(this.c,"vjs-vol-"+a);t.p(this.c,"vjs-vol-"+c)};t.Fa=t.O.extend({l:function(a,c){t.O.call(this,a,c);this.b(a,"volumechange",this.hf);a.h&&a.h.featuresVolumeControl===l&&this.p("vjs-hidden");this.b(a,"loadstart",function(){a.h.featuresVolumeControl===l?this.p("vjs-hidden"):this.r("vjs-hidden")});this.p("vjs-menu-button")}});t.Fa.prototype.Ja=function(){var a=new t.pa(this.d,{Dc:"div"}),c=new t.Hb(this.d,this.q.volumeBar);c.b("focus",function(){a.p("vjs-lock-showing")});c.b("blur",function(){G(a)});a.ba(c);return a};t.Fa.prototype.u=function(){t.qa.prototype.u.call(this);t.O.prototype.u.call(this)};t.Fa.prototype.e=function(){return t.w.prototype.e.call(this,"div",{className:"vjs-volume-menu-button vjs-menu-button vjs-control",innerHTML:'<div><span class="vjs-control-text">'+this.v("Mute")+"</span></div>"})};t.Fa.prototype.hf=t.qa.prototype.update;t.pc=t.O.extend({l:function(a,c){t.O.call(this,a,c);this.ud();this.td();this.b(a,"loadstart",this.ud);this.b(a,"ratechange",this.td)}});s=t.pc.prototype;s.sa="Playback Rate";s.className="vjs-playback-rate";s.e=function(){var a=t.O.prototype.e.call(this);this.Sc=t.e("div",{className:"vjs-playback-rate-value",innerHTML:1});a.appendChild(this.Sc);return a};s.Ja=function(){var a=new t.pa(this.k()),c=this.k().options().playbackRates;if(c)for(var d=c.length-1;0<=d;d--)a.ba(new t.Db(this.k(),{rate:c[d]+"x"}));return a};s.Ca=function(){this.m().setAttribute("aria-valuenow",this.k().playbackRate())};s.u=function(){for(var a=this.k().playbackRate(),c=this.k().options().playbackRates,d=c[0],e=0;e<c.length;e++)if(c[e]>a){d=c[e];break}this.k().playbackRate(d)};function na(a){return a.k().h&&a.k().h.featuresPlaybackRate&&a.k().options().playbackRates&&0<a.k().options().playbackRates.length}s.ud=function(){na(this)?this.r("vjs-hidden"):this.p("vjs-hidden")};s.td=function(){na(this)&&(this.Sc.innerHTML=this.k().playbackRate()+"x")};t.Db=t.M.extend({Dc:"button",l:function(a,c){var d=this.label=c.rate,e=this.ad=parseFloat(d,10);c.label=d;c.selected=1===e;t.M.call(this,a,c);this.b(a,"ratechange",this.update)}});t.Db.prototype.u=function(){t.M.prototype.u.call(this);this.k().playbackRate(this.ad)};t.Db.prototype.update=function(){this.selected(this.k().playbackRate()==this.ad)};t.qc=t.w.extend({l:function(a,c){t.w.call(this,a,c);this.update();a.b("posterchange",t.bind(this,this.update))}});s=t.qc.prototype;s.dispose=function(){this.k().n("posterchange",this.update);t.w.prototype.dispose.call(this)};s.e=function(){var a=t.e("div",{className:"vjs-poster",tabIndex:-1});t.yd||(this.Pb=t.e("img"),a.appendChild(this.Pb));return a};s.update=function(){var a=this.k().poster();this.ma(a);a?this.show():this.Y()};s.ma=function(a){var c;this.Pb?this.Pb.src=a:(c="",a&&(c='url("'+a+'")'),this.c.style.backgroundImage=c)};s.u=function(){this.d.play()};t.mc=t.a.extend({l:function(a,c){t.a.call(this,a,c)}});t.mc.prototype.e=function(){return t.a.prototype.e.call(this,"div",{className:"vjs-loading-spinner"})};t.ub=t.w.extend();t.ub.prototype.e=function(){return t.w.prototype.e.call(this,"div",{className:"vjs-big-play-button",innerHTML:'<span aria-hidden="true"></span>',"aria-label":"play video"})};t.ub.prototype.u=function(){this.d.play()};t.zb=t.a.extend({l:function(a,c){t.a.call(this,a,c);this.update();this.b(a,"error",this.update)}});t.zb.prototype.e=function(){var a=t.a.prototype.e.call(this,"div",{className:"vjs-error-display"});this.B=t.e("div");a.appendChild(this.B);return a};t.zb.prototype.update=function(){this.k().error()&&(this.B.innerHTML=this.v(this.k().error().message))};var O;t.j=t.a.extend({l:function(a,c,d){c=c||{};c.ed=l;t.a.call(this,a,c,d);this.featuresProgressEvents||this.te();this.featuresTimeupdateEvents||this.ue();this.he();this.featuresNativeTextTracks||this.Xd();this.b("loadstart",this.sd);this.je()}});s=t.j.prototype;s.he=function(){var a,c;a=this.k();c=function(){a.controls()&&!a.usingNativeControls()&&this.Kd()};this.I(c);this.b(a,"controlsenabled",c);this.b(a,"controlsdisabled",this.Je);this.I(function(){this.networkState&&0<this.networkState()&&this.k().o("loadstart")})};s.Kd=function(){var a;this.b("mousedown",this.u);this.b("touchstart",function(){a=this.d.userActive()});this.b("touchmove",function(){a&&this.k().reportUserActivity()});this.b("touchend",function(a){a.preventDefault()});da(this);this.b("tap",this.De)};s.Je=function(){this.n("tap");this.n("touchstart");this.n("touchmove");this.n("touchleave");this.n("touchcancel");this.n("touchend");this.n("click");this.n("mousedown")};s.u=function(a){0===a.button&&this.k().controls()&&(this.k().paused()?this.k().play():this.k().pause())};s.De=function(){this.k().userActive(!this.k().userActive())};s.sd=function(){this.clearTimeout(this.ff);this.Yc&&(this.La=this.Yc)};s.te=function(){this.Uc=f;this.bf()};s.se=function(){this.Uc=l;this.md()};s.bf=function(){this.Ie=this.setInterval(function(){var a=this.k().bufferedPercent();this.Od!=a&&this.k().o("progress");this.Od=a;1===a&&this.md()},500)};s.md=function(){this.clearInterval(this.Ie)};s.ue=function(){var a=this.d;this.Zb=f;this.b(a,"play",this.qd);this.b(a,"pause",this.tb);this.N("timeupdate",function(){this.featuresTimeupdateEvents=f;this.Vc()})};s.Vc=function(){var a=this.d;this.Zb=l;this.tb();this.n(a,"play",this.qd);this.n(a,"pause",this.tb)};s.qd=function(){this.Fc&&this.tb();this.Fc=this.setInterval(function(){this.k().o("timeupdate")},250)};s.tb=function(){this.clearInterval(this.Fc);this.k().o("timeupdate")};s.dispose=function(){this.Uc&&this.se();this.Zb&&this.Vc();t.a.prototype.dispose.call(this)};s.cc=function(){this.Zb&&this.k().o("timeupdate")};s.je=function(){function a(){var a=c.ea("textTrackDisplay");a&&a.C()}var c=this.d,d;if(d=this.textTracks())d.addEventListener("removetrack",a),d.addEventListener("addtrack",a),this.b("dispose",t.bind(this,function(){d.removeEventListener("removetrack",a);d.removeEventListener("addtrack",a)}))};s.Xd=function(){var a=this.d,c,d,e;window.WebVTT||(e=document.createElement("script"),e.src=a.options()["vtt.js"]||"../node_modules/vtt.js/dist/vtt.js",a.m().appendChild(e),window.WebVTT=f);if(d=this.textTracks())c=function(){var c,d,e;e=a.ea("textTrackDisplay");e.C();for(c=0;c<this.length;c++)d=this[c],d.removeEventListener("cuechange",t.bind(e,e.C)),"showing"===d.mode&&d.addEventListener("cuechange",t.bind(e,e.C))},d.addEventListener("change",c),this.b("dispose",t.bind(this,function(){d.removeEventListener("change",c)}))};s.textTracks=function(){this.d.pd=this.d.pd||new t.F;return this.d.pd};s.Z=function(){this.d.bd=this.d.bd||new t.F;return this.d.bd};O=function(a,c,d,e,g){var h=a.textTracks();g=g||{};g.kind=c;d&&(g.label=d);e&&(g.language=e);g.player=a.d;a=new t.t(g);P(h,a);return a};t.j.prototype.addTextTrack=function(a,c,d){if(!a)throw Error("TextTrack kind is required but was not provided");return O(this,a,c,d)};t.j.prototype.ia=function(a){a=O(this,a.kind,a.label,a.language,a);P(this.Z(),a);return{T:a}};t.j.prototype.Ba=function(a){Q(this.textTracks(),a);Q(this.Z(),a)};t.j.prototype.gd=m();t.j.prototype.featuresVolumeControl=f;t.j.prototype.featuresFullscreenResize=l;t.j.prototype.featuresPlaybackRate=l;t.j.prototype.featuresProgressEvents=l;t.j.prototype.featuresTimeupdateEvents=l;t.j.prototype.featuresNativeTextTracks=l;t.j.hc=function(a){a.prototype.La={src:""};a.Ta=function(c,d){var e=a.hd;e||(e=a.hd=[]);d===b&&(d=e.length);e.splice(d,0,c)};a.rb=function(c){for(var d=a.hd||[],e,g=0;g<d.length;g++)if(e=d[g].gb(c))return d[g];return j};a.Ac=function(c){var d=a.rb(c);return d?d.gb(c):""};a.prototype.Ua=function(c){var d=a.rb(c);d||(a.S?d=a.S:t.log.error("No source hander found for the current source."));this.Ma();this.n("dispose",this.Ma);c&&""!==c.src&&(this.Yc=c,this.ff=this.setTimeout(t.bind(this,this.sd),0));this.dc=d.Ub(c,this);this.b("dispose",this.Ma);return this};a.prototype.Ma=function(){this.dc&&this.dc.dispose&&this.dc.dispose()}};t.media={};t.f=t.j.extend({l:function(a,c,d){var e,g,h;if(c.nativeCaptions===l||c.nativeTextTracks===l)this.featuresNativeTextTracks=l;t.j.call(this,a,c,d);for(d=t.f.Ab.length-1;0<=d;d--)this.b(t.f.Ab[d],this.Yd);(c=c.source)&&(this.c.currentSrc!==c.src||a.L&&3===a.L.ie)&&this.Ua(c);if(this.c.hasChildNodes()){d=this.c.childNodes;e=d.length;for(c=[];e--;)g=d[e],h=g.nodeName.toLowerCase(),"track"===h&&(this.featuresNativeTextTracks?P(this.Z(),g.track):c.push(g));for(d=0;d<c.length;d++)this.c.removeChild(c[d])}this.featuresNativeTextTracks&&this.b("loadstart",t.bind(this,this.ge));if(t.Gb&&a.options().nativeControlsForTouch===f){var k,q,r,u;k=this;q=this.k();c=q.controls();k.c.controls=!!c;r=function(){k.c.controls=f};u=function(){k.c.controls=l};q.b("controlsenabled",r);q.b("controlsdisabled",u);c=function(){q.n("controlsenabled",r);q.n("controlsdisabled",u)};k.b("dispose",c);q.b("usingcustomcontrols",c);q.usingNativeControls(f)}a.I(function(){this.src()&&(this.L&&this.q.autoplay&&this.paused())&&(delete this.L.poster,this.play())});this.Ya()}});s=t.f.prototype;s.dispose=function(){t.f.Nb(this.c);t.j.prototype.dispose.call(this)};s.e=function(){var a=this.d,c,d,e,g=a.L;if(!g||this.movingMediaElementInDOM===l){g?(e=g.cloneNode(l),t.f.Nb(g),g=e,a.L=j):(g=t.e("video"),e=videojs.$.ya({},a.Ze),(!t.Gb||a.options().nativeControlsForTouch!==f)&&delete e.controls,t.fd(g,t.i.D(e,{id:a.id()+"_html5_api",class:"vjs-tech"})));g.player=a;if(a.q.rd)for(e=0;e<a.q.rd.length;e++)c=a.q.rd[e],d=document.createElement("track"),d.Xb=c.Xb,d.label=c.label,d.jd=c.jd,d.src=c.src,"default"in c&&d.setAttribute("default","default"),g.appendChild(d);t.Vb(g,a.m())}c=["autoplay","preload","loop","muted"];for(e=c.length-1;0<=e;e--){d=c[e];var h={};"undefined"!==typeof a.q[d]&&(h[d]=a.q[d]);t.fd(g,h)}return g};s.ge=function(){for(var a=this.c.querySelectorAll("track"),c,d=a.length,e={captions:1,subtitles:1};d--;)if((c=a[d].T)&&c.kind in e&&!a[d]["default"])c.mode="disabled"};s.Yd=function(a){"error"==a.type&&this.error()?this.k().error(this.error().code):(a.bubbles=l,this.k().o(a))};s.play=function(){this.c.play()};s.pause=function(){this.c.pause()};s.paused=function(){return this.c.paused};s.currentTime=function(){return this.c.currentTime};s.cc=function(a){try{this.c.currentTime=a}catch(c){t.log(c,"Video is not ready. (Video.js)")}};s.duration=function(){return this.c.duration||0};s.buffered=function(){return this.c.buffered};s.volume=function(){return this.c.volume};s.Ue=function(a){this.c.volume=a};s.muted=function(){return this.c.muted};s.Qe=function(a){this.c.muted=a};s.width=function(){return this.c.offsetWidth};s.height=function(){return this.c.offsetHeight};s.Va=function(){return"function"==typeof this.c.webkitEnterFullScreen&&(/Android/.test(t.P)||!/Chrome|Mac OS X 10.5/.test(t.P))?f:l};s.Ic=function(){var a=this.c;"webkitDisplayingFullscreen"in a&&this.N("webkitbeginfullscreen",function(){this.d.isFullscreen(f);this.N("webkitendfullscreen",function(){this.d.isFullscreen(l);this.d.o("fullscreenchange")});this.d.o("fullscreenchange")});a.paused&&a.networkState<=a.mf?(this.c.play(),this.setTimeout(function(){a.pause();a.webkitEnterFullScreen()},0)):a.webkitEnterFullScreen()};s.Zd=function(){this.c.webkitExitFullScreen()};s.src=function(a){if(a===b)return this.c.src;this.ma(a)};s.ma=function(a){this.c.src=a};s.load=function(){this.c.load()};s.currentSrc=function(){return this.La?this.La.src:this.c.currentSrc};s.poster=function(){return this.c.poster};s.gd=function(a){this.c.poster=a};s.Sa=function(){return this.c.Sa};s.Se=function(a){this.c.Sa=a};s.autoplay=function(){return this.c.autoplay};s.Ne=function(a){this.c.autoplay=a};s.controls=function(){return this.c.controls};s.loop=function(){return this.c.loop};s.Pe=function(a){this.c.loop=a};s.error=function(){return this.c.error};s.seeking=function(){return this.c.seeking};s.seekable=function(){return this.c.seekable};s.ended=function(){return this.c.ended};s.playbackRate=function(){return this.c.playbackRate};s.Re=function(a){this.c.playbackRate=a};s.networkState=function(){return this.c.networkState};s.readyState=function(){return this.c.readyState};s.textTracks=function(){return!this.featuresNativeTextTracks?t.j.prototype.textTracks.call(this):this.c.textTracks};s.addTextTrack=function(a,c,d){return!this.featuresNativeTextTracks?t.j.prototype.addTextTrack.call(this,a,c,d):this.c.addTextTrack(a,c,d)};s.ia=function(a){if(!this.featuresNativeTextTracks)return t.j.prototype.ia.call(this,a);var c=document.createElement("track");a=a||{};a.kind&&(c.kind=a.kind);a.label&&(c.label=a.label);if(a.language||a.srclang)c.srclang=a.language||a.srclang;a["default"]&&(c["default"]=a["default"]);a.id&&(c.id=a.id);a.src&&(c.src=a.src);this.m().appendChild(c);c.track.mode="metadata"===c.T.kind?"hidden":"disabled";c.onload=function(){var a=c.track;2<=c.readyState&&("metadata"===a.kind&&"hidden"!==a.mode?a.mode="hidden":"metadata"!==a.kind&&"disabled"!==a.mode&&(a.mode="disabled"),c.onload=j)};P(this.Z(),c.T);return c};s.Ba=function(a){if(!this.featuresNativeTextTracks)return t.j.prototype.Ba.call(this,a);var c,d;Q(this.Z(),a);c=this.m().querySelectorAll("track");for(d=0;d<c.length;d++)if(c[d]===a||c[d].track===a){c[d].parentNode.removeChild(c[d]);break}};t.f.isSupported=function(){try{t.A.volume=.5}catch(a){return l}return!!t.A.canPlayType};t.j.hc(t.f);t.f.S={};t.f.S.gb=function(a){function c(a){try{return t.A.canPlayType(a)}catch(c){return""}}return a.type?c(a.type):a.src?(a=(a=a.src.match(/\.([^.\/\?]+)(\?[^\/]+)?$/i))&&a[1],c("video/"+a)):""};t.f.S.Ub=function(a,c){c.ma(a.src)};t.f.S.dispose=m();t.f.Ta(t.f.S);t.f.Qd=function(){var a=t.A.volume;t.A.volume=a/2+.1;return a!==t.A.volume};t.f.Pd=function(){var a=t.A.playbackRate;t.A.playbackRate=a/2+.1;return a!==t.A.playbackRate};t.f.Xe=function(){var a;(a=!!t.A.textTracks)&&0<t.A.textTracks.length&&(a="number"!==typeof t.A.textTracks[0].mode);a&&t.kc&&(a=l);return a};t.f.prototype.featuresVolumeControl=t.f.Qd();t.f.prototype.featuresPlaybackRate=t.f.Pd();t.f.prototype.movingMediaElementInDOM=!t.Cd;t.f.prototype.featuresFullscreenResize=f;t.f.prototype.featuresProgressEvents=f;t.f.prototype.featuresNativeTextTracks=t.f.Xe();var S,oa=/^application\/(?:x-|vnd\.apple\.)mpegurl/i,pa=/^video\/mp4/i;t.f.Xc=function(){4<=t.ic&&(S||(S=t.A.constructor.prototype.canPlayType),t.A.constructor.prototype.canPlayType=function(a){return a&&oa.test(a)?"maybe":S.call(this,a)});t.Gd&&(S||(S=t.A.constructor.prototype.canPlayType),t.A.constructor.prototype.canPlayType=function(a){return a&&pa.test(a)?"maybe":S.call(this,a)})};t.f.df=function(){var a=t.A.constructor.prototype.canPlayType;t.A.constructor.prototype.canPlayType=S;S=j;return a};t.f.Xc();t.f.Ab="loadstart suspend abort error emptied stalled loadedmetadata loadeddata canplay canplaythrough playing waiting seeking seeked ended durationchange timeupdate progress play pause ratechange volumechange".split(" ");t.f.Nb=function(a){if(a){a.player=j;for(a.parentNode&&a.parentNode.removeChild(a);a.hasChildNodes();)a.removeChild(a.firstChild);a.removeAttribute("src");if("function"===typeof a.load)try{a.load()}catch(c){}}};t.g=t.j.extend({l:function(a,c,d){t.j.call(this,a,c,d);var e=c.source;d=a.id()+"_flash_api";var g=a.q,g=t.i.D({readyFunction:"videojs.Flash.onReady",eventProxyFunction:"videojs.Flash.onEvent",errorEventProxyFunction:"videojs.Flash.onError",autoplay:g.autoplay,preload:g.Sa,loop:g.loop,muted:g.muted},c.flashVars),h=t.i.D({wmode:"opaque",bgcolor:"#000000"},c.params);d=t.i.D({id:d,name:d,class:"vjs-tech"},c.attributes);e&&this.I(function(){this.Ua(e)});t.Vb(this.c,c.parentEl);c.startTime&&this.I(function(){this.load();this.play();this.currentTime(c.startTime)});t.kc&&this.I(function(){this.b("mousemove",function(){this.k().o({type:"mousemove",bubbles:l})})});a.b("stageclick",a.reportUserActivity);this.c=t.g.Hc(c.swf,this.c,g,h,d)}});s=t.g.prototype;s.dispose=function(){t.j.prototype.dispose.call(this)};s.play=function(){this.c.vjs_play()};s.pause=function(){this.c.vjs_pause()};s.src=function(a){return a===b?this.currentSrc():this.ma(a)};s.ma=function(a){a=t.be(a);this.c.vjs_src(a);if(this.d.autoplay()){var c=this;this.setTimeout(function(){c.play()},0)}};t.g.prototype.setCurrentTime=function(a){this.qe=a;this.c.vjs_setProperty("currentTime",a);t.j.prototype.cc.call(this)};t.g.prototype.currentTime=function(){return this.seeking()?this.qe||0:this.c.vjs_getProperty("currentTime")};t.g.prototype.currentSrc=function(){return this.La?this.La.src:this.c.vjs_getProperty("currentSrc")};t.g.prototype.load=function(){this.c.vjs_load()};t.g.prototype.poster=function(){this.c.vjs_getProperty("poster")};t.g.prototype.setPoster=m();t.g.prototype.seekable=function(){return 0===this.duration()?t.Ka():t.Ka(0,this.duration())};t.g.prototype.buffered=function(){return t.Ka(0,this.c.vjs_getProperty("buffered"))};t.g.prototype.Va=p(l);t.g.prototype.Ic=p(l);function qa(){var a=T[U],c=a.charAt(0).toUpperCase()+a.slice(1);ra["set"+c]=function(c){return this.c.vjs_setProperty(a,c)}}function sa(a){ra[a]=function(){return this.c.vjs_getProperty(a)}}var ra=t.g.prototype,T="rtmpConnection rtmpStream preload defaultPlaybackRate playbackRate autoplay loop mediaGroup controller controls volume muted defaultMuted".split(" "),ta="error networkState readyState seeking initialTime duration startOffsetTime paused played ended videoTracks audioTracks videoWidth videoHeight".split(" "),U;for(U=0;U<T.length;U++)sa(T[U]),qa();for(U=0;U<ta.length;U++)sa(ta[U]);t.g.isSupported=function(){return 10<=t.g.version()[0]};t.j.hc(t.g);t.g.S={};t.g.S.gb=function(a){return!a.type?"":a.type.replace(/;.*/,"").toLowerCase()in t.g.ae?"maybe":""};t.g.S.Ub=function(a,c){c.ma(a.src)};t.g.S.dispose=m();t.g.Ta(t.g.S);t.g.ae={"video/flv":"FLV","video/x-flv":"FLV","video/mp4":"MP4","video/m4v":"MP4"};t.g.onReady=function(a){var c;if(c=(a=t.m(a))&&a.parentNode&&a.parentNode.player)a.player=c,t.g.checkReady(c.h)};t.g.checkReady=function(a){a.m()&&(a.m().vjs_getProperty?a.Ya():this.setTimeout(function(){t.g.checkReady(a)},50))};t.g.onEvent=function(a,c){t.m(a).player.o(c)};t.g.onError=function(a,c){var d=t.m(a).player,e="FLASH: "+c;"srcnotfound"==c?d.error({code:4,message:e}):d.error(e)};t.g.version=function(){var a="0,0,0";try{a=new window.ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version").replace(/\D+/g,",").match(/^,?(.+),?$/)[1]}catch(c){try{navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin&&(a=(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]).description.replace(/\D+/g,",").match(/^,?(.+),?$/)[1])}catch(d){}}return a.split(",")};t.g.Hc=function(a,c,d,e,g){a=t.g.ee(a,d,e,g);a=t.e("div",{innerHTML:a}).childNodes[0];d=c.parentNode;c.parentNode.replaceChild(a,c);a[t.expando]=c[t.expando];var h=d.childNodes[0];setTimeout(function(){h.style.display="block"},1e3);return a};t.g.ee=function(a,c,d,e){var g="",h="",k="";c&&t.i.da(c,function(a,c){g+=a+"="+c+"&"});d=t.i.D({movie:a,flashvars:g,allowScriptAccess:"always",allowNetworking:"all"},d);t.i.da(d,function(a,c){h+='<param name="'+a+'" value="'+c+'" />'});e=t.i.D({data:a,width:"100%",height:"100%"},e);t.i.da(e,function(a,c){k+=a+'="'+c+'" '});return'<object type="application/x-shockwave-flash" '+k+">"+h+"</object>"};t.g.We={"rtmp/mp4":"MP4","rtmp/flv":"FLV"};t.g.Kf=function(a,c){return a+"&"+c};t.g.Ve=function(a){var c={Cc:"",nd:""};if(!a)return c;var d=a.indexOf("&"),e;-1!==d?e=d+1:(d=e=a.lastIndexOf("/")+1,0===d&&(d=e=a.length));c.Cc=a.substring(0,d);c.nd=a.substring(e,a.length);return c};t.g.oe=function(a){return a in t.g.We};t.g.Id=/^rtmp[set]?:\/\//i;t.g.ne=function(a){return t.g.Id.test(a)};t.g.bc={};t.g.bc.gb=function(a){return t.g.oe(a.type)||t.g.ne(a.src)?"maybe":""};t.g.bc.Ub=function(a,c){var d=t.g.Ve(a.src);c.setRtmpConnection(d.Cc);c.setRtmpStream(d.nd)};t.g.Ta(t.g.bc);t.Hd=t.a.extend({l:function(a,c,d){t.a.call(this,a,c,d);if(!a.q.sources||0===a.q.sources.length){c=0;for(d=a.q.techOrder;c<d.length;c++){var e=t.ua(d[c]),g=window.videojs[e];if(g&&g.isSupported()){ka(a,e);break}}}else a.src(a.q.sources)}});t.sc={disabled:"disabled",hidden:"hidden",showing:"showing"};t.Jd={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"};t.t=function(a){var c,d,e,g,h,k,q,r,u,A,R;a=a||{};if(!a.player)throw Error("A player was not provided.");c=this;if(t.oa)for(R in c=document.createElement("custom"),t.t.prototype)c[R]=t.t.prototype[R];c.d=a.player;e=t.sc[a.mode]||"disabled";g=t.Jd[a.kind]||"subtitles";h=a.label||"";k=a.language||a.srclang||"";d=a.id||"vjs_text_track_"+t.s++;if("metadata"===g||"chapters"===g)e="hidden";c.X=[];c.Ga=[];q=new t.W(c.X);r=new t.W(c.Ga);A=l;u=t.bind(c,function(){this.activeCues;A&&(this.trigger("cuechange"),A=l)});"disabled"!==e&&c.d.b("timeupdate",u);Object.defineProperty(c,"kind",{get:function(){return g},set:Function.prototype});Object.defineProperty(c,"label",{get:function(){return h},set:Function.prototype});Object.defineProperty(c,"language",{get:function(){return k},set:Function.prototype});Object.defineProperty(c,"id",{get:function(){return d},set:Function.prototype});Object.defineProperty(c,"mode",{get:function(){return e},set:function(a){t.sc[a]&&(e=a,"showing"===e&&this.d.b("timeupdate",u),this.o("modechange"))}});Object.defineProperty(c,"cues",{get:function(){return!this.Yb?j:q},set:Function.prototype});Object.defineProperty(c,"activeCues",{get:function(){var a,c,d,e,g;if(!this.Yb)return j;if(0===this.cues.length)return r;e=this.d.currentTime();a=0;c=this.cues.length;for(d=[];a<c;a++)g=this.cues[a],g.startTime<=e&&g.endTime>=e?d.push(g):g.startTime===g.endTime&&(g.startTime<=e&&g.startTime+.5>=e)&&d.push(g);A=l;if(d.length!==this.Ga.length)A=f;else for(a=0;a<d.length;a++)-1===ua.call(this.Ga,d[a])&&(A=f);this.Ga=d;r.sb(this.Ga);return r},set:Function.prototype});a.src?va(a.src,c):c.Yb=f;if(t.oa)return c};t.t.prototype=t.i.create(t.z.prototype);t.t.prototype.constructor=t.t;t.t.prototype.eb={cuechange:"cuechange"};t.t.prototype.wc=function(a){var c=this.d.textTracks(),d=0;if(c)for(;d<c.length;d++)c[d]!==this&&c[d].cd(a);this.X.push(a);this.cues.sb(this.X)};t.t.prototype.cd=function(a){for(var c=0,d=this.X.length,e,g=l;c<d;c++)e=this.X[c],e===a&&(this.X.splice(c,1),g=f);g&&this.Ec.sb(this.X)};var va,V,ua;va=function(a,c){t.jf(a,t.bind(this,function(a,e,g){if(a)return t.log.error(a);c.Yb=f;V(g,c)}))};V=function(a,c){if("function"!==typeof window.WebVTT)window.setTimeout(function(){V(a,c)},25);else{var d=new window.WebVTT.Parser(window,window.vttjs,window.WebVTT.StringDecoder());d.oncue=function(a){c.wc(a)};d.onparsingerror=function(a){t.log.error(a)};d.parse(a);d.flush()}};ua=function(a,c){var d;if(this==j)throw new TypeError('"this" is null or not defined');var e=Object(this),g=e.length>>>0;if(0===g)return-1;d=+c||0;Infinity===Math.abs(d)&&(d=0);if(d>=g)return-1;for(d=Math.max(0<=d?d:g-Math.abs(d),0);d<g;){if(d in e&&e[d]===a)return d;d++}return-1};t.F=function(a){var c=this,d,e=0;if(t.oa)for(d in c=document.createElement("custom"),t.F.prototype)c[d]=t.F.prototype[d];a=a||[];c.Xa=[];for(Object.defineProperty(c,"length",{get:function(){return this.Xa.length}});e<a.length;e++)P(c,a[e]);if(t.oa)return c};t.F.prototype=t.i.create(t.z.prototype);t.F.prototype.constructor=t.F;t.F.prototype.eb={change:"change",addtrack:"addtrack",removetrack:"removetrack"};for(var wa in t.F.prototype.eb)t.F.prototype["on"+wa]=j;function P(a,c){var d=a.Xa.length;""+d in a||Object.defineProperty(a,d,{get:function(){return this.Xa[d]}});c.addEventListener("modechange",t.bind(a,function(){this.o("change")}));a.Xa.push(c);a.o({type:"addtrack",T:c})}function Q(a,c){for(var d=0,e=a.length,g;d<e;d++)if(g=a[d],g===c){a.Xa.splice(d,1);break}a.o({type:"removetrack",T:c})}t.F.prototype.fe=function(a){for(var c=0,d=this.length,e=j,g;c<d;c++)if(g=this[c],g.id===a){e=g;break}return e};t.W=function(a){var c=this,d;if(t.oa)for(d in c=document.createElement("custom"),t.W.prototype)c[d]=t.W.prototype[d];t.W.prototype.sb.call(c,a);Object.defineProperty(c,"length",{get:n("re")});if(t.oa)return c};t.W.prototype.sb=function(a){var c=this.length||0,d=0,e=a.length;this.X=a;this.re=a.length;a=function(a){""+a in this||Object.defineProperty(this,""+a,{get:function(){return this.X[a]}})};if(c<e)for(d=c;d<e;d++)a.call(this,d)};t.W.prototype.de=function(a){for(var c=0,d=this.length,e=j,g;c<d;c++)if(g=this[c],g.id===a){e=g;break}return e};t.ra=t.a.extend({l:function(a,c,d){t.a.call(this,a,c,d);a.b("loadstart",t.bind(this,this.af));a.I(t.bind(this,function(){if(a.h&&a.h.featuresNativeTextTracks)this.Y();else{var c,d,h;a.b("fullscreenchange",t.bind(this,this.C));d=a.q.tracks||[];for(c=0;c<d.length;c++)h=d[c],this.d.ia(h)}}))}});t.ra.prototype.af=function(){this.d.h&&this.d.h.featuresNativeTextTracks?this.Y():this.show()};t.ra.prototype.e=function(){return t.a.prototype.e.call(this,"div",{className:"vjs-text-track-display"})};t.ra.prototype.Rd=function(){"function"===typeof window.WebVTT&&window.WebVTT.processCues(window,[],this.c)};function W(a,c){return"rgba("+parseInt(a[1]+a[1],16)+","+parseInt(a[2]+a[2],16)+","+parseInt(a[3]+a[3],16)+","+c+")"}var xa={Af:"monospace",Gf:"sans-serif",If:"serif",Bf:'"Andale Mono", "Lucida Console", monospace',Cf:'"Courier New", monospace',Ef:"sans-serif",Ff:"serif",rf:'"Comic Sans MS", Impact, fantasy',Hf:'"Monotype Corsiva", cursive',Jf:'"Andale Mono", "Lucida Console", monospace, sans-serif'};t.ra.prototype.C=function(){var a=this.d.textTracks(),c=0,d;this.Rd();if(a)for(;c<a.length;c++)d=a[c],"showing"===d.mode&&this.ef(d)};t.ra.prototype.ef=function(a){if("function"===typeof window.WebVTT&&a.activeCues){for(var c=0,d=this.d.textTrackSettings.Lc(),e,g=[];c<a.activeCues.length;c++)g.push(a.activeCues[c]);window.WebVTT.processCues(window,a.activeCues,this.c);for(c=g.length;c--;){a=g[c].sf;d.color&&(a.firstChild.style.color=d.color);if(d.od)try{a.firstChild.style.color=W(d.color||"#fff",d.od)}catch(h){}d.backgroundColor&&(a.firstChild.style.backgroundColor=d.backgroundColor);if(d.zc)try{a.firstChild.style.backgroundColor=W(d.backgroundColor||"#000",d.zc)}catch(k){}if(d.gc)if(d.wd)try{a.style.backgroundColor=W(d.gc,d.wd)}catch(q){}else a.style.backgroundColor=d.gc;d.Na&&("dropshadow"===d.Na?a.firstChild.style.textShadow="2px 2px 3px #222, 2px 2px 4px #222, 2px 2px 5px #222":"raised"===d.Na?a.firstChild.style.textShadow="1px 1px #222, 2px 2px #222, 3px 3px #222":"depressed"===d.Na?a.firstChild.style.textShadow="1px 1px #ccc, 0 1px #ccc, -1px -1px #222, 0 -1px #222":"uniform"===d.Na&&(a.firstChild.style.textShadow="0 0 4px #222, 0 0 4px #222, 0 0 4px #222, 0 0 4px #222"));d.Rb&&1!==d.Rb&&(e=window.Df(a.style.fontSize),a.style.fontSize=e*d.Rb+"px",a.style.height="auto",a.style.top="auto",a.style.bottom="2px");d.fontFamily&&"default"!==d.fontFamily&&("small-caps"===d.fontFamily?a.firstChild.style.fontVariant="small-caps":a.firstChild.style.fontFamily=xa[d.fontFamily])}}};t.aa=t.M.extend({l:function(a,c){var d=this.T=c.track,e=a.textTracks(),g,h;e&&(g=t.bind(this,function(){var a="showing"===this.T.mode,c,d,g;if(this instanceof t.Cb){a=f;d=0;for(g=e.length;d<g;d++)if(c=e[d],c.kind===this.T.kind&&"showing"===c.mode){a=l;break}}this.selected(a)}),e.addEventListener("change",g),a.b("dispose",function(){e.removeEventListener("change",g)}));c.label=d.label||d.language||"Unknown";c.selected=d["default"]||"showing"===d.mode;t.M.call(this,a,c);e&&e.onchange===b&&this.b(["tap","click"],function(){if("object"!==typeof window.Ad)try{h=new window.Ad("change")}catch(a){}h||(h=document.createEvent("Event"),h.initEvent("change",f,f));e.dispatchEvent(h)})}});t.aa.prototype.u=function(){var a=this.T.kind,c=this.d.textTracks(),d,e=0;t.M.prototype.u.call(this);if(c)for(;e<c.length;e++)d=c[e],d.kind===a&&(d.mode=d===this.T?"showing":"disabled")};t.Cb=t.aa.extend({l:function(a,c){c.track={kind:c.kind,player:a,label:c.kind+" off",default:l,mode:"disabled"};t.aa.call(this,a,c);this.selected(f)}});t.vb=t.aa.extend({l:function(a,c){c.track={kind:c.kind,player:a,label:c.kind+" settings",default:l,mode:"disabled"};t.aa.call(this,a,c);this.p("vjs-texttrack-settings")}});t.vb.prototype.u=function(){this.k().ea("textTrackSettings").show()};t.Q=t.O.extend({l:function(a,c){var d,e;t.O.call(this,a,c);d=this.d.textTracks();1>=this.H.length&&this.Y();d&&(e=t.bind(this,this.update),d.addEventListener("removetrack",e),d.addEventListener("addtrack",e),this.d.b("dispose",function(){d.removeEventListener("removetrack",e);d.removeEventListener("addtrack",e)}))}});t.Q.prototype.Ia=function(){var a=[],c,d;this instanceof t.na&&(!this.k().h||!this.k().h.featuresNativeTextTracks)&&a.push(new t.vb(this.d,{kind:this.fa}));a.push(new t.Cb(this.d,{kind:this.fa}));d=this.d.textTracks();if(!d)return a;for(var e=0;e<d.length;e++)c=d[e],c.kind===this.fa&&a.push(new t.aa(this.d,{track:c}));return a};t.na=t.Q.extend({l:function(a,c,d){t.Q.call(this,a,c,d);this.c.setAttribute("aria-label","Captions Menu")}});t.na.prototype.fa="captions";t.na.prototype.sa="Captions";t.na.prototype.className="vjs-captions-button";t.na.prototype.update=function(){var a=2;t.Q.prototype.update.call(this);this.k().h&&this.k().h.featuresNativeTextTracks&&(a=1);this.H&&this.H.length>a?this.show():this.Y()};t.cb=t.Q.extend({l:function(a,c,d){t.Q.call(this,a,c,d);this.c.setAttribute("aria-label","Subtitles Menu")}});t.cb.prototype.fa="subtitles";t.cb.prototype.sa="Subtitles";t.cb.prototype.className="vjs-subtitles-button";t.Za=t.Q.extend({l:function(a,c,d){t.Q.call(this,a,c,d);this.c.setAttribute("aria-label","Chapters Menu")}});s=t.Za.prototype;s.fa="chapters";s.sa="Chapters";s.className="vjs-chapters-button";s.Ia=function(){var a=[],c,d;d=this.d.textTracks();if(!d)return a;for(var e=0;e<d.length;e++)c=d[e],c.kind===this.fa&&a.push(new t.aa(this.d,{track:c}));return a};s.Ja=function(){for(var a=this.d.textTracks()||[],c=0,d=a.length,e,g,h=this.H=[];c<d;c++)if(e=a[c],e.kind==this.fa)if(e.Ec){g=e;break}else e.mode="hidden",window.setTimeout(t.bind(this,function(){this.Ja()}),100);a=this.xa;a===b&&(a=new t.pa(this.d),a.va().appendChild(t.e("li",{className:"vjs-menu-title",innerHTML:t.ua(this.fa),Ye:-1})));if(g){e=g.cues;for(var k,c=0,d=e.length;c<d;c++)k=e[c],k=new t.$a(this.d,{track:g,cue:k}),h.push(k),a.ba(k);this.ba(a)}0<this.H.length&&this.show();return a};t.$a=t.M.extend({l:function(a,c){var d=this.T=c.track,e=this.cue=c.cue,g=a.currentTime();c.label=e.text;c.selected=e.startTime<=g&&g<e.endTime;t.M.call(this,a,c);d.addEventListener("cuechange",t.bind(this,this.update))}});t.$a.prototype.u=function(){t.M.prototype.u.call(this);this.d.currentTime(this.cue.startTime);this.update(this.cue.startTime)};t.$a.prototype.update=function(){var a=this.cue,c=this.d.currentTime();this.selected(a.startTime<=c&&c<a.endTime)};function X(a){var c;a.Me?c=a.Me[0]:a.options&&(c=a.options[a.options.selectedIndex]);return c.value}function Y(a,c){var d,e;if(c){for(d=0;d<a.options.length&&!(e=a.options[d],e.value===c);d++);a.selectedIndex=d}}t.tc=t.a.extend({l:function(a,c){t.a.call(this,a,c);this.Y();t.b(this.m().querySelector(".vjs-done-button"),"click",t.bind(this,function(){this.Le();this.Y()}));t.b(this.m().querySelector(".vjs-default-button"),"click",t.bind(this,function(){this.m().querySelector(".vjs-fg-color > select").selectedIndex=0;this.m().querySelector(".vjs-bg-color > select").selectedIndex=0;this.m().querySelector(".window-color > select").selectedIndex=0;this.m().querySelector(".vjs-text-opacity > select").selectedIndex=0;this.m().querySelector(".vjs-bg-opacity > select").selectedIndex=0;this.m().querySelector(".vjs-window-opacity > select").selectedIndex=0;this.m().querySelector(".vjs-edge-style select").selectedIndex=0;this.m().querySelector(".vjs-font-family select").selectedIndex=0;this.m().querySelector(".vjs-font-percent select").selectedIndex=2;this.C()}));t.b(this.m().querySelector(".vjs-fg-color > select"),"change",t.bind(this,this.C));t.b(this.m().querySelector(".vjs-bg-color > select"),"change",t.bind(this,this.C));t.b(this.m().querySelector(".window-color > select"),"change",t.bind(this,this.C));t.b(this.m().querySelector(".vjs-text-opacity > select"),"change",t.bind(this,this.C));t.b(this.m().querySelector(".vjs-bg-opacity > select"),"change",t.bind(this,this.C));t.b(this.m().querySelector(".vjs-window-opacity > select"),"change",t.bind(this,this.C));t.b(this.m().querySelector(".vjs-font-percent select"),"change",t.bind(this,this.C));t.b(this.m().querySelector(".vjs-edge-style select"),"change",t.bind(this,this.C));t.b(this.m().querySelector(".vjs-font-family select"),"change",t.bind(this,this.C));a.options().persistTextTrackSettings&&this.Ke()}});s=t.tc.prototype;s.e=function(){return t.a.prototype.e.call(this,"div",{className:"vjs-caption-settings vjs-modal-overlay",innerHTML:'<div class="vjs-tracksettings"><div class="vjs-tracksettings-colors"><div class="vjs-fg-color vjs-tracksetting"><label class="vjs-label">Foreground</label><select><option value="">---</option><option value="#FFF">White</option><option value="#000">Black</option><option value="#F00">Red</option><option value="#0F0">Green</option><option value="#00F">Blue</option><option value="#FF0">Yellow</option><option value="#F0F">Magenta</option><option value="#0FF">Cyan</option></select><span class="vjs-text-opacity vjs-opacity"><select><option value="">---</option><option value="1">Opaque</option><option value="0.5">Semi-Opaque</option></select></span></div><div class="vjs-bg-color vjs-tracksetting"><label class="vjs-label">Background</label><select><option value="">---</option><option value="#FFF">White</option><option value="#000">Black</option><option value="#F00">Red</option><option value="#0F0">Green</option><option value="#00F">Blue</option><option value="#FF0">Yellow</option><option value="#F0F">Magenta</option><option value="#0FF">Cyan</option></select><span class="vjs-bg-opacity vjs-opacity"><select><option value="">---</option><option value="1">Opaque</option><option value="0.5">Semi-Transparent</option><option value="0">Transparent</option></select></span></div><div class="window-color vjs-tracksetting"><label class="vjs-label">Window</label><select><option value="">---</option><option value="#FFF">White</option><option value="#000">Black</option><option value="#F00">Red</option><option value="#0F0">Green</option><option value="#00F">Blue</option><option value="#FF0">Yellow</option><option value="#F0F">Magenta</option><option value="#0FF">Cyan</option></select><span class="vjs-window-opacity vjs-opacity"><select><option value="">---</option><option value="1">Opaque</option><option value="0.5">Semi-Transparent</option><option value="0">Transparent</option></select></span></div></div><div class="vjs-tracksettings-font"><div class="vjs-font-percent vjs-tracksetting"><label class="vjs-label">Font Size</label><select><option value="0.50">50%</option><option value="0.75">75%</option><option value="1.00" selected>100%</option><option value="1.25">125%</option><option value="1.50">150%</option><option value="1.75">175%</option><option value="2.00">200%</option><option value="3.00">300%</option><option value="4.00">400%</option></select></div><div class="vjs-edge-style vjs-tracksetting"><label class="vjs-label">Text Edge Style</label><select><option value="none">None</option><option value="raised">Raised</option><option value="depressed">Depressed</option><option value="uniform">Uniform</option><option value="dropshadow">Dropshadow</option></select></div><div class="vjs-font-family vjs-tracksetting"><label class="vjs-label">Font Family</label><select><option value="">Default</option><option value="monospaceSerif">Monospace Serif</option><option value="proportionalSerif">Proportional Serif</option><option value="monospaceSansSerif">Monospace Sans-Serif</option><option value="proportionalSansSerif">Proportional Sans-Serif</option><option value="casual">Casual</option><option value="script">Script</option><option value="small-caps">Small Caps</option></select></div></div></div><div class="vjs-tracksettings-controls"><button class="vjs-default-button">Defaults</button><button class="vjs-done-button">Done</button></div>'})};s.Lc=function(){var a,c,d,e,g,h,k,q,r,u;a=this.m();g=X(a.querySelector(".vjs-edge-style select"));h=X(a.querySelector(".vjs-font-family select"));k=X(a.querySelector(".vjs-fg-color > select"));d=X(a.querySelector(".vjs-text-opacity > select"));q=X(a.querySelector(".vjs-bg-color > select"));c=X(a.querySelector(".vjs-bg-opacity > select"));r=X(a.querySelector(".window-color > select"));e=X(a.querySelector(".vjs-window-opacity > select"));a=window.parseFloat(X(a.querySelector(".vjs-font-percent > select")));c={backgroundOpacity:c,textOpacity:d,windowOpacity:e,edgeStyle:g,fontFamily:h,color:k,backgroundColor:q,windowColor:r,fontPercent:a};for(u in c)(""===c[u]||"none"===c[u]||"fontPercent"===u&&1===c[u])&&delete c[u];return c};s.Te=function(a){var c=this.m();Y(c.querySelector(".vjs-edge-style select"),a.Na);Y(c.querySelector(".vjs-font-family select"),a.fontFamily);Y(c.querySelector(".vjs-fg-color > select"),a.color);Y(c.querySelector(".vjs-text-opacity > select"),a.od);Y(c.querySelector(".vjs-bg-color > select"),a.backgroundColor);Y(c.querySelector(".vjs-bg-opacity > select"),a.zc);Y(c.querySelector(".window-color > select"),a.gc);Y(c.querySelector(".vjs-window-opacity > select"),a.wd);(a=a.Rb)&&(a=a.toFixed(2));Y(c.querySelector(".vjs-font-percent > select"),a)};s.Ke=function(){var a;try{a=JSON.parse(window.localStorage.getItem("vjs-text-track-settings"))}catch(c){}a&&this.Te(a)};s.Le=function(){var a;if(this.d.options().persistTextTrackSettings){a=this.Lc();try{t.kb(a)?window.localStorage.removeItem("vjs-text-track-settings"):window.localStorage.setItem("vjs-text-track-settings",JSON.stringify(a))}catch(c){}}};s.C=function(){var a=this.d.ea("textTrackDisplay");a&&a.C()};if("undefined"!==typeof window.JSON&&"function"===typeof window.JSON.parse)t.JSON=window.JSON;else{t.JSON={};var Z=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;t.JSON.parse=function(a,c){function d(a,e){var k,q,r=a[e];if(r&&"object"===typeof r)for(k in r)Object.prototype.hasOwnProperty.call(r,k)&&(q=d(r,k),q!==b?r[k]=q:delete r[k]);return c.call(a,e,r)}var e;a=String(a);Z.lastIndex=0;Z.test(a)&&(a=a.replace(Z,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return e=eval("("+a+")"),"function"===typeof c?d({"":e},""):e;throw new SyntaxError("JSON.parse(): invalid or malformed JSON data")}}t.yc=function(){var a,c,d,e;a=document.getElementsByTagName("video");c=document.getElementsByTagName("audio");var g=[];if(a&&0<a.length){d=0;for(e=a.length;d<e;d++)g.push(a[d])}if(c&&0<c.length){d=0;for(e=c.length;d<e;d++)g.push(c[d])}if(g&&0<g.length){d=0;for(e=g.length;d<e;d++)if((c=g[d])&&c.getAttribute)c.player===b&&(a=c.getAttribute("data-setup"),a!==j&&videojs(c));else{t.Kb();break}}else t.vd||t.Kb()};t.Kb=function(){setTimeout(t.yc,1)};"complete"===document.readyState?t.vd=f:t.N(window,"load",function(){t.vd=f});t.Kb();t.He=function(a,c){t.Player.prototype[a]=c};var ya=this;function $(a,c){var d=a.split("."),e=ya;!(d[0]in e)&&e.execScript&&e.execScript("var "+d[0]);for(var g;d.length&&(g=d.shift());)!d.length&&c!==b?e[g]=c:e=e[g]?e[g]:e[g]={}}$("videojs",t);$("_V_",t);$("videojs.options",t.options);$("videojs.players",t.Aa);$("videojs.TOUCH_ENABLED",t.Gb);$("videojs.cache",t.ta);$("videojs.Component",t.a);t.a.prototype.player=t.a.prototype.k;t.a.prototype.options=t.a.prototype.options;t.a.prototype.init=t.a.prototype.l;t.a.prototype.dispose=t.a.prototype.dispose;t.a.prototype.createEl=t.a.prototype.e;t.a.prototype.contentEl=t.a.prototype.va;t.a.prototype.el=t.a.prototype.m;t.a.prototype.addChild=t.a.prototype.ba;t.a.prototype.getChild=t.a.prototype.ea;t.a.prototype.getChildById=t.a.prototype.ce;t.a.prototype.children=t.a.prototype.children;t.a.prototype.initChildren=t.a.prototype.Oc;t.a.prototype.removeChild=t.a.prototype.removeChild;t.a.prototype.on=t.a.prototype.b;t.a.prototype.off=t.a.prototype.n;t.a.prototype.one=t.a.prototype.N;t.a.prototype.trigger=t.a.prototype.o;t.a.prototype.triggerReady=t.a.prototype.Ya;t.a.prototype.show=t.a.prototype.show;t.a.prototype.hide=t.a.prototype.Y;t.a.prototype.width=t.a.prototype.width;t.a.prototype.height=t.a.prototype.height;t.a.prototype.dimensions=t.a.prototype.Vd;t.a.prototype.ready=t.a.prototype.I;t.a.prototype.addClass=t.a.prototype.p;t.a.prototype.removeClass=t.a.prototype.r;t.a.prototype.hasClass=t.a.prototype.Qa;t.a.prototype.buildCSSClass=t.a.prototype.V;t.a.prototype.localize=t.a.prototype.v;t.a.prototype.setInterval=t.a.prototype.setInterval;t.a.prototype.setTimeout=t.a.prototype.setTimeout;$("videojs.EventEmitter",t.z);t.z.prototype.on=t.z.prototype.b;t.z.prototype.addEventListener=t.z.prototype.addEventListener;t.z.prototype.off=t.z.prototype.n;t.z.prototype.removeEventListener=t.z.prototype.removeEventListener;t.z.prototype.one=t.z.prototype.N;t.z.prototype.trigger=t.z.prototype.o;t.z.prototype.dispatchEvent=t.z.prototype.dispatchEvent;t.Player.prototype.ended=t.Player.prototype.ended;t.Player.prototype.enterFullWindow=t.Player.prototype.Jc;t.Player.prototype.exitFullWindow=t.Player.prototype.Ob;t.Player.prototype.preload=t.Player.prototype.Sa;t.Player.prototype.remainingTime=t.Player.prototype.remainingTime;t.Player.prototype.supportsFullScreen=t.Player.prototype.Va;t.Player.prototype.currentType=t.Player.prototype.Sd;t.Player.prototype.requestFullScreen=t.Player.prototype.requestFullScreen;t.Player.prototype.requestFullscreen=t.Player.prototype.requestFullscreen;t.Player.prototype.cancelFullScreen=t.Player.prototype.cancelFullScreen;t.Player.prototype.exitFullscreen=t.Player.prototype.exitFullscreen;t.Player.prototype.isFullScreen=t.Player.prototype.isFullScreen;t.Player.prototype.isFullscreen=t.Player.prototype.isFullscreen;t.Player.prototype.textTracks=t.Player.prototype.textTracks;t.Player.prototype.remoteTextTracks=t.Player.prototype.Z;t.Player.prototype.addTextTrack=t.Player.prototype.addTextTrack;t.Player.prototype.addRemoteTextTrack=t.Player.prototype.ia;t.Player.prototype.removeRemoteTextTrack=t.Player.prototype.Ba;t.Player.prototype.seekable=t.Player.prototype.seekable;$("videojs.MediaLoader",t.Hd);$("videojs.TextTrackDisplay",t.ra);$("videojs.ControlBar",t.wb);$("videojs.Button",t.w);$("videojs.PlayToggle",t.oc);$("videojs.FullscreenToggle",t.ab);$("videojs.BigPlayButton",t.ub);$("videojs.LoadingSpinner",t.mc);$("videojs.CurrentTimeDisplay",t.xb);$("videojs.DurationDisplay",t.yb);$("videojs.TimeDivider",t.uc);$("videojs.RemainingTimeDisplay",t.Fb);$("videojs.LiveDisplay",t.lc);$("videojs.ErrorDisplay",t.zb);$("videojs.Slider",t.U);$("videojs.ProgressControl",t.Eb);$("videojs.SeekBar",t.rc);$("videojs.LoadProgressBar",t.Bb);$("videojs.PlayProgressBar",t.nc);$("videojs.SeekHandle",t.bb);$("videojs.VolumeControl",t.Ib);$("videojs.VolumeBar",t.Hb);$("videojs.VolumeLevel",t.vc);$("videojs.VolumeMenuButton",t.Fa);$("videojs.VolumeHandle",t.Jb);$("videojs.MuteToggle",t.qa);$("videojs.PosterImage",t.qc);$("videojs.Menu",t.pa);$("videojs.MenuItem",t.M);$("videojs.MenuButton",t.O);$("videojs.PlaybackRateMenuButton",t.pc);$("videojs.ChaptersTrackMenuItem",t.$a);$("videojs.TextTrackButton",t.Q);$("videojs.TextTrackMenuItem",t.aa);$("videojs.OffTextTrackMenuItem",t.Cb);$("videojs.CaptionSettingsMenuItem",t.vb);t.O.prototype.createItems=t.O.prototype.Ia;t.Q.prototype.createItems=t.Q.prototype.Ia;t.Za.prototype.createItems=t.Za.prototype.Ia;$("videojs.SubtitlesButton",t.cb);$("videojs.CaptionsButton",t.na);$("videojs.ChaptersButton",t.Za);$("videojs.MediaTechController",t.j);t.j.withSourceHandlers=t.j.hc;t.j.prototype.featuresVolumeControl=t.j.prototype.xf;t.j.prototype.featuresFullscreenResize=t.j.prototype.tf;t.j.prototype.featuresPlaybackRate=t.j.prototype.uf;t.j.prototype.featuresProgressEvents=t.j.prototype.vf;t.j.prototype.featuresTimeupdateEvents=t.j.prototype.wf;t.j.prototype.setPoster=t.j.prototype.gd;t.j.prototype.textTracks=t.j.prototype.textTracks;t.j.prototype.remoteTextTracks=t.j.prototype.Z;t.j.prototype.addTextTrack=t.j.prototype.addTextTrack;t.j.prototype.addRemoteTextTrack=t.j.prototype.ia;t.j.prototype.removeRemoteTextTrack=t.j.prototype.Ba;$("videojs.Html5",t.f);t.f.Events=t.f.Ab;t.f.isSupported=t.f.isSupported;t.f.canPlaySource=t.f.Ac;t.f.patchCanPlayType=t.f.Xc;t.f.unpatchCanPlayType=t.f.df;t.f.prototype.setCurrentTime=t.f.prototype.cc;t.f.prototype.setVolume=t.f.prototype.Ue;t.f.prototype.setMuted=t.f.prototype.Qe;t.f.prototype.setPreload=t.f.prototype.Se;t.f.prototype.setAutoplay=t.f.prototype.Ne;t.f.prototype.setLoop=t.f.prototype.Pe;t.f.prototype.enterFullScreen=t.f.prototype.Ic;t.f.prototype.exitFullScreen=t.f.prototype.Zd;t.f.prototype.playbackRate=t.f.prototype.playbackRate;t.f.prototype.setPlaybackRate=t.f.prototype.Re;t.f.registerSourceHandler=t.f.Ta;t.f.selectSourceHandler=t.f.rb;t.f.prototype.setSource=t.f.prototype.Ua;t.f.prototype.disposeSourceHandler=t.f.prototype.Ma;t.f.prototype.textTracks=t.f.prototype.textTracks;t.f.prototype.remoteTextTracks=t.f.prototype.Z;t.f.prototype.addTextTrack=t.f.prototype.addTextTrack;t.f.prototype.addRemoteTextTrack=t.f.prototype.ia;t.f.prototype.removeRemoteTextTrack=t.f.prototype.Ba;$("videojs.Flash",t.g);t.g.isSupported=t.g.isSupported;t.g.canPlaySource=t.g.Ac;t.g.onReady=t.g.onReady;t.g.embed=t.g.Hc;t.g.version=t.g.version;t.g.prototype.setSource=t.g.prototype.Ua;t.g.registerSourceHandler=t.g.Ta;t.g.selectSourceHandler=t.g.rb;t.g.prototype.setSource=t.g.prototype.Ua;t.g.prototype.disposeSourceHandler=t.g.prototype.Ma;$("videojs.TextTrack",t.t);$("videojs.TextTrackList",t.F);$("videojs.TextTrackCueList",t.W);$("videojs.TextTrackSettings",t.tc);t.t.prototype.id=t.t.prototype.id;t.t.prototype.label=t.t.prototype.label;t.t.prototype.kind=t.t.prototype.Xb;t.t.prototype.mode=t.t.prototype.mode;t.t.prototype.cues=t.t.prototype.Ec;t.t.prototype.activeCues=t.t.prototype.qf;t.t.prototype.addCue=t.t.prototype.wc;t.t.prototype.removeCue=t.t.prototype.cd;t.F.prototype.getTrackById=t.F.prototype.fe;t.W.prototype.getCueById=t.F.prototype.de;$("videojs.CaptionsTrack",t.kf);$("videojs.SubtitlesTrack",t.pf);$("videojs.ChaptersTrack",t.lf);$("videojs.autoSetup",t.yc);$("videojs.plugin",t.He);$("videojs.createTimeRange",t.Ka);$("videojs.util",t.$);t.$.mergeOptions=t.$.ya;t.addLanguage=t.Ld})();!function(a){var b=a.vttjs={},c=b.VTTCue,d=b.VTTRegion,e=a.VTTCue,f=a.VTTRegion;b.shim=function(){b.VTTCue=c,b.VTTRegion=d},b.restore=function(){b.VTTCue=e,b.VTTRegion=f}}(this),function(a,b){function c(a){if("string"!=typeof a)return!1;var b=h[a.toLowerCase()];return b?a.toLowerCase():!1}function d(a){if("string"!=typeof a)return!1;var b=i[a.toLowerCase()];return b?a.toLowerCase():!1}function e(a){for(var b=1;b<arguments.length;b++){var c=arguments[b];for(var d in c)a[d]=c[d]}return a}function f(a,b,f){var h=this,i=/MSIE\s8\.0/.test(navigator.userAgent),j={};i?h=document.createElement("custom"):j.enumerable=!0,h.hasBeenReset=!1;var k="",l=!1,m=a,n=b,o=f,p=null,q="",r=!0,s="auto",t="start",u=50,v="middle",w=50,x="middle";return Object.defineProperty(h,"id",e({},j,{get:function(){return k},set:function(a){k=""+a}})),Object.defineProperty(h,"pauseOnExit",e({},j,{get:function(){return l},set:function(a){l=!!a}})),Object.defineProperty(h,"startTime",e({},j,{get:function(){return m},set:function(a){if("number"!=typeof a)throw new TypeError("Start time must be set to a number.");m=a,this.hasBeenReset=!0}})),Object.defineProperty(h,"endTime",e({},j,{get:function(){return n},set:function(a){if("number"!=typeof a)throw new TypeError("End time must be set to a number.");n=a,this.hasBeenReset=!0}})),Object.defineProperty(h,"text",e({},j,{get:function(){return o},set:function(a){o=""+a,this.hasBeenReset=!0}})),Object.defineProperty(h,"region",e({},j,{get:function(){return p},set:function(a){p=a,this.hasBeenReset=!0}})),Object.defineProperty(h,"vertical",e({},j,{get:function(){return q},set:function(a){var b=c(a);if(b===!1)throw new SyntaxError("An invalid or illegal string was specified.");q=b,this.hasBeenReset=!0}})),Object.defineProperty(h,"snapToLines",e({},j,{get:function(){return r},set:function(a){r=!!a,this.hasBeenReset=!0}})),Object.defineProperty(h,"line",e({},j,{get:function(){return s},set:function(a){if("number"!=typeof a&&a!==g)throw new SyntaxError("An invalid number or illegal string was specified.");s=a,this.hasBeenReset=!0}})),Object.defineProperty(h,"lineAlign",e({},j,{get:function(){return t},set:function(a){var b=d(a);if(!b)throw new SyntaxError("An invalid or illegal string was specified.");t=b,this.hasBeenReset=!0}})),Object.defineProperty(h,"position",e({},j,{get:function(){return u},set:function(a){if(0>a||a>100)throw new Error("Position must be between 0 and 100.");u=a,this.hasBeenReset=!0}})),Object.defineProperty(h,"positionAlign",e({},j,{get:function(){return v},set:function(a){var b=d(a);if(!b)throw new SyntaxError("An invalid or illegal string was specified.");v=b,this.hasBeenReset=!0}})),Object.defineProperty(h,"size",e({},j,{get:function(){return w},set:function(a){if(0>a||a>100)throw new Error("Size must be between 0 and 100.");w=a,this.hasBeenReset=!0}})),Object.defineProperty(h,"align",e({},j,{get:function(){return x},set:function(a){var b=d(a);if(!b)throw new SyntaxError("An invalid or illegal string was specified.");x=b,this.hasBeenReset=!0}})),h.displayState=void 0,i?h:void 0}var g="auto",h={"":!0,lr:!0,rl:!0},i={start:!0,middle:!0,end:!0,left:!0,right:!0};f.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)},a.VTTCue=a.VTTCue||f,b.VTTCue=f}(this,this.vttjs||{}),function(a,b){function c(a){if("string"!=typeof a)return!1;var b=f[a.toLowerCase()];return b?a.toLowerCase():!1}function d(a){return"number"==typeof a&&a>=0&&100>=a}function e(){var a=100,b=3,e=0,f=100,g=0,h=100,i="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return a},set:function(b){if(!d(b))throw new Error("Width must be between 0 and 100.");a=b}},lines:{enumerable:!0,get:function(){return b},set:function(a){if("number"!=typeof a)throw new TypeError("Lines must be set to a number.");b=a}},regionAnchorY:{enumerable:!0,get:function(){return f},set:function(a){if(!d(a))throw new Error("RegionAnchorX must be between 0 and 100.");f=a}},regionAnchorX:{enumerable:!0,get:function(){return e},set:function(a){if(!d(a))throw new Error("RegionAnchorY must be between 0 and 100.");e=a}},viewportAnchorY:{enumerable:!0,get:function(){return h},set:function(a){if(!d(a))throw new Error("ViewportAnchorY must be between 0 and 100.");h=a}},viewportAnchorX:{enumerable:!0,get:function(){return g},set:function(a){if(!d(a))throw new Error("ViewportAnchorX must be between 0 and 100.");g=a}},scroll:{enumerable:!0,get:function(){return i},set:function(a){var b=c(a);if(b===!1)throw new SyntaxError("An invalid or illegal string was specified.");i=b}}})}var f={"":!0,up:!0};a.VTTRegion=a.VTTRegion||e,b.VTTRegion=e}(this,this.vttjs||{}),function(a){function b(a,b){this.name="ParsingError",this.code=a.code,this.message=b||a.message}function c(a){function b(a,b,c,d){return 3600*(0|a)+60*(0|b)+(0|c)+(0|d)/1e3}var c=a.match(/^(\d+):(\d{2})(:\d{2})?\.(\d{3})/);return c?c[3]?b(c[1],c[2],c[3].replace(":",""),c[4]):c[1]>59?b(c[1],c[2],0,c[4]):b(0,c[1],c[2],c[4]):null}function d(){this.values=o(null)}function e(a,b,c,d){var e=d?a.split(d):[a];for(var f in e)if("string"==typeof e[f]){var g=e[f].split(c);if(2===g.length){var h=g[0],i=g[1];b(h,i)}}}function f(a,f,g){function h(){var d=c(a);if(null===d)throw new b(b.Errors.BadTimeStamp,"Malformed timestamp: "+k);return a=a.replace(/^[^\sa-zA-Z-]+/,""),d}function i(a,b){var c=new d;e(a,function(a,b){switch(a){case"region":for(var d=g.length-1;d>=0;d--)if(g[d].id===b){c.set(a,g[d].region);break}break;case"vertical":c.alt(a,b,["rl","lr"]);break;case"line":var e=b.split(","),f=e[0];c.integer(a,f),c.percent(a,f)?c.set("snapToLines",!1):null,c.alt(a,f,["auto"]),2===e.length&&c.alt("lineAlign",e[1],["start","middle","end"]);break;case"position":e=b.split(","),c.percent(a,e[0]),2===e.length&&c.alt("positionAlign",e[1],["start","middle","end"]);break;case"size":c.percent(a,b);break;case"align":c.alt(a,b,["start","middle","end","left","right"])}},/:/,/\s/),b.region=c.get("region",null),b.vertical=c.get("vertical",""),b.line=c.get("line","auto"),b.lineAlign=c.get("lineAlign","start"),b.snapToLines=c.get("snapToLines",!0),b.size=c.get("size",100),b.align=c.get("align","middle"),b.position=c.get("position",{start:0,left:0,middle:50,end:100,right:100},b.align),b.positionAlign=c.get("positionAlign",{start:"start",left:"start",middle:"middle",end:"end",right:"end"},b.align)}function j(){a=a.replace(/^\s+/,"")}var k=a;if(j(),f.startTime=h(),j(),"--\x3e"!==a.substr(0,3))throw new b(b.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '--\x3e'): "+k);a=a.substr(3),j(),f.endTime=h(),j(),i(a,f)}function g(a,b){function d(){function a(a){return b=b.substr(a.length),a}if(!b)return null;var c=b.match(/^([^<]*)(<[^>]+>?)?/);return a(c[1]?c[1]:c[2])}function e(a){return p[a]}function f(a){for(;o=a.match(/&(amp|lt|gt|lrm|rlm|nbsp);/);)a=a.replace(o[0],e);return a}function g(a,b){return!s[b.localName]||s[b.localName]===a.localName}function h(b,c){var d=q[b];if(!d)return null;var e=a.document.createElement(d);e.localName=d;var f=r[b];return f&&c&&(e[f]=c.trim()),e}for(var i,j=a.document.createElement("div"),k=j,l=[];null!==(i=d());)if("<"!==i[0])k.appendChild(a.document.createTextNode(f(i)));else{if("/"===i[1]){l.length&&l[l.length-1]===i.substr(2).replace(">","")&&(l.pop(),k=k.parentNode);continue}var m,n=c(i.substr(1,i.length-2));if(n){m=a.document.createProcessingInstruction("timestamp",n),k.appendChild(m);continue}var o=i.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!o)continue;if(m=h(o[1],o[3]),!m)continue;if(!g(k,m))continue;o[2]&&(m.className=o[2].substr(1).replace("."," ")),l.push(o[1]),k.appendChild(m),k=m}return j}function h(a){function b(a,b){for(var c=b.childNodes.length-1;c>=0;c--)a.push(b.childNodes[c])}function c(a){if(!a||!a.length)return null;var d=a.pop(),e=d.textContent||d.innerText;if(e){var f=e.match(/^.*(\n|\r)/);return f?(a.length=0,f[0]):e}return"ruby"===d.tagName?c(a):d.childNodes?(b(a,d),c(a)):void 0}var d,e=[],f="";if(!a||!a.childNodes)return"ltr";for(b(e,a);f=c(e);)for(var g=0;g<f.length;g++){d=f.charCodeAt(g);for(var h=0;h<t.length;h++)if(t[h]===d)return"rtl"}return"ltr"}function i(a){if("number"==typeof a.line&&(a.snapToLines||a.line>=0&&a.line<=100))return a.line;if(!a.track||!a.track.textTrackList||!a.track.textTrackList.mediaElement)return-1;for(var b=a.track,c=b.textTrackList,d=0,e=0;e<c.length&&c[e]!==b;e++)"showing"===c[e].mode&&d++;return-1*++d}function j(){}function k(a,b,c){var d=/MSIE\s8\.0/.test(navigator.userAgent),e="rgba(255, 255, 255, 1)",f="rgba(0, 0, 0, 0.8)";d&&(e="rgb(255, 255, 255)",f="rgb(0, 0, 0)"),j.call(this),this.cue=b,this.cueDiv=g(a,b.text);var i={color:e,backgroundColor:f,position:"relative",left:0,right:0,top:0,bottom:0,display:"inline"};d||(i.writingMode=""===b.vertical?"horizontal-tb":"lr"===b.vertical?"vertical-lr":"vertical-rl",i.unicodeBidi="plaintext"),this.applyStyles(i,this.cueDiv),this.div=a.document.createElement("div"),i={textAlign:"middle"===b.align?"center":b.align,font:c.font,whiteSpace:"pre-line",position:"absolute"},d||(i.direction=h(this.cueDiv),i.writingMode=""===b.vertical?"horizontal-tb":"lr"===b.vertical?"vertical-lr":"vertical-rl".stylesunicodeBidi="plaintext"),this.applyStyles(i),this.div.appendChild(this.cueDiv);var k=0;switch(b.positionAlign){case"start":k=b.position;break;case"middle":k=b.position-b.size/2;break;case"end":k=b.position-b.size}this.applyStyles(""===b.vertical?{left:this.formatStyle(k,"%"),width:this.formatStyle(b.size,"%")}:{top:this.formatStyle(k,"%"),height:this.formatStyle(b.size,"%")}),this.move=function(a){this.applyStyles({top:this.formatStyle(a.top,"px"),bottom:this.formatStyle(a.bottom,"px"),left:this.formatStyle(a.left,"px"),right:this.formatStyle(a.right,"px"),height:this.formatStyle(a.height,"px"),width:this.formatStyle(a.width,"px")})}}function l(a){var b,c,d,e,f=/MSIE\s8\.0/.test(navigator.userAgent);if(a.div){c=a.div.offsetHeight,d=a.div.offsetWidth,e=a.div.offsetTop;var g=(g=a.div.childNodes)&&(g=g[0])&&g.getClientRects&&g.getClientRects();a=a.div.getBoundingClientRect(),b=g?Math.max(g[0]&&g[0].height||0,a.height/g.length):0}this.left=a.left,this.right=a.right,this.top=a.top||e,this.height=a.height||c,this.bottom=a.bottom||e+(a.height||c),this.width=a.width||d,this.lineHeight=void 0!==b?b:a.lineHeight,f&&!this.lineHeight&&(this.lineHeight=13)}function m(a,b,c,d){function e(a,b){for(var e,f=new l(a),g=1,h=0;h<b.length;h++){for(;a.overlapsOppositeAxis(c,b[h])||a.within(c)&&a.overlapsAny(d);)a.move(b[h]);if(a.within(c))return a;var i=a.intersectPercentage(c);g>i&&(e=new l(a),g=i),a=new l(f)}return e||f}var f=new l(b),g=b.cue,h=i(g),j=[];if(g.snapToLines){var k;switch(g.vertical){case"":j=["+y","-y"],k="height";break;case"rl":j=["+x","-x"],k="width";break;case"lr":j=["-x","+x"],k="width"}var m=f.lineHeight,n=m*Math.round(h),o=c[k]+m,p=j[0];Math.abs(n)>o&&(n=0>n?-1:1,n*=Math.ceil(o/m)*m),0>h&&(n+=""===g.vertical?c.height:c.width,j=j.reverse()),f.move(p,n)}else{var q=f.lineHeight/c.height*100;switch(g.lineAlign){case"middle":h-=q/2;break;case"end":h-=q}switch(g.vertical){case"":b.applyStyles({top:b.formatStyle(h,"%")});break;case"rl":b.applyStyles({left:b.formatStyle(h,"%")});break;case"lr":b.applyStyles({right:b.formatStyle(h,"%")})}j=["+y","-x","+x","-y"],f=new l(b)}var r=e(f,j);b.move(r.toCSSCompatValues(c))}function n(){}var o=Object.create||function(){function a(){}return function(b){if(1!==arguments.length)throw new Error("Object.create shim only accepts one parameter.");return a.prototype=b,new a}}();b.prototype=o(Error.prototype),b.prototype.constructor=b,b.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},d.prototype={set:function(a,b){this.get(a)||""===b||(this.values[a]=b)},get:function(a,b,c){return c?this.has(a)?this.values[a]:b[c]:this.has(a)?this.values[a]:b},has:function(a){return a in this.values},alt:function(a,b,c){for(var d=0;d<c.length;++d)if(b===c[d]){this.set(a,b);break}},integer:function(a,b){/^-?\d+$/.test(b)&&this.set(a,parseInt(b,10))},percent:function(a,b){var c;return(c=b.match(/^([\d]{1,3})(\.[\d]*)?%$/))&&(b=parseFloat(b),b>=0&&100>=b)?(this.set(a,b),!0):!1}};var p={"&":"&","<":"<",">":">","‎":"","‏":""," ":" "},q={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},r={v:"title",lang:"lang"},s={rt:"ruby"},t=[1470,1472,1475,1478,1488,1489,1490,1491,1492,1493,1494,1495,1496,1497,1498,1499,1500,1501,1502,1503,1504,1505,1506,1507,1508,1509,1510,1511,1512,1513,1514,1520,1521,1522,1523,1524,1544,1547,1549,1563,1566,1567,1568,1569,1570,1571,1572,1573,1574,1575,1576,1577,1578,1579,1580,1581,1582,1583,1584,1585,1586,1587,1588,1589,1590,1591,1592,1593,1594,1595,1596,1597,1598,1599,1600,1601,1602,1603,1604,1605,1606,1607,1608,1609,1610,1645,1646,1647,1649,1650,1651,1652,1653,1654,1655,1656,1657,1658,1659,1660,1661,1662,1663,1664,1665,1666,1667,1668,1669,1670,1671,1672,1673,1674,1675,1676,1677,1678,1679,1680,1681,1682,1683,1684,1685,1686,1687,1688,1689,1690,1691,1692,1693,1694,1695,1696,1697,1698,1699,1700,1701,1702,1703,1704,1705,1706,1707,1708,1709,1710,1711,1712,1713,1714,1715,1716,1717,1718,1719,1720,1721,1722,1723,1724,1725,1726,1727,1728,1729,1730,1731,1732,1733,1734,1735,1736,1737,1738,1739,1740,1741,1742,1743,1744,1745,1746,1747,1748,1749,1765,1766,1774,1775,1786,1787,1788,1789,1790,1791,1792,1793,1794,1795,1796,1797,1798,1799,1800,1801,1802,1803,1804,1805,1807,1808,1810,1811,1812,1813,1814,1815,1816,1817,1818,1819,1820,1821,1822,1823,1824,1825,1826,1827,1828,1829,1830,1831,1832,1833,1834,1835,1836,1837,1838,1839,1869,1870,1871,1872,1873,1874,1875,1876,1877,1878,1879,1880,1881,1882,1883,1884,1885,1886,1887,1888,1889,1890,1891,1892,1893,1894,1895,1896,1897,1898,1899,1900,1901,1902,1903,1904,1905,1906,1907,1908,1909,1910,1911,1912,1913,1914,1915,1916,1917,1918,1919,1920,1921,1922,1923,1924,1925,1926,1927,1928,1929,1930,1931,1932,1933,1934,1935,1936,1937,1938,1939,1940,1941,1942,1943,1944,1945,1946,1947,1948,1949,1950,1951,1952,1953,1954,1955,1956,1957,1969,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999,2e3,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021,2022,2023,2024,2025,2026,2036,2037,2042,2048,2049,2050,2051,2052,2053,2054,2055,2056,2057,2058,2059,2060,2061,2062,2063,2064,2065,2066,2067,2068,2069,2074,2084,2088,2096,2097,2098,2099,2100,2101,2102,2103,2104,2105,2106,2107,2108,2109,2110,2112,2113,2114,2115,2116,2117,2118,2119,2120,2121,2122,2123,2124,2125,2126,2127,2128,2129,2130,2131,2132,2133,2134,2135,2136,2142,2208,2210,2211,2212,2213,2214,2215,2216,2217,2218,2219,2220,8207,64285,64287,64288,64289,64290,64291,64292,64293,64294,64295,64296,64298,64299,64300,64301,64302,64303,64304,64305,64306,64307,64308,64309,64310,64312,64313,64314,64315,64316,64318,64320,64321,64323,64324,64326,64327,64328,64329,64330,64331,64332,64333,64334,64335,64336,64337,64338,64339,64340,64341,64342,64343,64344,64345,64346,64347,64348,64349,64350,64351,64352,64353,64354,64355,64356,64357,64358,64359,64360,64361,64362,64363,64364,64365,64366,64367,64368,64369,64370,64371,64372,64373,64374,64375,64376,64377,64378,64379,64380,64381,64382,64383,64384,64385,64386,64387,64388,64389,64390,64391,64392,64393,64394,64395,64396,64397,64398,64399,64400,64401,64402,64403,64404,64405,64406,64407,64408,64409,64410,64411,64412,64413,64414,64415,64416,64417,64418,64419,64420,64421,64422,64423,64424,64425,64426,64427,64428,64429,64430,64431,64432,64433,64434,64435,64436,64437,64438,64439,64440,64441,64442,64443,64444,64445,64446,64447,64448,64449,64467,64468,64469,64470,64471,64472,64473,64474,64475,64476,64477,64478,64479,64480,64481,64482,64483,64484,64485,64486,64487,64488,64489,64490,64491,64492,64493,64494,64495,64496,64497,64498,64499,64500,64501,64502,64503,64504,64505,64506,64507,64508,64509,64510,64511,64512,64513,64514,64515,64516,64517,64518,64519,64520,64521,64522,64523,64524,64525,64526,64527,64528,64529,64530,64531,64532,64533,64534,64535,64536,64537,64538,64539,64540,64541,64542,64543,64544,64545,64546,64547,64548,64549,64550,64551,64552,64553,64554,64555,64556,64557,64558,64559,64560,64561,64562,64563,64564,64565,64566,64567,64568,64569,64570,64571,64572,64573,64574,64575,64576,64577,64578,64579,64580,64581,64582,64583,64584,64585,64586,64587,64588,64589,64590,64591,64592,64593,64594,64595,64596,64597,64598,64599,64600,64601,64602,64603,64604,64605,64606,64607,64608,64609,64610,64611,64612,64613,64614,64615,64616,64617,64618,64619,64620,64621,64622,64623,64624,64625,64626,64627,64628,64629,64630,64631,64632,64633,64634,64635,64636,64637,64638,64639,64640,64641,64642,64643,64644,64645,64646,64647,64648,64649,64650,64651,64652,64653,64654,64655,64656,64657,64658,64659,64660,64661,64662,64663,64664,64665,64666,64667,64668,64669,64670,64671,64672,64673,64674,64675,64676,64677,64678,64679,64680,64681,64682,64683,64684,64685,64686,64687,64688,64689,64690,64691,64692,64693,64694,64695,64696,64697,64698,64699,64700,64701,64702,64703,64704,64705,64706,64707,64708,64709,64710,64711,64712,64713,64714,64715,64716,64717,64718,64719,64720,64721,64722,64723,64724,64725,64726,64727,64728,64729,64730,64731,64732,64733,64734,64735,64736,64737,64738,64739,64740,64741,64742,64743,64744,64745,64746,64747,64748,64749,64750,64751,64752,64753,64754,64755,64756,64757,64758,64759,64760,64761,64762,64763,64764,64765,64766,64767,64768,64769,64770,64771,64772,64773,64774,64775,64776,64777,64778,64779,64780,64781,64782,64783,64784,64785,64786,64787,64788,64789,64790,64791,64792,64793,64794,64795,64796,64797,64798,64799,64800,64801,64802,64803,64804,64805,64806,64807,64808,64809,64810,64811,64812,64813,64814,64815,64816,64817,64818,64819,64820,64821,64822,64823,64824,64825,64826,64827,64828,64829,64848,64849,64850,64851,64852,64853,64854,64855,64856,64857,64858,64859,64860,64861,64862,64863,64864,64865,64866,64867,64868,64869,64870,64871,64872,64873,64874,64875,64876,64877,64878,64879,64880,64881,64882,64883,64884,64885,64886,64887,64888,64889,64890,64891,64892,64893,64894,64895,64896,64897,64898,64899,64900,64901,64902,64903,64904,64905,64906,64907,64908,64909,64910,64911,64914,64915,64916,64917,64918,64919,64920,64921,64922,64923,64924,64925,64926,64927,64928,64929,64930,64931,64932,64933,64934,64935,64936,64937,64938,64939,64940,64941,64942,64943,64944,64945,64946,64947,64948,64949,64950,64951,64952,64953,64954,64955,64956,64957,64958,64959,64960,64961,64962,64963,64964,64965,64966,64967,65008,65009,65010,65011,65012,65013,65014,65015,65016,65017,65018,65019,65020,65136,65137,65138,65139,65140,65142,65143,65144,65145,65146,65147,65148,65149,65150,65151,65152,65153,65154,65155,65156,65157,65158,65159,65160,65161,65162,65163,65164,65165,65166,65167,65168,65169,65170,65171,65172,65173,65174,65175,65176,65177,65178,65179,65180,65181,65182,65183,65184,65185,65186,65187,65188,65189,65190,65191,65192,65193,65194,65195,65196,65197,65198,65199,65200,65201,65202,65203,65204,65205,65206,65207,65208,65209,65210,65211,65212,65213,65214,65215,65216,65217,65218,65219,65220,65221,65222,65223,65224,65225,65226,65227,65228,65229,65230,65231,65232,65233,65234,65235,65236,65237,65238,65239,65240,65241,65242,65243,65244,65245,65246,65247,65248,65249,65250,65251,65252,65253,65254,65255,65256,65257,65258,65259,65260,65261,65262,65263,65264,65265,65266,65267,65268,65269,65270,65271,65272,65273,65274,65275,65276,67584,67585,67586,67587,67588,67589,67592,67594,67595,67596,67597,67598,67599,67600,67601,67602,67603,67604,67605,67606,67607,67608,67609,67610,67611,67612,67613,67614,67615,67616,67617,67618,67619,67620,67621,67622,67623,67624,67625,67626,67627,67628,67629,67630,67631,67632,67633,67634,67635,67636,67637,67639,67640,67644,67647,67648,67649,67650,67651,67652,67653,67654,67655,67656,67657,67658,67659,67660,67661,67662,67663,67664,67665,67666,67667,67668,67669,67671,67672,67673,67674,67675,67676,67677,67678,67679,67840,67841,67842,67843,67844,67845,67846,67847,67848,67849,67850,67851,67852,67853,67854,67855,67856,67857,67858,67859,67860,67861,67862,67863,67864,67865,67866,67867,67872,67873,67874,67875,67876,67877,67878,67879,67880,67881,67882,67883,67884,67885,67886,67887,67888,67889,67890,67891,67892,67893,67894,67895,67896,67897,67903,67968,67969,67970,67971,67972,67973,67974,67975,67976,67977,67978,67979,67980,67981,67982,67983,67984,67985,67986,67987,67988,67989,67990,67991,67992,67993,67994,67995,67996,67997,67998,67999,68e3,68001,68002,68003,68004,68005,68006,68007,68008,68009,68010,68011,68012,68013,68014,68015,68016,68017,68018,68019,68020,68021,68022,68023,68030,68031,68096,68112,68113,68114,68115,68117,68118,68119,68121,68122,68123,68124,68125,68126,68127,68128,68129,68130,68131,68132,68133,68134,68135,68136,68137,68138,68139,68140,68141,68142,68143,68144,68145,68146,68147,68160,68161,68162,68163,68164,68165,68166,68167,68176,68177,68178,68179,68180,68181,68182,68183,68184,68192,68193,68194,68195,68196,68197,68198,68199,68200,68201,68202,68203,68204,68205,68206,68207,68208,68209,68210,68211,68212,68213,68214,68215,68216,68217,68218,68219,68220,68221,68222,68223,68352,68353,68354,68355,68356,68357,68358,68359,68360,68361,68362,68363,68364,68365,68366,68367,68368,68369,68370,68371,68372,68373,68374,68375,68376,68377,68378,68379,68380,68381,68382,68383,68384,68385,68386,68387,68388,68389,68390,68391,68392,68393,68394,68395,68396,68397,68398,68399,68400,68401,68402,68403,68404,68405,68416,68417,68418,68419,68420,68421,68422,68423,68424,68425,68426,68427,68428,68429,68430,68431,68432,68433,68434,68435,68436,68437,68440,68441,68442,68443,68444,68445,68446,68447,68448,68449,68450,68451,68452,68453,68454,68455,68456,68457,68458,68459,68460,68461,68462,68463,68464,68465,68466,68472,68473,68474,68475,68476,68477,68478,68479,68608,68609,68610,68611,68612,68613,68614,68615,68616,68617,68618,68619,68620,68621,68622,68623,68624,68625,68626,68627,68628,68629,68630,68631,68632,68633,68634,68635,68636,68637,68638,68639,68640,68641,68642,68643,68644,68645,68646,68647,68648,68649,68650,68651,68652,68653,68654,68655,68656,68657,68658,68659,68660,68661,68662,68663,68664,68665,68666,68667,68668,68669,68670,68671,68672,68673,68674,68675,68676,68677,68678,68679,68680,126464,126465,126466,126467,126469,126470,126471,126472,126473,126474,126475,126476,126477,126478,126479,126480,126481,126482,126483,126484,126485,126486,126487,126488,126489,126490,126491,126492,126493,126494,126495,126497,126498,126500,126503,126505,126506,126507,126508,126509,126510,126511,126512,126513,126514,126516,126517,126518,126519,126521,126523,126530,126535,126537,126539,126541,126542,126543,126545,126546,126548,126551,126553,126555,126557,126559,126561,126562,126564,126567,126568,126569,126570,126572,126573,126574,126575,126576,126577,126578,126580,126581,126582,126583,126585,126586,126587,126588,126590,126592,126593,126594,126595,126596,126597,126598,126599,126600,126601,126603,126604,126605,126606,126607,126608,126609,126610,126611,126612,126613,126614,126615,126616,126617,126618,126619,126625,126626,126627,126629,126630,126631,126632,126633,126635,126636,126637,126638,126639,126640,126641,126642,126643,126644,126645,126646,126647,126648,126649,126650,126651,1114109];j.prototype.applyStyles=function(a,b){b=b||this.div;for(var c in a)a.hasOwnProperty(c)&&(b.style[c]=a[c])},j.prototype.formatStyle=function(a,b){return 0===a?0:a+b},k.prototype=o(j.prototype),k.prototype.constructor=k,l.prototype.move=function(a,b){switch(b=void 0!==b?b:this.lineHeight,a){case"+x":this.left+=b,this.right+=b;break;case"-x":this.left-=b,this.right-=b;break;case"+y":this.top+=b,this.bottom+=b;break;case"-y":this.top-=b,this.bottom-=b}},l.prototype.overlaps=function(a){return this.left<a.right&&this.right>a.left&&this.top<a.bottom&&this.bottom>a.top},l.prototype.overlapsAny=function(a){for(var b=0;b<a.length;b++)if(this.overlaps(a[b]))return!0;return!1},l.prototype.within=function(a){return this.top>=a.top&&this.bottom<=a.bottom&&this.left>=a.left&&this.right<=a.right},l.prototype.overlapsOppositeAxis=function(a,b){switch(b){case"+x":return this.left<a.left;case"-x":return this.right>a.right;case"+y":return this.top<a.top;case"-y":return this.bottom>a.bottom}},l.prototype.intersectPercentage=function(a){var b=Math.max(0,Math.min(this.right,a.right)-Math.max(this.left,a.left)),c=Math.max(0,Math.min(this.bottom,a.bottom)-Math.max(this.top,a.top)),d=b*c;return d/(this.height*this.width)},l.prototype.toCSSCompatValues=function(a){return{top:this.top-a.top,bottom:a.bottom-this.bottom,left:this.left-a.left,right:a.right-this.right,height:this.height,width:this.width}},l.getSimpleBoxPosition=function(a){var b=a.div?a.div.offsetHeight:a.tagName?a.offsetHeight:0,c=a.div?a.div.offsetWidth:a.tagName?a.offsetWidth:0,d=a.div?a.div.offsetTop:a.tagName?a.offsetTop:0;a=a.div?a.div.getBoundingClientRect():a.tagName?a.getBoundingClientRect():a;var e={left:a.left,right:a.right,top:a.top||d,height:a.height||b,bottom:a.bottom||d+(a.height||b),width:a.width||c};return e},n.StringDecoder=function(){return{decode:function(a){if(!a)return"";if("string"!=typeof a)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(a))}}},n.convertCueToDOMTree=function(a,b){return a&&b?g(a,b):null};var u=.05,v="sans-serif",w="1.5%";n.processCues=function(a,b,c){function d(a){for(var b=0;b<a.length;b++)if(a[b].hasBeenReset||!a[b].displayState)return!0;return!1}if(!a||!b||!c)return null;for(;c.firstChild;)c.removeChild(c.firstChild);var e=a.document.createElement("div");if(e.style.position="absolute",e.style.left="0",e.style.right="0",e.style.top="0",e.style.bottom="0",e.style.margin=w,c.appendChild(e),d(b)){var f=[],g=l.getSimpleBoxPosition(e),h=Math.round(g.height*u*100)/100,i={font:h+"px "+v};!function(){for(var c,d,h=0;h<b.length;h++)d=b[h],c=new k(a,d,i),e.appendChild(c.div),m(a,c,g,f),d.displayState=c.div,f.push(l.getSimpleBoxPosition(c))}()}else for(var j=0;j<b.length;j++)e.appendChild(b[j].displayState)},n.Parser=function(a,b,c){c||(c=b,b={}),b||(b={}),this.window=a,this.vttjs=b,this.state="INITIAL",this.buffer="",this.decoder=c||new TextDecoder("utf8"),this.regionList=[]},n.Parser.prototype={reportOrThrowError:function(a){if(!(a instanceof b))throw a;this.onparsingerror&&this.onparsingerror(a)},parse:function(a){function c(){for(var a=i.buffer,b=0;b<a.length&&"\r"!==a[b]&&"\n"!==a[b];)++b;var c=a.substr(0,b);return"\r"===a[b]&&++b,"\n"===a[b]&&++b,i.buffer=a.substr(b),c}function g(a){var b=new d;if(e(a,function(a,c){switch(a){case"id":b.set(a,c);break;case"width":b.percent(a,c);break;case"lines":b.integer(a,c);break;case"regionanchor":case"viewportanchor":var e=c.split(",");if(2!==e.length)break;var f=new d;if(f.percent("x",e[0]),f.percent("y",e[1]),!f.has("x")||!f.has("y"))break;b.set(a+"X",f.get("x")),b.set(a+"Y",f.get("y"));break;case"scroll":b.alt(a,c,["up"])}},/=/,/\s/),b.has("id")){var c=new(i.vttjs.VTTRegion||i.window.VTTRegion);c.width=b.get("width",100),c.lines=b.get("lines",3),c.regionAnchorX=b.get("regionanchorX",0),c.regionAnchorY=b.get("regionanchorY",100),c.viewportAnchorX=b.get("viewportanchorX",0),c.viewportAnchorY=b.get("viewportanchorY",100),c.scroll=b.get("scroll",""),i.onregion&&i.onregion(c),i.regionList.push({id:b.get("id"),region:c})}}function h(a){e(a,function(a,b){switch(a){case"Region":g(b)}},/:/)}var i=this;a&&(i.buffer+=i.decoder.decode(a,{stream:!0}));try{var j;if("INITIAL"===i.state){if(!/\r\n|\n/.test(i.buffer))return this;j=c();var k=j.match(/^WEBVTT([ \t].*)?$/);if(!k||!k[0])throw new b(b.Errors.BadSignature);i.state="HEADER"}for(var l=!1;i.buffer;){if(!/\r\n|\n/.test(i.buffer))return this;switch(l?l=!1:j=c(),i.state){case"HEADER":/:/.test(j)?h(j):j||(i.state="ID");continue;case"NOTE":j||(i.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(j)){i.state="NOTE";break}if(!j)continue;if(i.cue=new(i.vttjs.VTTCue||i.window.VTTCue)(0,0,""),i.state="CUE",-1===j.indexOf("--\x3e")){i.cue.id=j;continue}case"CUE":try{f(j,i.cue,i.regionList)}catch(m){i.reportOrThrowError(m),i.cue=null,i.state="BADCUE";continue}i.state="CUETEXT";continue;case"CUETEXT":var n=-1!==j.indexOf("--\x3e");if(!j||n&&(l=!0)){i.oncue&&i.oncue(i.cue),i.cue=null,i.state="ID";continue}i.cue.text&&(i.cue.text+="\n"),i.cue.text+=j;continue;case"BADCUE":j||(i.state="ID");continue}}}catch(m){i.reportOrThrowError(m),"CUETEXT"===i.state&&i.cue&&i.oncue&&i.oncue(i.cue),i.cue=null,i.state="INITIAL"===i.state?"BADWEBVTT":"BADCUE"}return this},flush:function(){var a=this;try{if(a.buffer+=a.decoder.decode(),(a.cue||"HEADER"===a.state)&&(a.buffer+="\n\n",a.parse()),"INITIAL"===a.state)throw new b(b.Errors.BadSignature)}catch(c){a.reportOrThrowError(c)}return a.onflush&&a.onflush(),this}},a.WebVTT=n}(this,this.vttjs||{});!function(a,t,e,n,m){m=t.location,Math.random()>.01||(a.src="//www.google-analytics.com/__utm.gif?utmwv=5.4.2&utmac=UA-16505296-2&utmn=1&utmhn="+n(m.hostname)+"&utmsr="+t.screen.availWidth+"x"+t.screen.availHeight+"&utmul="+(e.language||e.userLanguage||"").toLowerCase()+"&utmr="+n(m.href)+"&utmp="+n(m.hostname+m.pathname)+"&utmcc=__utma%3D1."+Math.floor(1e10*Math.random())+".1.1.1.1%3B"+"&utme=8(vjsv)9(v4.12.9)")}(new Image,window,navigator,encodeURIComponent);(function($){$.fn.subnav=function(){var luminosity=function(element){var color=$(element).css("color");var colors=color[0]==="#"?hexToRgb(color):color.replace("rgb(","").replace(")","").replace(/\s+/g,"").split(",");return.2126*colors[0]/255+.7152*colors[1]/255+.0722*colors[2]/255};var hexToRgb=function(hex){var shorthandRegex=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,result=null;hex=hex.replace(shorthandRegex,function(m,r,g,b){return r+r+g+g+b+b});result=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);return result?[parseInt(result[1],16),parseInt(result[2],16),parseInt(result[3],16)]:null};this.superfish();this.each(function(){var $ul=$(this).addClass("sf-menu");var $items=$("> li",this);var $subnavs=$("> li > ul",this);var avg_luminosity=0;var children=[];var $first=$($items[0]);var $next=$($items[1]);var is_vertical_menu=$next.length&&Math.abs($first.offset().top-$next.offset().top)>$first.height()/2;var subnav_size=0;var size_func=is_vertical_menu?"width":"height";var direction=is_vertical_menu?"left":"top";if($items.length===0)return;$items.each(function(i,item){var $item=$(item);if($item.css("display")==="inline"){$item.css("display","inline-block")}children=$(this).find("a");if(children.length>0){avg_luminosity+=luminosity(children)}});avg_luminosity/=$items.length;$("ul",$ul).addClass(avg_luminosity>.6?"sf-dark":"sf-light");if(is_vertical_menu){$ul.addClass("sf-vertical");var center=$(window).width()/2;if($ul.offset().left>center)$ul.addClass("sf-right")}$subnavs.each(function(){subnav_size=$(this)[size_func]()>subnav_size?$(this)[size_func]():subnav_size});subnav_size+=$ul[size_func]();$ul.parents().add($ul).each(function(index,p){var $p=$(p);var parent_bottom=$p[size_func]()+$p.offset()[direction];var subnav_bottom=$ul.offset()[direction]+subnav_size;if($p.css("overflow")=="hidden"&&subnav_bottom>parent_bottom){$p.css("overflow","visible").addClass("aclearfix")}})})}})($j);(function($){"use strict";var RSS=function(target,url,options,callback){this.target=target;this.url=url;this.html=[];this.effectQueue=[];this.options=$.extend({ssl:true,host:"jeeves.vivitiapp.com/feedrapp",limit:null,key:null,layoutTemplate:"<ul>{entries}</ul>",entryTemplate:'<li><a href="{url}">[{author}@{date}] {title}</a><br/>{shortBodyPlain}</li>',tokens:{},outputMode:"json",dateFormat:"dddd MMM Do",dateLocale:"en",effect:"show",offsetStart:false,offsetEnd:false,error:function(){console.log("jQuery RSS: url doesn't link to RSS-Feed")},onData:function(){},success:function(){}},options||{});this.callback=callback||this.options.success};RSS.htmlTags=["doctype","html","head","title","base","link","meta","style","script","noscript","body","article","nav","aside","section","header","footer","h1-h6","hgroup","address","p","hr","pre","blockquote","ol","ul","li","dl","dt","dd","figure","figcaption","div","table","caption","thead","tbody","tfoot","tr","th","td","col","colgroup","form","fieldset","legend","label","input","button","select","datalist","optgroup","option","textarea","keygen","output","progress","meter","details","summary","command","menu","del","ins","img","iframe","embed","object","param","video","audio","source","canvas","track","map","area","a","em","strong","i","b","u","s","small","abbr","q","cite","dfn","sub","sup","time","code","kbd","samp","var","mark","bdi","bdo","ruby","rt","rp","span","br","wbr"];RSS.prototype.load=function(callback){var apiProtocol="http"+(this.options.ssl?"s":"");var apiHost=apiProtocol+"://"+this.options.host;var apiUrl=apiHost+"?callback=?&q="+encodeURIComponent(this.url);if(this.options.offsetStart&&this.options.offsetEnd){this.options.limit=this.options.offsetEnd}if(this.options.limit!==null){apiUrl+="&num="+this.options.limit}if(this.options.key!==null){apiUrl+="&key="+this.options.key}$.getJSON(apiUrl,callback)};RSS.prototype.render=function(){var self=this;this.load(function(data){try{self.feed=data.responseData.feed;self.entries=data.responseData.feed.entries}catch(e){self.entries=[];self.feed=null;return self.options.error.call(self)}var html=self.generateHTMLForEntries();self.target.append(html.layout);if(html.entries.length!==0){if($.isFunction(self.options.onData)){self.options.onData.call(self)}var container=$(html.layout).is("entries")?html.layout:$("entries",html.layout);self.appendEntriesAndApplyEffects(container,html.entries)}if(self.effectQueue.length>0){self.executeEffectQueue(self.callback)}else if($.isFunction(self.callback)){self.callback.call(self)}})};RSS.prototype.appendEntriesAndApplyEffects=function(target,entries){var self=this;$.each(entries,function(idx,entry){var $html=self.wrapContent(entry);if(self.options.effect==="show"){target.before($html)}else{$html.css({display:"none"});target.before($html);self.applyEffect($html,self.options.effect)}});target.remove()};RSS.prototype.generateHTMLForEntries=function(){var self=this;var result={entries:[],layout:null};$(this.entries).each(function(){var entry=this;var offsetStart=self.options.offsetStart;var offsetEnd=self.options.offsetEnd;var evaluatedString;if(offsetStart&&offsetEnd){if(index>=offsetStart&&index<=offsetEnd){if(self.isRelevant(entry,result.entries)){evaluatedString=self.evaluateStringForEntry(self.options.entryTemplate,entry);result.entries.push(evaluatedString)}}}else{if(self.isRelevant(entry,result.entries)){evaluatedString=self.evaluateStringForEntry(self.options.entryTemplate,entry);result.entries.push(evaluatedString)}}});if(!!this.options.entryTemplate){result.layout=this.wrapContent(this.options.layoutTemplate.replace("{entries}","<entries></entries>"))}else{result.layout=this.wrapContent("<div><entries></entries></div>")}return result};RSS.prototype.wrapContent=function(content){if($.trim(content).indexOf("<")!==0){return $("<div>"+content+"</div>")}else{return $(content)}};RSS.prototype.applyEffect=function($element,effect,callback){var self=this;switch(effect){case"slide":$element.slideDown("slow",callback);break;case"slideFast":$element.slideDown(callback);break;case"slideSynced":self.effectQueue.push({element:$element,effect:"slide"});break;case"slideFastSynced":self.effectQueue.push({element:$element,effect:"slideFast"});break}};RSS.prototype.executeEffectQueue=function(callback){var self=this;this.effectQueue.reverse();var executeEffectQueueItem=function(){var item=self.effectQueue.pop();if(item){self.applyEffect(item.element,item.effect,executeEffectQueueItem)}else if(callback){callback()}};executeEffectQueueItem()};RSS.prototype.evaluateStringForEntry=function(string,entry){var result=string;var self=this;$(string.match(/(\{.*?\})/g)).each(function(){var token=this.toString();result=result.replace(token,self.getValueForToken(token,entry))});return result};RSS.prototype.isRelevant=function(entry,entries){var tokenMap=this.getTokenMap(entry);if(this.options.filter){if(this.options.filterLimit&&this.options.filterLimit===entries.length){return false}else{return this.options.filter(entry,tokenMap)}}else{return true}};RSS.prototype.getFormattedDate=function(dateString){if(this.options.dateFormatFunction){return this.options.dateFormatFunction(dateString)}else if(typeof moment!=="undefined"){var date=moment(new Date(dateString));if(date.locale){date=date.locale(this.options.dateLocale)}else{date=date.lang(this.options.dateLocale)}return date.format(this.options.dateFormat)}else{return dateString}};RSS.prototype.getTokenMap=function(entry){if(!this.feedTokens){var feed=JSON.parse(JSON.stringify(this.feed));delete feed.entries;this.feedTokens=feed}return $.extend({feed:this.feedTokens,url:entry.link,author:entry.author,date:this.getFormattedDate(entry.publishedDate),title:entry.title,body:entry.content,shortBody:entry.contentSnippet,bodyPlain:function(entry){var result=entry.content.replace(/<script[\\r\\\s\S]*<\/script>/gim,"").replace(/<\/?[^>]+>/gi,"");for(var i=0;i<RSS.htmlTags.length;i++){result=result.replace(new RegExp("<"+RSS.htmlTags[i],"gi"),"")}return result}(entry),shortBodyPlain:entry.contentSnippet.replace(/<\/?[^>]+>/gi,""),index:$.inArray(entry,this.entries),totalEntries:this.entries.length,teaserImage:function(entry){try{return entry.content.match(/(<img.*?>)/gi)[0]}catch(e){return""}}(entry),teaserImageUrl:function(entry){try{return entry.content.match(/(<img.*?>)/gi)[0].match(/src="(.*?)"/)[1]}catch(e){return""}}(entry)},this.options.tokens)};RSS.prototype.getValueForToken=function(_token,entry){var tokenMap=this.getTokenMap(entry);var token=_token.replace(/[\{\}]/g,"");var result=tokenMap[token];if(typeof result!=="undefined"){return typeof result==="function"?result(entry,tokenMap):result}else{throw new Error("Unknown token: "+_token+", url:"+this.url)}};$.fn.rss=function(url,options,callback){new RSS(this,url,options,callback).render();return this}})(jQuery);(function($){var chop=/(\s*\S+|\s)$/;$.truncate=function(html,options){return $("<div></div>").append(html).truncate(options).html()};$.fn.truncate=function(options){if($.isNumeric(options)){options={length:options}}var o=$.extend({},$.truncate.defaults,options);return this.each(function(){var self=$(this);if(o.noBreaks){self.find("br").replaceWith(" ")}var text=self.text();var excess=text.length-o.length;if(o.stripTags){self.text(text)}if(o.words&&excess>0){excess=text.length-text.slice(0,o.length).replace(chop,"").length-1}if(excess<0||!excess&&!o.truncated){return}$.each(self.contents().get().reverse(),function(i,el){var $el=$(el);var text=$el.text();var length=text.length;if(length<=excess){o.truncated=true;excess-=length;$el.remove();return}if(el.nodeType===3){$(el.splitText(length-excess-1)).replaceWith(o.ellipsis);return false}$el.truncate($.extend(o,{length:length-excess}));return false})})};$.truncate.defaults={stripTags:false,words:false,noBreaks:false,length:Infinity,ellipsis:"…"}})(jQuery);!function(t){function e(){var e,i,n={height:d.innerHeight,width:d.innerWidth};return n.height||(e=a.compatMode,(e||!t.support.boxModel)&&(i="CSS1Compat"===e?f:a.body,n={height:i.clientHeight,width:i.clientWidth})),n}function i(){return{top:d.pageYOffset||f.scrollTop||a.body.scrollTop,left:d.pageXOffset||f.scrollLeft||a.body.scrollLeft}}function n(){var n,l=[],a=0;if(t.each(r,function(t,e){var i=e.data.selector,n=e.$element;l.push(i?n.find(i):n)}),n=l.length)for(o=o||e(),h=h||i();n>a;a++)if(t.contains(f,l[a][0])){var d,c,p,s=t(l[a]),u={height:s.height(),width:s.width()},g=s.offset(),v=s.data("inview");if(!h||!o)return;g.top+u.height>h.top&&g.top<h.top+o.height&&g.left+u.width>h.left&&g.left<h.left+o.width?(d=h.left>g.left?"right":h.left+o.width<g.left+u.width?"left":"both",c=h.top>g.top?"bottom":h.top+o.height<g.top+u.height?"top":"both",p=d+"-"+c,v&&v===p||s.data("inview",p).trigger("inview",[!0,d,c])):v&&s.data("inview",!1).trigger("inview",[!1])}}var o,h,l,r={},a=document,d=window,f=a.documentElement,c=t.expando;t.event.special.inview={add:function(e){r[e.guid+"-"+this[c]]={data:e,$element:t(this)},l||t.isEmptyObject(r)||(l=setInterval(n,250))},remove:function(e){try{delete r[e.guid+"-"+this[c]]}catch(i){}t.isEmptyObject(r)&&(clearInterval(l),l=null)}},t(d).bind("scroll resize scrollstop",function(){o=h=null}),!f.addEventListener&&f.attachEvent&&f.attachEvent("onfocusin",function(){h=null})}(jQuery);!function(a){"object"==typeof exports&&exports&&"object"==typeof module&&module&&module.exports===exports?a(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){function b(a){var b=a[0];return b.offsetWidth>0&&b.offsetHeight>0}function c(b){if(b.minTime&&(b.minTime=t(b.minTime)),b.maxTime&&(b.maxTime=t(b.maxTime)),b.durationTime&&"function"!=typeof b.durationTime&&(b.durationTime=t(b.durationTime)),"now"==b.scrollDefault)b.scrollDefault=function(){return b.roundingFunction(t(new Date),b)};else if(b.scrollDefault&&"function"!=typeof b.scrollDefault){var c=b.scrollDefault;b.scrollDefault=function(){return b.roundingFunction(t(c),b)}}else b.minTime&&(b.scrollDefault=function(){return b.roundingFunction(b.minTime,b)});if("string"===a.type(b.timeFormat)&&b.timeFormat.match(/[gh]/)&&(b._twelveHourTime=!0),b.disableTimeRanges.length>0){for(var d in b.disableTimeRanges)b.disableTimeRanges[d]=[t(b.disableTimeRanges[d][0]),t(b.disableTimeRanges[d][1])];b.disableTimeRanges=b.disableTimeRanges.sort(function(a,b){return a[0]-b[0]});for(var d=b.disableTimeRanges.length-1;d>0;d--)b.disableTimeRanges[d][0]<=b.disableTimeRanges[d-1][1]&&(b.disableTimeRanges[d-1]=[Math.min(b.disableTimeRanges[d][0],b.disableTimeRanges[d-1][0]),Math.max(b.disableTimeRanges[d][1],b.disableTimeRanges[d-1][1])],b.disableTimeRanges.splice(d,1))}return b}function d(b){var c=b.data("timepicker-settings"),d=b.data("timepicker-list");if(d&&d.length&&(d.remove(),b.data("timepicker-list",!1)),c.useSelect){d=a("<select />",{class:"ui-timepicker-select"});var g=d}else{d=a("<ul />",{class:"ui-timepicker-list"});var g=a("<div />",{class:"ui-timepicker-wrapper",tabindex:-1});g.css({display:"none",position:"absolute"}).append(d)}if(c.noneOption)if(c.noneOption===!0&&(c.noneOption=c.useSelect?"Time...":"None"),a.isArray(c.noneOption)){for(var h in c.noneOption)if(parseInt(h,10)==h){var j=e(c.noneOption[h],c.useSelect);d.append(j)}}else{var j=e(c.noneOption,c.useSelect);d.append(j)}if(c.className&&g.addClass(c.className),(null!==c.minTime||null!==c.durationTime)&&c.showDuration){{"function"==typeof c.step?"function":c.step}g.addClass("ui-timepicker-with-duration"),g.addClass("ui-timepicker-step-"+c.step)}var l=c.minTime;"function"==typeof c.durationTime?l=t(c.durationTime()):null!==c.durationTime&&(l=c.durationTime);var m=null!==c.minTime?c.minTime:0,o=null!==c.maxTime?c.maxTime:m+v-1;m>o&&(o+=v),o===v-1&&"string"===a.type(c.timeFormat)&&c.show2400&&(o=v);var p=c.disableTimeRanges,u=0,w=p.length,y=c.step;"function"!=typeof y&&(y=function(){return c.step});for(var h=m,z=0;o>=h;z++,h+=60*y(z)){var A=h,B=s(A,c);if(c.useSelect){var C=a("<option />",{value:B});C.text(B)}else{var C=a("<li />");C.data("time",86400>=A?A:A%86400),C.text(B)}if((null!==c.minTime||null!==c.durationTime)&&c.showDuration){var D=r(h-l,c.step);if(c.useSelect)C.text(C.text()+" ("+D+")");else{var E=a("<span />",{class:"ui-timepicker-duration"});E.text(" ("+D+")"),C.append(E)}}w>u&&(A>=p[u][1]&&(u+=1),p[u]&&A>=p[u][0]&&A<p[u][1]&&(c.useSelect?C.prop("disabled",!0):C.addClass("ui-timepicker-disabled"))),d.append(C)}if(g.data("timepicker-input",b),b.data("timepicker-list",g),c.useSelect)b.val()&&d.val(f(t(b.val()),c)),d.on("focus",function(){a(this).data("timepicker-input").trigger("showTimepicker")}),d.on("blur",function(){a(this).data("timepicker-input").trigger("hideTimepicker")}),d.on("change",function(){n(b,a(this).val(),"select")}),n(b,d.val(),"initial"),b.hide().after(d);else{var F=c.appendTo;"string"==typeof F?F=a(F):"function"==typeof F&&(F=F(b)),F.append(g),k(b,d),d.on("mousedown","li",function(){b.off("focus.timepicker"),b.on("focus.timepicker-ie-hack",function(){b.off("focus.timepicker-ie-hack"),b.on("focus.timepicker",x.show)}),i(b)||b[0].focus(),d.find("li").removeClass("ui-timepicker-selected"),a(this).addClass("ui-timepicker-selected"),q(b)&&(b.trigger("hideTimepicker"),d.on("mouseup.timepicker","li",function(){d.off("mouseup.timepicker"),g.hide()}))})}}function e(b,c){var d,e,f;return"object"==typeof b?(d=b.label,e=b.className,f=b.value):"string"==typeof b?d=b:a.error("Invalid noneOption value"),c?a("<option />",{value:f,class:e,text:d}):a("<li />",{class:e,text:d}).data("time",f)}function f(a,b){return a=b.roundingFunction(a,b),null!==a?s(a,b):void 0}function g(){return new Date(1970,1,1,0,0,0)}function h(b){var c=a(b.target),d=c.closest(".ui-timepicker-input");0===d.length&&0===c.closest(".ui-timepicker-wrapper").length&&(x.hide(),a(document).unbind(".ui-timepicker"),a(window).unbind(".ui-timepicker"))}function i(a){var b=a.data("timepicker-settings");return(window.navigator.msMaxTouchPoints||"ontouchstart"in document)&&b.disableTouchKeyboard}function j(b,c,d){if(!d&&0!==d)return!1;var e=b.data("timepicker-settings"),f=!1,d=e.roundingFunction(d,e);return c.find("li").each(function(b,c){var e=a(c);if("number"==typeof e.data("time"))return e.data("time")==d?(f=e,!1):void 0}),f}function k(a,b){b.find("li").removeClass("ui-timepicker-selected");var c=t(m(a),a.data("timepicker-settings"));if(null!==c){var d=j(a,b,c);if(d){var e=d.offset().top-b.offset().top;(e+d.outerHeight()>b.outerHeight()||0>e)&&b.scrollTop(b.scrollTop()+d.position().top-d.outerHeight()),d.addClass("ui-timepicker-selected")}}}function l(b,c){if(""!==this.value&&"timepicker"!=c){var d=a(this);if(!d.is(":focus")||b&&"change"==b.type){var e=d.data("timepicker-settings"),f=t(this.value,e);if(null===f)return void d.trigger("timeFormatError");var g=!1;null!==e.minTime&&f<e.minTime?g=!0:null!==e.maxTime&&f>e.maxTime&&(g=!0),a.each(e.disableTimeRanges,function(){return f>=this[0]&&f<this[1]?(g=!0,!1):void 0}),e.forceRoundTime&&(f=e.roundingFunction(f,e));var h=s(f,e);g?n(d,h,"error")&&d.trigger("timeRangeError"):n(d,h)}}}function m(a){return a.is("input")?a.val():a.data("ui-timepicker-value")}function n(a,b,c){if(a.is("input")){a.val(b);var d=a.data("timepicker-settings");d.useSelect&&"select"!=c&&"initial"!=c&&a.data("timepicker-list").val(f(t(b),d))}return a.data("ui-timepicker-value")!=b?(a.data("ui-timepicker-value",b),"select"==c?a.trigger("selectTime").trigger("changeTime").trigger("change","timepicker"):"error"!=c&&a.trigger("changeTime"),!0):(a.trigger("selectTime"),!1)}function o(c){var d=a(this),e=d.data("timepicker-list");if(!e||!b(e)){if(40!=c.keyCode)return!0;x.show.call(d.get(0)),e=d.data("timepicker-list"),i(d)||d.focus()}switch(c.keyCode){case 13:return q(d)&&x.hide.apply(this),c.preventDefault(),!1;case 38:var f=e.find(".ui-timepicker-selected");return f.length?f.is(":first-child")||(f.removeClass("ui-timepicker-selected"),f.prev().addClass("ui-timepicker-selected"),f.prev().position().top<f.outerHeight()&&e.scrollTop(e.scrollTop()-f.outerHeight())):(e.find("li").each(function(b,c){return a(c).position().top>0?(f=a(c),!1):void 0}),f.addClass("ui-timepicker-selected")),!1;case 40:return f=e.find(".ui-timepicker-selected"),0===f.length?(e.find("li").each(function(b,c){return a(c).position().top>0?(f=a(c),!1):void 0}),f.addClass("ui-timepicker-selected")):f.is(":last-child")||(f.removeClass("ui-timepicker-selected"),f.next().addClass("ui-timepicker-selected"),f.next().position().top+2*f.outerHeight()>e.outerHeight()&&e.scrollTop(e.scrollTop()+f.outerHeight())),!1;case 27:e.find("li").removeClass("ui-timepicker-selected"),x.hide();break;case 9:x.hide();break;default:return!0}}function p(c){var d=a(this),e=d.data("timepicker-list");if(!e||!b(e))return!0;switch(c.keyCode){case 96:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case 65:case 77:case 80:case 186:case 8:case 46:d.data("timepicker-settings").typeaheadHighlight?k(d,e):e.hide()}}function q(a){var b=a.data("timepicker-settings"),c=a.data("timepicker-list"),d=null,e=c.find(".ui-timepicker-selected");return e.hasClass("ui-timepicker-disabled")?!1:(e.length&&(d=e.data("time")),null!==d&&("string"!=typeof d&&(d=s(d,b)),n(a,d,"select")),!0)}function r(a,b){a=Math.abs(a);var c,d,e=Math.round(a/60),f=[];return 60>e?f=[e,w.mins]:(c=Math.floor(e/60),d=e%60,30==b&&30==d&&(c+=w.decimal+5),f.push(c),f.push(1==c?w.hr:w.hrs),30!=b&&d&&(f.push(d),f.push(w.mins))),f.join(" ")}function s(b,c){if(null===b)return null;var d=new Date(u.valueOf()+1e3*b);if(isNaN(d.getTime()))return null;if("function"===a.type(c.timeFormat))return c.timeFormat(d);for(var e,f,g="",h=0;h<c.timeFormat.length;h++)switch(f=c.timeFormat.charAt(h)){case"a":g+=d.getHours()>11?w.pm:w.am;break;case"A":g+=d.getHours()>11?w.PM:w.AM;break;case"g":e=d.getHours()%12,g+=0===e?"12":e;break;case"G":e=d.getHours(),b===v&&(e=24),g+=e;break;case"h":e=d.getHours()%12,0!==e&&10>e&&(e="0"+e),g+=0===e?"12":e;break;case"H":e=d.getHours(),b===v&&(e=24),g+=e>9?e:"0"+e;break;case"i":var i=d.getMinutes();g+=i>9?i:"0"+i;break;case"s":b=d.getSeconds(),g+=b>9?b:"0"+b;break;case"\\":h++,g+=c.timeFormat.charAt(h);break;default:g+=f}return g}function t(a,b){if(""===a)return null;if(!a||a+0==a)return a;if("object"==typeof a)return 3600*a.getHours()+60*a.getMinutes()+a.getSeconds();a=a.toLowerCase().replace(/[\s\.]/g,""),("a"==a.slice(-1)||"p"==a.slice(-1))&&(a+="m");var c="("+w.am.replace(".","")+"|"+w.pm.replace(".","")+"|"+w.AM.replace(".","")+"|"+w.PM.replace(".","")+")?",d=new RegExp("^"+c+"([0-2]?[0-9])\\W?([0-5][0-9])?\\W?([0-5][0-9])?"+c+"$"),e=a.match(d);if(!e)return null;var f=parseInt(1*e[2],10),g=e[1]||e[5],h=f;if(12>=f&&g){var i=g==w.pm||g==w.PM;h=12==f?i?12:0:f+(i?12:0)}var j=1*e[3]||0,k=1*e[4]||0,l=3600*h+60*j+k;if(!g&&b&&b._twelveHourTime&&b.scrollDefault){var m=l-b.scrollDefault();0>m&&m>=v/-2&&(l=(l+v/2)%v)}return l}var u=g(),v=86400,w={am:"am",pm:"pm",AM:"AM",PM:"PM",decimal:".",mins:"mins",hr:"hr",hrs:"hrs"},x={init:function(b){return this.each(function(){var e=a(this),f=[];for(var g in a.fn.timepicker.defaults)e.data(g)&&(f[g]=e.data(g));var h=a.extend({},a.fn.timepicker.defaults,f,b);h.lang&&(w=a.extend(w,h.lang)),h=c(h),e.data("timepicker-settings",h),e.addClass("ui-timepicker-input"),h.useSelect?d(e):(e.prop("autocomplete","off"),e.on("click.timepicker focus.timepicker",x.show),e.on("change.timepicker",l),e.on("keydown.timepicker",o),e.on("keyup.timepicker",p),l.call(e.get(0)))})},show:function(c){var e=a(this),f=e.data("timepicker-settings");if(c){if(!f.showOnFocus)return!0;c.preventDefault()}if(f.useSelect)return void e.data("timepicker-list").focus();i(e)&&e.blur();var g=e.data("timepicker-list");if(!e.prop("readonly")&&(g&&0!==g.length&&"function"!=typeof f.durationTime||(d(e),g=e.data("timepicker-list")),!b(g))){e.data("ui-timepicker-value",e.val()),k(e,g),x.hide(),g.show();var l={};l.left=f.orientation.match(/r/)?e.offset().left+e.outerWidth()-g.outerWidth()+parseInt(g.css("marginLeft").replace("px",""),10):e.offset().left+parseInt(g.css("marginLeft").replace("px",""),10);var n;n=f.orientation.match(/t/)?"t":f.orientation.match(/b/)?"b":e.offset().top+e.outerHeight(!0)+g.outerHeight()>a(window).height()+a(window).scrollTop()?"t":"b","t"==n?(g.addClass("ui-timepicker-positioned-top"),l.top=e.offset().top-g.outerHeight()+parseInt(g.css("marginTop").replace("px",""),10)):(g.removeClass("ui-timepicker-positioned-top"),l.top=e.offset().top+e.outerHeight()+parseInt(g.css("marginTop").replace("px",""),10)),g.offset(l);var o=g.find(".ui-timepicker-selected");if(o.length||(m(e)?o=j(e,g,t(m(e))):f.scrollDefault&&(o=j(e,g,f.scrollDefault()))),o&&o.length){var p=g.scrollTop()+o.position().top-o.outerHeight();g.scrollTop(p)}else g.scrollTop(0);return a(document).on("touchstart.ui-timepicker mousedown.ui-timepicker",h),a(window).on("resize.ui-timepicker",h),f.closeOnWindowScroll&&a(document).on("scroll.ui-timepicker",h),e.trigger("showTimepicker"),this}},hide:function(){var c=a(this),d=c.data("timepicker-settings");return d&&d.useSelect&&c.blur(),a(".ui-timepicker-wrapper").each(function(){var c=a(this);if(b(c)){var d=c.data("timepicker-input"),e=d.data("timepicker-settings");e&&e.selectOnBlur&&q(d),c.hide(),d.trigger("hideTimepicker")}}),this},option:function(b,e){return this.each(function(){var f=a(this),g=f.data("timepicker-settings"),h=f.data("timepicker-list");if("object"==typeof b)g=a.extend(g,b);else if("string"==typeof b&&"undefined"!=typeof e)g[b]=e;else if("string"==typeof b)return g[b];g=c(g),f.data("timepicker-settings",g),h&&(h.remove(),f.data("timepicker-list",!1)),g.useSelect&&d(f)})},getSecondsFromMidnight:function(){return t(m(this))},getTime:function(a){var b=this,c=m(b);if(!c)return null;var d=t(c);if(null===d)return null;a||(a=new Date);var e=new Date(a);return e.setHours(d/3600),e.setMinutes(d%3600/60),e.setSeconds(d%60),e.setMilliseconds(0),e},setTime:function(a){var b=this,c=b.data("timepicker-settings");if(c.forceRoundTime)var d=f(t(a),c);else var d=s(t(a),c);return a&&null===d&&c.noneOption&&(d=a),n(b,d),b.data("timepicker-list")&&k(b,b.data("timepicker-list")),this},remove:function(){var a=this;if(a.hasClass("ui-timepicker-input")){var b=a.data("timepicker-settings");return a.removeAttr("autocomplete","off"),a.removeClass("ui-timepicker-input"),a.removeData("timepicker-settings"),a.off(".timepicker"),a.data("timepicker-list")&&a.data("timepicker-list").remove(),b.useSelect&&a.show(),a.removeData("timepicker-list"),this}}};a.fn.timepicker=function(b){return this.length?x[b]?this.hasClass("ui-timepicker-input")?x[b].apply(this,Array.prototype.slice.call(arguments,1)):this:"object"!=typeof b&&b?void a.error("Method "+b+" does not exist on jQuery.timepicker"):x.init.apply(this,arguments):this},a.fn.timepicker.defaults={className:null,minTime:null,maxTime:null,durationTime:null,step:30,showDuration:!1,showOnFocus:!0,timeFormat:"g:ia",scrollDefault:null,selectOnBlur:!1,disableTouchKeyboard:!1,forceRoundTime:!1,roundingFunction:function(a,b){if(null===a)return null;var c=a%(60*b.step);return c>=30*b.step?a+=60*b.step-c:a-=c,a},appendTo:"body",orientation:"l",disableTimeRanges:[],closeOnWindowScroll:!1,typeaheadHighlight:!0,noneOption:!1,show2400:!1}});(function($){var apiParams={set:{colors:1,values:1,backgroundColor:1,scaleColors:1,normalizeFunction:1,focus:1},get:{selectedRegions:1,selectedMarkers:1,mapObject:1,regionName:1}};$.fn.vectorMap=function(options){var map,methodName,map=this.children(".jvectormap-container").data("mapObject");if(options==="addMap"){jvm.Map.maps[arguments[1]]=arguments[2]}else if((options==="set"||options==="get")&&apiParams[options][arguments[1]]){methodName=arguments[1].charAt(0).toUpperCase()+arguments[1].substr(1);return map[options+methodName].apply(map,Array.prototype.slice.call(arguments,2))}else{options=options||{};options.container=this;map=new jvm.Map(options)}return this}})($j);(function(factory){if(typeof define==="function"&&define.amd){define(["jquery"],factory)}else if(typeof exports==="object"){module.exports=factory}else{factory($j)}})(function($){var toFix=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],toBind="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],slice=Array.prototype.slice,nullLowestDeltaTimeout,lowestDelta;if($.event.fixHooks){for(var i=toFix.length;i;){$.event.fixHooks[toFix[--i]]=$.event.mouseHooks}}var special=$.event.special.mousewheel={version:"3.1.9",setup:function(){if(this.addEventListener){for(var i=toBind.length;i;){this.addEventListener(toBind[--i],handler,false)}}else{this.onmousewheel=handler}$.data(this,"mousewheel-line-height",special.getLineHeight(this));$.data(this,"mousewheel-page-height",special.getPageHeight(this))},teardown:function(){if(this.removeEventListener){for(var i=toBind.length;i;){this.removeEventListener(toBind[--i],handler,false)}}else{this.onmousewheel=null}},getLineHeight:function(elem){return parseInt($(elem)["offsetParent"in $.fn?"offsetParent":"parent"]().css("fontSize"),10)},getPageHeight:function(elem){return $(elem).height()},settings:{adjustOldDeltas:true}};$.fn.extend({mousewheel:function(fn){return fn?this.bind("mousewheel",fn):this.trigger("mousewheel")},unmousewheel:function(fn){return this.unbind("mousewheel",fn)}});function handler(event){var orgEvent=event||window.event,args=slice.call(arguments,1),delta=0,deltaX=0,deltaY=0,absDelta=0;event=$.event.fix(orgEvent);event.type="mousewheel";if("detail"in orgEvent){deltaY=orgEvent.detail*-1}if("wheelDelta"in orgEvent){deltaY=orgEvent.wheelDelta}if("wheelDeltaY"in orgEvent){deltaY=orgEvent.wheelDeltaY}if("wheelDeltaX"in orgEvent){deltaX=orgEvent.wheelDeltaX*-1}if("axis"in orgEvent&&orgEvent.axis===orgEvent.HORIZONTAL_AXIS){deltaX=deltaY*-1;deltaY=0}delta=deltaY===0?deltaX:deltaY;if("deltaY"in orgEvent){deltaY=orgEvent.deltaY*-1;delta=deltaY}if("deltaX"in orgEvent){deltaX=orgEvent.deltaX;if(deltaY===0){delta=deltaX*-1}}if(deltaY===0&&deltaX===0){return}if(orgEvent.deltaMode===1){var lineHeight=$.data(this,"mousewheel-line-height");delta*=lineHeight;deltaY*=lineHeight;deltaX*=lineHeight}else if(orgEvent.deltaMode===2){var pageHeight=$.data(this,"mousewheel-page-height");delta*=pageHeight;deltaY*=pageHeight;deltaX*=pageHeight}absDelta=Math.max(Math.abs(deltaY),Math.abs(deltaX));if(!lowestDelta||absDelta<lowestDelta){lowestDelta=absDelta;if(shouldAdjustOldDeltas(orgEvent,absDelta)){lowestDelta/=40}}if(shouldAdjustOldDeltas(orgEvent,absDelta)){delta/=40;deltaX/=40;deltaY/=40}delta=Math[delta>=1?"floor":"ceil"](delta/lowestDelta);deltaX=Math[deltaX>=1?"floor":"ceil"](deltaX/lowestDelta);deltaY=Math[deltaY>=1?"floor":"ceil"](deltaY/lowestDelta);event.deltaX=deltaX;event.deltaY=deltaY;event.deltaFactor=lowestDelta;event.deltaMode=0;args.unshift(event,delta,deltaX,deltaY);if(nullLowestDeltaTimeout){clearTimeout(nullLowestDeltaTimeout)}nullLowestDeltaTimeout=setTimeout(nullLowestDelta,200);return($.event.dispatch||$.event.handle).apply(this,args)}function nullLowestDelta(){lowestDelta=null}function shouldAdjustOldDeltas(orgEvent,absDelta){return special.settings.adjustOldDeltas&&orgEvent.type==="mousewheel"&&absDelta%120===0}});var jvm={inherits:function(child,parent){function temp(){}temp.prototype=parent.prototype;child.prototype=new temp;child.prototype.constructor=child;child.parentClass=parent},mixin:function(target,source){var prop;for(prop in source.prototype){if(source.prototype.hasOwnProperty(prop)){target.prototype[prop]=source.prototype[prop]}}},min:function(values){var min=Number.MAX_VALUE,i;if(values instanceof Array){for(i=0;i<values.length;i++){if(values[i]<min){min=values[i]}}}else{for(i in values){if(values[i]<min){min=values[i]}}}return min},max:function(values){var max=Number.MIN_VALUE,i;if(values instanceof Array){for(i=0;i<values.length;i++){if(values[i]>max){max=values[i]}}}else{for(i in values){if(values[i]>max){max=values[i]}}}return max},keys:function(object){var keys=[],key;for(key in object){keys.push(key)}return keys},values:function(object){var values=[],key,i;for(i=0;i<arguments.length;i++){object=arguments[i];for(key in object){values.push(object[key])}}return values},whenImageLoaded:function(url){var deferred=new jvm.$.Deferred,img=jvm.$("<img/>");img.error(function(){deferred.reject()}).load(function(){deferred.resolve(img)});img.attr("src",url);return deferred},isImageUrl:function(s){return/\.\w{3,4}$/.test(s)}};jvm.$=$j;if(!Array.prototype.indexOf){Array.prototype.indexOf=function(searchElement,fromIndex){var k;if(this==null){throw new TypeError('"this" is null or not defined')}var O=Object(this);var len=O.length>>>0;if(len===0){return-1}var n=+fromIndex||0;if(Math.abs(n)===Infinity){n=0}if(n>=len){return-1}k=Math.max(n>=0?n:len-Math.abs(n),0);while(k<len){if(k in O&&O[k]===searchElement){return k}k++}return-1}}jvm.AbstractElement=function(name,config){this.node=this.createElement(name);this.name=name;this.properties={};if(config){this.set(config)}};jvm.AbstractElement.prototype.set=function(property,value){var key;if(typeof property==="object"){for(key in property){this.properties[key]=property[key];this.applyAttr(key,property[key])}}else{this.properties[property]=value;this.applyAttr(property,value)}};jvm.AbstractElement.prototype.get=function(property){return this.properties[property]};jvm.AbstractElement.prototype.applyAttr=function(property,value){this.node.setAttribute(property,value)};jvm.AbstractElement.prototype.remove=function(){jvm.$(this.node).remove()};jvm.AbstractCanvasElement=function(container,width,height){this.container=container;this.setSize(width,height);this.rootElement=new jvm[this.classPrefix+"GroupElement"];this.node.appendChild(this.rootElement.node);this.container.appendChild(this.node)};jvm.AbstractCanvasElement.prototype.add=function(element,group){group=group||this.rootElement;group.add(element);element.canvas=this};jvm.AbstractCanvasElement.prototype.addPath=function(config,style,group){var el=new jvm[this.classPrefix+"PathElement"](config,style);this.add(el,group);return el};jvm.AbstractCanvasElement.prototype.addCircle=function(config,style,group){var el=new jvm[this.classPrefix+"CircleElement"](config,style);this.add(el,group);return el};jvm.AbstractCanvasElement.prototype.addImage=function(config,style,group){var el=new jvm[this.classPrefix+"ImageElement"](config,style);this.add(el,group);return el};jvm.AbstractCanvasElement.prototype.addText=function(config,style,group){var el=new jvm[this.classPrefix+"TextElement"](config,style);this.add(el,group);return el};jvm.AbstractCanvasElement.prototype.addGroup=function(parentGroup){var el=new jvm[this.classPrefix+"GroupElement"];if(parentGroup){parentGroup.node.appendChild(el.node)}else{this.node.appendChild(el.node)}el.canvas=this;return el};jvm.AbstractShapeElement=function(name,config,style){this.style=style||{};this.style.current=this.style.current||{};this.isHovered=false;this.isSelected=false;this.updateStyle()};jvm.AbstractShapeElement.prototype.setStyle=function(property,value){var styles={};if(typeof property==="object"){styles=property}else{styles[property]=value}jvm.$.extend(this.style.current,styles);this.updateStyle()};jvm.AbstractShapeElement.prototype.updateStyle=function(){var attrs={};jvm.AbstractShapeElement.mergeStyles(attrs,this.style.initial);jvm.AbstractShapeElement.mergeStyles(attrs,this.style.current);if(this.isHovered){jvm.AbstractShapeElement.mergeStyles(attrs,this.style.hover)}if(this.isSelected){jvm.AbstractShapeElement.mergeStyles(attrs,this.style.selected);if(this.isHovered){jvm.AbstractShapeElement.mergeStyles(attrs,this.style.selectedHover)}}this.set(attrs)};jvm.AbstractShapeElement.mergeStyles=function(styles,newStyles){var key;newStyles=newStyles||{};for(key in newStyles){if(newStyles[key]===null){delete styles[key]}else{styles[key]=newStyles[key]}}};jvm.SVGElement=function(name,config){jvm.SVGElement.parentClass.apply(this,arguments)};jvm.inherits(jvm.SVGElement,jvm.AbstractElement);jvm.SVGElement.svgns="http://www.w3.org/2000/svg";jvm.SVGElement.prototype.createElement=function(tagName){return document.createElementNS(jvm.SVGElement.svgns,tagName)};jvm.SVGElement.prototype.addClass=function(className){this.node.setAttribute("class",className)};jvm.SVGElement.prototype.getElementCtr=function(ctr){return jvm["SVG"+ctr]};jvm.SVGElement.prototype.getBBox=function(){return this.node.getBBox()};jvm.SVGGroupElement=function(){jvm.SVGGroupElement.parentClass.call(this,"g")};jvm.inherits(jvm.SVGGroupElement,jvm.SVGElement);jvm.SVGGroupElement.prototype.add=function(element){this.node.appendChild(element.node)};jvm.SVGCanvasElement=function(container,width,height){this.classPrefix="SVG";jvm.SVGCanvasElement.parentClass.call(this,"svg");this.defsElement=new jvm.SVGElement("defs");this.node.appendChild(this.defsElement.node);jvm.AbstractCanvasElement.apply(this,arguments)};jvm.inherits(jvm.SVGCanvasElement,jvm.SVGElement);jvm.mixin(jvm.SVGCanvasElement,jvm.AbstractCanvasElement);jvm.SVGCanvasElement.prototype.setSize=function(width,height){this.width=width;this.height=height;this.node.setAttribute("width",width);this.node.setAttribute("height",height)};jvm.SVGCanvasElement.prototype.applyTransformParams=function(scale,transX,transY){this.scale=scale;this.transX=transX;this.transY=transY;this.rootElement.node.setAttribute("transform","scale("+scale+") translate("+transX+", "+transY+")")};jvm.SVGShapeElement=function(name,config,style){jvm.SVGShapeElement.parentClass.call(this,name,config);jvm.AbstractShapeElement.apply(this,arguments)};jvm.inherits(jvm.SVGShapeElement,jvm.SVGElement);jvm.mixin(jvm.SVGShapeElement,jvm.AbstractShapeElement);jvm.SVGShapeElement.prototype.applyAttr=function(attr,value){var patternEl,imageEl,that=this;if(attr==="fill"&&jvm.isImageUrl(value)){if(!jvm.SVGShapeElement.images[value]){jvm.whenImageLoaded(value).then(function(img){imageEl=new jvm.SVGElement("image");imageEl.node.setAttributeNS("http://www.w3.org/1999/xlink","href",value);imageEl.applyAttr("x","0");imageEl.applyAttr("y","0");imageEl.applyAttr("width",img[0].width);imageEl.applyAttr("height",img[0].height);patternEl=new jvm.SVGElement("pattern");patternEl.applyAttr("id","image"+jvm.SVGShapeElement.imageCounter);patternEl.applyAttr("x",0);patternEl.applyAttr("y",0);patternEl.applyAttr("width",img[0].width/2);patternEl.applyAttr("height",img[0].height/2);patternEl.applyAttr("viewBox","0 0 "+img[0].width+" "+img[0].height);patternEl.applyAttr("patternUnits","userSpaceOnUse");patternEl.node.appendChild(imageEl.node);that.canvas.defsElement.node.appendChild(patternEl.node);jvm.SVGShapeElement.images[value]=jvm.SVGShapeElement.imageCounter++;that.applyAttr("fill","url(#image"+jvm.SVGShapeElement.images[value]+")")})}else{this.applyAttr("fill","url(#image"+jvm.SVGShapeElement.images[value]+")")}}else{jvm.SVGShapeElement.parentClass.prototype.applyAttr.apply(this,arguments)}};jvm.SVGShapeElement.imageCounter=1;jvm.SVGShapeElement.images={};jvm.SVGPathElement=function(config,style){jvm.SVGPathElement.parentClass.call(this,"path",config,style);this.node.setAttribute("fill-rule","evenodd")};jvm.inherits(jvm.SVGPathElement,jvm.SVGShapeElement);jvm.SVGCircleElement=function(config,style){jvm.SVGCircleElement.parentClass.call(this,"circle",config,style)};jvm.inherits(jvm.SVGCircleElement,jvm.SVGShapeElement);jvm.SVGImageElement=function(config,style){jvm.SVGImageElement.parentClass.call(this,"image",config,style)};jvm.inherits(jvm.SVGImageElement,jvm.SVGShapeElement);jvm.SVGImageElement.prototype.applyAttr=function(attr,value){var that=this;if(attr=="image"){jvm.whenImageLoaded(value).then(function(img){that.node.setAttributeNS("http://www.w3.org/1999/xlink","href",value);that.width=img[0].width;that.height=img[0].height;that.applyAttr("width",that.width);that.applyAttr("height",that.height);that.applyAttr("x",that.cx-that.width/2);that.applyAttr("y",that.cy-that.height/2);jvm.$(that.node).trigger("imageloaded",[img])})}else if(attr=="cx"){this.cx=value;if(this.width){this.applyAttr("x",value-this.width/2)}}else if(attr=="cy"){this.cy=value;if(this.height){this.applyAttr("y",value-this.height/2)}}else{jvm.SVGImageElement.parentClass.prototype.applyAttr.apply(this,arguments)}};jvm.SVGTextElement=function(config,style){jvm.SVGTextElement.parentClass.call(this,"text",config,style)};jvm.inherits(jvm.SVGTextElement,jvm.SVGShapeElement);jvm.SVGTextElement.prototype.applyAttr=function(attr,value){if(attr==="text"){this.node.textContent=value}else{jvm.SVGTextElement.parentClass.prototype.applyAttr.apply(this,arguments)}};jvm.VMLElement=function(name,config){if(!jvm.VMLElement.VMLInitialized){jvm.VMLElement.initializeVML()}jvm.VMLElement.parentClass.apply(this,arguments)};jvm.inherits(jvm.VMLElement,jvm.AbstractElement);jvm.VMLElement.VMLInitialized=false;jvm.VMLElement.initializeVML=function(){try{if(!document.namespaces.rvml){document.namespaces.add("rvml","urn:schemas-microsoft-com:vml")}jvm.VMLElement.prototype.createElement=function(tagName){return document.createElement("<rvml:"+tagName+' class="rvml">')}}catch(e){jvm.VMLElement.prototype.createElement=function(tagName){return document.createElement("<"+tagName+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}document.createStyleSheet().addRule(".rvml","behavior:url(#default#VML)");jvm.VMLElement.VMLInitialized=true};jvm.VMLElement.prototype.getElementCtr=function(ctr){return jvm["VML"+ctr]};jvm.VMLElement.prototype.addClass=function(className){jvm.$(this.node).addClass(className)};jvm.VMLElement.prototype.applyAttr=function(attr,value){this.node[attr]=value};jvm.VMLElement.prototype.getBBox=function(){var node=jvm.$(this.node);return{x:node.position().left/this.canvas.scale,y:node.position().top/this.canvas.scale,width:node.width()/this.canvas.scale,height:node.height()/this.canvas.scale}};jvm.VMLGroupElement=function(){jvm.VMLGroupElement.parentClass.call(this,"group");this.node.style.left="0px";this.node.style.top="0px";this.node.coordorigin="0 0"};jvm.inherits(jvm.VMLGroupElement,jvm.VMLElement);jvm.VMLGroupElement.prototype.add=function(element){this.node.appendChild(element.node)};jvm.VMLCanvasElement=function(container,width,height){this.classPrefix="VML";jvm.VMLCanvasElement.parentClass.call(this,"group");jvm.AbstractCanvasElement.apply(this,arguments);this.node.style.position="absolute"};jvm.inherits(jvm.VMLCanvasElement,jvm.VMLElement);jvm.mixin(jvm.VMLCanvasElement,jvm.AbstractCanvasElement);jvm.VMLCanvasElement.prototype.setSize=function(width,height){var paths,groups,i,l;this.width=width;this.height=height;this.node.style.width=width+"px";this.node.style.height=height+"px";this.node.coordsize=width+" "+height;this.node.coordorigin="0 0";if(this.rootElement){paths=this.rootElement.node.getElementsByTagName("shape");for(i=0,l=paths.length;i<l;i++){paths[i].coordsize=width+" "+height;paths[i].style.width=width+"px";paths[i].style.height=height+"px"}groups=this.node.getElementsByTagName("group");for(i=0,l=groups.length;i<l;i++){groups[i].coordsize=width+" "+height;groups[i].style.width=width+"px";groups[i].style.height=height+"px"}}};jvm.VMLCanvasElement.prototype.applyTransformParams=function(scale,transX,transY){this.scale=scale;this.transX=transX;this.transY=transY;this.rootElement.node.coordorigin=this.width-transX-this.width/100+","+(this.height-transY-this.height/100);this.rootElement.node.coordsize=this.width/scale+","+this.height/scale};jvm.VMLShapeElement=function(name,config){jvm.VMLShapeElement.parentClass.call(this,name,config);this.fillElement=new jvm.VMLElement("fill");this.strokeElement=new jvm.VMLElement("stroke");this.node.appendChild(this.fillElement.node);this.node.appendChild(this.strokeElement.node);this.node.stroked=false;jvm.AbstractShapeElement.apply(this,arguments)};jvm.inherits(jvm.VMLShapeElement,jvm.VMLElement);jvm.mixin(jvm.VMLShapeElement,jvm.AbstractShapeElement);jvm.VMLShapeElement.prototype.applyAttr=function(attr,value){switch(attr){case"fill":this.node.fillcolor=value;break;case"fill-opacity":this.fillElement.node.opacity=Math.round(value*100)+"%";break;case"stroke":if(value==="none"){this.node.stroked=false}else{this.node.stroked=true}this.node.strokecolor=value;break;case"stroke-opacity":this.strokeElement.node.opacity=Math.round(value*100)+"%";break;case"stroke-width":if(parseInt(value,10)===0){this.node.stroked=false}else{this.node.stroked=true}this.node.strokeweight=value;break;case"d":this.node.path=jvm.VMLPathElement.pathSvgToVml(value);break;default:jvm.VMLShapeElement.parentClass.prototype.applyAttr.apply(this,arguments)}};jvm.VMLPathElement=function(config,style){var scale=new jvm.VMLElement("skew");jvm.VMLPathElement.parentClass.call(this,"shape",config,style);this.node.coordorigin="0 0";scale.node.on=true;scale.node.matrix="0.01,0,0,0.01,0,0";scale.node.offset="0,0";this.node.appendChild(scale.node)};jvm.inherits(jvm.VMLPathElement,jvm.VMLShapeElement);jvm.VMLPathElement.prototype.applyAttr=function(attr,value){if(attr==="d"){this.node.path=jvm.VMLPathElement.pathSvgToVml(value)}else{jvm.VMLShapeElement.prototype.applyAttr.call(this,attr,value)}};jvm.VMLPathElement.pathSvgToVml=function(path){var cx=0,cy=0,ctrlx,ctrly;path=path.replace(/(-?\d+)e(-?\d+)/g,"0");return path.replace(/([MmLlHhVvCcSs])\s*((?:-?\d*(?:\.\d+)?\s*,?\s*)+)/g,function(segment,letter,coords,index){coords=coords.replace(/(\d)-/g,"$1,-").replace(/^\s+/g,"").replace(/\s+$/g,"").replace(/\s+/g,",").split(",");if(!coords[0])coords.shift();for(var i=0,l=coords.length;i<l;i++){coords[i]=Math.round(100*coords[i])}switch(letter){case"m":cx+=coords[0];cy+=coords[1];return"t"+coords.join(",");case"M":cx=coords[0];cy=coords[1];return"m"+coords.join(",");case"l":cx+=coords[0];cy+=coords[1];return"r"+coords.join(",");case"L":cx=coords[0];cy=coords[1];return"l"+coords.join(",");case"h":cx+=coords[0];return"r"+coords[0]+",0";case"H":cx=coords[0];return"l"+cx+","+cy;case"v":cy+=coords[0];return"r0,"+coords[0];case"V":cy=coords[0];return"l"+cx+","+cy;case"c":ctrlx=cx+coords[coords.length-4];ctrly=cy+coords[coords.length-3];cx+=coords[coords.length-2];cy+=coords[coords.length-1];return"v"+coords.join(",");case"C":ctrlx=coords[coords.length-4];ctrly=coords[coords.length-3];cx=coords[coords.length-2];cy=coords[coords.length-1];return"c"+coords.join(",");case"s":coords.unshift(cy-ctrly);coords.unshift(cx-ctrlx);ctrlx=cx+coords[coords.length-4];ctrly=cy+coords[coords.length-3];cx+=coords[coords.length-2];cy+=coords[coords.length-1];return"v"+coords.join(",");case"S":coords.unshift(cy+cy-ctrly);coords.unshift(cx+cx-ctrlx);ctrlx=coords[coords.length-4];ctrly=coords[coords.length-3];cx=coords[coords.length-2];cy=coords[coords.length-1];return"c"+coords.join(",")}return""}).replace(/z/g,"e")};jvm.VMLCircleElement=function(config,style){jvm.VMLCircleElement.parentClass.call(this,"oval",config,style)};jvm.inherits(jvm.VMLCircleElement,jvm.VMLShapeElement);jvm.VMLCircleElement.prototype.applyAttr=function(attr,value){switch(attr){case"r":this.node.style.width=value*2+"px";this.node.style.height=value*2+"px";this.applyAttr("cx",this.get("cx")||0);this.applyAttr("cy",this.get("cy")||0);break;case"cx":if(!value)return;this.node.style.left=value-(this.get("r")||0)+"px";break;case"cy":if(!value)return;this.node.style.top=value-(this.get("r")||0)+"px";break;default:jvm.VMLCircleElement.parentClass.prototype.applyAttr.call(this,attr,value)}};jvm.VectorCanvas=function(container,width,height){this.mode=window.SVGAngle?"svg":"vml";if(this.mode=="svg"){this.impl=new jvm.SVGCanvasElement(container,width,height)}else{this.impl=new jvm.VMLCanvasElement(container,width,height)}this.impl.mode=this.mode;return this.impl};jvm.SimpleScale=function(scale){this.scale=scale};jvm.SimpleScale.prototype.getValue=function(value){return value};jvm.OrdinalScale=function(scale){this.scale=scale};jvm.OrdinalScale.prototype.getValue=function(value){return this.scale[value]};jvm.OrdinalScale.prototype.getTicks=function(){var ticks=[],key;for(key in this.scale){ticks.push({label:key,value:this.scale[key]})}return ticks};jvm.NumericScale=function(scale,normalizeFunction,minValue,maxValue){this.scale=[];normalizeFunction=normalizeFunction||"linear";if(scale)this.setScale(scale);if(normalizeFunction)this.setNormalizeFunction(normalizeFunction);if(typeof minValue!=="undefined")this.setMin(minValue);if(typeof maxValue!=="undefined")this.setMax(maxValue)};jvm.NumericScale.prototype={setMin:function(min){this.clearMinValue=min;if(typeof this.normalize==="function"){this.minValue=this.normalize(min)}else{this.minValue=min}},setMax:function(max){this.clearMaxValue=max;if(typeof this.normalize==="function"){this.maxValue=this.normalize(max)}else{this.maxValue=max}},setScale:function(scale){var i;this.scale=[];for(i=0;i<scale.length;i++){this.scale[i]=[scale[i]]}},setNormalizeFunction:function(f){if(f==="polynomial"){this.normalize=function(value){return Math.pow(value,.2)}}else if(f==="linear"){delete this.normalize}else{this.normalize=f}this.setMin(this.clearMinValue);this.setMax(this.clearMaxValue)},getValue:function(value){var lengthes=[],fullLength=0,l,i=0,c;if(typeof this.normalize==="function"){value=this.normalize(value)}for(i=0;i<this.scale.length-1;i++){l=this.vectorLength(this.vectorSubtract(this.scale[i+1],this.scale[i]));lengthes.push(l);fullLength+=l}c=(this.maxValue-this.minValue)/fullLength;for(i=0;i<lengthes.length;i++){lengthes[i]*=c}i=0;value-=this.minValue;while(value-lengthes[i]>=0){value-=lengthes[i];i++}if(i==this.scale.length-1){value=this.vectorToNum(this.scale[i])}else{value=this.vectorToNum(this.vectorAdd(this.scale[i],this.vectorMult(this.vectorSubtract(this.scale[i+1],this.scale[i]),value/lengthes[i])))}return value},vectorToNum:function(vector){var num=0,i;for(i=0;i<vector.length;i++){num+=Math.round(vector[i])*Math.pow(256,vector.length-i-1)}return num},vectorSubtract:function(vector1,vector2){var vector=[],i;for(i=0;i<vector1.length;i++){vector[i]=vector1[i]-vector2[i]}return vector},vectorAdd:function(vector1,vector2){var vector=[],i;for(i=0;i<vector1.length;i++){vector[i]=vector1[i]+vector2[i]}return vector},vectorMult:function(vector,num){var result=[],i;for(i=0;i<vector.length;i++){result[i]=vector[i]*num}return result},vectorLength:function(vector){var result=0,i;for(i=0;i<vector.length;i++){result+=vector[i]*vector[i]}return Math.sqrt(result)},getTicks:function(){var m=5,extent=[this.clearMinValue,this.clearMaxValue],span=extent[1]-extent[0],step=Math.pow(10,Math.floor(Math.log(span/m)/Math.LN10)),err=m/span*step,ticks=[],tick,v;if(err<=.15)step*=10;else if(err<=.35)step*=5;else if(err<=.75)step*=2;extent[0]=Math.floor(extent[0]/step)*step;extent[1]=Math.ceil(extent[1]/step)*step;tick=extent[0];while(tick<=extent[1]){if(tick==extent[0]){v=this.clearMinValue}else if(tick==extent[1]){v=this.clearMaxValue}else{v=tick}ticks.push({label:tick,value:this.getValue(v)});tick+=step}return ticks}};jvm.ColorScale=function(colors,normalizeFunction,minValue,maxValue){jvm.ColorScale.parentClass.apply(this,arguments)};jvm.inherits(jvm.ColorScale,jvm.NumericScale);jvm.ColorScale.prototype.setScale=function(scale){var i;for(i=0;i<scale.length;i++){this.scale[i]=jvm.ColorScale.rgbToArray(scale[i])}};jvm.ColorScale.prototype.getValue=function(value){return jvm.ColorScale.numToRgb(jvm.ColorScale.parentClass.prototype.getValue.call(this,value))};jvm.ColorScale.arrayToRgb=function(ar){var rgb="#",d,i;for(i=0;i<ar.length;i++){d=ar[i].toString(16);rgb+=d.length==1?"0"+d:d}return rgb};jvm.ColorScale.numToRgb=function(num){num=num.toString(16);while(num.length<6){num="0"+num}return"#"+num};jvm.ColorScale.rgbToArray=function(rgb){rgb=rgb.substr(1);return[parseInt(rgb.substr(0,2),16),parseInt(rgb.substr(2,2),16),parseInt(rgb.substr(4,2),16)]};jvm.Legend=function(params){this.params=params||{};this.map=this.params.map;this.series=this.params.series;this.body=jvm.$("<div/>");this.body.addClass("jvectormap-legend");if(this.params.cssClass){this.body.addClass(this.params.cssClass)}if(params.vertical){this.map.legendCntVertical.append(this.body)}else{this.map.legendCntHorizontal.append(this.body)}this.render()};jvm.Legend.prototype.render=function(){var ticks=this.series.scale.getTicks(),i,inner=jvm.$("<div/>").addClass("jvectormap-legend-inner"),tick,sample,label;this.body.html("");if(this.params.title){this.body.append(jvm.$("<div/>").addClass("jvectormap-legend-title").html(this.params.title))}this.body.append(inner);for(i=0;i<ticks.length;i++){tick=jvm.$("<div/>").addClass("jvectormap-legend-tick");sample=jvm.$("<div/>").addClass("jvectormap-legend-tick-sample");switch(this.series.params.attribute){case"fill":if(jvm.isImageUrl(ticks[i].value)){sample.css("background","url("+ticks[i].value+")")}else{sample.css("background",ticks[i].value)}break;case"stroke":sample.css("background",ticks[i].value);break;case"image":sample.css("background","url("+ticks[i].value+") no-repeat center center");break;case"r":jvm.$("<div/>").css({"border-radius":ticks[i].value,border:this.map.params.markerStyle.initial["stroke-width"]+"px "+this.map.params.markerStyle.initial["stroke"]+" solid",width:ticks[i].value*2+"px",height:ticks[i].value*2+"px",background:this.map.params.markerStyle.initial["fill"]}).appendTo(sample);break}tick.append(sample);label=ticks[i].label;if(this.params.labelRender){label=this.params.labelRender(label)}tick.append(jvm.$("<div>"+label+" </div>").addClass("jvectormap-legend-tick-text"));inner.append(tick)}inner.append(jvm.$("<div/>").css("clear","both"))};jvm.DataSeries=function(params,elements,map){var scaleConstructor;params=params||{};params.attribute=params.attribute||"fill";this.elements=elements;this.params=params;this.map=map;if(params.attributes){this.setAttributes(params.attributes)}if(jvm.$.isArray(params.scale)){scaleConstructor=params.attribute==="fill"||params.attribute==="stroke"?jvm.ColorScale:jvm.NumericScale;this.scale=new scaleConstructor(params.scale,params.normalizeFunction,params.min,params.max)}else if(params.scale){this.scale=new jvm.OrdinalScale(params.scale)}else{this.scale=new jvm.SimpleScale(params.scale)}this.values=params.values||{};this.setValues(this.values);if(this.params.legend){this.legend=new jvm.Legend($.extend({map:this.map,series:this},this.params.legend))}};jvm.DataSeries.prototype={setAttributes:function(key,attr){var attrs=key,code;if(typeof key=="string"){if(this.elements[key]){this.elements[key].setStyle(this.params.attribute,attr)}}else{for(code in attrs){if(this.elements[code]){this.elements[code].element.setStyle(this.params.attribute,attrs[code])}}}},setValues:function(values){var max=-Number.MAX_VALUE,min=Number.MAX_VALUE,val,cc,attrs={};if(!(this.scale instanceof jvm.OrdinalScale)&&!(this.scale instanceof jvm.SimpleScale)){if(typeof this.params.min==="undefined"||typeof this.params.max==="undefined"){for(cc in values){val=parseFloat(values[cc]);if(val>max)max=val;if(val<min)min=val}}if(typeof this.params.min==="undefined"){this.scale.setMin(min);this.params.min=min}else{this.scale.setMin(this.params.min)}if(typeof this.params.max==="undefined"){this.scale.setMax(max);this.params.max=max}else{this.scale.setMax(this.params.max)}for(cc in values){if(cc!="indexOf"){val=parseFloat(values[cc]);if(!isNaN(val)){attrs[cc]=this.scale.getValue(val)}else{attrs[cc]=this.elements[cc].element.style.initial[this.params.attribute]}}}}else{for(cc in values){if(values[cc]){attrs[cc]=this.scale.getValue(values[cc])}else{attrs[cc]=this.elements[cc].element.style.initial[this.params.attribute]}}}this.setAttributes(attrs);jvm.$.extend(this.values,values)},clear:function(){var key,attrs={};for(key in this.values){if(this.elements[key]){attrs[key]=this.elements[key].element.shape.style.initial[this.params.attribute]}}this.setAttributes(attrs);this.values={}},setScale:function(scale){this.scale.setScale(scale);if(this.values){this.setValues(this.values)}},setNormalizeFunction:function(f){this.scale.setNormalizeFunction(f);if(this.values){this.setValues(this.values)}}};jvm.Proj={degRad:180/Math.PI,radDeg:Math.PI/180,radius:6381372,sgn:function(n){if(n>0){return 1}else if(n<0){return-1}else{return n}},mill:function(lat,lng,c){return{x:this.radius*(lng-c)*this.radDeg,y:-this.radius*Math.log(Math.tan((45+.4*lat)*this.radDeg))/.8}},mill_inv:function(x,y,c){return{lat:(2.5*Math.atan(Math.exp(.8*y/this.radius))-5*Math.PI/8)*this.degRad,lng:(c*this.radDeg+x/this.radius)*this.degRad}},merc:function(lat,lng,c){return{x:this.radius*(lng-c)*this.radDeg,y:-this.radius*Math.log(Math.tan(Math.PI/4+lat*Math.PI/360))}},merc_inv:function(x,y,c){return{lat:(2*Math.atan(Math.exp(y/this.radius))-Math.PI/2)*this.degRad,lng:(c*this.radDeg+x/this.radius)*this.degRad}},aea:function(lat,lng,c){var fi0=0,lambda0=c*this.radDeg,fi1=29.5*this.radDeg,fi2=45.5*this.radDeg,fi=lat*this.radDeg,lambda=lng*this.radDeg,n=(Math.sin(fi1)+Math.sin(fi2))/2,C=Math.cos(fi1)*Math.cos(fi1)+2*n*Math.sin(fi1),theta=n*(lambda-lambda0),ro=Math.sqrt(C-2*n*Math.sin(fi))/n,ro0=Math.sqrt(C-2*n*Math.sin(fi0))/n;return{x:ro*Math.sin(theta)*this.radius,y:-(ro0-ro*Math.cos(theta))*this.radius}},aea_inv:function(xCoord,yCoord,c){var x=xCoord/this.radius,y=yCoord/this.radius,fi0=0,lambda0=c*this.radDeg,fi1=29.5*this.radDeg,fi2=45.5*this.radDeg,n=(Math.sin(fi1)+Math.sin(fi2))/2,C=Math.cos(fi1)*Math.cos(fi1)+2*n*Math.sin(fi1),ro0=Math.sqrt(C-2*n*Math.sin(fi0))/n,ro=Math.sqrt(x*x+(ro0-y)*(ro0-y)),theta=Math.atan(x/(ro0-y));return{lat:Math.asin((C-ro*ro*n*n)/(2*n))*this.degRad,lng:(lambda0+theta/n)*this.degRad}},lcc:function(lat,lng,c){var fi0=0,lambda0=c*this.radDeg,lambda=lng*this.radDeg,fi1=33*this.radDeg,fi2=45*this.radDeg,fi=lat*this.radDeg,n=Math.log(Math.cos(fi1)*(1/Math.cos(fi2)))/Math.log(Math.tan(Math.PI/4+fi2/2)*(1/Math.tan(Math.PI/4+fi1/2))),F=Math.cos(fi1)*Math.pow(Math.tan(Math.PI/4+fi1/2),n)/n,ro=F*Math.pow(1/Math.tan(Math.PI/4+fi/2),n),ro0=F*Math.pow(1/Math.tan(Math.PI/4+fi0/2),n);return{x:ro*Math.sin(n*(lambda-lambda0))*this.radius,y:-(ro0-ro*Math.cos(n*(lambda-lambda0)))*this.radius}},lcc_inv:function(xCoord,yCoord,c){var x=xCoord/this.radius,y=yCoord/this.radius,fi0=0,lambda0=c*this.radDeg,fi1=33*this.radDeg,fi2=45*this.radDeg,n=Math.log(Math.cos(fi1)*(1/Math.cos(fi2)))/Math.log(Math.tan(Math.PI/4+fi2/2)*(1/Math.tan(Math.PI/4+fi1/2))),F=Math.cos(fi1)*Math.pow(Math.tan(Math.PI/4+fi1/2),n)/n,ro0=F*Math.pow(1/Math.tan(Math.PI/4+fi0/2),n),ro=this.sgn(n)*Math.sqrt(x*x+(ro0-y)*(ro0-y)),theta=Math.atan(x/(ro0-y));return{lat:(2*Math.atan(Math.pow(F/ro,1/n))-Math.PI/2)*this.degRad,lng:(lambda0+theta/n)*this.degRad}}};jvm.MapObject=function(config){};jvm.MapObject.prototype.getLabelText=function(key){var text;if(this.config.label){if(typeof this.config.label.render==="function"){text=this.config.label.render(key)}else{text=key}}else{text=null}return text};jvm.MapObject.prototype.getLabelOffsets=function(key){var offsets;if(this.config.label){if(typeof this.config.label.offsets==="function"){offsets=this.config.label.offsets(key)}else if(typeof this.config.label.offsets==="object"){offsets=this.config.label.offsets[key]}}return offsets||[0,0]};jvm.MapObject.prototype.setHovered=function(isHovered){if(this.isHovered!==isHovered){this.isHovered=isHovered;this.shape.isHovered=isHovered;this.shape.updateStyle();if(this.label){this.label.isHovered=isHovered;this.label.updateStyle()}}};jvm.MapObject.prototype.setSelected=function(isSelected){if(this.isSelected!==isSelected){this.isSelected=isSelected;this.shape.isSelected=isSelected;this.shape.updateStyle();if(this.label){this.label.isSelected=isSelected;this.label.updateStyle()}jvm.$(this.shape).trigger("selected",[isSelected])}};jvm.MapObject.prototype.setStyle=function(){this.shape.setStyle.apply(this.shape,arguments)};jvm.MapObject.prototype.remove=function(){this.shape.remove();if(this.label){this.label.remove()}};jvm.Region=function(config){var bbox,text,offsets,labelDx,labelDy;this.config=config;this.map=this.config.map;this.shape=config.canvas.addPath({d:config.path,"data-code":config.code},config.style,config.canvas.rootElement);this.shape.addClass("jvectormap-region jvectormap-element");bbox=this.shape.getBBox();text=this.getLabelText(config.code);if(this.config.label&&text){offsets=this.getLabelOffsets(config.code);this.labelX=bbox.x+bbox.width/2+offsets[0];this.labelY=bbox.y+bbox.height/2+offsets[1];this.label=config.canvas.addText({text:text,"text-anchor":"middle","alignment-baseline":"central",x:this.labelX,y:this.labelY,"data-code":config.code},config.labelStyle,config.labelsGroup);this.label.addClass("jvectormap-region jvectormap-element")}};jvm.inherits(jvm.Region,jvm.MapObject);jvm.Region.prototype.updateLabelPosition=function(){if(this.label){this.label.set({x:this.labelX*this.map.scale+this.map.transX*this.map.scale,y:this.labelY*this.map.scale+this.map.transY*this.map.scale})}};jvm.Marker=function(config){var text,offsets;this.config=config;this.map=this.config.map;this.isImage=!!this.config.style.initial.image;this.createShape();text=this.getLabelText(config.index);if(this.config.label&&text){this.offsets=this.getLabelOffsets(config.index);this.labelX=config.cx/this.map.scale-this.map.transX;this.labelY=config.cy/this.map.scale-this.map.transY;this.label=config.canvas.addText({text:text,"data-index":config.index,dy:"0.6ex",x:this.labelX,y:this.labelY},config.labelStyle,config.labelsGroup);this.label.addClass("jvectormap-marker jvectormap-element")}};jvm.inherits(jvm.Marker,jvm.MapObject);jvm.Marker.prototype.createShape=function(){var that=this;if(this.shape){this.shape.remove()}this.shape=this.config.canvas[this.isImage?"addImage":"addCircle"]({"data-index":this.config.index,cx:this.config.cx,cy:this.config.cy},this.config.style,this.config.group);this.shape.addClass("jvectormap-marker jvectormap-element");if(this.isImage){jvm.$(this.shape.node).on("imageloaded",function(){that.updateLabelPosition()})}};jvm.Marker.prototype.updateLabelPosition=function(){if(this.label){this.label.set({x:this.labelX*this.map.scale+this.offsets[0]+this.map.transX*this.map.scale+5+(this.isImage?(this.shape.width||0)/2:this.shape.properties.r),y:this.labelY*this.map.scale+this.map.transY*this.map.scale+this.offsets[1]})}};jvm.Marker.prototype.setStyle=function(property,value){var isImage;jvm.Marker.parentClass.prototype.setStyle.apply(this,arguments);if(property==="r"){this.updateLabelPosition()}isImage=!!this.shape.get("image");if(isImage!=this.isImage){this.isImage=isImage;this.config.style=jvm.$.extend(true,{},this.shape.style);this.createShape()}};jvm.Map=function(params){var map=this,e;this.params=jvm.$.extend(true,{},jvm.Map.defaultParams,params);if(!jvm.Map.maps[this.params.map]){throw new Error("Attempt to use map which was not loaded: "+this.params.map)}this.mapData=jvm.Map.maps[this.params.map];this.markers={};this.regions={};this.regionsColors={};this.regionsData={};this.container=jvm.$("<div>").addClass("jvectormap-container");if(this.params.container){this.params.container.append(this.container)}this.container.data("mapObject",this);this.defaultWidth=this.mapData.width;this.defaultHeight=this.mapData.height;this.setBackgroundColor(this.params.backgroundColor);this.onResize=function(){map.updateSize()};jvm.$(window).resize(this.onResize);for(e in jvm.Map.apiEvents){if(this.params[e]){this.container.bind(jvm.Map.apiEvents[e]+".jvectormap",this.params[e])}}this.canvas=new jvm.VectorCanvas(this.container[0],this.width,this.height);if("ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch){if(this.params.bindTouchEvents){this.bindContainerTouchEvents()}}this.bindContainerEvents();this.bindElementEvents();this.createTip();if(this.params.zoomButtons){this.bindZoomButtons()}this.createRegions();this.createMarkers(this.params.markers||{});this.updateSize();if(this.params.focusOn){if(typeof this.params.focusOn==="string"){this.params.focusOn={region:this.params.focusOn}}else if(jvm.$.isArray(this.params.focusOn)){this.params.focusOn={regions:this.params.focusOn}}this.setFocus(this.params.focusOn)}if(this.params.selectedRegions){this.setSelectedRegions(this.params.selectedRegions)}if(this.params.selectedMarkers){this.setSelectedMarkers(this.params.selectedMarkers)}this.legendCntHorizontal=jvm.$("<div/>").addClass("jvectormap-legend-cnt jvectormap-legend-cnt-h");this.legendCntVertical=jvm.$("<div/>").addClass("jvectormap-legend-cnt jvectormap-legend-cnt-v");this.container.append(this.legendCntHorizontal);this.container.append(this.legendCntVertical);if(this.params.series){this.createSeries()}};jvm.Map.prototype={transX:0,transY:0,scale:1,baseTransX:0,baseTransY:0,baseScale:1,width:0,height:0,setBackgroundColor:function(backgroundColor){this.container.css("background-color",backgroundColor)},resize:function(){var curBaseScale=this.baseScale;if(this.width/this.height>this.defaultWidth/this.defaultHeight){this.baseScale=this.height/this.defaultHeight;this.baseTransX=Math.abs(this.width-this.defaultWidth*this.baseScale)/(2*this.baseScale)}else{this.baseScale=this.width/this.defaultWidth;this.baseTransY=Math.abs(this.height-this.defaultHeight*this.baseScale)/(2*this.baseScale)}this.scale*=this.baseScale/curBaseScale;this.transX*=this.baseScale/curBaseScale;this.transY*=this.baseScale/curBaseScale},updateSize:function(){this.width=this.container.width();this.height=this.container.height();this.resize();this.canvas.setSize(this.width,this.height);this.applyTransform()},reset:function(){var key,i;for(key in this.series){for(i=0;i<this.series[key].length;i++){this.series[key][i].clear()}}this.scale=this.baseScale;this.transX=this.baseTransX;this.transY=this.baseTransY;this.applyTransform()},applyTransform:function(){var maxTransX,maxTransY,minTransX,minTransY;if(this.defaultWidth*this.scale<=this.width){maxTransX=(this.width-this.defaultWidth*this.scale)/(2*this.scale);minTransX=(this.width-this.defaultWidth*this.scale)/(2*this.scale)}else{maxTransX=0;minTransX=(this.width-this.defaultWidth*this.scale)/this.scale}if(this.defaultHeight*this.scale<=this.height){maxTransY=(this.height-this.defaultHeight*this.scale)/(2*this.scale);minTransY=(this.height-this.defaultHeight*this.scale)/(2*this.scale)}else{maxTransY=0;minTransY=(this.height-this.defaultHeight*this.scale)/this.scale}if(this.transY>maxTransY){this.transY=maxTransY}else if(this.transY<minTransY){this.transY=minTransY}if(this.transX>maxTransX){this.transX=maxTransX}else if(this.transX<minTransX){this.transX=minTransX}this.canvas.applyTransformParams(this.scale,this.transX,this.transY);if(this.markers){this.repositionMarkers()}this.repositionLabels();this.container.trigger("viewportChange",[this.scale/this.baseScale,this.transX,this.transY])},bindContainerEvents:function(){var mouseDown=false,oldPageX,oldPageY,map=this;if(this.params.panOnDrag){this.container.mousemove(function(e){if(mouseDown){map.transX-=(oldPageX-e.pageX)/map.scale;map.transY-=(oldPageY-e.pageY)/map.scale;map.applyTransform();oldPageX=e.pageX;oldPageY=e.pageY}return false}).mousedown(function(e){mouseDown=true;oldPageX=e.pageX;oldPageY=e.pageY;return false});this.onContainerMouseUp=function(){mouseDown=false};jvm.$("body").mouseup(this.onContainerMouseUp)}if(this.params.zoomOnScroll){this.container.mousewheel(function(event,delta,deltaX,deltaY){var offset=jvm.$(map.container).offset(),centerX=event.pageX-offset.left,centerY=event.pageY-offset.top,zoomStep=Math.pow(1+map.params.zoomOnScrollSpeed/1e3,event.deltaFactor*event.deltaY);map.tip.hide();map.setScale(map.scale*zoomStep,centerX,centerY);event.preventDefault()})}},bindContainerTouchEvents:function(){var touchStartScale,touchStartDistance,map=this,touchX,touchY,centerTouchX,centerTouchY,lastTouchesLength,handleTouchEvent=function(e){var touches=e.originalEvent.touches,offset,scale,transXOld,transYOld;if(e.type=="touchstart"){lastTouchesLength=0}if(touches.length==1){if(lastTouchesLength==1){transXOld=map.transX;transYOld=map.transY;map.transX-=(touchX-touches[0].pageX)/map.scale;map.transY-=(touchY-touches[0].pageY)/map.scale;map.applyTransform();map.tip.hide();if(transXOld!=map.transX||transYOld!=map.transY){e.preventDefault()}}touchX=touches[0].pageX;touchY=touches[0].pageY}else if(touches.length==2){if(lastTouchesLength==2){scale=Math.sqrt(Math.pow(touches[0].pageX-touches[1].pageX,2)+Math.pow(touches[0].pageY-touches[1].pageY,2))/touchStartDistance;map.setScale(touchStartScale*scale,centerTouchX,centerTouchY);map.tip.hide();e.preventDefault()}else{offset=jvm.$(map.container).offset();if(touches[0].pageX>touches[1].pageX){centerTouchX=touches[1].pageX+(touches[0].pageX-touches[1].pageX)/2}else{centerTouchX=touches[0].pageX+(touches[1].pageX-touches[0].pageX)/2}if(touches[0].pageY>touches[1].pageY){centerTouchY=touches[1].pageY+(touches[0].pageY-touches[1].pageY)/2}else{centerTouchY=touches[0].pageY+(touches[1].pageY-touches[0].pageY)/2}centerTouchX-=offset.left;centerTouchY-=offset.top;touchStartScale=map.scale;touchStartDistance=Math.sqrt(Math.pow(touches[0].pageX-touches[1].pageX,2)+Math.pow(touches[0].pageY-touches[1].pageY,2))}}lastTouchesLength=touches.length};jvm.$(this.container).bind("touchstart",handleTouchEvent);jvm.$(this.container).bind("touchmove",handleTouchEvent)},bindElementEvents:function(){var map=this,mouseMoved;this.container.mousemove(function(){mouseMoved=true});this.container.delegate("[class~='jvectormap-element']","mouseover mouseout",function(e){var baseVal=jvm.$(this).attr("class").baseVal||jvm.$(this).attr("class"),type=baseVal.indexOf("jvectormap-region")===-1?"marker":"region",code=type=="region"?jvm.$(this).attr("data-code"):jvm.$(this).attr("data-index"),element=type=="region"?map.regions[code].element:map.markers[code].element,tipText=type=="region"?map.mapData.paths[code].name:map.markers[code].config.name||"",tipShowEvent=jvm.$.Event(type+"TipShow.jvectormap"),overEvent=jvm.$.Event(type+"Over.jvectormap");if(e.type=="mouseover"){map.container.trigger(overEvent,[code]);if(!overEvent.isDefaultPrevented()){element.setHovered(true)}map.tip.text(tipText);map.container.trigger(tipShowEvent,[map.tip,code]);if(!tipShowEvent.isDefaultPrevented()){map.tip.show();map.tipWidth=map.tip.width();map.tipHeight=map.tip.height()}}else{element.setHovered(false);map.tip.hide();map.container.trigger(type+"Out.jvectormap",[code])}});this.container.delegate("[class~='jvectormap-element']","mousedown",function(){mouseMoved=false});this.container.delegate("[class~='jvectormap-element']","mouseup",function(){var baseVal=jvm.$(this).attr("class").baseVal?jvm.$(this).attr("class").baseVal:jvm.$(this).attr("class"),type=baseVal.indexOf("jvectormap-region")===-1?"marker":"region",code=type=="region"?jvm.$(this).attr("data-code"):jvm.$(this).attr("data-index"),clickEvent=jvm.$.Event(type+"Click.jvectormap"),element=type=="region"?map.regions[code].element:map.markers[code].element;if(!mouseMoved){map.container.trigger(clickEvent,[code]);if(type==="region"&&map.params.regionsSelectable||type==="marker"&&map.params.markersSelectable){if(!clickEvent.isDefaultPrevented()){if(map.params[type+"sSelectableOne"]){map.clearSelected(type+"s")}element.setSelected(!element.isSelected)}}}})},bindZoomButtons:function(){var map=this;jvm.$("<div/>").addClass("jvectormap-zoomin").text("+").appendTo(this.container);jvm.$("<div/>").addClass("jvectormap-zoomout").html("−").appendTo(this.container);this.container.find(".jvectormap-zoomin").click(function(e){map.setScale(map.scale*map.params.zoomStep,map.width/2,map.height/2,false,map.params.zoomAnimate);e.stopPropagation()});this.container.find(".jvectormap-zoomout").click(function(e){map.setScale(map.scale/map.params.zoomStep,map.width/2,map.height/2,false,map.params.zoomAnimate);e.stopPropagation()})},createTip:function(){var map=this;this.tip=jvm.$("<div/>").addClass("jvectormap-tip").appendTo(jvm.$("body"));this.container.mousemove(function(e){var left=e.pageX-15-map.tipWidth,top=e.pageY-15-map.tipHeight;if(left<5){left=e.pageX+15}if(top<5){top=e.pageY+15}map.tip.css({left:left,top:top})})},setScale:function(scale,anchorX,anchorY,isCentered,animate){var viewportChangeEvent=jvm.$.Event("zoom.jvectormap"),interval,that=this,i=0,count=Math.abs(Math.round((scale-this.scale)*60/Math.max(scale,this.scale))),scaleStart,scaleDiff,transXStart,transXDiff,transYStart,transYDiff,transX,transY,deferred=new jvm.$.Deferred;if(scale>this.params.zoomMax*this.baseScale){scale=this.params.zoomMax*this.baseScale}else if(scale<this.params.zoomMin*this.baseScale){scale=this.params.zoomMin*this.baseScale}if(typeof anchorX!="undefined"&&typeof anchorY!="undefined"){zoomStep=scale/this.scale;if(isCentered){transX=anchorX+this.defaultWidth*(this.width/(this.defaultWidth*scale))/2;transY=anchorY+this.defaultHeight*(this.height/(this.defaultHeight*scale))/2}else{transX=this.transX-(zoomStep-1)/scale*anchorX;transY=this.transY-(zoomStep-1)/scale*anchorY}}if(animate&&count>0){scaleStart=this.scale;scaleDiff=(scale-scaleStart)/count;transXStart=this.transX*this.scale;transYStart=this.transY*this.scale;transXDiff=(transX*scale-transXStart)/count;transYDiff=(transY*scale-transYStart)/count;interval=setInterval(function(){i+=1;that.scale=scaleStart+scaleDiff*i;that.transX=(transXStart+transXDiff*i)/that.scale;that.transY=(transYStart+transYDiff*i)/that.scale;that.applyTransform();if(i==count){clearInterval(interval);that.container.trigger(viewportChangeEvent,[scale/that.baseScale]);deferred.resolve()}},10)}else{this.transX=transX;this.transY=transY;this.scale=scale;this.applyTransform();this.container.trigger(viewportChangeEvent,[scale/this.baseScale]);deferred.resolve()}return deferred},setFocus:function(config){var bbox,itemBbox,newBbox,codes,i,point;config=config||{};if(config.region){codes=[config.region]}else if(config.regions){codes=config.regions}if(codes){for(i=0;i<codes.length;i++){if(this.regions[codes[i]]){itemBbox=this.regions[codes[i]].element.shape.getBBox();if(itemBbox){if(typeof bbox=="undefined"){bbox=itemBbox}else{newBbox={x:Math.min(bbox.x,itemBbox.x),y:Math.min(bbox.y,itemBbox.y),width:Math.max(bbox.x+bbox.width,itemBbox.x+itemBbox.width)-Math.min(bbox.x,itemBbox.x),height:Math.max(bbox.y+bbox.height,itemBbox.y+itemBbox.height)-Math.min(bbox.y,itemBbox.y)};bbox=newBbox}}}}return this.setScale(Math.min(this.width/bbox.width,this.height/bbox.height),-(bbox.x+bbox.width/2),-(bbox.y+bbox.height/2),true,config.animate)}else{if(config.lat&&config.lng){point=this.latLngToPoint(config.lat,config.lng);config.x=this.transX-point.x/this.scale;config.y=this.transY-point.y/this.scale}else if(config.x&&config.y){config.x*=-this.defaultWidth;config.y*=-this.defaultHeight}return this.setScale(config.scale*this.baseScale,config.x,config.y,true,config.animate)}},getSelected:function(type){var key,selected=[];for(key in this[type]){if(this[type][key].element.isSelected){selected.push(key)}}return selected},getSelectedRegions:function(){return this.getSelected("regions")},getSelectedMarkers:function(){return this.getSelected("markers")},setSelected:function(type,keys){var i;if(typeof keys!="object"){keys=[keys]}if(jvm.$.isArray(keys)){for(i=0;i<keys.length;i++){this[type][keys[i]].element.setSelected(true)}}else{for(i in keys){this[type][i].element.setSelected(!!keys[i])}}},setSelectedRegions:function(keys){this.setSelected("regions",keys)},setSelectedMarkers:function(keys){this.setSelected("markers",keys)},clearSelected:function(type){var select={},selected=this.getSelected(type),i;for(i=0;i<selected.length;i++){select[selected[i]]=false}this.setSelected(type,select)},clearSelectedRegions:function(){this.clearSelected("regions")},clearSelectedMarkers:function(){this.clearSelected("markers")},getMapObject:function(){return this},getRegionName:function(code){return this.mapData.paths[code].name},createRegions:function(){var key,region,map=this;this.regionLabelsGroup=this.regionLabelsGroup||this.canvas.addGroup();for(key in this.mapData.paths){region=new jvm.Region({map:this,path:this.mapData.paths[key].path,code:key,style:jvm.$.extend(true,{},this.params.regionStyle),labelStyle:jvm.$.extend(true,{},this.params.regionLabelStyle),canvas:this.canvas,labelsGroup:this.regionLabelsGroup,label:this.canvas.mode!="vml"?this.params.labels&&this.params.labels.regions:null});jvm.$(region.shape).bind("selected",function(e,isSelected){map.container.trigger("regionSelected.jvectormap",[jvm.$(this.node).attr("data-code"),isSelected,map.getSelectedRegions()])});this.regions[key]={element:region,config:this.mapData.paths[key]}}},createMarkers:function(markers){var i,marker,point,markerConfig,markersArray,map=this;this.markersGroup=this.markersGroup||this.canvas.addGroup();this.markerLabelsGroup=this.markerLabelsGroup||this.canvas.addGroup();if(jvm.$.isArray(markers)){markersArray=markers.slice();markers={};for(i=0;i<markersArray.length;i++){markers[i]=markersArray[i]}}for(i in markers){markerConfig=markers[i]instanceof Array?{latLng:markers[i]}:markers[i];point=this.getMarkerPosition(markerConfig);if(point!==false){marker=new jvm.Marker({map:this,style:jvm.$.extend(true,{},this.params.markerStyle,{initial:markerConfig.style||{}}),labelStyle:jvm.$.extend(true,{},this.params.markerLabelStyle),index:i,cx:point.x,cy:point.y,group:this.markersGroup,canvas:this.canvas,labelsGroup:this.markerLabelsGroup,label:this.canvas.mode!="vml"?this.params.labels&&this.params.labels.markers:null});jvm.$(marker.shape).bind("selected",function(e,isSelected){map.container.trigger("markerSelected.jvectormap",[jvm.$(this.node).attr("data-index"),isSelected,map.getSelectedMarkers()])});if(this.markers[i]){this.removeMarkers([i])}this.markers[i]={element:marker,config:markerConfig}}}},repositionMarkers:function(){var i,point;for(i in this.markers){point=this.getMarkerPosition(this.markers[i].config);if(point!==false){this.markers[i].element.setStyle({cx:point.x,cy:point.y})}}},repositionLabels:function(){var key;for(key in this.regions){this.regions[key].element.updateLabelPosition()}for(key in this.markers){this.markers[key].element.updateLabelPosition()}},getMarkerPosition:function(markerConfig){if(jvm.Map.maps[this.params.map].projection){return this.latLngToPoint.apply(this,markerConfig.latLng||[0,0])}else{return{x:markerConfig.coords[0]*this.scale+this.transX*this.scale,y:markerConfig.coords[1]*this.scale+this.transY*this.scale}}},addMarker:function(key,marker,seriesData){var markers={},data=[],values,i,seriesData=seriesData||[];markers[key]=marker;for(i=0;i<seriesData.length;i++){values={};if(typeof seriesData[i]!=="undefined"){values[key]=seriesData[i]}data.push(values)}this.addMarkers(markers,data)},addMarkers:function(markers,seriesData){var i;seriesData=seriesData||[];this.createMarkers(markers);for(i=0;i<seriesData.length;i++){this.series.markers[i].setValues(seriesData[i]||{})}},removeMarkers:function(markers){var i;for(i=0;i<markers.length;i++){this.markers[markers[i]].element.remove();delete this.markers[markers[i]]}},removeAllMarkers:function(){var i,markers=[];for(i in this.markers){markers.push(i)}this.removeMarkers(markers)},latLngToPoint:function(lat,lng){var point,proj=jvm.Map.maps[this.params.map].projection,centralMeridian=proj.centralMeridian,inset,bbox;if(lng<-180+centralMeridian){lng+=360}point=jvm.Proj[proj.type](lat,lng,centralMeridian);inset=this.getInsetForPoint(point.x,point.y);if(inset){bbox=inset.bbox;point.x=(point.x-bbox[0].x)/(bbox[1].x-bbox[0].x)*inset.width*this.scale;point.y=(point.y-bbox[0].y)/(bbox[1].y-bbox[0].y)*inset.height*this.scale;return{x:point.x+this.transX*this.scale+inset.left*this.scale,y:point.y+this.transY*this.scale+inset.top*this.scale}}else{return false}},pointToLatLng:function(x,y){var proj=jvm.Map.maps[this.params.map].projection,centralMeridian=proj.centralMeridian,insets=jvm.Map.maps[this.params.map].insets,i,inset,bbox,nx,ny;for(i=0;i<insets.length;i++){inset=insets[i];bbox=inset.bbox;nx=x-(this.transX*this.scale+inset.left*this.scale);ny=y-(this.transY*this.scale+inset.top*this.scale);nx=nx/(inset.width*this.scale)*(bbox[1].x-bbox[0].x)+bbox[0].x;ny=ny/(inset.height*this.scale)*(bbox[1].y-bbox[0].y)+bbox[0].y;if(nx>bbox[0].x&&nx<bbox[1].x&&ny>bbox[0].y&&ny<bbox[1].y){return jvm.Proj[proj.type+"_inv"](nx,-ny,centralMeridian)}}return false},getInsetForPoint:function(x,y){var insets=jvm.Map.maps[this.params.map].insets,i,bbox;for(i=0;i<insets.length;i++){bbox=insets[i].bbox;if(x>bbox[0].x&&x<bbox[1].x&&y>bbox[0].y&&y<bbox[1].y){return insets[i]}}},createSeries:function(){var i,key;this.series={markers:[],regions:[]};for(key in this.params.series){for(i=0;i<this.params.series[key].length;i++){this.series[key][i]=new jvm.DataSeries(this.params.series[key][i],this[key],this)}}},remove:function(){this.tip.remove();this.container.remove();jvm.$(window).unbind("resize",this.onResize);jvm.$("body").unbind("mouseup",this.onContainerMouseUp)}};jvm.Map.maps={};jvm.Map.defaultParams={map:"world_mill_en",backgroundColor:"#505050",zoomButtons:true,zoomOnScroll:true,zoomOnScrollSpeed:3,panOnDrag:true,zoomMax:8,zoomMin:1,zoomStep:1.6,zoomAnimate:true,regionsSelectable:false,markersSelectable:false,bindTouchEvents:true,regionStyle:{initial:{fill:"white","fill-opacity":1,stroke:"none","stroke-width":0,"stroke-opacity":1},hover:{"fill-opacity":.8,cursor:"pointer"},selected:{fill:"yellow"},selectedHover:{}},regionLabelStyle:{initial:{"font-family":"Verdana","font-size":"12","font-weight":"bold",cursor:"default",fill:"black"},hover:{cursor:"pointer"}},markerStyle:{initial:{fill:"grey",stroke:"#505050","fill-opacity":1,"stroke-width":1,"stroke-opacity":1,r:5},hover:{stroke:"black","stroke-width":2,cursor:"pointer"},selected:{fill:"blue"},selectedHover:{}},markerLabelStyle:{initial:{"font-family":"Verdana","font-size":"12","font-weight":"bold",cursor:"default",fill:"black"},hover:{cursor:"pointer"}}};jvm.Map.apiEvents={onRegionTipShow:"regionTipShow",onRegionOver:"regionOver",onRegionOut:"regionOut",onRegionClick:"regionClick",onRegionSelected:"regionSelected",onMarkerTipShow:"markerTipShow",onMarkerOver:"markerOver",onMarkerOut:"markerOut",onMarkerClick:"markerClick",onMarkerDblClick:"markerDblClick",onMarkerSelected:"markerSelected",onViewportChange:"viewportChange"};jvm.MultiMap=function(params){var that=this;this.maps={};this.params=jvm.$.extend(true,{},jvm.MultiMap.defaultParams,params);this.params.maxLevel=this.params.maxLevel||Number.MAX_VALUE;this.params.main=this.params.main||{};this.params.main.multiMapLevel=0;this.history=[this.addMap(this.params.main.map,this.params.main)];this.defaultProjection=this.history[0].mapData.projection.type;this.mapsLoaded={};this.params.container.css({position:"relative"});this.backButton=jvm.$("<div/>").addClass("jvectormap-goback").text("Back").appendTo(this.params.container);this.backButton.hide();this.backButton.click(function(){that.goBack()});this.spinner=jvm.$("<div/>").addClass("jvectormap-spinner").appendTo(this.params.container);this.spinner.hide()};jvm.MultiMap.prototype={addMap:function(name,config){var cnt=jvm.$("<div/>").css({width:"100%",height:"100%"});this.params.container.append(cnt);this.maps[name]=new jvm.Map(jvm.$.extend(config,{container:cnt}));if(this.params.maxLevel>config.multiMapLevel){this.maps[name].container.on("regionClick.jvectormap",{scope:this},function(e,code){var multimap=e.data.scope,mapName=multimap.params.mapNameByCode(code,multimap);if(!multimap.drillDownPromise||multimap.drillDownPromise.state()!=="pending"){multimap.drillDown(mapName,code)}})}return this.maps[name]},downloadMap:function(code){var that=this,deferred=jvm.$.Deferred();if(!this.mapsLoaded[code]){jvm.$.get(this.params.mapUrlByCode(code,this)).then(function(){that.mapsLoaded[code]=true;deferred.resolve()},function(){deferred.reject()})}else{deferred.resolve()}return deferred},drillDown:function(name,code){var currentMap=this.history[this.history.length-1],that=this,focusPromise=currentMap.setFocus({region:code,animate:true}),downloadPromise=this.downloadMap(code);focusPromise.then(function(){if(downloadPromise.state()==="pending"){that.spinner.show()}});downloadPromise.always(function(){that.spinner.hide()});this.drillDownPromise=jvm.$.when(downloadPromise,focusPromise);this.drillDownPromise.then(function(){currentMap.params.container.hide();if(!that.maps[name]){that.addMap(name,{map:name,multiMapLevel:currentMap.params.multiMapLevel+1})}else{that.maps[name].params.container.show()}that.history.push(that.maps[name]);that.backButton.show()})},goBack:function(){var currentMap=this.history.pop(),prevMap=this.history[this.history.length-1],that=this;currentMap.setFocus({scale:1,x:.5,y:.5,animate:true}).then(function(){currentMap.params.container.hide();prevMap.params.container.show();prevMap.updateSize();if(that.history.length===1){that.backButton.hide()}prevMap.setFocus({scale:1,x:.5,y:.5,animate:true})})}};jvm.MultiMap.defaultParams={mapNameByCode:function(code,multiMap){return code.toLowerCase()+"_"+multiMap.defaultProjection+"_en"},mapUrlByCode:function(code,multiMap){return"jquery-jvectormap-data-"+code.toLowerCase()+"-"+multiMap.defaultProjection+"-en.js"}};
Close