/**
 * SWFObject v1.5: Flash Player detection and embed - https://blog.deconcept.com/swfobject/
 *
 * SWFObject is (c) 2007 Geoff Stearns and is released under the MIT License:
 * https://www.opensource.org/licenses/mit-license.php
 *
 */
var unique = 0;
if(typeof deconcept=="undefined"){var deconcept=new Object();}if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a){if(!document.getElementById){return;}this.DETECT_KEY=_a?_a:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(_1){this.setAttribute("swf",_1);}if(id){this.setAttribute("id",id);}if(w){this.setAttribute("width",w);}if(h){this.setAttribute("height",h);}if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true;}if(c){this.addParam("bgcolor",c);}var q=_7?_7:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _c=(_8)?_8:window.location;this.setAttribute("xiRedirectUrl",_c);this.setAttribute("redirectUrl","");if(_9){this.setAttribute("redirectUrl",_9);}};deconcept.SWFObject.prototype={useExpressInstall:function(_d){this.xiSWFPath=!_d?"expressinstall.swf":_d;this.setAttribute("useExpressInstall",true);},setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16[_16.length]=key+"="+_18[key];}return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath);}_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\"";_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";var _1a=this.getParams();for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}var _1c=this.getVariablePairs().join("&");if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath);}_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\">";_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";var _1d=this.getParams();for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}return _19;},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var _23=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var axo=1;var _26=3;while(axo){try{_26++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_26);_23=new deconcept.PlayerVersion([_26,0,0]);}catch(e){axo=null;}}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}}return _23;};deconcept.PlayerVersion=function(_29){this.major=_29[0]!=null?parseInt(_29[0]):0;this.minor=_29[1]!=null?parseInt(_29[1]):0;this.rev=_29[2]!=null?parseInt(_29[2]):0;};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.major<fv.major){return false;}if(this.major>fv.major){return true;}if(this.minor<fv.minor){return false;}if(this.minor>fv.minor){return true;}if(this.rev<fv.rev){return false;}return true;};deconcept.util={getRequestParameter:function(_2b){var q=document.location.search||document.location.hash;if(_2b==null){return q;}if(q){var _2d=q.substring(1).split("&");for(var i=0;i<_2d.length;i++){if(_2d[i].substring(0,_2d[i].indexOf("="))==_2b){return _2d[i].substring((_2d[i].indexOf("=")+1));}}}return "";}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var _2f=document.getElementsByTagName("OBJECT");for(var i=_2f.length-1;i>=0;i--){_2f[i].style.display="none";for(var x in _2f[i]){if(typeof _2f[i][x]=="function"){_2f[i][x]=function(){};}}}};if(deconcept.SWFObject.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs);};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true;}}if(!document.getElementById&&document.all){document.getElementById=function(id){return document.all[id];};}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;
function swf(Q,M,C,N,O,K,A,D){var L,E="xsw"+(++unique),G=new SWFObject(Q,E,C,N,D||8,A||"#FFFFFF");if(K){for(L in K){G.addParam(L,K[L])}}if(O){for(L in O){G.addVariable(L,O[L])}}G.useExpressInstall("/m/adobe/expressinstall.swf");document.getElementById(M)&&G.write(M);return E}
/*
 * jQuery Form Plugin
 * version: 2.43 (12-MAR-2010)
 * @requires jQuery v1.3.2 or later
 *
 * Examples and documentation at: https://malsup.com/jquery/form/
 * Dual licensed under the MIT and GPL licenses:
 *   https://www.opensource.org/licenses/mit-license.php
 *   https://www.gnu.org/licenses/gpl.html
 */
$.fn.ajaxSubmit=function(r){if(!this.length){log("ajaxSubmit: skipping submit process - no element selected");return this}if(typeof r=="function"){r={success:r}}var d=$.trim(this.attr("action"));if(d){d=(d.match(/^([^#]+)/)||[])[1]}d=d||window.location.href||"";r=$.extend({url:d,type:this.attr("method")||"GET",iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},r||{});var t={};this.trigger("form-pre-serialize",[this,r,t]);if(t.veto){log("ajaxSubmit: submit vetoed via form-pre-serialize trigger");return this}if(r.beforeSerialize&&r.beforeSerialize(this,r)===false){log("ajaxSubmit: submit aborted via beforeSerialize callback");return this}var l=this.formToArray(r.semantic);if(r.data){r.extraData=r.data;for(var e in r.data){if(r.data[e] instanceof Array){for(var f in r.data[e]){l.push({name:e,value:r.data[e][f]})}}else{l.push({name:e,value:r.data[e]})}}}if(r.beforeSubmit&&r.beforeSubmit(l,this,r)===false){log("ajaxSubmit: submit aborted via beforeSubmit callback");return this}this.trigger("form-submit-validate",[l,this,r,t]);if(t.veto){log("ajaxSubmit: submit vetoed via form-submit-validate trigger");return this}var c=$.param(l);if(r.type.toUpperCase()=="GET"){r.url+=(r.url.indexOf("?")>=0?"&":"?")+c;r.data=null}else{r.data=c}var s=this,i=[];if(r.resetForm){i.push(function(){s.resetForm()})}if(r.clearForm){i.push(function(){s.clearForm()})}if(!r.dataType&&r.target){var o=r.success||function(){};i.push(function(j){var a=r.replaceTarget?"replaceWith":"html";$(r.target)[a](j).each(o,arguments)})}else{if(r.success){i.push(r.success)}}r.success=function(n,j,q){for(var k=0,a=i.length;k<a;k++){i[k].apply(r,[n,j,q||s,s])}};var b=$("input:file",this).fieldValue();var p=false;for(var h=0;h<b.length;h++){if(b[h]){p=true}}var g=false;if((b.length&&r.iframe!==false)||r.iframe||p||g){if(r.closeKeepAlive){$.get(r.closeKeepAlive,m)}else{m()}}else{$.ajax(r)}this.trigger("form-submit-notify",[this,r]);return this;function m(){var u=s[0];if($(":input[name=submit]",u).length){alert('Error: Form elements must not be named "submit".');return}var k=$.extend({},$.ajaxSettings,r);var F=$.extend(true,{},$.extend(true,{},$.ajaxSettings),k);var q="jqFormIO"+(new Date().getTime());var B=$('<iframe id="'+q+'" name="'+q+'" src="'+k.iframeSrc+'" onload="(jQuery(this).data(\'form-plugin-onload\'))()" />');var D=B[0];B.css({position:"absolute",top:"-1000px",left:"-1000px"});var E={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(){this.aborted=1;B.attr("src",k.iframeSrc)}};var C=k.global;if(C&&!$.active++){$.event.trigger("ajaxStart")}if(C){$.event.trigger("ajaxSend",[E,k])}if(F.beforeSend&&F.beforeSend(E,F)===false){F.global&&$.active--;return}if(E.aborted){return}var j=false;var y=0;var a=u.clk;if(a){var w=a.name;if(w&&!a.disabled){k.extraData=k.extraData||{};k.extraData[w]=a.value;if(a.type=="image"){k.extraData[w+".x"]=u.clk_x;k.extraData[w+".y"]=u.clk_y}}}function v(){var I=s.attr("target"),G=s.attr("action");u.setAttribute("target",q);if(u.getAttribute("method")!="POST"){u.setAttribute("method","POST")}if(u.getAttribute("action")!=k.url){u.setAttribute("action",k.url)}if(!k.skipEncodingOverride){s.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"})}if(k.timeout){setTimeout(function(){y=true;z()},k.timeout)}var H=[];try{if(k.extraData){for(var J in k.extraData){H.push($('<input type="hidden" name="'+J+'" value="'+k.extraData[J]+'" />').appendTo(u)[0])}}B.data("form-plugin-onload",z);B.appendTo("body");u.submit()}finally{u.setAttribute("action",G);I?u.setAttribute("target",I):s.removeAttr("target");$(H).remove()}}if(k.forceSync){v()}else{setTimeout(v,10)}var x=100;function z(){if(j){return}var G=true;try{if(y){throw"timeout"}var H,K;K=D.contentWindow?D.contentWindow.document:D.contentDocument?D.contentDocument:D.document;var L=k.dataType=="xml"||K.XMLDocument||$.isXMLDoc(K);log("isXml="+L);if(!L&&(K.body==null||K.body.innerHTML=="")){if(--x){log("requeing onLoad callback, DOM not available");setTimeout(z,250);return}log("Could not access iframe DOM after 100 tries.");return}log("response detected");j=true;E.responseText=K.body?K.body.innerHTML:null;E.responseXML=K.XMLDocument?K.XMLDocument:K;E.getResponseHeader=function(N){var M={"content-type":k.dataType};return M[N]};if(k.dataType=="json"||k.dataType=="script"){var n=K.getElementsByTagName("textarea")[0];if(n){E.responseText=n.value}else{var J=K.getElementsByTagName("pre")[0];if(J){E.responseText=J.innerHTML}}}else{if(k.dataType=="xml"&&!E.responseXML&&E.responseText!=null){E.responseXML=A(E.responseText)}}H=$.httpData(E,k.dataType)}catch(I){log("error caught:",I);G=false;E.error=I;$.handleError(k,E,"error",I)}if(G){k.success(H,"success");if(C){$.event.trigger("ajaxSuccess",[E,k])}}if(C){$.event.trigger("ajaxComplete",[E,k])}if(C&&!--$.active){$.event.trigger("ajaxStop")}if(k.complete){k.complete(E,G?"success":"error")}setTimeout(function(){B.removeData("form-plugin-onload");B.remove();E.responseXML=null},100)}function A(n,G){if(window.ActiveXObject){G=new ActiveXObject("Microsoft.XMLDOM");G.async="false";G.loadXML(n)}else{G=(new DOMParser()).parseFromString(n,"text/xml")}return(G&&G.documentElement&&G.documentElement.tagName!="parsererror")?G:null}}};$.fn.ajaxForm=function(a){return this.ajaxFormUnbind().bind("submit.form-plugin",function(b){b.preventDefault();$(this).ajaxSubmit(a)}).bind("click.form-plugin",function(g){var f=g.target;var c=$(f);if(!(c.is(":submit,input:image"))){var b=c.closest(":submit");if(b.length==0){return}f=b[0]}var d=this;d.clk=f;if(f.type=="image"){if(g.offsetX!=undefined){d.clk_x=g.offsetX;d.clk_y=g.offsetY}else{if(typeof $.fn.offset=="function"){var h=c.offset();d.clk_x=g.pageX-h.left;d.clk_y=g.pageY-h.top}else{d.clk_x=g.pageX-f.offsetLeft;d.clk_y=g.pageY-f.offsetTop}}}setTimeout(function(){d.clk=d.clk_x=d.clk_y=null},100)})};$.fn.ajaxFormUnbind=function(){return this.unbind("submit.form-plugin click.form-plugin")};$.fn.formToArray=function(p){var o=[];if(this.length==0){return o}var c=this[0];var g=p?c.getElementsByTagName("*"):c.elements;if(!g){return o}for(var h=0,l=g.length;h<l;h++){var d=g[h];var e=d.name;if(!e){continue}if(p&&c.clk&&d.type=="image"){if(!d.disabled&&c.clk==d){o.push({name:e,value:$(d).val()});o.push({name:e+".x",value:c.clk_x},{name:e+".y",value:c.clk_y})}continue}var q=$.fieldValue(d,true);if(q&&q.constructor==Array){for(var f=0,b=q.length;f<b;f++){o.push({name:e,value:q[f]})}}else{if(q!==null&&typeof q!="undefined"){o.push({name:e,value:q})}}}if(!p&&c.clk){var k=$(c.clk),m=k[0],e=m.name;if(e&&!m.disabled&&m.type=="image"){o.push({name:e,value:k.val()});o.push({name:e+".x",value:c.clk_x},{name:e+".y",value:c.clk_y})}}return o};$.fn.formSerialize=function(a){return $.param(this.formToArray(a))};$.fn.fieldSerialize=function(c){var b=[];this.each(function(){var f=this.name;if(!f){return}var d=$.fieldValue(this,c);if(d&&d.constructor==Array){for(var e=0,a=d.length;e<a;e++){b.push({name:f,value:d[e]})}}else{if(d!==null&&typeof d!="undefined"){b.push({name:this.name,value:d})}}});return $.param(b)};$.fn.fieldValue=function(f){for(var e=[],c=0,a=this.length;c<a;c++){var d=this[c];var b=$.fieldValue(d,f);if(b===null||typeof b=="undefined"||(b.constructor==Array&&!b.length)){continue}b.constructor==Array?$.merge(e,b):e.push(b)}return e};$.fieldValue=function(b,h){var d=b.name,o=b.type,p=b.tagName.toLowerCase();if(typeof h=="undefined"){h=true}if(h&&(!d||b.disabled||o=="reset"||o=="button"||(o=="checkbox"||o=="radio")&&!b.checked||(o=="submit"||o=="image")&&b.form&&b.form.clk!=b||p=="select"&&b.selectedIndex==-1)){return null}if(p=="select"){var j=b.selectedIndex;if(j<0){return null}var l=[],c=b.options;var f=(o=="select-one");var k=(f?j+1:c.length);for(var e=(f?j:0);e<k;e++){var g=c[e];if(g.selected){var m=g.value;if(!m){m=(g.attributes&&g.attributes.value&&!(g.attributes.value.specified))?g.text:g.value}if(f){return m}l.push(m)}}return l}return b.value};$.fn.clearForm=function(){return this.each(function(){$("input,select,textarea",this).clearFields()})};$.fn.clearFields=$.fn.clearInputs=function(){return this.each(function(){var b=this.type,a=this.tagName.toLowerCase();if(b=="text"||b=="password"||a=="textarea"){this.value=""}else{if(b=="checkbox"||b=="radio"){this.checked=false}else{if(a=="select"){this.selectedIndex=-1}}}})};$.fn.resetForm=function(){return this.each(function(){if(typeof this.reset=="function"||(typeof this.reset=="object"&&!this.reset.nodeType)){this.reset()}})};$.fn.enable=function(a){if(a==undefined){a=true}return this.each(function(){this.disabled=!a})};$.fn.selected=function(a){if(a==undefined){a=true}return this.each(function(){var b=this.type;if(b=="checkbox"||b=="radio"){this.checked=a}else{if(this.tagName.toLowerCase()=="option"){var c=$(this).parent("select");if(a&&c[0]&&c[0].type=="select-one"){c.find("option").selected(false)}this.selected=a}}})};function log(){if($.fn.ajaxSubmit.debug){var a="[jquery.form] "+Array.prototype.join.call(arguments,"");if(window.console&&window.console.log){window.console.log(a)}else{if(window.opera&&window.opera.postError){window.opera.postError(a)}}}};
/*
 * jQuery BBQ: Back Button & Query Library - v1.3pre - 7/24/2010
 * https://benalman.com/projects/jquery-bbq-plugin/
 * 
 * Copyright (c) 2010 "Cowboy" Ben Alman
 * Dual licensed under the MIT and GPL licenses.
 * https://benalman.com/about/license/
 */
(function($,p){var i,m=Array.prototype.slice,r=decodeURIComponent,a=$.param,c,l,v,b=$.bbq=$.bbq||{},q,u,j,e=$.event.special,d="hashchange",A="querystring",D="fragment",y="elemUrlAttr",g="location",k="href",t="src",x=/^.*\?|#.*$/g,w=/^.*\#/,h,C={};function E(F){return typeof F==="string"}function B(G){var F=m.call(arguments,1);return function(){return G.apply(this,F.concat(m.call(arguments)))}}function n(F){return F.replace(/^[^#]*#?(.*)$/,"$1")}function o(F){return F.replace(/(?:^[^?#]*\?([^#]*).*$)?.*/,"$1")}function f(H,M,F,I,G){var O,L,K,N,J;if(I!==i){K=F.match(H?/^([^#]*)\#?(.*)$/:/^([^#?]*)\??([^#]*)(#?.*)/);J=K[3]||"";if(G===2&&E(I)){L=I.replace(H?w:x,"")}else{N=l(K[2]);I=E(I)?l[H?D:A](I):I;L=G===2?I:G===1?$.extend({},I,N):$.extend({},N,I);L=a(L);if(H){L=L.replace(h,r)}}O=K[1]+(H?"#":L||!K[1]?"?":"")+L+J}else{O=M(F!==i?F:p[g][k])}return O}a[A]=B(f,0,o);a[D]=c=B(f,1,n);c.noEscape=function(G){G=G||"";var F=$.map(G.split(""),encodeURIComponent);h=new RegExp(F.join("|"),"g")};c.noEscape(",/");$.deparam=l=function(I,F){var H={},G={"true":!0,"false":!1,"null":null};$.each(I.replace(/\+/g," ").split("&"),function(L,Q){var K=Q.split("="),P=r(K[0]),J,O=H,M=0,R=P.split("]["),N=R.length-1;if(/\[/.test(R[0])&&/\]$/.test(R[N])){R[N]=R[N].replace(/\]$/,"");R=R.shift().split("[").concat(R);N=R.length-1}else{N=0}if(K.length===2){J=r(K[1]);if(F){J=J&&!isNaN(J)?+J:J==="undefined"?i:G[J]!==i?G[J]:J}if(N){for(;M<=N;M++){P=R[M]===""?O.length:R[M];O=O[P]=M<N?O[P]||(R[M+1]&&isNaN(R[M+1])?{}:[]):J}}else{if($.isArray(H[P])){H[P].push(J)}else{if(H[P]!==i){H[P]=[H[P],J]}else{H[P]=J}}}}else{if(P){H[P]=F?i:""}}});return H};function z(H,F,G){if(F===i||typeof F==="boolean"){G=F;F=a[H?D:A]()}else{F=E(F)?F.replace(H?w:x,""):F}return l(F,G)}l[A]=B(z,0);l[D]=v=B(z,1);$[y]||($[y]=function(F){return $.extend(C,F)})({a:k,base:k,iframe:t,img:t,input:t,form:"action",link:k,script:t});j=$[y];function s(I,G,H,F){if(!E(H)&&typeof H!=="object"){F=H;H=G;G=i}return this.each(function(){var L=$(this),J=G||j()[(this.nodeName||"").toLowerCase()]||"",K=J&&L.attr(J)||"";L.attr(J,a[I](K,H,F))})}$.fn[A]=B(s,A);$.fn[D]=B(s,D);b.pushState=q=function(I,F){if(E(I)&&/^#/.test(I)&&F===i){F=2}var H=I!==i,G=c(p[g][k],H?I:{},H?F:2);p[g][k]=G+(/#/.test(G)?"":"#")};b.getState=u=function(F,G){return F===i||typeof F==="boolean"?v(F):v(G)[F]};b.removeState=function(F){var G={};if(F!==i){G=u();$.each($.isArray(F)?F:arguments,function(I,H){delete G[H]})}q(G,2)};e[d]=$.extend(e[d],{add:function(F){var H;function G(J){var I=J[D]=c();J.getState=function(K,L){return K===i||typeof K==="boolean"?l(I,K):l(I,L)[K]};H.apply(this,arguments)}if($.isFunction(F)){H=F;return G}else{H=F.handler;F.handler=G}}})})(jQuery,this);
/*
 * jQuery hashchange event - v1.3 - 7/21/2010
 * https://benalman.com/projects/jquery-hashchange-plugin/
 * 
 * Copyright (c) 2010 "Cowboy" Ben Alman
 * Dual licensed under the MIT and GPL licenses.
 * https://benalman.com/about/license/
 */
(function($,e,b){var c="hashchange",h=document,f,g=$.event.special,i=h.documentMode,d="on"+c in e&&(i===b||i>7);function a(j){j=j||location.href;return"#"+j.replace(/^[^#]*#?(.*)$/,"$1")}$.fn[c]=function(j){return j?this.bind(c,j):this.trigger(c)};$.fn[c].delay=50;g[c]=$.extend(g[c],{setup:function(){if(d){return false}$(f.start)},teardown:function(){if(d){return false}$(f.stop)}});f=(function(){var j={},p,m=a(),k=function(q){return q},l=k,o=k;j.start=function(){p||n()};j.stop=function(){p&&clearTimeout(p);p=b};function n(){var r=a(),q=o(m);if(r!==m){l(m=r,q);$(e).trigger(c)}else{if(q!==m){location.href=location.href.replace(/#.*/,"")+q}}p=setTimeout(n,$.fn[c].delay)}$.browser.msie&&!d&&(function(){var q,r;j.start=function(){if(!q){r=$.fn[c].src;r=r&&r+a();q=$('<iframe tabindex="-1" title="empty"/>').hide().one("load",function(){r||l(a());n()}).attr("src",r||"javascript:0").insertAfter("body")[0].contentWindow;h.onpropertychange=function(){try{if(event.propertyName==="title"){q.document.title=h.title}}catch(s){}}}};j.stop=k;o=function(){return a(q.location.href)};l=function(v,s){var u=q.document,t=$.fn[c].domain;if(v!==s){u.title=h.title;u.open();t&&u.write('<script>document.domain="'+t+'"<\/script>');u.close();q.location.hash=v}}})();return j})()})(jQuery,this);
// jQuery SWFObject v1.1.1 MIT/GPL @jon_neal
// https://jquery.thewikies.com/swfobject
(function(){var g="object",d=true,i="flash",k=navigator.plugins["Shockwave Flash"]||window.ActiveXObject;function l(n,m){var e=(n[0]||0)-(m[0]||0);return e>0||(!e&&n.length>0&&l(n.slice(1),m.slice(1)))}function f(n){if(typeof n!=g){return n}var e=[],o="";for(var m in n){if(typeof n[m]==g){o=f(n[m])}else{o=[m,(d)?encodeURI(n[m]):n[m]].join("=")}e.push(o)}return e.join("&")}function h(n){var e=[];for(var m in n){if(n[m]){e.push([m,'="',n[m],'"'].join(""))}}return e.join(" ")}function c(n){var e=[];for(var m in n){e.push(['<param name="',m,'" value="',f(n[m]),'" />'].join(""))}return e.join("")}try{var b=k.description||(function(){return(new k("ShockwaveFlash.ShockwaveFlash")).GetVariable("$version")}())}catch(j){b="Unavailable"}var a=b.match(/\d+/g)||[0];$[i]={available:a[0]>0,activeX:k&&!k.name,version:{original:b,array:a,string:a.join("."),major:parseInt(a[0],10)||0,minor:parseInt(a[1],10)||0,release:parseInt(a[2],10)||0},hasVersion:function(e){var m=(/string|number/.test(typeof e))?e.toString().split("."):(/object/.test(typeof e))?[e.major,e.minor]:e||[0,0];return l(a,m)},encodeParams:true,expressInstall:"expressInstall.swf",expressInstallIsActive:false,create:function(n){var e=this;if(!n.swf||e.expressInstallIsActive||(!e.available&&!n.hasVersionFail)){return false}if(!e.hasVersion(n.hasVersion||1)){e.expressInstallIsActive=true;if(typeof n.hasVersionFail=="function"){if(!n.hasVersionFail.apply(n)){return false}}n={swf:n.expressInstall||e.expressInstall,height:137,width:214,flashvars:{MMredirectURL:location.href,MMplayerType:(e.activeX)?"ActiveX":"PlugIn",MMdoctitle:document.title.slice(0,47)+" - Flash Player Installation"}}}attrs={data:n.swf,type:"application/x-shockwave-flash",id:n.id||"flash_"+Math.floor(Math.random()*999999999),width:n.width||320,height:n.height||180,style:n.style||""};d=typeof n.useEncode!=="undefined"?n.useEncode:e.encodeParams;n.movie=n.swf;n.wmode=n.wmode||"opaque";delete n.fallback;delete n.hasVersion;delete n.hasVersionFail;delete n.height;delete n.id;delete n.swf;delete n.useEncode;delete n.width;var m=document.createElement("div");m.innerHTML=["<object ",h(attrs),">",c(n),"</object>"].join("");return m.firstChild}};$.fn[i]=function(e){var m=this.find(g).andSelf().filter(g);if(/string|object/.test(typeof e)){this.each(function(){var o=$(this),n;e=(typeof e==g)?e:{swf:e};e.fallback=this;n=$[i].create(e);if(n){o.children().remove();o.html(n)}})}if(typeof e=="function"){m.each(function(){var n=this,o="jsInteractionTimeoutMs";n[o]=n[o]||0;if(n[o]<660){if(n.clientWidth||n.clientHeight){e.call(n)}else{setTimeout(function(){$(n)[i](e)},n[o]+66)}}})}return m}}());
// ColorBox v1.3.15 - a full featured, light-weight, customizable lightbox based on jQuery 1.3+
// Copyright (c) 2010 Jack Moore - jack@colorpowered.com
// Licensed under the MIT license: https://www.opensource.org/licenses/mit-license.php
(function(b,ib){var t="none",M="LoadedContent",c=false,v="resize.",o="y",q="auto",e=true,L="nofollow",m="x";function f(a,c){a=a?' id="'+i+a+'"':"";c=c?' style="'+c+'"':"";return b("<div"+a+c+"/>")}function p(a,b){b=b===m?n.width():n.height();return typeof a==="string"?Math.round(/%/.test(a)?b/100*parseInt(a,10):parseInt(a,10)):a}function U(b){return a.photo||/\.(gif|png|jpg|jpeg|bmp)(?:\?([^#]*))?(?:#(\.*))?$/i.test(b)}function cb(a){for(var c in a)if(b.isFunction(a[c])&&c.substring(0,2)!=="on")a[c]=a[c].call(l);a.rel=a.rel||l.rel||L;a.href=a.href||b(l).attr("href");a.title=a.title||l.title;return a}function w(c,a){a&&a.call(l);b.event.trigger(c)}function jb(){var b,e=i+"Slideshow_",c="click."+i,f,k;if(a.slideshow&&h[1]){f=function(){F.text(a.slideshowStop).unbind(c).bind(V,function(){if(g<h.length-1||a.loop)b=setTimeout(d.next,a.slideshowSpeed)}).bind(W,function(){clearTimeout(b)}).one(c+" "+N,k);j.removeClass(e+"off").addClass(e+"on");b=setTimeout(d.next,a.slideshowSpeed)};k=function(){clearTimeout(b);F.text(a.slideshowStart).unbind([V,W,N,c].join(" ")).one(c,f);j.removeClass(e+"on").addClass(e+"off")};a.slideshowAuto?f():k()}}function db(c){if(!O){l=c;a=cb(b.extend({},b.data(l,r)));h=b(l);g=0;if(a.rel!==L){h=b("."+G).filter(function(){return (b.data(this,r).rel||this.rel)===a.rel});g=h.index(l);if(g===-1){h=h.add(l);g=h.length-1}}if(!u){u=D=e;j.show();if(a.returnFocus)try{l.blur();b(l).one(eb,function(){try{this.focus()}catch(a){}})}catch(f){}x.css({opacity:+a.opacity,cursor:a.overlayClose?"pointer":q}).show();a.w=p(a.initialWidth,m);a.h=p(a.initialHeight,o);d.position(0);X&&n.bind(v+P+" scroll."+P,function(){x.css({width:n.width(),height:n.height(),top:n.scrollTop(),left:n.scrollLeft()})}).trigger("scroll."+P);w(fb,a.onOpen);Y.add(H).add(I).add(F).add(Z).hide();ab.html(a.close).show()}d.load(e)}}var gb={transition:"elastic",speed:300,width:c,initialWidth:"600",innerWidth:c,maxWidth:c,height:c,initialHeight:"450",innerHeight:c,maxHeight:c,scalePhotos:e,scrolling:e,inline:c,html:c,iframe:c,photo:c,href:c,title:c,rel:c,opacity:.9,preloading:e,current:"{current} of {total}",previous:"previous",next:"next",close:"close",open:c,returnFocus:e,loop:e,slideshow:c,slideshowAuto:e,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",onOpen:c,onLoad:c,onComplete:c,onCleanup:c,onClosed:c,overlayClose:e,escKey:e,arrowKey:e},r="colorbox",i="cbox",fb=i+"_open",W=i+"_load",V=i+"_complete",N=i+"_cleanup",eb=i+"_closed",Q=i+"_purge",hb=i+"_loaded",E=b.browser.msie&&!b.support.opacity,X=E&&b.browser.version<7,P=i+"_IE6",x,j,A,s,bb,T,R,S,h,n,k,J,K,Z,Y,F,I,H,ab,B,C,y,z,l,g,a,u,D,O=c,d,G=i+"Element";d=b.fn[r]=b[r]=function(c,f){var a=this,d;if(!a[0]&&a.selector)return a;c=c||{};if(f)c.onComplete=f;if(!a[0]||a.selector===undefined){a=b("<a/>");c.open=e}a.each(function(){b.data(this,r,b.extend({},b.data(this,r)||gb,c));b(this).addClass(G)});d=c.open;if(b.isFunction(d))d=d.call(a);d&&db(a[0]);return a};d.init=function(){var l="hover",m="clear:left";n=b(ib);j=f().attr({id:r,"class":E?i+"IE":""});x=f("Overlay",X?"position:absolute":"").hide();A=f("Wrapper");s=f("Content").append(k=f(M,"width:0; height:0; overflow:hidden"),K=f("LoadingOverlay").add(f("LoadingGraphic")),Z=f("Title"),Y=f("Current"),I=f("Next"),H=f("Previous"),F=f("Slideshow").bind(fb,jb),ab=f("Close"));A.append(f().append(f("TopLeft"),bb=f("TopCenter"),f("TopRight")),f(c,m).append(T=f("MiddleLeft"),s,R=f("MiddleRight")),f(c,m).append(f("BottomLeft"),S=f("BottomCenter"),f("BottomRight"))).children().children().css({"float":"left"});J=f(c,"position:absolute; width:9999px; visibility:hidden; display:none");b("body").prepend(x,j.append(A,J));s.children().hover(function(){b(this).addClass(l)},function(){b(this).removeClass(l)}).addClass(l);B=bb.height()+S.height()+s.outerHeight(e)-s.height();C=T.width()+R.width()+s.outerWidth(e)-s.width();y=k.outerHeight(e);z=k.outerWidth(e);j.css({"padding-bottom":B,"padding-right":C}).hide();I.click(d.next);H.click(d.prev);ab.click(d.close);s.children().removeClass(l);b("."+G).live("click",function(a){if(!(a.button!==0&&typeof a.button!=="undefined"||a.ctrlKey||a.shiftKey||a.altKey)){a.preventDefault();db(this)}});x.click(function(){a.overlayClose&&d.close()});b(document).bind("keydown",function(b){if(u&&a.escKey&&b.keyCode===27){b.preventDefault();d.close()}if(u&&a.arrowKey&&!D&&h[1])if(b.keyCode===37&&(g||a.loop)){b.preventDefault();H.click()}else if(b.keyCode===39&&(g<h.length-1||a.loop)){b.preventDefault();I.click()}})};d.remove=function(){j.add(x).remove();b("."+G).die("click").removeData(r).removeClass(G)};d.position=function(f,d){function b(a){bb[0].style.width=S[0].style.width=s[0].style.width=a.style.width;K[0].style.height=K[1].style.height=s[0].style.height=T[0].style.height=R[0].style.height=a.style.height}var e,h=Math.max(document.documentElement.clientHeight-a.h-y-B,0)/2+n.scrollTop(),g=Math.max(n.width()-a.w-z-C,0)/2+n.scrollLeft();e=j.width()===a.w+z&&j.height()===a.h+y?0:f;A[0].style.width=A[0].style.height="9999px";j.dequeue().animate({width:a.w+z,height:a.h+y,top:h,left:g},{duration:e,complete:function(){b(this);D=c;A[0].style.width=a.w+z+C+"px";A[0].style.height=a.h+y+B+"px";d&&d()},step:function(){b(this)}})};d.resize=function(b){if(u){b=b||{};if(b.width)a.w=p(b.width,m)-z-C;if(b.innerWidth)a.w=p(b.innerWidth,m);k.css({width:a.w});if(b.height)a.h=p(b.height,o)-y-B;if(b.innerHeight)a.h=p(b.innerHeight,o);if(!b.innerHeight&&!b.height){b=k.wrapInner("<div style='overflow:auto'></div>").children();a.h=b.height();b.replaceWith(b.children())}k.css({height:a.h});d.position(a.transition===t?0:a.speed)}};d.prep=function(m){var c="hidden";function l(s){var p,f,m,c,l=h.length,q=a.loop;d.position(s,function(){function s(){E&&j[0].style.removeAttribute("filter")}if(u){E&&o&&k.fadeIn(100);k.show();w(hb);Z.show().html(a.title);if(l>1){typeof a.current==="string"&&Y.html(a.current.replace(/\{current\}/,g+1).replace(/\{total\}/,l)).show();I[q||g<l-1?"show":"hide"]().html(a.next);H[q||g?"show":"hide"]().html(a.previous);p=g?h[g-1]:h[l-1];m=g<l-1?h[g+1]:h[0];a.slideshow&&F.show();if(a.preloading){c=b.data(m,r).href||m.href;f=b.data(p,r).href||p.href;c=b.isFunction(c)?c.call(m):c;f=b.isFunction(f)?f.call(p):f;if(U(c))b("<img/>")[0].src=c;if(U(f))b("<img/>")[0].src=f}}K.hide();a.transition==="fade"?j.fadeTo(e,1,function(){s()}):s();n.bind(v+i,function(){d.position(0)});w(V,a.onComplete)}})}if(u){var o,e=a.transition===t?0:a.speed;n.unbind(v+i);k.remove();k=f(M).html(m);k.hide().appendTo(J.show()).css({width:function(){a.w=a.w||k.width();a.w=a.mw&&a.mw<a.w?a.mw:a.w;return a.w}(),overflow:a.scrolling?q:c}).css({height:function(){a.h=a.h||k.height();a.h=a.mh&&a.mh<a.h?a.mh:a.h;return a.h}()}).prependTo(s);J.hide();b("#"+i+"Photo").css({cssFloat:t,marginLeft:q,marginRight:q});X&&b("select").not(j.find("select")).filter(function(){return this.style.visibility!==c}).css({visibility:c}).one(N,function(){this.style.visibility="inherit"});a.transition==="fade"?j.fadeTo(e,0,function(){l(0)}):l(e)}};d.load=function(u){var n,c,s,q=d.prep;D=e;l=h[g];u||(a=cb(b.extend({},b.data(l,r))));w(Q);w(W,a.onLoad);a.h=a.height?p(a.height,o)-y-B:a.innerHeight&&p(a.innerHeight,o);a.w=a.width?p(a.width,m)-z-C:a.innerWidth&&p(a.innerWidth,m);a.mw=a.w;a.mh=a.h;if(a.maxWidth){a.mw=p(a.maxWidth,m)-z-C;a.mw=a.w&&a.w<a.mw?a.w:a.mw}if(a.maxHeight){a.mh=p(a.maxHeight,o)-y-B;a.mh=a.h&&a.h<a.mh?a.h:a.mh}n=a.href;K.show();if(a.inline){f().hide().insertBefore(b(n)[0]).one(Q,function(){b(this).replaceWith(k.children())});q(b(n))}else if(a.iframe){j.one(hb,function(){var c=b("<iframe frameborder='0' style='width:100%; height:100%; border:0; display:block'/>")[0];c.name=i+ +new Date;c.src=a.href;if(!a.scrolling)c.scrolling="no";if(E)c.allowtransparency="true";b(c).appendTo(k).one(Q,function(){c.src="//about:blank"})});q(" ")}else if(a.html)q(a.html);else if(U(n)){c=new Image;c.onload=function(){var e;c.onload=null;c.id=i+"Photo";b(c).css({border:t,display:"block",cssFloat:"left"});if(a.scalePhotos){s=function(){c.height-=c.height*e;c.width-=c.width*e};if(a.mw&&c.width>a.mw){e=(c.width-a.mw)/c.width;s()}if(a.mh&&c.height>a.mh){e=(c.height-a.mh)/c.height;s()}}if(a.h)c.style.marginTop=Math.max(a.h-c.height,0)/2+"px";h[1]&&(g<h.length-1||a.loop)&&b(c).css({cursor:"pointer"}).click(d.next);if(E)c.style.msInterpolationMode="bicubic";setTimeout(function(){q(c)},1)};setTimeout(function(){c.src=n},1)}else n&&J.load(n,function(d,c,a){q(c==="error"?"Request unsuccessful: "+a.statusText:b(this).children())})};d.next=function(){if(!D){g=g<h.length-1?g+1:0;d.load()}};d.prev=function(){if(!D){g=g?g-1:h.length-1;d.load()}};d.close=function(){if(u&&!O){O=e;u=c;w(N,a.onCleanup);n.unbind("."+i+" ."+P);x.fadeTo("fast",0);j.stop().fadeTo("fast",0,function(){w(Q);k.remove();j.add(x).css({opacity:1,cursor:q}).hide();setTimeout(function(){O=c;w(eb,a.onClosed)},1)})}};d.element=function(){return b(l)};d.settings=gb;b(d.init)})(jQuery,this);/*
 * JavaScript Debug - v0.4 - 6/22/2010
 * https://benalman.com/projects/javascript-debug-console-log/
 * 
 * Copyright (c) 2010 "Cowboy" Ben Alman
 * Dual licensed under the MIT and GPL licenses.
 * https://benalman.com/about/license/
 * 
 * With lots of help from Paul Irish!
 * https://paulirish.com/
 */
window.debug=(function(){var i=this,b=Array.prototype.slice,d=i.console,h={},f,g,m=9,c=["error","warn","info","debug","log"],l="assert clear count dir dirxml exception group groupCollapsed groupEnd profile profileEnd table time timeEnd trace".split(" "),j=l.length,a=[];while(--j>=0){(function(n){h[n]=function(){m!==0&&d&&d[n]&&d[n].apply(d,arguments)}})(l[j])}j=c.length;while(--j>=0){(function(n,o){h[o]=function(){var q=b.call(arguments),p=[o].concat(q);a.push(p);e(p);if(!d||!k(n)){return}d.firebug?d[o].apply(i,q):d[o]?d[o](q):d.log(q)}})(j,c[j])}function e(n){if(f&&(g||!d||!d.log)){f.apply(i,n)}}h.setLevel=function(n){m=typeof n==="number"?n:9};function k(n){return m>0?m>n:c.length+m<=n}h.setCallback=function(){var o=b.call(arguments),n=a.length,p=n;f=o.shift()||null;g=typeof o[0]==="boolean"?o.shift():false;p-=typeof o[0]==="number"?o.shift():n;while(p<n){e(a[p++])}};return h})();

function ellipsis(S,L,E){E=E||'...';L=L||10;return(S.length>L)?S.substr(0,(L-E.length))+E:S}
/**
 * HTML5 Placeholder jQuery Plugin v1.6
 * @author Mathias Bynens <https://mathiasbynens.be/>
 * @link https://github.com/mathiasbynens/Placeholder-jQuery-Plugin
 */
(function(){if("placeholder" in document.createElement("input")){$.fn.placeholder=function(){return this};return}function b(e){var d={},f=/^jQuery\d+$/;$.each(e.attributes,function(h,g){if(!f.test(g.name)){d[g.name]=g.value}});return d}function a(){var d=$(this);if(d.val()===d.attr("placeholder")&&d.hasClass("placeholder")){if(d.data("placeholder-password")){d.hide().next().show().focus()}else{d.val("").removeClass("placeholder")}}}function c(d){var h,g=$(this);if(g.val()===""||g.val()===g.attr("placeholder")){if(g.is(":password")){if(!g.data("placeholder-textinput")){try{h=g.clone().attr({type:"text"})}catch(f){h=$("<input>").attr($.extend(b(g[0]),{type:"text"}))}h.removeAttr("name").data("placeholder-password",true).bind("focus.placeholder",a);g.data("placeholder-textinput",h).before(h)}g=g.hide().prev().show()}g.addClass("placeholder").val(g.attr("placeholder"))}else{g.removeClass("placeholder")}}$(function(){$("form").bind("submit.placeholder",function(){var d=$(".placeholder",this).each(a);setTimeout(function(){d.each(c)},10)});$(window).bind("unload.placeholder",function(){$(".placeholder").val("")})});$.fn.placeholder=function(){return this.filter(":input[placeholder]").bind("focus.placeholder",a).bind("blur.placeholder",c).trigger("blur.placeholder").end()}})();
$.extend($.ui.autocomplete.prototype,{_renderItem:function(a,b){return $("<li></li>").data("item.autocomplete",b).append($("<a></a>")[this.options.html?"html":"text"](b.label)).appendTo(a)}})
$.fn.hashpages=function(a,b){b=typeof b=="string"?$.deparam(b):b||{};var c=$.extend({page_size:10,page:1},b),d=c.page,e=Math.ceil(a/c.page_size),f=e>5&&c.page>5?c.page-5:1,g=e>f+10?f+10:e,h="";delete c.page,b="?"+$.param(c)+"&page=",f>1&&(h+='<a href="'+b+1+'" title="Jump to First Page">1</a><span>...</span>'),d>1&&(h+='<a href="'+b+(d-1)+'" title="Jump to Previous Page">&lt;</a>');for(i=f;i<=g;i++)h+=d==i?'<span class="current">'+i+"</span>":'<a href="'+b+i+'" title="Jump to Page '+i+'">'+i+"</a>";d<e&&(h+='<a href="'+b+(d-0+1)+'" title="Jump to Next Page">&gt;</a>'),g<e&&(h+='<span>...</span><a href="'+b+e+'" title="Jump to Last Page">'+e+'</a>'),this.html(h).find("a").click(function(){$.bbq.pushState($(this).attr("href").replace("?","#"));return!1});return this}
$.fn.invite_to_battle=function(a){a=a||{};var b=a.className||"",c=this.html('<table class="'+b+'_pick"><tr><td><input type="text" placeholder="'+(a.defaultText||"")+'" /></td><td><img src="'+(btnSrc=a.btnSrc||"")+'" alt="" /></td></tr></table><div class="'+b+'_display"></div>'),d=c.find("input:text"),e=c.find("img"),f=c.find("."+b+"_display");c.bind({add:function(b,d){if(!f.find('input[value="'+d+'"]').length){var e=$('<div><input type="hidden" name="'+(a.fieldName||"")+'[]" value="'+d+'" />'+(a.linkBase?'<a href="'+a.linkBase+d+'" target="_blank">'+d+"</a>":d)+" <span>[x]</span></div>");e.find("span").click(function(){c.trigger("remove",$(this).siblings("input").val())}),f.prepend(e)}},remove:function(a,b){f.find('input[value="'+b+'"]').closest("div").remove()}}),d.keypress(function(a){if(a.which&&a.which==13||a.keyCode&&a.keyCode==13){c.trigger("add",d.val()),d.val("");return!1}}).autocomplete({minLength:1,html:1,source:$.map(a.data||[],function(a){return{value:a.alter_ego,label:'<span class="'+(a.is_online-0?"online":"offline")+'">'+a.alter_ego+"</span>"}}),select:function(a,b){e.click()},open:function(){$(this).removeClass("ui-corner-all").addClass("ui-corner-top")},close:function(){$(this).removeClass("ui-corner-top").addClass("ui-corner-all")}}).placeholder(),e.click(function(){c.trigger("add",d.val()),d.val("");return!1});return c}
