/*!
 * jQuery JavaScript Library v1.3.2
 * http://jquery.com/
 *
 * Copyright (c) 2009 John Resig
 * Dual licensed under the MIT and GPL licenses.
 * http://docs.jquery.com/License
 *
 * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009)
 * Revision: 6246
 */
/*
 * jQuery Form Plugin
 * version: 2.03 (01/20/2008)
 * @requires jQuery v1.1 or later
 *
 * Examples at: http://malsup.com/jquery/form/
 * Dual licensed under the MIT and GPL licenses:
 *   http://www.opensource.org/licenses/mit-license.php
 *   http://www.gnu.org/licenses/gpl.html
 *
 * Revision: $Id$
 */
/* Copyright (c) 2007 Paul Bakaus (paul.bakaus@googlemail.com) and Brandon Aaron (brandon.aaron@gmail.com || http://brandonaaron.net)
 * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
 * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
 *
 * $LastChangedDate: 2007-12-20 08:46:55 -0600 (Thu, 20 Dec 2007) $
 * $Rev: 4259 $
 *
 * Version: 1.2
 *
 * Requires: jQuery 1.2+
 */
/*
 * positionBy 1.0.7 (2008-01-29)
 *
 * Copyright (c) 2006,2007 Jonathan Sharp (http://jdsharp.us)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * http://jdsharp.us/
 *
 * Built upon jQuery 1.2.2 (http://jquery.com)
 * This also requires the jQuery dimensions plugin
 */
/* Copyright (c) 2006 Brandon Aaron (http://brandonaaron.net)
 * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) 
 * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
 *
 * $LastChangedDate: 2007-07-11 23:14:51 -0500 (Wed, 11 Jul 2007) $
 * $Rev: 2323 $
 *
 * Version 2.1
 */
/*
 * jdMenu 1.4.1 (2008-03-31)
 *
 * Copyright (c) 2006,2007 Jonathan Sharp (http://jdsharp.us)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * http://jdsharp.us/
 *
 * Built upon jQuery 1.2.1 (http://jquery.com)
 * This also requires the jQuery dimensions >= 1.2 plugin
 */
/*
 *
 * Copyright (c) 2006-2008 Sam Collett (http://www.texotela.co.uk)
 * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
 * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
 *
 * Version 2.2.3
 * Demo: http://www.texotela.co.uk/code/jquery/select/
 *
 * $LastChangedDate$
 * $Rev$
 *
 */
/*
 * The purpose of this plugin is to override the default .ajax call and
 * check for an X-QuakeLive-Redirect header in order to push the user
 * to the login page.
 *
 */
/**
 * Ajax Queue Plugin
 * 
 * Homepage: http://jquery.com/plugins/project/ajaxqueue
 * Documentation: http://docs.jquery.com/AjaxQueue
 */
/*
 * jQuery.ScrollTo
 * Copyright (c) 2007-2008 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com
 * Dual licensed under MIT and GPL.
 * Date: 2/19/2008
 */
/*
 * jqModal - Minimalist Modaling with jQuery
 *
 * Copyright (c) 2007 Brice Burgess <bhb@iceburg.net>, http://www.iceburg.net
 * Licensed under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 * 
 * $Version: 2007.??.?? +r12 beta
 * Requires: jQuery 1.1.3+
 */
/**
 * jQuery Lightbox
 * Version 0.5 - 11/29/2007
 * @author Warren Krewenki
 *
 * This package is distributed under the BSD license.
 * For full license information, see LICENSE.TXT
 *
 * Based on Lightbox 2 by Lokesh Dhakar (http://www.huddletogether.com/projects/lightbox2/)
 * Originally written to make use of the Prototype framework, and Script.acalo.us, now altered to use jQuery.
 *
 *
 **/
/*
 * Superfish v1.4.8 - jQuery menu widget
 * Copyright (c) 2008 Joel Birch
 *
 * Dual licensed under the MIT and GPL licenses:
 * 	http://www.opensource.org/licenses/mit-license.php
 * 	http://www.gnu.org/licenses/gpl.html
 *
 * CHANGELOG: http://users.tpg.com.au/j_birch/plugins/superfish/changelog.txt
 */
/*
 * 
 * TableSorter 2.0 - Client-side table sorting with ease!
 * Version 2.0.3
 * @requires jQuery v1.2.3
 * 
 * Copyright (c) 2007 Christian Bach
 * Examples and docs at: http://tablesorter.com
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 * 
 */
/*
 * hoverIntent is similar to jQuery's built-in "hover" function except that
 * instead of firing the onMouseOver event immediately, hoverIntent checks
 * to see if the user's mouse has slowed down (beneath the sensitivity
 * threshold) before firing the onMouseOver event.
 * 
 * hoverIntent r5 // 2007.03.27 // jQuery 1.1.2+
 * <http://cherne.net/brian/resources/jquery.hoverIntent.html>
 *
 * hoverIntent is currently available for use in all personal or commercial 
 * projects under both MIT and GPL licenses. This means that you can choose 
 * the license that best suits your project, and use it accordingly.
 */
/**
 * jCarouselLite - jQuery plugin to navigate images/any content in a carousel style widget.
 * @requires jQuery v1.2 or above
 *
 * http://gmarwaha.com/jquery/jcarousellite/
 *
 * Copyright (c) 2007 Ganeshji Marwaha (gmarwaha.com)
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 *
 * Version: 1.0.1
 * Note: Requires jquery 1.2 or above from version 1.0.1
 */
/*
 * jQuery UI Effects 1.7.2
 *
 * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * http://docs.jquery.com/UI/Effects/
 */
/**
*
*  Base64 encode / decode
*  http://www.webtoolkit.info/
*
**/
/*
 * OpenX 2.6.4 "Single Page Call" Flash Library - http://www.openx.org
 */
/*
 * Copyright (c) 2007-2009 Id Software, Inc.  All rights reserved.
 */
var a;
(function(){function b(f,t){t.src?p.ajax({url:t.src,async:false,dataType:"script"}):p.globalEval(t.text||t.textContent||t.innerHTML||"");t.parentNode&&t.parentNode.removeChild(t)}function c(){return+new Date}function o(f,t){return f[0]&&parseInt(p.curCSS(f[0],t,true),10)||0}function d(){return false}function e(){return true}function g(f){var t=RegExp("(^|\\.)"+f.type+"(\\.|$)"),C=true,G=[];p.each(p.data(this,"events").live||[],function(M,Q){if(t.test(Q.type))(M=p(f.target).closest(Q.data)[0])&&G.push({elem:M,
fn:Q})});G.sort(function(M,Q){return p.data(M.elem,"closest")-p.data(Q.elem,"closest")});p.each(G,function(){if(this.fn.call(this.elem,f,this.fn.data)===false)return C=false});return C}function k(f,t){return["live",f,t.replace(/\./g,"`").replace(/ /g,"|")].join(".")}function l(){if(!P){P=true;if(document.addEventListener)document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false);p.ready()},false);else if(document.attachEvent){document.attachEvent("onreadystatechange",
function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);p.ready()}});document.documentElement.doScroll&&q==q.top&&function(){if(!p.isReady){try{document.documentElement.doScroll("left")}catch(f){setTimeout(arguments.callee,0);return}p.ready()}}()}p.event.add(q,"load",p.ready)}}function n(f,t){var C={};p.each(L.concat.apply([],L.slice(0,t)),function(){C[this]=f});return C}var q=this,u,B=q.jQuery,x=q.$,p=q.jQuery=q.$=function(f,t){return new p.fn.init(f,
t)},z=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,K=/^.[^:#\[\.,]*$/;p.fn=p.prototype={init:function(f,t){f=f||document;if(f.nodeType){this[0]=f;this.length=1;this.context=f;return this}if(typeof f==="string"){var C=z.exec(f);if(C&&(C[1]||!t))if(C[1])f=p.clean([C[1]],t);else{if((t=document.getElementById(C[3]))&&t.id!=C[3])return p().find(f);C=p(t||[]);C.context=document;C.selector=f;return C}else return p(t).find(f)}else if(p.isFunction(f))return p(document).ready(f);if(f.selector&&f.context){this.selector=
f.selector;this.context=f.context}return this.setArray(p.isArray(f)?f:p.makeArray(f))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(f){return f===u?Array.prototype.slice.call(this):this[f]},pushStack:function(f,t,C){f=p(f);f.prevObject=this;f.context=this.context;if(t==="find")f.selector=this.selector+(this.selector?" ":"")+C;else if(t)f.selector=this.selector+"."+t+"("+C+")";return f},setArray:function(f){this.length=0;Array.prototype.push.apply(this,f);return this},
each:function(f,t){return p.each(this,f,t)},index:function(f){return p.inArray(f&&f.jquery?f[0]:f,this)},attr:function(f,t,C){var G=f;if(typeof f==="string")if(t===u)return this[0]&&p[C||"attr"](this[0],f);else{G={};G[f]=t}return this.each(function(M){for(f in G)p.attr(C?this.style:this,f,p.prop(this,G[f],C,M,f))})},css:function(f,t){if((f=="width"||f=="height")&&parseFloat(t)<0)t=u;return this.attr(f,t,"curCSS")},text:function(f){if(typeof f!=="object"&&f!=null)return this.empty().append((this[0]&&
this[0].ownerDocument||document).createTextNode(f));var t="";p.each(f||this,function(){p.each(this.childNodes,function(){if(this.nodeType!=8)t+=this.nodeType!=1?this.nodeValue:p.fn.text([this])})});return t},wrapAll:function(f){if(this[0]){f=p(f,this[0].ownerDocument).clone();this[0].parentNode&&f.insertBefore(this[0]);f.map(function(){for(var t=this;t.firstChild;)t=t.firstChild;return t}).append(this)}return this},wrapInner:function(f){return this.each(function(){p(this).contents().wrapAll(f)})},
wrap:function(f){return this.each(function(){p(this).wrapAll(f)})},append:function(){return this.domManip(arguments,true,function(f){this.nodeType==1&&this.appendChild(f)})},prepend:function(){return this.domManip(arguments,true,function(f){this.nodeType==1&&this.insertBefore(f,this.firstChild)})},before:function(){return this.domManip(arguments,false,function(f){this.parentNode.insertBefore(f,this)})},after:function(){return this.domManip(arguments,false,function(f){this.parentNode.insertBefore(f,
this.nextSibling)})},end:function(){return this.prevObject||p([])},push:[].push,sort:[].sort,splice:[].splice,find:function(f){if(this.length===1){var t=this.pushStack([],"find",f);t.length=0;p.find(f,this[0],t);return t}else return this.pushStack(p.unique(p.map(this,function(C){return p.find(f,C)})),"find",f)},clone:function(f){var t=this.map(function(){if(!p.support.noCloneEvent&&!p.isXMLDoc(this)){var M=this.outerHTML;if(!M){M=this.ownerDocument.createElement("div");M.appendChild(this.cloneNode(true));
M=M.innerHTML}return p.clean([M.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]}else return this.cloneNode(true)});if(f===true){var C=this.find("*").andSelf(),G=0;t.find("*").andSelf().each(function(){if(this.nodeName===C[G].nodeName){var M=p.data(C[G],"events");for(var Q in M)for(var T in M[Q])p.event.add(this,Q,M[Q][T],M[Q][T].data);G++}})}return t},filter:function(f){return this.pushStack(p.isFunction(f)&&p.grep(this,function(t,C){return f.call(t,C)})||p.multiFilter(f,p.grep(this,
function(t){return t.nodeType===1})),"filter",f)},closest:function(f){var t=p.expr.match.POS.test(f)?p(f):null,C=0;return this.map(function(){for(var G=this;G&&G.ownerDocument;){if(t?t.index(G)>-1:p(G).is(f)){p.data(G,"closest",C);return G}G=G.parentNode;C++}})},not:function(f){if(typeof f==="string")if(K.test(f))return this.pushStack(p.multiFilter(f,this,true),"not",f);else f=p.multiFilter(f,this);var t=f.length&&f[f.length-1]!==u&&!f.nodeType;return this.filter(function(){return t?p.inArray(this,
f)<0:this!=f})},add:function(f){return this.pushStack(p.unique(p.merge(this.get(),typeof f==="string"?p(f):p.makeArray(f))))},is:function(f){return!!f&&p.multiFilter(f,this).length>0},hasClass:function(f){return!!f&&this.is("."+f)},val:function(f){if(f===u){var t=this[0];if(t){if(p.nodeName(t,"option"))return(t.attributes.value||{}).specified?t.value:t.text;if(p.nodeName(t,"select")){var C=t.selectedIndex,G=[],M=t.options;t=t.type=="select-one";if(C<0)return null;var Q=t?C:0;for(C=t?C+1:M.length;Q<
C;Q++){var T=M[Q];if(T.selected){f=p(T).val();if(t)return f;G.push(f)}}return G}return(t.value||"").replace(/\r/g,"")}}else{if(typeof f==="number")f+="";return this.each(function(){if(this.nodeType==1)if(p.isArray(f)&&/radio|checkbox/.test(this.type))this.checked=p.inArray(this.value,f)>=0||p.inArray(this.name,f)>=0;else if(p.nodeName(this,"select")){var V=p.makeArray(f);p("option",this).each(function(){this.selected=p.inArray(this.value,V)>=0||p.inArray(this.text,V)>=0});if(!V.length)this.selectedIndex=
-1}else this.value=f})}},html:function(f){return f===u?this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null:this.empty().append(f)},replaceWith:function(f){return this.after(f).remove()},eq:function(f){return this.slice(f,+f+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(f){return this.pushStack(p.map(this,function(t,C){return f.call(t,C,t)}))},andSelf:function(){return this.add(this.prevObject)},
domManip:function(f,t,C){function G(Z,ca){return t&&p.nodeName(Z,"table")&&p.nodeName(ca,"tr")?Z.getElementsByTagName("tbody")[0]||Z.appendChild(Z.ownerDocument.createElement("tbody")):Z}if(this[0]){var M=(this[0].ownerDocument||this[0]).createDocumentFragment();f=p.clean(f,this[0].ownerDocument||this[0],M);var Q=M.firstChild;if(Q)for(var T=0,V=this.length;T<V;T++)C.call(G(this[T],Q),this.length>1||T>0?M.cloneNode(true):M);f&&p.each(f,b)}return this}};p.fn.init.prototype=p.fn;p.extend=p.fn.extend=
function(){var f=arguments[0]||{},t=1,C=arguments.length,G=false,M;if(typeof f==="boolean"){G=f;f=arguments[1]||{};t=2}if(typeof f!=="object"&&!p.isFunction(f))f={};if(C==t){f=this;--t}for(;t<C;t++)if((M=arguments[t])!=null)for(var Q in M){var T=f[Q],V=M[Q];if(f!==V)if(G&&V&&typeof V==="object"&&!V.nodeType)f[Q]=p.extend(G,T||(V.length!=null?[]:{}),V);else if(V!==u)f[Q]=V}return f};var v=/z-?index|font-?weight|opacity|zoom|line-?height/i,E=document.defaultView||{},y=Object.prototype.toString;p.extend({noConflict:function(f){q.$=
x;if(f)q.jQuery=B;return p},isFunction:function(f){return y.call(f)==="[object Function]"},isArray:function(f){return y.call(f)==="[object Array]"},isXMLDoc:function(f){return f.nodeType===9&&f.documentElement.nodeName!=="HTML"||!!f.ownerDocument&&p.isXMLDoc(f.ownerDocument)},globalEval:function(f){if(f&&/\S/.test(f)){var t=document.getElementsByTagName("head")[0]||document.documentElement,C=document.createElement("script");C.type="text/javascript";if(p.support.scriptEval)C.appendChild(document.createTextNode(f));
else C.text=f;t.insertBefore(C,t.firstChild);t.removeChild(C)}},nodeName:function(f,t){return f.nodeName&&f.nodeName.toUpperCase()==t.toUpperCase()},each:function(f,t,C){var G,M=0,Q=f.length;if(C)if(Q===u)for(G in f){if(t.apply(f[G],C)===false)break}else for(;M<Q;){if(t.apply(f[M++],C)===false)break}else if(Q===u)for(G in f){if(t.call(f[G],G,f[G])===false)break}else for(C=f[0];M<Q&&t.call(C,M,C)!==false;C=f[++M]);return f},prop:function(f,t,C,G,M){if(p.isFunction(t))t=t.call(f,G);return typeof t===
"number"&&C=="curCSS"&&!v.test(M)?t+"px":t},className:{add:function(f,t){p.each((t||"").split(/\s+/),function(C,G){if(f.nodeType==1&&!p.className.has(f.className,G))f.className+=(f.className?" ":"")+G})},remove:function(f,t){if(f.nodeType==1)f.className=t!==u?p.grep(f.className.split(/\s+/),function(C){return!p.className.has(t,C)}).join(" "):""},has:function(f,t){return f&&p.inArray(t,(f.className||f).toString().split(/\s+/))>-1}},swap:function(f,t,C){var G={};for(var M in t){G[M]=f.style[M];f.style[M]=
t[M]}C.call(f);for(M in t)f.style[M]=G[M]},css:function(f,t,C,G){if(t=="width"||t=="height"){var M;C={position:"absolute",visibility:"hidden",display:"block"};var Q=t=="width"?["Left","Right"]:["Top","Bottom"];function T(){M=t=="width"?f.offsetWidth:f.offsetHeight;G!=="border"&&p.each(Q,function(){G||(M-=parseFloat(p.curCSS(f,"padding"+this,true))||0);if(G==="margin")M+=parseFloat(p.curCSS(f,"margin"+this,true))||0;else M-=parseFloat(p.curCSS(f,"border"+this+"Width",true))||0})}f.offsetWidth!==0?
T():p.swap(f,C,T);return Math.max(0,Math.round(M))}return p.curCSS(f,t,C)},curCSS:function(f,t,C){var G,M=f.style;if(t=="opacity"&&!p.support.opacity){G=p.attr(M,"opacity");return G==""?"1":G}if(t.match(/float/i))t=D;if(!C&&M&&M[t])G=M[t];else if(E.getComputedStyle){if(t.match(/float/i))t="float";t=t.replace(/([A-Z])/g,"-$1").toLowerCase();if(f=E.getComputedStyle(f,null))G=f.getPropertyValue(t);if(t=="opacity"&&G=="")G="1"}else if(f.currentStyle){G=t.replace(/\-(\w)/g,function(Q,T){return T.toUpperCase()});
G=f.currentStyle[t]||f.currentStyle[G];if(!/^\d+(px)?$/i.test(G)&&/^\d/.test(G)){t=M.left;C=f.runtimeStyle.left;f.runtimeStyle.left=f.currentStyle.left;M.left=G||0;G=M.pixelLeft+"px";M.left=t;f.runtimeStyle.left=C}}return G},clean:function(f,t,C){t=t||document;if(typeof t.createElement==="undefined")t=t.ownerDocument||t[0]&&t[0].ownerDocument||document;if(!C&&f.length===1&&typeof f[0]==="string"){var G=/^<(\w+)\s*\/?>$/.exec(f[0]);if(G)return[t.createElement(G[1])]}var M=[];G=[];var Q=t.createElement("div");
p.each(f,function(T,V){if(typeof V==="number")V+="";if(V){if(typeof V==="string"){V=V.replace(/(<(\w+)[^>]*?)\/>/g,function(da,fa,ha){return ha.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?da:fa+"></"+ha+">"});T=V.replace(/^\s+/,"").substring(0,10).toLowerCase();var Z=!T.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!T.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||T.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!T.indexOf("<tr")&&[2,
"<table><tbody>","</tbody></table>"]||(!T.indexOf("<td")||!T.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!T.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!p.support.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];for(Q.innerHTML=Z[1]+V+Z[2];Z[0]--;)Q=Q.lastChild;if(!p.support.tbody){var ca=/<tbody/i.test(V);T=!T.indexOf("<table")&&!ca?Q.firstChild&&Q.firstChild.childNodes:Z[1]=="<table>"&&!ca?Q.childNodes:[];for(Z=T.length-1;Z>=0;--Z)p.nodeName(T[Z],
"tbody")&&!T[Z].childNodes.length&&T[Z].parentNode.removeChild(T[Z])}!p.support.leadingWhitespace&&/^\s/.test(V)&&Q.insertBefore(t.createTextNode(V.match(/^\s*/)[0]),Q.firstChild);V=p.makeArray(Q.childNodes)}if(V.nodeType)M.push(V);else M=p.merge(M,V)}});if(C){for(f=0;M[f];f++)if(p.nodeName(M[f],"script")&&(!M[f].type||M[f].type.toLowerCase()==="text/javascript"))G.push(M[f].parentNode?M[f].parentNode.removeChild(M[f]):M[f]);else{M[f].nodeType===1&&M.splice.apply(M,[f+1,0].concat(p.makeArray(M[f].getElementsByTagName("script"))));
C.appendChild(M[f])}return G}return M},attr:function(f,t,C){if(!(!f||f.nodeType==3||f.nodeType==8)){var G=!p.isXMLDoc(f),M=C!==u;t=G&&p.props[t]||t;if(f.tagName){var Q=/href|src|style/.test(t);if(t in f&&G&&!Q){if(M){if(t=="type"&&p.nodeName(f,"input")&&f.parentNode)throw"type property can't be changed";f[t]=C}if(p.nodeName(f,"form")&&f.getAttributeNode(t))return f.getAttributeNode(t).nodeValue;if(t=="tabIndex")return(t=f.getAttributeNode("tabIndex"))&&t.specified?t.value:f.nodeName.match(/(button|input|object|select|textarea)/i)?
0:f.nodeName.match(/^(a|area)$/i)&&f.href?0:u;return f[t]}if(!p.support.style&&G&&t=="style")return p.attr(f.style,"cssText",C);M&&f.setAttribute(t,""+C);f=!p.support.hrefNormalized&&G&&Q?f.getAttribute(t,2):f.getAttribute(t);return f===null?u:f}if(!p.support.opacity&&t=="opacity"){if(M){f.zoom=1;f.filter=(f.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(C)+""=="NaN"?"":"alpha(opacity="+C*100+")")}return f.filter&&f.filter.indexOf("opacity=")>=0?parseFloat(f.filter.match(/opacity=([^)]*)/)[1])/
100+"":""}t=t.replace(/-([a-z])/ig,function(T,V){return V.toUpperCase()});if(M)f[t]=C;return f[t]}},trim:function(f){return(f||"").replace(/^\s+|\s+$/g,"")},makeArray:function(f){var t=[];if(f!=null){var C=f.length;if(C==null||typeof f==="string"||p.isFunction(f)||f.setInterval)t[0]=f;else for(;C;)t[--C]=f[C]}return t},inArray:function(f,t){for(var C=0,G=t.length;C<G;C++)if(t[C]===f)return C;return-1},merge:function(f,t){var C=0,G,M=f.length;if(p.support.getAll)for(;(G=t[C++])!=null;)f[M++]=G;else for(;(G=
t[C++])!=null;)if(G.nodeType!=8)f[M++]=G;return f},unique:function(f){var t=[],C={};try{for(var G=0,M=f.length;G<M;G++){var Q=p.data(f[G]);if(!C[Q]){C[Q]=true;t.push(f[G])}}}catch(T){t=f}return t},grep:function(f,t,C){for(var G=[],M=0,Q=f.length;M<Q;M++)!C!=!t(f[M],M)&&G.push(f[M]);return G},map:function(f,t){for(var C=[],G=0,M=f.length;G<M;G++){var Q=t(f[G],G);if(Q!=null)C[C.length]=Q}return C.concat.apply([],C)}});var m=navigator.userAgent.toLowerCase();p.browser={version:(m.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||
[0,"0"])[1],safari:/webkit/.test(m),opera:/opera/.test(m),msie:/msie/.test(m)&&!/opera/.test(m),mozilla:/mozilla/.test(m)&&!/(compatible|webkit)/.test(m)};p.each({parent:function(f){return f.parentNode},parents:function(f){return p.dir(f,"parentNode")},next:function(f){return p.nth(f,2,"nextSibling")},prev:function(f){return p.nth(f,2,"previousSibling")},nextAll:function(f){return p.dir(f,"nextSibling")},prevAll:function(f){return p.dir(f,"previousSibling")},siblings:function(f){return p.sibling(f.parentNode.firstChild,
f)},children:function(f){return p.sibling(f.firstChild)},contents:function(f){return p.nodeName(f,"iframe")?f.contentDocument||f.contentWindow.document:p.makeArray(f.childNodes)}},function(f,t){p.fn[f]=function(C){var G=p.map(this,t);if(C&&typeof C=="string")G=p.multiFilter(C,G);return this.pushStack(p.unique(G),f,C)}});p.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(f,t){p.fn[f]=function(C){for(var G=[],M=p(C),Q=0,T=M.length;Q<
T;Q++){var V=(Q>0?this.clone(true):this).get();p.fn[t].apply(p(M[Q]),V);G=G.concat(V)}return this.pushStack(G,f,C)}});p.each({removeAttr:function(f){p.attr(this,f,"");this.nodeType==1&&this.removeAttribute(f)},addClass:function(f){p.className.add(this,f)},removeClass:function(f){p.className.remove(this,f)},toggleClass:function(f,t){if(typeof t!=="boolean")t=!p.className.has(this,f);p.className[t?"add":"remove"](this,f)},remove:function(f){if(!f||p.filter(f,[this]).length){p("*",this).add([this]).each(function(){p.event.remove(this);
p.removeData(this)});this.parentNode&&this.parentNode.removeChild(this)}},empty:function(){for(p(this).children().remove();this.firstChild;)this.removeChild(this.firstChild)}},function(f,t){p.fn[f]=function(){return this.each(t,arguments)}});var r="jQuery"+c(),A=0,J={};p.extend({cache:{},data:function(f,t,C){f=f==q?J:f;var G=f[r];G||(G=f[r]=++A);if(t&&!p.cache[G])p.cache[G]={};if(C!==u)p.cache[G][t]=C;return t?p.cache[G][t]:G},removeData:function(f,t){f=f==q?J:f;var C=f[r];if(t){if(p.cache[C]){delete p.cache[C][t];
t="";for(t in p.cache[C])break;t||p.removeData(f)}}else{try{delete f[r]}catch(G){f.removeAttribute&&f.removeAttribute(r)}delete p.cache[C]}},queue:function(f,t,C){if(f){t=(t||"fx")+"queue";var G=p.data(f,t);if(!G||p.isArray(C))G=p.data(f,t,p.makeArray(C));else C&&G.push(C)}return G},dequeue:function(f,t){var C=p.queue(f,t),G=C.shift();if(!t||t==="fx")G=C[0];G!==u&&G.call(f)}});p.fn.extend({data:function(f,t){var C=f.split(".");C[1]=C[1]?"."+C[1]:"";if(t===u){var G=this.triggerHandler("getData"+C[1]+
"!",[C[0]]);if(G===u&&this.length)G=p.data(this[0],f);return G===u&&C[1]?this.data(C[0]):G}else return this.trigger("setData"+C[1]+"!",[C[0],t]).each(function(){p.data(this,f,t)})},removeData:function(f){return this.each(function(){p.removeData(this,f)})},queue:function(f,t){if(typeof f!=="string"){t=f;f="fx"}if(t===u)return p.queue(this[0],f);return this.each(function(){var C=p.queue(this,f,t);f=="fx"&&C.length==1&&C[0].call(this)})},dequeue:function(f){return this.each(function(){p.dequeue(this,
f)})}});(function(){function f(F,O,S,U,W,X){W=F=="previousSibling"&&!X;for(var Y=0,ea=U.length;Y<ea;Y++){var aa=U[Y];if(aa){if(W&&aa.nodeType===1){aa.sizcache=S;aa.sizset=Y}aa=aa[F];for(var ga=false;aa;){if(aa.sizcache===S){ga=U[aa.sizset];break}if(aa.nodeType===1&&!X){aa.sizcache=S;aa.sizset=Y}if(aa.nodeName===O){ga=aa;break}aa=aa[F]}U[Y]=ga}}}function t(F,O,S,U,W,X){W=F=="previousSibling"&&!X;for(var Y=0,ea=U.length;Y<ea;Y++){var aa=U[Y];if(aa){if(W&&aa.nodeType===1){aa.sizcache=S;aa.sizset=Y}aa=
aa[F];for(var ga=false;aa;){if(aa.sizcache===S){ga=U[aa.sizset];break}if(aa.nodeType===1){if(!X){aa.sizcache=S;aa.sizset=Y}if(typeof O!=="string"){if(aa===O){ga=true;break}}else if(Q.filter(O,[aa]).length>0){ga=aa;break}}aa=aa[F]}U[Y]=ga}}}var C=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,G=0,M=Object.prototype.toString;function Q(F,O,S,U){S=S||[];O=O||document;if(O.nodeType!==1&&O.nodeType!==9)return[];if(!F||typeof F!=="string")return S;
var W=[],X,Y,ea,aa=true;for(C.lastIndex=0;(X=C.exec(F))!==null;){W.push(X[1]);if(X[2]){ea=RegExp.rightContext;break}}if(W.length>1&&V.exec(F))if(W.length===2&&T.relative[W[0]])X=ja(W[0]+W[1],O);else for(X=T.relative[W[0]]?[O]:Q(W.shift(),O);W.length;){F=W.shift();if(T.relative[F])F+=W.shift();X=ja(F,X)}else{X=U?{expr:W.pop(),set:ca(U)}:Q.find(W.pop(),W.length===1&&O.parentNode?O.parentNode:O,ba(O));X=Q.filter(X.expr,X.set);if(W.length>0)Y=ca(X);else aa=false;for(;W.length;){var ga=W.pop(),ia=ga;if(T.relative[ga])ia=
W.pop();else ga="";if(ia==null)ia=O;T.relative[ga](Y,ia,ba(O))}}Y||(Y=X);if(!Y)throw"Syntax error, unrecognized expression: "+(ga||F);if(M.call(Y)==="[object Array]")if(aa)if(O.nodeType===1)for(F=0;Y[F]!=null;F++){if(Y[F]&&(Y[F]===true||Y[F].nodeType===1&&ha(O,Y[F])))S.push(X[F])}else for(F=0;Y[F]!=null;F++)Y[F]&&Y[F].nodeType===1&&S.push(X[F]);else S.push.apply(S,Y);else ca(Y,S);if(ea){Q(ea,O,S,U);if(fa){hasDuplicate=false;S.sort(fa);if(hasDuplicate)for(F=1;F<S.length;F++)S[F]===S[F-1]&&S.splice(F--,
1)}}return S}Q.matches=function(F,O){return Q(F,null,null,O)};Q.find=function(F,O,S){var U,W;if(!F)return[];for(var X=0,Y=T.order.length;X<Y;X++){var ea=T.order[X];if(W=T.match[ea].exec(F)){var aa=RegExp.leftContext;if(aa.substr(aa.length-1)!=="\\"){W[1]=(W[1]||"").replace(/\\/g,"");U=T.find[ea](W,O,S);if(U!=null){F=F.replace(T.match[ea],"");break}}}}U||(U=O.getElementsByTagName("*"));return{set:U,expr:F}};Q.filter=function(F,O,S,U){for(var W=F,X=[],Y=O,ea,aa,ga=O&&O[0]&&ba(O[0]);F&&O.length;){for(var ia in T.filter)if((ea=
T.match[ia].exec(F))!=null){var oa=T.filter[ia],ka,la;aa=false;if(Y==X)X=[];if(T.preFilter[ia])if(ea=T.preFilter[ia](ea,Y,S,X,U,ga)){if(ea===true)continue}else aa=ka=true;if(ea)for(var ma=0;(la=Y[ma])!=null;ma++)if(la){ka=oa(la,ea,ma,Y);var na=U^!!ka;if(S&&ka!=null)if(na)aa=true;else Y[ma]=false;else if(na){X.push(la);aa=true}}if(ka!==u){S||(Y=X);F=F.replace(T.match[ia],"");if(!aa)return[];break}}if(F==W)if(aa==null)throw"Syntax error, unrecognized expression: "+F;else break;W=F}return Y};var T=Q.selectors=
{order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},
attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(F){return F.getAttribute("href")}},relative:{"+":function(F,O,S){var U=typeof O==="string",W=U&&!/\W/.test(O);U=U&&!W;if(W&&!S)O=O.toUpperCase();S=0;W=F.length;for(var X;S<W;S++)if(X=F[S]){for(;(X=X.previousSibling)&&X.nodeType!==1;);F[S]=U||X&&X.nodeName===O?X||false:X===O}U&&Q.filter(O,F,true)},">":function(F,O,S){var U=typeof O==="string";if(U&&!/\W/.test(O)){O=S?O:O.toUpperCase();S=0;for(var W=F.length;S<W;S++){var X=F[S];
if(X){U=X.parentNode;F[S]=U.nodeName===O?U:false}}}else{S=0;for(W=F.length;S<W;S++)if(X=F[S])F[S]=U?X.parentNode:X.parentNode===O;U&&Q.filter(O,F,true)}},"":function(F,O,S){var U=G++,W=t;if(!O.match(/\W/)){var X=O=S?O:O.toUpperCase();W=f}W("parentNode",O,U,F,X,S)},"~":function(F,O,S){var U=G++,W=t;if(typeof O==="string"&&!O.match(/\W/)){var X=O=S?O:O.toUpperCase();W=f}W("previousSibling",O,U,F,X,S)}},find:{ID:function(F,O,S){if(typeof O.getElementById!=="undefined"&&!S)return(F=O.getElementById(F[1]))?
[F]:[]},NAME:function(F,O){if(typeof O.getElementsByName!=="undefined"){var S=[];O=O.getElementsByName(F[1]);for(var U=0,W=O.length;U<W;U++)O[U].getAttribute("name")===F[1]&&S.push(O[U]);return S.length===0?null:S}},TAG:function(F,O){return O.getElementsByTagName(F[1])}},preFilter:{CLASS:function(F,O,S,U,W,X){F=" "+F[1].replace(/\\/g,"")+" ";if(X)return F;X=0;for(var Y;(Y=O[X])!=null;X++)if(Y)if(W^(Y.className&&(" "+Y.className+" ").indexOf(F)>=0))S||U.push(Y);else if(S)O[X]=false;return false},ID:function(F){return F[1].replace(/\\/g,
"")},TAG:function(F,O){for(var S=0;O[S]===false;S++);return O[S]&&ba(O[S])?F[1]:F[1].toUpperCase()},CHILD:function(F){if(F[1]=="nth"){var O=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(F[2]=="even"&&"2n"||F[2]=="odd"&&"2n+1"||!/\D/.test(F[2])&&"0n+"+F[2]||F[2]);F[2]=O[1]+(O[2]||1)-0;F[3]=O[3]-0}F[0]=G++;return F},ATTR:function(F,O,S,U,W,X){O=F[1].replace(/\\/g,"");if(!X&&T.attrMap[O])F[1]=T.attrMap[O];if(F[2]==="~=")F[4]=" "+F[4]+" ";return F},PSEUDO:function(F,O,S,U,W){if(F[1]==="not")if(F[3].match(C).length>
1||/^\w/.test(F[3]))F[3]=Q(F[3],null,null,O);else{F=Q.filter(F[3],O,S,true^W);S||U.push.apply(U,F);return false}else if(T.match.POS.test(F[0])||T.match.CHILD.test(F[0]))return true;return F},POS:function(F){F.unshift(true);return F}},filters:{enabled:function(F){return F.disabled===false&&F.type!=="hidden"},disabled:function(F){return F.disabled===true},checked:function(F){return F.checked===true},selected:function(F){return F.selected===true},parent:function(F){return!!F.firstChild},empty:function(F){return!F.firstChild},
has:function(F,O,S){return!!Q(S[3],F).length},header:function(F){return/h\d/i.test(F.nodeName)},text:function(F){return"text"===F.type},radio:function(F){return"radio"===F.type},checkbox:function(F){return"checkbox"===F.type},file:function(F){return"file"===F.type},password:function(F){return"password"===F.type},submit:function(F){return"submit"===F.type},image:function(F){return"image"===F.type},reset:function(F){return"reset"===F.type},button:function(F){return"button"===F.type||F.nodeName.toUpperCase()===
"BUTTON"},input:function(F){return/input|select|textarea|button/i.test(F.nodeName)}},setFilters:{first:function(F,O){return O===0},last:function(F,O,S,U){return O===U.length-1},even:function(F,O){return O%2===0},odd:function(F,O){return O%2===1},lt:function(F,O,S){return O<S[3]-0},gt:function(F,O,S){return O>S[3]-0},nth:function(F,O,S){return S[3]-0==O},eq:function(F,O,S){return S[3]-0==O}},filter:{PSEUDO:function(F,O,S,U){var W=O[1],X=T.filters[W];if(X)return X(F,S,O,U);else if(W==="contains")return(F.textContent||
F.innerText||"").indexOf(O[3])>=0;else if(W==="not"){O=O[3];S=0;for(U=O.length;S<U;S++)if(O[S]===F)return false;return true}},CHILD:function(F,O){var S=O[1],U=F;switch(S){case "only":case "first":for(;U=U.previousSibling;)if(U.nodeType===1)return false;if(S=="first")return true;U=F;case "last":for(;U=U.nextSibling;)if(U.nodeType===1)return false;return true;case "nth":S=O[2];var W=O[3];if(S==1&&W==0)return true;O=O[0];var X=F.parentNode;if(X&&(X.sizcache!==O||!F.nodeIndex)){var Y=0;for(U=X.firstChild;U;U=
U.nextSibling)if(U.nodeType===1)U.nodeIndex=++Y;X.sizcache=O}F=F.nodeIndex-W;return S==0?F==0:F%S==0&&F/S>=0}},ID:function(F,O){return F.nodeType===1&&F.getAttribute("id")===O},TAG:function(F,O){return O==="*"&&F.nodeType===1||F.nodeName===O},CLASS:function(F,O){return(" "+(F.className||F.getAttribute("class"))+" ").indexOf(O)>-1},ATTR:function(F,O){var S=O[1];F=T.attrHandle[S]?T.attrHandle[S](F):F[S]!=null?F[S]:F.getAttribute(S);S=F+"";var U=O[2];O=O[4];return F==null?U==="!=":U==="="?S===O:U===
"*="?S.indexOf(O)>=0:U==="~="?(" "+S+" ").indexOf(O)>=0:!O?S&&F!==false:U==="!="?S!=O:U==="^="?S.indexOf(O)===0:U==="$="?S.substr(S.length-O.length)===O:U==="|="?S===O||S.substr(0,O.length+1)===O+"-":false},POS:function(F,O,S,U){var W=O[2];if(W=T.setFilters[W])return W(F,S,O,U)}}},V=T.match.POS;for(var Z in T.match)T.match[Z]=RegExp(T.match[Z].source+/(?![^\[]*\])(?![^\(]*\))/.source);function ca(F,O){F=Array.prototype.slice.call(F);if(O){O.push.apply(O,F);return O}return F}try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(da){ca=
function(F,O){O=O||[];if(M.call(F)==="[object Array]")Array.prototype.push.apply(O,F);else if(typeof F.length==="number")for(var S=0,U=F.length;S<U;S++)O.push(F[S]);else for(S=0;F[S];S++)O.push(F[S]);return O}}var fa;if(document.documentElement.compareDocumentPosition)fa=function(F,O){F=F.compareDocumentPosition(O)&4?-1:F===O?0:1;if(F===0)hasDuplicate=true;return F};else if("sourceIndex"in document.documentElement)fa=function(F,O){F=F.sourceIndex-O.sourceIndex;if(F===0)hasDuplicate=true;return F};
else if(document.createRange)fa=function(F,O){var S=F.ownerDocument.createRange(),U=O.ownerDocument.createRange();S.selectNode(F);S.collapse(true);U.selectNode(O);U.collapse(true);F=S.compareBoundaryPoints(Range.START_TO_END,U);if(F===0)hasDuplicate=true;return F};(function(){var F=document.createElement("form"),O="script"+(new Date).getTime();F.innerHTML="<input name='"+O+"'/>";var S=document.documentElement;S.insertBefore(F,S.firstChild);if(document.getElementById(O)){T.find.ID=function(U,W,X){if(typeof W.getElementById!==
"undefined"&&!X)return(W=W.getElementById(U[1]))?W.id===U[1]||typeof W.getAttributeNode!=="undefined"&&W.getAttributeNode("id").nodeValue===U[1]?[W]:u:[]};T.filter.ID=function(U,W){var X=typeof U.getAttributeNode!=="undefined"&&U.getAttributeNode("id");return U.nodeType===1&&X&&X.nodeValue===W}}S.removeChild(F)})();(function(){var F=document.createElement("div");F.appendChild(document.createComment(""));if(F.getElementsByTagName("*").length>0)T.find.TAG=function(O,S){S=S.getElementsByTagName(O[1]);
if(O[1]==="*"){O=[];for(var U=0;S[U];U++)S[U].nodeType===1&&O.push(S[U]);S=O}return S};F.innerHTML="<a href='#'></a>";if(F.firstChild&&typeof F.firstChild.getAttribute!=="undefined"&&F.firstChild.getAttribute("href")!=="#")T.attrHandle.href=function(O){return O.getAttribute("href",2)}})();document.querySelectorAll&&function(){var F=Q,O=document.createElement("div");O.innerHTML="<p class='TEST'></p>";if(!(O.querySelectorAll&&O.querySelectorAll(".TEST").length===0)){Q=function(S,U,W,X){U=U||document;
if(!X&&U.nodeType===9&&!ba(U))try{return ca(U.querySelectorAll(S),W)}catch(Y){}return F(S,U,W,X)};Q.find=F.find;Q.filter=F.filter;Q.selectors=F.selectors;Q.matches=F.matches}}();document.getElementsByClassName&&document.documentElement.getElementsByClassName&&function(){var F=document.createElement("div");F.innerHTML="<div class='test e'></div><div class='test'></div>";if(F.getElementsByClassName("e").length!==0){F.lastChild.className="e";if(F.getElementsByClassName("e").length!==1){T.order.splice(1,
0,"CLASS");T.find.CLASS=function(O,S,U){if(typeof S.getElementsByClassName!=="undefined"&&!U)return S.getElementsByClassName(O[1])}}}}();var ha=document.compareDocumentPosition?function(F,O){return F.compareDocumentPosition(O)&16}:function(F,O){return F!==O&&(F.contains?F.contains(O):true)};function ba(F){return F.nodeType===9&&F.documentElement.nodeName!=="HTML"||!!F.ownerDocument&&ba(F.ownerDocument)}function ja(F,O){var S=[],U="",W;for(O=O.nodeType?[O]:O;W=T.match.PSEUDO.exec(F);){U+=W[0];F=F.replace(T.match.PSEUDO,
"")}F=T.relative[F]?F+"*":F;W=0;for(var X=O.length;W<X;W++)Q(F,O[W],S);return Q.filter(U,S)}p.find=Q;p.filter=Q.filter;p.expr=Q.selectors;p.expr[":"]=p.expr.filters;Q.selectors.filters.hidden=function(F){return F.offsetWidth===0||F.offsetHeight===0};Q.selectors.filters.visible=function(F){return F.offsetWidth>0||F.offsetHeight>0};Q.selectors.filters.animated=function(F){return p.grep(p.timers,function(O){return F===O.elem}).length};p.multiFilter=function(F,O,S){if(S)F=":not("+F+")";return Q.matches(F,
O)};p.dir=function(F,O){var S=[];for(F=F[O];F&&F!=document;){F.nodeType==1&&S.push(F);F=F[O]}return S};p.nth=function(F,O,S){O=O||1;for(var U=0;F;F=F[S])if(F.nodeType==1&&++U==O)break;return F};p.sibling=function(F,O){for(var S=[];F;F=F.nextSibling)F.nodeType==1&&F!=O&&S.push(F);return S}})();p.event={add:function(f,t,C,G){if(!(f.nodeType==3||f.nodeType==8)){if(f.setInterval&&f!=q)f=q;if(!C.guid)C.guid=this.guid++;if(G!==u){var M=C;C=this.proxy(M);C.data=G}var Q=p.data(f,"events")||p.data(f,"events",
{}),T=p.data(f,"handle")||p.data(f,"handle",function(){return typeof p!=="undefined"&&!p.event.triggered?p.event.handle.apply(arguments.callee.elem,arguments):u});T.elem=f;p.each(t.split(/\s+/),function(V,Z){V=Z.split(".");Z=V.shift();C.type=V.slice().sort().join(".");var ca=Q[Z];p.event.specialAll[Z]&&p.event.specialAll[Z].setup.call(f,G,V);if(!ca){ca=Q[Z]={};if(!p.event.special[Z]||p.event.special[Z].setup.call(f,G,V)===false)if(f.addEventListener)f.addEventListener(Z,T,false);else f.attachEvent&&
f.attachEvent("on"+Z,T)}ca[C.guid]=C;p.event.global[Z]=true});f=null}},guid:1,global:{},remove:function(f,t,C){if(!(f.nodeType==3||f.nodeType==8)){var G=p.data(f,"events"),M;if(G){if(t===u||typeof t==="string"&&t.charAt(0)==".")for(var Q in G)this.remove(f,Q+(t||""));else{if(t.type){C=t.handler;t=t.type}p.each(t.split(/\s+/),function(T,V){T=V.split(".");V=T.shift();var Z=RegExp("(^|\\.)"+T.slice().sort().join(".*\\.")+"(\\.|$)");if(G[V]){if(C)delete G[V][C.guid];else for(var ca in G[V])Z.test(G[V][ca].type)&&
delete G[V][ca];p.event.specialAll[V]&&p.event.specialAll[V].teardown.call(f,T);for(M in G[V])break;if(!M){if(!p.event.special[V]||p.event.special[V].teardown.call(f,T)===false)if(f.removeEventListener)f.removeEventListener(V,p.data(f,"handle"),false);else f.detachEvent&&f.detachEvent("on"+V,p.data(f,"handle"));M=null;delete G[V]}}})}for(M in G)break;if(!M){if(t=p.data(f,"handle"))t.elem=null;p.removeData(f,"events");p.removeData(f,"handle")}}}},trigger:function(f,t,C,G){var M=f.type||f;if(!G){f=
typeof f==="object"?f[r]?f:p.extend(p.Event(M),f):p.Event(M);if(M.indexOf("!")>=0){f.type=M=M.slice(0,-1);f.exclusive=true}if(!C){f.stopPropagation();this.global[M]&&p.each(p.cache,function(){this.events&&this.events[M]&&p.event.trigger(f,t,this.handle.elem)})}if(!C||C.nodeType==3||C.nodeType==8)return;f.result=u;f.target=C;t=p.makeArray(t);t.unshift(f)}f.currentTarget=C;var Q=p.data(C,"handle");Q&&Q.apply(C,t);if((!C[M]||p.nodeName(C,"a")&&M=="click")&&C["on"+M]&&C["on"+M].apply(C,t)===false)f.result=
false;if(!G&&C[M]&&!f.isDefaultPrevented()&&!(p.nodeName(C,"a")&&M=="click")){this.triggered=true;try{C[M]()}catch(T){}}this.triggered=false;if(!f.isPropagationStopped())(C=C.parentNode||C.ownerDocument)&&p.event.trigger(f,t,C,true)},handle:function(f){var t,C;f=arguments[0]=p.event.fix(f||q.event);f.currentTarget=this;C=f.type.split(".");f.type=C.shift();t=!C.length&&!f.exclusive;var G=RegExp("(^|\\.)"+C.slice().sort().join(".*\\.")+"(\\.|$)");C=(p.data(this,"events")||{})[f.type];for(var M in C){var Q=
C[M];if(t||G.test(Q.type)){f.handler=Q;f.data=Q.data;Q=Q.apply(this,arguments);if(Q!==u){f.result=Q;if(Q===false){f.preventDefault();f.stopPropagation()}}if(f.isImmediatePropagationStopped())break}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),
fix:function(f){if(f[r])return f;var t=f;f=p.Event(t);for(var C=this.props.length,G;C;){G=this.props[--C];f[G]=t[G]}if(!f.target)f.target=f.srcElement||document;if(f.target.nodeType==3)f.target=f.target.parentNode;if(!f.relatedTarget&&f.fromElement)f.relatedTarget=f.fromElement==f.target?f.toElement:f.fromElement;if(f.pageX==null&&f.clientX!=null){t=document.documentElement;C=document.body;f.pageX=f.clientX+(t&&t.scrollLeft||C&&C.scrollLeft||0)-(t.clientLeft||0);f.pageY=f.clientY+(t&&t.scrollTop||
C&&C.scrollTop||0)-(t.clientTop||0)}if(!f.which&&(f.charCode||f.charCode===0?f.charCode:f.keyCode))f.which=f.charCode||f.keyCode;if(!f.metaKey&&f.ctrlKey)f.metaKey=f.ctrlKey;if(!f.which&&f.button)f.which=f.button&1?1:f.button&2?3:f.button&4?2:0;return f},proxy:function(f,t){t=t||function(){return f.apply(this,arguments)};t.guid=f.guid=f.guid||t.guid||this.guid++;return t},special:{ready:{setup:l,teardown:function(){}}},specialAll:{live:{setup:function(f,t){p.event.add(this,t[0],g)},teardown:function(f){if(f.length){var t=
0,C=RegExp("(^|\\.)"+f[0]+"(\\.|$)");p.each(p.data(this,"events").live||{},function(){C.test(this.type)&&t++});t<1&&p.event.remove(this,f[0],g)}}}}};p.Event=function(f){if(!this.preventDefault)return new p.Event(f);if(f&&f.type){this.originalEvent=f;this.type=f.type}else this.type=f;this.timeStamp=c();this[r]=true};p.Event.prototype={preventDefault:function(){this.isDefaultPrevented=e;var f=this.originalEvent;if(f){f.preventDefault&&f.preventDefault();f.returnValue=false}},stopPropagation:function(){this.isPropagationStopped=
e;var f=this.originalEvent;if(f){f.stopPropagation&&f.stopPropagation();f.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=e;this.stopPropagation()},isDefaultPrevented:d,isPropagationStopped:d,isImmediatePropagationStopped:d};function N(f){for(var t=f.relatedTarget;t&&t!=this;)try{t=t.parentNode}catch(C){t=this}if(t!=this){f.type=f.data;p.event.handle.apply(this,arguments)}}p.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(f,t){p.event.special[t]=
{setup:function(){p.event.add(this,f,N,t)},teardown:function(){p.event.remove(this,f,N)}}});p.fn.extend({bind:function(f,t,C){return f=="unload"?this.one(f,t,C):this.each(function(){p.event.add(this,f,C||t,C&&t)})},one:function(f,t,C){var G=p.event.proxy(C||t,function(M){p(this).unbind(M,G);return(C||t).apply(this,arguments)});return this.each(function(){p.event.add(this,f,G,C&&t)})},unbind:function(f,t){return this.each(function(){p.event.remove(this,f,t)})},trigger:function(f,t){return this.each(function(){p.event.trigger(f,
t,this)})},triggerHandler:function(f,t){if(this[0]){f=p.Event(f);f.preventDefault();f.stopPropagation();p.event.trigger(f,t,this[0]);return f.result}},toggle:function(f){for(var t=arguments,C=1;C<t.length;)p.event.proxy(f,t[C++]);return this.click(p.event.proxy(f,function(G){this.lastToggle=(this.lastToggle||0)%C;G.preventDefault();return t[this.lastToggle++].apply(this,arguments)||false}))},hover:function(f,t){return this.mouseenter(f).mouseleave(t)},ready:function(f){l();p.isReady?f.call(document,
p):p.readyList.push(f);return this},live:function(f,t){t=p.event.proxy(t);t.guid+=this.selector+f;p(document).bind(k(f,this.selector),this.selector,t);return this},die:function(f,t){p(document).unbind(k(f,this.selector),t?{guid:t.guid+this.selector+f}:null);return this}});p.extend({isReady:false,readyList:[],ready:function(){if(!p.isReady){p.isReady=true;if(p.readyList){p.each(p.readyList,function(){this.call(document,p)});p.readyList=null}p(document).triggerHandler("ready")}}});var P=false;p.each("blur,focus,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave,change,select,submit,keydown,keypress,keyup,error".split(","),
function(f,t){p.fn[t]=function(C){return C?this.bind(t,C):this.trigger(t)}});p(q).bind("unload",function(){for(var f in p.cache)f!=1&&p.cache[f].handle&&p.event.remove(p.cache[f].handle.elem)});(function(){p.support={};var f=document.documentElement,t=document.createElement("script"),C=document.createElement("div"),G="script"+(new Date).getTime();C.style.display="none";C.innerHTML='   <link/><table></table><a href="/a" style="color:red;float:left;opacity:.5;">a</a><select><option>text</option></select><object><param/></object>';
var M=C.getElementsByTagName("*"),Q=C.getElementsByTagName("a")[0];if(!(!M||!M.length||!Q)){p.support={leadingWhitespace:C.firstChild.nodeType==3,tbody:!C.getElementsByTagName("tbody").length,objectAll:!!C.getElementsByTagName("object")[0].getElementsByTagName("*").length,htmlSerialize:!!C.getElementsByTagName("link").length,style:/red/.test(Q.getAttribute("style")),hrefNormalized:Q.getAttribute("href")==="/a",opacity:Q.style.opacity==="0.5",cssFloat:!!Q.style.cssFloat,scriptEval:false,noCloneEvent:true,
boxModel:null};t.type="text/javascript";try{t.appendChild(document.createTextNode("window."+G+"=1;"))}catch(T){}f.insertBefore(t,f.firstChild);if(q[G]){p.support.scriptEval=true;delete q[G]}f.removeChild(t);if(C.attachEvent&&C.fireEvent){C.attachEvent("onclick",function(){p.support.noCloneEvent=false;C.detachEvent("onclick",arguments.callee)});C.cloneNode(true).fireEvent("onclick")}p(function(){var V=document.createElement("div");V.style.width=V.style.paddingLeft="1px";document.body.appendChild(V);
p.boxModel=p.support.boxModel=V.offsetWidth===2;document.body.removeChild(V).style.display="none"})}})();var D=p.support.cssFloat?"cssFloat":"styleFloat";p.props={"for":"htmlFor","class":"className","float":D,cssFloat:D,styleFloat:D,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",tabindex:"tabIndex"};p.fn.extend({_load:p.fn.load,load:function(f,t,C){if(typeof f!=="string")return this._load(f);var G=f.indexOf(" ");if(G>=0){var M=f.slice(G,f.length);f=f.slice(0,
G)}G="GET";if(t)if(p.isFunction(t)){C=t;t=null}else if(typeof t==="object"){t=p.param(t);G="POST"}var Q=this;p.ajax({url:f,type:G,dataType:"html",data:t,complete:function(T,V){if(V=="success"||V=="notmodified")Q.html(M?p("<div/>").append(T.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(M):T.responseText);C&&Q.each(C,[T.responseText,V,T])}});return this},serialize:function(){return p.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?
p.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|search/i.test(this.type))}).map(function(f,t){f=p(this).val();return f==null?null:p.isArray(f)?p.map(f,function(C){return{name:t.name,value:C}}):{name:t.name,value:f}}).get()}});p.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(f,t){p.fn[t]=function(C){return this.bind(t,C)}});var I=c();p.extend({get:function(f,
t,C,G){if(p.isFunction(t)){C=t;t=null}return p.ajax({type:"GET",url:f,data:t,success:C,dataType:G})},getScript:function(f,t){return p.get(f,null,t,"script")},getJSON:function(f,t,C){return p.get(f,t,C,"json")},post:function(f,t,C,G){if(p.isFunction(t)){C=t;t={}}return p.ajax({type:"POST",url:f,data:t,success:C,dataType:G})},ajaxSetup:function(f){p.extend(p.ajaxSettings,f)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,
xhr:function(){return q.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(f){function t(){f.success&&f.success(T,Q);f.global&&p.event.trigger("ajaxSuccess",[ba,f])}function C(){f.complete&&f.complete(ba,Q);f.global&&p.event.trigger("ajaxComplete",[ba,f]);f.global&&
!--p.active&&p.event.trigger("ajaxStop")}f=p.extend(true,f,p.extend(true,{},p.ajaxSettings,f));var G,M=/=\?(&|$)/g,Q,T,V=f.type.toUpperCase();if(f.data&&f.processData&&typeof f.data!=="string")f.data=p.param(f.data);if(f.dataType=="jsonp"){if(V=="GET")f.url.match(M)||(f.url+=(f.url.match(/\?/)?"&":"?")+(f.jsonp||"callback")+"=?");else if(!f.data||!f.data.match(M))f.data=(f.data?f.data+"&":"")+(f.jsonp||"callback")+"=?";f.dataType="json"}if(f.dataType=="json"&&(f.data&&f.data.match(M)||f.url.match(M))){G=
"jsonp"+I++;if(f.data)f.data=(f.data+"").replace(M,"="+G+"$1");f.url=f.url.replace(M,"="+G+"$1");f.dataType="script";q[G]=function(U){T=U;t();C();q[G]=u;try{delete q[G]}catch(W){}ca&&ca.removeChild(da)}}if(f.dataType=="script"&&f.cache==null)f.cache=false;if(f.cache===false&&V=="GET"){M=c();var Z=f.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+M+"$2");f.url=Z+(Z==f.url?(f.url.match(/\?/)?"&":"?")+"_="+M:"")}if(f.data&&V=="GET"){f.url+=(f.url.match(/\?/)?"&":"?")+f.data;f.data=null}f.global&&!p.active++&&
p.event.trigger("ajaxStart");M=/^(\w+:)?\/\/([^\/?#]+)/.exec(f.url);if(f.dataType=="script"&&V=="GET"&&M&&(M[1]&&M[1]!=location.protocol||M[2]!=location.host)){var ca=document.getElementsByTagName("head")[0],da=document.createElement("script");da.src=f.url;if(f.scriptCharset)da.charset=f.scriptCharset;if(!G){var fa=false;da.onload=da.onreadystatechange=function(){if(!fa&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){fa=true;t();C();da.onload=da.onreadystatechange=null;
ca.removeChild(da)}}}ca.appendChild(da)}else{var ha=false,ba=f.xhr();f.username?ba.open(V,f.url,f.async,f.username,f.password):ba.open(V,f.url,f.async);try{f.data&&ba.setRequestHeader("Content-Type",f.contentType);if(f.ifModified)ba.setRequestHeader("If-Modified-Since",p.lastModified[f.url]||"Thu, 01 Jan 1970 00:00:00 GMT");ba.setRequestHeader("X-Requested-With","XMLHttpRequest");ba.setRequestHeader("Accept",f.dataType&&f.accepts[f.dataType]?f.accepts[f.dataType]+", */*":f.accepts._default)}catch(ja){}if(f.beforeSend&&
f.beforeSend(ba,f)===false){f.global&&!--p.active&&p.event.trigger("ajaxStop");ba.abort();return false}f.global&&p.event.trigger("ajaxSend",[ba,f]);var F=function(U){if(ba.readyState==0){if(O){clearInterval(O);O=null;f.global&&!--p.active&&p.event.trigger("ajaxStop")}}else if(!ha&&ba&&(ba.readyState==4||U=="timeout")){ha=true;if(O){clearInterval(O);O=null}Q=U=="timeout"?"timeout":!p.httpSuccess(ba)?"error":f.ifModified&&p.httpNotModified(ba,f.url)?"notmodified":"success";if(Q=="success")try{T=p.httpData(ba,
f.dataType,f)}catch(W){Q="parsererror"}if(Q=="success"){var X;try{X=ba.getResponseHeader("Last-Modified")}catch(Y){}if(f.ifModified&&X)p.lastModified[f.url]=X;G||t()}else p.handleError(f,ba,Q);C();U&&ba.abort();if(f.async)ba=null}};if(f.async){var O=setInterval(F,13);f.timeout>0&&setTimeout(function(){ba&&!ha&&F("timeout")},f.timeout)}try{ba.send(f.data)}catch(S){p.handleError(f,ba,null,S)}f.async||F();return ba}},handleError:function(f,t,C,G){f.error&&f.error(t,C,G);f.global&&p.event.trigger("ajaxError",
[t,f,G])},active:0,httpSuccess:function(f){try{return!f.status&&location.protocol=="file:"||f.status>=200&&f.status<300||f.status==304||f.status==1223}catch(t){}return false},httpNotModified:function(f,t){try{var C=f.getResponseHeader("Last-Modified");return f.status==304||C==p.lastModified[t]}catch(G){}return false},httpData:function(f,t,C){var G=f.getResponseHeader("content-type");f=(G=t=="xml"||!t&&G&&G.indexOf("xml")>=0)?f.responseXML:f.responseText;if(G&&f.documentElement.tagName=="parsererror")throw"parsererror";
if(C&&C.dataFilter)f=C.dataFilter(f,t);if(typeof f==="string"){t=="script"&&p.globalEval(f);if(t=="json")f=q.eval("("+f+")")}return f},param:function(f){function t(M,Q){C[C.length]=encodeURIComponent(M)+"="+encodeURIComponent(Q)}var C=[];if(p.isArray(f)||f.jquery)p.each(f,function(){t(this.name,this.value)});else for(var G in f)p.isArray(f[G])?p.each(f[G],function(){t(G,this)}):t(G,p.isFunction(f[G])?f[G]():f[G]);return C.join("&").replace(/%20/g,"+")}});var R={},H,L=[["height","marginTop","marginBottom",
"paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];p.fn.extend({show:function(f,t){if(f)return this.animate(n("show",3),f,t);else{f=0;for(t=this.length;f<t;f++){var C=p.data(this[f],"olddisplay");this[f].style.display=C||"";if(p.css(this[f],"display")==="none"){C=this[f].tagName;var G;if(R[C])G=R[C];else{var M=p("<"+C+" />").appendTo("body");G=M.css("display");if(G==="none")G="block";M.remove();R[C]=G}p.data(this[f],"olddisplay",G)}}f=0;for(t=
this.length;f<t;f++)this[f].style.display=p.data(this[f],"olddisplay")||"";return this}},hide:function(f,t){if(f)return this.animate(n("hide",3),f,t);else{f=0;for(t=this.length;f<t;f++){var C=p.data(this[f],"olddisplay");!C&&C!=="none"&&p.data(this[f],"olddisplay",p.css(this[f],"display"))}f=0;for(t=this.length;f<t;f++)this[f].style.display="none";return this}},_toggle:p.fn.toggle,toggle:function(f,t){var C=typeof f==="boolean";return p.isFunction(f)&&p.isFunction(t)?this._toggle.apply(this,arguments):
f==null||C?this.each(function(){var G=C?f:p(this).is(":hidden");p(this)[G?"show":"hide"]()}):this.animate(n("toggle",3),f,t)},fadeTo:function(f,t,C){return this.animate({opacity:t},f,C)},animate:function(f,t,C,G){var M=p.speed(t,C,G);return this[M.queue===false?"each":"queue"](function(){var Q=p.extend({},M),T,V=this.nodeType==1&&p(this).is(":hidden"),Z=this;for(T in f){if(f[T]=="hide"&&V||f[T]=="show"&&!V)return Q.complete.call(this);if((T=="height"||T=="width")&&this.style){Q.display=p.css(this,
"display");Q.overflow=this.style.overflow}}if(Q.overflow!=null)this.style.overflow="hidden";Q.curAnim=p.extend({},f);p.each(f,function(ca,da){var fa=new p.fx(Z,Q,ca);if(/toggle|show|hide/.test(da))fa[da=="toggle"?V?"show":"hide":da](f);else{var ha=da.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),ba=fa.cur(true)||0;if(ha){da=parseFloat(ha[2]);var ja=ha[3]||"px";if(ja!="px"){Z.style[ca]=(da||1)+ja;ba=(da||1)/fa.cur(true)*ba;Z.style[ca]=ba+ja}if(ha[1])da=(ha[1]=="-="?-1:1)*da+ba;fa.custom(ba,da,ja)}else fa.custom(ba,
da,"")}});return true})},stop:function(f,t){var C=p.timers;f&&this.queue([]);this.each(function(){for(var G=C.length-1;G>=0;G--)if(C[G].elem==this){t&&C[G](true);C.splice(G,1)}});t||this.dequeue();return this}});p.each({slideDown:n("show",1),slideUp:n("hide",1),slideToggle:n("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(f,t){p.fn[f]=function(C,G){return this.animate(t,C,G)}});p.extend({speed:function(f,t,C){var G=typeof f==="object"?f:{complete:C||!C&&t||p.isFunction(f)&&
f,duration:f,easing:C&&t||t&&!p.isFunction(t)&&t};G.duration=p.fx.off?0:typeof G.duration==="number"?G.duration:p.fx.speeds[G.duration]||p.fx.speeds._default;G.old=G.complete;G.complete=function(){G.queue!==false&&p(this).dequeue();p.isFunction(G.old)&&G.old.call(this)};return G},easing:{linear:function(f,t,C,G){return C+G*f},swing:function(f,t,C,G){return(-Math.cos(f*Math.PI)/2+0.5)*G+C}},timers:[],fx:function(f,t,C){this.options=t;this.elem=f;this.prop=C;if(!t.orig)t.orig={}}});p.fx.prototype={update:function(){this.options.step&&
this.options.step.call(this.elem,this.now,this);(p.fx.step[this.prop]||p.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style)this.elem.style.display="block"},cur:function(f){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];return(f=parseFloat(p.css(this.elem,this.prop,f)))&&f>-10000?f:parseFloat(p.curCSS(this.elem,this.prop))||0},custom:function(f,t,C){function G(Q){return M.step(Q)}this.startTime=c();
this.start=f;this.end=t;this.unit=C||this.unit||"px";this.now=this.start;this.pos=this.state=0;var M=this;G.elem=this.elem;if(G()&&p.timers.push(G)&&!H)H=setInterval(function(){for(var Q=p.timers,T=0;T<Q.length;T++)Q[T]()||Q.splice(T--,1);if(!Q.length){clearInterval(H);H=u}},13)},show:function(){this.options.orig[this.prop]=p.attr(this.elem.style,this.prop);this.options.show=true;this.custom(this.prop=="width"||this.prop=="height"?1:0,this.cur());p(this.elem).show()},hide:function(){this.options.orig[this.prop]=
p.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(f){var t=c();if(f||t>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();f=this.options.curAnim[this.prop]=true;for(var C in this.options.curAnim)if(this.options.curAnim[C]!==true)f=false;if(f){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(p.css(this.elem,"display")=="none")this.elem.style.display=
"block"}this.options.hide&&p(this.elem).hide();if(this.options.hide||this.options.show)for(var G in this.options.curAnim)p.attr(this.elem.style,G,this.options.orig[G]);this.options.complete.call(this.elem)}return false}else{C=t-this.startTime;this.state=C/this.options.duration;this.pos=p.easing[this.options.easing||(p.easing.swing?"swing":"linear")](this.state,C,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};p.extend(p.fx,{speeds:{slow:600,
fast:200,_default:400},step:{opacity:function(f){p.attr(f.elem.style,"opacity",f.now)},_default:function(f){if(f.elem.style&&f.elem.style[f.prop]!=null)f.elem.style[f.prop]=f.now+f.unit;else f.elem[f.prop]=f.now}}});p.fn.offset=document.documentElement.getBoundingClientRect?function(){if(!this[0])return{top:0,left:0};if(this[0]===this[0].ownerDocument.body)return p.offset.bodyOffset(this[0]);var f=this[0].getBoundingClientRect(),t=this[0].ownerDocument,C=t.body;t=t.documentElement;var G=t.clientTop||
C.clientTop||0,M=t.clientLeft||C.clientLeft||0;G=f.top+(self.pageYOffset||p.boxModel&&t.scrollTop||C.scrollTop)-G;f=f.left+(self.pageXOffset||p.boxModel&&t.scrollLeft||C.scrollLeft)-M;return{top:G,left:f}}:function(){if(!this[0])return{top:0,left:0};if(this[0]===this[0].ownerDocument.body)return p.offset.bodyOffset(this[0]);p.offset.initialized||p.offset.initialize();var f=this[0],t=f.offsetParent,C=f.ownerDocument,G,M=C.documentElement,Q=C.body;C=C.defaultView;G=C.getComputedStyle(f,null);for(var T=
f.offsetTop,V=f.offsetLeft;(f=f.parentNode)&&f!==Q&&f!==M;){G=C.getComputedStyle(f,null);T-=f.scrollTop;V-=f.scrollLeft;if(f===t){T+=f.offsetTop;V+=f.offsetLeft;if(p.offset.doesNotAddBorder&&!(p.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(f.tagName))){T+=parseInt(G.borderTopWidth,10)||0;V+=parseInt(G.borderLeftWidth,10)||0}t=f.offsetParent}if(p.offset.subtractsBorderForOverflowNotVisible&&G.overflow!=="visible"){T+=parseInt(G.borderTopWidth,10)||0;V+=parseInt(G.borderLeftWidth,10)||
0}G=G}if(G.position==="relative"||G.position==="static"){T+=Q.offsetTop;V+=Q.offsetLeft}if(G.position==="fixed"){T+=Math.max(M.scrollTop,Q.scrollTop);V+=Math.max(M.scrollLeft,Q.scrollLeft)}return{top:T,left:V}};p.offset={initialize:function(){if(!this.initialized){var f=document.body,t=document.createElement("div"),C,G,M,Q=f.style.marginTop;M='<div style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"><div></div></div><table style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;" cellpadding="0" cellspacing="0"><tr><td></td></tr></table>';
C={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(G in C)t.style[G]=C[G];t.innerHTML=M;f.insertBefore(t,f.firstChild);C=t.firstChild;G=C.firstChild;M=C.nextSibling.firstChild.firstChild;this.doesNotAddBorder=G.offsetTop!==5;this.doesAddBorderForTableAndCells=M.offsetTop===5;C.style.overflow="hidden";C.style.position="relative";this.subtractsBorderForOverflowNotVisible=G.offsetTop===-5;f.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=
f.offsetTop===0;f.style.marginTop=Q;f.removeChild(t);this.initialized=true}},bodyOffset:function(f){p.offset.initialized||p.offset.initialize();var t=f.offsetTop,C=f.offsetLeft;if(p.offset.doesNotIncludeMarginInBodyOffset){t+=parseInt(p.curCSS(f,"marginTop",true),10)||0;C+=parseInt(p.curCSS(f,"marginLeft",true),10)||0}return{top:t,left:C}}};p.fn.extend({position:function(){var f;if(this[0]){f=this.offsetParent();var t=this.offset(),C=/^body|html$/i.test(f[0].tagName)?{top:0,left:0}:f.offset();t.top-=
o(this,"marginTop");t.left-=o(this,"marginLeft");C.top+=o(f,"borderTopWidth");C.left+=o(f,"borderLeftWidth");f={top:t.top-C.top,left:t.left-C.left}}return f},offsetParent:function(){for(var f=this[0].offsetParent||document.body;f&&!/^body|html$/i.test(f.tagName)&&p.css(f,"position")=="static";)f=f.offsetParent;return p(f)}});p.each(["Left","Top"],function(f,t){var C="scroll"+t;p.fn[C]=function(G){if(!this[0])return null;return G!==u?this.each(function(){this==q||this==document?q.scrollTo(!f?G:p(q).scrollLeft(),
f?G:p(q).scrollTop()):(this[C]=G)}):this[0]==q||this[0]==document?self[f?"pageYOffset":"pageXOffset"]||p.boxModel&&document.documentElement[C]||document.body[C]:this[0][C]}});p.each(["Height","Width"],function(f,t){var C=t.toLowerCase();p.fn["inner"+t]=function(){return this[0]?p.css(this[0],C,false,"padding"):null};p.fn["outer"+t]=function(M){return this[0]?p.css(this[0],C,false,M?"margin":"border"):null};var G=t.toLowerCase();p.fn[G]=function(M){return this[0]==q?document.compatMode=="CSS1Compat"&&
document.documentElement["client"+t]||document.body["client"+t]:this[0]==document?Math.max(document.documentElement["client"+t],document.body["scroll"+t],document.documentElement["scroll"+t],document.body["offset"+t],document.documentElement["offset"+t]):M===u?this.length?p.css(this[0],G):null:this.css(G,typeof M==="string"?M:M+"px")}})})();
(function(b){function c(d){var e=this.form;e.clk=this;if(this.type=="image")if(d.offsetX!=undefined){e.clk_x=d.offsetX;e.clk_y=d.offsetY}else if(typeof b.fn.offset=="function"){var g=b(this).offset();e.clk_x=d.pageX-g.left;e.clk_y=d.pageY-g.top}else{e.clk_x=d.pageX-this.offsetLeft;e.clk_y=d.pageY-this.offsetTop}setTimeout(function(){e.clk=e.clk_x=e.clk_y=null},10)}function o(){var d=this.formPluginId;d=b.fn.ajaxForm.optionHash[d];b(this).ajaxSubmit(d);return false}b.fn.ajaxSubmit=function(d){function e(){function B(){if(!A++){E.detachEvent?
E.detachEvent("onload",B):E.removeEventListener("load",B,false);var N=true;try{if(J)throw"timeout";var P,D;D=E.contentWindow?E.contentWindow.document:E.contentDocument?E.contentDocument:E.document;m.responseText=D.body?D.body.innerHTML:null;m.responseXML=D.XMLDocument?D.XMLDocument:D;if(z.dataType=="json"||z.dataType=="script"){var I=D.getElementsByTagName("textarea")[0];P=I?I.value:m.responseText;z.dataType=="json"?eval("data = "+P):b.globalEval(P)}else if(z.dataType=="xml"){P=m.responseXML;if(!P&&
m.responseText!=null)P=x(m.responseText)}else P=m.responseText}catch(R){N=false;b.handleError(z,m,"error",R)}if(N){z.success(P,"success");r&&b.event.trigger("ajaxSuccess",[m,z])}r&&b.event.trigger("ajaxComplete",[m,z]);r&&!--b.active&&b.event.trigger("ajaxStop");if(z.complete)z.complete(m,N?"success":"error");setTimeout(function(){v.remove();m.responseXML=null},100)}}function x(N,P){if(window.ActiveXObject){P=new ActiveXObject("Microsoft.XMLDOM");P.async="false";P.loadXML(N)}else P=(new DOMParser).parseFromString(N,
"text/xml");return P&&P.documentElement&&P.documentElement.tagName!="parsererror"?P:null}var p=n[0],z=b.extend({},b.ajaxSettings,d),K="jqFormIO"+b.fn.ajaxSubmit.counter++,v=b('<iframe id="'+K+'" name="'+K+'" />'),E=v[0],y=b.browser.opera&&window.opera.version()<9;if(b.browser.msie||y)E.src='javascript:false;document.write("");';v.css({position:"absolute",top:"-1000px",left:"-1000px"});var m={responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},
setRequestHeader:function(){}},r=z.global;r&&!b.active++&&b.event.trigger("ajaxStart");r&&b.event.trigger("ajaxSend",[m,z]);var A=0,J=0;setTimeout(function(){var N=p.encoding?"encoding":"enctype",P=n.attr("target"),D=n.attr("action");n.attr({target:K,method:"POST",action:z.url});p[N]="multipart/form-data";z.timeout&&setTimeout(function(){J=true;B()},z.timeout);v.appendTo("body");E.attachEvent?E.attachEvent("onload",B):E.addEventListener("load",B,false);p.submit();n.attr({action:D,target:P})},10)}
if(typeof d=="function")d={success:d};d=b.extend({url:this.attr("action")||window.location.toString(),type:this.attr("method")||"GET"},d||{});var g={};b.event.trigger("form.pre.serialize",[this,d,g]);if(g.veto)return this;var k=this.formToArray(d.semantic);if(d.data)for(var l in d.data)k.push({name:l,value:d.data[l]});if(d.beforeSubmit&&d.beforeSubmit(k,this,d)===false)return this;b.event.trigger("form.submit.validate",[k,this,d,g]);if(g.veto)return this;g=b.param(k);if(d.type.toUpperCase()=="GET"){d.url+=
(d.url.indexOf("?")>=0?"&":"?")+g;d.data=null}else d.data=g;var n=this,q=[];d.resetForm&&q.push(function(){n.resetForm()});d.clearForm&&q.push(function(){n.clearForm()});if(!d.dataType&&d.target){var u=d.success||function(){};q.push(function(B){this.evalScripts?b(d.target).attr("innerHTML",B).evalScripts().each(u,arguments):b(d.target).html(B).each(u,arguments)})}else d.success&&q.push(d.success);d.success=function(B,x){for(var p=0,z=q.length;p<z;p++)q[p](B,x,n)};g=b("input:file",this).fieldValue();
k=false;for(l=0;l<g.length;l++)if(g[l])k=true;if(d.iframe||k)b.browser.safari&&d.closeKeepAlive?b.get(d.closeKeepAlive,e):e();else b.ajax(d);b.event.trigger("form.submit.notify",[this,d]);return this};b.fn.ajaxSubmit.counter=0;b.fn.ajaxForm=function(d){return this.ajaxFormUnbind().submit(o).each(function(){this.formPluginId=b.fn.ajaxForm.counter++;b.fn.ajaxForm.optionHash[this.formPluginId]=d;b(":submit,input:image",this).click(c)})};b.fn.ajaxForm.counter=1;b.fn.ajaxForm.optionHash={};b.fn.ajaxFormUnbind=
function(){this.unbind("submit",o);return this.each(function(){b(":submit,input:image",this).unbind("click",c)})};b.fn.formToArray=function(d){var e=[];if(this.length==0)return e;var g=this[0],k=d?g.getElementsByTagName("*"):g.elements;if(!k)return e;for(var l=0,n=k.length;l<n;l++){var q=k[l],u=q.name;if(u)if(d&&g.clk&&q.type=="image")!q.disabled&&g.clk==q&&e.push({name:u+".x",value:g.clk_x},{name:u+".y",value:g.clk_y});else if((q=b.fieldValue(q,true))&&q.constructor==Array)for(var B=0,x=q.length;B<
x;B++)e.push({name:u,value:q[B]});else q!==null&&typeof q!="undefined"&&e.push({name:u,value:q})}if(!d&&g.clk){d=g.getElementsByTagName("input");l=0;for(n=d.length;l<n;l++){k=d[l];(u=k.name)&&!k.disabled&&k.type=="image"&&g.clk==k&&e.push({name:u+".x",value:g.clk_x},{name:u+".y",value:g.clk_y})}}return e};b.fn.formSerialize=function(d){return b.param(this.formToArray(d))};b.fn.fieldSerialize=function(d){var e=[];this.each(function(){var g=this.name;if(g){var k=b.fieldValue(this,d);if(k&&k.constructor==
Array)for(var l=0,n=k.length;l<n;l++)e.push({name:g,value:k[l]});else k!==null&&typeof k!="undefined"&&e.push({name:this.name,value:k})}});return b.param(e)};b.fn.fieldValue=function(d){for(var e=[],g=0,k=this.length;g<k;g++){var l=this[g];l=b.fieldValue(l,d);l===null||typeof l=="undefined"||l.constructor==Array&&!l.length||(l.constructor==Array?b.merge(e,l):e.push(l))}return e};b.fieldValue=function(d,e){var g=d.name,k=d.type,l=d.tagName.toLowerCase();if(typeof e=="undefined")e=true;if(e&&(!g||d.disabled||
k=="reset"||k=="button"||(k=="checkbox"||k=="radio")&&!d.checked||(k=="submit"||k=="image")&&d.form&&d.form.clk!=d||l=="select"&&d.selectedIndex==-1))return null;if(l=="select"){l=d.selectedIndex;if(l<0)return null;e=[];d=d.options;g=(k=k=="select-one")?l+1:d.length;for(l=k?l:0;l<g;l++){var n=d[l];if(n.selected){n=b.browser.msie&&!n.attributes.value.specified?n.text:n.value;if(k)return n;e.push(n)}}return e}return d.value};b.fn.clearForm=function(){return this.each(function(){b("input,select,textarea",
this).clearFields()})};b.fn.clearFields=b.fn.clearInputs=function(){return this.each(function(){var d=this.type,e=this.tagName.toLowerCase();if(d=="text"||d=="password"||e=="textarea")this.value="";else if(d=="checkbox"||d=="radio")this.checked=false;else if(e=="select")this.selectedIndex=-1})};b.fn.resetForm=function(){return this.each(function(){if(typeof this.reset=="function"||typeof this.reset=="object"&&!this.reset.nodeType)this.reset()})};b.fn.enable=function(d){if(d==undefined)d=true;return this.each(function(){this.disabled=
!d})};b.fn.select=function(d){if(d==undefined)d=true;return this.each(function(){var e=this.type;if(e=="checkbox"||e=="radio")this.checked=d;else if(this.tagName.toLowerCase()=="option"){e=b(this).parent("select");d&&e[0]&&e[0].type=="select-one"&&e.find("option").select(false);this.selected=d}})}})(jQuery);
(function(b){function c(o,d){return parseInt(b.curCSS(o.jquery?o[0]:o,d,true))||0}b.dimensions={version:"1.2"};b.each(["Height","Width"],function(o,d){b.fn["inner"+d]=function(){if(this[0]){var e=d=="Height"?"Top":"Left",g=d=="Height"?"Bottom":"Right";return this.is(":visible")?this[0]["client"+d]:c(this,d.toLowerCase())+c(this,"padding"+e)+c(this,"padding"+g)}};b.fn["outer"+d]=function(e){if(this[0]){var g=d=="Height"?"Top":"Left",k=d=="Height"?"Bottom":"Right";e=b.extend({margin:false},e||{});var l=
this.is(":visible")?this[0]["offset"+d]:c(this,d.toLowerCase())+c(this,"border"+g+"Width")+c(this,"border"+k+"Width")+c(this,"padding"+g)+c(this,"padding"+k);return l+(e.margin?c(this,"margin"+g)+c(this,"margin"+k):0)}}});b.each(["Left","Top"],function(o,d){b.fn["scroll"+d]=function(e){if(this[0])return e!=undefined?this.each(function(){this==window||this==document?window.scrollTo(d=="Left"?e:b(window).scrollLeft(),d=="Top"?e:b(window).scrollTop()):(this["scroll"+d]=e)}):this[0]==window||this[0]==
document?self[d=="Left"?"pageXOffset":"pageYOffset"]||b.boxModel&&document.documentElement["scroll"+d]||document.body["scroll"+d]:this[0]["scroll"+d]}});b.fn.extend({position:function(){var o=this[0],d,e,g;if(o){g=this.offsetParent();d=this.offset();e=g.offset();d.top-=c(o,"marginTop");d.left-=c(o,"marginLeft");e.top+=c(g,"borderTopWidth");e.left+=c(g,"borderLeftWidth");d={top:d.top-e.top,left:d.left-e.left}}return d},offsetParent:function(){for(var o=this[0].offsetParent;o&&!/^body|html$/i.test(o.tagName)&&
b.css(o,"position")=="static";)o=o.offsetParent;return b(o)}})})(jQuery);
(function(b){function c(o,d,e,g){this.x1=o;this.x2=e;this.y1=d;this.y2=g}c.prototype.contains=function(o){return this.x1<=o.x1&&o.x2<=this.x2&&this.y1<=o.y1&&o.y2<=this.y2};c.prototype.transform=function(o,d){return new c(this.x1+o,this.y1+d,this.x2+o,this.y2+d)};b.fn.positionBy=function(o){if(this.length==0)return this;o=b.extend({target:null,targetPos:null,elementPos:null,x:null,y:null,positions:null,addClass:false,force:false,container:window,hideAfterPosition:false},o);if(o.x!=null)var d=o.x,
e=o.y,g=0,k=0;else{var l=b(b(o.target)[0]);g=l.outerWidth();k=l.outerHeight();l=l.offset();d=l.left;e=l.top}var n=d+g,q=e+k;return this.each(function(){var u=b(this);u.is(":visible")||u.css({left:-3000,top:-3000}).show();var B=u.outerWidth(),x=u.outerHeight(),p=[],z=[];p[0]=new c(n,e,n+B,e+x);z[0]=[1,7,4];p[1]=new c(n,q-x,n+B,q);z[1]=[0,6,4];p[2]=new c(n,q,n+B,q+x);z[2]=[1,3,10];p[3]=new c(n-B,q,n,q+x);z[3]=[1,6,10];p[4]=new c(d,q,d+B,q+x);z[4]=[1,6,9];p[5]=new c(d-B,q,d,q+x);z[5]=[6,4,9];p[6]=new c(d-
B,q-x,d,q);z[6]=[7,1,4];p[7]=new c(d-B,e,d,e+x);z[7]=[6,0,4];p[8]=new c(d-B,e-x,d,e);z[8]=[7,9,4];p[9]=new c(d,e-x,d+B,e);z[9]=[0,7,4];p[10]=new c(n-B,e-x,n,e);z[10]=[0,7,3];p[11]=new c(n,e-x,n+B,e);z[11]=[0,10,3];p[12]=new c(n-B,e,n,e+x);z[12]=[13,7,10];p[13]=new c(n-B,q-x,n,q);z[13]=[12,6,3];p[14]=new c(d,q-x,d+B,q);z[14]=[15,1,4];p[15]=new c(d,e,d+B,e+x);z[15]=[14,0,9];if(o.positions!==null)var K=o.positions[0];else if(o.targetPos!=null&&o.elementPos!=null){K=[];K[0]=[];K[0][0]=15;K[0][1]=7;K[0][2]=
8;K[0][3]=9;K[1]=[];K[1][0]=0;K[1][1]=12;K[1][2]=10;K[1][3]=11;K[2]=[];K[2][0]=2;K[2][1]=3;K[2][2]=13;K[2][3]=1;K[3]=[];K[3][0]=4;K[3][1]=5;K[3][2]=6;K[3][3]=14;K=K[o.targetPos][o.elementPos]}var v=p[K];if(!o.force){$window=b(window);B=$window.scrollLeft();x=$window.scrollTop();B=new c(B,x,B+$window.width(),x+$window.height());K=o.positions?o.positions:[K];for(x=[];K.length>0;){var E=K.shift();if(!x[E]){x[E]=true;if(B.contains(p[E])){v=p[E];break}else if(o.positions===null)K=jQuery.merge(K,z[E])}}}u.parents().each(function(){var y=
b(this);if(y.css("position")!="static"){y=y.offset();v=v.transform(-y.left,-y.top);return false}});p={left:v.x1,top:v.y1};if(o.hideAfterPosition)p.display="none";u.css(p);o.addClass&&u.removeClass("positionBy0 positionBy1 positionBy2 positionBy3 positionBy4 positionBy5 positionBy6 positionBy7 positionBy8 positionBy9 positionBy10 positionBy11 positionBy12 positionBy13 positionBy14 positionBy15").addClass("positionBy"+E)})}})(jQuery);
(function(b){b.fn.bgIframe=b.fn.bgiframe=function(c){if(b.browser.msie&&/6.0/.test(navigator.userAgent)){c=b.extend({top:"auto",left:"auto",width:"auto",height:"auto",opacity:true,src:"javascript:false;"},c||{});var o=function(e){return e&&e.constructor==Number?e+"px":e},d='<iframe class="bgiframe"frameborder="0"tabindex="-1"src="'+c.src+'"style="display:block;position:absolute;z-index:-1;'+(c.opacity!==false?"filter:Alpha(Opacity='0');":"")+"top:"+(c.top=="auto"?"expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+'px')":
o(c.top))+";left:"+(c.left=="auto"?"expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+'px')":o(c.left))+";width:"+(c.width=="auto"?"expression(this.parentNode.offsetWidth+'px')":o(c.width))+";height:"+(c.height=="auto"?"expression(this.parentNode.offsetHeight+'px')":o(c.height))+';"/>';return this.each(function(){b("> iframe.bgiframe",this).length==0&&this.insertBefore(document.createElement(d),this.firstChild)})}return this}})(jQuery);$(function(){$("ul.jd_menu").jdMenu()});
(function(b){function c(e){var g=b.data(b(e).parents().andSelf().filter("ul.jd_menu")[0],"jdMenuSettings");b("> li",e).bind("mouseenter.jdmenu mouseleave.jdmenu",function(k){b(this).toggleClass("jdm_hover");var l=b("> ul",this);if(l.length==1){clearTimeout(this.$jdTimer);var n=(k=k.type=="mouseenter")?o:d;this.$jdTimer=setTimeout(function(){n(l[0],g.onAnimate,g.isVertical)},k?g.showDelay:g.hideDelay)}}).bind("click.jdmenu",function(k){var l=b("> ul",this);if(l.length==1&&(g.disableLinks==true||b(this).hasClass("accessible"))){o(l,
g.onAnimate,g.isVertical);return false}if(k.target==this){l=b("> a",k.target).not(".accessible");if(l.length>0){l=l[0];l.onclick?b(l).trigger("click"):window.open(l.href,l.target||"_self")}}if(g.disableLinks||!g.disableLinks&&!b(this).parent().hasClass("jd_menu")){b(this).parent().jdMenuHide();k.stopPropagation()}}).find("> a").bind("focus.jdmenu blur.jdmenu",function(k){var l=b(this).parents("li:eq(0)");k.type=="focus"?l.addClass("jdm_hover"):l.removeClass("jdm_hover")}).filter(".accessible").bind("click.jdmenu",
function(k){k.preventDefault()})}function o(e,g,k){e=b(e);if(!e.is(":visible")){e.bgiframe();var l=e.parent();e.trigger("jdMenuShow").positionBy({target:l[0],targetPos:k===true||!l.parent().hasClass("jd_menu")?1:3,elementPos:0,hideAfterPosition:true});if(!e.hasClass("jdm_events")){e.addClass("jdm_events");c(e)}l.addClass("jdm_active").siblings("li").find("> ul:eq(0):visible").each(function(){d(this)});g===undefined?e.show():g.apply(e[0],[true])}}function d(e,g){e=b(e);b(".bgiframe",e).remove();e.filter(":not(.jd_menu)").find("> li > ul:eq(0):visible").each(function(){d(this)}).end();
g===undefined?e.hide():g.apply(e[0],[false]);e.trigger("jdMenuHide").parents("li:eq(0)").removeClass("jdm_active jdm_hover").end().find("> li").removeClass("jdm_active jdm_hover")}b.fn.jdMenu=function(e){e=b.extend({showDelay:200,hideDelay:500,disableLinks:true},e);if(!b.isFunction(e.onAnimate))e.onAnimate=undefined;return this.filter("ul.jd_menu").each(function(){b.data(this,"jdMenuSettings",b.extend({isVertical:b(this).hasClass("jd_menu_vertical")},e));c(this)})};b.fn.jdMenuUnbind=function(){b("ul.jdm_events",
this).unbind(".jdmenu").find("> a").unbind(".jdmenu")};b.fn.jdMenuHide=function(){return this.filter("ul").each(function(){d(this)})};b(window).bind("click.jdmenu",function(){b("ul.jd_menu ul:visible").jdMenuHide()})})(jQuery);
(function(b){b.fn.addOption=function(){function c(n,q,u,B){var x=document.createElement("option");x.value=q;x.text=u;u=n.options;var p=u.length;if(!n.cache){n.cache={};for(var z=0;z<p;z++)n.cache[u[z].value]=z}if(typeof n.cache[q]=="undefined")n.cache[q]=p;n.options[n.cache[q]]=x;if(B)x.selected=true}var o=arguments;if(o.length==0)return this;var d=true,e=false,g,k,l;if(typeof o[0]=="object"){e=true;g=o[0]}if(o.length>=2){if(typeof o[1]=="boolean")d=o[1];else if(typeof o[2]=="boolean")d=o[2];if(!e){k=
o[0];l=o[1]}}this.each(function(){if(this.nodeName.toLowerCase()=="select")if(e)for(var n in g)c(this,n,g[n],d);else c(this,k,l,d)});return this};b.fn.ajaxAddOption=function(c,o,d,e,g){if(typeof c!="string")return this;if(typeof o!="object")o={};if(typeof d!="boolean")d=true;this.each(function(){var k=this;b.getJSON(c,o,function(l){b(k).addOption(l,d);if(typeof e=="function")typeof g=="object"?e.apply(k,g):e.call(k)})});return this};b.fn.removeOption=function(){var c=arguments;if(c.length==0)return this;
var o=typeof c[0],d,e;if(o=="string"||o=="object"||o=="function"){d=c[0];if(d.constructor==Array){o=d.length;for(var g=0;g<o;g++)this.removeOption(d[g],c[1]);return this}}else if(o=="number")e=c[0];else return this;this.each(function(){if(this.nodeName.toLowerCase()=="select"){if(this.cache)this.cache=null;var k=false,l=this.options;if(d){var n=l.length;for(n=n-1;n>=0;n--){if(d.constructor==RegExp){if(l[n].value.match(d))k=true}else if(l[n].value==d)k=true;if(k&&c[1]===true)k=l[n].selected;if(k)l[n]=
null;k=false}}else(k=c[1]===true?l[e].selected:true)&&this.remove(e)}});return this};b.fn.sortOptions=function(c){var o=typeof c=="undefined"?true:!!c;this.each(function(){if(this.nodeName.toLowerCase()=="select"){for(var d=this.options,e=d.length,g=[],k=0;k<e;k++)g[k]={v:d[k].value,t:d[k].text};g.sort(function(l,n){o1t=l.t.toLowerCase();o2t=n.t.toLowerCase();if(o1t==o2t)return 0;return o?o1t<o2t?-1:1:o1t>o2t?-1:1});for(k=0;k<e;k++){d[k].text=g[k].t;d[k].value=g[k].v}}});return this};b.fn.selectOptions=
function(c,o){var d=c;c=typeof c;var e=o||false;if(c!="string"&&c!="function"&&c!="object")return this;this.each(function(){if(this.nodeName.toLowerCase()!="select")return this;for(var g=this.options,k=g.length,l=0;l<k;l++)if(d.constructor==RegExp)if(g[l].value.match(d))g[l].selected=true;else{if(e)g[l].selected=false}else if(g[l].value==d)g[l].selected=true;else if(e)g[l].selected=false});return this};b.fn.copyOptions=function(c,o){var d=o||"selected";if(b(c).size()==0)return this;this.each(function(){if(this.nodeName.toLowerCase()!=
"select")return this;for(var e=this.options,g=e.length,k=0;k<g;k++)if(d=="all"||d=="selected"&&e[k].selected)b(c).addOption(e[k].value,e[k].text)});return this};b.fn.containsOption=function(c,o){var d=false,e=c;c=typeof e;var g=typeof o;if(c!="string"&&c!="function"&&c!="object")return g=="function"?this:d;this.each(function(){if(this.nodeName.toLowerCase()!="select")return this;if(d&&g!="function")return false;for(var k=this.options,l=k.length,n=0;n<l;n++)if(e.constructor==RegExp){if(k[n].value.match(e)){d=
true;g=="function"&&o.call(k[n],n)}}else if(k[n].value==e){d=true;g=="function"&&o.call(k[n],n)}});return g=="function"?this:d};b.fn.selectedValues=function(){var c=[];this.find("option:selected").each(function(){c[c.length]=this.value});return c};b.fn.selectedOptions=function(){return this.find("option:selected")}})(jQuery);
(function(b){var c=b.ajax;b.ajax=function(o){o=jQuery.extend(o,jQuery.extend({},jQuery.ajaxDefaults,o));var d=o.complete;o.complete=function(e,g){if(g=="success")try{var k=e.getResponseHeader("X-QuakeLive-Redirect");k&&quakelive.Goto("login"+k)}catch(l){}d&&d(e,g)};return c.apply(this,arguments)}})(jQuery);
(function(b){var c=b.ajax,o={},d={},e=[],g=[];b.ajaxAbort=function(k){if(o[k]){o[k].abort();d[k].global&&!--jQuery.active&&jQuery.event.trigger("ajaxStop");if(jQuery.active<0)jQuery.active=0}};b.ajax=function(k){k=jQuery.extend(k,jQuery.extend({},jQuery.ajaxSettings,k));var l=k.port;d[l]=k;switch(k.mode){case "abort":if(o[l]){o[l].abort();k.global&&!--jQuery.active&&jQuery.event.trigger("ajaxStop");if(jQuery.active<0)jQuery.active=0}return o[l]=c.apply(this,arguments);case "queue":var n=k.complete;
k.complete=function(){n&&n.apply(this,arguments);jQuery([c]).dequeue("ajax"+l)};jQuery([c]).queue("ajax"+l,function(){c(k)});return;case "sync":var q=e.length;e[q]={error:k.error,success:k.success,complete:k.complete,done:false};g[q]={error:[],success:[],complete:[]};k.error=function(){g[q].error=arguments};k.success=function(){g[q].success=arguments};k.complete=function(){g[q].complete=arguments;e[q].done=true;if(q==0||!e[q-1])for(var u=q;u<e.length&&e[u].done;u++){e[u].error&&e[u].error.apply(jQuery,
g[u].error);e[u].success&&e[u].success.apply(jQuery,g[u].success);e[u].complete&&e[u].complete.apply(jQuery,g[u].complete);e[u]=null;g[u]=null}}}return c.apply(this,arguments)}})(jQuery);
(function(b){function c(d){return typeof d=="object"?d:{top:d,left:d}}var o=b.scrollTo=function(d,e,g){o.window().scrollTo(d,e,g)};o.defaults={axis:"y",duration:1};o.window=function(){return b(b.browser.safari?"body":"html")};b.fn.scrollTo=function(d,e,g){if(typeof e=="object"){g=e;e=0}g=b.extend({},o.defaults,g);e=e||g.speed||g.duration;g.queue=g.queue&&g.axis.length>1;if(g.queue)e/=2;g.offset=c(g.offset);g.over=c(g.over);return this.each(function(){function k(z){q.animate(x,e,g.easing,z&&function(){z.call(this,
d)})}function l(z){var K=p?b.browser.opera?document.body:document.documentElement:n;return K["scroll"+z]-K["client"+z]}var n=this,q=b(n),u=d,B,x={},p=q.is("html,body");switch(typeof u){case "number":case "string":if(/^([+-]=)?\d+(px)?$/.test(u)){u=c(u);break}u=b(u,this);case "object":if(u.is||u.style)B=(u=b(u)).offset()}b.each(g.axis.split(""),function(z,K){var v=K=="x"?"Left":"Top",E=v.toLowerCase(),y="scroll"+v,m=n[y];K=K=="x"?"Width":"Height";var r=K.toLowerCase();if(B){x[y]=B[E]+(p?0:m-q.offset()[E]);
if(g.margin){x[y]-=parseInt(u.css("margin"+v))||0;x[y]-=parseInt(u.css("border"+v+"Width"))||0}x[y]+=g.offset[E]||0;if(g.over[E])x[y]+=u[r]()*g.over[E]}else x[y]=u[E];if(/^\d+$/.test(x[y]))x[y]=x[y]<=0?0:Math.min(x[y],l(K));if(!z&&g.queue){m!=x[y]&&k(g.onAfterFirst);delete x[y]}});k(g.onAfter)})}})(jQuery);
(function(b){b.fn.jqm=function(B){var x={zIndex:9999999,overlay:50,overlayClass:"jqmOverlay",closeClass:"jqmClose",trigger:".jqModal",ajax:false,target:false,modal:false,toTop:false,onShow:false,onHide:false,onLoad:false};return this.each(function(){if(!this._jqm){c++;this._jqm=c;o[c]={c:b.extend(x,B),a:false,w:b(this).addClass("jqmID"+c),s:c};x.trigger&&b(this).jqmAddTrigger(x.trigger)}})};b.fn.jqmAddClose=function(B){return u(this,B,"jqmHide")};b.fn.jqmAddTrigger=function(B){return u(this,B,"jqmShow")};
b.fn.jqmShow=function(B){return this.each(function(){!o[this._jqm].a&&b.jqm.open(this._jqm,B)})};b.fn.jqmHide=function(B){return this.each(function(){o[this._jqm].a&&b.jqm.close(this._jqm,B)})};b.jqm={hash:{},open:function(B,x){var p=o[B],z=p.c,K="."+z.closeClass,v=/^\d+$/.test(p.w.css("z-index"))&&p.w.css("z-index")||z.zIndex,E=b("<div></div>").css({height:"100%",width:"100%",position:"fixed",left:0,top:0,"z-index":v-1,opacity:z.overlay/100});p.t=x;p.a=true;p.w.css("z-index",v);if(z.modal){!d[0]&&
n("bind");d.push(B);E.css("cursor","wait")}else if(z.overlay>0)p.w.jqmAddClose(E);else E=false;p.o=E?E.addClass(z.overlayClass).prependTo("body"):false;if(e&&b("html,body").css({height:"100%",width:"100%"})&&E){E=E.css({position:"absolute"})[0];for(var y in{Top:1,Left:1})E.style.setExpression(y.toLowerCase(),"(_=(document.documentElement.scroll"+y+" || document.body.scroll"+y+"))+'px'")}if(z.ajax){B=z.target||p.w;v=z.ajax;B=typeof B=="string"?b(B,p.w):b(B);v=v.substr(0,1)=="@"?b(x).attr(v.substring(1)):
v;B.load(v,function(){z.onLoad&&z.onLoad.call(this,p);K&&p.w.jqmAddClose(b(K,p.w));k(p)})}else K&&p.w.jqmAddClose(b(K,p.w));z.toTop&&p.o&&p.w.before('<span id="jqmP'+p.w[0]._jqm+'"></span>').insertAfter(p.o);z.onShow?z.onShow(p):p.w.show();k(p);return false},close:function(B){B=o[B];B.a=false;if(B.c.modal){d.pop();!d[0]&&n("unbind")}B.c.toTop&&B.o&&b("#jqmP"+B.w[0]._jqm).after(B.w).remove();if(B.c.onHide)B.c.onHide(B);else B.w.hide()&&B.o&&B.o.remove();return false}};var c=0,o=b.jqm.hash,d=[],e=b.browser.msie&&
b.browser.version=="6.0",g=b('<iframe src="javascript:false;document.write(\'\');" class="jqm"></iframe>').css({opacity:0});function k(B){if(e)B.o&&B.o.html('<p style="width:100%;height:100%"/>').prepend(g)||!b("iframe.jqm",B.w)[0]&&B.w.prepend(g);l(B)}function l(B){try{b(":input:visible",B.w)[0].focus()}catch(x){}}function n(B){b()[B]("keypress",q)[B]("keydown",q)[B]("mousedown",q)}function q(B){var x=o[d[d.length-1]];(B=!b(B.target).parents(".jqmID"+x.s)[0])&&l(x);return!B}function u(B,x,p){var z=
[];B.each(function(){z.push(this._jqm)});b(x).each(function(){if(this[p])b.extend(this[p],z);else{this[p]=z;b(this).click(function(){for(var K in{jqmShow:1,jqmHide:1})for(var v in this[K])o[this[K][v]]&&o[this[K][v]].w[K](this);return false})}});return B}})(jQuery);
(function(b){b.fn.lightbox=function(c){function o(){b("#lb_overlay").remove();b("#lightbox").remove();y.inprogress=false;if(y.jsonData&&y.jsonData.length>0){var m=y.jsonDataParser?y.jsonDataParser:b.fn.lightbox.parseJsonData;y.imageArray=[];y.imageArray=m(y.jsonData)}m='<div id="outerImageContainer"><div id="imageContainer"><iframe id="lightboxIframe" /><img id="lightboxImage"><div id="hoverNav"><a href="javascript://" title="'+y.strings.prevLinkTitle+'" id="prevLink"></a><a href="javascript://" id="nextLink" title="'+
y.strings.nextLinkTitle+'"></a></div><div id="loading"><a href="javascript://" id="loadingLink"><img src="'+y.fileLoadingImage+'"></a></div></div></div>';var r='<div id="imageDataContainer" class="clearfix"><div id="imageData"><div id="imageDetails"><span id="caption"></span><span id="numberDisplay"></span></div><div id="bottomNav">';if(y.displayHelp)r+='<span id="helpDisplay">'+y.strings.help+"</span>";r+='<a href="javascript://" id="bottomNavClose" title="'+y.strings.closeTitle+'"><img src="'+y.fileBottomNavCloseImage+
'"></a></div></div></div>';if(y.navbarOnTop){m='<div id="lb_overlay"></div><div id="lightbox">'+r+m+"</div>";b("body").append(m);b("#imageDataContainer").addClass("ontop")}else{m='<div id="lb_overlay"></div><div id="lightbox">'+m+r+"</div>";b("body").append(m)}b("#lb_overlay").click(function(){q()}).hide();b("#lightbox").click(function(){q()}).hide();b("#loadingLink").click(function(){q();return false});b("#bottomNavClose").click(function(){q();return false});b("#outerImageContainer").width(y.widthCurrent).height(y.heightCurrent);
b("#imageDataContainer").width(y.widthCurrent);if(!y.imageClickClose){b("#lightboxImage").click(function(){return false});b("#hoverNav").click(function(){return false})}}function d(){var m=new Array(b(document).width(),b(document).height(),b(window).width(),b(window).height());return m}function e(){var m,r;if(self.pageYOffset){r=self.pageYOffset;m=self.pageXOffset}else if(document.documentElement&&document.documentElement.scrollTop){r=document.documentElement.scrollTop;m=document.documentElement.scrollLeft}else if(document.body){r=
document.body.scrollTop;m=document.body.scrollLeft}return m=new Array(m,r)}function g(m){var r=new Date,A=null;do A=new Date;while(A-r<m)}function k(m){b("select, embed, object").hide();var r=d();b("#lb_overlay").hide().css({width:"100%",height:r[1]+"px",opacity:y.overlayOpacity}).fadeIn();imageNum=0;if(!y.jsonData){y.imageArray=[];!m.rel||m.rel==""?y.imageArray.push(new Array(m.href,y.displayTitle?m.title:"")):b("a").each(function(){if(this.href&&this.rel==m.rel)y.imageArray.push(new Array(this.href,
y.displayTitle?this.title:""))})}if(y.imageArray.length>1){for(i=0;i<y.imageArray.length;i++)for(j=y.imageArray.length-1;j>i;j--)y.imageArray[i][0]==y.imageArray[j][0]&&y.imageArray.splice(j,1);for(;y.imageArray[imageNum][0]!=m.href;)imageNum++}var A=e();r=A[1]+r[3]/10;A=A[0];b("#lightbox").css({top:r+"px",left:A+"px"}).show();y.slideNavBar||b("#imageData").hide();l(imageNum)}function l(m){if(y.inprogress==false){y.inprogress=true;y.activeImage=m;b("#loading").show();b("#lightboxImage").hide();b("#hoverNav").hide();
b("#prevLink").hide();b("#nextLink").hide();if(y.slideNavBar){b("#imageDataContainer").hide();b("#imageData").hide()}n()}}function n(){imgPreloader=new Image;imgPreloader.onload=function(){var m=imgPreloader.width,r=imgPreloader.height;if(y.fitToScreen){var A=d(),J=A[2]-2*y.borderSize;A=A[3]-200;if(imgPreloader.height>A){m=parseInt(A/imgPreloader.height*imgPreloader.width);r=A}else if(imgPreloader.width>J){r=parseInt(J/imgPreloader.width*imgPreloader.height);m=J}}b("#lightboxImage").attr("src",y.imageArray[y.activeImage][0]).width(m).height(r);
B(m,r)};imgPreloader.src=y.imageArray[y.activeImage][0]}function q(){E();b("#lightbox").hide();b("#lb_overlay").fadeOut();b("select, object, embed").show()}function u(){if(y.loopImages&&y.imageArray.length>1){preloadNextImage=new Image;preloadNextImage.src=y.imageArray[y.activeImage==y.imageArray.length-1?0:y.activeImage+1][0];preloadPrevImage=new Image;preloadPrevImage.src=y.imageArray[y.activeImage==0?y.imageArray.length-1:y.activeImage-1][0]}else{if(y.imageArray.length-1>y.activeImage){preloadNextImage=
new Image;preloadNextImage.src=y.imageArray[y.activeImage+1][0]}if(y.activeImage>0){preloadPrevImage=new Image;preloadPrevImage.src=y.imageArray[y.activeImage-1][0]}}}function B(m,r){y.widthCurrent=b("#outerImageContainer").outerWidth();y.heightCurrent=b("#outerImageContainer").outerHeight();m=Math.max(350,m+y.borderSize*2);var A=r+y.borderSize*2;y.xScale=m/y.widthCurrent*100;y.yScale=A/y.heightCurrent*100;wDiff=y.widthCurrent-m;hDiff=y.heightCurrent-A;b("#imageDataContainer").animate({width:m},y.resizeSpeed,
"linear");b("#outerImageContainer").animate({width:m},y.resizeSpeed,"linear",function(){b("#outerImageContainer").animate({height:A},y.resizeSpeed,"linear",function(){x()})});if(hDiff==0&&wDiff==0)jQuery.browser.msie?g(250):g(100);b("#prevLink").height(r);b("#nextLink").height(r)}function x(){b("#loading").hide();b("#lightboxImage").fadeIn("fast");p();u();y.inprogress=false}function p(){b("#numberDisplay").html("");y.imageArray[y.activeImage][1]&&b("#caption").html(y.imageArray[y.activeImage][1]).show();
if(y.imageArray.length>1){var m;m=y.strings.image+(y.activeImage+1)+y.strings.of+y.imageArray.length;if(!y.disableNavbarLinks){if(y.activeImage>0||y.loopImages)m='<a title="'+y.strings.prevLinkTitle+'" href="#" id="prevLinkText">'+y.strings.prevLinkText+"</a>"+m;if(y.activeImage+1<y.imageArray.length||y.loopImages)m+='<a title="'+y.strings.nextLinkTitle+'" href="#" id="nextLinkText">'+y.strings.nextLinkText+"</a>"}b("#numberDisplay").html(m).show()}y.slideNavBar?b("#imageData").slideDown(y.navBarSlideSpeed):
b("#imageData").show();m=d();b("#lb_overlay").height(m[1]);z()}function z(){if(y.imageArray.length>1){b("#hoverNav").show();if(y.loopImages){b("#prevLink,#prevLinkText").show().click(function(){l(y.activeImage==0?y.imageArray.length-1:y.activeImage-1);return false});b("#nextLink,#nextLinkText").show().click(function(){l(y.activeImage==y.imageArray.length-1?0:y.activeImage+1);return false})}else{y.activeImage!=0&&b("#prevLink,#prevLinkText").show().click(function(){l(y.activeImage-1);return false});
y.activeImage!=y.imageArray.length-1&&b("#nextLink,#nextLinkText").show().click(function(){l(y.activeImage+1);return false})}v()}}function K(m){var r=m.data.opts;m=m.keyCode;var A=27,J=String.fromCharCode(m).toLowerCase();if(J=="x"||J=="o"||J=="c"||m==A)q();else if(J=="p"||m==37)if(r.loopImages){E();l(r.activeImage==0?r.imageArray.length-1:r.activeImage-1)}else{if(r.activeImage!=0){E();l(r.activeImage-1)}}else if(J=="n"||m==39)if(y.loopImages){E();l(r.activeImage==r.imageArray.length-1?0:r.activeImage+
1)}else if(r.activeImage!=r.imageArray.length-1){E();l(r.activeImage+1)}}function v(){b(document).bind("keydown",{opts:y},K)}function E(){b(document).unbind("keydown")}var y=b.extend({},b.fn.lightbox.defaults,c);return this.each(function(){b(this).click(function(){o();k(this);return false})})};b.fn.lightbox.parseJsonData=function(c){var o=[];b.each(c,function(){o.push(new Array(this.url,this.title))});return o};b.fn.lightbox.defaults={fileLoadingImage:"images/loader.gif",fileBottomNavCloseImage:"images/lightbox/closelabel.gif",
overlayOpacity:0.8,borderSize:10,imageArray:[],activeImage:null,inprogress:false,resizeSpeed:350,widthCurrent:250,heightCurrent:250,xScale:1,yScale:1,displayTitle:true,navbarOnTop:false,slideNavBar:false,navBarSlideSpeed:350,displayHelp:false,strings:{help:" \u2190 / P - previous image\u00a0\u00a0\u00a0\u00a0\u2192 / N - next image\u00a0\u00a0\u00a0\u00a0ESC / X - close image gallery",prevLinkTitle:"previous image",nextLinkTitle:"next image",prevLinkText:"&laquo; Previous",nextLinkText:"Next &raquo;",
closeTitle:"close image gallery",image:"Image ",of:" of "},fitToScreen:true,disableNavbarLinks:false,loopImages:false,imageClickClose:true,jsonData:null,jsonDataParser:null}})(jQuery);
(function(b){b.fn.superfish=function(o){var d=b.fn.superfish,e=d.c,g=b(['<span class="',e.arrowClass,'"></span>'].join(""));function k(){var u=b(this),B=n(u);clearTimeout(B.sfTimer);u.showSuperfishUl().siblings().hideSuperfishUl()}function l(){var u=b(this),B=n(u),x=d.op;clearTimeout(B.sfTimer);B.sfTimer=setTimeout(function(){x.retainPath=b.inArray(u[0],x.$path)>-1;u.hideSuperfishUl();x.$path.length&&u.parents(["li.",x.hoverClass].join("")).length<1&&k.call(x.$path)},x.delay)}function n(u){u=u.parents(["ul.",
e.menuClass,":first"].join(""))[0];d.op=d.o[u.serial];return u}function q(u){u.addClass(e.anchorClass).append(g.clone())}return this.each(function(){var u=this.serial=d.o.length,B=b.extend({},d.defaults,o);B.$path=b("li."+B.pathClass,this).slice(0,B.pathLevels).each(function(){b(this).addClass([B.hoverClass,e.bcClass].join(" ")).filter("li:has(ul)").removeClass(B.pathClass)});d.o[u]=d.op=B;b("li:not(:has(ul))",this).hover(k,l);b("li:has(ul)",this)[b.fn.hoverIntent&&!B.disableHI?"hoverIntent":"hover"](k,
l).each(function(){B.autoArrows&&q(b(">a:first-child",this))}).not("."+e.bcClass).hideSuperfishUl();var x=b("a",this);x.each(function(p){var z=x.eq(p).parents("li");x.eq(p).focus(function(){k.call(z)}).blur(function(){l.call(z)})});B.onInit.call(this)}).each(function(){var u=[e.menuClass];d.op.dropShadows&&!(b.browser.msie&&b.browser.version<7)&&u.push(e.shadowClass);b(this).addClass(u.join(" "))})};var c=b.fn.superfish;c.o=[];c.op={};c.IE7fix=function(){var o=c.op;b.browser.msie&&b.browser.version>
6&&o.dropShadows&&o.animation.opacity!=undefined&&this.toggleClass(c.c.shadowClass+"-off")};c.c={bcClass:"sf-breadcrumb",menuClass:"sf-js-enabled",anchorClass:"sf-with-ul",arrowClass:"sf-sub-indicator",shadowClass:"sf-shadow"};c.defaults={hoverClass:"sfHover",pathClass:"overideThisToUse",pathLevels:1,delay:800,animation:{opacity:"show"},speed:"normal",autoArrows:true,dropShadows:true,disableHI:false,onInit:function(){},onBeforeShow:function(){},onShow:function(){},onHide:function(){}};b.fn.extend({hideSuperfishUl:function(){var o=
c.op,d=o.retainPath===true?o.$path:"";o.retainPath=false;d=b(["li.",o.hoverClass].join(""),this).add(this).not(d).removeClass(o.hoverClass).find(">ul").hide().css("visibility","hidden");o.onHide.call(d);return this},showSuperfishUl:function(){var o=c.op,d=this.addClass(o.hoverClass).find(">ul:hidden").css("visibility","visible");c.IE7fix.call(d);o.onBeforeShow.call(d);d.animate(o.animation,o.speed,function(){c.IE7fix.call(d);o.onShow.call(d)});return this}})})(jQuery);
(function(b){b.extend({tablesorter:new (function(){function o(H,L){d(H+","+((new Date).getTime()-L.getTime())+"ms")}function d(H){typeof console!="undefined"&&typeof console.debug!="undefined"||alert(H)}function e(H,L){if(H.config.debug)var f="";var t=H.tBodies[0].rows;if(H.tBodies[0].rows[0]){var C=[];t=t[0].cells;for(var G=t.length,M=0;M<G;M++){var Q=false;if(b.metadata&&b(L[M]).metadata()&&b(L[M]).metadata().sorter)Q=k(b(L[M]).metadata().sorter);else if(H.config.headers[M]&&H.config.headers[M].sorter)Q=
k(H.config.headers[M].sorter);Q||(Q=g(H,t[M]));if(H.config.debug)f+="column:"+M+" parser:"+Q.id+"\n";C.push(Q)}}H.config.debug&&d(f);return C}function g(H,L){for(var f=I.length,t=1;t<f;t++)if(I[t].is(b.trim(n(H.config,L)),H,L))return I[t];return I[0]}function k(H){for(var L=I.length,f=0;f<L;f++)if(I[f].id.toLowerCase()==H.toLowerCase())return I[f];return false}function l(H){if(H.config.debug)var L=new Date;for(var f=H.tBodies[0]&&H.tBodies[0].rows.length||0,t=H.tBodies[0].rows[0]&&H.tBodies[0].rows[0].cells.length||
0,C=H.config.parsers,G={row:[],normalized:[]},M=0;M<f;++M){var Q=H.tBodies[0].rows[M],T=[];G.row.push(b(Q));for(var V=0;V<t;++V)T.push(C[V].format(n(H.config,Q.cells[V]),H,Q.cells[V]));T.push(M);G.normalized.push(T)}H.config.debug&&o("Building cache for "+f+" rows:",L);return G}function n(H,L){if(!L)return"";var f="";return f=H.textExtraction=="simple"?L.childNodes[0]&&L.childNodes[0].hasChildNodes()?L.childNodes[0].innerHTML:L.innerHTML:typeof H.textExtraction=="function"?H.textExtraction(L):b(L).text()}
function q(H,L){if(H.config.debug)var f=new Date;var t=L;L=t.row;t=t.normalized;for(var C=t.length,G=t[0].length-1,M=b(H.tBodies[0]),Q=[],T=0;T<C;T++){Q.push(L[t[T][G]]);if(!H.config.appender)for(var V=L[t[T][G]],Z=V.length,ca=0;ca<Z;ca++)M[0].appendChild(V[ca])}H.config.appender&&H.config.appender(H,Q);Q=null;H.config.debug&&o("Rebuilt table:",f);p(H);setTimeout(function(){b(H).trigger("sortEnd")},0)}function u(H){if(H.config.debug)var L=new Date;for(var f=[],t=0;t<H.tHead.rows.length;t++)f[t]=0;
$tableHeaders=b("thead th",H);$tableHeaders.each(function(C){this.count=0;this.column=C;this.order=K(H.config.sortInitialOrder);if(B(this)||x(H,C))this.sortDisabled=true;this.sortDisabled||b(this).addClass(H.config.cssHeader);H.config.headerList[C]=this});if(H.config.debug){o("Built headers:",L);d($tableHeaders)}return $tableHeaders}function B(H){if(b.metadata&&b(H).metadata().sorter===false)return true;return false}function x(H,L){if(H.config.headers[L]&&H.config.headers[L].sorter===false)return true;
return false}function p(H){for(var L=H.config.widgets,f=L.length,t=0;t<f;t++)z(L[t]).format(H)}function z(H){for(var L=R.length,f=0;f<L;f++)if(R[f].id.toLowerCase()==H.toLowerCase())return R[f]}function K(H){return i=typeof H!="Number"?H.toLowerCase()=="desc"?1:0:H==1?H:0}function v(H,L){for(var f=L.length,t=0;t<f;t++)if(L[t][0]==H)return true;return false}function E(H,L,f,t){L.removeClass(t[0]).removeClass(t[1]);var C=[];L.each(function(){this.sortDisabled||(C[this.column]=b(this))});H=f.length;
for(L=0;L<H;L++)C[f[L][0]].addClass(t[f[L][1]])}function y(H){var L=H.config;if(L.widthFixed){var f=b("<colgroup>");b("tr:first td",H.tBodies[0]).each(function(){f.append(b("<col>").css("width",b(this).width()))});b(H).prepend(f)}}function m(H,L){H=H.config;for(var f=L.length,t=0;t<f;t++){var C=L[t],G=H.headerList[C[0]];G.count=C[1];G.count++}}function r(H,L){return H<L?-1:H>L?1:0}function A(H,L){return L<H?-1:L>H?1:0}function J(H,L){return H-L}function N(H,L){return L-H}function P(H,L,f){if(H.config.debug)var t=
new Date;for(var C="var sortWrapper = function(a,b) {",G=L.length,M=0;M<G;M++){var Q=L[M][0],T=L[M][1],V=D(H.config.parsers,Q)=="text"?T==0?r:A:T==0?J:N,Z="e"+M;C+="var "+Z+" = "+V+"(a["+Q+"],b["+Q+"]); ";C+="if("+Z+") { return "+Z+"; } ";C+="else { "}M=f.normalized[0].length-1;C+="return a["+M+"]-b["+M+"];";for(M=0;M<G;M++)C+="}; ";C+="return 0; ";C+="}; ";eval(C);f.normalized.sort(sortWrapper);H.config.debug&&o("Sorting on "+L.toString()+" and dir "+T+" time:",t);return f}function D(H,L){return H[L].type}
var I=[],R=[];this.defaults={cssHeader:"header",cssAsc:"headerSortUp",cssDesc:"headerSortDown",sortInitialOrder:"asc",sortMultiSortKey:"shiftKey",sortForce:null,sortAppend:null,textExtraction:"simple",parsers:{},widgets:[],widgetZebra:{css:["even","odd"]},headers:{},widthFixed:false,cancelSelection:true,sortList:[],headerList:[],dateFormat:"us",decimal:".",debug:false};this.benchmark=o;this.construct=function(H){return this.each(function(){if(this.tHead&&this.tBodies){var L,f,t,C;this.config={};C=
b.extend(this.config,b.tablesorter.defaults,H);L=b(this);f=u(this);this.config.parsers=e(this,f);t=l(this);var G=[C.cssDesc,C.cssAsc];y(this);f.click(function(M){L.trigger("sortStart");var Q=L[0].tBodies[0]&&L[0].tBodies[0].rows.length||0;if(!this.sortDisabled&&Q>0){b(this);Q=this.column;this.order=this.count++%2;if(M[C.sortMultiSortKey])if(v(Q,C.sortList))for(M=0;M<C.sortList.length;M++){var T=C.sortList[M],V=C.headerList[T[0]];if(T[0]==Q){V.count=T[1];V.count++;T[1]=V.count%2}}else C.sortList.push([Q,
this.order]);else{C.sortList=[];if(C.sortForce!=null){T=C.sortForce;for(M=0;M<T.length;M++)T[M][0]!=Q&&C.sortList.push(T[M])}C.sortList.push([Q,this.order])}setTimeout(function(){E(L[0],f,C.sortList,G);q(L[0],P(L[0],C.sortList,t))},1);return false}}).mousedown(function(){if(C.cancelSelection){this.onselectstart=function(){return false};return false}});L.bind("update",function(){this.config.parsers=e(this,f);t=l(this)}).bind("sorton",function(M,Q){b(this).trigger("sortStart");C.sortList=Q;M=C.sortList;
m(this,M);E(this,f,M,G);q(this,P(this,M,t))}).bind("appendCache",function(){q(this,t)}).bind("applyWidgetId",function(M,Q){z(Q).format(this)}).bind("applyWidgets",function(){p(this)});if(b.metadata&&b(this).metadata()&&b(this).metadata().sortlist)C.sortList=b(this).metadata().sortlist;C.sortList.length>0&&L.trigger("sorton",[C.sortList]);p(this)}})};this.addParser=function(H){for(var L=I.length,f=true,t=0;t<L;t++)if(I[t].id.toLowerCase()==H.id.toLowerCase())f=false;f&&I.push(H)};this.addWidget=function(H){R.push(H)};
this.formatFloat=function(H){H=parseFloat(H);return isNaN(H)?0:H};this.formatInt=function(H){H=parseInt(H);return isNaN(H)?0:H};this.isDigit=function(H,L){L="\\"+L.decimal;L="/(^[+]?0("+L+"0+)?$)|(^([-+]?[1-9][0-9]*)$)|(^([-+]?((0?|[1-9][0-9]*)"+L+"(0*[1-9][0-9]*)))$)|(^[-+]?[1-9]+[0-9]*"+L+"0+$)/";return RegExp(L).test(b.trim(H))};this.clearTableBody=function(H){if(b.browser.msie){function L(){for(;this.firstChild;)this.removeChild(this.firstChild)}L.apply(H.tBodies[0])}else H.tBodies[0].innerHTML=
""}})});b.fn.extend({tablesorter:b.tablesorter.construct});var c=b.tablesorter;c.addParser({id:"text",is:function(){return true},format:function(o){return b.trim(o.toLowerCase())},type:"text"});c.addParser({id:"digit",is:function(o,d){d=d.config;return b.tablesorter.isDigit(o,d)},format:function(o){return b.tablesorter.formatFloat(o)},type:"numeric"});c.addParser({id:"currency",is:function(o){return/^[\u00a3$\u20ac?.]/.test(o)},format:function(o){return b.tablesorter.formatFloat(o.replace(new RegExp(/[^0-9.]/g),
""))},type:"numeric"});c.addParser({id:"ipAddress",is:function(o){return/^\d{2,3}[\.]\d{2,3}[\.]\d{2,3}[\.]\d{2,3}$/.test(o)},format:function(o){o=o.split(".");for(var d="",e=o.length,g=0;g<e;g++){var k=o[g];d+=k.length==2?"0"+k:k}return b.tablesorter.formatFloat(d)},type:"numeric"});c.addParser({id:"url",is:function(o){return/^(https?|ftp|file):\/\/$/.test(o)},format:function(o){return jQuery.trim(o.replace(new RegExp(/(https?|ftp|file):\/\//),""))},type:"text"});c.addParser({id:"isoDate",is:function(o){return/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(o)},
format:function(o){return b.tablesorter.formatFloat(o!=""?(new Date(o.replace(new RegExp(/-/g),"/"))).getTime():"0")},type:"numeric"});c.addParser({id:"percent",is:function(o){return/\%$/.test(b.trim(o))},format:function(o){return b.tablesorter.formatFloat(o.replace(new RegExp(/%/g),""))},type:"numeric"});c.addParser({id:"usLongDate",is:function(o){return o.match(new RegExp(/^[A-Za-z]{3,10}\.? [0-9]{1,2}, ([0-9]{4}|'?[0-9]{2}) (([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\s(AM|PM)))$/))},format:function(o){return b.tablesorter.formatFloat((new Date(o)).getTime())},
type:"numeric"});c.addParser({id:"shortDate",is:function(o){return/\d{1,2}[\/\-]\d{1,2}[\/\-]\d{2,4}/.test(o)},format:function(o,d){d=d.config;o=o.replace(/\-/g,"/");if(d.dateFormat=="us")o=o.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/,"$3/$1/$2");else if(d.dateFormat=="uk")o=o.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/,"$3/$2/$1");else if(d.dateFormat=="dd/mm/yy"||d.dateFormat=="dd-mm-yy")o=o.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{2})/,"$1/$2/$3");return b.tablesorter.formatFloat((new Date(o)).getTime())},
type:"numeric"});c.addParser({id:"time",is:function(o){return/^(([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\s(am|pm)))$/.test(o)},format:function(o){return b.tablesorter.formatFloat((new Date("2000/01/01 "+o)).getTime())},type:"numeric"});c.addParser({id:"metadata",is:function(){return false},format:function(o,d,e){o=d.config;o=!o.parserMetadataName?"sortValue":o.parserMetadataName;return b(e).metadata()[o]},type:"numeric"});c.addWidget({id:"zebra",format:function(o){if(o.config.debug)var d=
new Date;b("tr:visible",o.tBodies[0]).filter(":even").removeClass(o.config.widgetZebra.css[1]).addClass(o.config.widgetZebra.css[0]).end().filter(":odd").removeClass(o.config.widgetZebra.css[0]).addClass(o.config.widgetZebra.css[1]);o.config.debug&&b.tablesorter.benchmark("Applying Zebra widget",d)}})})(jQuery);
(function(b){b.fn.hoverIntent=function(c,o){var d={sensitivity:7,interval:100,timeout:0};d=b.extend(d,o?{over:c,out:o}:c);var e,g,k,l;function n(x){e=x.pageX;g=x.pageY}function q(x,p){p.hoverIntent_t=clearTimeout(p.hoverIntent_t);if(Math.abs(k-e)+Math.abs(l-g)<d.sensitivity){b(p).unbind("mousemove",n);p.hoverIntent_s=1;return d.over.apply(p,[x])}else{k=e;l=g;p.hoverIntent_t=setTimeout(function(){q(x,p)},d.interval)}}function u(x,p){p.hoverIntent_t=clearTimeout(p.hoverIntent_t);p.hoverIntent_s=0;return d.out.apply(p,
[x])}function B(x){for(var p=(x.type=="mouseover"?x.fromElement:x.toElement)||x.relatedTarget;p&&p!=this;)try{p=p.parentNode}catch(z){p=this}if(p==this)return false;var K=jQuery.extend({},x),v=this;if(v.hoverIntent_t)v.hoverIntent_t=clearTimeout(v.hoverIntent_t);if(x.type=="mouseover"){k=K.pageX;l=K.pageY;b(v).bind("mousemove",n);if(v.hoverIntent_s!=1)v.hoverIntent_t=setTimeout(function(){q(K,v)},d.interval)}else{b(v).unbind("mousemove",n);if(v.hoverIntent_s==1)v.hoverIntent_t=setTimeout(function(){u(K,
v)},d.timeout)}}return this.mouseover(B).mouseout(B)}})(jQuery);
(function(b){function c(e,g){return parseInt(b.css(e[0],g))||0}function o(e){return e[0].offsetWidth+c(e,"marginLeft")+c(e,"marginRight")}function d(e){return e[0].offsetHeight+c(e,"marginTop")+c(e,"marginBottom")}b.fn.jCarouselLite=function(e){e=b.extend({btnPrev:null,btnNext:null,btnGo:null,mouseWheel:false,auto:null,speed:200,easing:null,vertical:false,circular:true,visible:3,start:0,scroll:1,beforeStart:null,afterEnd:null},e||{});return this.each(function(){function g(){r&&clearTimeout(r);r=setTimeout(function(){l(y+
e.scroll)},e.auto+e.speed)}function k(){return v.slice(y).slice(0,K)}function l(A){if(!n){e.auto&&g();e.beforeStart&&e.beforeStart.call(this,k(),y);if(e.circular)if(A<=e.start-K-1){x.css(q,-((E-K*2)*m)+"px");y=A==e.start-K-1?E-K*2-1:E-K*2-e.scroll}else if(A>=E-K+1){x.css(q,-(K*m)+"px");y=A==E-K+1?K+1:K+e.scroll}else y=A;else if(A<0||A>E-K)return;else y=A;n=true;x.animate(q=="left"?{left:-(y*m)}:{top:-(y*m)},e.speed,e.easing,function(){e.afterEnd&&e.afterEnd.call(this,k(),y);n=false});if(!e.circular){b(e.btnPrev+
","+e.btnNext).removeClass("disabled");b(y-e.scroll<0&&e.btnPrev||y+e.scroll>E-K&&e.btnNext||[]).addClass("disabled")}}return false}var n=false,q=e.vertical?"top":"left",u=e.vertical?"height":"width",B=b(this),x=b("ul",B),p=b("li",x),z=p.size(),K=e.visible;if(e.circular){x.prepend(p.slice(z-K-1+1).clone()).append(p.slice(0,K).clone());e.start+=K}var v=b("li",x),E=v.size(),y=e.start;B.css("visibility","visible");v.css({overflow:"hidden","float":e.vertical?"none":"left"});x.css({margin:"0",padding:"0",
position:"relative","list-style-type":"none","z-index":"1"});B.css({overflow:"hidden",position:"relative","z-index":"2",left:"0px"});var m=e.vertical?d(v):o(v);p=m*E;z=m*K;var r=null;v.css({width:v.width(),height:v.height()});x.css(u,p+"px").css(q,-(y*m));B.css(u,z+"px");e.btnPrev&&b(e.btnPrev).click(function(){return l(y-e.scroll)});e.btnNext&&b(e.btnNext).click(function(){return l(y+e.scroll)});e.btnGo&&b.each(e.btnGo,function(A,J){b(J).click(function(){return l(e.circular?e.visible+A:A)})});e.mouseWheel&&
B.mousewheel&&B.mousewheel(function(A,J){return J>0?l(y-e.scroll):l(y+e.scroll)});e.auto&&g()})}})(jQuery);
jQuery.effects||function(b){function c(g,k){var l=g[1]&&g[1].constructor==Object?g[1]:{};if(k)l.mode=k;k=g[1]&&g[1].constructor!=Object?g[1]:l.duration?l.duration:g[2];k=b.fx.off?0:typeof k==="number"?k:b.fx.speeds[k]||b.fx.speeds._default;var n=l.callback||b.isFunction(g[1])&&g[1]||b.isFunction(g[2])&&g[2]||b.isFunction(g[3])&&g[3];return[g[0],l,k,n]}function o(g){var k;if(g&&g.constructor==Array&&g.length==3)return g;if(k=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(g))return[parseInt(k[1],
10),parseInt(k[2],10),parseInt(k[3],10)];if(k=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(g))return[parseFloat(k[1])*2.55,parseFloat(k[2])*2.55,parseFloat(k[3])*2.55];if(k=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(g))return[parseInt(k[1],16),parseInt(k[2],16),parseInt(k[3],16)];if(k=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(g))return[parseInt(k[1]+k[1],16),parseInt(k[2]+k[2],16),parseInt(k[3]+k[3],16)];if(/rgba\(0, 0, 0, 0\)/.exec(g))return e.transparent;
return e[b.trim(g).toLowerCase()]}function d(g,k){var l;do{l=b.curCSS(g,k);if(l!=""&&l!="transparent"||b.nodeName(g,"body"))break;k="backgroundColor"}while(g=g.parentNode);return o(l)}b.effects={version:"1.7.2",save:function(g,k){for(var l=0;l<k.length;l++)k[l]!==null&&g.data("ec.storage."+k[l],g[0].style[k[l]])},restore:function(g,k){for(var l=0;l<k.length;l++)k[l]!==null&&g.css(k[l],g.data("ec.storage."+k[l]))},setMode:function(g,k){if(k=="toggle")k=g.is(":hidden")?"show":"hide";return k},getBaseline:function(g,
k){var l;switch(g[0]){case "top":l=0;break;case "middle":l=0.5;break;case "bottom":l=1;break;default:l=g[0]/k.height}switch(g[1]){case "left":g=0;break;case "center":g=0.5;break;case "right":g=1;break;default:g=g[1]/k.width}return{x:g,y:l}},createWrapper:function(g){if(g.parent().is(".ui-effects-wrapper"))return g.parent();var k={width:g.outerWidth(true),height:g.outerHeight(true),"float":g.css("float")};g.wrap('<div class="ui-effects-wrapper" style="font-size:100%;background:transparent;border:none;margin:0;padding:0"></div>');
var l=g.parent();if(g.css("position")=="static"){l.css({position:"relative"});g.css({position:"relative"})}else{var n=g.css("top");if(isNaN(parseInt(n,10)))n="auto";var q=g.css("left");if(isNaN(parseInt(q,10)))q="auto";l.css({position:g.css("position"),top:n,left:q,zIndex:g.css("z-index")}).show();g.css({position:"relative",top:0,left:0})}l.css(k);return l},removeWrapper:function(g){if(g.parent().is(".ui-effects-wrapper"))return g.parent().replaceWith(g);return g},setTransition:function(g,k,l,n){n=
n||{};b.each(k,function(q,u){unit=g.cssUnit(u);if(unit[0]>0)n[u]=unit[0]*l+unit[1]});return n},animateClass:function(g,k,l,n){var q=typeof l=="function"?l:n?n:null,u=typeof l=="string"?l:null;return this.each(function(){var B={},x=b(this),p=x.attr("style")||"";if(typeof p=="object")p=p.cssText;if(g.toggle)x.hasClass(g.toggle)?(g.remove=g.toggle):(g.add=g.toggle);var z=b.extend({},document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle);g.add&&x.addClass(g.add);g.remove&&
x.removeClass(g.remove);var K=b.extend({},document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle);g.add&&x.removeClass(g.add);g.remove&&x.addClass(g.remove);for(var v in K)if(typeof K[v]!="function"&&K[v]&&v.indexOf("Moz")==-1&&v.indexOf("length")==-1&&K[v]!=z[v]&&(v.match(/color/i)||!v.match(/color/i)&&!isNaN(parseInt(K[v],10)))&&(z.position!="static"||z.position=="static"&&!v.match(/left|top|bottom|right/)))B[v]=K[v];x.animate(B,k,u,function(){if(typeof b(this).attr("style")==
"object"){b(this).attr("style").cssText="";b(this).attr("style").cssText=p}else b(this).attr("style",p);g.add&&b(this).addClass(g.add);g.remove&&b(this).removeClass(g.remove);q&&q.apply(this,arguments)})})}};b.fn.extend({_show:b.fn.show,_hide:b.fn.hide,__toggle:b.fn.toggle,_addClass:b.fn.addClass,_removeClass:b.fn.removeClass,_toggleClass:b.fn.toggleClass,effect:function(g,k,l,n){return b.effects[g]?b.effects[g].call(this,{method:g,options:k||{},duration:l,callback:n}):null},show:function(){return!arguments[0]||
arguments[0].constructor==Number||/(slow|normal|fast)/.test(arguments[0])?this._show.apply(this,arguments):this.effect.apply(this,c(arguments,"show"))},hide:function(){return!arguments[0]||arguments[0].constructor==Number||/(slow|normal|fast)/.test(arguments[0])?this._hide.apply(this,arguments):this.effect.apply(this,c(arguments,"hide"))},toggle:function(){return!arguments[0]||arguments[0].constructor==Number||/(slow|normal|fast)/.test(arguments[0])||b.isFunction(arguments[0])||typeof arguments[0]==
"boolean"?this.__toggle.apply(this,arguments):this.effect.apply(this,c(arguments,"toggle"))},addClass:function(g,k,l,n){return k?b.effects.animateClass.apply(this,[{add:g},k,l,n]):this._addClass(g)},removeClass:function(g,k,l,n){return k?b.effects.animateClass.apply(this,[{remove:g},k,l,n]):this._removeClass(g)},toggleClass:function(g,k,l,n){return typeof k!=="boolean"&&k?b.effects.animateClass.apply(this,[{toggle:g},k,l,n]):this._toggleClass(g,k)},morph:function(g,k,l,n,q){return b.effects.animateClass.apply(this,
[{add:k,remove:g},l,n,q])},switchClass:function(){return this.morph.apply(this,arguments)},cssUnit:function(g){var k=this.css(g),l=[];b.each(["em","px","%","pt"],function(n,q){if(k.indexOf(q)>0)l=[parseFloat(k),q]});return l}});b.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","color","outlineColor"],function(g,k){b.fx.step[k]=function(l){if(l.state==0){l.start=d(l.elem,k);l.end=o(l.end)}l.elem.style[k]="rgb("+[Math.max(Math.min(parseInt(l.pos*(l.end[0]-
l.start[0])+l.start[0],10),255),0),Math.max(Math.min(parseInt(l.pos*(l.end[1]-l.start[1])+l.start[1],10),255),0),Math.max(Math.min(parseInt(l.pos*(l.end[2]-l.start[2])+l.start[2],10),255),0)].join(",")+")"}});var e={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,
140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,
0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]};b.easing.jswing=b.easing.swing;b.extend(b.easing,{def:"easeOutQuad",swing:function(g,k,l,n,q){return b.easing[b.easing.def](g,k,l,n,q)},easeInQuad:function(g,k,l,n,q){return n*(k/=q)*k+l},easeOutQuad:function(g,k,l,n,q){return-n*(k/=q)*(k-2)+l},easeInOutQuad:function(g,k,l,n,q){if((k/=q/2)<1)return n/2*k*k+l;return-n/2*(--k*(k-2)-1)+l},easeInCubic:function(g,k,l,n,q){return n*(k/=q)*k*k+l},easeOutCubic:function(g,
k,l,n,q){return n*((k=k/q-1)*k*k+1)+l},easeInOutCubic:function(g,k,l,n,q){if((k/=q/2)<1)return n/2*k*k*k+l;return n/2*((k-=2)*k*k+2)+l},easeInQuart:function(g,k,l,n,q){return n*(k/=q)*k*k*k+l},easeOutQuart:function(g,k,l,n,q){return-n*((k=k/q-1)*k*k*k-1)+l},easeInOutQuart:function(g,k,l,n,q){if((k/=q/2)<1)return n/2*k*k*k*k+l;return-n/2*((k-=2)*k*k*k-2)+l},easeInQuint:function(g,k,l,n,q){return n*(k/=q)*k*k*k*k+l},easeOutQuint:function(g,k,l,n,q){return n*((k=k/q-1)*k*k*k*k+1)+l},easeInOutQuint:function(g,
k,l,n,q){if((k/=q/2)<1)return n/2*k*k*k*k*k+l;return n/2*((k-=2)*k*k*k*k+2)+l},easeInSine:function(g,k,l,n,q){return-n*Math.cos(k/q*(Math.PI/2))+n+l},easeOutSine:function(g,k,l,n,q){return n*Math.sin(k/q*(Math.PI/2))+l},easeInOutSine:function(g,k,l,n,q){return-n/2*(Math.cos(Math.PI*k/q)-1)+l},easeInExpo:function(g,k,l,n,q){return k==0?l:n*Math.pow(2,10*(k/q-1))+l},easeOutExpo:function(g,k,l,n,q){return k==q?l+n:n*(-Math.pow(2,-10*k/q)+1)+l},easeInOutExpo:function(g,k,l,n,q){if(k==0)return l;if(k==
q)return l+n;if((k/=q/2)<1)return n/2*Math.pow(2,10*(k-1))+l;return n/2*(-Math.pow(2,-10*--k)+2)+l},easeInCirc:function(g,k,l,n,q){return-n*(Math.sqrt(1-(k/=q)*k)-1)+l},easeOutCirc:function(g,k,l,n,q){return n*Math.sqrt(1-(k=k/q-1)*k)+l},easeInOutCirc:function(g,k,l,n,q){if((k/=q/2)<1)return-n/2*(Math.sqrt(1-k*k)-1)+l;return n/2*(Math.sqrt(1-(k-=2)*k)+1)+l},easeInElastic:function(g,k,l,n,q){g=1.70158;var u=0,B=n;if(k==0)return l;if((k/=q)==1)return l+n;u||(u=q*0.3);if(B<Math.abs(n)){B=n;g=u/4}else g=
u/(2*Math.PI)*Math.asin(n/B);return-(B*Math.pow(2,10*(k-=1))*Math.sin((k*q-g)*2*Math.PI/u))+l},easeOutElastic:function(g,k,l,n,q){g=1.70158;var u=0,B=n;if(k==0)return l;if((k/=q)==1)return l+n;u||(u=q*0.3);if(B<Math.abs(n)){B=n;g=u/4}else g=u/(2*Math.PI)*Math.asin(n/B);return B*Math.pow(2,-10*k)*Math.sin((k*q-g)*2*Math.PI/u)+n+l},easeInOutElastic:function(g,k,l,n,q){g=1.70158;var u=0,B=n;if(k==0)return l;if((k/=q/2)==2)return l+n;u||(u=q*0.3*1.5);if(B<Math.abs(n)){B=n;g=u/4}else g=u/(2*Math.PI)*Math.asin(n/
B);if(k<1)return-0.5*B*Math.pow(2,10*(k-=1))*Math.sin((k*q-g)*2*Math.PI/u)+l;return B*Math.pow(2,-10*(k-=1))*Math.sin((k*q-g)*2*Math.PI/u)*0.5+n+l},easeInBack:function(g,k,l,n,q,u){if(u==undefined)u=1.70158;return n*(k/=q)*k*((u+1)*k-u)+l},easeOutBack:function(g,k,l,n,q,u){if(u==undefined)u=1.70158;return n*((k=k/q-1)*k*((u+1)*k+u)+1)+l},easeInOutBack:function(g,k,l,n,q,u){if(u==undefined)u=1.70158;if((k/=q/2)<1)return n/2*k*k*(((u*=1.525)+1)*k-u)+l;return n/2*((k-=2)*k*(((u*=1.525)+1)*k+u)+2)+l},
easeInBounce:function(g,k,l,n,q){return n-b.easing.easeOutBounce(g,q-k,0,n,q)+l},easeOutBounce:function(g,k,l,n,q){return(k/=q)<1/2.75?n*7.5625*k*k+l:k<2/2.75?n*(7.5625*(k-=1.5/2.75)*k+0.75)+l:k<2.5/2.75?n*(7.5625*(k-=2.25/2.75)*k+0.9375)+l:n*(7.5625*(k-=2.625/2.75)*k+0.984375)+l},easeInOutBounce:function(g,k,l,n,q){if(k<q/2)return b.easing.easeInBounce(g,k*2,0,n,q)*0.5+l;return b.easing.easeOutBounce(g,k*2-q,0,n,q)*0.5+n*0.5+l}})}(jQuery);
(function(b){b.effects.highlight=function(c){return this.queue(function(){var o=b(this),d=["backgroundImage","backgroundColor","opacity"],e=b.effects.setMode(o,c.options.mode||"show"),g=c.options.color||"#ffff99",k=o.css("backgroundColor");b.effects.save(o,d);o.show();o.css({backgroundImage:"none",backgroundColor:g});g={backgroundColor:k};if(e=="hide")g.opacity=0;o.animate(g,{queue:false,duration:c.duration,easing:c.options.easing,complete:function(){e=="hide"&&o.hide();b.effects.restore(o,d);e==
"show"&&b.browser.msie&&this.style.removeAttribute("filter");c.callback&&c.callback.apply(this,arguments);o.dequeue()}})})}})(jQuery);
(function(b){b.effects.pulsate=function(c){return this.queue(function(){var o=b(this),d=b.effects.setMode(o,c.options.mode||"show"),e=c.options.times||5,g=c.duration?c.duration/2:b.fx.speeds._default/2;d=="hide"&&e--;if(o.is(":hidden")){o.css("opacity",0);o.show();o.animate({opacity:1},g,c.options.easing);e-=2}for(var k=0;k<e;k++)o.animate({opacity:0},g,c.options.easing).animate({opacity:1},g,c.options.easing);d=="hide"?o.animate({opacity:0},g,c.options.easing,function(){o.hide();c.callback&&c.callback.apply(this,
arguments)}):o.animate({opacity:0},g,c.options.easing).animate({opacity:1},g,c.options.easing,function(){c.callback&&c.callback.apply(this,arguments)});o.queue("fx",function(){o.dequeue()});o.dequeue()})}})(jQuery);
(function(b){b.effects.slide=function(c){return this.queue(function(){var o=b(this),d=["position","top","left"],e=b.effects.setMode(o,c.options.mode||"show"),g=c.options.direction||"left";b.effects.save(o,d);o.show();b.effects.createWrapper(o).css({overflow:"hidden"});var k=g=="up"||g=="down"?"top":"left";g=g=="up"||g=="left"?"pos":"neg";var l=c.options.distance||(k=="top"?o.outerHeight({margin:true}):o.outerWidth({margin:true}));if(e=="show")o.css(k,g=="pos"?-l:l);var n={};n[k]=(e=="show"?g=="pos"?
"+=":"-=":g=="pos"?"-=":"+=")+l;o.animate(n,{queue:false,duration:c.duration,easing:c.options.easing,complete:function(){e=="hide"&&o.hide();b.effects.restore(o,d);b.effects.removeWrapper(o);c.callback&&c.callback.apply(this,arguments);o.dequeue()}})})}})(jQuery);
jQuery.ui||function(b){function c(q,u,B,x){function p(K){K=b[q][u][K]||[];return typeof K=="string"?K.split(/,?\s+/):K}var z=p("getter");if(x.length==1&&typeof x[0]=="string")z=z.concat(p("getterSetter"));return b.inArray(B,z)!=-1}var o=b.fn.remove,d=b.browser.mozilla&&parseFloat(b.browser.version)<1.9;b.ui={version:"1.7.2",plugin:{add:function(q,u,B){q=b.ui[q].prototype;for(var x in B){q.plugins[x]=q.plugins[x]||[];q.plugins[x].push([u,B[x]])}},call:function(q,u,B){if((u=q.plugins[u])&&q.element[0].parentNode)for(var x=
0;x<u.length;x++)q.options[u[x][0]]&&u[x][1].apply(q.element,B)}},contains:function(q,u){return document.compareDocumentPosition?q.compareDocumentPosition(u)&16:q!==u&&q.contains(u)},hasScroll:function(q,u){if(b(q).css("overflow")=="hidden")return false;u=u&&u=="left"?"scrollLeft":"scrollTop";var B=false;if(q[u]>0)return true;q[u]=1;B=q[u]>0;q[u]=0;return B},isOverAxis:function(q,u,B){return q>u&&q<u+B},isOver:function(q,u,B,x,p,z){return b.ui.isOverAxis(q,B,p)&&b.ui.isOverAxis(u,x,z)},keyCode:{BACKSPACE:8,
CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38}};if(d){var e=b.attr,g=b.fn.removeAttr,k="http://www.w3.org/2005/07/aaa",l=/^aria-/,n=/^wairole:/;b.attr=function(q,u,B){var x=B!==undefined;return u=="role"?x?e.call(this,q,u,"wairole:"+B):(e.apply(this,arguments)||
"").replace(n,""):l.test(u)?x?q.setAttributeNS(k,u.replace(l,"aaa:"),B):e.call(this,q,u.replace(l,"aaa:")):e.apply(this,arguments)};b.fn.removeAttr=function(q){return l.test(q)?this.each(function(){this.removeAttributeNS(k,q.replace(l,""))}):g.call(this,q)}}b.fn.extend({remove:function(){b("*",this).add(this).each(function(){b(this).triggerHandler("remove")});return o.apply(this,arguments)},enableSelection:function(){return this.attr("unselectable","off").css("MozUserSelect","").unbind("selectstart.ui")},
disableSelection:function(){return this.attr("unselectable","on").css("MozUserSelect","none").bind("selectstart.ui",function(){return false})},scrollParent:function(){var q;q=b.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(b.curCSS(this,"position",1))&&/(auto|scroll)/.test(b.curCSS(this,"overflow",1)+b.curCSS(this,"overflow-y",1)+b.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(b.curCSS(this,
"overflow",1)+b.curCSS(this,"overflow-y",1)+b.curCSS(this,"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||!q.length?b(document):q}});b.extend(b.expr[":"],{data:function(q,u,B){return!!b.data(q,B[3])},focusable:function(q){var u=q.nodeName.toLowerCase(),B=b.attr(q,"tabindex");return(/input|select|textarea|button|object/.test(u)?!q.disabled:"a"==u||"area"==u?q.href||!isNaN(B):!isNaN(B))&&!b(q)["area"==u?"parents":"closest"](":hidden").length},tabbable:function(q){var u=b.attr(q,"tabindex");
return(isNaN(u)||u>=0)&&b(q).is(":focusable")}});b.widget=function(q,u){var B=q.split(".")[0];q=q.split(".")[1];b.fn[q]=function(x){var p=typeof x=="string",z=Array.prototype.slice.call(arguments,1);if(p&&x.substring(0,1)=="_")return this;if(p&&c(B,q,x,z)){var K=b.data(this[0],q);return K?K[x].apply(K,z):undefined}return this.each(function(){var v=b.data(this,q);!v&&!p&&b.data(this,q,new b[B][q](this,x))._init();v&&p&&b.isFunction(v[x])&&v[x].apply(v,z)})};b[B]=b[B]||{};b[B][q]=function(x,p){var z=
this;this.namespace=B;this.widgetName=q;this.widgetEventPrefix=b[B][q].eventPrefix||q;this.widgetBaseClass=B+"-"+q;this.options=b.extend({},b.widget.defaults,b[B][q].defaults,b.metadata&&b.metadata.get(x)[q],p);this.element=b(x).bind("setData."+q,function(K,v,E){if(K.target==x)return z._setData(v,E)}).bind("getData."+q,function(K,v){if(K.target==x)return z._getData(v)}).bind("remove",function(){return z.destroy()})};b[B][q].prototype=b.extend({},b.widget.prototype,u);b[B][q].getterSetter="option"};
b.widget.prototype={_init:function(){},destroy:function(){this.element.removeData(this.widgetName).removeClass(this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").removeAttr("aria-disabled")},option:function(q,u){var B=q,x=this;if(typeof q=="string"){if(u===undefined)return this._getData(q);B={};B[q]=u}b.each(B,function(p,z){x._setData(p,z)})},_getData:function(q){return this.options[q]},_setData:function(q,u){this.options[q]=u;if(q=="disabled")this.element[u?"addClass":"removeClass"](this.widgetBaseClass+
"-disabled "+this.namespace+"-state-disabled").attr("aria-disabled",u)},enable:function(){this._setData("disabled",false)},disable:function(){this._setData("disabled",true)},_trigger:function(q,u,B){var x=this.options[q];q=q==this.widgetEventPrefix?q:this.widgetEventPrefix+q;u=b.Event(u);u.type=q;if(u.originalEvent){q=b.event.props.length;for(var p;q;){p=b.event.props[--q];u[p]=u.originalEvent[p]}}this.element.trigger(u,B);return!(b.isFunction(x)&&x.call(this.element[0],u,B)===false||u.isDefaultPrevented())}};
b.widget.defaults={disabled:false};b.ui.mouse={_mouseInit:function(){var q=this;this.element.bind("mousedown."+this.widgetName,function(u){return q._mouseDown(u)}).bind("click."+this.widgetName,function(u){if(q._preventClickEvent){q._preventClickEvent=false;u.stopImmediatePropagation();return false}});if(b.browser.msie){this._mouseUnselectable=this.element.attr("unselectable");this.element.attr("unselectable","on")}this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName);
b.browser.msie&&this.element.attr("unselectable",this._mouseUnselectable)},_mouseDown:function(q){q.originalEvent=q.originalEvent||{};if(!q.originalEvent.mouseHandled){this._mouseStarted&&this._mouseUp(q);this._mouseDownEvent=q;var u=this,B=q.which==1,x=typeof this.options.cancel=="string"?b(q.target).parents().add(q.target).filter(this.options.cancel).length:false;if(!B||x||!this._mouseCapture(q))return true;this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet)this._mouseDelayTimer=setTimeout(function(){u.mouseDelayMet=
true},this.options.delay);if(this._mouseDistanceMet(q)&&this._mouseDelayMet(q)){this._mouseStarted=this._mouseStart(q)!==false;if(!this._mouseStarted){q.preventDefault();return true}}this._mouseMoveDelegate=function(p){return u._mouseMove(p)};this._mouseUpDelegate=function(p){return u._mouseUp(p)};b(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);b.browser.safari||q.preventDefault();return q.originalEvent.mouseHandled=true}},
_mouseMove:function(q){if(b.browser.msie&&!q.button)return this._mouseUp(q);if(this._mouseStarted){this._mouseDrag(q);return q.preventDefault()}if(this._mouseDistanceMet(q)&&this._mouseDelayMet(q))(this._mouseStarted=this._mouseStart(this._mouseDownEvent,q)!==false)?this._mouseDrag(q):this._mouseUp(q);return!this._mouseStarted},_mouseUp:function(q){b(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=
false;this._preventClickEvent=q.target==this._mouseDownEvent.target;this._mouseStop(q)}return false},_mouseDistanceMet:function(q){return Math.max(Math.abs(this._mouseDownEvent.pageX-q.pageX),Math.abs(this._mouseDownEvent.pageY-q.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return true}};b.ui.mouse.defaults={cancel:null,distance:1,delay:0}}(jQuery);
(function(b){b.widget("ui.slider",b.extend({},b.ui.mouse,{_init:function(){var c=this,o=this.options;this._keySliding=false;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all");this.range=b([]);if(o.range){if(o.range===true){this.range=b("<div></div>");if(!o.values)o.values=[this._valueMin(),this._valueMin()];if(o.values.length&&o.values.length!=2)o.values=[o.values[0],o.values[0]]}else this.range=
b("<div></div>");this.range.appendTo(this.element).addClass("ui-slider-range");if(o.range=="min"||o.range=="max")this.range.addClass("ui-slider-range-"+o.range);this.range.addClass("ui-widget-header")}b(".ui-slider-handle",this.element).length==0&&b('<a href="#"></a>').appendTo(this.element).addClass("ui-slider-handle");if(o.values&&o.values.length)for(;b(".ui-slider-handle",this.element).length<o.values.length;)b('<a href="#"></a>').appendTo(this.element).addClass("ui-slider-handle");this.handles=
b(".ui-slider-handle",this.element).addClass("ui-state-default ui-corner-all");this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(d){d.preventDefault()}).hover(function(){o.disabled||b(this).addClass("ui-state-hover")},function(){b(this).removeClass("ui-state-hover")}).focus(function(){if(o.disabled)b(this).blur();else{b(".ui-slider .ui-state-focus").removeClass("ui-state-focus");b(this).addClass("ui-state-focus")}}).blur(function(){b(this).removeClass("ui-state-focus")});
this.handles.each(function(d){b(this).data("index.ui-slider-handle",d)});this.handles.keydown(function(d){var e=true,g=b(this).data("index.ui-slider-handle");if(!c.options.disabled){switch(d.keyCode){case b.ui.keyCode.HOME:case b.ui.keyCode.END:case b.ui.keyCode.UP:case b.ui.keyCode.RIGHT:case b.ui.keyCode.DOWN:case b.ui.keyCode.LEFT:e=false;if(!c._keySliding){c._keySliding=true;b(this).addClass("ui-state-active");c._start(d,g)}break}var k,l,n=c._step();k=c.options.values&&c.options.values.length?
(l=c.values(g)):(l=c.value());switch(d.keyCode){case b.ui.keyCode.HOME:l=c._valueMin();break;case b.ui.keyCode.END:l=c._valueMax();break;case b.ui.keyCode.UP:case b.ui.keyCode.RIGHT:if(k==c._valueMax())return;l=k+n;break;case b.ui.keyCode.DOWN:case b.ui.keyCode.LEFT:if(k==c._valueMin())return;l=k-n;break}c._slide(d,g,l);return e}}).keyup(function(d){var e=b(this).data("index.ui-slider-handle");if(c._keySliding){c._stop(d,e);c._change(d,e);c._keySliding=false;b(this).removeClass("ui-state-active")}});
this._refreshValue()},destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider");this._mouseDestroy()},_mouseCapture:function(c){var o=this.options;if(o.disabled)return false;this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();var d={x:c.pageX,y:c.pageY},
e=this._normValueFromMouse(d),g=this._valueMax()-this._valueMin()+1,k,l=this,n;this.handles.each(function(u){var B=Math.abs(e-l.values(u));if(g>B){g=B;k=b(this);n=u}});if(o.range==true&&this.values(1)==o.min)k=b(this.handles[++n]);this._start(c,n);l._handleIndex=n;k.addClass("ui-state-active").focus();o=k.offset();var q=!b(c.target).parents().andSelf().is(".ui-slider-handle");this._clickOffset=q?{left:0,top:0}:{left:c.pageX-o.left-k.width()/2,top:c.pageY-o.top-k.height()/2-(parseInt(k.css("borderTopWidth"),
10)||0)-(parseInt(k.css("borderBottomWidth"),10)||0)+(parseInt(k.css("marginTop"),10)||0)};e=this._normValueFromMouse(d);this._slide(c,n,e);return true},_mouseStart:function(){return true},_mouseDrag:function(c){var o={x:c.pageX,y:c.pageY};o=this._normValueFromMouse(o);this._slide(c,this._handleIndex,o);return false},_mouseStop:function(c){this.handles.removeClass("ui-state-active");this._stop(c,this._handleIndex);this._change(c,this._handleIndex);this._clickOffset=this._handleIndex=null;return false},
_detectOrientation:function(){this.orientation=this.options.orientation=="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(c){var o;if("horizontal"==this.orientation){o=this.elementSize.width;c=c.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{o=this.elementSize.height;c=c.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}o=c/o;if(o>1)o=1;if(o<0)o=0;if("vertical"==this.orientation)o=1-o;c=this._valueMax()-this._valueMin();c=o*c;o=c%this.options.step;
c=this._valueMin()+c-o;if(o>this.options.step/2)c+=this.options.step;return parseFloat(c.toFixed(5))},_start:function(c,o){var d={handle:this.handles[o],value:this.value()};if(this.options.values&&this.options.values.length){d.value=this.values(o);d.values=this.values()}this._trigger("start",c,d)},_slide:function(c,o,d){if(this.options.values&&this.options.values.length){var e=this.values(o?0:1);if(this.options.values.length==2&&this.options.range===true&&(o==0&&d>e||o==1&&d<e))d=e;if(d!=this.values(o)){e=
this.values();e[o]=d;e=this._trigger("slide",c,{handle:this.handles[o],value:d,values:e});this.values(o?0:1);e!==false&&this.values(o,d,c.type=="mousedown"&&this.options.animate,true)}}else if(d!=this.value()){e=this._trigger("slide",c,{handle:this.handles[o],value:d});e!==false&&this._setData("value",d,c.type=="mousedown"&&this.options.animate)}},_stop:function(c,o){var d={handle:this.handles[o],value:this.value()};if(this.options.values&&this.options.values.length){d.value=this.values(o);d.values=
this.values()}this._trigger("stop",c,d)},_change:function(c,o){var d={handle:this.handles[o],value:this.value()};if(this.options.values&&this.options.values.length){d.value=this.values(o);d.values=this.values()}this._trigger("change",c,d)},value:function(c){if(arguments.length){this._setData("value",c);this._change(null,0)}return this._value()},values:function(c,o,d,e){if(arguments.length>1){this.options.values[c]=o;this._refreshValue(d);e||this._change(null,c)}return arguments.length?this.options.values&&
this.options.values.length?this._values(c):this.value():this._values()},_setData:function(c,o,d){b.widget.prototype._setData.apply(this,arguments);switch(c){case "disabled":if(o){this.handles.filter(".ui-state-focus").blur();this.handles.removeClass("ui-state-hover");this.handles.attr("disabled","disabled")}else this.handles.removeAttr("disabled");case "orientation":this._detectOrientation();this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation);
this._refreshValue(d);break;case "value":this._refreshValue(d);break}},_step:function(){var c=this.options.step;return c},_value:function(){var c=this.options.value;if(c<this._valueMin())c=this._valueMin();if(c>this._valueMax())c=this._valueMax();return c},_values:function(c){if(arguments.length){var o=this.options.values[c];if(o<this._valueMin())o=this._valueMin();if(o>this._valueMax())o=this._valueMax();return o}else return this.options.values},_valueMin:function(){var c=this.options.min;return c},
_valueMax:function(){var c=this.options.max;return c},_refreshValue:function(c){var o=this.options.range,d=this.options,e=this;if(this.options.values&&this.options.values.length)this.handles.each(function(q){var u=(e.values(q)-e._valueMin())/(e._valueMax()-e._valueMin())*100,B={};B[e.orientation=="horizontal"?"left":"bottom"]=u+"%";b(this).stop(1,1)[c?"animate":"css"](B,d.animate);if(e.options.range===true)if(e.orientation=="horizontal"){q==0&&e.range.stop(1,1)[c?"animate":"css"]({left:u+"%"},d.animate);
q==1&&e.range[c?"animate":"css"]({width:u-lastValPercent+"%"},{queue:false,duration:d.animate})}else{q==0&&e.range.stop(1,1)[c?"animate":"css"]({bottom:u+"%"},d.animate);q==1&&e.range[c?"animate":"css"]({height:u-lastValPercent+"%"},{queue:false,duration:d.animate})}lastValPercent=u});else{var g=this.value(),k=this._valueMin(),l=this._valueMax();g=l!=k?(g-k)/(l-k)*100:0;var n={};n[e.orientation=="horizontal"?"left":"bottom"]=g+"%";this.handle.stop(1,1)[c?"animate":"css"](n,d.animate);o=="min"&&this.orientation==
"horizontal"&&this.range.stop(1,1)[c?"animate":"css"]({width:g+"%"},d.animate);o=="max"&&this.orientation=="horizontal"&&this.range[c?"animate":"css"]({width:100-g+"%"},{queue:false,duration:d.animate});o=="min"&&this.orientation=="vertical"&&this.range.stop(1,1)[c?"animate":"css"]({height:g+"%"},d.animate);o=="max"&&this.orientation=="vertical"&&this.range[c?"animate":"css"]({height:100-g+"%"},{queue:false,duration:d.animate})}}}));b.extend(b.ui.slider,{getter:"value values",version:"1.7.2",eventPrefix:"slide",
defaults:{animate:false,delay:0,distance:0,max:100,min:0,orientation:"horizontal",range:false,step:1,value:0,values:null}})})(jQuery);
(function(){window.Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(b){var c="",o,d,e,g,k,l,n=0;for(b=Base64._utf8_encode(b);n<b.length;){o=b.charCodeAt(n++);d=b.charCodeAt(n++);e=b.charCodeAt(n++);g=o>>2;o=(o&3)<<4|d>>4;k=(d&15)<<2|e>>6;l=e&63;if(isNaN(d))k=l=64;else if(isNaN(e))l=64;c=c+this._keyStr.charAt(g)+this._keyStr.charAt(o)+this._keyStr.charAt(k)+this._keyStr.charAt(l)}return c},decode:function(b){var c="",o,d,e,g,k,l=0;for(b=b.replace(/[^A-Za-z0-9\+\/\=]/g,
"");l<b.length;){o=this._keyStr.indexOf(b.charAt(l++));d=this._keyStr.indexOf(b.charAt(l++));g=this._keyStr.indexOf(b.charAt(l++));k=this._keyStr.indexOf(b.charAt(l++));o=o<<2|d>>4;d=(d&15)<<4|g>>2;e=(g&3)<<6|k;c+=String.fromCharCode(o);if(g!=64)c+=String.fromCharCode(d);if(k!=64)c+=String.fromCharCode(e)}return c=Base64._utf8_decode(c)},_utf8_encode:function(b){b=b.replace(/\r\n/g,"\n");for(var c="",o=0;o<b.length;o++){var d=b.charCodeAt(o);if(d<128)c+=String.fromCharCode(d);else{if(d>127&&d<2048)c+=
String.fromCharCode(d>>6|192);else{c+=String.fromCharCode(d>>12|224);c+=String.fromCharCode(d>>6&63|128)}c+=String.fromCharCode(d&63|128)}}return c},_utf8_decode:function(b){for(var c="",o=0,d=c1=c2=0;o<b.length;){d=b.charCodeAt(o);if(d<128){c+=String.fromCharCode(d);o++}else if(d>191&&d<224){c2=b.charCodeAt(o+1);c+=String.fromCharCode((d&31)<<6|c2&63);o+=2}else{c2=b.charCodeAt(o+1);c3=b.charCodeAt(o+2);c+=String.fromCharCode((d&15)<<12|(c2&63)<<6|c3&63);o+=3}}return c}}})();
if(typeof org=="undefined")var org={};if(typeof org.openx=="undefined")org.openx={};if(typeof org.openx.util=="undefined")org.openx.util={};if(typeof org.openx.SWFObjectUtil=="undefined")org.openx.SWFObjectUtil={};
org.openx.SWFObject=function(b,c,o,d,e,g,k,l,n,q){if(document.getElementById){this.DETECT_KEY=q?q:"detectflash";this.skipDetect=org.openx.util.getRequestParameter(this.DETECT_KEY);this.params={};this.variables={};this.attributes=[];b&&this.setAttribute("swf",b);c&&this.setAttribute("id",c);o&&this.setAttribute("width",o);d&&this.setAttribute("height",d);e&&this.setAttribute("version",new org.openx.PlayerVersion(e.toString().split(".")));this.installedVer=org.openx.SWFObjectUtil.getPlayerVersion();
if(!window.opera&&document.all&&this.installedVer.major>7)org.openx.SWFObject.doPrepUnload=true;g&&this.addParam("bgcolor",g);c=k?k:"high";this.addParam("quality",c);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var u=l?l:window.location;this.setAttribute("xiRedirectUrl",u);this.setAttribute("redirectUrl","");n&&this.setAttribute("redirectUrl",n)}};
org.openx.SWFObject.prototype={useExpressInstall:function(b){this.xiSWFPath=!b?"expressinstall.swf":b;this.setAttribute("useExpressInstall",true)},setAttribute:function(b,c){this.attributes[b]=c},getAttribute:function(b){return this.attributes[b]},addParam:function(b,c){this.params[b]=c},getParams:function(){return this.params},addVariable:function(b,c){this.variables[b]=c},getVariable:function(b){return this.variables[b]},getVariables:function(){return this.variables},getVariablePairs:function(){var b=
[],c,o=this.getVariables();for(c in o)b[b.length]=c+"="+o[c];return b},getSWFHTML:function(){var b="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath)}b='<embed type="application/x-shockwave-flash" src="'+this.getAttribute("swf")+'" width="'+this.getAttribute("width")+'" height="'+this.getAttribute("height")+'" style="'+this.getAttribute("style")+'"';b+=
' id="'+this.getAttribute("id")+'" name="'+this.getAttribute("id")+'" ';var c=this.getParams();for(var o in c)b+=[o]+'="'+c[o]+'" ';var d=this.getVariablePairs().join("&");if(d.length>0)b+='flashvars="'+d+'"';b+="/>"}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath)}b='<object id="'+this.getAttribute("id")+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+this.getAttribute("width")+'" height="'+this.getAttribute("height")+
'" style="'+this.getAttribute("style")+'">';b+='<param name="movie" value="'+this.getAttribute("swf")+'" />';var e=this.getParams();for(o in e)b+='<param name="'+o+'" value="'+e[o]+'" />';var g=this.getVariablePairs().join("&");if(g.length>0)b+='<param name="flashvars" value="'+g+'" />';b+="</object>"}return b},write:function(b){if(this.getAttribute("useExpressInstall")){var c=new org.openx.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(c)&&!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 o=typeof b=="string"?document.getElementById(b):b;o.innerHTML=this.getSWFHTML();return true}else this.getAttribute("redirectUrl")!=""&&document.location.replace(this.getAttribute("redirectUrl"));
return false}};
org.openx.SWFObjectUtil.getPlayerVersion=function(){var b=new org.openx.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var c=navigator.plugins["Shockwave Flash"];if(c&&c.description)b=new org.openx.PlayerVersion(c.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."))}else if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){c=1;for(var o=3;c;)try{o++;c=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+o);b=new org.openx.PlayerVersion([o,
0,0])}catch(d){c=null}}else{try{c=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")}catch(e){try{c=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");b=new org.openx.PlayerVersion([6,0,21]);c.AllowScriptAccess="always"}catch(g){if(b.major==6)return b}try{c=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(k){}}if(c!=null)b=new org.openx.PlayerVersion(c.GetVariable("$version").split(" ")[1].split(","))}return b};
org.openx.PlayerVersion=function(b){this.major=b[0]!=null?parseInt(b[0]):0;this.minor=b[1]!=null?parseInt(b[1]):0;this.rev=b[2]!=null?parseInt(b[2]):0};org.openx.PlayerVersion.prototype.versionIsValid=function(b){if(this.major<b.major)return false;if(this.major>b.major)return true;if(this.minor<b.minor)return false;if(this.minor>b.minor)return true;if(this.rev<b.rev)return false;return true};
org.openx.util={getRequestParameter:function(b){var c=document.location.search||document.location.hash;if(b==null)return c;if(c){var o=c.substring(1).split("&");for(c=0;c<o.length;c++)if(o[c].substring(0,o[c].indexOf("="))==b)return o[c].substring(o[c].indexOf("=")+1)}return""}};org.openx.SWFObjectUtil.cleanupSWFs=function(){for(var b=document.getElementsByTagName("OBJECT"),c=b.length-1;c>=0;c--){b[c].style.display="none";for(var o in b[c])if(typeof b[c][o]=="function")b[c][o]=function(){}}};
if(org.openx.SWFObject.doPrepUnload)if(!org.openx.unloadSet){org.openx.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",org.openx.SWFObjectUtil.cleanupSWFs)};window.attachEvent("onbeforeunload",org.openx.SWFObjectUtil.prepUnload);org.openx.unloadSet=true}if(!document.getElementById&&document.all)document.getElementById=function(b){return document.all[b]};
var getQueryParamValue=org.openx.util.getRequestParameter,FlashObject=org.openx.SWFObject,SWFObject=org.openx.SWFObject;document.mmm_fo=1;
(function(b){var c={};window.quakelive=c;c.modules={};c.hooks={};c.skipEndGame=false;c.pathParts=[];c.activeModule=null;c.defaultSiteConfig={xmppDomain:"xmpp-dev.idsoftware.com",realm:"qztest",cdnUrl:"http://%LOCATION%",baseUrl:"http://%LOCATION%",staticUrl:"http://%LOCATION%",trackPageViews:false,showPostGameAlways:false,deliveryUrl:"http://media.quakelive.com/delivery/spc.php"};c.PlayerAvatarPath={SM:"/images/players/icon_sm/",MD:"/images/players/icon_md/",LG:"/images/players/icon_lg/",XL:"/images/players/icon_xl/",
G_SM:"/images/players/icon_gray_sm/",G_MD:"/images/players/icon_gray_md/",G_LG:"/images/players/icon_gray_lg/",G_XL:"/images/players/icon_gray_xl/"};c.SwapAvatarPath=function(m,r){for(var A in c.PlayerAvatarPath)m=m.replace(c.PlayerAvatarPath[A],r);return m};c.resource=function(m){var r=m.lastIndexOf(".");if(r!=-1){var A=0;if(c.siteConfig.realm=="qztest")A=Math.floor(Math.random()*99999999);m=m.substring(0,r)+"_v"+c.siteConfig.resourceRevision+"."+A+m.substring(r)}return c.siteConfig.staticUrl+m};
c.CleanupPath=function(m){for(;m.charAt(0)=="/"||m.charAt(0)=="#";)m=m.substring(1);for(;m.charAt(m.length-1)=="/";)m=m.substring(0,m.length-1);return m};c.ExtractParams=function(m,r,A){A=A||{};for(r=r;r<m.length;++r){var J=m[r];J=J.split("=",2);A[J[0]]=J[1]}return A};c.MergeParams=function(m){var r="",A=0;for(var J in m){if(A++>0)r+=";";r+=J+"="+m[J]}return r};c.AddParam=function(m,r){c.params[m]=r};c.RemoveParam=function(m){c.params[m]&&delete c.params[m]};c.HasParam=function(m){return c.params[m]?
true:false};c.GetParam=function(m){return c.params[m]};c.BuildSubPath=function(m){for(var r="",A=0;A<m;++A)if(typeof quakelive.pathParts[A]!="undefined"){if(A>0)r+="/";r+=quakelive.pathParts[A]}return r};c.ParsePath=function(m){var r=m||window.location.hash;if(r.length>0){r=r.split(";");c.path=c.CleanupPath(r[0]);c.params=r.length>1?c.ExtractParams(r,1):{}}else{c.path=c.CleanupPath(window.location.pathname);if(!c.path)c.path=c.userid?c.GetUserHome():"home";c.params={};window.location.hash="#"+c.path}c.location=
window.location;c.pathParts=c.path.split("/")||[];c.prevActiveModule=c.activeModule;c.activeModule=c.pathParts.length>0?c["mod_"+c.pathParts[0]]:null;!c.activeModule&&m!="sorry"&&c.ParsePath("sorry")};c.Goto=function(m,r,A){if(typeof window.onbeforeunload=="function"){var J="Are you sure you want to navigate away from this page?\n\n"+window.onbeforeunload()+"\n\nPress OK to continue, or Cancel to stay on the current page.";if(!confirm(J))return;window.onbeforeunload=null}if(!quakelive.IsLoggedIn()&&
ReadCookie("QLALU")!==null&&ReadCookie("QLALP")!==null)quakelive.PageRedirect("/user/login_redirect");else{if(quakelive.IsLoggedIn()&&m=="register")m="home";c.HideOverlay();c.ShutdownGame();J={};r&&c.ExtractParams(r.split(";"),0,J);r="#"+m;if(J=c.MergeParams(J))r+=";"+J;if(!A){c.SetMonitorPath(r);window.location.hash=r}c.ParsePath(r.substring(1));c.LoadLayout(c.activeModule.GetLayout());c.TrackPageView(m);c.ScrollToTop()}};c.ScrollToTop=function(){window.scrollBy(-99999,-99999)};c.GetLoadingBar=function(){return"<div id='loading-outer'><div id='loading-inner'>Loading&hellip;<div id='loading-image'></div></div></div>"};
c.ConfirmInstallClose=function(){var m="This QUAKE LIVE update is mandatory. Are you sure you want to close?\n\nYou will be logged out of QUAKE LIVE if you proceed.";confirm(m)&&quakelive.PageRedirect("/user/logout")};c.Overlay=function(m,r,A){c.TrackPageView(m);b("#overlay-content").html(c.GetLoadingBar());b.get(m,null,function(J){b("#overlay-content").html(J);c.SendModuleMessage("OnOverlayLoaded",m.split("/"))});b("#overlay-bg").css("display","inline");r||(r="quakelive.CloseOverlay(); return false");
b("#overlay-close").html('<a href="javascript:;" onclick="'+r+'"><img src="'+quakelive.resource("/images/site/close.png")+'" class="pngfix" border="0" width="71" height="13" /></a>');b("#overlay").css("display","inline");if(!A){c.params.overlay=m;if(r=c.MergeParams(c.params))r=";"+r;window.location.hash="#"+quakelive.path+r}};c.OverlayRaw=function(m,r){c.TrackPageView(m);b("#overlay-raw").html(c.GetLoadingBar());b.get(m,null,function(A){b("#overlay-raw").html(A);r&&r()});b("#overlay-bg").css("display",
"inline");b("#overlay-raw").css("display","inline")};c.CloseOverlay=function(){b("#overlay-bg").hide();b("#overlay").hide();if(c.path){window.location.hash="#"+c.path;c.ParsePath()}};c.CURRENT_LAYOUT=null;c.LAYOUT_CACHE={};c.LoadLayout=function(m,r){if(c.CURRENT_LAYOUT==m){c.OnLayoutLoaded();r&&r()}else{c.FlushVertCache();c.CURRENT_LAYOUT=m;c.LAYOUT_CACHE[m]?c.LoadLayout_Success(c.LAYOUT_CACHE[m],m,r):b.ajax({type:"get",url:"/layout/"+m,dataType:"html",success:function(A){c.LAYOUT_CACHE[m]=A;c.LoadLayout_Success(A,
m,r)},error:c.LoadLayout_Error})}};c.LoadLayout_Error=function(){};c.LoadLayout_Success=function(m,r,A){b("#body-container").html(m);b("body").attr("class","lyt_"+r);c.OnLayoutLoaded();A&&A()};c.ConfirmEulaClose=function(){function m(){qlProcessing("Logging out&hellip;","You are now being logged out.");quakelive.PageRedirect("/user/logout")}function r(){}qlConfirm("You must agree to the SLA in order to play","You must agree to the license changes in order to continue playing Quake Live. If you do not wish to agree at this time you will be logged out.<br /><br />Are you sure you want to log out?",
m,r)};c.ConfirmEula=function(){b.ajax({url:"/legals/accept_eula",type:"post",complete:function(){quakelive.onAfterEulaConfirm?quakelive.onAfterEulaConfirm():quakelive.PageRedirect("/user/login_redirect")}})};var o=0;c.Tick=function(){o=(new Date).getTime()};var d=18E5,e=6E4;function g(){var m=(new Date).getTime();if(c.IsGameRunning())o=m;var r=m-o;if(r>d){var A=function(){quakelive.PageRedirect("/user/logout/session_expired");b(document).unbind("mousemove")},J=function(){o=m;setTimeout(g,e)};b.ajax({url:"/forum/pinglastactivity.php",
cache:false,timeout:15E3,dataType:"json",cache:false,error:A,success:function(N){if(N.ECODE===0){N=m-N.lastActivity;N>d?A():J()}else A()}})}else setTimeout(g,e)}var k=30,l=false;c.OnPluginInstalled=function(){function m(){var N=["Good luck and have fun!","A frag a day keeps the doctor away&hellip;","You have arrived.","Lock and load&hellip;","OM NOM NOM&hellip;","Articulating Splines&hellip;","QUAKE LIVE - It's over 9000!","Gotta frag 'em all!"];qlHidePrompt();c.SetLoadingBlurb(N[parseInt(Math.random()*
N.length)]);c.ParsePath();c.LoadLayout(c.activeModule.GetLayout(),function(){if(c.userstatus=="ACTIVE"){c.SendModuleMessage("OnAuthenticatedInit",c.userinfo);b(document).bind("mousemove",c.Tick);c.Tick();g();qz_instance.IsCrashDumpPresent()&&quakelive.Overlay("home/crashed","CloseCrashReport()",true)}})}function r(){if(xmppActive){clearInterval(A);m()}else if(J++==k){var N="We're sorry, but it appears you are having problems connecting to the QUAKE LIVE network. If you are behind a firewall you must make sure that it permits the following connection:<br /><br />Protocol: TCP<br />Host: "+
quakelive.siteConfig.xmppDomain+"<br />Port: 5222<br /><br />Contact your network administrator for further instructions, or visit the <a href='/forum/'>QUAKE LIVE forums</a> to look for help.</p>";qlPrompt({title:"XMPP Connection Failure",body:N,okLabel:"Keep Trying",ok:function(){J=0;qlHidePrompt()},cancelLabel:"Logout",cancel:function(){quakelive.Logout()}})}}if(!l){l=true;c.SetLoadingBlurb("Connecting to QUAKE LIVE network&hellip;");var A=0,J=0;A=setInterval(r,1E3);r()}};c.OnLayoutLoaded=function(){c.LoadPathContent();
c.params.overlay&&c.Overlay(c.params.overlay);document.title=c.GetPageTitle();c.SendModuleMessage("OnLayoutLoaded")};c.GetPageTitle=function(){var m="";if(c.activeModule.GetTitle)if((m=c.activeModule.GetTitle())!=="")m=" - "+m;return"QUAKE LIVE"+m};c.ShowContent=function(m){b("#qlv_contentBody").empty().append(m)};c.GetLoadPath=function(){return c.path};c.LoadPathContent=function(){b.ajax({url:c.activeModule.GetLoadPath(),mode:"abort",port:"ql_goto",success:c.LoadPathContent_Success,error:c.LoadPathContent_Error})};
c.LoadPathContent_Error=function(){};c.LoadPathContent_Success=function(m){var r=c.GetModule(c.pathParts[0]);r.ShowContent(m);r.DISPLAY.friends&&!c.IsGameRunning()&&c.mod_friends.MoveTo("#qlv_chatControl");c.userid||(c.activeModule==c.mod_welcome?b("#qlv_chatfill").hide():b("#qlv_chatfill").show());c.HideTooltip();var A=c.pathParts[0];if(A==="practice")A="home";m=b("#newnav_top .selected");A=b("#newnav_top #tn_"+A);m.toggleClass("selected");A.toggleClass("selected");c.SendModuleMessage("OnContentLoaded",
r)};c.IsGameRunning=function(){if(typeof qz_instance!="undefined")try{return qz_instance.IsGameRunning()}catch(m){return false}else return false};c.ShutdownGame=function(){c.IsGameRunning()&&qz_instance.SendGameCommand("quit;")};c.RegisterModule=function(m,r){if(c.modules[m]==null){c["mod_"+m]=c.modules[m]=r;if(!r.DISPLAY)r.DISPLAY={friends:true};if(!r.LAYOUT)r.LAYOUT="prelogin";if(!r.ShowContent)r.ShowContent=quakelive.ShowContent;if(!r.GetLoadPath)r.GetLoadPath=quakelive.GetLoadPath;if(!r.GetLayout){var A=
r;r.GetLayout=function(){return A.LAYOUT}}if(!r.GetTitle){A=r;r.GetTitle=function(){return A.TITLE||""}}}};c.InitPlugin=function(){run_plugin(quakelive.username,quakelive.xaid)};c.SetLoadingBlurb=function(m){b("#loading-blurb").html(m)};c.Init=function(m){c.SetLoadingBlurb("Initializing QUAKE LIVE&hellip;");c.initTime=(new Date).getTime();if(m){if(m.QUEUED==1){window.location="/queue.php";return}c.session=m.SESSION;c.username=m.USERNAME;c.xaid=m.XAID;c.userstatus=m.STATUS;c.userid=parseInt(m.USERID);
c.userinfo=b.extend({},m.INFO);c.cvars.Import(b.extend({},m.CVARS));c.binds.Import(b.extend({},m.BINDS));locdb.LoadLocations(m.LOCATIONS)}else{quakelive.session=null;quakelive.username=null;quakelive.password=null;quakelive.userid=0;quakelive.userstatus="";quakelive.userinfo={}}quakelive.serverManager=new quakelive.ServerManager;b.ajaxSetup({cache:false});b("#ajax_loading_indicator").ajaxStart(function(){b(this).fadeIn("fast")}).ajaxStop(function(){b(this).fadeOut("fast")});for(var r in c.siteConfig);
for(var A in c.modules){m=c.modules[A];m.Init&&m.Init()}if(c.userinfo&&parseInt(c.userinfo.EULA_OUTDATED)){c.ParsePath("legals/eula_updated");c.LoadLayout(c.activeModule.GetLayout())}else if(quakelive.userstatus=="UNVERIFIED"){c.ParsePath("register/2a");c.LoadLayout(c.activeModule.GetLayout())}else if(quakelive.IsLoggedIn()){c.SetLoadingBlurb("Starting QUAKE LIVE plugin&hellip;");c.InitPlugin()}else{c.ParsePath();c.LoadLayout(c.activeModule.GetLayout())}c.StartPathMonitor()};c.InitPopup=function(m,
r){c.initTime=(new Date).getTime();c.is_ssl=r;c.session=m.SESSION;c.username=m.USERNAME;c.xaid=m.XAID;c.userstatus=m.STATUS;c.userid=parseInt(m.USERID);b.ajaxSetup({cache:false});b("#ajax_loading_indicator").ajaxStart(function(){b(this).fadeIn("fast")}).ajaxStop(function(){b(this).fadeOut("fast")});for(var A in c.siteConfig);r=null;for(x in c.popups){A=c.popups[x];if(A.name=m.popup_name)r=A}for(var J in r.modules)J.Init&&J.Init();c.ParsePath();c.StartPathMonitor()};c.SendModuleMessage=function(m,
r,A){var J=false;for(var N in c.modules)if(!(A&&N!=A)){var P=c.modules[N];if(P[m])if(P[m](r))J=true}if(c.hooks[m])for(var D in c.hooks[m])c.hooks[m][D](r);return J};c.GetModule=function(m){return c.modules[m]||{}};c.HideTooltip=function(){c.matchtip.HideMatchTooltip(-1);c.statstip.HideStatsTooltip()};c.HideOverlay=function(){b("#overlay").hide();b("#overlay-bg").hide();b("#qlv_OverlayContent").empty();quakelive.mod_prefs.CloseOverlay();b(".jqmWindow").jqmHide()};c.Eval=function(m){try{var r=JSON.parse(m);
return r}catch(A){return null}};c.IsSecure=function(){return quakelive.is_ssl};c.IsLoggedIn=function(){return quakelive.userid!=0};c.IsMozilla=function(){var m=c.IdentifyBrowser(navigator.userAgent);return m&&m.name=="mozilla"||false};c.IsSafari=function(){var m=c.IdentifyBrowser(navigator.userAgent);return m&&m.name=="safari"||false};c.IsOpera=function(){var m=c.IdentifyBrowser(navigator.userAgent);return m&&m.name=="opera"||false};c.IsChrome=function(){var m=c.IdentifyBrowser(navigator.userAgent);
return m&&m.name=="chrome"||false};c.IsLinux=function(){var m=c.IdentifyOS(navigator.userAgent);return m&&m.name=="linux"||false};c.IsWindows=function(){var m=c.IdentifyOS(navigator.userAgent);return m&&m.name=="windows"||false};c.IsMacintosh=function(){var m=c.IdentifyOS(navigator.userAgent);return m&&m.name=="macintosh"||false};c.IsVista=function(){var m=c.IdentifyOS(navigator.userAgent);return m&&m.name=="windows"&&parseInt(m.versionNumber)==6||false};c.IsIE6=function(){var m=c.IdentifyBrowser(navigator.userAgent);
return m&&parseInt(m.versionNumber)==6||false};c.IsMSIE=function(){var m=c.IdentifyBrowser(navigator.userAgent);return m&&m.name=="msie"||false};var n={macintosh:{mozilla:3.5,safari:1},linux:{mozilla:3},windows:{msie:7,mozilla:1.5}};c.IdentifyVersion=function(m,r){var A=null;for(var J in m){var N=new RegExp(m[J],"gi");N=N.exec(r);var P={name:"",version:"0",versionNumber:0};if(N){for(m=1;m<N.length;++m){for(r=N[m];r.indexOf("_")!=-1;)r=r.replace("_",".");A=parseFloat(r);if(A>P.version){P.version=r;
P.versionNumber=A}}P.name=J;A=P;break}}return A};var q={windows:"Win(?:dows)?(?:\\s?(?:NT|XP)?)?\\s+([\\d\\.]+)",macintosh:"Intel\\s+Mac(?:intosh)?\\s+OS\\s+X(?:\\s+([\\d_\\.]+))",linux:"(Linux)"};c.IdentifyOS=function(m){return c.IdentifyVersion(q,m)};var u={mozilla:"(?:Firefox|Iceweasel|Icecat|Shiretoko|Namoroka|Minefield|GranParadiso)[\\/\\s]+([\\d\\.]+)",chrome:"Chrome\\/([\\d\\.]+)",safari:"Safari\\/([\\d\\.]+)",opera:"Opera\\/([\\d\\.]+)",msie:"MSIE\\s+([\\d\\.]+)"};c.IdentifyBrowser=function(m){return c.IdentifyVersion(u,
m)};c.IsCompatibleBrowser=function(m){if(c.IsLoggedIn())return true;if(c.siteConfig.realm=="qztest"||c.siteConfig.realm=="focus"||c.siteConfig.realm=="qztest-jah")return true;if(arguments.length==0)m=navigator.userAgent;var r=c.IdentifyOS(m);if(!r||!n[r.name])return false;var A=c.IdentifyBrowser(m);if(!A||!n[r.name][A.name])return false;minVersions=n[r.name];if(A.version<minVersions[A.name])return false;return true};c.CheckBrowserCompat=function(){if(!c.IsCompatibleBrowser()){var m=["We're sorry, but it appears that you are using an incompatible system.To play QUAKE LIVE you must use one of the following Operating Systems and Web Browsers:<br /><br /><ul style='margin: 5px'><li>Windows XP / Windows Vista / Windows 7</li><li>Intel Mac OSX 10.4 or higher</li><li>Linux (LSB 3.0 or higher)</li></ul><ul style='margin: 5px'><li>Firefox 2.0 or higher (Mac OSX requires Firefox 3.5+)</li><li>Internet Explorer 7 or higher</li><li>Safari 3.0 or higher</li></ul><br /><center><img src='",
quakelive.resource("/images/site/logo_os_win.png"),"' width='40' height='40' style='margin: 0 10px' /><img src='",quakelive.resource("/images/site/logo_os_mac.png"),"' width='40' height='40' style='margin: 0 10px' /><img src='",quakelive.resource("/images/site/logo_os_linux.png"),"' width='40' height='40' style='margin: 0 10px' /><img src='",quakelive.resource("/images/site/logo_browser_ff.png"),"' width='40' height='40' style='margin: 0 10px' /><img src='",quakelive.resource("/images/site/logo_browser_ie.png"),
"' width='40' height='40' style='margin: 0 10px' /><img src='",quakelive.resource("/images/site/logo_browser_safari.png"),"' width='40' height='40' style='margin: 0 10px' /></center><br />Support for additional browsers is under development.<br /><br /><small style='text-align: center; display: block' onclick='this.innerHTML=navigator.userAgent'>Show your browser identification</small>"].join("");qlPrompt({title:"Incompatible Browser",body:m,fatal:false,alert:true});return false}return true};c.AddHook=
function(m,r){c.hooks[m]||(c.hooks[m]=[]);c.hooks[m][c.hooks[m].length]=r};c.AddOnceHook=function(m,r){function A(J){r(J);c.RemoveHook(m,A)}c.AddHook(m,A)};c.RemoveHook=function(m,r){m=c.hooks[m];var A=m.length;for(A=A-1;A>=0;--A)if(m[A]===r){m.splice(A,1);return}};c.PreloadImages=function(){for(var m=0;m<arguments.length;++m)b("<img>").attr("src",arguments[m])};c.PreloadClasses=function(){for(var m=0;m<arguments.length;++m)b("<div>").attr("class",arguments[m])};c.TrackPageView=function(m){if(c.siteConfig.trackPageViews&&
typeof _gaq!="undefined")m[0]!="/"?_gaq.push(["_trackPageview","/"+m]):_gaq.push(["_trackPageview",m])};c.querystring={};if(window.location.search){var B=window.location.search.substring(1);B=B.split("&");for(var x=0;x<B.length;++x){var p=B[x].split("=",2);c.querystring[p[0]]=p[1]}}c.Logout=function(){quakelive.PageRedirect("/user/logout")};c.DbGameTypes={Dm:0,Duel:1,Single:2,TeamDm:3,ClanArena:4,Ctf:5,Invalid:255};var z=[{id:c.DbGameTypes.Dm,name:"dm",title:"Death Match"},{id:c.DbGameTypes.Duel,
name:"duel",title:"Duel"},{id:c.DbGameTypes.Single,name:"single",title:"Single Player"},{id:c.DbGameTypes.TeamDm,name:"tdm",title:"Team DM"},{id:c.DbGameTypes.ClanArena,name:"ca",title:"Clan Arena"},{id:c.DbGameTypes.Ctf,name:"ctf",title:"Capture the Flag"}],K={id:c.DbGameTypes.Invalid,name:"uk",title:"Unknown Gametype"};c.GetGameTypeByID=function(m){for(var r in z){var A=z[r];if(A.id==m)return A}return K};c.GetGameTypeByName=function(m){for(var r in z){var A=z[r];if(A.name==m)return A}return K};
c.IsTeamGameType=function(m){return m==c.DbGameTypes.TeamDm||m==c.DbGameTypes.ClanArena||m==c.DbGameTypes.Ctf};c.ShowLoadingPacifier=function(){b("#loading_pacifier").show()};c.HideLoadingPacifier=function(){b("#loading_pacifier").hide()};var v=200,E={};c.SetMonitorPath=function(m){E.lastPath=m};c.StartPathMonitor=function(){c.StopPathMonitor();E.lastPath=window.location.hash;E.thHandle=setInterval(c.CheckPathForUpdates,v)};c.StopPathMonitor=function(){if(E.thHandle){clearInterval(E.thHandle);E.thHandle=
0}};c.GotoCurrentPath=function(){quakelive.ParsePath();quakelive.LoadLayout(quakelive.activeModule.GetLayout())};c.CheckPathForUpdates=function(){if(E.lastPath!=window.location.hash){var m=false;if(c.activeModule.skipMatchingPathUpdates)if(c.activeModule.skipMatchingPathUpdates.test(window.location.hash))m=true;m||quakelive.Goto(window.location.hash.substring(1));E.lastPath=window.location.hash}};c.LoadSiteConfig=function(m){m=b.extend({},c.defaultSiteConfig,m);for(var r in m)if(typeof m[r]=="string"){var A=
m[r];A=A.replace(/%LOCATION%/g,window.location.hostname);var J=window.location.hostname.toLowerCase().split(".");A=A.replace(/%HOSTNAME%/g,J[0]);m[r]=A}c.siteConfig=m};c.PageRedirect=function(m){window.location=m};c.GetUserHome=function(m){if(quakelive.IsLoggedIn())return quakelive.userstatus=="ACTIVE"?m||c.cvars.Get("web_home","").value||"welcome":"welcome";return"home"};c.SetUserHome=function(m){m=c.GetUserHome(m);SetCvar("web_home",m)};c.MakeHomeChooser=function(m){if(c.userstatus=="ACTIVE"){var r=
c.GetUserHome();b("#home_chooser").remove();var A=b("<div id='home_chooser'></div>");r==m?A.attr("title","This page is your Home").append('<div class="home_icon"></div>').append('<div class="cl"></div>'):A.attr("title","Click to set this page as your Home").append('<a href="javascript:;" class="home_icon"></a>').append('<a href="javascript:;" class="home_text">Set as My Home</a>').append('<div class="cl"></div>').find("a").click(function(){quakelive.ChooseHome(m);return false});b(".postlogin_nav").append(A)}};
c.ChooseHome=function(m){c.SetUserHome(m);b("#home_chooser a").css({"text-decoration":"none !important",cursor:"default"}).removeAttr("title").unbind("click");b("#home_chooser .home_text").text("Updated My Home").fadeOut(2E3,function(){c.MakeHomeChooser(m)})};c.Popup=function(m){var r="";for(var A in m.options)r+=r.length==0?A+"="+m.options[A]:","+A+"="+m.options[A];A={SESSION:c.session,USERNAME:c.username,XAID:c.xaid,USERID:c.userid,STATUS:c.userstatus,popup_name:m.name};var J="";J+=m.secure==true?
"https://":"http://";J+=document.domain;J+=m.url+"?"+Base64.encode(JSON.stringify(A));window.open(J,m.title,r)};c.popups={SocialInvite:{name:"SocialInvite",url:"/friends/social/a",title:"Address Book Search",secure:true,options:{location:"no",menubar:"no",scrollbars:"yes",status:"yes",titlebar:"yes",resizable:"no",height:250,width:700,directories:"no",screenX:30,screenY:30},modules:["friends"]}};window.IsMacintosh=quakelive.IsMacintosh;window.IsWindows=quakelive.IsWindows;window.IsLinux=quakelive.IsLinux;
window.IsVista=quakelive.IsVista;window.IsMozilla=quakelive.IsMozilla;window.IsSafari=quakelive.IsSafari;window.IsMSIE=quakelive.IsMSIE;window.IsIE6=quakelive.IsIE6;window.IsChrome=quakelive.IsChrome;window.IsOpera=quakelive.IsOpera;var y=b.fn.httpData;b.fn.httpData=function(m,r,A){m=y(m,r,A);if(r=="json"&&typeof m!="object")throw"invalid json resposne";return m};c.LoadSiteConfig(window.SITECONFIG)})(jQuery);
function EncodeURL(b){b=b.replace(/\+/g,"%2B");b=b.replace(/\ /g,"%20");b=b.replace(/\&/g,"%26");b=b.replace(/\?/g,"%3F");return b=b.replace(/\//g,"%2F")}function CreateCookie(b,c,o){if(o){var d=new Date;d.setTime(d.getTime()+o*24*60*60*1E3);o="; expires="+d.toGMTString()}else o="";s=b+"="+c+o+"; path=/";document.cookie=s}
function ReadCookie(b){b=b+"=";for(var c=document.cookie.split(";"),o=0;o<c.length;o++){for(var d=c[o];d.charAt(0)==" ";)d=d.substring(1,d.length);if(d.indexOf(b)==0)return d.substring(b.length,d.length)}return null}function EraseCookie(b){CreateCookie(b,"",-1)}function FormatError(b){return"Name:"+b.name+" Num:"+b.number+" Desc:"+b.description+": "+b}function StartPacifier(b,c){$(b).html("<span class='pacifier-active'>"+c+"</span>").show()}
function StopPacifier(b,c,o){$(b).html("<span class='pacifier-inactive'>"+c+"</span>");o&&setTimeout('ClearPacifier("'+b+'")',o)}function ClearPacifier(b){$(b).empty()}function StripColors(b){if(b==null||b.length==0)return"";return b.replace(/(\^[0-9])/g,"").replace(/\^/g,"")}
function ParseModelSkin(b){var c={model:"",skin:""};b=b.split("/");if(b.length>=2){c.model=b[0].toLowerCase();c.skin=b[1].toLowerCase()}else{c.model=b[0].toLowerCase();c.skin="default"}if(c.model[0]=="*")c.model=c.model.substring(1);return c}
function PlayerIconSet(b,c){this.model=b.toLowerCase();this.skin=c.toLowerCase();this.modelskin=this.model+"_"+this.skin;this.small="<img src='"+quakelive.resource("/images/players/icon_sm/"+this.model+"_"+this.skin+".jpg")+"' width='18' height='18' />";this.medium="<img src='"+quakelive.resource("/images/players/icon_md/"+this.model+"_"+this.skin+".jpg")+"' width='30' height='30' />";this.large="<img src='"+quakelive.resource("/images/players/icon_lg/"+this.model+"_"+this.skin+".jpg")+"' width='43' height='43' />";
this.friend_large="<img src='"+quakelive.resource("/images/players/icon_xl/"+this.model+"_"+this.skin+".jpg")+"' width='62' height='62' />"}function RemoveArrayIndex(b,c){var o=null;return o=c==0?b.slice(1):c==b.length-1?b.slice(0,b.length-1):b.slice(0,c).concat(b.slice(c+1))}function ECODE_SUCCESS(b){return typeof b=="number"?b==0:typeof b=="string"?b.length==1&&b.charAt(0)=="0":false}function FormatNumber(b){return""+1*b}
function isEmailValid(b){var c=/^[a-z0-9.!\#$%&\'*+-\/=?^_`{|}~]+@([0-9.]+|([^\s\'"<>]+\.+[a-z]{2,6}))$/i;return c.test(b)?true:false}var SECS_IN_MINUTE=60,SECS_IN_HOUR=3600,SECS_IN_DAY=86400,SECS_IN_WEEK=604800,SECS_IN_YEAR=31536E3,SECS_IN_MONTH=2592E3;
function DecomposeTimeDelta(b){var c=parseInt(b/SECS_IN_YEAR);b-=c*SECS_IN_YEAR;var o=parseInt(b/SECS_IN_MONTH);b-=o*SECS_IN_MONTH;var d=parseInt(b/SECS_IN_WEEK);b-=d*SECS_IN_WEEK;var e=parseInt(b/SECS_IN_DAY);b-=e*SECS_IN_DAY;var g=parseInt(b/SECS_IN_HOUR);b-=g*SECS_IN_HOUR;var k=parseInt(b/SECS_IN_MINUTE);b-=k*SECS_IN_MINUTE;return b={years:c,months:o,weeks:d,days:e,hours:g,mins:k,secs:b}}
function FormatDuration(b){var c=parseInt(b/60);b-=c*60;var o="";if(c<10)o+="0";o+=c;o+=":";if(b<10)o+="0";o+=b;return o}function FormatNumberNicely(b){var c=[0,"one","two","three","four","five","six"];return c[b]?c[b]:b}
function GetFriendlyTimeDelta(b){b=DecomposeTimeDelta(b);if(b.years>0)return b.years==1?"last year":FormatNumberNicely(b.years)+" years ago";if(b.months>0)return b.months==1?"last month":FormatNumberNicely(b.months)+" months ago";if(b.weeks>0)return b.weeks==1?"last week":FormatNumberNicely(b.weeks)+" weeks ago";if(b.days>0)return b.days==1?"yesterday":FormatNumberNicely(b.days)+" days ago";if(b.hours>0)return b.hours==1?"1 hour ago":FormatNumberNicely(b.days)+" hours ago";return b.mins>45?"about an hour ago":
b.mins>=25?"about half an hour ago":"just now"}
function GetSkillRankInfo(b){if(quakelive.userstatus=="REGISTERED")return{delta:-1,img:quakelive.resource("/images/modules/welcome/small_questionmark.png"),desc:"<span style='color: #fff'>Your Skill Unknown</span>",color:"#ffffff"};if(quakelive.userid){if(b.g_needpass)return{delta:-2,img:quakelive.resource("/images/sf/login/rank_private.png"),desc:"<span style='color: #ff0'>Private Match</span>",color:"#ffffff"};if(!b.ranked)return{delta:-1,img:quakelive.resource("/images/sf/login/rank_unranked.png"),desc:"<span style='color: #ff0'>Unranked Server</span>",
color:"#ffffff"};if(b.skillTooHigh)return{delta:-1,img:quakelive.resource("/images/sf/login/rank_x.png"),desc:"<span style='color: #fff'>Your Skill Too High</span>",color:"#ffffff"};b=b.skillDelta}else b=1;var c={delta:b,img:quakelive.resource("/images/sf/login/rank_"+b+".png")};switch(b){case 0:c.desc="Your Skill Higher";c.color="#ffffff";break;case 1:c.desc="Skill Matched";c.color="#39c50a";break;case 2:c.desc="More Challenging";c.color="#f5c276";break;case 3:c.desc="Very Difficult";c.color="#ef422e";
break;default:c.desc="Unknown";c.color="#ffffff";break}return c}function FormatRank(b){var c=b%100,o=b%10;c=o==1&&c!=11?"st":o==2&&c!=12?"nd":o==3&&c!=13?"rd":"th";return b+c}function cloneObject(b){for(i in b)this[i]=b[i]}
function FormatTimeDelta(b){if(b>=2592E3){num=Math.round(b/2592E3);return num!=1?num+" months":num+" month"}else if(b>=86400){num=Math.round(b/86400);return num!=1?num+" days":num+" day"}else if(b>=3600){num=Math.round(b/3600);return num!=1?num+" hours":num+" hour"}else if(b>=60){num=Math.round(b/60);return num!=1?num+" minutes":num+" minute"}else return"1 minute"}function Clamp(b,c,o){if(b<c)return c;else if(b>o)return o;return b}
function ChangeModelSkin(b,c){b=b.split("_");for(var o="",d=0;d<b.length-1;++d)o+=b[d]+"_";o+=c;return o}function FirstDefined(){for(var b=0;b<arguments.length;++b)if(typeof arguments[b]!="undefined")return arguments[b]}function StripSlashes(b){b=b.replace(/\\'/g,"'");b=b.replace(/\\"/g,'"');b=b.replace(/\\\\/g,"\\");return b=b.replace(/\\0/g,"\u0000")}
function qlPrompt(b){quakelive.matchtip.HideMatchTooltip();b=$.extend({title:"",body:"",input:false,inputLabel:"",inputReadOnly:false,ok:function(){$("#prompt").jqmHide()},okLabel:"OK",cancel:function(){$("#prompt").jqmHide()},cancelLabel:"Cancel",alert:false,fatal:false,hideButtons:false},b);$("#prompt").length===0&&$("body").append('<div id="prompt" class="modal"></div>');$("#prompt").html(['<div class="modal-inner"><div class="modal-title">',b.title,'</div><div class="modal-content">',b.body,'<div class="modal-feedback"></div><form><div id="modal-input"><input/></div><div id="modal-buttons" style="text-align: center"><input id="modal-ok" type="button"/><input id="modal-cancel" type="button"/></form></div></div></div>'].join(""));
if(b.hideButtons)$("#modal-cancel,#modal-input,#modal-ok").css("display","none");else{if(b.input){$("#modal-input").css("display","block");b.inputReadOnly&&$("#modal-input input").attr("readonly","readonly")}else $("#modal-input").css("display","none");b.alert?$("#modal-cancel").css("display","none"):$("#modal-cancel").css("display","inline");if(b.fatal){$("#prompt").addClass("fatal");var c=$("#modal-buttons").html('<input id="modal-reload" type="button" value="Reload"/>');c.click(function(){window.location.reload()})}else $("#prompt").removeClass("fatal");
$("#modal-input input").val(b.inputLabel);$("#modal-ok").val(b.okLabel);$("#modal-cancel").val(b.cancelLabel);$("#prompt form").submit(function(){b.ok();return false});$("#modal-ok").click(b.ok);$("#modal-cancel").click(b.cancel)}$("#prompt").jqm({modal:true});$("#prompt").jqmShow();b.input&&$("#modal-input input").focus().get()[0].select()}
function qlProcessing(b,c,o,d){c="<center><h1>"+c+'</h1><img src="'+quakelive.resource("/images/loader.gif")+'" width="62" height="13" style="margin: 12px" /></center>';b={hideButtons:true,body:c,title:b};if(o){b.alert=true;b.hideButtons=false;b.okLabel=o;b.ok=d||qlHidePrompt}qlPrompt(b)}function qlAlert(b,c){qlPrompt({body:c,title:b,alert:true})}
function qlConfirm(b,c,o,d){qlPrompt({title:b,body:c,ok:function(){o&&o();qlHidePrompt()},okLabel:"OK",cancel:function(){d&&d();qlHidePrompt()},cancelLabel:"Cancel"})}function qlHidePrompt(){$("#prompt").jqmHide()}function ZeroPad(b){return b<10?"0"+b:""+b}function qlLock(b){this.locked=false;this.name=b}qlLock.prototype.Acquire=function(){this.locked=true};qlLock.prototype.Release=function(){this.locked=false};qlLock.prototype.IsLocked=function(){return this.locked};
function SafeParseInt(b){try{var c=parseInt(b);if(!isNaN(c))return c}catch(o){}return 0}var version_windows=[0,1,0,277],version_linux=[0,1,0,277],version_mac=[0,1,0,277],version=[0,1,0,277],CLSID="70A1ADC3-9C2D-4F7C-B189-55C5CF397F1C",MIME_TYPE="application/x-id-quakelive";version=IsLinux()?version_linux:IsMacintosh()?version_mac:version_windows;
var BUILD_NUMBER=version[3],check_version=version.join("."),check_version_comma=version.join(","),current_version="NA",ie_cookie_string="quakelive_upgrade",debug_install=false;function OSGetName(){return IsLinux()?"os_linux":IsMacintosh()?"os_mac":"os_win"}function BrowserGetName(){return IsMSIE()?"msie":IsChrome()?"chrome":IsSafari()?"safari":IsMozilla()?"mozilla":"unknown"}window.qz_instance=undefined;
function VersionListener(){this.VersionTooOld=function(){};this.VersionTooNew=function(){};this.VersionOk=function(){};this.HandshakeFailed=function(){};this.PluginNotInstalled=function(){}}
function StartupVersionListener(){var b=30;this.prototype=new VersionListener;this.waitingForInstall=false;this.curVersion=0;this.GotoPluginInstall=function(d){if(!this.waitingForInstall){var e=this;function g(){if(quakelive.activeModule==quakelive.mod_register){e.UpdateInstallState(e.curInstallStates,e.curVersion);e.WaitForInstall(d);quakelive.RemoveHook("OnContentLoaded",g)}}quakelive.AddHook("OnContentLoaded",g);var k=function(){e.eulaConfirmed=true;quakelive.ParsePath("register/2b/install");quakelive.LoadLayout(quakelive.activeModule.GetLayout())};
if(this.doEulaConfirm){quakelive.ParsePath("legals/eula_updated");quakelive.LoadLayout(quakelive.activeModule.GetLayout());quakelive.onAfterEulaConfirm=k}else k()}};var c={Hidden:"hidden",Checking:"checking",Completed:"complete",Restart:"restart",TooNew:"toonew"};this.WaitForInstall=function(d){function e(){d.CheckVersion(5,g)}var g=this;this.waitingForInstall=true;this.watchInstallHandle&&clearInterval(this.watchInstallHandle);this.watchInstallHandle=setInterval(e,1E4);e()};this.eulaConfirmed=this.doEulaConfirm=
this.freshPluginInstall=false;this.baseInstallStates={plugin:c.Hidden,content:c.Hidden};this.curInstallStates=$.extend({},this.baseInstallStates);this.UpdateInstallState=function(d,e){if(!(!this.eulaConfirmed&&e==0)){d=$.extend({},this.baseInstallStates,d);if($.browser.msie&&d.plugin==c.Checking&&ReadCookie("plugin_active")!==null)d.plugin=c.Restart;this.curVersion=e;$(".install_client_version").text(this.curVersion===0?"None":this.curVersion);$(".install_server_version").text(version.join("."));
if(d.plugin!=c.Restart&&d.plugin==c.Checking&&d.plugin!=this.curInstallStates.plugin)ReadCookie(ie_cookie_string)?upgrade():setTimeout(upgrade,3E3);var g=this,k=OSGetName(),l="browser_"+BrowserGetName();for(var n in d){e=d[n];var q=$("#group_"+n);if(typeof d[n]!="undefined")if(d[n]==c.Hidden)q.find(".stage").hide();else{var u=q.find(".active_stage");u.removeClass("active_stage");q.find(".stage_"+e).each(function(){var B=$(this);if((B.hasClass(k)||B.hasClass("os_any"))&&(B.hasClass(l)||B.hasClass("browser_any"))&&
!B.hasClass("not"+l)&&!B.hasClass("not"+k)&&(g.freshPluginInstall&&B.hasClass("mode_install")||!g.freshPluginInstall&&B.hasClass("mode_upgrade"))){B.addClass("active_stage");B.find(".installer_url").attr("href",GetInstallerUrl())}})}this.curInstallStates[n]=d[n]}}};this.VersionOk=function(d,e){function g(){try{k.verificationAttempt++;k.VerifyGameInstall(d);clearInterval(k.verifyGameHandle);k.verifyGameHandle=null}catch(l){if(k.verificationAttempt>b){EraseCookie(ie_cookie_string);quakelive.PageRedirect("/user/login_redirect");
clearInterval(k.verifyGameHandle);k.verifyGameHandle=null}}}CreateCookie("QLV",e,365);clearInterval(this.watchInstallHandle);this.watchInstallHandle=null;this.UpdateInstallState({plugin:c.Completed,content:c.Checking},e);this.verificationAttempt=0;var k=this;this.verifyGameHandle=null;this.verifyGameHandle=setInterval(g,1E3)};this.VersionTooOld=function(d,e){d.RemoveObject();this.UpdateInstallState({plugin:c.Checking},e);this.waitingForInstall||this.GotoPluginInstall(d)};this.VersionTooNew=function(d,
e){d.RemoveObject();this.UpdateInstallState({plugin:c.TooNew},e);this.waitingForInstall||this.GotoPluginInstall(d)};this.HandshakeFailed=function(d){d.RemoveObject();this.UpdateInstallState({plugin:c.Checking},0);this.waitingForInstall||this.GotoPluginInstall(d)};this.PluginNotInstalled=function(d){d.RemoveObject();if(!ReadCookie("newaccount")&&!this.eulaConfirmed)this.doEulaConfirm=true;this.UpdateInstallState({plugin:c.Checking},0);if(!this.waitingForInstall){this.freshPluginInstall=true;this.GotoPluginInstall(d)}};
var o=false;this.VerifyGameInstall=function(d){function e(q){if(q.group>GROUP_BASE){n||l.waitingForInstall?l.UpdateInstallState({content:c.Completed,playnow:c.Completed},l.curVersion):quakelive.OnPluginInstalled();quakelive.RemoveHook("OnDownloadGroup",e)}}function g(q){if(q.fileName!="manifest.json"){quakelive.RemoveHook("OnFileXferStarted",g);if(qlXfer.currentGroup<=GROUP_BASE){n=true;function u(){if(quakelive.activeModule==quakelive.mod_register){l.UpdateInstallState(l.curInstallStates,l.curVersion);
quakelive.RemoveHook("OnContentLoaded",u)}}quakelive.AddHook("OnContentLoaded",u);quakelive.ParsePath("register/2b/update_content");quakelive.LoadLayout(quakelive.activeModule.GetLayout())}}}if(!o){o=true;$("#registration_uparrow").remove();d.UnloadIEHelper();d.AttachIEEvents();CreateCookie("plugin_active",1,0);qz_instance.SetDeveloperRoot(quakelive.siteConfig.realm);qz_instance.SetSession(navigator.userAgent,d.username,d.password,ReadCookie("xi")||0);if(d=qz_instance.StartDownloads(quakelive.siteConfig.staticUrl,
quakelive.siteConfig.cdnUrl)){var k={title:"Fatal Error",body:qz_instance.GetErrorCodeString(d)||"Unknown Error"};if(d==pluginx.PluginErrors.INSTANCE_ACTIVE){k.okLabel="Reload";k.ok=function(){document.location.reload()};k.cancelLabel="Logout";k.cancel=function(){quakelive.Logout()}}else k.fatal=true;qlPrompt(k);return false}setInterval(function(){qz_instance.IsGameRunning()},100);var l=this,n=false;quakelive.AddHook("OnDownloadGroup",e);quakelive.AddHook("OnFileXferStarted",g);return true}}}
function qlPlugin(b,c,o,d){this.PluginErrors={NONE:0,OUT_OF_MEMEORY:1,GENERIC_FAILURE:2,INSTANCE_ACTIVE:3,GAME_RUNNING:4,INSTALLATION_ERROR:5,MANIFEST_NOT_FOUND:6,MANIFEST_PARSE_ERROR:7,MANIFEST_WRITE_ERROR:8,MANIFEST_XFER_ERROR:9,GAME_FILE_WRITE_ERROR:10,GAME_FILE_NOT_FOUND:11,GAME_FILE_XFER_ERROR:12,GAME_NOT_RUNNING:13,GETPROC_ERROR:14,EXTRACT_ERROR:15,THREAD_ERROR:16};this.pluginContainerId="#qz_handshake";this.pluginName=b;this.mimeType=c;this.classId=o;this.serverPluginVersion=d;this.password=
this.username=undefined;this.pluginRefreshNeedsReload=false;this.pluginNeedsLibraryUnloader=$.browser.msie;this.Events=[{event:"FileTransferStart",handler:"OnFileXferStarted",params:["fileName","fileSize"]},{event:"FileTransferUpdate",handler:"OnFileXferUpdate",params:["transferedAmount"]},{event:"FileTransferDone",handler:"OnFileXferDone",params:["result"]},{event:"GameExit",handler:"OnGameExit",params:["exitCode"]},{event:"InputEventCaptured",handler:"OnInputEvent",params:["exitCode"]},{event:"GameVidRestart",
handler:"OnVidRestart",params:[]},{event:"CvarChanged",handler:"OnCvarChanged",params:["cvarName","cvarValue","replicate"]},{event:"BindChanged",handler:"OnBindChanged",params:["keyName","keyValue"]},{event:"IM_OnConnected",handler:"IM_OnConnected",params:[]},{event:"IM_OnDisconnected",handler:"IM_OnDisconnected",params:[]},{event:"IM_OnRosterFilled",handler:"IM_OnRosterFilled",params:[]},{event:"IM_OnConnectFail",handler:"IM_OnConnectFail",params:[]},{event:"IM_OnKicked",handler:"IM_OnKicked",params:[]},
{event:"IM_OnMessage",handler:"IM_OnMessage",params:["message_json"]},{event:"IM_OnPresence",handler:"IM_OnPresence",params:["presence_json"]},{event:"IM_OnSubscribeRequest",handler:"IM_OnSubscribeRequest",params:["json"]},{event:"IM_OnItemAdded",handler:"IM_OnItemAdded",params:["json"]},{event:"IM_OnItemRemoved",handler:"IM_OnItemRemoved",params:["json"]},{event:"IM_OnItemSubscribed",handler:"IM_OnItemSubscribed",params:["json"]},{event:"IM_OnItemUpdated",handler:"IM_OnItemUpdated",params:["json"]},
{event:"IM_OnSelfPresence",handler:"IM_OnSelfPresence",params:["json"]},{event:"IM_OnPrivacyNames",handler:"IM_OnPrivacyNames",params:["json"]},{event:"IM_OnPrivacyList",handler:"IM_OnPrivacyList",params:["json"]},{event:"IM_OnPrivacyChanged",handler:"IM_OnPrivacyChanged",params:["name"]},{event:"IM_OnPrivacyResult",handler:"IM_OnPrivacyResult",params:["json"]},{event:"TourneyStart",handler:"TourneyStart",params:["errcode","json"]},{event:"TourneyMatchCheckin",handler:"TourneyMatchCheckin",params:["errcode",
"json"]},{event:"TourneyBoutStart",handler:"TourneyBoutStart",params:["errcode","json"]},{event:"OnDownloadGroup",handler:"OnDownloadGroup",params:["group","numfiles","size"]},{event:"OnDownloadError",handler:"OnDownloadError",params:["errorcode"]},{event:"LFGNotify",handler:"OnLFGNotify",params:["errcode","json"]},{event:"LFGCancel",handler:"OnLFGCancel",params:["json"]},{event:"CommNotice",handler:"OnCommNotice",params:["errorcode","json"]}];this.DetachIEEvents=function(){if($.browser.msie)if(typeof qz_instance!=
"undefined")for(var e in this.Events){var g=this.Events[e];qz_instance.detachEvent(g.event,g.boundFn);g.boundFn=null}};window.ondetach=function(){pluginx.DetachIEEvents()};this.AttachIEEvents=function(){function e(l){var n=new Function("return "+l+";");return function(){var q=n();typeof q=="function"&&q.apply(null,arguments)}}if($.browser.msie)if(typeof qz_instance!="undefined")for(var g in this.Events){var k=this.Events[g];k.boundFn=e(k.handler);qz_instance.attachEvent(k.event,k.boundFn)}};this.SetCredentials=
function(e,g){this.username=e;this.password=g};this.ieHelperHandle=null;this.LoadIEHelper=function(){if(this.ieHelperHandle!==null)return true;$("#iehelper_container").length==0&&$("body").append('<div id="iehelper_container"></div>');$("#iehelper_container").empty();CollectGarbage();try{$("#iehelper_container").html("<object id='qz_iehelper' classid='CLSID:F03A2833-E70F-485B-A557-7769CCC9DD49' style='width: 1px; height: 1px; position: absolute; top: -9999px' />");qz_iehelper.FreeLibraries();var e=
this;this.ieHelperHandle=setInterval(function(){e.IEHelperCleanup()},1E3);return true}catch(g){this.UnloadIEHelper();return false}};this.IEHelperCleanup=function(){if(typeof qz_iehelper!="undefined")try{qz_iehelper.FreeLibraries()}catch(e){}};this.UnloadIEHelper=function(){clearInterval(this.ieHelperHandle);this.ieHelperHandle=null;$("#iehelper_container").empty();try{qz_iehelper=undefined}catch(e){}typeof CollectGarbage!="undefined"&&CollectGarbage()};this.IsInstalled=function(){function e(){try{k.InjectObject();
k.CreateObjectHandle();qz_instance.IsGameRunning();g=typeof qz_instance!="undefined"}catch(u){}k.RemoveObject();return g}var g=false,k=this;if(this.pluginNeedsLibraryUnloader)if(this.LoadIEHelper())e();else g=false;else if(navigator){if(navigator.mimeTypes)for(var l=navigator.mimeTypes.length,n=0;n<l;++n)if(navigator.mimeTypes[n].type==MIME_TYPE){g=true;break}if(!g&&navigator.plugins){l=navigator.plugins.length;for(n=0;n<l;++n){var q=navigator.plugins[n];if(q.name==this.pluginName){g=true;break}}}}else e();
return g};this.version=this.verifiedTime=this.handshakeTime=this.injectTime=0;this.VersionCompare=function(e,g){e=e.split(".");g=g.split(".");for(var k=e.length>g.length?g.length:e.length,l=0;l<k;++l)if(e[l]<g[l])return-1;else if(e[l]>g[l])return 1;return 0};this.CreateObjectHandle=function(){if(typeof qz_instance=="undefined")try{qz_instance=document.getElementById("qz_instance")||undefined}catch(e){qz_instance=undefined}};this.AttemptHandshake=function(){if(this.handshakeCount++>=this.maxHandshakeAttempts)this.HandshakeFailed();
else{this.CreateObjectHandle();if($.browser.msie&&typeof qz_instance!="undefined")try{this.HandshakeSuccess(qz_instance.GetVersion())}catch(e){}}};this.MakeObjectTag=function(e){e='<object id="'+e+'" class="game_viewport" width="100%" height="100%" ';e+=$.browser.msie?'classid="CLSID:'+this.classId+'"':'type="'+this.mimeType+'"';e+=" />";return e};this.CheckVersion=function(e,g){if(navigator&&navigator.plugins)this.pluginRefreshNeedsReload?navigator.plugins.refresh(true):navigator.plugins.refresh();
var k=this;if(this.IsInstalled()){this.PrepareForHandshake(e,function(l){var n=VersionCompare(l,k.serverPluginVersion);if(n<0)g.VersionTooOld(k,l);else n>0?g.VersionTooNew(k,l):g.VersionOk(k,l)},function(){g.HandshakeFailed(k)});this.InjectObject();this.AttemptHandshake()}else g.PluginNotInstalled(k)};this.EnableOnReadyHook=function(e){if(e){this.oldPluginReadyHook=window.OnPluginReady;window.OnPluginReady=function(g){pluginx.OnPluginReady(g)}}else{window.OnPluginReady=this.oldPluginReadyHook;this.oldPluginReadyHook=
null}};this.PrepareForHandshake=function(e,g,k){this.handshakeTime=(new Date).getTime();this.handshakeCount=0;this.maxHandshakeAttempts=e;this.handshakeHandle&&clearInterval(this.handshakeHandle);this.handshakeDelay=$.browser.msie?1E4:5E3;this.handshakeDone=false;this.EnableOnReadyHook(true);this.handshakeSuccessCallback=g;this.handshakeFailureCallback=k;var l=this;this.handshakeHandle=setInterval(function(){l.AttemptHandshake()},this.handshakeDelay)};this.HandshakeSuccess=function(e){this.verifiedTime=
(new Date).getTime();this.handshakeDone=this.handshakeSuccess=true;this.EnableOnReadyHook(false);if(this.handshakeHandle!==null){clearInterval(this.handshakeHandle);this.handshakeHandle=null}typeof this.handshakeSuccessCallback=="function"&&this.handshakeSuccessCallback(e)};this.HandshakeFailed=function(){this.EnableOnReadyHook(false);clearInterval(this.handshakeHandle);this.handshakeHandle=null;this.handshakeSuccess=false;this.handshakeDone=true;typeof this.handshakeFailureCallback=="function"&&
this.handshakeFailureCallback()};this.InjectObject=function(){this.injectTime=(new Date).getTime();try{$(this.pluginContainerId).html(this.MakeObjectTag("qz_instance"))}catch(e){}};this.RemoveObject=function(){this.removeTime=(new Date).getTime();$(this.pluginContainerId).empty();qz_instance=undefined;typeof CollectGarbage=="function"&&CollectGarbage()};this.IsGameRunning=function(){return typeof qz_instance!="undefined"&&qz_instance.IsGameRunning()};this.OnPluginReady=function(e){function g(){try{qz_instance.IsGameRunning();
l.HandshakeSuccess(e);clearInterval(q)}catch(u){if(n++>=k){l.HandshakeFailed();clearInterval(q)}}}clearInterval(this.handshakeHandle);this.handshakeHandle=null;var k=3,l=this,n=0,q=null;l.CreateObjectHandle();setTimeout(function(){q=setInterval(g,500);g()},100)}}window.pluginx=new qlPlugin("Quake Live",MIME_TYPE,CLSID,version.join("."));
function GetInstallMode(){switch(OSGetName()){case "os_linux":return"linux";case "os_mac":return"mac";default:if($.browser.msie)return"ie_msi";return"npapi_msi"}}
function GetInstallerUrl(){var b="";switch(GetInstallMode()){case "npapi_msi":b=quakelive.siteConfig.cdnUrl+"/QuakeLiveNP_"+BUILD_NUMBER+".msi?v="+check_version_comma;break;case "ie_msi":b=quakelive.siteConfig.cdnUrl+"/QuakeLiveIE_"+BUILD_NUMBER+".msi?v="+check_version_comma;break;case "mac":b=quakelive.siteConfig.cdnUrl+"/QuakeLivePlugin_"+BUILD_NUMBER+".dmg?v="+check_version_comma;break;case "linux":b=quakelive.siteConfig.cdnUrl+"/QuakeLivePlugin_"+BUILD_NUMBER+".xpi?v="+check_version_comma}return b}
function doInstall(){var b=GetInstallerUrl();b!==null&&$("body").append("<iframe src='"+b+"' width='0' height='0' style='display: none' />")}var ieArrowAnimated=false;
function upgrade(){$.ajax({url:"/register/upgrade/"+GetInstallMode(),complete:function(){doInstall();if(($.browser.msie||IsLinux())&&!ieArrowAnimated){ieArrowAnimated=true;if(ReadCookie(ie_cookie_string))EraseCookie(ie_cookie_string);else{CreateCookie(ie_cookie_string,1);var b=30,c=400;$("#registration_uparrow").remove();$("body").append('<div id="registration_uparrow" style="top: '+b+'px"></div>');$("#registration_uparrow").animate({top:"-="+b+"px"},c).animate({top:"+="+b+"px"},c).animate({top:"-="+
b+"px"},c).animate({top:"+="+b+"px"},c).animate({top:"-="+b+"px"},c).animate({top:"+="+b+"px"},c).animate({top:"-="+b+"px"},c).show()}}quakelive.TrackPageView("/register/upgrade/"+GetInstallMode())}})}window.GROUP_MINIMUM=1;window.GROUP_BASE=2;window.GROUP_EXTRA=3;window.GROUP_DONE=4;
function XferStatus(b,c){this.groupTitle="Downloading&hellip;";this.fileName="";this.totalTransferredAmount=this.transferredAmount=this.fileSize=this.fileIndex=0;this.totalDownloads=b;this.totalDownloadsSize=c;this.frac=this.totalFrac=this.totalDownloadsFrac=0;this.currentGroup=this.group=GROUP_MINIMUM;this.groups=[]}window.qlXfer=new XferStatus(1,0);
function OnDownloadGroup(b,c,o){if(!qlXfer.groups[b]){qlXfer.fileName="";qlXfer.fileIndex=0;qlXfer.fileSize=0;qlXfer.transferredAmount=0;qlXfer.totalTransferredAmount=0;qlXfer.totalDownloads=c;qlXfer.totalDownloadsSize=o;qlXfer.totalDownloadsFrac=0;qlXfer.totalFrac=0;qlXfer.frac=0;for(qlXfer.currentGroup=b;qlXfer.group<=b;){switch(qlXfer.group){case GROUP_MINIMUM:qlXfer.groupTitle="Minimum Set&hellip;";break;case GROUP_BASE:qlXfer.groupTitle="Base Set&hellip;";break;case GROUP_EXTRA:qlXfer.groupTitle=
"Extra Set&hellip;";break;case GROUP_DONE:qlXfer.groupTitle="Complete.";SetPluginStatus(QL_STATUS_GAMEREADY);break}qlXfer.group==b?quakelive.SendModuleMessage("OnDownloadGroup",{group:qlXfer.group,numfiles:qlXfer.totalDownloads,size:qlXfer.totalDownloadsSize}):quakelive.SendModuleMessage("OnDownloadGroup",{group:qlXfer.group,numfiles:0,size:0});qlXfer.groups[qlXfer.group]=true;qlXfer.group++}}}
function OnDownloadError(b){qlPrompt({title:"File Manifest Error",body:qz_instance.GetErrorCodeString(b)||"Unknown Error",fatal:true})}function XferUpdateStatus(){SetPluginStatus(QL_STATUS_GAMEXFERUPDATE,qlXfer)}function OnFileXferStarted(b,c){qlXfer.fileName=b;qlXfer.fileSize=c;qlXfer.transferredAmount=0;qlXfer.lastTransferredAmount=0;XferUpdateStatus();quakelive.SendModuleMessage("OnFileXferStarted",{fileName:b,fileSize:c})}var RATE_SAMPLE_TIME=1E4;
function OnFileXferUpdate(b){var c=(new Date).getTime();if(qlXfer.lastSampleTime){qlXfer.sampleBytesAccum+=b-qlXfer.lastTransferredAmount;if(c-qlXfer.lastSampleTime>=RATE_SAMPLE_TIME){qlXfer.bytesPerSec=1E3*qlXfer.sampleBytesAccum/(c-qlXfer.lastSampleTime);qlXfer.lastSampleTime=c;qlXfer.sampleBytesAccum=0}}else{qlXfer.lastSampleTime=c;qlXfer.sampleBytesAccum=0}qlXfer.lastTransferredAmount=b;qlXfer.transferredAmount=b;qlXfer.frac=qlXfer.fileSize>0?b/qlXfer.fileSize:0;qlXfer.totalDownloadsFrac=qlXfer.totalDownloadsSize>
0?(b+qlXfer.totalTransferredAmount)/qlXfer.totalDownloadsSize:0;XferUpdateStatus();quakelive.Tick()}function OnFileXferDone(b){qlXfer.fileIndex++;qlXfer.totalTransferredAmount+=qlXfer.fileSize;XferUpdateStatus()}function OnHeartbeatTimeout(){}function OnHeartbeat(){setTimeout(OnHeartbeatTimeout,10)}window.xmppActive=false;function IM_OnConnected(){if(!xmppActive){xmppActive=true;quakelive.SendModuleMessage("IM_OnConnected")}}
function IM_OnDisconnected(){if(xmppActive){xmppActive=false;quakelive.SendModuleMessage("IM_OnDisconnected")}}function IM_OnRosterFilled(){quakelive.SendModuleMessage("IM_OnRosterFilled")}function VersionCompare(b,c){b=b.split(".");c=c.split(".");for(var o=b.length>c.length?c.length:b.length,d=0;d<o;++d)if(b[d]<c[d])return-1;else if(b[d]>c[d])return 1;return 0}
function OnGameExit(b){quakelive.Tick();quakelive.TrackPageView("/ExitGame/"+b);EndGameMode();document.title=quakelive.GetPageTitle();quakelive.SendModuleMessage("OnGameExited",b)}
function OnVidRestart(b){var c=quakelive.cvars.Get("r_inBrowserMode");if(c.latched){if(typeof quakelive.cvars.screenModes[c.value]!="undefined"){w=quakelive.cvars.screenModes[c.value][0];h=quakelive.cvars.screenModes[c.value][1]}else{w=800;h=600}StartGameMode(w,h);c.latched=false}quakelive.SendModuleMessage("OnVidRestart",b)}
function CheckIfLaunchableGame(b){if(!quakelive.userid){quakelive.mod_welcome.ShowRegisterPrompt();return false}if(quakelive.userstatus!="ACTIVE"&&!b){quakelive.mod_welcome.ShowSkillTestPrompt();return false}return true}function join_server(b,c,o){var d=BuildCmdString();d+="+connect "+b;if(typeof o!="undefined"){d+=" +password "+o;if(c)c.g_needpass=false}LaunchGame(d,false,c)}
function LaunchGame(b,c,o){function d(k,l,n){quakelive.HideTooltip();var q,u;u=quakelive.cvars.Get("r_inBrowserMode");if(typeof quakelive.cvars.screenModes[u.value]!="undefined"){q=quakelive.cvars.screenModes[u.value][0];u=quakelive.cvars.screenModes[u.value][1]}else{q=800;u=600}StartGameMode(q,u);document.title="QUAKE LIVE - Now Playing!";quakelive.SendModuleMessage("OnGameStarted",{isBotGame:l,serverInfo:n});l||qz_instance.StopDownloads();setTimeout(function(){var B=qz_instance.LaunchGameWithCmdBuffer(k);
if(B){OnGameExit(B);qlPrompt({title:"Fatal Error",body:qz_instance.GetErrorCodeString(B)||"Unknown Error",fatal:true})}},100);CheckForPreGameAd();quakelive.ScrollToTop();l=l?e?"/LaunchGame/Bot/Training":"/LaunchGame/Bot":"/LaunchGame/Live";quakelive.TrackPageView(l)}var e=c=="TRAIN",g=c!=false;if(CheckIfLaunchableGame(g)){qlHidePrompt();if(!g&&qlXfer.currentGroup<GROUP_EXTRA)qlPrompt({title:"Unable to Launch Game",body:"You are downloading required data and must let it finish before you can join an online match.",
alert:true});else o&&o.g_needpass?qlPrompt({title:"Password Required",body:"The match you are connecting to requires a password. Please enter the password below:",input:true,okLabel:"Connect",ok:function(){var k=$("#modal-input > input").val();if(k.length!==0)if(/"/.test(k))$(".modal-content > .modal-feedback").html("Password cannot contain quotes.");else{b+=' +password "'+k+'"';d(b,g,o);$("#prompt").jqmHide()}else $(".modal-content > .modal-feedback").html("You must enter a password to continue")}}):
d(b,g,o)}}function BuildCmdString(){var b=quakelive.cvars.Get("model");quakelive.cvars.Set("headmodel",b.value);quakelive.cvars.Set("team_model",b.value);quakelive.cvars.Set("team_headmodel",b.value);quakelive.cfgUpdater.StoreConfig(quakelive.cfgUpdater.CFG_BIT_REP);b="";b+='+set gt_user "'+pluginx.username+'" ';b+='+set gt_pass "'+pluginx.password+'" ';b+='+set gt_realm "'+quakelive.siteConfig.realm+'" ';return b}
function HandleCrashReport(){if(qz_instance.IsCrashDumpPresent()){quakelive.Overlay("home/crashed","CloseCrashReport()",true);return true}return false}function CloseCrashReport(){qz_instance.CancelBugReport();quakelive.CloseOverlay();quakelive.OnPluginInstalled()}
function SubmitCrashReport(){if(qz_instance){var b=[$("#USERAGENT").val(),$("#IP").val(),$("#URI").val(),$("#crashed-usermsg").val()].join("\n");qz_instance.SubmitBugReport("http://"+window.location.hostname+"/home/crashed",b);alert("Thanks for the report!")}quakelive.CloseOverlay();quakelive.OnPluginInstalled()}var gameInstallHandle=null;function StopGameInstall(){if(gameInstallHandle!=null){clearTimeout(gameInstallHandle);gameInstallHandle=null}}
function SetupInstall(){var b=GetInstallMode();quakelive.OnPluginOutdated(b,current_version,check_version_comma)}var newInstall,pluginAlreadyRun=false;function run_plugin(b,c){if(!pluginAlreadyRun){pluginAlreadyRun=true;newInstall=false;pluginx.SetCredentials(b,c);b=new StartupVersionListener;pluginx.CheckVersion(1,b)}}var QL_STATUS_GAMEXFERUPDATE=4,QL_STATUS_GAMEREADY=5;
function SetPluginStatus(b,c){var o=$("#qlv_statusBottom");if(qlXfer.group!=0)switch(b){case QL_STATUS_GAMEXFERUPDATE:if(!quakelive.IsGameRunning()&&c.totalDownloads>0){b=parseInt(100*c.totalDownloadsFrac);if(b<0)b=0;else if(b>100)b=100;o.attr("title",c.fileName);o.html("Additional Content "+b+"% Complete");$(".dl-bar-fill").css("width",b+"%");$(".dl-percent").text(b+"%");o="<span class='t-hilite'>"+b+"% Complete</span>";if(qlXfer.bytesPerSec){b=c.totalTransferredAmount+c.transferredAmount;c=parseInt((c.totalDownloadsSize-
b)/qlXfer.bytesPerSec);if(c<0)c=0;b=parseInt((59+c)/60);if(b<0)b=0;c=c<60?c<=1?"1 second left":c+" seconds left":b<=1?"1 minute left":b+" minutes left";o+=" &nbsp;&nbsp;<small class='t-lolite'>"+c+"</small>";$(".dl-timeleft").text(c)}$(".dl-progress-text").html(o)}break;case QL_STATUS_GAMEREADY:o.empty();o.removeAttr("title");break}}function OnBeforeUnload(){return"Pressing OK will disconnect you from the current server."}
var PREGAME_COUNTDOWN_TIME=5,POSTGAME_COUNTDOWN_TIME=20,POSTGAME_COUNTDOWN_MAX=30,POSTGAME_COUNTDOWN_MIN=5,POSTGAME_FREQUENCY=2,POSTGAME_MAXRETRY=20,postgame_countdown=0,postgame_countdown_handle=null,pregame_countdown=0,pregame_countdown_handle=null,postgame_retrycount=0;function StopPreGameAd(){$(".interestitial_ad_container").remove();SetGameModeDefaults()}
function PreGameCountdown(){if(--pregame_countdown==0)StopPreGameAd();else{$("#qlv_game_mode").find(".action_txt").html(pregame_countdown).unbind("click");pregame_countdown_handle=setTimeout(PreGameCountdown,1E3)}}function CheckForPreGameAd(){quakelive.LoadVerts({zone:quakelive.VERT_ZONES.pre_game_interstitial,display:function(b,c,o){if(o)StopPreGameAd();else{$("#qz_handshake").css("width","1px").css("height","1px");ShowPreGameAd(c)}}},{timeout:1500})}
function ShowPreGameAd(b){var c=$("#qlv_game_mode");c.find(".greeting_txt").html("Quake Live is loading now&hellip;");$("<a>").click(EndGameMode);c.find(".action_txt").unbind("click");c.find(".action_img").unbind("click").html("<img src='"+quakelive.resource("/images/lgi/server_details_time.png")+"' width='16' height='16' />");pregame_countdown=PREGAME_COUNTDOWN_TIME+1;if(pregame_countdown_handle){clearTimeout(pregame_countdown_handle);pregame_countdown_handle=null}PreGameCountdown();c=$('<div class="interestitial_ad_container pregame_container"><div class="header"></div><div class="content"></div><small>Clicking advertisement will not interrupt Quake Live loading.</small></div>');
c.find(".content").append(b);$("#qlv_game_mode_viewport").append(c)}
function PostGameCountdown(){postgame_retrycount++;if($("#flashintro").length!==0){$("#vert-loading-msg").show();try{$.browser.msie?$("#flashintro").get():$("#flashintro embed").get()}catch(b){}}$("#vert-loading-msg").hide();if(--postgame_countdown==0){CreateCookie("QLPGA",1,POSTGAME_FREQUENCY/24);$(".interestitial_ad_container").remove();ActualEndGameMode(true);postgame_retrycount=0}else{$("#qlv_game_mode").find(".action_txt").html("Returning in&hellip; "+postgame_countdown).unbind("click");postgame_countdown_handle=
setTimeout(PostGameCountdown,1E3)}}
function ShowPostGameAd(b,c){var o=$("#qlv_game_mode");o.find(".greeting_txt").html("Now a word from our sponsors&hellip;");$("<a>").click(EndGameMode);o.find(".action_txt").unbind("click");o.find(".action_img").unbind("click").html("<img src='"+quakelive.resource("/images/lgi/server_details_time.png")+"' width='16' height='16' />");postgame_countdown=c+1;if(postgame_countdown_handle){clearTimeout(postgame_countdown_handle);postgame_countdown_handle=null}PostGameCountdown();c=$('<div class="interestitial_ad_container postgame_container"><div class="header"></div><div class="content"></div><small>Clicking advertisement will not interrupt Quake Live loading.</small></div>');
c.find(".content").append(b);$("#qlv_game_mode_viewport").append(c)}function ActualEndGameMode(b){b&&quakelive.LoadVerts({zone:quakelive.VERT_ZONES.post_game_interstitial_tracker,display:function(){}},{timeout:15E3});$("#qlv_game_mode").css("top","-9999px");$("#body-container").show();quakelive.mod_friends.MoveTo("#qlv_chatControl");qz_instance.StartDownloads(quakelive.siteConfig.staticUrl,quakelive.siteConfig.cdnUrl);quakelive.ReloadVerts()}var postGameDefaults={html:"",time:20};
function EndGameMode(){window.onbeforeunload=null;quakelive.ShutdownGame();$("#qz_handshake").css("height","1px").css("width","1px");!quakelive.siteConfig.showPostGameAlways&&ReadCookie("QLPGA")!==null?ActualEndGameMode(false):quakelive.LoadVerts({zone:quakelive.VERT_ZONES.post_game_interstitial,display:function(b,c,o,d){if(b=quakelive.ParseMetaVert(d,postGameDefaults)){c=b.href?$('<a target="_blank">').attr("href",b.href):$("<div>");c.append(b.keyvals.html);o=false}else o=true;if(o){CreateCookie("QLPGA",
1,POSTGAME_FREQUENCY/24);ActualEndGameMode(true)}else{try{var e=parseInt(b.keyvals.time);if(e<POSTGAME_COUNTDOWN_MIN)e=POSTGAME_COUNTDOWN_MIN;if(e>POSTGAME_COUNTDOWN_MAX)e=POSTGAME_COUNTDOWN_MAX}catch(g){e=postGameDefaults.time}ShowPostGameAd(c,e)}}},{timeout:1E3})}
function SetGameModeDefaults(){var b=$("#qlv_game_mode").css("top","0");b.find(".greeting_txt").text("Quake Live");$("<a>").click(EndGameMode);b.find(".action_txt").text("Back to Website").unbind("click").click(EndGameMode);b.find(".action_img").html("<img src='"+quakelive.resource("/images/sf/general/close_xpic.gif")+"' width='18' height='16' />").unbind("click").click(EndGameMode);var c=b.find(".url_link");if(JoinURL.currentServerAddress!==undefined){$("#url_link_input").unbind("blur").blur(function(o){$(o.target).hide().val("")});
c.html('<img src="'+quakelive.resource("/images/link_glow.png")+'" width="26" height="26" style="vertical-align: middle;" /> <b>Show link for this match</b>').unbind("click").click(function(){$("#url_link_input").show().focus().val(JoinURL.currentServerAddress).get(0).select()})}else b.find(".url_link").text("Quake Live").unbind("click");$("#qz_handshake").css("height","100%").css("width","100%")}
function StartGameMode(b){window.onbeforeunload=OnBeforeUnload;qlHidePrompt();$("#body-container").hide();quakelive.mod_friends.MoveTo("#qlv_game_mode_chatlist");SetGameModeDefaults();var c="";c=b<=640?"game_decoration_640":b<=800?"game_decoration_800":"game_decoration_1024";b=$("#qlv_game_mode");b.attr("class",c)}
window.OnCommNotice=function(b,c){if(b==0)if(b=quakelive.Eval(c))switch(b.MSG_TYPE){case "award_notice":if(!quakelive.siteConfig.xyzzy)break;b.MSG_SOURCE.toLowerCase()==quakelive.username.toLowerCase()?quakelive.notifier.Notify(quakelive.notifier.SelfAwardEarnedNotice(b.AWARD_TYPE_ID,b.AWARD_ID,b.AWARD_NAME,b.AWARD_IMG,b.AWARD_DESC,b.AWARD_FLAVOR)):quakelive.notifier.Notify(quakelive.notifier.FriendAwardEarnedNotice(b.MSG_SOURCE,b.AWARD_TYPE_ID,b.AWARD_ID,b.AWARD_NAME,b.AWARD_IMG,b.AWARD_DESC,b.AWARD_FLAVOR,
b.PLAYER_MODEL));break;case "openurl":window.open(b.URL,"_blank");break;case "session_caps":typeof QLXFire=="object"&&quakelive.siteConfig.xfire&&parseInt(b.XFIRE)!==0&&QLXFire.EnableXFire();break}};
if(!window.JSON)window.JSON=function(){function b(q){return q<10?"0"+q:q}function c(q){e.lastIndex=0;return e.test(q)?'"'+q.replace(e,function(u){var B=l[u];if(typeof B==="string")return B;return"\\u"+("0000"+(+u.charCodeAt(0)).toString(16)).slice(-4)})+'"':'"'+q+'"'}function o(q,u){var B,x,p=g,z,K=u[q];if(K&&typeof K==="object"&&typeof K.toJSON==="function")K=K.toJSON(q);if(typeof n==="function")K=n.call(u,q,K);switch(typeof K){case "string":return c(K);case "number":return isFinite(K)?String(K):
"null";case "boolean":case "null":return String(K);case "object":if(!K)return"null";g+=k;z=[];if(typeof K.length==="number"&&!K.propertyIsEnumerable("length")){x=K.length;for(q=0;q<x;q+=1)z[q]=o(q,K)||"null";u=z.length===0?"[]":g?"[\n"+g+z.join(",\n"+g)+"\n"+p+"]":"["+z.join(",")+"]";g=p;return u}if(n&&typeof n==="object"){x=n.length;for(q=0;q<x;q+=1){B=n[q];if(typeof B==="string")if(u=o(B,K))z.push(c(B)+(g?": ":":")+u)}}else for(B in K)if(Object.hasOwnProperty.call(K,B))if(u=o(B,K))z.push(c(B)+(g?
": ":":")+u);u=z.length===0?"{}":g?"{\n"+g+z.join(",\n"+g)+"\n"+p+"}":"{"+z.join(",")+"}";g=p;return u}}Date.prototype.toJSON=function(){return this.getUTCFullYear()+"-"+b(this.getUTCMonth()+1)+"-"+b(this.getUTCDate())+"T"+b(this.getUTCHours())+":"+b(this.getUTCMinutes())+":"+b(this.getUTCSeconds())+"Z"};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()};var d=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
e=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,g,k,l={"\u0008":"\\b","\t":"\\t","\n":"\\n","\u000c":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},n;return{stringify:function(q,u,B){var x;k=g="";if(typeof B==="number")for(x=0;x<B;x+=1)k+=" ";else if(typeof B==="string")k=B;if((n=u)&&typeof u!=="function"&&(typeof u!=="object"||typeof u.length!=="number"))throw new Error("JSON.stringify");return o("",{"":q})},parse:function(q,u){function B(x,
p){var z,K,v=x[p];if(v&&typeof v==="object")for(z in v)if(Object.hasOwnProperty.call(v,z)){K=B(v,z);if(K!==undefined)v[z]=K;else delete v[z]}return u.call(x,p,v)}d.lastIndex=0;if(d.test(q))q=q.replace(d,function(x){return"\\u"+("0000"+(+x.charCodeAt(0)).toString(16)).slice(-4)});if(/^[\],:{}\s]*$/.test(q.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){q=eval("("+q+")");return typeof u===
"function"?B({"":q},""):q}throw new SyntaxError("JSON.parse");}}}();
(function(){function b(){var c=1,o=600;this.commitData={};this.commitHandle=null;this.commitDelay=c;this.handlers=[];this.pauseCommit=false;this.Commit=function(d){if(!this.commitHandle){this.changeCounts={add:0,del:0};if(this.pauseCommit===false)if(d){this.commitDelay=d;var e=this;this.commitHandle=setTimeout(function(){e.TryCommit()},1E3*d)}else{this.commitDelay=c;this.TryCommit()}}};this.Commit_Success=function(d){if(ECODE_SUCCESS(d.ECODE)){this.commitHandle=null;this.commitData={}}else this.Commit_Error()};
this.Commit_Error=function(){var d=this;this.commitHandle=setTimeout(function(){d.TryCommit()},1E3*this.commitDelay);this.commitDelay*=2;if(this.commitDelay>o)this.commitDelay=o};this.TryCommit=function(){if(quakelive.userid){for(var d in this.handlers){var e=this.handlers[d];e.MergeChangedFields(this.commitData,this.changeCounts)}if(this.changeCounts.add>0||this.changeCounts.del){var g=this;$.ajax({type:"post",dataType:"json",url:"/prefs/update",data:this.commitData,success:function(k){g.Commit_Success(k)},
error:function(){g.Commit_Error()}})}else this.commitHandle=null}};this.CFG_BIT_HW=1;this.CFG_BIT_REP=2;this.StoreConfig=function(d){if(quakelive.userid){var e="";for(var g in this.handlers){var k=this.handlers[g];e+=k.GetConfigString(d)}qz_instance.WriteTextFile("/repconfig.cfg",e)}};this.AddSource=function(d){this.handlers[this.handlers.length]=d}}quakelive.cfgUpdater=new b;quakelive.AddHook("OnGameStarted",function(){quakelive.cfgUpdater.pauseCommit=true});quakelive.AddHook("OnGameExited",function(){quakelive.cfgUpdater.pauseCommit=
false;quakelive.cfgUpdater.Commit()})})();function BindInfo(b,c,o){this.action=b;this.name=c;this.index=o;this.changed=false;this.keys=[];this.deletedKeys=[]}BindInfo.prototype.Bind=function(b,c){this.keys.push(b);if(!c)this.changed=true};BindInfo.prototype.Remove=function(b,c){if(c){this.deletedKeys=$.extend([],this.keys);this.keys=[];this.changed=true}else for(c=0;c<this.keys.length;c++)if(this.keys[c]===b){this.deletedKeys.push(this.keys[c]);this.keys.splice(c,1);this.changed=true;return}};
function BindManager(){this.handlers=[]}a=BindManager.prototype;a.keyLookup={};a.actionLookup={};
a.bindNames={centerview:"Center View","+zoom":"Zoom View","+forward":"Forward","+back":"Back","+moveleft":"Move Left","+moveright":"Move Right","+moveup":"Move Up / Jump","+movedown":"Move Down","+speed":"Silent Walk / Run","+attack":"Shoot",weapnext:"Weapon Next",weapprev:"Weapon Prev","weapon 1":"Gauntlet","weapon 2":"Machinegun","weapon 3":"Shotgun","weapon 4":"Grenade Launcher","weapon 5":"Rocket Launcher","weapon 6":"Lightning Gun","weapon 7":"Railgun","weapon 8":"Plasma Gun","weapon 9":"BFG",
"weapon 11":"Nailgun","weapon 12":"Prox Launcher","weapon 13":"Chaingun","+scores":"Show Scores","+button2":"Use Item","+button3":"Taunt",messagemode:"Chat",messagemode2:"Team Chat",dropweapon:"Drop Weapon",dropflag:"Drop Flag"};a.list=[];a.Get=function(b){var c=this.actionLookup[b];if(c===undefined){c=this.list.length;this.list[c]=new BindInfo(b,this.bindNames[b]||"user bind",c);this.actionLookup[b]=c}return this.list[c]};
a.GetByKey=function(b){b=this.keyLookup[b];return b!==undefined?this.list[b]:null};a.Bind=function(b,c,o){b=b.toLowerCase();this.Remove(b);c=this.Get(c);c.Bind(b,o);this.keyLookup[b]=c.index};a.Remove=function(b,c){b=b.toLowerCase();if(this.keyLookup[b]!==undefined){var o=this.GetByKey(b);o&&o.Remove(b,c);this.keyLookup[b]=undefined}};a.Import=function(b){for(var c in b)this.Bind(c,b[c],true)};
a.MergeChangedFields=function(b,c){for(var o in this.list){var d=this.list[o];if(d.changed){if(d.keys.length===0){for(var e=0;e<d.deletedKeys.length;++e)if(d.deletedKeys[e]){b["deltype"+c.del]=1;b["del"+c.del]=d.deletedKeys[e];c.del++}d.deletedKeys=[]}else for(e=0;e<d.keys.length;++e)if(d.keys[e]){b["addtype"+c.add]=1;b["addkey"+c.add]=d.keys[e];b["addvalue"+c.add]=d.action;c.add++}d.changed=false}}};
a.GetConfigString=function(){var b="unbindall\n";for(var c in this.list)for(var o=this.list[c],d=0;d<o.keys.length;++d)if(o.keys[d])b+="bind "+o.keys[d]+' "'+o.action+'"\n';return b};window.SetBind=window.OnBindChanged=function(b,c){quakelive.binds.Bind(b,c);quakelive.cfgUpdater.Commit(1)};quakelive.binds=new BindManager;quakelive.cfgUpdater.AddSource(quakelive.binds);
(function(){function b(o,d,e){this.name=o;this.replicate=e;this.value=this.defaultValue=d.toString();this.changed=false}function c(){this.cvarLookup={};this.cvarList=[new b("name","UnnamedPlayer",true),new b("clan","",true),new b("model","sarge/default",true),new b("cg_forceEnemyModel","",true),new b("cg_forceTeamModel","",true),new b("color1","2",true),new b("color2","7",true),new b("cg_autoswitch","1",true),new b("cg_scorePlums","1",true),new b("cg_brassTime","2500",true),new b("r_dynamiclight",
"1",true),new b("cg_drawCrosshairNames","1",true),new b("r_fastsky","0",true),new b("cg_forceModel","0",true),new b("cg_drawTeamOverlay","1",true),new b("cl_freelook","1",true),new b("m_pitch","0.022",true),new b("cg_drawCrosshair","4",true),new b("cl_run","1",true),new b("web_configVersion","0",true),new b("cg_fov","90",true),new b("r_picmip","0",true),new b("m_filter","0",false),new b("sensitivity","6",false),new b("r_fullscreen","0",false),new b("r_mode","-2",false),new b("r_inBrowserMode","9",
true),new b("r_vertexlight","0",true),new b("r_fullbright","0",true),new b("r_lodbias","0",false),new b("r_texturemode","GL_LINEAR_MIPMAP_LINEAR",false),new b("r_ext_compressed_textures","0",false),new b("r_texturebits","32",false),new b("r_gamma","1",false),new b("s_volume","0.8",false),new b("s_musicvolume","0.25",false),new b("s_doppler","0",false),new b("rate","8000",true)];for(var o=0;o<this.cvarList.length;++o){var d=this.cvarList[o];if(d.value===undefined)d.value=d.defaultValue;this.cvarLookup[d.name.toLowerCase()]=
d}this.screenModes={0:[320,240],1:[400,300],2:[512,384],3:[640,360],4:[640,400],5:[640,480],6:[800,450],7:[852,480],8:[800,500],9:[800,600],10:[1024,640],11:[1024,576],12:[1024,768],13:[1152,864],14:[1280,720],15:[1280,768],16:[1280,800],17:[1280,1024],18:[1440,900],19:[1600,900],20:[1600,1E3],21:[1680,1050],22:[1600,1200],23:[1920,1080],24:[1920,1200],25:[1920,1440],26:[2048,1536],27:[2560,1600]}}window.quakelive.cvars={};b.prototype.MarkChanged=function(){this.changed=true};c.prototype.Get=function(o,
d){var e=o.toLowerCase();if(this.cvarLookup[e]===undefined)this.Set(o,arguments.length==1?"":d);return this.cvarLookup[e]};c.prototype.GetIntegerValue=function(o,d){o=this.Get(o,d||0);return parseInt(o.value)};c.prototype.Set=function(o,d,e,g){var k=o.toLowerCase(),l=this.cvarLookup[k];if(l===undefined){l=new b(o,d,g?false:true);this.cvarList[this.cvarList.length]=l;this.cvarLookup[k]=l}else l.value=d.toString();if(!e){l.MarkChanged();o=="model"&&quakelive.SendModuleMessage("OnModelIconChanged",l)}return l};
c.prototype.Parse=function(o){if(typeof o=="string"){var d=/set.?\s+(\w+)\s+\"?([^\"]*)\"?/;o=o.split(/\r?\n/);for(var e=0;e<o.length;++e){var g=o[e].match(d);g==null||g.length!=3||this.Set(g[1],g[2],true,true)}}};c.prototype.Import=function(o){for(var d in o)this.Set(d,o[d],true)};c.prototype.MergeChangedFields=function(o,d){var e=false;for(var g in this.cvarList){var k=this.cvarList[g];if(k.changed){if(k.replicate){o["addtype"+d.add]=2;o["addkey"+d.add]=k.name;o["addvalue"+d.add]=k.value;d.add++}else e=
true;k.changed=false}}e&&this.StoreHardwareCvars()};c.prototype.StoreHardwareCvars=function(){var o=this.GetConfigString(quakelive.cfgUpdater.CFG_BIT_HW);qz_instance.WriteTextFile("/qzconfig.cfg",o)};c.prototype.GetConfigString=function(o){var d=(o&quakelive.cfgUpdater.CFG_BIT_HW)!=0;o=(o&quakelive.cfgUpdater.CFG_BIT_REP)!=0;var e="";for(var g in this.cvarList){var k=this.cvarList[g];if(o&&k.replicate||d&&!k.replicate)e+="seta "+k.name+' "'+k.value+'"\n'}return e};c.prototype.LoadHardwareCvars=function(){this.Parse(qz_instance.GetHardwareCvars())};
window.SetCvar=window.OnCvarChanged=function(o,d,e){e=parseInt(e)===0;quakelive.cvars.Set(o,d,false,e);e||quakelive.cfgUpdater.Commit(1)};quakelive.cvars=new c;quakelive.cfgUpdater.AddSource(quakelive.cvars)})();
(function(b){function c(){this.MATCH_CACHE_TIME=30;this.updateTimeHandle=this.refreshDetailsHandle=this.hoverServer=this.pinnedServer=null;this.GetDimensions=function(e){var g={left:0,top:0,innerWidth:0,innerHeight:0};if(typeof e=="object"&&e.length>0){var k=e.offset();if(k){g.left=k.left;g.top=k.top}g.innerWidth=e.innerWidth();g.innerHeight=e.innerHeight()}return g};this.GetTooltipOffset=function(e,g,k){var l={},n={left:b(document).scrollLeft(),top:b(document).scrollTop(),right:b(document).scrollLeft()+
b("body").width(),bottom:b(document).scrollTop()+b("body").height(),width:b("body").width(),height:b("body").height()};e=this.GetDimensions(e);e={left:e.left,top:e.top,right:e.left+e.innerWidth,bottom:e.top+e.innerHeight,width:e.innerWidth,height:e.innerHeight};var q={width:g.innerWidth(),height:g.innerHeight()},u=23,B=2,x=150,p=28,z=28;if(e.right+q.width+k+u>n.right){l.left=e.left-q.width-u+4;l.arrowDirection="right";l.arrowLeft=e.left-u;g.orientation="left"}else{l.left=e.left+e.width+u;l.arrowDirection=
"left";l.arrowLeft=e.right+B;g.orientation="right"}l.arrowTop=e.top+e.height/2-x/2;if(l.arrowTop<n.top){g=n.top-l.arrowTop;if(g>e.height/2)g=e.height/2;l.arrowTop+=g}l.top=l.arrowTop-(q.height-p-z)/3;if(l.top+q.height>n.bottom)l.top-=l.top+q.height-n.bottom;l.arrowLeft-=l.left;l.arrowTop=l.arrowTop-l.top-p;return l};this.MakeTooltip=function(){var e=b("#lgi_tip");if(e.length==0){e=b("<div id='lgi_tip'><div id='lgi_srv_top'><div id='lgi_srv_close' style='display: none'><a href='javascript:;' onclick='quakelive.matchtip.HideMatchTooltip(-1); return false' class='lgi_btn_close'></a></div></div><div id='lgi_srv_fill'></div><div id='lgi_srv_bot'></div></div>");
e.appendTo("body")}return e};this.ShowTooltip=function(e,g,k,l,n){var q=e.find("#lgi_srv_fill");q.empty().append(b("<div id='lgi_srv_content'></div>").append(k));e.find("#lgi_srv_bot").html(l);e.css("left","-9999px");e.css("top","-9999px");e.show();g=this.GetTooltipOffset(g,e,o);e.css("left",g.left+"px");e.css("top",g.top+"px");n&&q.append("<div id='lgi_arrow_"+g.arrowDirection+"' style='position: absolute; left: "+g.arrowLeft+"px; top: "+g.arrowTop+"px'></div>");return e};this.BuildServerContent=
function(e,g){var k=quakelive.GetGameTypeByID(g.game_type),l=GetSkillRankInfo(g);skillColor=l.color;var n=e.find("#lgi_host_name").length==0;n=n?b("<div><div id='lgi_host_name' class=''></div><div id='lgi_map_name' class='lgi_big'></div><div id='lgi_map_group'><div id='lgi_map'><div id='lgi_map_pic'></div><div id='lgi_map_frame' class=''></div><img id='lgi_skill_level' width='21' height='21' src='' /><div id='lgi_skill_level_name' class=''></div><div id='lgi_play' style='display: none'><a class='lgi_play_btn' href='javascript:;' onclick='quakelive.matchtip.JoinPinnedServer(); return false'></a></div></div><div id='lgi_map_details' class='lgi_medbold'></div></div></div>"):
e.find("#lgi_host_name").parent();n.find("#lgi_host_name").html(g.host_name);n.find("#lgi_map_frame").attr("class","frame_skill"+l.delta);n.find("#lgi_skill_level").attr("src",l.img);n.find("#lgi_skill_level_name").attr("class","name_skill"+l.delta).html(l.desc);l=g.GetMapTitle();n.find("#lgi_map_name").html(l);n.find("#lgi_map_pic").html("<img src='"+quakelive.resource("/images/levelshots/md/"+g.map.toLowerCase()+".jpg")+"' width='112' height='84' alt='"+l+"' />");var q=n.find("#lgi_map_details");
function u(K,v,E){var y=q.find("#"+K);if(y.length==0){y=b(["<p id='",K,"' class='lgi_row'><img src='' width='16' height='16' alt='' /><span></span><div class='cl'></div></p>"].join(""));q.append(y)}y.find("img").attr("src",E);y.find("span").html(v)}g.g_needpass&&u("lgi_match_secure","Password Secured",quakelive.resource("/images/lgi/server_details_ranked.png"));if(l=locdb.GetByID(g.location_id)){l=l.IsUSA()?l.GetCityState():[l.countryAbbr,l.GetCityState()].join(", ");u("lgi_match_location",l,quakelive.resource("/images/lgi/server_details_hosted.png"))}u("lgi_match_gametype",
g.GetGameTypeTitle(),quakelive.resource("/images/gametypes/"+k.name+"_sm.png"));if(self.updateTimeHandle){clearTimeout(self.updateTimeHandle);self.updateTimeHandle=null}if(g.details){k=0;l="";if(g.game_type==quakelive.DbGameTypes.Ctf){k=g.capturelimit;l="Capture Limit"}else if(g.game_type==quakelive.DbGameTypes.ClanArena){k=g.roundlimit;l="Round Limit"}else{k=g.fraglimit;l="Frag Limit"}u("lgi_match_scorelimit",l+": "+(k||"None"),quakelive.resource("/images/lgi/server_details_fraglimit.png"));TimeUpdater=
function(){var K="";if(g.g_gamestate=="IN_PROGRESS"){K=parseInt((new Date).getTime()/1E3);K=g.timelimit*60-(K-g.g_levelstarttime);if(K>0){var v=parseInt(K/60);K-=v*60;K="Time Left: "+ZeroPad(v)+":"+ZeroPad(K);self.updateTimeHandle=setTimeout(TimeUpdater,1E3)}else K="Time Left: None"}else K="Time Limit: "+g.timelimit;v=e.find("#lgi_match_timeleft span");v.length>0&&v.text(K);return K};k=TimeUpdater();u("lgi_match_timeleft",k,quakelive.resource("/images/lgi/server_details_time.png"))}k="Players: "+
g.num_clients+" / "+g.max_clients;if(g.num_friends>0){if(g.num_clients>1)k+=" ("+g.num_friends+")";l=quakelive.resource("/images/lgi/server_details_friends.png")}else l=quakelive.resource("/images/lgi/server_details_players.png");u("lgi_match_players",k,l);e.find("#lgi_scoreboard,#lgi_details_footer").remove();if(g.g_gamestate=="IN_PROGRESS"){k=[];if(quakelive.IsTeamGameType(g.game_type)){var B;if(g.g_redscore>=g.g_bluescore){l=0;B=1}else{l=1;B=0}k[l]={name:"Red Team",score:g.g_redscore,classes:"red_team_color"};
k[B]={name:"Blue Team",score:g.g_bluescore,classes:"blue_team_color"}}else{B=[99999,99999];var x=[0,0];for(l=0;l<g.players.length;++l)for(var p=g.players[l],z=0;z<B.length;++z)if(p.rank<B[z]&&p.team!=d.Spec){B[z]=p.rank;x[z]=l;break}for(z=0;z<B.length;++z){l={};p=g.players[x[z]];l.name=p.name;l.clan=p.clan;l.score=p.score;k[z]=l}}if(k.length>0){B="";p=b("<div id='lgi_scoreboard'></div>").appendTo(q);p.append("<div class='lgi_row tc inprogress_txt'>Scoreboard</div>");B+="<div class='lgi_scores_section'>";
for(l=0;l<k.length;++l){x=(k[l].clan?k[l].clan+" ":"")+k[l].name;B+=["<div class='lgi_separator'></div><div class='lgi_scores_row'><div class='lgi_name'>",StripColors(x),"</div><div class='lgi_score'>",k[l].score,"</div><div class='cl'></div></div>"].join("")}B+="</div>";p.append(B)}}else{k=b("<p id='lgi_details_footer' class='lgi_row tc pregame_txt'></p>");g.players.length>0?k.text("Pre-Game Warmup"):k.text("Waiting For Players");q.append(k)}return n};this.DisplayMatchTooltip=function(e,g){var k,
l,n,q=this.MakeTooltip();if(g===null){k=["<img src='",quakelive.resource("/images/loader.gif"),"' width='62' height='13' style='padding: 5px' />"].join("");l="<p style='color: #eee'>Loading Game Info&hellip;</p>";n=false;this.UnPinMatchTooltip()}else if(typeof g=="string"){k=["<div style='padding: 5px'>",g,"</div>"].join("");l="<p style='color: #f00'>An Error Occurred</p>";n=false;this.UnPinMatchTooltip()}else if(typeof g=="object"){k=this.BuildServerContent(q,g);g=GetSkillRankInfo(g);l=["<p style='color: ",
g.color,"'>Click to Join Game!</p>"].join("");n=true}return this.ShowTooltip(q,e,k,l,n)};var d={Free:0,Red:1,Blue:2,Spec:3};this.DisplayMatchPlayers=function(e){var g=b("#lgi_tip"),k=b("#lgi_cli");if(k.length==0){k=b("<div id='lgi_cli'><div id='lgi_cli_top'><div class='lgi_headcol_1'>Player Name</div><div class='lgi_headcol_2'>Score</div></div><div id='lgi_cli_fill'><div id='lgi_cli_content'></div></div><div id='lgi_cli_bot'></div></div>");k.appendTo("body")}var l=k.find("#lgi_cli_content");l.empty();
if(e.players.length>0)for(var n=0;n<e.players.length;++n){var q=e.players[n],u,B,x,p,z;p=n%2==0?"lgi_med lgi_cli_row_1":"lgi_med lgi_cli_row_2";if(q.friend)p+=" lgi_is_friend";else if(q.blocked)p+=" lgi_is_blocked";u=q.clan?StripColors(q.clan)+" ":"";B=StripColors(q.name);u+=B;if(q.bot){u+=" <i>(Bot)</i>";p+=" lgi_is_bot"}x=q.team==d.Spec?"SPEC":q.score;if(q.model){var K=q.model.toLowerCase().split("/");z=K[0]+"_";z+=K[1]?K[1]:"default"}else z="sarge_default";if(q.team==d.Red)z=ChangeModelSkin(z,
"red");else if(q.team==d.Blue)z=ChangeModelSkin(z,"blue");K="<a href='javascript:;' onclick='quakelive.Goto(\"profile/summary/"+StripColors(q.name)+"\"); return false'>";B=quakelive.mod_friends.IsBlocked(B)?"<img src='"+quakelive.resource("/images/players/icon_gray_sm/"+z+".jpg")+"' class='lgi_bordercolor_"+q.team+"' width='18' height='18' />":"<img src='"+quakelive.resource("/images/players/icon_sm/"+z+".jpg")+"' class='lgi_bordercolor_"+q.team+"' width='18' height='18' />";u=u;if(!q.bot){B=K+B+
"</a>";u=K+u+"</a>"}l.append("<div class='"+p+"'><div class='lgi_cli_col_1'>"+B+"<span>"+u+"</span><div class='cl'></div></div><div class='lgi_cli_col_2'>"+x+"</div></div>")}else l.append("<center>No Players in Game</center>");b(document).scrollLeft();b(document).scrollTop();b(document).scrollLeft();b("body").width();b(document).scrollTop();b("body").height();b("body").width();b("body").height();e=this.GetDimensions(g);e={left:e.left,top:e.top,right:e.left+e.innerWidth,bottom:e.top+e.innerHeight,
width:e.innerWidth,height:e.innerHeight};l={width:o};l.left=g.orientation=="left"?e.left-l.width:e.right;l.top=e.top;k.css("left",l.left+"px");k.css("top",l.top+"px");k.show()};this.HideMatchTooltip=function(){this.UnPinMatchTooltip();this.hoverNode=this.hoverServer=this.pinnedServer=null;b.ajaxAbort("matchdetails");b("#lgi_tip").hide();b("#lgi_cli").hide();if(this.updateTimeHandle){clearTimeout(this.updateTimeHandle);this.updateTimeHandle=null}if(this.refreshDetailsHandle){clearTimeout(this.refreshDetailsHandle);
this.refreshDetailsHandle=null}};this.OnHoverMatchTooltip=function(e,g){var k=quakelive.serverManager.GetServerInfo(g);k&&k.details?this.DisplayMatchTooltip(e,k):this.DisplayMatchTooltip(e,null);this.hoverNode=e;this.hoverServer=k;var l=this;function n(B,x){if(!x){l.DisplayMatchTooltip(e,B);l.pinnedServer==B&&l.DisplayMatchPlayers(B)}}function q(){l.DisplayMatchTooltip(e,"We're sorry, but we cannot load the data for this match.")}if(this.refreshDetailsHandle){clearTimeout(this.refreshDetailsHandle);
this.refreshDetailsHandle=null}function u(){quakelive.serverManager.RefreshServerDetails(g,{onSuccess:n,onError:q,cacheTime:l.MATCH_CACHE_TIME});l.refreshDetailsHandle=setTimeout(u,l.MATCH_CACHE_TIME*1E3)}u()};this.UnPinMatchTooltip=function(){this.pinnedServer=null;b("#lgi_cli").hide();b("#lgi_play,#lgi_srv_close").hide();b(".pinned_box,.pinned_bestpick_box").removeClass("pinned_box pinned_bestpick_box")};this.JoinPinnedServer=function(){this.pinnedServer&&this.JoinServer(this.pinnedServer)};this.PinMatchTooltip=
function(e){var g=b("#lgi_tip");if(g.length!=0){this.pinnedServer=e;e.skillTooHigh||g.find("#lgi_play").show();g.find("#lgi_srv_close").show();e=b("#match_"+e.public_id);e.hasClass("qlv_pls_box")?e.addClass("pinned_box"):e.addClass("pinned_bestpick_box")}};this.OnClickMatchTooltip=function(e,g){var k=quakelive.serverManager.GetServerInfo(g);if(!(!k||k.error))if(k.details){if(this.pinnedServer&&this.pinnedServer!=k){this.OnHoverMatchTooltip(e,g);this.UnPinMatchTooltip()}this.DisplayMatchPlayers(k);
this.PinMatchTooltip(k)}};this.OnDblClickMatchTooltip=function(e,g){e=quakelive.serverManager.GetServerInfo(g);if(!e||e.error)return false;if(e.skillTooHigh)return false;this.JoinServer(e);return true};this.BindMatchTooltip=function(e,g){e.unbind("hover");e.unbind("click");e.unbind("dblclick");var k=this;e.click(function(){k.OnClickMatchTooltip(e,g);return false});e.dblclick(function(){return k.OnDblClickMatchTooltip(e,g)});e.hover(function(){if(!(k.pinnedServer&&g==k.pinnedServer.public_id&&(k.hoverNode==
null||e==k.hoverNode))){k.UnPinMatchTooltip();k.OnHoverMatchTooltip(e,g)}},function(){k.pinnedServer||k.HideMatchTooltip(g)})};this.BindBotTooltip=function(e,g){e.unbind("hover");e.unbind("click");e.unbind("dblclick");var k=this;e.click(function(){return false});e.hover(function(){k.UnPinMatchTooltip();k.ShowBotGameInfo(e,g)},function(){k.HideMatchTooltip(-1)})};this.ShowBotGameInfo=function(e,g){var k=b("#lgi_tip");k.length>0&&k.remove();k=g.MAP.toLowerCase().split("/");k=k[k.length-1].split(".");
k=k[0];k=mapdb.maps[k];k=b("<div id='lgi_tip'><div id='lgi_srv_top'></div><div id='lgi_srv_fill'><div id='lgi_srv_bot_content'><h1>"+(k.name||"Unknown")+"</h1><img src='"+quakelive.resource("/images/levelshots/md/"+k.sysname+".jpg")+"' width='112' height='84' /></div></div><div id='lgi_srv_bot'><p style='color: white;'>In Practice Match</p></div></div>");k.appendTo("body");e=this.GetTooltipOffset(e,k,0);k.css("left",e.left+"px");k.css("top",e.top+"px");k.show()};this.JoinServer=function(e){if(quakelive.IsGameRunning()){qz_instance.SendGameCommand("connect "+
e.host_address);quakelive.SendModuleMessage("OnGameUpdated",{isBotGame:false,serverInfo:e})}else join_server(e.host_address,e);this.HideMatchTooltip(-1)}}var o=236;quakelive.matchtip=new c})(jQuery);
(function(b){function c(){this.cache={};this.Add=function(e,g){this.cache[e]={value:g,time:new Date}};this.Get=function(e){if(this.cache[e]){var g=new Date-this.cache[e].time;if(g<3E5)return this.cache[e].value;this.Remove(e)}return null};this.Remove=function(e){this.cache[e].value=undefined;this.cache[e]=undefined}}function o(){this.GetTooltipOffset=function(v,E){var y={},m={left:b(document).scrollLeft(),top:b(document).scrollTop(),right:b(document).scrollLeft()+b("body").width(),bottom:b(document).scrollTop()+
b("body").height(),width:b("body").width(),height:b("body").height()};v={left:v.offset().left,top:v.offset().top,right:v.offset().left+v.innerWidth(),bottom:v.offset().top+v.innerHeight(),width:v.width(),height:v.height()};E={width:E.innerWidth(),height:E.innerHeight()};y.left=v.right+E.width>m.right?v.left-E.width:v.left+v.width;y.top=v.top-E.height/3;if(y.top+E.height>m.bottom)y.top-=y.top+E.height-m.bottom;return y};this.GetVersusFrame=function(v,E,y,m,r){var A=b(quakelive.mod_stats.TPL_MATCH_VSCONTAINER),
J=E.TEAM?E.TEAM.toLowerCase()+"_lg":"lg",N=[E.PLAYER_MODEL||"sarge_default",y&&y.PLAYER_MODEL?y.PLAYER_MODEL:"sarge_default"];E=[E,y];m=[m,r];A.find(".gameTypeIcon").html('<img src="'+quakelive.resource("/images/gametypes/"+J+"/"+v.toLowerCase()+".png")+'" width="75" height="75" />');for(v=0;v<2;++v){y=E[v];var P=m[v];J=N[v];r=v+1;if(y){if(y.TEAM){A.find(".scoreNum"+r).addClass("text_team_"+y.TEAM.toLowerCase()).text(FirstDefined(P.ROUNDS_WON,P.CAPTURES,P.SCORE));J=ChangeModelSkin(J,y.TEAM.toLowerCase());
A.find(".flagNum"+r).hide();A.find(".nameNum"+r).text("Team "+y.TEAM)}else{y.PLAYER_COUNTRY&&A.find(".flagNum"+r).html('<img src="'+quakelive.resource("/images/flags/"+y.PLAYER_COUNTRY.toLowerCase()+".gif")+'" width="16" height="11" />').show();A.find(".nameNum"+r).text(y.PLAYER_NICK);A.find(".scoreNum"+r).text(y.SCORE)}y=quakelive.mod_friends.IsBlocked(y.PLAYER_NICK)?quakelive.PlayerAvatarPath.G_XL:quakelive.PlayerAvatarPath.XL;A.find(".headNum"+r).html('<img src="'+quakelive.resource(y+J+".jpg")+
'" />')}else{A.find(".headNum"+r).html('<img src="'+quakelive.resource("/images/players/icon_xl/none.jpg")+'" width="62" height="62" />');A.find(".scoreNum"+r).text("--");A.find(".flagNum"+r).hide();A.find(".nameNum"+r).text("N/A");A.find(".rankNum"+r).hide();A.find(".noPlayer"+r).show()}}return A};this.DisplayStatsTooltip=function(v,E){var y=b("#stats_tip");if(y.length==0)y=b(quakelive.mod_stats.TPL_MATCH_SUMMARY);var m=b("<div id='stats_srv_content'></div>");if(E){var r=this.TIP_DEFS[E.GAME_TYPE.toUpperCase()];
if(!r)return;var A=[],J=[null,null];if(E.WINNING_TEAM){var N=E.WINNING_TEAM.toUpperCase(),P=E[N+"_SCOREBOARD"];N=E[(N=="RED"?"BLUE":"RED")+"_SCOREBOARD"];A[0]=P[0];A[1]=N[0];if(E.WINNING_TEAM==E.TEAM_SCOREBOARD[0].TEAM){J[0]=E.TEAM_SCOREBOARD[0];J[1]=E.TEAM_SCOREBOARD[1]}else{J[0]=E.TEAM_SCOREBOARD[1];J[1]=E.TEAM_SCOREBOARD[0]}winner=E.WINNING_TEAM}else{A[0]=E.SCOREBOARD[0];A[1]=E.SCOREBOARD[1];winner=A[0]}y.find("#stats_datacontainer").empty().append(this.GetVersusFrame(E.GAME_TYPE,A[0],A[1],J[0],
J[1])).append(quakelive.mod_stats.TPL_MATCH_SUMMARY_INNER);y.find("#match_mapshot").html('<img alt="" src="'+quakelive.resource("/images/levelshots/md/"+E.MAP_NAME_SHORT+".jpg")+'" width="112" height="84" class="placeImg" />');N='<span class="grayNameTxt">'+E.MAP_NAME+"</span><br />";N+='<span class="Norm11px"><b>Game Type:</b> '+this.FormatGameType(E)+"</span><br />";N+='<span class="Norm11px"><b>Date:</b> '+E.GAME_TIMESTAMP_NICE+" ago</span><br />";N+='<span class="Norm11px"><b>Winner:</b> ';N+=
E.WINNING_TEAM?E.WINNING_TEAM:E.SCOREBOARD[0].PLAYER_NICK;N+="</span><br />";N+='<span class="Norm11px"><b>Duration:</b> '+E.GAME_LENGTH_NICE+"</span><br />";y.find("#match_maindata").html(N);for(J=A=0;J<r.length;++J){P=r[J];if(E[P.key]){N=A++%2==0?"lghtgrayBG":"drkgrayBG";N='<div class="'+N+"\"><div class='leftCol'>"+P.name+"</div>";N+="<div class='midCol'>";N+="<img src='"+quakelive.resource("/images/flags/"+E[P.key].PLAYER_COUNTRY.toLowerCase()+".gif")+"' width='16' height='11' class='tipPlayerFlag fl' />";
var D=E[P.key].PLAYER_MODEL;if(E[P.key].PLAYER_TEAM)D=ChangeModelSkin(D,E[P.key].PLAYER_TEAM.toLowerCase());var I;I=quakelive.mod_friends.IsBlocked(E[P.key].PLAYER_NICK)?quakelive.PlayerAvatarPath.G_SM:quakelive.PlayerAvatarPath.SM;N+="<img src='"+quakelive.resource(I+D+".jpg")+"' width='18' height='18' class='tipPlayerIcon fl' />";N+=E[P.key].PLAYER_NICK;N+="</div>";N+="<div class='rightCol'>"+(P.fmt?P.fmt(E[P.key].NUM,E):E[P.key].NUM)+"</div>";N+="<div class='cl'></div></div>";y.find(".match_highlights").append(N)}}N=
A++%2==0?"lghtgrayBG":"drkgrayBG";y.find(".match_highlights").append('<div class="'+N+'"></div>')}y.find("#stats_srv_fill").append(m);y.css("left","0px");y.css("top","0px");y.appendTo("body");v=this.GetTooltipOffset(v,y);y.css("left",v.left+"px");y.css("top",v.top+"px");y.show();return y};this.HideStatsTooltip=function(){this.loading_public_id=0;b("#stats_tip").remove().hide();b("#stats_cli").remove().hide()};this.OnHoverStatsTooltip_Success=function(v,E,y,m){return this.DisplayStatsTooltip(v,m)};
this.OnHoverStatsTooltip_Error=function(){b("#stats_datacontainer").html('<div class="error">The match you have requested is invalid or has expired.</div>')};var e={NONE:0,SWITCHED:1,QUIT:2};this.ProcessMatchData=function(v){var E=["SCOREBOARD","RED_SCOREBOARD","BLUE_SCOREBOARD"],y={};for(var m in E){var r=E[m];y[r]||(y[r]={});for(var A in v[r]){var J=v[r][A];if(typeof J.PLAYER_NICK!="string")J.PLAYER_NICK=""+J.PLAYER_NICK;y[r][J.PLAYER_NICK]=true}}for(m in E){r=E[m];var N=r+"_QUITTERS";if(typeof v[N]!=
"undefined"){var P=1,D=[],I={};for(A in v[N]){J=v[N][A];if(typeof J.PLAYER_NICK!="string")J.PLAYER_NICK=""+J.PLAYER_NICK;for(var R in J){if(typeof I[R]=="undefined")I[R]=0;try{var H=parseInt(J[R]);if(typeof H=="number")I[R]+=H}catch(L){}}J.QUITTERS_SUM=false;if(J.RANK=="Q"){var f=null;if(r=="RED_SCOREBOARD")f="BLUE_SCOREBOARD";else if(r=="BLUE_SCOREBOARD")f="RED_SCOREBOARD";J.QUIT_STATUS=f&&y[f][J.PLAYER_NICK]?e.SWITCHED:e.QUIT}else J.QUIT_STATUS=e.NONE;D[P++]=J}I.QUITTERS_SUM=true;if(typeof J.TEAM!=
"undefined"){I.TEAM_RANK="Q";I.TEAM=J.TEAM}I.PLAYER_COUNTRY="";I.PLAYER_MODEL="";I.PLAYER_NICK="";r=v[N].length;for(var t in u){P=u[t];if(typeof I[P]!="undefined")try{I[P]=Math.round(I[P]/r)}catch(C){}}D[0]=I;D.sort(function(G,M){if(G.QUITTERS_SUM||M.QUITTERS_SUM)return G.QUITTERS_SUM===true&&M.QUITTERS_SUM===false?-1:G.QUITTERS_SUM===false&&M.QUITTERS_SUM===true?1:0;if(G.QUIT_STATUS<M.QUIT_STATUS)return-1;else if(G.QUIT_STATUS>M.QUIT_STATUS)return 1;else{G=G.PLAYER_NICK.toLowerCase();M=M.PLAYER_NICK.toLowerCase();
return G<M?-1:G>M?1:0}});v[N]=D}}};this.loading_public_id=0;var g=250;this.OnHoverStatsTooltip=function(v,E,y){this.DisplayStatsTooltip(v,null);this.loading_public_id=E;var m=d.Get(E);if(m){var r=this.OnHoverStatsTooltip_Success(v,E,y,m.json);m.tip=r;r.show();this.loading_public_id=0}else{var A=this;setTimeout(function(){A.loading_public_id==E&&b.ajax({url:"/stats/matchdetails/"+E+"/"+y,dataType:"json",mode:"abort",port:"statstip",cache:true,success:function(J){A.ProcessMatchData(J);if(E==A.loading_public_id){var N=
A.OnHoverStatsTooltip_Success(v,E,y,J);N.show()}J={json:J,tip:null};d.Add(E,J);A.loading_public_id=0},error:A.OnHoverStatsTooltip_Error})},g)}};this.FormatProfileLink=function(v,E){var y="";if(E.QUITTERS_SUM)y+="<b>Switched / Quit</b>";else{var m=E.PLAYER_MODEL;if(E.TEAM)m=ChangeModelSkin(E.PLAYER_MODEL,E.TEAM.toLowerCase());var r;r=quakelive.mod_friends.IsBlocked(E.PLAYER_NICK)||E.QUIT_STATUS==e.QUIT?quakelive.PlayerAvatarPath.G_SM:quakelive.PlayerAvatarPath.SM;y+="<img src='"+quakelive.resource("/images/flags/"+
E.PLAYER_COUNTRY.toLowerCase()+".gif")+"' width='16' height='11' class='boardPlayerFlag' />";y+="<img src='"+quakelive.resource(r+m+".jpg")+"' width='18' height='18' class='boardPlayerIcon' />";y+='<a href="javascript:;" onclick="quakelive.Goto(\'profile/summary/'+v+'\'); return false" style="color: black">'+v+"</a>"}return y};this.ToggleQuitters=function(){var v=b(this).find("a.QuittersToggleBtn");v.toggleClass("QuittersToggledBtn");b("."+v.attr("data")).toggle()};this.FormatRank=function(v,E){if(E.QUITTERS_SUM){v=
(E.TEAM?E.TEAM:"")+"Quitters";return'<a href="javascript:;" data="'+v+'" class="QuittersToggleBtn"></a>'}if(E.QUIT_STATUS)return E.QUIT_STATUS==e.SWITCHED?'<img src="'+quakelive.resource("/images/switch_arrow_2.png")+'" width="16" height="16" title="Switched Teams" />':"Quit";if(typeof v=="string"&&v.charAt(0)=="Q"||v==-1)return"--";return FormatRank(v)};this.FormatWeaponNumber=function(v){return v==0||v=="N/A"?"--":v};this.FormatTime=function(v){return FormatDuration(v)};this.FormatPercent=function(v){return v!=
0&&v!="N/A"?v+"%":"--"};var k=[{field:"TEAM_RANK",title:"Rank",extraClass:"tc",fmt:this.FormatRank},{field:"PLAYER_NICK",title:"Player",extraClass:"tl",fmt:this.FormatProfileLink},{field:"CAPTURES",title:"Caps",extraClass:"tc",fmt:this.FormatWeaponNumber,alt:"Flag Captures"},{field:"DEFENDS",title:"Defd",extraClass:"tc",fmt:this.FormatWeaponNumber,alt:"Flag Defends"},{field:"ASSISTS",title:"Assts",extraClass:"tc",fmt:this.FormatWeaponNumber,alt:"Flag Assists"},{field:"ROUNDS_WON",title:"Rounds Won",
extraClass:"tc",fmt:null},{field:"SCORE",title:"Score",extraClass:"tc",fmt:null},{field:"KILLS",title:"Frags",extraClass:"tc",fmt:null},{field:"DEATHS",title:"Deaths",extraClass:"tc",fmt:null},{field:"ACCURACY",title:"Acc",extraClass:"tc",fmt:this.FormatPercent,alt:"Accuracy"},{field:"MIN",title:"Time",extraClas:"tc",fmt:this.FormatTime},{field:"EXCELLENT",title:"Exc",extraClass:"tc",fmt:this.FormatWeaponNumber,alt:'"Excellent" medals',optional:true},{field:"IMPRESSIVE",title:"Imp",extraClass:"tc",
fmt:this.FormatWeaponNumber,alt:'"Impressive" medals',optional:true},{field:"HUMILIATION",title:"Hum",extraClass:"tc",fmt:this.FormatWeaponNumber,alt:'"Humiliation" medals',optional:true}],l=[{field:"RANK",title:"Rank",extraClass:"tc",fmt:this.FormatRank},{field:"PLAYER_NICK",title:"Player",extraClass:"tl",fmt:this.FormatProfileLink},{field:"GT",title:"GT",extraClass:"tc",fmt:this.FormatWeaponNumber,alt:"Gauntlet"},{field:"MG",title:"MG",extraClass:"tc",fmt:this.FormatWeaponNumber,alt:"Machine Gun"},
{field:"SG",title:"SG",extraClass:"tc",fmt:this.FormatWeaponNumber,alt:"Shot Gun"},{field:"GL",title:"GL",extraClass:"tc",fmt:this.FormatWeaponNumber,alt:"Grenade Launcher"},{field:"LG",title:"LG",extraClass:"tc",fmt:this.FormatWeaponNumber,alt:"Lightning Gun"},{field:"RL",title:"RL",extraClass:"tc",fmt:this.FormatWeaponNumber,alt:"Rocket Launcher"},{field:"RG",title:"RG",extraClass:"tc",fmt:this.FormatWeaponNumber,alt:"Rail Gun"},{field:"PG",title:"PG",extraClas:"tc",fmt:this.FormatWeaponNumber,
alt:"Plasma Gun"},{field:"BFG",title:"BFG",extraClass:"tc",fmt:this.FormatWeaponNumber,alt:"BFG"},{field:"CG",title:"CG",extraClass:"tc",fmt:this.FormatWeaponNumber,alt:"Chain Gun"},{field:"NG",title:"NG",extraClass:"tc",fmt:this.FormatWeaponNumber,alt:"Nail Gun"},{field:"PM",title:"PL",extraClass:"tc",fmt:this.FormatWeaponNumber,alt:"Prox Launcher"}],n=[{field:"TEAM_RANK",title:"Rank",extraClass:"tc",fmt:this.FormatRank},{field:"PLAYER_NICK",title:"Player",extraClass:"tl",fmt:this.FormatProfileLink},
{field:"GT",title:"GT",extraClass:"tc",fmt:this.FormatWeaponNumber,alt:"Gauntlet"},{field:"MG",title:"MG",extraClass:"tc",fmt:this.FormatWeaponNumber,alt:"Machine Gun"},{field:"SG",title:"SG",extraClass:"tc",fmt:this.FormatWeaponNumber,alt:"Shot Gun"},{field:"GL",title:"GL",extraClass:"tc",fmt:this.FormatWeaponNumber,alt:"Grenade Launcher"},{field:"LG",title:"LG",extraClass:"tc",fmt:this.FormatWeaponNumber,alt:"Lightning Gun"},{field:"RL",title:"RL",extraClass:"tc",fmt:this.FormatWeaponNumber,alt:"Rocket Launcher"},
{field:"RG",title:"RG",extraClass:"tc",fmt:this.FormatWeaponNumber,alt:"Rail Gun"},{field:"PG",title:"PG",extraClas:"tc",fmt:this.FormatWeaponNumber,alt:"Plasma Gun"},{field:"BFG",title:"BFG",extraClass:"tc",fmt:this.FormatWeaponNumber,alt:"BFG"},{field:"CG",title:"CG",extraClass:"tc",fmt:this.FormatWeaponNumber,alt:"Chain Gun"},{field:"NG",title:"NG",extraClass:"tc",fmt:this.FormatWeaponNumber,alt:"Nail Gun"},{field:"PM",title:"PL",extraClass:"tc",fmt:this.FormatWeaponNumber,alt:"Prox Launcher"}],
q=[{field:"TEAM",title:"Team",extraClass:"tl",fmt:null},{field:"GT",title:"GT",extraClass:"tc",fmt:this.FormatWeaponNumber,alt:"Gauntlet"},{field:"MG",title:"MG",extraClass:"tc",fmt:this.FormatWeaponNumber,alt:"Machine Gun"},{field:"SG",title:"SG",extraClass:"tc",fmt:this.FormatWeaponNumber,alt:"Shot Gun"},{field:"GL",title:"GL",extraClass:"tc",fmt:this.FormatWeaponNumber,alt:"Grenade Launcher"},{field:"LG",title:"LG",extraClass:"tc",fmt:this.FormatWeaponNumber,alt:"Lightning Gun"},{field:"RL",title:"RL",
extraClass:"tc",fmt:this.FormatWeaponNumber,alt:"Rocket Launcher"},{field:"RG",title:"RG",extraClass:"tc",fmt:this.FormatWeaponNumber,alt:"Rail Gun"},{field:"PG",title:"PG",extraClas:"tc",fmt:this.FormatWeaponNumber,alt:"Plasma Gun"},{field:"BFG",title:"BFG",extraClass:"tc",fmt:this.FormatWeaponNumber,alt:"BFG"},{field:"CG",title:"CG",extraClass:"tc",fmt:this.FormatWeaponNumber,alt:"Chain Gun"},{field:"NG",title:"NG",extraClass:"tc",fmt:this.FormatWeaponNumber,alt:"Nail Gun"},{field:"PM",title:"PL",
extraClass:"tc",fmt:this.FormatWeaponNumber,alt:"Prox Launcher"}],u=["GT_A","MG_A","SG_A","GL_A","LG_A","RL_A","RG_A","PG_A","BFG_A","CG_A","NG_A","PM_A","ACCURACY"],B=[{field:"RANK",title:"Rank",extraClass:"tc",fmt:this.FormatRank},{field:"PLAYER_NICK",title:"Player",extraClass:"tl",fmt:this.FormatProfileLink},{field:"GT_A",title:"GT",extraClass:"tc",fmt:this.FormatPercent,alt:"Gauntlet"},{field:"MG_A",title:"MG",extraClass:"tc",fmt:this.FormatPercent,alt:"Machine Gun"},{field:"SG_A",title:"SG",
extraClass:"tc",fmt:this.FormatPercent,alt:"Shot Gun"},{field:"GL_A",title:"GL",extraClass:"tc",fmt:this.FormatPercent,alt:"Grenade Launcher"},{field:"LG_A",title:"LG",extraClass:"tc",fmt:this.FormatPercent,alt:"Lightning Gun"},{field:"RL_A",title:"RL",extraClass:"tc",fmt:this.FormatPercent,alt:"Rocket Launcher"},{field:"RG_A",title:"RG",extraClass:"tc",fmt:this.FormatPercent,alt:"Rail Gun"},{field:"PG_A",title:"PG",extraClas:"tc",fmt:this.FormatPercent,alt:"Plasma Gun"},{field:"BFG_A",title:"BFG",
extraClass:"tc",fmt:this.FormatPercent,alt:"BFG"},{field:"CG_A",title:"CG",extraClass:"tc",fmt:this.FormatPercent,alt:"Chain Gun"},{field:"NG_A",title:"NG",extraClass:"tc",fmt:this.FormatPercent,alt:"Nail Gun"},{field:"PM_A",title:"PL",extraClass:"tc",fmt:this.FormatPercent,alt:"Prox Launcher"}],x=[{field:"TEAM_RANK",title:"Rank",extraClass:"tc",fmt:this.FormatRank},{field:"PLAYER_NICK",title:"Player",extraClass:"tl",fmt:this.FormatProfileLink},{field:"GT_A",title:"GT",extraClass:"tc",fmt:this.FormatPercent,
alt:"Gauntlet"},{field:"MG_A",title:"MG",extraClass:"tc",fmt:this.FormatPercent,alt:"Machine Gun"},{field:"SG_A",title:"SG",extraClass:"tc",fmt:this.FormatPercent,alt:"Shot Gun"},{field:"GL_A",title:"GL",extraClass:"tc",fmt:this.FormatPercent,alt:"Grenade Launcher"},{field:"LG_A",title:"LG",extraClass:"tc",fmt:this.FormatPercent,alt:"Lightning Gun"},{field:"RL_A",title:"RL",extraClass:"tc",fmt:this.FormatPercent,alt:"Rocket Launcher"},{field:"RG_A",title:"RG",extraClass:"tc",fmt:this.FormatPercent,
alt:"Rail Gun"},{field:"PG_A",title:"PG",extraClas:"tc",fmt:this.FormatPercent,alt:"Plasma Gun"},{field:"BFG_A",title:"BFG",extraClass:"tc",fmt:this.FormatPercent,alt:"BFG"},{field:"CG_A",title:"CG",extraClass:"tc",fmt:this.FormatPercent,alt:"Chain Gun"},{field:"NG_A",title:"NG",extraClass:"tc",fmt:this.FormatPercent,alt:"Nail Gun"},{field:"PM_A",title:"PL",extraClass:"tc",fmt:this.FormatPercent,alt:"Prox Launcher"}],p=[{field:"TEAM",title:"Team",extraClass:"tl",fmt:null},{field:"GT_A",title:"GT",
extraClass:"tc",fmt:this.FormatPercent,alt:"Gauntlet"},{field:"MG_A",title:"MG",extraClass:"tc",fmt:this.FormatPercent,alt:"Machine Gun"},{field:"SG_A",title:"SG",extraClass:"tc",fmt:this.FormatPercent,alt:"Shot Gun"},{field:"GL_A",title:"GL",extraClass:"tc",fmt:this.FormatPercent,alt:"Grenade Launcher"},{field:"LG_A",title:"LG",extraClass:"tc",fmt:this.FormatPercent,alt:"Lightning Gun"},{field:"RL_A",title:"RL",extraClass:"tc",fmt:this.FormatPercent,alt:"Rocket Launcher"},{field:"RG_A",title:"RG",
extraClass:"tc",fmt:this.FormatPercent,alt:"Rail Gun"},{field:"PG_A",title:"PG",extraClas:"tc",fmt:this.FormatPercent,alt:"Plasma Gun"},{field:"BFG_A",title:"BFG",extraClass:"tc",fmt:this.FormatPercent,alt:"BFG"},{field:"CG_A",title:"CG",extraClass:"tc",fmt:this.FormatPercent,alt:"Chain Gun"},{field:"NG_A",title:"NG",extraClass:"tc",fmt:this.FormatPercent,alt:"Nail Gun"},{field:"PM_A",title:"PL",extraClass:"tc",fmt:this.FormatPercent,alt:"Prox Launcher"}];this.BOARD_DEFS=[{index:"SCOREBOARD",type:"normal",
fields:[{field:"RANK",title:"Rank",extraClass:"tc",fmt:this.FormatRank},{field:"PLAYER_NICK",title:"Player",extraClass:"tl",fmt:this.FormatProfileLink},{field:"SCORE",title:"Score",extraClass:"tc",fmt:null},{field:"KILLS",title:"Frags",extraClass:"tc",fmt:null},{field:"DEATHS",title:"Deaths",extraClass:"tc",fmt:null},{field:"ACCURACY",title:"Acc",extraClass:"tc",fmt:this.FormatPercent,alt:"Accuracy"},{field:"MIN",title:"Time",extraClas:"tc",fmt:this.FormatTime},{field:"EXCELLENT",title:"Exc",extraClass:"tc",
fmt:this.FormatWeaponNumber,alt:'"Excellent" medals',optional:true},{field:"IMPRESSIVE",title:"Imp",extraClass:"tc",fmt:this.FormatWeaponNumber,alt:'"Impressive" medals',optional:true},{field:"HUMILIATION",title:"Hum",extraClass:"tc",fmt:this.FormatWeaponNumber,alt:'"Humiliation" medals',optional:true}],weaponFields:l,weaponAccFields:B,fieldOptions:null},{index:"SCOREBOARD_QUITTERS",type:"normal",fields:[{field:"RANK",title:"Rank",extraClass:"tc",fmt:this.FormatRank},{field:"PLAYER_NICK",title:"Player",
extraClass:"tl",fmt:this.FormatProfileLink},{field:"SCORE",title:"Score",extraClass:"tc",fmt:null},{field:"KILLS",title:"Frags",extraClass:"tc",fmt:null},{field:"DEATHS",title:"Deaths",extraClass:"tc",fmt:null},{field:"ACCURACY",title:"Acc",extraClass:"tc",fmt:this.FormatPercent,alt:"Accuracy"},{field:"MIN",title:"Time",extraClas:"tc",fmt:this.FormatTime},{field:"EXCELLENT",title:"Exc",extraClass:"tc",fmt:this.FormatWeaponNumber,alt:'"Excellent" medals',optional:true},{field:"IMPRESSIVE",title:"Imp",
extraClass:"tc",fmt:this.FormatWeaponNumber,alt:'"Impressive" medals',optional:true},{field:"HUMILIATION",title:"Hum",extraClass:"tc",fmt:this.FormatWeaponNumber,alt:'"Humiliation" medals',optional:true}],weaponFields:l,weaponAccFields:B,fieldOptions:{quitters_summary:true,board_class:"SCOREBOARD"}},{index:"TEAM_SCOREBOARD",type:"team",fields:[{field:"TEAM",title:"Team",extraClass:"tl",fmt:null},{field:"CAPTURES",title:"Caps",extraClass:"tc",fmt:this.FormatWeaponNumber,alt:"Flag Captures"},{field:"DEFENDS",
title:"Defs",extraClass:"tc",fmt:this.FormatWeaponNumber,alt:"Flag Defends"},{field:"ASSISTS",title:"Assts",extraClass:"tc",fmt:this.FormatWeaponNumber,alt:"Flag Assists"},{field:"ROUNDS_WON",title:"Rounds",extraClass:"tc",fmt:null,alt:"Rounds Won"},{field:"SCORE",title:"Score",extraClass:"tc",fmt:null},{field:"KILLS",title:"Frags",extraClass:"tc",fmt:null},{field:"DEATHS",title:"Deaths",extraClass:"tc",fmt:null},{field:"ACCURACY",title:"Acc",extraClass:"tc",fmt:this.FormatPercent,alt:"Accuracy"},
{field:"EXCELLENT",title:"Exc",extraClass:"tc",fmt:this.FormatWeaponNumber,alt:'"Excellent" medals',optional:true},{field:"IMPRESSIVE",title:"Imp",extraClass:"tc",fmt:this.FormatWeaponNumber,alt:'"Impressive" medals',optional:true},{field:"HUMILIATION",title:"Hum",extraClass:"tc",fmt:this.FormatWeaponNumber,alt:'"Humiliation" medals',optional:true}],weaponFields:q,weaponAccFields:p,fieldOptions:null},{index:"RED_SCOREBOARD",type:"red",fields:k,weaponFields:n,weaponAccFields:x,fieldOptions:null,weaponFieldOptions:{class_prefix:"WP_"}},
{index:"RED_SCOREBOARD_QUITTERS",type:"red",fields:k,weaponFields:n,weaponAccFields:x,fieldOptions:{board_type:"red",board_class:"RED_SCOREBOARD",quitters_summary:true}},{index:"BLUE_SCOREBOARD",type:"blue",fields:k,weaponFields:n,weaponAccFields:x,fieldOptions:null},{index:"BLUE_SCOREBOARD_QUITTERS",type:"blue",fields:k,weaponFields:n,weaponAccFields:x,fieldOptions:{board_type:"blue",board_class:"BLUE_SCOREBOARD",quitters_summary:true}}];this.TIP_DEFS={DM:[{name:"Most Frags",key:"MOST_FRAGS",fmt:null},
{name:"Least Deaths",key:"LEAST_DEATHS",fmt:null},{name:"Most Deaths",key:"MOST_DEATHS",fmt:null},{name:"Damage Delivered",key:"DMG_DELIVERED",fmt:null},{name:"Damage Taken",key:"DMG_TAKEN",fmt:null},{name:"Most Accurate",key:"MOST_ACCURATE",fmt:this.FormatPercent}],CTF:[{name:"Least Deaths",key:"LEAST_DEATHS",fmt:null},{name:"Most Assists",key:"MOST_ASSISTS",fmt:null},{name:"Most Captures",key:"MOST_CAPTURES",fmt:null},{name:"Most Defends",key:"MOST_DEFENDS",fmt:null},{name:"Most Kills",key:"MOST_KILLS",
fmt:null}],TDM:[{name:"Most Frags",key:"MOST_FRAGS",fmt:null},{name:"Least Deaths",key:"LEAST_DEATHS",fmt:null},{name:"Most Deaths",key:"MOST_DEATHS",fmt:null},{name:"Damage Delivered",key:"DMG_DELIVERED",fmt:null},{name:"Damage Taken",key:"DMG_TAKEN",fmt:null},{name:"Most Accurate",key:"MOST_ACCURATE",fmt:this.FormatPercent}],CA:[{name:"Least Deaths",key:"LEAST_DEATHS",fmt:null},{name:"Most Deaths",key:"MOST_DEATHS",fmt:null},{name:"Damage Delivered",key:"DMG_DELIVERED",fmt:null},{name:"Damage Taken",
key:"DMG_TAKEN",fmt:null},{name:"Most Accurate",key:"MOST_ACCURATE",fmt:this.FormatPercent}],TOURNEY:[{name:"Most Frags",key:"MOST_FRAGS",fmt:null},{name:"Least Deaths",key:"LEAST_DEATHS",fmt:null},{name:"Most Deaths",key:"MOST_DEATHS",fmt:null},{name:"Damage Delivered",key:"DMG_DELIVERED",fmt:null},{name:"Damage Taken",key:"DMG_TAKEN",fmt:null},{name:"Most Accurate",key:"MOST_ACCURATE",fmt:this.FormatPercent}]};this.OnShowStatsDetails_Error=function(){b("#match_gametype").html("Unable to load match");
b("#stats_datacontainer").html('<div class="error">The match you have requested is invalid or has expired.</div>')};this.OnShowStatsDetails_Success=function(v,E,y,m){b("#stats_datacontainer").html(quakelive.mod_stats.TPL_MATCH_DETAILS_INNER);E=[];y=[null,null];if(m.WINNING_TEAM){var r=m.WINNING_TEAM.toUpperCase(),A=m.WINNING_TEAM!="NA"?m[r+"_SCOREBOARD"]:m.RED_SCOREBOARD;r=m.WINNING_TEAM!="NA"?m[(r=="RED"?"BLUE":"RED")+"_SCOREBOARD"]:m.BLUE_SCOREBOARD;E[0]=A[0];E[1]=r[0];if(m.WINNING_TEAM==m.TEAM_SCOREBOARD[0].TEAM){y[0]=
m.TEAM_SCOREBOARD[0];y[1]=m.TEAM_SCOREBOARD[1]}else{y[0]=m.TEAM_SCOREBOARD[1];y[1]=m.TEAM_SCOREBOARD[0]}winner=m.WINNING_TEAM}else{E[0]=m.SCOREBOARD[0];E[1]=m.SCOREBOARD[1];winner=E[0]}v.find("#match_vscontainer").empty().append(this.GetVersusFrame(m.GAME_TYPE,E[0],E[1],y[0],y[1]));v.find("#match_gametype").html(this.FormatGameType(m));v.find("#match_mapshot").html('<img alt="" src="'+quakelive.resource("/images/levelshots/md/"+m.MAP_NAME_SHORT+".jpg")+'" width="112" height="84" class="placeImg" />');
E='<span class="grayNameTxt">'+m.MAP_NAME+"</span><br />";E+='<span class="Norm11px"><b>Date:</b> '+m.GAME_TIMESTAMP_NICE+" ago</span><br />";E+='<span class="Norm11px"><b>Winner:</b> ';E+=m.WINNING_TEAM?m.WINNING_TEAM:m.SCOREBOARD[0].PLAYER_NICK;E+="</span><br />";E+='<span class="Norm11px"><b>Duration:</b> '+m.GAME_LENGTH_NICE+"</span><br />";v.find("#match_maindata").html(E);E=v.find(".match_scoreboard").empty();y=v.find(".match_weapons").empty();A=v.find(".match_weaponaccuracy").empty();r=0;var J=
["SCOREBOARD","TEAM_SCOREBOARD"];if(m.WINNING_TEAM)if(m.WINNING_TEAM.toLowerCase()=="red"){J[J.length]="RED_SCOREBOARD";J[J.length]="BLUE_SCOREBOARD"}else{J[J.length]="BLUE_SCOREBOARD";J[J.length]="RED_SCOREBOARD"}for(var N in J)for(var P=J[N],D=0;D<this.BOARD_DEFS.length;++D){var I=this.BOARD_DEFS[D];if(m[I.index]&&I.index==P){if(r++>0){E.append("<br />");y.append("<br />");A.append("<br />")}E.append(this.GetScoreboard(m,I));y.append(this.GetWeaponDetails(m,I));A.append(this.GetWeaponAccuracyDetails(m,
I));if(I.index=="RED_SCOREBOARD"||I.index=="BLUE_SCOREBOARD"||I.index=="SCOREBOARD"){P=I.index+"_QUITTERS";if(m[P]){D=this.BOARD_DEFS[D+1];E.append(this.GetScoreboard(m,D));y.append(this.GetWeaponDetails(m,D));A.append(this.GetWeaponAccuracyDetails(m,D))}}break}}b.tablesorter.addParser({id:"names",is:function(){return false},format:function(L){return L=(L=b(L)[2])?L.innerHTML.toLowerCase():"-"},type:"text"});b.tablesorter.addParser({id:"int",is:function(L){return L.split(":").length!==2},format:function(L){return b.tablesorter.formatInt(L)},
type:"numeric"});b.tablesorter.addParser({id:"time",is:function(L){return L.split(":").length===2},format:function(L){L=L.split(":");return L[0]*60+L[1]}});b.tablesorter.defaults.sortList=[[0,0]];b.tablesorter.defaults.widgets=["zebra"];b.tablesorter.defaults.widgetZebra={css:["normalZebraOff","normalZebraOn"]};b.tablesorter.defaults.cssHeader="";b.tablesorter.defaults.headers={1:{sorter:"names"},2:{sorter:"numeric"},3:{sorter:"numeric"},4:{sorter:"numeric"},5:{sorter:"numeric"},6:{sorter:"numeric"},
7:{sorter:"numeric"},8:{sorter:"numeric"},9:{sorter:"numeric"},10:{sorter:"numeric"},11:{sorter:"numeric"},12:{sorter:"numeric"},13:{sorter:"numeric"}};b("div#stats_datacontainer table:not(.teamBG, .quitterstable_normal, .quitterstable_red, .quitterstable_blue)").tablesorter();b("table.teamBG").tablesorter({sortList:[[1,0]],headers:{0:{sorter:"text"},1:{sorter:"numeric"}}});N=b(".quitterstable_normal, .quitterstable_red, .quitterstable_blue");N.find("tbody tr:even").addClass("normalZebraOff");N.find("tbody tr:odd").addClass("normalZebraOn");
N.find("thead tr").click(this.ToggleQuitters);N=".match_scoreboard > .board_blue > table,.match_scoreboard > .board_red > table,.match_scoreboard > .board_team > table,.match_scoreboard > .board_normal > table,.match_weaponaccuracy > .board_normal > table,.match_weaponaccuracy > .board_team > table,.match_weaponaccuracy > .board_blue > table,.match_weaponaccuracy > .board_red > table";b(N).each(function(L,f){L=[];var t=[];f=f.rows;for(var C=0;C<f.length;C++)for(var G=f[C].getElementsByTagName("td"),
M=0;M<G.length;M++){if(L[M]===undefined)L[M]=[];var Q=G[M].className;if(!/(SCOREBOARD_TEAM_RANK|SCOREBOARD_PLAYER_NICK|SCOREBOARD_MIN|SCOREBOARD_RANK)/.test(Q)){var T=parseInt(G[M].innerHTML);if(Q=/(SCOREBOARD_DEATHS)/.test(Q)?!isNaN(T)&&(T<t[M]||t[M]==undefined):!isNaN(T)&&(T>t[M]||t[M]==undefined)){L[M]=[G[M]];t[M]=T}else T==t[M]&&L[M].push(G[M])}}for(C=0;C<L.length;C++)for(M=0;M<L[C].length;M++)b(L[C][M]).addClass("maxTableValue")});var R=quakelive.siteConfig.baseUrl+"/r/"+window.location.hash.substr(1);
N="QUAKE LIVE Game Details\n\n";E="Check out the details of this QUAKE LIVE game here:\n\n"+quakelive.siteConfig.baseUrl+"/"+window.location.hash+"\n\nArena: "+m.MAP_NAME+"\nGame type: "+this.FormatGameType(m)+"\nDate played: "+m.GAME_TIMESTAMP+"\n\nNote: This link will expire at "+m.GAME_EXPIRES_FULL+"\n\nQUAKE LIVE is a totally FREE online multiplayer game from id Software, the makers of DOOM and QUAKE.  Easily play against friends or others at your skill level in more than 30 arenas and 5 exciting game modes. Check us out at www.quakelive.com.\n";
N=N.replace(/ /g,"%20");E=E.replace(/ /g,"%20").replace(/\n/g,"%0D").replace(/#/g,"%23");v.find(".share_email").attr("href","mailto:?subject="+N+"&body="+E);var H=this;v.find(".share_link").click(function(){qlPrompt({title:"Link to this match",body:"Copy and paste the below URL to link to this match.<br/><br/><b>Arena:</b> "+m.MAP_NAME+"<br/><b>Game type:</b> "+H.FormatGameType(m)+"<br/><b>Date played:</b> "+m.GAME_TIMESTAMP+"<br/><br/><center>This link will expire at "+m.GAME_EXPIRES_FULL+"</center>",
input:true,inputLabel:R,inputReadOnly:true,alert:true})});if(addthis){N=b("<a class='addthis_button' href='http://www.addthis.com/bookmark.php?v=250&pub=idsoftware'><img src='"+quakelive.resource("/images/share_button.gif")+"' width='67' height='15' alt='Bookmark and Share' style='border:0'/></a>");E={url:R,title:"Quake Live Match - "+this.FormatGameType(m)+" on "+m.MAP_NAME,templates:{twitter:quakelive.mod_profile&&quakelive.mod_profile.activeProfileName?"@quakelive Check out this "+this.FormatGameTypeShort(m)+
" match on "+m.MAP_NAME+" that "+quakelive.mod_profile.activeProfileName+" played at Quake Live! {{url}} #QLmatch":"@quakelive Check out this "+this.FormatGameTypeShort(m)+" match on "+m.MAP_NAME+" at Quake Live! {{url}} #QLmatch"}};addthis.button(N.get(),addthis_config,E);v.find(".addthis_container").empty().append(N)}this.ShowVerts(v)};this.GetHtmlForFields=function(v,E,y,m){m=b.extend({},{board_data:null,board_type:E.type,board_class:E.index,show_optional:true},m);if(m.class_prefix)m.board_class=
m.class_prefix+m.board_class;v=m.board_data||v[E.index];var r=m.quitters_summary?"":"board_"+m.board_type;r="<div class='"+r+"'>";if(m.quitters_summary)r+="<table class='quitterstable_"+m.board_type+"'><thead>";else{r+="<table class='"+m.board_type+"BG'>";r+="<thead><tr>";for(var A in y){var J=y[A];if(typeof v[0][J.field]!="undefined")if(!(J.optional&&m.show_optional==false)){r+="<th class='"+m.board_class+"_"+J.field+" "+J.extraClass+"'";if(J.alt)r+=' title="'+J.alt+'"';r+=">"+J.title+"</th>"}}r+=
"</tr></thead>"}for(var N=0;N<v.length;N++){var P=v[N];r+="<tr class='";if(m.quitters_summary&&!P.QUITTERS_SUM)r+=" "+(P.TEAM?P.TEAM:"")+"Quitters";r+="'";if(m.quitters_summary&&!P.QUITTERS_SUM)r+=" style='display: none'";r+=">";for(A in y){J=y[A];if(!(J.optional&&m.show_optional==false))if(typeof P[J.field]!="undefined"){var D=P[J.field];if(J.fmt)D=J.fmt(D,P,E);if(typeof D=="undefined"||typeof D=="NaN")D="";var I=P.QUITTERS_SUM?"th":"td";r+="<"+I+" class='"+m.board_class+"_"+J.field+" "+J.extraClass+
"'>"+D+"</+"+I+">"}}r+="</tr>";if(P.QUITTERS_SUM)r+="</thead>"}r+="</table>";return r};this.GetScoreboard=function(v,E,y){y=b.extend({},E.fieldOptions,y);return this.GetHtmlForFields(v,E,E.fields,y)};this.GetWeaponDetails=function(v,E,y){y=b.extend({},E.fieldOptions,{class_prefix:"WP_"},y);return this.GetHtmlForFields(v,E,E.weaponFields,y)};this.GetWeaponAccuracyDetails=function(v,E,y){y=b.extend({},E.fieldOptions,{class_prefix:"WP_"},y);return this.GetHtmlForFields(v,E,E.weaponAccFields,y)};this.SetDetailsMode=
function(v){var E=["scoreboard","weapons","weaponaccuracy"];for(var y in E)if(v!=E[y]){b(".match_"+E[y]).hide();b(".nav_"+E[y]).removeClass("selected")}b(".match_"+v).show();b(".nav_"+v).addClass("selected");b(".Quitters,.RedQuitters,.BlueQuitters").hide();b(".QuittersToggledBtn").removeClass("QuittersToggledBtn")};var z={};this.ShowVerts=function(v){var E;E=v.find("#stats_details_top_vert");z.top&&E.length!=0&&E.empty().append(z.top);E=v.find("#stats_details_bot_vert");z.bot&&E.length!=0&&E.empty().append(z.bot)};
this.LoadVerts=function(v){var E=this;z={};quakelive.LoadVerts([{zone:quakelive.VERT_ZONES.game_details_header,display:function(y,m,r){r||(z.top=m)}},{zone:quakelive.VERT_ZONES.game_details_full_banner,display:function(y,m,r){r||(z.bot=m)}}],{timeout:2E3},function(){E.ShowVerts(v)})};this.HideStatsDetails=function(){b("#stats_details").remove()};this.ShowStatsDetails=function(v,E){this.HideStatsTooltip();quakelive.ScrollToTop();b("#stats_details").size()&&b("#stats_details").remove();var y=b(quakelive.mod_stats.TPL_MATCH_DETAILS).appendTo("#qlv_contentBody"),
m=d.Get(v);this.LoadVerts(y);if(m)this.OnShowStatsDetails_Success(y,v,E,m.json);else{var r=this;b.ajax({url:"/stats/matchdetails/"+v+"/"+E,dataType:"json",mode:"abort",port:"statstip",cache:true,success:function(A){r.ProcessMatchData(A);var J=r.OnShowStatsDetails_Success(y,v,E,A);A={json:A,tip:J};d.Add(v,A)},error:this.OnShowStatsDetails_Error})}};this.OnCloseStatsTooltip=function(){b.ajaxAbort("statstip");this.HideStatsDetails();var v=quakelive.BuildSubPath(quakelive.pathParts.length-2);quakelive.StopPathMonitor();
window.location.hash=v;quakelive.ParsePath();quakelive.StartPathMonitor()};this.OnClickStatsTooltip=function(v,E,y,m){v=m+"/"+E+"/"+y;quakelive.StopPathMonitor();window.location.hash=v;quakelive.ParsePath();quakelive.StartPathMonitor();quakelive.statstip.ShowStatsDetails(E,y)};this.BindStatsTooltip=function(v,E,y,m){var r=this;v.unbind("hover").unbind("click").click(function(A){r.options.onClick(v,E,y,m);A.preventDefault()}).hoverIntent(function(){r.OnHoverStatsTooltip(v,E,y)},function(){r.HideStatsTooltip()})};
var K=this;this.defaultOptions={onClick:function(v,E,y,m){K.OnClickStatsTooltip(v,E,y,m)},onClose:function(){K.OnCloseStatsTooltip()}};this.options=b.extend({},this.defaultOptions);this.SetOptions=function(v){this.options=b.extend(this.defaultOptions,v)};this.CloseStatsDetails=function(){this.options.onClose()};this.FormatGameType=function(v){return v=v.INSTAGIB?"Unranked Instagib":v.GAME_TYPE_FULL};this.FormatGameTypeShort=function(v){var E=v.GAME_TYPE.toUpperCase();if(E=="DM")E="FFA";if(v.INSTAGIB)E=
"I"+E;return E}}var d=new c;quakelive.statstip=new o})(jQuery);
(function(b){function c(){var o={noticeHeight:"135px",animInTime:500,animOutTime:500,animEaseType:"swing",displayTime:5E3,styleClass:"qln_base",allowClose:true,icon:quakelive.resource("/images/awards/lg/last_man.png"),title:"QUAKE LIVE: Notice",body:"",bodyTop:"",bodyBot:"",onNodeCreated:null};this.filters={};this.noticeQueue=[];this.CreateNotice=function(d){var e='<div class="ql_notice '+d.styleClass+'"><div class="notice_header">'+d.title+"</div>"+(d.allowClose?'<a href="javascript:;" class="notice_close_btn"></a>':
"")+'<div class="notice_data"><h1>'+d.bodyTop+"</h1>"+d.body+"<h4>"+d.bodyBot+'</h4></div><div class="notice_icon" style="background:url('+d.icon+') no-repeat"></div></div>';e=b(e);d.onNodeCreated&&d.onNodeCreated(e);return e};this.LoadFilters=function(){var d=(quakelive.userinfo.IGNORED_NOTICES||"").split(",");this.filters={};for(var e in d)this.filters[d[e]]=true};this.IsNoticeFiltered=function(d){return this.filters[d]||false};this.Notify=function(d){if(quakelive.userstatus=="ACTIVE")if(qz_instance.IsGameRunning()!==
true)if(d){if(typeof d!="object")d={body:d};var e=b.extend({},o,d||{},{startTime:(new Date).getTime()});d=this.CreateNotice(e);d.data("options",e).hover(function(){e.paused=true},function(){var g=(new Date).getTime();e.paused=false;if(g-e.startTime>e.displayTime/2)e.startTime=g-e.displayTime/2}).find(".notice_close_btn").click(function(){if(!quakelive.userinfo.IGNORED_NOTICES){quakelive.userinfo.IGNORED_NOTICES=" ";b.get("/user/clearalerts");var g=confirm('Would you like to be taken to the "Edit Account" page to configure which alerts you see?',
"You are about to close an alert");g&&quakelive.Goto("user/edit")}e.startTime=0}).end().appendTo(b("#ql_notifier"));e.animSettings=[{height:e.noticeHeight},e.animInTime,e.animEaseType];if(b("#ql_notifier .ql_notice").length>3){e.paused=true;this.noticeQueue.push(d)}else d.animate.apply(d,e.animSettings)}};this.CheckNext=function(){var d=this.noticeQueue.shift();if(d){var e=d.data("options");setTimeout(function(){e.paused=false;e.startTime=(new Date).getTime();d.animate.apply(d,e.animSettings)},e.animOutTime)}};
this.CycleNotifications=function(){if(!quakelive.IsGameRunning()||quakelive.cvars.GetIntegerValue("r_fullscreen")===0){var d=false;b("#ql_notifier .ql_notice").each(function(g,k){var l=b(k);g=l.data("options");if(!g.isClosing&&!d&&(!g.paused||g.startTime==0)&&g.startTime+g.displayTime<(new Date).getTime()){d=true;g.isClosing=true;l.animate({height:0},g.animOutTime,g.animEaseType,function(){l.remove();d=false;quakelive.notifier.CheckNext()})}})}var e=this;setTimeout(function(){e.CycleNotifications()},
250)};this.CycleNotifications();this.ContactPresenceNotice=function(d,e){if(this.IsNoticeFiltered("friend_online"))return null;return{body:"A friend has come online.",bodyTop:d+" is online",bodyBot:'<a href="#profile/summary/'+d+'">View Profile</a>',title:"Your friend has come online!",icon:quakelive.resource("/images/players/icon_xl/"+e.modelskin+".jpg"),displayTime:5E3}};this.PendingInviteSummaryNotice=function(d){if(this.IsNoticeFiltered("login_invites"))return null;var e=d!=1;return{body:d+" friend "+
(e?"invites are":"invite is")+" waiting for you.",bodyTop:"Pending Invite",bodyBot:"<a href='#friends/incoming'>Click to view your friend "+(e?"invites":"invite")+"</a>",title:"You have "+(e?"pending friend invites!":"a pending friend invite!"),icon:quakelive.resource("/images/awards/lg/veteran.png"),displayTime:1E4}};this.PendingInviteNotice=function(d,e,g){if(this.IsNoticeFiltered("new_invite"))return null;return{body:e+" has requested to be your friend.",bodyTop:"New Friend Invite",bodyBot:"<a href='#profile/summary/"+
e+"' class='fl'>View Profile</a><span class='fl'>&nbsp;&nbsp;|&nbsp;&nbsp;</span> <a href='javascript:;' onclick='quakelive.mod_friends.AnswerSubscriptionRequest(\""+d+"\", true); return false'>Accept Invite</a><div class='cl'></div>",title:"You have a new friend invite!",icon:quakelive.resource("/images/players/icon_xl/"+g+".jpg"),displayTime:5E3}};this.FriendInGameNotice=function(d,e,g,k){if(this.IsNoticeFiltered("friend_ingame"))return null;return{body:d+" is playing now!<h3><a href='javascript:;' onclick='quakelive.Goto(\"home/join/"+
k+"\"); return false'>Join Game</a></h3>",bodyTop:"Friend In-Game Now",bodyBot:"Hover over tooltip to view details.",title:"Friend in-game now!",icon:quakelive.resource("/images/players/icon_xl/"+e+".jpg"),displayTime:8E3,onNodeCreated:function(l){quakelive.matchtip.BindMatchTooltip(l,k)}}};this.SelfAwardEarnedNotice=function(d,e,g,k,l,n){if(!this.awardMarkHandle){var q=this;this.awardsToMark=this.awardsToMark||[];this.awardMarkHandle=setTimeout(function(){var u=q.awardsToMark.join(",");q.awardsToMark=
[];b.ajax({type:"post",url:"/profile/mark_awards",data:{awards:u},dataType:"json",success:function(){q.awardMarkHandle=null},error:function(){q.awardMarkHandle=null}})},1E3)}this.awardsToMark[this.awardsToMark.length]=e;if(this.IsNoticeFiltered("self_award"))return null;return{body:l,bodyTop:g,bodyBot:"<a href='javascript:;' onclick='quakelive.Goto(\"profile/awards/"+quakelive.username+";type="+d+";award="+e+"\"); return false'>View Award</a>",title:"You have earned an award!",icon:quakelive.resource("/images/awards/lg/"+
k+".png"),displayTime:1E4,onNodeCreated:function(u){u.find(".notice_icon").attr("title",n)}}};this.FriendAwardEarnedNotice=function(d,e,g,k,l,n,q,u){if(this.IsNoticeFiltered("friend_award"))return null;var B="profile/awards/"+d+";type="+e+";award="+g;return{body:n,bodyTop:"<a class='fl' href='javascript:;' onclick='quakelive.Goto(\"profile/summary/"+d+"\"); return false'><img src='"+quakelive.resource("/images/players/icon_sm/"+u+".jpg")+"' style='border: 1px solid #666; position: relative; top: 2px; margin-right: 5px' /></a> "+
d,bodyBot:"<a class='fl' href='javascript:;' onclick='quakelive.Goto(\""+B+"\"); return false'>View Award</a> <span class='fl'>&nbsp;&nbsp;|&nbsp;&nbsp;</span><a class='fl' href='javascript:;' onclick='quakelive.Goto(\"profile/summary/"+d+"\"); return false'>View Profile</a><div class='cl'></div>",title:"<b>"+k+"</b> has been awarded!",icon:quakelive.resource("/images/awards/lg/"+l+".png"),displayTime:5E3,onNodeCreated:function(x){x.find(".notice_icon").addClass("interactive").click(function(){quakelive.Goto(B)}).attr("title",
q)}}}}quakelive.notifier=new c;quakelive.AddHook("OnAuthenticatedInit",function(){quakelive.notifier.LoadFilters()})})(jQuery);
(function(b){function c(z){var K=false,v=z.complete;z.complete=function(y,m){if(!K){K=true;v&&v(y,m)}};setTimeout(function(){if(!K){K=true;z.ajaxBlockedError()}},z.timeout+50);try{b.ajax(z)}catch(E){}}function o(z,K){var v=K.length==0||z.defaultRegex&&z.defaultRegex.test(K),E=b(K);if(z.display)z.display(z,E,v,K);else if(v)z.defaultHtml&&b(z.target).html(z.defaultHtml);else b(z.target).empty().append(E)}function d(z,K){for(var v in z){var E=z[v];o(E,K[E.zone]||"")}}function e(z){for(var K in z)o(z[K],
"")}function g(z){if(!z.target&&!z.display)return false;return true}function k(){B&&x&&b("#valance_clicker").length==0&&b("#qlv_container").before('<a id="valance_clicker" href="'+x+'" target="_blank" style="display: block; position: fixed; width: 100%; height: 100%; left: 0; top: 0; cursor: pointer"></a>')}var l=2E4,n={},q={defaultRegex:/\/qldefault\//,defaultHtml:"",target:null,display:null};quakelive.LoadVerts=function(z,K,v){K=b.extend({timeout:15E3},K);var E=quakelive.siteConfig.deliveryUrl,
y=[];if(z instanceof Array)for(var m in z){z[m]=b.extend({},q,z[m]);if(g(z[m]))y[y.length]=z[m].zone}else{z=[b.extend({},q,z)];if(g(z[0]))y[0]=z[0].zone}if(y.length!=0){E+="?zones="+escape(y.join("|"));E+="&r="+Math.floor(Math.random()*99999999);E+=document.charset?"&charset="+document.charset:document.characterSet?"&charset="+document.characterSet:"";if(window.location)E+="&loc="+escape(window.location.href);if(document.referrer)E+="&referer="+escape(document.referrer);c({type:"get",cache:false,
url:E,dataType:"script",global:false,timeout:K.timeout,success:function(){if(typeof OA_output=="object"){d(z,OA_output);OA_output=null}else e(z)},error:function(){e(z)},complete:v,ajaxBlockedError:function(){e(z);v&&v()}})}};var u=false,B=false,x=null;quakelive.ConnectValance=k;quakelive.FlushVertCache=function(){n={}};quakelive.FillVertList=function(z){var K=z;b(".ql_vert_frame").each(function(){var E=b(this),y=E.attr("id"),m=E.attr("title");if(n[y])m=n[y].title;else{n[y]={title:m,time:0};E.removeAttr("title")}E=
(new Date).getTime();var r=E-n[y].time;if(r>=l){n[y].time=E;y={};E={};m=m.split("&");for(var A in m){r=m[A].split("=");E[r[0]]=r[1]}if(quakelive.VERT_ZONES[E.zone]){y.zone=quakelive.VERT_ZONES[E.zone]||E.zone;if(E["default"])y.defaultHtml='<div style="background: url('+quakelive.resource(E["default"])+') no-repeat center center; width: 100%; height: 100%"></div>';y.target=this;K[K.length]=y}}});if(u)k();else{var v={"background-repeat":"no-repeat","background-position":"top center","background-image":"",
"background-color":"#000","background-attachment":"fixed"};K[K.length]={zone:quakelive.VERT_ZONES.site_valance,display:function(E,y,m,r){if(E=quakelive.ParseMetaVert(r,v)){B=true;for(var A in E.keyvals)A=="background-image"?b("body").css(A,"url("+E.keyvals[A]+")"):b("body").css(A,E.keyvals[A]);x=E.href;k()}}};u=true}};quakelive.ReloadVerts=function(){var z=[];quakelive.FillVertList(z);z.length>0&&quakelive.LoadVerts(z,{timeout:15E3})};quakelive.ParseMetaVert=function(z,K){var v=/^\s*<a\s*href=[\"\']([^\"\']+)[\"\']/i,
E=/^\s*(\S+)\s*=\s*(.*)\s*$/,y={};v=v.exec(z);y.href=v?v[1]:"";y.keyvals={};z=z.split("{{",2);if(z.length==2){z=z[1].split("}}",2);if(z.length==2){z=z[0].split("\n");for(var m in z){var r=E.exec(z[m]);if(r){v=r[1].toLowerCase();r=r[2];if(K[v]===undefined)break;y.keyvals[v]=r||K[v]}}}else return null}else return null;return y};var p=false;quakelive.HookVertLoading=function(){if(p)return false;quakelive.AddHook("OnContentLoaded",quakelive.ReloadVerts);quakelive.AddHook("OnLayoutLoaded",quakelive.ReloadVerts);
return p=true}})(jQuery);
(function(){function b(d,e,g){this.sysname=d;this.name=e;this.modelskin=g}function c(){this.bots=[];this.botNames=[];this.append=function(d){this.bots[d.sysname]=d;this.botNames.push(d.sysname)}}var o=window.botdb=new c;o.append(new b("anarki","Anarki","anarki_default"));o.append(new b("angel","Angel","lucy_angel"));o.append(new b("biker","Biker","biker_default"));o.append(new b("bitterman","Bitterman","bitterman_default"));o.append(new b("bones","Bones","bones_default"));o.append(new b("cadavre",
"Cadavre","biker_cadavre"));o.append(new b("crash","Crash","crash_default"));o.append(new b("daemia","Daemia","major_daemia"));o.append(new b("doom","Doom","doom_default"));o.append(new b("gorre","Gorre","visor_gorre"));o.append(new b("grunt","Grunt","grunt_default"));o.append(new b("hossman","Hossman","biker_hossman"));o.append(new b("hunter","Hunter","hunter_default"));o.append(new b("keel","Keel","keel_default"));o.append(new b("klesk","Klesk","klesk_default"));o.append(new b("lucy","Lucy","lucy_default"));
o.append(new b("major","Major","major_default"));o.append(new b("mynx","Mynx","mynx_default"));o.append(new b("orbb","Orbb","orbb_default"));o.append(new b("patriot","Patriot","razor_patriot"));o.append(new b("phobos","Phobos","doom_phobos"));o.append(new b("ranger","Ranger","ranger_default"));o.append(new b("razor","Razor","razor_default"));o.append(new b("sarge","Sarge","sarge_default"));o.append(new b("slash","Slash","slash_default"));o.append(new b("sorlag","Sorlag","sorlag_default"));o.append(new b("stripe",
"Stripe","grunt_stripe"));o.append(new b("tankjr","Tankjr","tankjr_default"));o.append(new b("uriel","Uriel","uriel_default"));o.append(new b("visor","Visor","visor_default"));o.append(new b("wrack","Wrack","ranger_wrack"));o.append(new b("xaero","Xaero","xaero_default"))})(jQuery);
(function(){function b(g,k,l){l||(l={});this.gametype=g;this.rating=k;this.avg_players=parseInt((l.max_players+l.min_players)/2)||0;this.min_players=l.min_players||null;this.max_players=l.max_players||null}function c(g,k,l,n,q){this.addGameType=function(u){if(!u.min_players)u.min_players=this.min_players;if(!u.max_players)u.max_players=this.max_players;this.gametypes[u.gametype]=u};this.sysname=g;this.name=k;this.min_players=l;this.max_players=n;this.tag_list=q.tag_list||[];this.gametypes={};this.hasTag=
function(u){return typeof this.tag_list[u]!="undefined"};this.hasGameType=function(u){return typeof this.gametypes[u]!="undefined"}}function o(){this.maps={};this.gameTypeMaps={};this.MapTags={NONE:-1,NEW:0,POPULAR:1,SPACE:2,TEAMARENA:3,ASYMETRICCTF:4,BEGINNER:5,INTERMEDIATE:6,ADVANCED:7,SMALL:10,MEDIUM:11,LARGE:12};this.MapTagNames={};this.MapTagNames[this.MapTags.NONE]="None";this.MapTagNames[this.MapTags.NEW]="New";this.MapTagNames[this.MapTags.POPULAR]="Popular";this.MapTagNames[this.MapTags.SPACE]=
"Space";this.MapTagNames[this.MapTags.TEAMARENA]="Team Arena";this.MapTagNames[this.MapTags.ASYMETRICCTF]="Asymetric CTF";this.MapTagNames[this.MapTags.BEGINNER]="Beginner";this.MapTagNames[this.MapTags.INTERMEDIATE]="Intermediate";this.MapTagNames[this.MapTags.ADVANCED]="Advanced";this.MapTagNames[this.MapTags.SMALL]="Small";this.MapTagNames[this.MapTags.MEDIUM]="Medium";this.MapTagNames[this.MapTags.LARGE]="Large";this.GameTypes={NONE:-1,FFA:0,DUEL:1,SINGLE_PLAYER:2,TDM:3,CA:4,CTF:5,MAX:6};this.GameTypeNames=
{0:"Free For All",1:"Duel",3:"Team Deathmatch",4:"Clan Arena",5:"Capture The Flag"};this.GameTypeShortNames={0:"ffa",1:"duel",3:"tdm",4:"ca",5:"ctf"};this.GameTypeByShortName={};this.GameTypeList=[this.GameTypes.FFA,this.GameTypes.CTF,this.GameTypes.CA,this.GameTypes.TDM,this.GameTypes.DUEL];this.GameTypeRating={POOR:0,GOOD:1};this.append=function(g){this.maps[g.sysname]=g};this.getBySysName=function(g){return this.maps[g]};this.getFirstByGameType=function(g){return this.gameTypeMaps[g][0]};this.getAllByGameType=
function(g){return this.gameTypeMaps[g]};this.isTeamGameType=function(g){return g==this.GameTypes.TDM||g==this.GameTypes.CA||g==this.GameTypes.CTF};this.isPrepared=false;this.prepareMapDB=function(){if(!this.isPrepared){this.isPrepared=true;this.orderedMaps=[];this.gameTypeMaps={};for(var g in this.maps){var k=this.maps[g];this.orderedMaps.push(g);for(var l in k.gametypes){var n=k.gametypes[l];this.gameTypeMaps[n.gametype]||(this.gameTypeMaps[n.gametype]=[]);this.gameTypeMaps[n.gametype].push(k)}}var q=
this;this.orderedMaps.sort(function(B,x){B=q.maps[B].name;x=q.maps[x].name;return B>x?1:B<x?-1:0});for(var u in this.GameTypeShortNames)this.GameTypeByShortName[this.GameTypeShortNames[u]]=u}};this.getRandomByGameType=function(g){g=this.gameTypeMaps[g];return g[Math.floor(Math.random()*g.length)]}}var d=window.mapdb=new o,e;e=new c("qzpractice1","Rocket Jump Training",1,1,{tag_list:[]});d.append(e);e=new c("qzpractice2","Strafe Jump Training",1,1,{tag_list:[]});d.append(e);e=new c("qzdm1","Arena Gate",
2,6,{tag_list:[d.MapTags.SMALL,d.MapTags.BEGINNER]});e.addGameType(new b(d.GameTypes.FFA,d.GameTypeRating.GOOD));e.addGameType(new b(d.GameTypes.DUEL,d.GameTypeRating.POOR));d.append(e);e=new c("qzdm2","House Of Pain",2,6,{tag_list:[d.MapTags.SMALL,d.MapTags.BEGINNER]});e.addGameType(new b(d.GameTypes.FFA,d.GameTypeRating.GOOD));e.addGameType(new b(d.GameTypes.CA,d.GameTypeRating.GOOD));e.addGameType(new b(d.GameTypes.DUEL,d.GameTypeRating.POOR));e.addGameType(new b(d.GameTypes.TDM,d.GameTypeRating.POOR));
d.append(e);e=new c("qzdm3","Arena Of Death",2,6,{tag_list:[d.MapTags.SMALL,d.MapTags.BEGINNER]});e.addGameType(new b(d.GameTypes.FFA,d.GameTypeRating.GOOD));e.addGameType(new b(d.GameTypes.CA,d.GameTypeRating.GOOD));e.addGameType(new b(d.GameTypes.DUEL,d.GameTypeRating.POOR,{min_players:2,max_players:2}));e.addGameType(new b(d.GameTypes.TDM,d.GameTypeRating.POOR));d.append(e);e=new c("qzdm4","Place of Many Deaths",4,8,{tag_list:[d.MapTags.MEDIUM,d.MapTags.INTERMEDIATE]});e.addGameType(new b(d.GameTypes.FFA,
d.GameTypeRating.GOOD));e.addGameType(new b(d.GameTypes.CA,d.GameTypeRating.GOOD,{min_players:4,max_players:12}));e.addGameType(new b(d.GameTypes.DUEL,d.GameTypeRating.GOOD));e.addGameType(new b(d.GameTypes.TDM,d.GameTypeRating.POOR));d.append(e);e=new c("qzdm5","Forgotten Place",2,6,{tag_list:[d.MapTags.SMALL,d.MapTags.BEGINNER]});e.addGameType(new b(d.GameTypes.FFA,d.GameTypeRating.GOOD));e.addGameType(new b(d.GameTypes.CA,d.GameTypeRating.GOOD));e.addGameType(new b(d.GameTypes.DUEL,d.GameTypeRating.GOOD));
e.addGameType(new b(d.GameTypes.TDM,d.GameTypeRating.POOR));d.append(e);e=new c("qzdm6","Campgrounds",4,12,{tag_list:[d.MapTags.POPULAR,d.MapTags.MEDIUM,d.MapTags.INTERMEDIATE]});e.addGameType(new b(d.GameTypes.FFA,d.GameTypeRating.GOOD,{min_players:4,max_players:16}));e.addGameType(new b(d.GameTypes.CA,d.GameTypeRating.GOOD));e.addGameType(new b(d.GameTypes.DUEL,d.GameTypeRating.GOOD));e.addGameType(new b(d.GameTypes.TDM,d.GameTypeRating.GOOD,{min_players:4,max_players:10}));d.append(e);e=new c("qzdm7",
"Temple of Retribution",6,16,{tag_list:[d.MapTags.POPULAR,d.MapTags.LARGE,d.MapTags.INTERMEDIATE]});e.addGameType(new b(d.GameTypes.FFA,d.GameTypeRating.GOOD));e.addGameType(new b(d.GameTypes.CA,d.GameTypeRating.GOOD,{min_players:8,max_players:12}));e.addGameType(new b(d.GameTypes.TDM,d.GameTypeRating.GOOD,{min_players:4,max_players:10}));d.append(e);e=new c("qzdm8","Brimstone Abbey",4,8,{tag_list:[d.MapTags.MEDIUM,d.MapTags.INTERMEDIATE]});e.addGameType(new b(d.GameTypes.FFA,d.GameTypeRating.GOOD));
e.addGameType(new b(d.GameTypes.CA,d.GameTypeRating.POOR,{min_players:4,max_players:10}));e.addGameType(new b(d.GameTypes.TDM,d.GameTypeRating.GOOD));d.append(e);e=new c("qzdm9","Hero's Keep",4,8,{tag_list:[d.MapTags.MEDIUM,d.MapTags.INTERMEDIATE]});e.addGameType(new b(d.GameTypes.FFA,d.GameTypeRating.GOOD));e.addGameType(new b(d.GameTypes.CA,d.GameTypeRating.POOR,{min_players:4,max_players:10}));e.addGameType(new b(d.GameTypes.TDM,d.GameTypeRating.POOR));d.append(e);e=new c("qzdm10","Nameless Place",
4,8,{tag_list:[d.MapTags.MEDIUM,d.MapTags.ADVANCED]});e.addGameType(new b(d.GameTypes.FFA,d.GameTypeRating.GOOD));e.addGameType(new b(d.GameTypes.CA,d.GameTypeRating.GOOD,{min_players:4,max_players:10}));e.addGameType(new b(d.GameTypes.DUEL,d.GameTypeRating.GOOD));e.addGameType(new b(d.GameTypes.TDM,d.GameTypeRating.GOOD));d.append(e);e=new c("qzdm11","Chemical Reaction",6,16,{tag_list:[d.MapTags.POPULAR,d.MapTags.LARGE,d.MapTags.INTERMEDIATE]});e.addGameType(new b(d.GameTypes.FFA,d.GameTypeRating.GOOD));
e.addGameType(new b(d.GameTypes.CA,d.GameTypeRating.GOOD,{min_players:8,max_players:12}));e.addGameType(new b(d.GameTypes.TDM,d.GameTypeRating.GOOD,{min_players:4,max_players:10}));d.append(e);e=new c("qzdm12","Dredwerkz",6,16,{tag_list:[d.MapTags.POPULAR,d.MapTags.LARGE,d.MapTags.INTERMEDIATE]});e.addGameType(new b(d.GameTypes.FFA,d.GameTypeRating.GOOD));e.addGameType(new b(d.GameTypes.CA,d.GameTypeRating.GOOD,{min_players:8,max_players:12}));e.addGameType(new b(d.GameTypes.TDM,d.GameTypeRating.GOOD,
{min_players:4,max_players:10}));d.append(e);e=new c("qzdm13","Lost World",4,8,{tag_list:[d.MapTags.POPULAR,d.MapTags.MEDIUM,d.MapTags.ADVANCED]});e.addGameType(new b(d.GameTypes.FFA,d.GameTypeRating.GOOD));e.addGameType(new b(d.GameTypes.CA,d.GameTypeRating.GOOD,{min_players:4,max_players:10}));e.addGameType(new b(d.GameTypes.TDM,d.GameTypeRating.GOOD));e.addGameType(new b(d.GameTypes.DUEL,d.GameTypeRating.GOOD));d.append(e);e=new c("qzdm14","Grim Dungeons",6,16,{tag_list:[d.MapTags.POPULAR,d.MapTags.LARGE,
d.MapTags.INTERMEDIATE]});e.addGameType(new b(d.GameTypes.FFA,d.GameTypeRating.GOOD));e.addGameType(new b(d.GameTypes.CA,d.GameTypeRating.GOOD,{min_players:8,max_players:12}));e.addGameType(new b(d.GameTypes.TDM,d.GameTypeRating.GOOD,{min_players:4,max_players:10}));d.append(e);e=new c("qzdm15","Demon Keep",6,16,{tag_list:[d.MapTags.LARGE,d.MapTags.INTERMEDIATE]});e.addGameType(new b(d.GameTypes.FFA,d.GameTypeRating.GOOD));e.addGameType(new b(d.GameTypes.CA,d.GameTypeRating.GOOD,{min_players:8,max_players:12}));
e.addGameType(new b(d.GameTypes.TDM,d.GameTypeRating.GOOD));d.append(e);e=new c("qzdm16","Cobalt Station",4,8,{tag_list:[d.MapTags.SPACE,d.MapTags.MEDIUM,d.MapTags.ADVANCED]});e.addGameType(new b(d.GameTypes.FFA,d.GameTypeRating.GOOD));e.addGameType(new b(d.GameTypes.CA,d.GameTypeRating.POOR,{min_players:2,max_players:6}));e.addGameType(new b(d.GameTypes.TDM,d.GameTypeRating.POOR));e.addGameType(new b(d.GameTypes.DUEL,d.GameTypeRating.POOR));e.addGameType(new b(d.GameTypes.CTF,d.GameTypeRating.POOR,
{min_players:2,max_players:6}));d.append(e);e=new c("qzdm17","The Longest Yard",2,12,{tag_list:[d.MapTags.POPULAR,d.MapTags.SPACE,d.MapTags.MEDIUM,d.MapTags.INTERMEDIATE]});e.addGameType(new b(d.GameTypes.FFA,d.GameTypeRating.GOOD,{min_players:2,max_players:16}));e.addGameType(new b(d.GameTypes.CA,d.GameTypeRating.GOOD));e.addGameType(new b(d.GameTypes.TDM,d.GameTypeRating.POOR,{min_players:4,max_players:10}));e.addGameType(new b(d.GameTypes.DUEL,d.GameTypeRating.POOR));d.append(e);e=new c("qzdm18",
"Space Chamber",6,18,{tag_list:[d.MapTags.SPACE,d.MapTags.LARGE,d.MapTags.ADVANCED]});e.addGameType(new b(d.GameTypes.FFA,d.GameTypeRating.GOOD));e.addGameType(new b(d.GameTypes.CA,d.GameTypeRating.POOR));e.addGameType(new b(d.GameTypes.TDM,d.GameTypeRating.GOOD,{min_players:4,max_players:10}));d.append(e);e=new c("qzdm19","Terminal Heights",4,8,{tag_list:[d.MapTags.SPACE,d.MapTags.MEDIUM,d.MapTags.ADVANCED]});e.addGameType(new b(d.GameTypes.FFA,d.GameTypeRating.GOOD));e.addGameType(new b(d.GameTypes.TDM,
d.GameTypeRating.POOR,{min_players:6,max_players:16}));d.append(e);e=new c("qzdm20","Hidden Fortress",4,12,{tag_list:[d.MapTags.NEW,d.MapTags.INTERMEDIATE,d.MapTags.SMALL]});e.addGameType(new b(d.GameTypes.FFA,d.GameTypeRating.GOOD));e.addGameType(new b(d.GameTypes.CA,d.GameTypeRating.GOOD,{max_players:10}));e.addGameType(new b(d.GameTypes.TDM,d.GameTypeRating.GOOD,{min_players:4,max_players:8}));e.addGameType(new b(d.GameTypes.DUEL,d.GameTypeRating.POOR));d.append(e);e=new c("qztourney1","Power Station",
2,6,{tag_list:[d.MapTags.SMALL,d.MapTags.BEGINNER]});e.addGameType(new b(d.GameTypes.FFA,d.GameTypeRating.GOOD));e.addGameType(new b(d.GameTypes.DUEL,d.GameTypeRating.GOOD));d.append(e);e=new c("qztourney2","Proving Grounds",2,6,{tag_list:[d.MapTags.POPULAR,d.MapTags.SMALL,d.MapTags.INTERMEDIATE]});e.addGameType(new b(d.GameTypes.FFA,d.GameTypeRating.GOOD));e.addGameType(new b(d.GameTypes.CA,d.GameTypeRating.GOOD));e.addGameType(new b(d.GameTypes.DUEL,d.GameTypeRating.GOOD,{min_players:2,max_players:4}));
e.addGameType(new b(d.GameTypes.TDM,d.GameTypeRating.POOR));d.append(e);e=new c("qztourney3","Hell's Gate",2,6,{tag_list:[d.MapTags.SMALL,d.MapTags.MEDIUM,d.MapTags.INTERMEDIATE]});e.addGameType(new b(d.GameTypes.FFA,d.GameTypeRating.GOOD));e.addGameType(new b(d.GameTypes.CA,d.GameTypeRating.GOOD));e.addGameType(new b(d.GameTypes.DUEL,d.GameTypeRating.GOOD));e.addGameType(new b(d.GameTypes.TDM,d.GameTypeRating.POOR));d.append(e);e=new c("qztourney4","Vertical Vengeance",2,6,{tag_list:[d.MapTags.POPULAR,
d.MapTags.SMALL,d.MapTags.ADVANCED]});e.addGameType(new b(d.GameTypes.FFA,d.GameTypeRating.GOOD));e.addGameType(new b(d.GameTypes.CA,d.GameTypeRating.GOOD));e.addGameType(new b(d.GameTypes.DUEL,d.GameTypeRating.GOOD));e.addGameType(new b(d.GameTypes.TDM,d.GameTypeRating.POOR));d.append(e);e=new c("qztourney5","Hell's Gate Redux",2,6,{tag_list:[d.MapTags.NEW,d.MapTags.SMALL,d.MapTags.BEGINNER]});e.addGameType(new b(d.GameTypes.FFA,d.GameTypeRating.GOOD));e.addGameType(new b(d.GameTypes.CA,d.GameTypeRating.GOOD));
e.addGameType(new b(d.GameTypes.DUEL,d.GameTypeRating.GOOD));e.addGameType(new b(d.GameTypes.TDM,d.GameTypeRating.POOR));d.append(e);e=new c("qztourney6","Almost Lost",4,8,{tag_list:[d.MapTags.NEW,d.MapTags.POPULAR,d.MapTags.MEDIUM,d.MapTags.ADVANCED]});e.addGameType(new b(d.GameTypes.FFA,d.GameTypeRating.GOOD));e.addGameType(new b(d.GameTypes.CA,d.GameTypeRating.GOOD,{min_players:4,max_players:10}));e.addGameType(new b(d.GameTypes.DUEL,d.GameTypeRating.GOOD));e.addGameType(new b(d.GameTypes.TDM,
d.GameTypeRating.GOOD));d.append(e);e=new c("qztourney7","Furious Heights",4,8,{tag_list:[d.MapTags.NEW,d.MapTags.POPULAR,d.MapTags.MEDIUM,d.MapTags.ADVANCED]});e.addGameType(new b(d.GameTypes.FFA,d.GameTypeRating.GOOD));e.addGameType(new b(d.GameTypes.CA,d.GameTypeRating.GOOD,{min_players:4,max_players:10}));e.addGameType(new b(d.GameTypes.DUEL,d.GameTypeRating.GOOD));e.addGameType(new b(d.GameTypes.TDM,d.GameTypeRating.GOOD));d.append(e);e=new c("qztourney8","Temple of Pain",2,6,{tag_list:[d.MapTags.TEAMARENA,
d.MapTags.SMALL,d.MapTags.BEGINNER]});e.addGameType(new b(d.GameTypes.FFA,d.GameTypeRating.GOOD));e.addGameType(new b(d.GameTypes.CA,d.GameTypeRating.GOOD));e.addGameType(new b(d.GameTypes.DUEL,d.GameTypeRating.GOOD));d.append(e);e=new c("qztourney9","House of Decay",2,6,{tag_list:[d.MapTags.TEAMARENA,d.MapTags.SMALL,d.MapTags.INTERMEDIATE]});e.addGameType(new b(d.GameTypes.FFA,d.GameTypeRating.GOOD));e.addGameType(new b(d.GameTypes.CA,d.GameTypeRating.POOR));e.addGameType(new b(d.GameTypes.DUEL,
d.GameTypeRating.GOOD));d.append(e);e=new c("ztntourney1","Blood Run",4,6,{tag_list:[d.MapTags.NEW,d.MapTags.SMALL,d.MapTags.INTERMEDIATE,d.MapTags.POPULAR]});e.addGameType(new b(d.GameTypes.CA,d.GameTypeRating.GOOD));e.addGameType(new b(d.GameTypes.FFA,d.GameTypeRating.GOOD));e.addGameType(new b(d.GameTypes.DUEL,d.GameTypeRating.GOOD));e.addGameType(new b(d.GameTypes.TDM,d.GameTypeRating.GOOD));d.append(e);e=new c("qzctf1","Dueling Keeps",2,6,{tag_list:[d.MapTags.SMALL,d.MapTags.BEGINNER]});e.addGameType(new b(d.GameTypes.CTF,
d.GameTypeRating.GOOD));d.append(e);e=new c("qzctf2","Troubled Waters",4,10,{tag_list:[d.MapTags.POPULAR,d.MapTags.MEDIUM,d.MapTags.INTERMEDIATE]});e.addGameType(new b(d.GameTypes.CTF,d.GameTypeRating.GOOD));d.append(e);e=new c("qzctf3","The Stronghold",4,10,{tag_list:[d.MapTags.POPULAR,d.MapTags.MEDIUM,d.MapTags.INTERMEDIATE]});e.addGameType(new b(d.GameTypes.CTF,d.GameTypeRating.GOOD));d.append(e);e=new c("qzctf4","Space CTF",2,6,{tag_list:[d.MapTags.SPACE,d.MapTags.POPULAR,d.MapTags.SMALL,d.MapTags.INTERMEDIATE]});
e.addGameType(new b(d.GameTypes.CTF,d.GameTypeRating.GOOD));d.append(e);e=new c("qzctf5","Fallout Bunker",4,8,{tag_list:[d.MapTags.SPACE,d.MapTags.POPULAR,d.MapTags.SMALL,d.MapTags.INTERMEDIATE]});e.addGameType(new b(d.GameTypes.CTF,d.GameTypeRating.GOOD));d.append(e);e=new c("qzctf6","Beyond Reality II",2,6,{tag_list:[d.MapTags.SPACE,d.MapTags.POPULAR,d.MapTags.SMALL,d.MapTags.INTERMEDIATE]});e.addGameType(new b(d.GameTypes.FFA,d.GameTypeRating.POOR));e.addGameType(new b(d.GameTypes.DUEL,d.GameTypeRating.GOOD));
e.addGameType(new b(d.GameTypes.TDM,d.GameTypeRating.POOR));e.addGameType(new b(d.GameTypes.CTF,d.GameTypeRating.GOOD));d.append(e);e=new c("qzctf7","IronWorks",4,10,{tag_list:[d.MapTags.NEW,d.MapTags.POPULAR,d.MapTags.MEDIUM,d.MapTags.ADVANCED]});e.addGameType(new b(d.GameTypes.CTF,d.GameTypeRating.GOOD));d.append(e);e=new c("qzctf8","Siberia",6,12,{tag_list:[d.MapTags.NEW,d.MapTags.LARGE,d.MapTags.ADVANCED]});e.addGameType(new b(d.GameTypes.CTF,d.GameTypeRating.GOOD));d.append(e);e=new c("qzctf9",
"Bloodlust CTF",6,10,{tag_list:[d.MapTags.NEW,d.MapTags.MEDIUM,d.MapTags.ADVANCED]});e.addGameType(new b(d.GameTypes.CTF,d.GameTypeRating.GOOD));d.append(e);e=new c("qzctf10","Courtyard Conundrum",6,10,{tag_list:[d.MapTags.NEW,d.MapTags.LARGE,d.MapTags.ADVANCED]});e.addGameType(new b(d.GameTypes.CTF,d.GameTypeRating.GOOD));d.append(e);e=new c("xmas","Silent Night",12,32,{tag_list:[d.MapTags.NEW,d.MapTags.LARGE,d.MapTags.ADVANCED]});d.append(e);e=new c("qzteam1","Base Siege",4,10,{tag_list:[d.MapTags.TEAMARENA,
d.MapTags.MEDIUM,d.MapTags.INTERMEDIATE]});e.addGameType(new b(d.GameTypes.CTF,d.GameTypeRating.GOOD));d.append(e);e=new c("qzteam3","Inner Sanctums",4,12,{tag_list:[d.MapTags.TEAMARENA,d.MapTags.MEDIUM,d.MapTags.INTERMEDIATE]});e.addGameType(new b(d.GameTypes.CTF,d.GameTypeRating.GOOD));d.append(e);e=new c("qzteam4","Scornforge",8,12,{tag_list:[d.MapTags.TEAMARENA,d.MapTags.LARGE,d.MapTags.INTERMEDIATE]});e.addGameType(new b(d.GameTypes.CTF,d.GameTypeRating.GOOD));d.append(e);e=new c("qzteam6","Vortex Portal",
4,12,{tag_list:[d.MapTags.TEAMARENA,d.MapTags.SPACE,d.MapTags.MEDIUM,d.MapTags.ADVANCED]});e.addGameType(new b(d.GameTypes.CTF,d.GameTypeRating.GOOD));d.append(e);e=new c("qzteam7","Rebound",8,12,{tag_list:[d.MapTags.TEAMARENA,d.MapTags.SPACE,d.MapTags.LARGE,d.MapTags.INTERMEDIATE]});e.addGameType(new b(d.GameTypes.CTF,d.GameTypeRating.GOOD));d.append(e);e=new c("qzca1","Asylum",2,10,{tag_list:[d.MapTags.NEW,d.MapTags.POPULAR,d.MapTags.MEDIUM,d.MapTags.INTERMEDIATE]});e.addGameType(new b(d.GameTypes.FFA,
d.GameTypeRating.GOOD));e.addGameType(new b(d.GameTypes.CA,d.GameTypeRating.GOOD));e.addGameType(new b(d.GameTypes.DUEL,d.GameTypeRating.GOOD));d.append(e);e=new c("qzca2","Trinity",4,16,{tag_list:[d.MapTags.NEW,d.MapTags.POPULAR,d.MapTags.MEDIUM,d.MapTags.INTERMEDIATE]});e.addGameType(new b(d.GameTypes.FFA,d.GameTypeRating.GOOD));e.addGameType(new b(d.GameTypes.CA,d.GameTypeRating.GOOD,{min_players:4,max_players:12}));e.addGameType(new b(d.GameTypes.DUEL,d.GameTypeRating.GOOD));e.addGameType(new b(d.GameTypes.TDM,
d.GameTypeRating.GOOD,{min_players:4,max_players:10}));d.append(e);e=new c("qzca3","Quarantine",4,16,{tag_list:[d.MapTags.NEW,d.MapTags.POPULAR,d.MapTags.MEDIUM,d.MapTags.INTERMEDIATE]});e.addGameType(new b(d.GameTypes.FFA,d.GameTypeRating.GOOD));e.addGameType(new b(d.GameTypes.CA,d.GameTypeRating.GOOD,{min_players:4,max_players:12}));e.addGameType(new b(d.GameTypes.DUEL,d.GameTypeRating.GOOD));e.addGameType(new b(d.GameTypes.TDM,d.GameTypeRating.GOOD,{min_players:4,max_players:10}));d.append(e);
d.prepareMapDB()})(jQuery);
(function(){function b(o){this.id=parseInt(o.LOCATION_ID);this.location=o.LOCATION;this.shortName=o.SHORT_NAME;this.city=o.CITY;this.region=o.REGION;this.countryAbbr=o.COUNTRY_ABBR;this.country=o.COUNTRY;this.ordinal=o.ORDINAL}function c(){this.Reset=function(){this.locations={};this.orderedCountries=this.locsByCountry=null};this.Reset();this.Append=function(o){this.locations[o.id]=o};this.GetByID=function(o){return this.locations[o]};this.GetCountryLocations=function(o){return this.locsByCountry[o]};this.PrepareLocations=
function(){function o(g,k){return g>k?1:g<k?-1:0}this.locsByCountry={};this.orderedCountries=[];for(var d in this.locations){var e=this.locations[d];if(typeof this.locsByCountry[e.countryAbbr]=="undefined"){this.locsByCountry[e.countryAbbr]=[];this.orderedCountries.push(e.countryAbbr)}this.locsByCountry[e.countryAbbr].push(e)}this.orderedCountries.sort(o)};this.LoadLocations=function(o){for(var d in o){var e=new b(o[d]);this.Append(e)}this.PrepareLocations()};this.UpdateLocations=function(o){this.Reset();
this.LoadLocations(o)}}b.prototype.GetCityState=function(){return this.IsUSA()?[this.region,this.city].join(", "):this.city};b.prototype.GetFlagIcon=function(){return"/images/flags3cc/"+this.countryAbbr.toLowerCase()+".gif"};b.prototype.IsUSA=function(){return this.countryAbbr.toLowerCase()=="usa"};window.locdb=new c})(jQuery);
(function(b){var c={};window.JoinURL=c;c.currentServerAddress=undefined;c.savedHash=undefined;c.CheckForJoin=function(){if(qlXfer.currentGroup>=GROUP_EXTRA)if(quakelive.pathParts[1]==="join"&&quakelive.IsLoggedIn()){var o=quakelive.pathParts[2];""+parseInt(o)==o?b.ajax({url:"/home/matchdetails/"+o,dataType:"json",success:c.AjaxSuccess,error:c.AjaxError}):b.ajax({url:"/request/invite",data:{ident:o},dataType:"json",success:function(d){if(d.HOST){var e=BuildCmdString();e+="+connect "+d.HOST+" +password "+
d.PW;quakelive.Goto("home");LaunchGame(e,false)}else c.ShowJoinError("The server you have chosen to join is no longer valid.")},error:c.AjaxError})}};c.CheckForLogin=function(){if(quakelive.pathParts[1]==="join")quakelive.IsLoggedIn()?JoinURL.CheckForJoin():quakelive.Goto("login/home/join/"+quakelive.pathParts[2])};c.AjaxSuccess=function(o){if(o.ECODE===0){var d=BuildCmdString();d+="+connect "+o.host_address;quakelive.Goto("home");LaunchGame(d,false,o)}else c.ShowJoinError("The server you attempted to join no longer exists.")};
c.AjaxError=function(){c.ShowJoinError("Cannot match. The server was unable to retrieve the connection details.")};c.ShowJoinError=function(o){qlPrompt({title:"Join Server Failed",body:o,alert:true})};c.OnGameStarted=function(o){try{if(o.serverInfo.public_id>0){c.currentServerAddress=quakelive.siteConfig.baseUrl+"/r/home/join/"+o.serverInfo.public_id;quakelive.StopPathMonitor();c.savedHash=window.location.hash;window.location.hash="home/join/"+o.serverInfo.public_id;quakelive.StartPathMonitor()}else{c.currentServerAddress=
undefined;c.savedHash=undefined}}catch(d){c.currentServerAddress=undefined;c.savedHash=undefined}};c.OnGameExited=function(){c.currentServerAddress=undefined;quakelive.StopPathMonitor();if(c.savedHash!==undefined)window.location.hash=c.savedHash;c.savedHash=undefined;quakelive.StartPathMonitor()};quakelive.AddHook("OnGameStarted",c.OnGameStarted);quakelive.AddHook("OnGameUpdated",c.OnGameStarted);quakelive.AddHook("OnGameExited",c.OnGameExited)})(jQuery);
(function(b){var c={};window.nav=c;window.SUBMENU_END={};c.defaultSettings={location:"body",object:c.navbar,recursive:true,supernav_class:"sf-menu",supernav_id:"supernav"};c.checkDirection=function(){var o=this.offset().left+this.width();o>document.documentElement.clientWidth&&this.addClass("overflowLeft")};c.initNav=function(o){o=jQuery.extend({},c.defaultSettings,o);var d=c.processNode(o);b(o.location).html(d);b("ul.sf-menu").superfish({delay:125,speed:1,animation:{opacity:"show"},dropShadows:false,
onShow:c.checkDirection,onHide:function(){this.removeClass("overflowLeft")},disableHI:false})};c.processNode=function(o){var d=b("<ul></ul>");d.addClass(o.supernav_class);d.attr("id",o.supernav_id);var e=0,g=o.object;for(var k in g){var l=b("<li></li>");l.html(k);var n=false;for(var q in g[k]){var u="";u=o.supernav_id?"&nbsp;":k;switch(q){case "goto":l.html('<a href="javascript:;" onclick="quakelive.Goto(\''+g[k]["goto"]+"'); return false;\">"+u+"</a>");break;case "href":l.html('<a href="'+g[k].href+
'" target="_blank">'+u+"</a>");break;case "class":l.addClass(g[k]["class"]);break;case "id":l.attr("id",g[k].id);break;case "callback":l.html('<a href="javascript:;" onclick="'+g[k].callback+'; return false; ">'+u+"</a>");break;default:continue}n=true;e++}if(o.recursive===true)if(g[k].submenu){u=c.processNode({object:g[k].submenu,recursive:true});u!==null&&l.append(u)}n&&d.append(l)}return e>0?d:null};c.initTopBar=function(){var o=quakelive.activeModule.GetLayout();o!=="bare"&&o!=="postlogin_bare"&&
nav.initNav({location:"#newnav_top",supernav_id:"topNav",object:nav.navbar})};quakelive.AddHook("OnLayoutLoaded",c.initTopBar)})(jQuery);
(function(b){function c(n){this.name=n.name;this.clan=n.clan;this.score=parseInt(n.score);this.rank=parseInt(n.rank);this.bot=parseInt(n.bot);this.team=parseInt(n.team);this.model=n.model;this.blocked=this.friend=false;if(!this.bot){n=StripColors(this.name);if(quakelive.mod_friends.IsOnRoster(n))this.friend=true;else if(quakelive.mod_friends.IsBlocked(n))this.blocked=true}}function o(){this.error=this.details=false;this.num_blocked=this.num_friends=this.detailsTime=this.basicsTime=this.ordinal=0;
this.hidden=false;this.game_type=this.public_id=0;this.host_name="";this.ranked=0;this.map="";this.location_id=this.g_needpass=this.g_instagib=this.max_clients=this.num_clients=0;this.host_address="";this.skillDelta=0;this.skillTooHigh=false;this.g_bluescore=this.g_redscore=this.roundtimelimit=this.roundlimit=this.capturelimit=this.fraglimit=this.timelimit=this.g_levelstarttime=this.g_gamestate=0;this.players=[]}function d(n){this.params=b.extend({},k,n);this.listener=null}function e(){e.prototype.OnRefreshServersSuccess=
function(){};e.prototype.OnRefreshServersError=function(){};e.prototype.OnStartRefreshServers=function(){};e.prototype.OnSaveFilterSuccess=function(){};e.prototype.OnSaveFilterError=function(){}}function g(){this.serversById={};this.servers=[]}o.prototype.UpdateBasics=function(n){this.basicsTime=(new Date).getTime();this.public_id=parseInt(n.public_id);this.game_type=parseInt(n.game_type);this.host_name=n.host_name;this.ranked=parseInt(n.ranked);this.map=n.map;this.num_clients=parseInt(n.num_clients);
this.max_clients=parseInt(n.max_clients);this.g_instagib=parseInt(n.g_instagib);this.g_needpass=parseInt(n.g_needpass);this.location_id=parseInt(n.location_id);this.host_address=n.host_address;this.skillDelta=parseInt(n.skillDelta);this.skillTooHigh=parseInt(n.skillTooHigh)};o.prototype.GetMapTitle=function(){var n=this.map.toLowerCase(),q=mapdb.getBySysName(n);if(q)return q.name;return n};o.prototype.GetGameTypeTitle=function(){return mapdb.GameTypeNames[this.game_type]||"Unknown"};o.prototype.UpdateDetails=
function(n){this.details=true;this.detailsTime=(new Date).getTime();this.g_gamestate=n.g_gamestate;this.g_levelstarttime=parseInt(n.g_levelstarttime);this.timelimit=parseInt(n.timelimit);this.fraglimit=parseInt(n.fraglimit);this.capturelimit=parseInt(n.capturelimit);this.roundlimit=parseInt(n.roundlimit);this.roundtimelimit=parseInt(n.roundtimelimit);this.g_redscore=parseInt(n.g_redscore);this.g_bluescore=parseInt(n.g_bluescore);this.num_blocked=this.num_friends=0;var q=[];if(n.players)for(var u=
0;u<n.players.length;++u){var B=new c(n.players[u]);q.push(B);if(B.friend)this.num_friends++;else B.blocked&&this.num_blocked++}q.sort(function(x,p){return x.friend==p.friend?x.blocked==p.blocked?x.bot==p.bot?x.team==p.team?x.score<p.score?1:x.score>p.score?-1:0:x.team<p.team?-1:x.team>p.team?1:0:x.bot<p.bot?-1:x.bot>p.bot?1:0:x.blocked?1:-1:x.friend?-1:1});this.players=q};var k={filters:{group:"any",game_type:"any",arena:"any",state:"any",difficulty:"any",location:"any","private":0},arena_type:"",
players:[],game_types:[],ig:0};d.prototype.DEFAULT_FILTER=new d;d.prototype.GetBase64=function(){return Base64.encode(JSON.stringify(this.params))};g.prototype.FlushCache=function(){for(var n in this.serversById){this.serversById[n].detailsTime=0;this.serversById[n].details=0}};g.prototype.GetServers=function(){return this.servers};g.prototype.GetServerInfo=function(n){return typeof this.serversById[n]=="object"?this.serversById[n]:null};g.prototype.OnRefreshServersError=function(){this.listener&&
this.listener.OnRefreshServersError(this)};g.prototype.OnRefreshServersSuccess=function(){this.listener&&this.listener.OnRefreshServersSuccess(this)};g.prototype.OnStartRefreshServers=function(){this.listener&&this.listener.OnStartRefreshServers(this)};g.prototype.OnAddServer=function(n){this.listener&&this.listener.OnAddServer(this,n)};g.prototype.OnRemoveServer=function(n){this.listener&&this.listener.OnRemoveServer(this,n)};g.prototype.OnUpdateServer=function(n){this.listener&&this.listener.OnUpdateServer(this,
n)};g.prototype.UpdateServers=function(n,q){function u(v,E){return v.ordinal==E.ordinal?0:v.ordinal<E.ordinal?-1:1}for(var B={},x=0;x<n.length;++x){var p=n[x],z=this.GetServerInfo(p.public_id);z||(z=new o);z.ordinal=x;z.UpdateBasics(p);q&&z.UpdateDetails(p);B[z.public_id]=z}x=[];n=[];q=[];for(var K in this.serversById){p=this.serversById[K];z=B[K];if(typeof z!="object")n.push(p);else{q.push(z);x.push(z)}}for(K in B){p=this.serversById[K];z=B[K];if(typeof p!="object"){q.push(z);x.push(z)}}x.sort(u);
this.servers=x;this.serversById=B;for(x=0;x<n.length;++x)this.OnRemoveServer(n[x]);for(x=0;x<q.length;++x)this.OnUpdateServer(q[x])};g.prototype.RefreshServersSuccess=function(n){n=quakelive.Eval(n);if(!n||!n.servers)this.OnRefreshServersError();else{this.UpdateServers(n.servers);this.OnRefreshServersSuccess()}};g.prototype.RefreshServersError=function(){this.OnRefreshServersError()};g.prototype.RefreshServers=function(n){if(!quakelive.IsGameRunning()){this.OnStartRefreshServers();var q=this;b.ajax({type:"get",
mode:"abort",port:"serverlist",url:"/home/matches/"+Base64.encode(JSON.stringify(n)),success:function(){q.RefreshServersSuccess.apply(q,arguments)},error:function(){q.RefreshServersError.apply(q,arguments)}})}};g.prototype.RefreshServerDetailsSuccess=function(n){n=quakelive.Eval(n);if(!n||!n.servers)this.OnRefreshServersError();else{this.UpdateServers(n.servers);this.OnRefreshServersSuccess()}};g.prototype.RefreshServerDetailsError=function(){};var l={onSuccess:function(){},onError:function(){},cacheTime:0};
g.prototype.RefreshServerDetails=function(n,q){var u=b.extend({},l,q),B=this.GetServerInfo(n);if(B){q=(new Date).getTime();if(u.cacheTime!=0&&q-B.detailsTime<=1E3*u.cacheTime){u.onSuccess(B,true);return}}else{B=new o;B.hidden=true;B.public_id=n;this.serversById[n]=B;this.servers.push(B)}var x=this;b.ajax({url:"/home/matchdetails/"+n,dataType:"json",mode:"abort",port:"matchdetails",success:function(p){if(typeof p.map=="string"){B.error=false;B.UpdateBasics(p);B.UpdateDetails(p);x.OnUpdateServer(B);
u.onSuccess(B,false)}else{B.error=true;u.onError(B)}},error:function(){B.error=true;u.onError(B)}})};g.prototype.SaveFilter=function(){var n=this;b.ajax({type:"post",mode:"abort",port:"filterupdate",url:"/home/filter/update",data:{filter_obj:JSON.stringify(module.filter)},success:function(){n.SaveFilterSuccess.apply(n,arguments)},error:function(){n.SaveFilterError.apply(n,arguments)}})};g.prototype.SaveFilterSuccess=function(){this.OnSaveFilterSuccess()};g.prototype.SaveFilterError=function(){this.OnSaveFilterError()};
g.LoadFilterSuccess=function(){};g.LoadFilterError=function(){};g.prototype.LoadFilter=function(){};g.ResetFilterSuccess=function(){this.OnResetFilterSuccess()};g.ResetFilterError=function(){this.OnResetFilterError()};quakelive.ServerManager=g;quakelive.ServerManagerListener=e;quakelive.ServerFilter=d})(jQuery);
(function(b){function c(){}var o={target:"qlv_postlogin_matches",max:0};c.prototype=new quakelive.ServerManagerListener;c.prototype.SetDisplayProps=function(d){this.props=b.extend({},o,d)};c.prototype.GetContainerNodeId=function(){return this.props.target};c.prototype.GetServerNodeId=function(d){return"match_"+d.public_id};c.prototype.UpdateServerNode=function(d,e){var g=quakelive.GetGameTypeByID(d.game_type),k;if(d.num_clients==0)k=d.g_needpass==0?"Waiting For Players":"Waiting - Private";else{k=
d.num_clients+"/"+d.max_clients+" Players";if(d.g_needpass!=0)k+=" - Private"}var l,n;if(n=locdb.GetByID(d.location_id)){l=n.GetCityState();n=n.GetFlagIcon()}else{l="QUAKE LIVE";n="/images/flags3cc/usa.gif"}var q=GetSkillRankInfo(d);e.find(".qlv_inner_box").length==0&&e.html('<img src="" alt="" width="165" height="124" class="thumb" /><div class="qlv_inner_box"><div class="gamelabel"></div><img src="" class="gamerank" /><img src="" class="gameicon" /><div class="players"></div><img class="location_flag" src="" width="16" height="11" /><div class="location_text"></div></div>');
e.find(".thumb").attr("src",quakelive.resource("/images/levelshots/lg/"+d.map.toLowerCase()+".jpg"));e.find(".gamelabel").text(d.host_name);e.find(".gamerank").attr("src",q.img);e.find(".gameicon").attr("src",quakelive.resource("/images/gametypes/"+g.name+"_md.png"));e.find(".players").text(k);e.find(".location_flag").attr("src",quakelive.resource(n));e.find(".location_text").text(l);e.find(".best_pick").remove();if(d.ordinal<3){e.addClass("qlv_pls_bestpick_box");d.g_needpass==0&&e.append('<img src="'+
quakelive.resource("/images/sf/login/lbl_bestpick.png")+'" class="best_pick" />')}else{e.addClass("qlv_pls_box");e.removeClass("qlv_pls_bestpick_box")}return e};c.prototype.OnRefreshServersSuccess=function(d){quakelive.SendModuleMessage("OnServerListReload",d);this.DisplayServerList(d);this.SortServerList(d)};c.prototype.OnRefreshServersError=function(){var d=b("#"+this.GetContainerNodeId()).empty();d.append('<p class="tc TwentyPxTxt midGrayTxt" style="width: 70%; margin: 20% auto; color: #f00">We\'ve encountered an error loading the list of games. Please wait and we will try to reload the list.</p>')};
c.prototype.OnRemoveServer=function(d,e){d=b("#"+this.GetServerNodeId(e));d.length>0&&d.remove();quakelive.matchtip.HideMatchTooltip(e.public_id)};c.prototype.OnUpdateServer=function(d,e){if(!e.hidden){d=b("#"+this.GetServerNodeId(e));if(d.length==0){d=b('<div id="'+this.GetServerNodeId(e)+'"></div>');e.node=d}this.UpdateServerNode(e,d)}};c.prototype.DisplayServerList=function(d){var e=b("#"+this.GetContainerNodeId());d=d.GetServers();e.empty();if(d.length>0)for(var g=0;g<d.length;++g){var k=d[g];
quakelive.matchtip.BindMatchTooltip(k.node,k.public_id);e.append(k.node)}else{e.append('<p class="tc thirtyPxTxt sixtypxv midGrayTxt">No Games Available</p>');quakelive.siteConfig.realm=="focus"?e.append('<p class="tc TwentyPxTxt midGrayTxt">A focus test may not be active at this time.<br />Please check the News Feed for scheduled test times.</p>'):e.append('<p class="tc TwentyPxTxt midGrayTxt">Check Your Customize Settings</p>')}};c.prototype.SortServerList=function(d){b("#"+this.GetContainerNodeId()).children();
d=d.GetServers();for(var e=0;e<d.length-1;++e){var g=b("#"+this.GetServerNodeId(d[e])),k=b("#"+this.GetServerNodeId(d[e+1]));g.after(k)}};quakelive.ServerIconView=c})(jQuery);
(function(b){function c(){this.prototype=new quakelive.ServerManagerListener}var o={target:"qlv_postlogin_matches",max:0};c.prototype.SetDisplayProps=function(d){this.props=b.extend({},o,d)};c.prototype.GetContainerNodeId=function(){return this.props.target};c.prototype.GetServerNodeId=function(d){return"match_"+d.public_id};c.prototype.UpdateServerNode=function(d,e){var g=quakelive.GetGameTypeByID(d.game_type),k;if(d.num_clients==0)k=d.g_needpass==0?"Waiting For Players":"Waiting - Private";else{k=
d.num_clients+"/"+d.max_clients+" Players";if(d.g_needpass!=0)k+=" - Private"}var l,n;if(n=locdb.GetByID(d.location_id)){l=n.GetCityState();n=n.GetFlagIcon()}else{l="QUAKE LIVE";n="/images/flags3cc/usa.gif"}var q=GetSkillRankInfo(d);e.find(".qlv_inner_box").length==0&&e.html('<img src="" alt="" width="165" height="124" class="thumb" /><div class="qlv_inner_box"><div class="gamelabel"></div><img src="" class="gamerank" /><img src="" class="gameicon" /><div class="players"></div><img class="location_flag" src="" width="16" height="11" /><div class="location_text"></div></div>');
e.find(".thumb").attr("src",quakelive.resource("/images/levelshots/lg/"+d.map.toLowerCase()+".jpg"));e.find(".gamelabel").text(d.host_name);e.find(".gamerank").attr("src",q.img);e.find(".gameicon").attr("src",quakelive.resource("/images/gametypes/"+g.name+"_md.png"));e.find(".players").text(k);e.find(".location_flag").attr("src",quakelive.resource(n));e.find(".location_text").text(l);e.find(".best_pick").remove();if(d.ordinal<3){e.addClass("qlv_pls_bestpick_box");if(d.g_needpass==0)quakelive.userstatus==
"ACTIVE"?e.append('<img src="'+quakelive.resource("/images/sf/login/lbl_bestpick.png")+'" class="best_pick" />'):e.append('<img src="'+quakelive.resource("/images/sf/login/lbl_livematch.png")+'" class="best_pick" />')}else{e.addClass("qlv_pls_box");e.removeClass("qlv_pls_bestpick_box")}return e};c.prototype.OnStartRefreshServers=function(){var d=b("#"+this.GetContainerNodeId());d.children()};c.prototype.OnRefreshServersSuccess=function(d){quakelive.SendModuleMessage("OnServerListReload",d);this.DisplayServerList(d);
this.SortServerList(d)};c.prototype.OnRefreshServersError=function(){};c.prototype.OnRemoveServer=function(d,e){d=b("#"+this.GetServerNodeId(e));d.length>0&&d.remove();quakelive.matchtip.HideMatchTooltip(e.public_id)};c.prototype.OnUpdateServer=function(d,e){if(!e.hidden){d=b("#"+this.GetServerNodeId(e));if(d.length==0){d=b('<div id="'+this.GetServerNodeId(e)+'"></div>');e.node=d}this.UpdateServerNode(e,d)}};c.prototype.DisplayServerList=function(d){var e=b("#"+this.GetContainerNodeId());d=d.GetServers();
if(d.length>0){b("#qlv_welcome .welcome_matches_header").css("visibility","visible");e.empty();for(var g=0;g<d.length;++g){var k=d[g];quakelive.matchtip.BindMatchTooltip(k.node,k.public_id);e.append(k.node)}}};c.prototype.SortServerList=function(d){b("#"+this.GetContainerNodeId()).children();d=d.GetServers();for(var e=0;e<d.length-1;++e){var g=b("#"+this.GetServerNodeId(d[e])),k=b("#"+this.GetServerNodeId(d[e+1]));g.after(k)}};quakelive.ServerPreviewIconView=c})(jQuery);
(function(b){function c(){x.filter.filters.group=this.value;x.ChangeSocialFilter(this.value);B(this)}function o(){x.ChangeGameTypeFilter(this.value,true);B(this)}function d(){x.ChangeArenaFilter();B(this)}function e(){x.filter.filters.state=this.value;B(this)}function g(){x.filter.filters.difficulty=this.value;B(this)}function k(){x.filter.filters.location=this.value;B(this)}function l(){x.ReloadServerList();x.UpdateFilterURL(this.name,this.options.selectedIndex);x.UI_RefreshFilter()}function n(){var v=
b("input[name='private']").fieldValue()[0];x.UpdateFilterURL("private",v);x.filter.filters["private"]=v;x.ReloadServerList();x.UI_RefreshFilter()}function q(){var v=parseInt(b("#new_browser").fieldValue()[0]);x.UpdateFilterURL("new_browser",v);(x.filter.filters.new_browser=v)?CreateCookie("ql_new_browser",1,0):EraseCookie("ql_new_browser");quakelive.serverManager.FlushCache();x.ReloadServerList();x.UI_RefreshFilter()}function u(){if(quakelive.HasParam(this.name)){var v=quakelive.params[this.name];
if(v<0)v=0;else if(v>=this.options.length)v=this.options.length-1;v=this.options[v].value;b(this).val(v);x.filter.filters[this.name]=v}else{b(this).val(x.filter.filters[this.name]);x.UpdateFilterURL(this.name,this.options.selectedIndex)}switch(this.name){case "group":x.ChangeSocialFilter(x.filter.filters.group);break;case "game_type":x.ChangeGameTypeFilter(x.filter.filters.game_type,false);break;case "difficulty":x.ChangeDifficultyFilter();break;default:break}B(this)}function B(v){v.options.selectedIndex==
0?b(v).parent(".filter_control").find("label").removeClass("selected"):b(v).parent(".filter_control").find("label").addClass("selected")}var x={};x.TITLE="Home";x.defaultFilter='{"filters":{"group": "any", "game_type": "any", "arena": "any", "state": "any", "difficulty": "any", "location": "any", "private": 0 }, "arena_type": "", "players": [], "game_types": [], "ig": 0 }';x.savedFilter={};x.filter={};x.bHasCustomFilter=false;x.Tags={NEW:0,POPULAR:1,SPACE:2,TEAMARENA:3,ASYMETRICCTF:4,BEGINNER:5,INTERMEDIATE:6,
ADVANCED:7,SMALL:10,MEDIUM:11,LARGE:12};x.GTFilters={0:'{"GT":"any", "IG":0}',1:'{"GT":["CTF","CA","TDM"], "IG":0}',2:'{"GT":["DM"], "IG":0}',3:'{"GT":["CTF"], "IG":0}',4:'{"GT":["CA"], "IG":0}',5:'{"GT":["TDM"], "IG":0}',6:'{"GT":["TOURNEY"], "IG":0}',7:'{"GT":"any", "IG":1}'};x.waitHandle=null;x.refreshCount=0;var p=60,z=45;x.GameTypes=["CA","CTF","TDM","TOURNEY","DM"];x.GetLayout=function(){return quakelive.IsLoggedIn()||quakelive.pathParts[1]=="advertise"?"postlogin":"prelogin"};quakelive.AddHook("OnModelIconChanged",
function(v){x.LoadModelIcon(v)});x.Init=function(){if(quakelive.IsLoggedIn()){x.DISPLAY={friends:true};x.FetchFilter()}else x.DISPLAY={friends:false};quakelive.AddHook("OnContentLoaded",x.Hook_OnContentLoaded);quakelive.AddHook("OnGameStarted",x.Hook_OnGameStarted);quakelive.AddHook("OnGameExited",x.Hook_OnGameExited)};x.FetchFilter=function(){var v=quakelive.Eval(x.defaultFilter),E=quakelive.userinfo.BROWSER_FILTER;if(E.length>0){E=quakelive.Eval(E);if(typeof E=="object"){x.bHasCustomFilter=true;
x.filter=b.extend(v,E);x.savedFilter=b.extend(v,E)}else x.savedFilter=x.filter=v}else x.savedFilter=x.filter=v};x.Hook_OnContentLoaded=function(v){v!=x&&x.StopMatchRefresh()};x.OnLayoutLoaded=function(){quakelive.IsLoggedIn()&&x.LoadModelIcon(quakelive.cvars.Get("model"));document.loginform&&document.loginform.u&&document.loginform.u.focus()};x.LoadModelIcon=function(v){v=ParseModelSkin(v.value);x.playericons=new PlayerIconSet(v.model,v.skin);quakelive.playericons=x.playericons;b(".nametag-icon").html(x.playericons.large);
b(".nametag-body-md").css("background","url("+quakelive.resource("/images/players/"+v.model+"/body_"+v.skin+"_md.png")+") no-repeat")};x.ReloadServerList=function(){if(quakelive.IsLoggedIn()&&!quakelive.IsGameRunning()){x.ChangeSocialFilter(x.filter.filters.group);x.StopMatchRefresh();var v=function(){quakelive.serverManager.RefreshServers(x.filter);x.waitHandle=setTimeout(v,z*1E3)};v()}};x.JoinServer=function(v){join_server(v)};x.StopMatchRefresh=function(){if(x.waitHandle!=null){clearTimeout(x.waitHandle);
x.waitHandle=null}};x.ShowContent=function(v){if(quakelive.IsLoggedIn()&&quakelive.userstatus!="ACTIVE")quakelive.Goto("welcome");else{quakelive.ShowContent(v);if(quakelive.IsLoggedIn()){quakelive.MakeHomeChooser("home");v=new quakelive.ServerIconView;v.SetDisplayProps({target:"qlv_postlogin_matches"});quakelive.serverManager.listener=v;x.ReloadServerList();x.InitFilters()}JoinURL.CheckForLogin()}};x.filtersInitialized=false;x.InitFilters=function(){x.map_obj=quakelive.Eval(b("#map_json").html())||
[];x.location_obj=quakelive.Eval(b("#location_json").html())||{};x.location_tag_obj=quakelive.Eval(b("#location_tag_json").html())||{};locdb.UpdateLocations(x.location_obj);x.InitLocationFilter();b(".filterbar_content select").unbind();b("#ctrl_filter_social").change(c);b("#ctrl_filter_gametype").change(o);b("#ctrl_filter_arena").change(d);b("#ctrl_filter_gamestate").change(e);b("#ctrl_filter_difficulty").change(g);b("#ctrl_filter_location").change(k);b(".filterbar_content select").change(l);b('input[name="private"]').click(n);
b("#new_browser").click(q);b(".filterbar_content select").each(u);var v;if(quakelive.HasParam("private")){try{v=parseInt(quakelive.params["private"])}catch(E){v=0}x.filter.filters["private"]=v;x.ReloadServerList()}else{v=parseInt(x.filter.filters["private"]||0);x.UpdateFilterURL("private",v)}v?b("#privateServer").attr("checked","checked"):b("#publicServer").attr("checked","checked");var y;if(quakelive.HasParam("new_browser")){try{y=parseInt(quakelive.params.new_browser)}catch(m){y=0}x.filter.filters.new_browser=
y;x.ReloadServerList()}else{y=parseInt(x.filter.filters.new_browser||0);x.UpdateFilterURL("new_browser",v)}if(y){b("#new_browser").attr("checked","checked");CreateCookie("ql_new_browser",1,0)}else{b("#new_browser").removeAttr("checked");EraseCookie("ql_new_browser")}x.UI_RefreshFilter()};x.ChangeSocialFilter=function(v){x.filter.players=[];if(v=="friends"){v=quakelive.mod_friends.roster.fullRoster;for(var E=0;E<v.length;++E)v[E].IsSubscribed()&&v[E].IsOnline()&&x.filter.players.push(v[E].name)}};
x.ChangeGameTypeFilter=function(v,E){var y;if(v!="any"){var m=quakelive.Eval(x.GTFilters[v])||x.GTFilters[0];y=m.GT;x.filter.ig=m.IG}else{y="any";x.filter.ig=0}m="";b("#ctrl_filter_arena > optgroup:last").empty();x.filter.game_types=[];if(y==null||y=="any")for(var r in x.GameTypes)for(var A in x.map_obj[x.GameTypes[r]].ARENAS){if(!b("#ctrl_filter_arena").containsOption(x.map_obj[x.GameTypes[r]].ARENAS[A].MAP_SYSNAME)){m='<option class="filter_map" value="'+x.map_obj[x.GameTypes[r]].ARENAS[A].MAP_SYSNAME+
'">'+x.map_obj[x.GameTypes[r]].ARENAS[A].MAP_NAME+"</option>";b("#ctrl_filter_arena > optgroup:last").append(m)}}else for(r in y){for(A in x.map_obj[y[r]].ARENAS)if(!b("#ctrl_filter_arena").containsOption(x.map_obj[y[r]].ARENAS[A].MAP_SYSNAME)){m='<option class="filter_map" value="'+x.map_obj[y[r]].ARENAS[A].MAP_SYSNAME+'">'+x.map_obj[y[r]].ARENAS[A].MAP_NAME+"</option>";b("#ctrl_filter_arena > optgroup:last").append(m)}x.filter.game_types.push(x.map_obj[y[r]].ENGINE_NUM)}y=b("#ctrl_filter_arena > optgroup:last").children();
x.SortOptions(y);x.filter.filters.game_type=v==0?"any":v;if(E){b("#ctrl_filter_arena").selectOptions("any");x.filter.filters.arena="any";x.UpdateFilterURL("arena",0)}};x.ChangeDifficultyFilter=function(){if(quakelive.userinfo.NEW_PLAYER&&!x.bHasCustomFilter){b("#ctrl_filter_difficulty").selectOptions("1");x.filter.filters.difficulty=1}};x.ChangeArenaFilter=function(){var v=b("#ctrl_filter_arena").selectedOptions()[0];x.filter.arena_type=b(v).attr("class")=="filter_tag"?"tag":b(v).attr("class")=="filter_map"?
"map":"";x.filter.filters.arena=v.value};x.InitLocationFilter=function(){var v="";for(var E in x.location_tag_obj.TAG)if(!b("#ctrl_filter_location").containsOption(x.location_tag_obj.TAG[E])){v='<option value="'+x.location_tag_obj.TAG[E]+'">'+x.location_tag_obj.TAG[E]+"</option>";b("#ctrl_filter_location > optgroup:first").append(v)}x.AppendLocationOptions(b("#ctrl_filter_location"))};x.AppendLocationOptions=function(v){var E="";for(var y in locdb.orderedCountries){var m=locdb.GetCountryLocations(locdb.orderedCountries[y]),
r=m[0].countryAbbr;m[0].IsUSA()||(r+=" ("+m[0].country+")");E+='<optgroup label="'+r+'">';for(var A in m){r=m[A];var J="";r.IsUSA()||(J+=r.countryAbbr+", ");J+=r.GetCityState();if(r.ordinal>1)J+=" #"+r.ordinal;E+='<option value="'+r.id+'">'+J+"</option>";prevLoc=r}E+="</optgroup>"}v.append(E)};x.UpdateFilterURL=function(v,E){E==0?quakelive.RemoveParam(v):quakelive.AddParam(v,E);quakelive.StopPathMonitor();v=quakelive.MergeParams(quakelive.params);window.location.hash=v.length>0?quakelive.path+";"+
v:quakelive.path;quakelive.StartPathMonitor()};x.UI_RefreshFilter=function(){var v=0;b(".filterbar_content select").each(function(E,y){y.options.selectedIndex!=0&&v++});v+=b("input[name='private']").fieldValue()[0];v>0?b(".filterbar_notice").css("visibility","visible"):b(".filterbar_notice").css("visibility","hidden")};x.SortOptions=function(v){for(var E=v.length,y=[],m=0;m<E;m++)y[m]={v:v[m].value,t:v[m].text};y.sort(function(r,A){r=r.t.toLowerCase();A=A.t.toLowerCase();return r==A?0:r<A?-1:1});
for(m=0;m<E;m++){v[m].text=y[m].t;v[m].value=y[m].v}};x.MatchContextMenuHandler=function(v,E){var y=E.data("info");switch(v){case "copy":qlPrompt({input:true,readonly:true,alert:true,title:"Link to this match",body:"Use the URL below to link to this match directly.",inputLabel:quakelive.siteConfig.baseUrl+"/r/home/join/"+y.public_id});break;case "join":E.dblclick();break;case "filter_map":x.filter.filters.arena=y.map;x.ReloadServerList();break;case "filter_location":x.filter.filters.location=y.location_id;
x.ReloadServerList();break;case "filter_gametype":x.filter.filters.game_type=y.game_type;x.ReloadServerList();break;case "filter_none":break;default:break}};x.InitContext=function(){if(quakelive.siteConfig.showContextMenus){var v=b(".qlv_pls_box, .qlv_pls_bestpick_box");v.contextMenu({menu:"serverContext",inSpeed:0,outSpeed:0},this.MatchContextMenuHandler)}};x.OnDownloadGroup=function(v){if(v.group==GROUP_DONE){v=quakelive.cvars.Get("web_configVersion");if(v.value<1){var E=[b(window).width(),b(window).height()],
y=[310,130];if(E[0]>=1024+y[0]&&E[1]>=768+y[1])quakelive.cvars.Set("r_inBrowserMode",12);else E[0]>=800+y[0]&&E[1]>=600+y[1]?quakelive.cvars.Set("r_inBrowserMode",9):quakelive.cvars.Set("r_inBrowserMode",5);SetCvar("web_configVersion",1)}if(v.value<2){SetBind("F3","readyup");SetBind("h","+chat");SetCvar("web_configVersion",2)}if(v.value<4){SetCvar("m_filter",0);SetCvar("web_configVersion",4)}if(v.value<5){SetCvar("cg_hitBeep",1);SetCvar("web_configVersion",5)}if(v.value<6){SetCvar("net_noipx",1);
SetCvar("web_configVersion",6)}if(v.value<7){SetCvar("net_noipx",0);SetCvar("web_configVersion",7)}if(v.value<8){v=[];v[2]=5;v[3]=13;v[4]=9;v[5]=21;v[6]=17;v[7]=26;E=["color1","color2"];for(var m in E){y=quakelive.cvars.GetIntegerValue(E[m],0);typeof v[y]!="undefined"&&SetCvar(E[m],v[y])}SetCvar("web_configVersion",8)}}};x.OnOverlayLoaded=function(v){if(v[0]=="home"&&v[1]=="crashed"){v=qz_instance.GetCrashReport();b("#crashed-report").val(v)}};x.Hook_OnGameStarted=function(){x.StopMatchRefresh()};
x.Hook_OnGameExited=function(){quakelive.activeModule==x&&x.ReloadServerList()};x.ShowServerListError=function(v){b("#qlv_postlogin_matches").html('<p class="tc thirtyPxTxt sixtypxv midGrayTxt">Unable to load the server list</p><p class="tc TwentyPxTxt midGrayTxt">'+v+'</p><p class="tc TwentyPxTxt midGrayTxt">Please try again in a few minutes&hellip;</p>');x.StopMatchRefresh();x.waitHandle=setTimeout(x.ReloadServerList,p*1E3)};x.StartWarmupGame=function(){qlXfer.currentGroup<GROUP_BASE||quakelive.mod_offlinegame.ReplayTrainingGame()};
x.ToggleFilterBar=function(){var v=b(".filterbar"),E=v.hasClass("filterbar_expanded"),y=b("#qlv_postlogin_matches").height();quakelive.matchtip.HideMatchTooltip();if(E){E=v.height();v.removeClass("filterbar_expanded");b("#qlv_postlogin_matches").css("height",y+E+"px");b(".filterbar_toggle").removeClass("selected")}else{v.addClass("filterbar_expanded");b("#qlv_postlogin_matches").css("height",y-v.height()+"px");b(".filterbar_toggle").addClass("selected")}};x.ResetBrowserFilter=function(){var v="Are you sure you want to reset to the default online games view?";
confirm(v)&&b.ajax({type:"get",url:"/home/filter/reset",mode:"abort",port:"filterreset",success:x.ResetBrowserFilter_Success,error:x.ResetBrowserFilter_Error})};x.ResetBrowserFilter_Success=function(){b(".filterbar_content select").each(function(v,E){E.options.selectedIndex=0;quakelive.RemoveParam(this.name);B(this)});b("#publicServer").attr("checked","checked");b(".filterbar_notice").css("visibility","hidden");quakelive.StopPathMonitor();window.location.hash="home";quakelive.StartPathMonitor();x.filter=
quakelive.Eval(x.defaultFilter);x.ReloadServerList()};x.ResetBrowserFilter_Error=function(){};x.SaveBrowserFilter=function(){b.ajax({type:"post",url:"/home/filter/update",mode:"abort",port:"filterupdate",dataType:"json",data:"filter_obj="+JSON.stringify(x.filter),success:x.SaveBrowserFilter_Success,error:x.SaveBrowserFilter_Error})};x.SaveBrowserFilter_Success=function(){var v=0;b(".filterbar_content select").each(function(E,y){y.options.selectedIndex!=0&&v++});b(".filterbar_notice > a").text("View has been saved.");
setTimeout(function(){b(".filterbar_notice > a").text("This view has been customized.")},5E3);v>0?b(".filterbar_notice").css("visibility","visible"):b(".filterbar_notice").css("visibility","hidden");x.ToggleFilterBar();x.savedFilter=x.filter};x.SaveBrowserFilter_Error=function(){};var K=null;x.ShowTour=function(){if(!K){var v={modal:true,overlay:75};K=b(x.TPL_TOUR_OVERLAY).appendTo("body").jqm(v)}K.jqmShow()};quakelive.RegisterModule("home",x)})(jQuery);
(function(b){var c={};c.TITLE="News";c.GetLayout=function(){return"postlogin"};c.ShowContent=function(o){quakelive.ShowContent(o);o=quakelive.pathParts.length>1?quakelive.pathParts[1]:"site_news";b(".qlv_newsNav .selected").removeClass("selected");b(".qlv_newsNav .nav_"+o).addClass("selected");addthis&&addthis.button(".addthis_button")};quakelive.RegisterModule("news",c)})(jQuery);
(function(b){function c(u,B,x,p,z,K){var v=quakelive.cvars.Get(u),E=b("#slider_"+u);z=z||100;p=p||1;B={min:B*z,max:x*z,stepping:p,value:z*v.value,change:function(y,m){SetCvar(u,m.value/z);K&&K(m.value/z)}};E.slider(B);K&&K(v.value)}function o(u,B){var x=quakelive.cvars.Get(u),p=b("#select_"+u).empty();for(u=0;u<B.length;u+=2){var z=b('<option value="'+B[u]+'">'+B[u+1]+"</option>");B[u]==x.value&&z.attr("selected","selected");p.append(z)}p.change(function(){SetCvar(p.attr("name"),p.val())})}function d(u,
B){var x=quakelive.cvars.Get(u);B||(B=[1,0]);var p=b("#"+u);x=x.value!=B[1];p.empty();p.append("On ");var z;z='<input type="radio" name="'+u.toLowerCase()+'" value="1" ';if(x)z+=' checked="checked" ';z+=" onclick=\"SetCvar('"+u+"', '"+B[0]+"')\" ";z+=" />";p.append(z);p.append(" &nbsp;&nbsp; ");p.append("Off ");z='<input type="radio" name="'+u.toLowerCase()+'" value="0" ';x||(z+=' checked="checked" ');z+=" onclick=\"SetCvar('"+u+"', '"+B[1]+"')\" ";z+=" />";p.append(z)}function e(){for(var u=0;u<
2;++u){var B="color"+(u+1);l[B]=b("#"+B+"_"+quakelive.cvars.Get(B,"1").value);l[B].addClass("selected")}}function g(){var u=quakelive.cvars.Get("cg_drawCrosshair","1");n=b("#crosshair_"+u.value);n.addClass("selected")}var k={};k.keyboardNode=null;k.overlayNode=null;k.Init=function(){window.OnInputEvent=k.OnInputEvent;k.keyboardNode=b(k.TPL_KEYBOARD);k.overlayNode=b(k.TPL_OVERLAY_CONTAINER)};k.OnDownloadGroup=function(u){u.group==GROUP_MINIMUM&&quakelive.cvars.LoadHardwareCvars()};k.LoadConfigPage=
function(){k.Nav("character")};k.LoadModels_Error=function(){b("#character_list").html("<div style='width: 200px; height: 200px; margin: 0 auto; text-align: center'>Failed to load model list.<br /><div style='cursor: pointer' onclick='quakelive.mod_prefs.LoadModels(); return false'>Click here to reload the list.</div></div>")};k.LoadModels_Success=function(u){if(u.ECODE==0){var B=b("#character_list").empty(),x=b("<div></div>");k.models=u;var p=quakelive.cvars.Get("model","sarge/default").value.toLowerCase().split("/"),
z=0,K,v;if(p.length==1){K=p[0];v="default"}else{K=p[0];v=p[1];if(v=="red"||v=="blue")v="default"}for(var E in u.MODELS){var y=u.MODELS[E];if(!(y.SKIN=="red"||y.SKIN=="blue")){if(y.MODEL==K&&y.SKIN==v)z=E;if(x.size()>8){B.append(x);x=b("<div></div>")}x.append("<a id='cfg_model_"+E+"' href='javascript:;' onclick='quakelive.mod_prefs.SelectPlayerModel("+E+"); return false'><img src='"+quakelive.resource("/images/players/icon_md/"+y.MODEL+"_"+y.SKIN+".jpg")+"' /></a>")}}B.append(x);k.SelectPlayerModel(z,
p[1])}else k.LoadModels_Error()};k.LoadModels=function(){k.models?k.LoadModels_Success(k.models):b.ajax({url:"/prefs/listmodels",mode:"abort",port:"listmodels",type:"post",dataType:"json",error:k.LoadModels_Error,success:k.LoadModels_Success})};var l={};k.SelectColor=function(u,B){l[u]&&l[u].removeClass("selected");l[u]=b("#"+u+"_"+B);l[u].addClass("selected");SetCvar(u,B)};var n=null;k.SelectCrosshair=function(u){n&&n.removeClass("selected");n=b("#crosshair_"+u);n.addClass("selected");SetCvar("cg_drawCrosshair",
u)};k.SelectPlayerModel=function(u,B){var x=k.models.MODELS[u],p=x.MODEL+"/"+x.SKIN;B=B||x.SKIN;var z=quakelive.cvars.Get("model").value.toLowerCase().split("/");if(z)if(z.length==1)z[1]="default";else{if(z[1]=="red"||z[1]=="blue")z[1]="default"}else z=["sarge","default"];p!=z.join("/")&&SetCvar("model",p);z=k.models.DETAILS[x.DETAILS_ID]||{RACE:"",DESC:""};b("#character_list").find(".selected").removeClass("selected");b("#cfg_model_"+u).addClass("selected");x.SKIN=="default"||x.SKIN=="blue"||x.SKIN==
"red"||x.SKIN=="sport"||x.SKIN=="bright"?b("#cfg_char_name").css("background","transparent url("+quakelive.resource("/images/player_names/"+x.MODEL+".png")+") no-repeat left top"):b("#cfg_char_name").css("background","transparent url("+quakelive.resource("/images/player_names/"+x.NAME+".png")+") no-repeat left top");b("#cfg_char_race").css("background","url("+quakelive.resource("/images/player_races/"+z.RACE+".png")+") no-repeat left top");b("#cfg_char_description").html(z.DESC);b("#cfg_char_body").css("background",
"url('"+quakelive.resource("/images/players/body_lg/"+x.MODEL+"_"+B+".png")+"') no-repeat 0 0");b("#cfg_char_redteam").html("<div class='interactive' style='width: 116px; height: 100px; background: url("+quakelive.resource("/images/players/body_sm/"+x.MODEL+"_red.png")+") center top no-repeat;'></div>").unbind("click").click(function(){k.SelectPlayerModel(u,"red");SetCvar("model",x.MODEL+"/red")});b("#cfg_char_blueteam").html("<div class='interactive' style='width: 116px; height: 100px; background: url("+
quakelive.resource("/images/players/body_sm/"+x.MODEL+"_blue.png")+") center top no-repeat;'></div>").unbind("click").click(function(){k.SelectPlayerModel(u,"blue");SetCvar("model",x.MODEL+"/blue")});b("#cfg_char_lgicon").css("background","url('"+quakelive.resource("/images/players/icon_xl/"+x.MODEL+"_"+x.SKIN+".jpg")+"') no-repeat 0 0").unbind("click").click(function(){k.SelectPlayerModel(u);SetCvar("model",p)});quakelive.SendModuleMessage("OnCharacterChanged",u)};var q={controls_movement:[["+forward",
"+back","+moveleft","+moveright"],["+moveup","+movedown","+speed","centerview"]],controls_actions:[["+attack","weapnext","weapprev","+zoom","+button2"],["messagemode","messagemode2","+button3","dropweapon","dropflag"]],controls_weapons:[["weapon 1","weapon 2","weapon 3","weapon 4","weapon 5","weapon 6"],["weapon 7","weapon 8","weapon 9","weapon 11","weapon 12","weapon 13"]]};k.OnInputEvent=function(u){if(u!="ESCAPE"){if(u=="BACKSPACE")k.targetBindKey!==undefined&&quakelive.binds.Remove(k.targetBindKey,
true);else quakelive.binds.Bind(u,k.targetBindAction);quakelive.cfgUpdater.Commit()}k.targetBindKey=k.targetBindKey2=k.targetBindAction=null;k.ShowKeyboard();k.ShowBinds(k.selectedNav);b("#qlv_site_popup").hide()};k.ShowBindPopup=function(u){var B=null;B=u.keys[0]&&u.keys[1]?'<span class="orangeTxt twentyfourPxTxt"><b>'+u.keys[0].toUpperCase()+"</b> and <b>"+u.keys[1].toUpperCase()+"</b></span>":u.keys[0]?'<span class="orangeTxt twentyfourPxTxt"><b>'+u.keys[0].toUpperCase()+"</b></span>":null;if(u.keys.length>
0)B='<span class="orangeTxt twentyfourPxTxt"><b>'+u.keys.join(", ").toUpperCase()+"</b></span>";k.targetBindKey=u.keys[0];k.targetBindKey2=u.keys[1];k.targetBindAction=u.action;u='<div id="assignKeyBox"><div class="tc twentyfourPxTxt" id="assignKeyInfo">Press your desired key or button for <span class="orangeTxt twentyfourPxTxt">"'+u.name+'"</span><br /><br /><p class="TwentyPxTxt">'+(B?"Current assignment: "+B:"")+'</p></div><div id="escapeText">Press <span class="bold">ESCAPE</span> to cancel or <span class="bold">BACKSPACE</span> to clear this binding.</div></div>';
b("#qlv_site_popup").html(u).css("z-index",99999).show();qz_instance.CaptureNextInputEvent()};k.StartBinding=function(u){(u=quakelive.binds.Get(u))&&k.ShowBindPopup(u)};k.keyNameToCSS={};k.HighlightBindsOnOtherPages=function(u){for(var B in q)if(B!=u)for(var x=0;x<2;++x){var p=q[B][x];for(var z in p){var K=p[z];K=quakelive.binds.Get(K);if(K.keys[0]){var v=k.keyNameToCSS[K.keys[0]]||K.keys[0].toUpperCase();b("#qlv_keyboard").find(".key_"+v).addClass("boundOtherPage")}if(K.keys[1]){v=k.keyNameToCSS[K.keys[1]]||
K.keys[1].toUpperCase();b("#qlv_keyboard").find(".key_"+v).addClass("boundOtherPage")}}}};k.ShowBindSection=function(u,B){var x="";for(var p in B){var z=B[p];z=quakelive.binds.Get(z);var K=null,v=z.keys.length;if(v===0)K="&nbsp;";else if(v===1)K=z.keys[0].toUpperCase();else if(v>=2)K=z.keys[v-1].toUpperCase()+" or "+z.keys[v-2].toUpperCase();if(v>2)K+=" (+"+(v-2)+" more)";x+='<div class="row"><div class="medlong fl twentypxh middleAlign">'+z.name+'</div><div class="fl middleAlign" style="cursor: pointer; width: 180px;" onclick="quakelive.mod_prefs.StartBinding(\''+
z.action+"', this); return false\">"+K+'</div><div class="cl"></div></div>';if(z.keys[0]){K=k.keyNameToCSS[z.keys[0]]||z.keys[0].toUpperCase();b("#qlv_keyboard").find(".key_"+K).addClass("boundThisPage")}if(z.keys[1]){K=k.keyNameToCSS[z.keys[1]]||z.keys[1].toUpperCase();b("#qlv_keyboard").find(".key_"+K).addClass("boundThisPage")}}b("#"+u).html(x)};k.ShowBinds=function(u){k.ShowBindSection(u+"_binds0",q[u][0]);k.ShowBindSection(u+"_binds1",q[u][1]);k.HighlightBindsOnOtherPages(u)};k.ShowKeyboard=
function(){k.keyboardNode.remove().appendTo(b(".keyboard_container"));b("#qlv_keyboard").find(".boundThisPage,.boundOtherPage").removeClass("boundThisPage").removeClass("boundOtherPage")};k.Nav=function(u){var B=b("#configContainer");switch(u){case "character":B.html(k.TPL_CHARACTER);k.LoadModels();break;case "settings_basic":B.html(k.TPL_SETTINGS_BASIC);e();g();c("s_volume",0,1,0.1,20,function(x){b("#effects_volume_value").text(parseInt(x*100)+"%")});c("s_musicvolume",0,1,0.1,20,function(x){b("#music_volume_value").text(parseInt(x*
100)+"%")});c("r_gamma",0,2,0.1,50,function(x){b("#brightness_value").text(parseInt(x*100)+"%")});d("r_fullscreen");d("cg_autoswitch");o("r_mode",[0,"320x240",1,"400x300",2,"512x384",3,"640x360",4,"640x400",5,"640x480",6,"800x450",7,"852x480",8,"800x500",9,"800x600",10,"1024x640",11,"1024x576",12,"1024x768",13,"1152x864",14,"1280x720",15,"1280x768",16,"1280x800",17,"1280x1024",18,"1440x900",19,"1600x900",20,"1600x1000",21,"1680x1050",22,"1600x1200",23,"1920x1080",24,"1920x1200",25,"1920x1440",26,
"2048x1536",27,"2560x1600",-2,"Maximum"]);o("r_inbrowsermode",[5,"640x480",9,"800x600",12,"1024x768"]);break;case "settings_advanced":B.html(k.TPL_SETTINGS_ADVANCED);d("s_doppler");d("cg_drawtargetnames");d("cg_playvoicechats");d("cg_showvoicetext");d("cg_allowtaunt");d("r_ext_compressed_textures");o("r_texturemode",["GL_LINEAR_MIPMAP_NEAREST","Bilinear","GL_LINEAR_MIPMAP_LINEAR","Trilinear"]);o("r_picmip",[2,"Low",1,"Normal",0,"High"]);o("r_lodbias",[2,"Low",1,"Medium",0,"High"]);o("r_vertexlight",
[1,"Vertex",0,"Lightmap"]);c("cg_fov",75,130,1,1,function(x){b("#fov_value").text(x+" degrees")});break;case "controls_actions":B.html(k.TPL_CONTROLS_ACTIONS);k.ShowKeyboard();k.ShowBinds(u);break;case "controls_movement":B.html(k.TPL_CONTROLS_MOVEMENT);k.ShowKeyboard();k.ShowBinds(u);break;case "controls_weapons":B.html(k.TPL_CONTROLS_WEAPONS);k.ShowKeyboard();k.ShowBinds(u);break;case "controls_mouse":B.html(k.TPL_CONTROLS_MOUSE);k.ShowKeyboard();d("m_pitch",[-0.022,0.022]);c("sensitivity",0,10,
1,10,function(x){b("#mouse_sens_value").text(x)});break}k.selectedNav=u};k.ResetDefaults=function(){if(confirm("This will reset ALL options to their default values. Are you sure you want to continue?")){qz_instance.SetHardwareCvars("");jQuery.ajax({cache:false,url:"/prefs/reset",success:function(){quakelive.PageRedirect("/user/login_redirect")},error:function(){},complete:function(){}})}};k.overlayVisible=false;k.ShowOverlay=function(){k.CloseOverlay();k.overlayNode.css("position","absolute");k.overlayNode.css("z-index",
"10001");var u=b("#qlv_OverlayContent");u.append(k.overlayNode);k.overlayVisible=true;k.LoadConfigPage()};k.CloseOverlay=function(){if(k.overlayVisible){k.overlayNode.remove();k.overlayVisible=false}};quakelive.RegisterModule("prefs",k)})(jQuery);
(function(b){function c(K){b(K).find(".ff_captcha_img").empty().html('<img src="/captcha.php?'+(new Date).getTime()+'" width="168" height="32" alt="" id="captcha_img" />')}function o(K,v){b(K).removeClass("ff_state_ok").addClass("ff_state_error").find(".ff_status_text").text(v)}function d(K,v){var E=b(".f_reg_nametag input").val();E.length!=0&&b.ajax({type:"post",url:"/register/verify/nametag",dataType:"json",data:{value:E},success:function(y){y.ECODE===0?K():v(y.MSG)}})}function e(K,v){var E=b(".f_reg_email input").val();
if(E.length!=0)isEmailValid(E)?b.ajax({type:"post",url:"/register/verify/email",dataType:"json",data:{value:E},success:function(y){y.ECODE===0?K():v(y.MSG)}}):v("Invalid email format")}function g(K,v){var E=b(".f_reg_captcha input").val();E.length!=0&&b.ajax({type:"post",url:"/register/verify/captcha",dataType:"json",data:{value:E},success:function(y){y.ECODE===0?K():v(y.MSG)}})}function k(K,v){var E=b(".f_reg_password input"),y=b(".f_reg_password2 input");E.val().length==0||y.val().length==0||(E.val()!=
y.val()?v("Passwords do not match"):K())}function l(K,v,E){var y=new Date;y=[1+y.getMonth(),y.getDate(),y.getFullYear()];K=[K,v,E];v=[];for(E=0;E<3;++E)v[E]=y[E]-K[E];if(v[0]<0||v[0]==0&&v[1]<0)v[2]--;return v[2]}function n(K,v){var E=b(".f_reg_birthdate .ff_select_month").val(),y=b(".f_reg_birthdate .ff_select_day").val(),m=b(".f_reg_birthdate .ff_select_year").val();if(!(E==0||y==0||m==0)){E=l(E,y,m);E<13?v("You must be at least 13 years old to sign up."):K()}}function q(K,v){b(K).each(function(E,
y){var m=b(y);if(v.type=="text"||v.type=="password"){var r=b(x[v.type]);b("label",r).text(v.title);b("input",r).focus(function(){if(!m.hasClass("ff_state_error")){b(".ff_status_text",r).html(v.help);r.addClass("ff_state_focus")}}).blur(function(){r.removeClass("ff_state_focus ff_state_error ff_state_ok");if(v.validate){var P=r;if(v.type=="password")P=b(".ff_type_password");v.validate(function(){P.removeClass("ff_state_error").addClass("ff_state_ok")},function(D){P.removeClass("ff_state_ok").addClass("ff_state_error");
b(".ff_status_text",P).html(D)})}}).attr("tabindex",v.tabindex||0).attr("name",v.name);v.maxlength&&b("input",r).attr("maxlength",v.maxlength);m.empty().append(r)}else if(v.type=="birthdate"){r=b(x[v.type]);b("label",r).text(v.title);var A;function J(){if(v.validate){var P=r;v.validate(function(){P.removeClass("ff_state_error").addClass("ff_state_ok")},function(D){P.removeClass("ff_state_ok").addClass("ff_state_error");b(".ff_status_text",P).html(D)})}}y=b(".ff_select_month",r).attr("tabindex",v.tabindex+
0).attr("name",v.name+"_month").change(J);A='<option value="0">Month</option>';var N="January|February|March|April|May|June|July|August|September|October|November|December".split("|");for(E=0;E<N.length;++E)A+='<option value="'+(E+1)+'">'+N[E]+"</option>";y.empty().append(A);y=b(".ff_select_day",r).attr("tabindex",v.tabindex+1).attr("name",v.name+"_day").change(J);A='<option value="0">Day</option>';for(E=0;E<31;++E)A+='<option value="'+(E+1)+'">'+(E+1)+"</option>";y.empty().append(A);y=b(".ff_select_year",
r).attr("tabindex",v.tabindex+2).attr("name",v.name+"_year").change(J);A='<option value="0">Year</option>';N=(new Date).getFullYear();for(E=0;E<100;++E)A+='<option value="'+(N-E)+'">'+(N-E)+"</option>";y.empty().append(A);m.empty().append(r)}else if(v.type=="captcha"){r=b(x[v.type]);b("label",r).text(v.title);b("input",r).focus(function(){if(!m.hasClass("ff_state_error")){b(".ff_status_text",r).html(v.help);r.addClass("ff_state_focus")}}).blur(function(){r.removeClass("ff_state_focus");if(v.validate){var P=
r;v.validate(function(){P.removeClass("ff_state_error").addClass("ff_state_ok")},function(D){P.removeClass("ff_state_ok").addClass("ff_state_error");b(".ff_status_text",P).html(D)})}}).attr("tabindex",v.tabindex||0).attr("name",v.name);m.empty().append(r);b(".btn_refresh",r).click(function(){c(K);b("input",r).val("").focus()});c(K)}})}function u(K){p.Release();if(quakelive.userstatus!="ACTIVE"){qlProcessing("Verifying Match Results","Please Wait&hellip;");var v={ACCOUNT_ACTIVE:false};b.ajax({url:"/register/training_done/"+
K,dataType:"json",success:function(E){v=E},error:function(){v.ACCOUNT_ACTIVE=false},complete:function(){if(v.ACCOUNT_ACTIVE){window.onbeforeunload=null;qlProcessing("Your Match has been Verified!","Activating Account&hellip;");setTimeout(function(){quakelive.PageRedirect("/user/login_redirect")},3E3)}else{EndGameMode();quakelive.mod_welcome.ShowSkillTestPrompt("Unable to Verify Skill Match")}}})}}var B={};B.GetLayout=function(){return quakelive.path=="register"?"prelogin":quakelive.IsLoggedIn()?"postlogin_bare":
"bare"};var x={text:'<div class="ff_type_text"><div class="ff_status_icon"></div><label></label><div class="ff_field_wrapper"><div class="ff_input_wrapper"><input type="text" /></div><div class="ff_status_text">&nbsp;</div></div></div>',password:'<div class="ff_type_password"><div class="ff_status_icon"></div><label></label><div class="ff_field_wrapper"><div class="ff_input_wrapper"><input type="password" /></div><div class="ff_status_text">&nbsp;</div></div></div>',captcha:'<div class="ff_type_captcha"><div class="ff_status_icon"></div><label></label><div class="ff_field_wrapper"><div class="ff_input_wrapper"><input type="text" /></div><div class="ff_captcha_img"></div><div class="cl"></div><div class="ff_status_text">&nbsp;</div></div><div class="ff_captcha_refresh"><a href="javascript:;" class="btn_refresh"></a></div></div>',
birthdate:'<div class="ff_type_birthdate"><div class="ff_status_icon"></div><label></label><div class="ff_field_wrapper"><div class="ff_input_wrapper"><select class="ff_select_month"></select></div><div class="ff_input_wrapper"><select class="ff_select_day"></select></div><div class="ff_input_wrapper"><select class="ff_select_year" style="margin: 0"></select></div><div class="cl"></div><div class="ff_status_text">&nbsp;</div></div></div>'};B.ShowContent=function(K){quakelive.ShowContent("");b("#qlv_OverlayContent").html(K);
if(quakelive.IsCompatibleBrowser()){q(".f_reg_email",{name:"email",title:"Email:",type:"text",help:"You will use this to log into QUAKE LIVE.",tabindex:1,validate:e});q(".f_reg_nametag",{name:"nametag",title:"Name Tag:",type:"text",help:"The name you will use while in-game.",maxlength:15,tabindex:2,validate:d});q(".f_reg_password",{name:"password",title:"Password:",type:"password",help:"6 char minimum, no spaces, can't start with 0.",validate:k,tabindex:3});q(".f_reg_password2",{name:"password2",
title:"Verify Password:",type:"password",help:"Confirm your password.",validate:k,tabindex:4});q(".f_reg_birthdate",{name:"birthdate",title:"Birthdate:",type:"birthdate",help:"",tabindex:5,validate:n});q(".f_reg_captcha",{name:"captcha",title:"Are you human?",type:"captcha",help:"Enter the code that appears in the image.",validate:g,tabindex:8});b(".f_reg_email input").focus()}else quakelive.Overlay("home/compat","quakelive.Goto('home'); return false")};var p=new qlLock("training");B.StartTraining=
function(){if(!(qlXfer.currentGroup<GROUP_BASE))if(!p.IsLocked()){p.Acquire();quakelive.AddOnceHook("OnGameExited",u);b.ajax({url:"/register/skiptraining",complete:function(){var K="+set bot_dynamicSkill 1 +set com_backgroundDownload 1 +set sv_quitOnExitLevel 1 +set bot_startingSkill 0 +set g_gametype 0 +map qztraining";LaunchGame(BuildCmdString()+K,"TRAIN")}})}};B.ShowRegistration=function(){if(quakelive.CheckBrowserCompat())quakelive.IsLoggedIn()?quakelive.Goto("home"):quakelive.Goto("register",
"returnto="+(quakelive.path=="register"?"home":quakelive.path))};var z=new qlLock("create_account");B.CreateAccount=function(){if(!z.IsLocked()){qlProcessing("Creating Your Account","Please Wait&hellip;");var K={},v=[],E={mailinglist:true},y=b("#qlv_newRegistrationContent input, #qlv_newRegistrationContent select");z.Acquire();y.each(function(){var r=b(this),A=this.tagName.toLowerCase();if(A=="input"){A=r.attr("type").toLowerCase();if(A=="checkbox"){K[this.name]=r.attr("checked")?1:0;K[this.name]==
0&&!E[this.name]&&v.push(r.parent())}else{K[this.name]=r.val();K[this.name].length==0&&!E[this.name]&&v.push(r.parent().parent().parent())}}else if(A=="select"){K[this.name]=parseInt(r.val());K[this.name]==0&&!E[this.name]&&v.push(r.parent().parent().parent())}});if(v.length>0){qlAlert("New Account Form is not Complete","Not all fields have been completed. Please fill out the entire form before submitting.");for(var m in v)o(v[m],"This field is required");z.Release()}else if(K.eula){b(".btn_register").addClass("btn_register_proc");
b.ajax({url:"/register/newuser",type:"post",data:K,dataType:"json",error:function(){qlAlert("Unable to Create Your Account","An error has occurred trying to create your account. Please try again in a little while.")},success:function(r){if(r.ECODE==0){qlProcessing("Successfully Created Your Account!","Please wait as we log you in&hellip;");quakelive.PageRedirect("/user/login_redirect")}else{var A=false;if(r.ERRORS)for(var J in r.ERRORS){var N=b(document.getElementById("register_form").elements[J]);
if(N.length){A=true;var P=N.parent().parent().parent();if(J=="birthdate")P=b(".ff_type_birthdate");else if(J=="password")P=b(".ff_type_password");P.length&&o(P,r.ERRORS[J]);if(J=="captcha"){N.val("");c(P)}}}A?qlHidePrompt():qlAlert("Unable to Create Your Account","An error has occurred trying to create your account. Please try again in a little while.")}},complete:function(){b(".btn_register").removeClass("btn_register_proc");z.Release()}})}else{qlAlert("New Account Form is not Complete","You must accept the QUAKE LIVE and Punkbuster Software License Agreement in order to create an account.");
z.Release()}}};B.Close=function(){function K(){quakelive.params.returnto?quakelive.Goto(quakelive.params.returnto):quakelive.Goto("home")}qlConfirm("Are you sure you want to close registration?","",K,null)};B.Logout=function(){qlConfirm("Are you sure you want to log out?","",quakelive.Logout,null)};B.InstallPlugin=function(){CreateCookie(ie_cookie_string,1,1);upgrade()};quakelive.RegisterModule("register",B)})(jQuery);
(function(b){function c(D){D=D.replace(/\&/g,"&amp;");D=D.replace(/\</g,"&lt;");return D=D.replace(/\>/g,"&gt;")}function o(D){this.bare=D;var I=D.indexOf("@");if(I!=-1)this.username=D.substring(0,I);else{this.username=D;this.bare=D+"@"+quakelive.siteConfig.xmppDomain}this.Clone=function(){return new o(this.bare)}}function d(){this.selectedContact=null;this.pendingRequests=[];this.fullRoster=[];this.rosterData={};this.ImportRoster=function(){var H=p();this.UI_Show();for(var L in H){var f=H[L],t=new o(L);
t=new e(t,f.NAME,f.SUBSCRIPTION,f.ONLINE?K.Available:K.Unavailable);N.AddContact(t);t.CanDisplayOnRoster()&&t.UI_PlaceInGroup(A.Online);if(f.SUBSCRIPTION==v.From){f={};f.jid=L;N.AddPendingRequest(f)}}if(quakelive.activeModule==z)if(quakelive.pathParts[1]=="manage")z.LoadManageItems();else quakelive.pathParts[1]=="pending"&&z.LoadPending()};this.ImportRosterData=function(H){N.rosterData=H;N.ImportRoster();N.UI_OnRosterUpdated();N.DisplayChatAreaHelp();quakelive.SendModuleMessage("IM_OnRosterChanged")};
this.GetIndexByJID=function(H){for(var L=-1,f=0;f<this.fullRoster.length;++f)if(this.fullRoster[f].jid.bare==H.bare){L=f;break}return L};this.GetContactByJID=function(H){H=this.GetIndexByJID(H);return H!=-1?this.fullRoster[H]:null};this.GetIndexByName=function(H){var L=-1;H=H.toLowerCase();for(var f=0;f<this.fullRoster.length;++f)if(this.fullRoster[f].name.toLowerCase()==H){L=f;break}return L};this.AddContact=function(H){var L=this.GetIndexByJID(H.jid);if(L==-1)this.fullRoster[this.fullRoster.length]=
H};this.AddPendingRequest=function(H){H=new o(H.jid);for(var L=0;L<this.pendingRequests.length;++L)if(this.pendingRequests[L].bare==H.bare)break;if(L==this.pendingRequests.length)this.pendingRequests[this.pendingRequests.length]=H;quakelive.pathParts[0]=="friends"&&quakelive.pathParts[1]=="pending"&&z.UI_AddPendingItem(H,-1)};this.HasPendingRequests=function(){return this.pendingRequests.length>0?true:false};this.RemoveContactByName=function(H){H=this.GetIndexByName(H);this.RemoveContactByIndex(H)};
this.RemoveContactByJID=function(H){H=this.GetIndexByJID(H);this.RemoveContactByIndex(H)};this.RemoveContactByIndex=function(H){var L=null;if(H!=-1){L=this.fullRoster[H];this.selectedContact==L&&this.DeselectContact();this.fullRoster=RemoveArrayIndex(this.fullRoster,H)}L&&L.UI_RemoveFromGroup()};this.GetIncomingValues=function(){for(var H=[],L=0;L<this.pendingRequests.length;L++)H.push(this.pendingRequests[L].bare.split("@")[0]);return H};this.GetOutgoingValues=function(){for(var H=[],L=0;L<this.fullRoster.length;++L)this.fullRoster[L].IsInvited()&&
H.push(this.fullRoster[L].name.toLowerCase());return H};this.DeselectContact=function(){if(this.selectedContact!=null){z.node.find("#im-chat").remove();this.selectedContact.OnDeselected();this.selectedContact=null}this.DisplayChatAreaHelp()};this.DisplayChatAreaHelp=function(){var H=b("<div style='padding: 60px 20px; text-align: center; line-height: 22px'></div>"),L="";if(this.fullRoster.length>0){L=["Tip: You can join a friend who is playing Quake LIVE by clicking the <img src='"+quakelive.resource("/images/im/icon_qz.png")+
"' /> icon next to their name.","Tip: You can find new friends to add to your roster by browsing the <a href='javascript:void(0)' onclick='quakelive.Goto(\"profile/summary/"+quakelive.username+"\")'>QUAKE LIVE Profile</a> pages."];L=L[Math.floor(Math.random()*L.length)]}else L="Your friends list is empty. Use the <a href='javascript:void(0)' onclick='quakelive.Goto(\"friends\")'>Friends Manager</a> to add friends to your Quake LIVE account.";H.append(L);z.node.find("#im-footer").html(H)};this.BindChatEvents=
function(H){z.node.find("#im-chat-close").click(function(){N.DeselectContact()});if(!H.isAdmin){var L=function(){var t=z.node.find("#chat-msg"),C=t.val();if(C.length>0){H.SendMessage(C);t.val("")}z.node.find("#chat-msg").focus()},f=z.node.find("#chat-msg").keyup(function(t){if(t.keyCode==13){L();t.preventDefault()}});quakelive.IsGameRunning()||f.focus();z.node.find("#im-chat-send").click(L)}};this.UnbindChatEvents=function(){z.node.find("#im-chat-close").unbind("click");z.node.find("#chat-msg").unbind("keyup");
z.node.find("#im-chat-send").unbind("click")};this.SelectContact=function(H){if(this.selectedContact==H)quakelive.IsGameRunning()||z.node.find("#chat-msg").focus();else{this.DeselectContact();this.selectedContact=H;H.OnSelected();H.isAdmin?z.node.find("#im-footer").html("<div id='im-chat'><div id='im-chat-close'></div><div id='im-chat-body'><div id='im-chat-body-bottom'></div></div></div>"):z.node.find("#im-footer").html("<div id='im-chat'><div id='im-chat-close'></div><div id='im-chat-body'><div id='im-chat-body-bottom'></div></div><input id='chat-msg' type='text' /><div id='im-chat-send'></div></div>");
this.UnbindChatEvents();this.BindChatEvents(H);for(var L=0;L<H.history.length;++L)H.AppendToHistory(H.history[L]);N.ScrollChatToBottom()}};this.ScrollChatToBottom=function(){var H=z.node.find("#im-chat-body");H.scrollTop(1E7)};var D=["You can join a friend who is playing by clicking the QUAKE LIVE icon next to their name.","Use the Duel Detective to quickly find a new game against someone at your skill level.","Your <a href='javascript:;' onclick='quakelive.Goto(\"profile/summary/%PLAYER_NICK%\"); return false'>QUAKE LIVE profile</a> displays your recent matches, awards, and <a href='javascript:;' onclick='quakelive.Goto(\"profile/stats/%PLAYER_NICK%\"); return false'>statistics.</a>"];
this.GetOverlayTip=function(){var H=D[Math.floor(Math.random()*D.length)];return H=H.replace(/%PLAYER_NICK%/g,quakelive.username)};this.SwapOverlayTip=function(){if(!(this.GetNumOnlineContacts()>0)){quakelive.IsGameRunning()||z.node.find("#im-overlay-footer").html("<p>"+this.GetOverlayTip()+"</p>");var H=this;setTimeout(function(){H.SwapOverlayTip()},3E4)}};var I=["QUAKE LIVE is 100% free to play. <a href='javascript:;' onclick='quakelive.mod_register.ShowRegistration(); return false'>Join now</a> to get started!",
"QUAKE LIVE allows you to quickly get into a game with your friends. <a href='javascript:;' onclick='quakelive.mod_register.ShowRegistration(); return false'>Join now!</a>","QUAKE LIVE will match you with equally skilled players. <a href='javascript:;' onclick='quakelive.mod_register.ShowRegistration(); return false'>Click here to join!</a>"];this.GetPreLoginTip=function(){return I[Math.floor(Math.random()*I.length)]};this.SwapPreLoginTip=function(){if(!(b("#chatfill-footer").size()==0||quakelive.IsLoggedIn())){b("#chatfill-footer").html("<p>"+
this.GetPreLoginTip()+"</p>");var H=this;setTimeout(function(){H.SwapPreLoginTip()},3E4)}};var R=this;quakelive.AddHook("OnLayoutLoaded",function(){R.SwapPreLoginTip();R.UI_ShowVert()});this.ui_state="";this.ui_advert_started=this.ui_advert_shown=false;this.UI_Show=function(){var H="";H=this.GetNumOnlineContacts()>0?"friends":"nofriends";if(this.ui_advert_shown){if(H!=this.ui_state){switch(H){case "friends":this.UI_ShowApp();break;case "nofriends":this.UI_ShowOverlay();break}this.ui_state=H}}else this.UI_ShowVert()};
this.UI_FinishAnimateVert=function(){if(this.ui_advert_handle){clearTimeout(this.ui_advert_handle);this.ui_advert_handle=null}R.ui_advert_shown=true;R.UI_Show()};this.UI_StartAnimateVert=function(){var H=this,L=1.25;this.ui_advert_handle=setTimeout(function(){b("#spon_large_vert").animate({height:"0px"},600*L,"linear",function(){b("#spon_large_vert").remove();b("#spon_vert").show().css("overflow","hidden").css("height","0").animate({height:"260px"},260*L,"linear",function(){b("#post_spon_content").slideUp(0).slideDown(400);
H.UI_FinishAnimateVert()})})},4E3)};this.UI_ShowVert=function(){if(!this.ui_advert_started){if(b("#spon_large_vert").length!=0){this.ui_advert_started=true;var H=this,L=[];if(quakelive.IsLoggedIn())L[L.length]={zone:quakelive.VERT_ZONES.sidebar_half_page_ad,display:function(f,t,C){if(C){b("#spon_large_vert").remove();b("#spon_vert,#spon_vert .ql_vert_frame,#post_spon_content").show();H.UI_FinishAnimateVert()}else{b("#spon_large_vert").empty().append(t);H.UI_StartAnimateVert()}}};quakelive.FillVertList(L);
quakelive.LoadVerts(L,{timeout:1500})}quakelive.HookVertLoading()}};this.UI_ShowOverlay=function(){z.node.html("<div id='im-overlay-header'></div><div id='im-overlay-body'><p>Finding friends and opponents is EASY!  <a href='javascript:;' onclick='quakelive.Goto(\"friends/search\"); return false'>Click here to start your search.</a><a class='btn_friends' href='javascript:;' onclick='quakelive.Goto(\"friends/search\"); return false'></a>Click the button above to access the friends manager and <a href='javascript:;' onclick='quakelive.Goto(\"friends/search\"); return false'>add more players to your friends list</a>.</div><div id='im-overlay-footer'></div>");
this.SwapOverlayTip();z.FitToParent()};this.UI_ShowApp=function(){z.node.html(z.TPL_FRIENDS_LIST);for(var H in this.fullRoster){var L=this.fullRoster[H];L.CanDisplayOnRoster()&&L.group!=A.None&&L.UI_PlaceInGroup(L.group,true)}z.FitToParent()};this.GetNumOnlineContacts=function(){var H=0;for(var L in this.fullRoster)this.fullRoster[L].CanDisplayOnRoster()&&H++;return H};this.UI_OnRosterUpdated=function(){var H=this.GetNumOnlineContacts();this.UI_Show();if(H>0)z.node.find("#im-header").html("<span>"+
H+" friend"+(H==1?"":"s")+" online</span>")}}function e(D,I,R,H){this.jid=D.Clone();this.name=I||this.jid.username;this.unreadMsgCount=0;this.presence=H;this.subscription=R;this.history=[];this.group=A.None;D=N.rosterData[this.name.toLowerCase()];this.player_id=0;this.player_nick=this.name;this.clan="";this.last_online_date=this.last_online=this.join_date=null;this.bio="";this.inGame=false;this.prevServerID=0;this.model="sarge";this.skin="default";this.country="US";this.country_name="United States";
this.node=I=l(this.name);this.icons=new PlayerIconSet("sarge","default");this.UpdateDetails=function(L){this.player_id=L.PLAYER_ID;this.player_nick=L.PLAYER_NICK;this.clan=L.PLAYER_CLAN;this.join_date=L.JOIN_DATE;this.last_online=L.LAST_ONLINE;this.last_online_date=L.LAST_ONLINE_DATE;this.bio=L.BIO;this.icons=new PlayerIconSet(L.MODEL,L.SKIN);this.model=L.MODEL;this.skin=L.SKIN;this.country=L.COUNTRY_ABBREV;this.country_name=L.COUNTRY_NAME};this.DisplayChatIcon=function(){var L=this,f=b("<a href='javascript:;'></a>").bind("click",
function(t){quakelive.Goto("profile/summary/"+L.player_nick);t.stopPropagation()}).append(this.icons.small);this.node.find(".rosteritem-playericon").empty().append(f)};D&&this.UpdateDetails(D);D="<span class='player_name'>";if(this.clan)D+="<small>"+StripColors(this.clan)+"</small>";D+=this.player_nick;D+="</span>";this.node.find(".rosteritem-name").html(D);this.CanDisplayOnRoster=function(){return this.presence!=K.Unavailable&&this.subscription==v.Both};this.IsSubscribed=function(){return this.subscription==
v.Both};this.IsInvited=function(){return this.subscription==v.NoneOut||this.subscription==v.To};this.IsOnline=function(){return this.presence!=K.Unavailable&&this.presence!=K.Unknown&&this.subscription==v.Both};this.StartInactivityTimeout=function(){this.timeoutHandle&&clearTimeout(this.timeoutHandle);var L=this;this.timeoutHandle=setTimeout(function(){if(N.selectedContact!=L){if(L.group==A.Active){L.CanDisplayOnRoster()?L.UI_PlaceInGroup(A.Online):L.UI_RemoveFromGroup();L.timeoutHandle=null}}else L.StartInactivityTimeout()},
18E4)};this.ReceivedMsg=function(L){this.UI_PlaceInGroup(A.Active);N.selectedContact==null&&N.SelectContact(this);this.history[this.history.length]={origin:1,msg:L};if(N.selectedContact==this){this.AppendToHistory(this.history[this.history.length-1]);N.ScrollChatToBottom()}else{this.unreadMsgCount++;this.unreadMsgCount==1&&this.node.addClass("chat-unread")}this.StartInactivityTimeout()};this.SendMessage=function(L){quakelive.Tick();this.history[this.history.length]={origin:0,msg:L};this.AppendToHistory(this.history[this.history.length-
1]);N.ScrollChatToBottom();this.group!=A.Active&&this.UI_PlaceInGroup(A.Active);this.StartInactivityTimeout();qz_instance.IM_SendMessage(this.jid.bare,L)};this.prevChatOrigin=-1;this.prevChatNode=null;this.AppendToHistory=function(L){var f="";if(quakelive.cvars.GetIntegerValue("web_chattimestamps")){f=new Date;var t=ZeroPad(f.getMinutes()),C=ZeroPad(f.getSeconds());f='<span class="chat-timestamp">('+f.getHours()+":"+t+":"+C+")</span> "}if(this.prevChatOrigin!=L.origin){t=b("<div></div>");if(L.origin==
0){t.attr("class","chat-history-me");t.append(quakelive.mod_home.playericons.medium);t.append("<h1>"+quakelive.username+"</h1>")}else{t.attr("class","chat-history-them");t.append(this.icons.medium);t.append("<h1>"+this.player_nick+"</h1>")}t.append("<div>"+f+c(L.msg)+"</div>");this.prevChatNode=t;z.node.find("#im-chat-body-bottom").before(this.prevChatNode);this.prevChatOrigin=L.origin}else this.prevChatNode.children("div").append("<br />"+f+c(L.msg))};this.FriendsContextMenuHandler=function(L,f){f=
f.data("contact");switch(L){case "premenu":f.inGame===true?b("#friendsContext").enableContextMenuItems("#join,#copy"):b("#friendsContext").disableContextMenuItems("#join,#copy");break;case "join":join_server(f.gameStatus.ADDRESS,f.gameStatus.SERVER_ID);break;case "copy":qlPrompt({input:true,readonly:true,alert:true,title:"Link to this match",body:"Use the URL below to link to this match directly.",inputLabel:quakelive.siteConfig.baseUrl+"/r/home/join/"+f.gameStatus.PUBLIC_ID});break;case "send":N.SelectContact(f);
break;case "view":quakelive.StopPathMonitor();quakelive.Goto("profile/summary/"+f.player_nick);quakelive.StartPathMonitor();break;default:break}};this.InitContextMenu=function(){if(quakelive.siteConfig.showContextMenus){this.node.data("contact",this);this.node.contextMenu({menu:"friendsContext",inSpeed:0,outSpeed:0},this.FriendsContextMenuHandler)}};this.UI_PlaceInGroup=function(L,f){f||N.UI_Show();this.DisplayChatIcon();if(f||this.group!=L){f=this.group;this.UI_RemoveFromGroup();this.group=L;var t=
this;this.node.click(function(){N.SelectContact(t)}).appendTo(z.node.find("#im-"+L+" .itemlist"));this.InitContextMenu();z.UI_SortRoster(L);z.node.find("#im-"+L).show();this.UI_SetGameStatus(this.gameStatus);this.group==A.None&&N.selectedContact==t&&N.DeselectContact();if(!N.skipNotices&&this.group==A.Online&&(f==A.Offline||f==A.None))quakelive.notifier.Notify(quakelive.notifier.ContactPresenceNotice(this.player_nick,this.icons))}};this.UI_RemoveFromGroup=function(){if(this.group!=A.None){!this.node[0].nextSibling&&
!this.node[0].previousSibling&&z.node.find("#im-"+this.group).hide();this.node.remove();this.group=A.None}};this.UI_SetGameStatus=function(L){var f=this.node.children(".rosteritem-gameicon").empty();this.gameStatus=b.extend({},L);this.gameStatus.SERVER_ID=parseInt(this.gameStatus.SERVER_ID);this.gameStatus.BOT_GAME=parseInt(this.gameStatus.BOT_GAME);this.gameStatus.PUBLIC_ID=parseInt(this.gameStatus.PUBLIC_ID);this.inGame=false;if(this.gameStatus.BOT_GAME){this.inGame=true;L=b('<img src="'+quakelive.resource("/images/im/icon_botmatch.png")+
'" style="cursor: pointer" id="icon_'+this.jid.username+'" />');quakelive.matchtip.BindBotTooltip(L,this.gameStatus);f.append(L)}else if(this.gameStatus.SERVER_ID>0){this.inGame=true;L=b('<img src="'+quakelive.resource("/images/im/icon_qz.png")+'" style="cursor: pointer" id="icon_'+this.jid.username+'" />');quakelive.matchtip.BindMatchTooltip(L,this.gameStatus.SERVER_ID);f.append(L);if(this.gameStatus.SERVER_ID!=0&&this.prevServerID!=this.gameStatus.SERVER_ID){this.prevServerID=this.gameStatus.SERVER_ID;
quakelive.notifier.Notify(quakelive.notifier.FriendInGameNotice(this.player_nick,this.icons.modelskin,this.gameStatus.ADDRESS,this.gameStatus.SERVER_ID,this.gameStatus.MAP))}}};this.OnSelected=function(){this.node.addClass("rosteritem-selected");this.node.removeClass("chat-unread");this.unreadMsgCount=0;this.prevChatOrigin=-1;this.prevChatNode=null};this.OnDeselected=function(){this.node.removeClass("rosteritem-selected")}}function g(D,I,R,H,L){this.id=D;this.name=I;this.status=R;this.met=H;this.game=
L;this.node=D=new l(this.name);this.icons=new PlayerIconSet("sarge","default");var f=this;b.ajax({url:"/friends/details/"+this.name,dataType:"json",success:function(t){f.icons=new PlayerIconSet(t.MODEL,t.SKIN);f.node.find(".rosteritem-playericon").html(f.icons.small)}});this.UI_PlaceInGroup=function(t){this.node.click(function(){quakelive.Goto("profile/summary/"+this.name)}).appendTo(z.node.find("#im-"+t+" .itemlist"));z.node.find("#im-"+t).show()}}function k(D,I){this.jid=D.Clone();this.name=I;this.history=
[];this.group=A.None;this.unreadMsgCount=0;this.isAdmin=true;var R=n(this.name);this.node=R;this.StartInactivityTimeout=function(){this.timeoutHandle&&clearTimeout(this.timeoutHandle);var H=this;this.timeoutHandle=setTimeout(function(){if(R.attr("id")!="rosteralert-selected"){if(H.group==A.Active)if(H.group==A.Active){H.UI_RemoveFromGroup();H.timeoutHandle=null}}else H.StartInactivityTimeout()},15E3)};this.ReceivedMsg=function(H){this.UI_PlaceInGroup(A.Active);N.selectedContact==null&&N.SelectContact(this);
this.history[this.history.length]={origin:1,msg:H};if(N.selectedContact==this){this.AppendToHistory(this.history[this.history.length-1]);N.ScrollChatToBottom()}else{this.unreadMsgCount++;this.unreadMsgCount==1&&this.node.addClass("chat-unread")}this.StartInactivityTimeout()};this.prevChatOrigin=-1;this.prevChatNode=null;this.AppendToHistory=function(H){if(this.prevChatOrigin!=H.origin){var L=b("<div></div>");if(H.origin==0){L.attr("class","chat-history-me");L.append(quakelive.mod_home.playericons.medium);
L.append("<h1>"+quakelive.username+"</h1>")}else{L.attr("class","chat-history-them");L.append("<h1>"+this.name+"</h1>")}L.append("<div>"+c(H.msg)+"</div>");this.prevChatNode=L;z.node.find("#im-chat-body-bottom").before(this.prevChatNode);this.prevChatOrigin=H.origin}else this.prevChatNode.children("div").append("<br />"+c(H.msg))};this.UI_PlaceInGroup=function(H,L){if(L||this.group!=H){this.UI_RemoveFromGroup();this.group=H;var f=this;this.node.click(function(){N.SelectContact(f)}).appendTo(z.node.find("#im-"+
H+" .itemlist"));z.UI_SortRoster(H);z.node.find("#im-"+H).show()}};this.UI_RemoveFromGroup=function(){if(this.group!=A.None){!this.node[0].nextSibling&&!this.node[0].previousSibling&&z.node.find("#im-"+this.group).hide();this.node.remove();this.group=A.None}};this.OnSelected=function(){this.node.attr("id","rosteralert-selected");this.node.removeClass("chat-unread");this.unreadMsgCount=0;this.prevChatOrigin=-1;this.prevChatNode=null};this.OnDeselected=function(){this.node.removeAttr("id")}}function l(D){this.name=
D;D=b("<div class='rosteritem'></div>");D.append("<span class='rosteritem-playericon'></span>");D.append("<span class='rosteritem-name'>"+this.name+"</span>");D.append("<span class='rosteritem-gameicon'></span>");return D}function n(D){this.name=D;switch(D){case J.Admin:this.img="titleLiveAdmin.png";break;case J.Broadcast:this.img="titleLiveMessage.png";break;case J.QLive:this.img="titleQuakeLiveTeam.png";break;default:this.img="titleLiveMessage.png";break}D=b("<div class='rosteralert'></div>");D.append("<span><img src='"+
quakelive.resource("/images/im/"+img)+"' width='300' height='21' /></span>");return D}function q(D){this.listname=D;this.privItems=[];this.ImportPrivList=function(I){for(var R=this.privItems.length=0;R<I.items.length;R++){var H=I.items[R];H=new u(H);this.AddItem(H)}qz_instance.IM_ActivatePrivacyList(E)};this.AddItem=function(I){var R=this.GetIndexByValue(I.value);if(R==-1)this.privItems[this.privItems.length]=I};this.RemoveItemByValue=function(I){I=this.GetIndexByValue(I);if(I!=-1)this.privItems=
RemoveArrayIndex(this.privItems,I)};this.GetIndexByValue=function(I){for(var R=-1,H=0;H<this.privItems.length;++H)if(this.privItems[H].value==I){R=H;break}return R};this.GetItemByValue=function(I){I=this.GetIndexByValue(I);return I!=-1?this.privItems[I]:null};this.GetValueList=function(){for(var I=[],R=0;R<this.privItems.length;++R)I.push(this.privItems[R].value.split("@")[0]);return I};this.SaveList=function(){if(this.privItems.length>0){var I={};I.items=this.privItems;I.name=E;qz_instance.IM_SetPrivacyList(E,
JSON.stringify(I));qz_instance.IM_ActivatePrivacyList(E)}else qz_instance.IM_RemovePrivacyList(E)};this.BlockUser=function(I){var R=this.GetIndexByValue(I);if(R>-1)this.privItems[R].action=y.Deny;else{I=new o(I.toLowerCase());I={type:"jid",action:y.Deny,packet:15,value:I.bare};I=new u(I);this.AddItem(I)}this.SaveList()};this.UnblockUser=function(I){this.GetIndexByValue(I);I=new o(I.toLowerCase());this.RemoveItemByValue(I.bare);this.SaveList()}}function u(D){this.action=D.action;this.packet=D.packet;
this.type=D.type;this.value=D.value}function B(){b(".qlv_inviteEmails > input").length==1?b(".qlv_title:eq(1)").text("Invite sent!"):b(".qlv_title:eq(1)").text("Invites sent!");b(".qlv_title:eq(1)").show();b(".qlv_inviteEmails > input:gt(0)").remove();b(".qlv_inviteEmails > input:eq(0)").val("");b(".qlv_inviteSubject").val("");b(".qlv_inviteMessage").val("")}function x(){var D=true,I=0;b(".qlv_inviteEmails > input").each(function(){if(b(this).val().length>0){if(!isEmailValid(b(this).val())){D=false;
b(this).effect("highlight",{color:"#FF0000"},3E3)}I++}});if(I==0){D=false;b(".qlv_title:eq(1)").text("Entering an email address is the point of this procedure.")}else D||b(".qlv_title:eq(1)").text("The following don't seem to be email addresses.");return D}function p(){var D=qz_instance.IM_GetRoster();return quakelive.Eval(D)||{}}var z={},K={Unknown:0,Available:1,Chat:2,Away:3,Dnd:4,Xa:5,Unavailable:6},v={None:0,NoneOut:1,NoneIn:2,NoneOutIn:3,To:4,ToIn:5,From:6,FromOut:7,Both:8},E="quakelive",y={Allow:"allow",
Deny:"deny"},m={StoreSuccess:0,ActivateSuccess:1,DefaultSuccess:2,RemoveSuccess:3,RequestNamesSuccess:4,RequestListsSuccess:5,Conflict:6,ItemNotFound:7,BadRequest:8,UnknownError:9},r=null,A={None:"",Online:"online",Offline:"offline",Active:"active",Recent:"recent"},J={None:"",Admin:"admin",QLive:"quake_live",Broadcast:"broadcast"},N=z.roster=new d,P=z.privlist=new q(E);z.Init=function(){var D="<div id='im'></div>";z.node=b(D)};z.LAYOUT="postlogin";z.TITLE="Friends";z.ShowContent=function(D){b("#qlv_contentBody").html(D);
D="";switch(quakelive.pathParts[1]){case "manage":D="No Friends to Manage";z.UI_SetupEmptyMessage(D);z.LoadManageItems();break;case "incoming":D="No Invites Received";z.UI_SetupEmptyMessage(D);z.LoadIncoming();break;case "outgoing":D="No Invites Outstanding";z.UI_SetupEmptyMessage(D);z.LoadOutgoing();break;case "search":if(quakelive.pathParts[2])switch(quakelive.pathParts[2]){case "email":z.UI_SetupSearchContacts();break;case "invite":z.UI_SetupInvite();break}else z.UI_SetupSearchKeyword();break;
case "unblock":D="No Players Blocked";z.UI_SetupEmptyMessage(D);z.LoadBlockItems();break}};z.LoadManageItems=function(){if(N.fullRoster.length==0)b("#fr_empty").show();else for(var D=0;D<N.fullRoster.length;D++)N.fullRoster[D].IsSubscribed()&&z.UI_AddManagedItem(N.fullRoster[D])};z.LoadIncoming=function(){b.ajax({url:"/friends/outgoing/items",type:"POST",data:{users:JSON.stringify(N.GetIncomingValues())},dataType:"json",success:function(D){if(D.ECODE==0)if(D.PENDING.length==0)b("#fr_empty").show();
else for(var I=0;I<D.PENDING.length;I++)z.UI_AddIncomingItem(D.PENDING[I])}})};z.LoadOutgoing=function(){b.ajax({url:"/friends/outgoing/items",type:"POST",data:{users:JSON.stringify(N.GetOutgoingValues())},dataType:"json",success:function(D){if(D.ECODE==0)if(D.PENDING.length==0)b("#fr_empty").show();else for(var I=0;I<D.PENDING.length;I++)z.UI_AddOutgoingItem(D.PENDING[I])}})};z.LoadBlockItems=function(){P.privItems.length>0?b.ajax({url:"/friends/unblock/items",type:"POST",data:{users:JSON.stringify(P.GetValueList())},
dataType:"json",success:function(D){if(D.ECODE==0)if(D.BLOCKED.length==0)b("#fr_empty").show();else for(var I=0;I<D.BLOCKED.length;I++)z.UI_AddBlockedItem(D.BLOCKED[I])}}):b("#fr_empty").show()};z.FitToParent=function(){var D={"#im-body":250,"#im-overlay-body":116},I=z.node.parent().innerHeight();for(var R in D){var H=I-D[R];z.node.find(R).css("height",H+"px")}};z.MoveTo=function(D){D=b(D);z.node.parentNode&&z.node.remove();z.node.appendTo(D);setTimeout(function(){z.FitToParent()},100)};z.IsOnRoster=
function(D){return N.GetIndexByName(D)!=-1};z.IsBlocked=function(D){if(!P.privItems.length>0)return false;D=D.toLowerCase();D=new o(D);var I=P.GetItemByValue(D.bare);if(I!=null)if(I.type=="jid"&&I.value==D.bare)return true;return false};z.BlockPlayer=function(D){P.BlockUser(D+"@"+quakelive.siteConfig.xmppDomain)};z.UnblockPlayer=function(D){P.UnblockUser(D+"@"+quakelive.siteConfig.xmppDomain)};z.GetRecentPlayers=function(){b.ajax({url:"/friends/recent",dataType:"json",success:function(D){if(D.PLAYERS!=
"NO_DATA"){var I=D.PLAYERS;I.sort(function(H,L){H=H.PLAYER_NICK;L=L.PLAYER_NICK;return H<L?-1:H>L?1:0});for(i=0;i<I.length;i++){var R=new g(D.PLAYERS[i].PLAYER_ID,D.PLAYERS[i].PLAYER_NICK,D.PLAYERS[i].STATUS,D.PLAYERS[i].DATE_MET,D.PLAYERS[i].PUBLIC_ID);R.UI_PlaceInGroup(A.Recent)}}}})};z.ImportRosterData=function(){b.ajax({url:"/friends/manage/items",dataType:"json",success:N.ImportRosterData})};z.ValidateSubscribe=function(D){b.ajax({url:"/friends/validate/"+D,dataType:"text",mode:"queue",port:"friends",
success:function(I){I>0&&quakelive.mod_friends.Subscribe(D)}})};z.SendMailInvites=function(){var D=x();if(D){var I=[];b(".qlv_inviteEmails > input").each(function(){b(this).val().length>0&&I.push(b(this).val())});b.ajax({url:"/friends/mail",type:"POST",dataType:"json",data:"emails="+JSON.stringify(I)+"&subject="+b(".qlv_inviteSubject").val()+"&msg="+b(".qlv_inviteMessage").val(),success:function(){B()}})}else b(".qlv_title:eq(1)").show()};z.SendSearchKeywordRequest=function(D,I){b.ajax({url:"/friends/search_items/"+
D+"/100/1/"+I,dataType:"json",success:function(R){if(R.ECODE==0){R=R.MSG;var H=true;b(".qlv_resultsTable > tbody").empty();b(".qlv_searchFormResultsSummary").text(R.length+' Member(s) found containing "'+jQuery.trim(b(".qlv_keywordInput").val())+'".');b(".qlv_keywordInput").val("");R.length>0?b(".qlv_resultsListNA").hide():b(".qlv_resultsListNA").show();for(var L=0;L<R.length;L++){var f;f=H==true?b('<tr class="odd"></tr>'):b("<tr></tr>");var t=new PlayerIconSet(R[L].MODEL,R[L].SKIN);f.append("<td></td>");
f.find("td").append(t.small);f.append("<td>"+R[L].PLAYER_NICK+"</td>");R[L].STATUS==1?f.append('<td><img alt="" src="'+quakelive.resource("/images/sf/friends/online_icon.gif")+'"/></td>'):f.append("<td></td>");f.append("<td>"+FormatTimeDelta(R[L].LAST_ONLINE)+"</td>");f.append("<td>"+(R[L].FNAME||"")+"</td>");f.append('<td><a class="qlv_btnSearchView" href="javascript:;" onclick="quakelive.Goto(\'profile/summary/'+R[L].PLAYER_NICK+"'); return false\" /></td>");if(z.IsOnRoster(R[L].PLAYER_NICK.toLowerCase())||
R[L].PLAYER_NICK.toLowerCase()==quakelive.username.toLowerCase())f.append('<td><img alt="" src="'+quakelive.resource("/images/sf/friends/plus_icon_gray.gif")+'"/></td>');else{t=b('<a class="qlv_btnSearchAdd" href="javascript:;" onclick="quakelive.mod_friends.Subscribe(\''+R[L].PLAYER_NICK.toLowerCase()+"');\" />");t.click(function(){b(this).parent("td").parent("tr").effect("pulsate",{times:1},1E3);b(this).replaceWith('<img src="'+quakelive.resource("/images/sf/friends/plus_icon_gray.gif")+'"/>');
b(this).attr("onclick","");b(this).unbind();return false});t=b("<td></td>").append(t);f.append(t)}b(".qlv_resultsTable > tbody").append(f);H==true?(H=false):(H=true)}}}})};z.AnswerSubscriptionRequest=function(D,I){for(var R=D.split("@")[0],H=N.pendingRequests,L=0;L<H.length;++L)if(H[L].username==R)break;N.pendingRequests=RemoveArrayIndex(H,L);if(quakelive.pathParts[0]=="friends"&&(quakelive.pathParts[1]=="incoming"||quakelive.pathParts[1]=="outgoing"))z.UI_RemoveItem(D);qz_instance.IM_AnswerSubscribeRequest(R,
I?1:0)};z.Subscribe=function(D){D.toLowerCase()!=quakelive.username.toLowerCase()&&qz_instance.IM_Subscribe(D)};z.Unsubscribe=function(D){D=new o(D);qz_instance.IM_Unsubscribe(D.bare)};z.IM_GetPrivacyListNames=function(){qz_instance.IM_GetPrivacyListNames()};z.IM_GetPrivacyList=function(D){qz_instance.IM_GetPrivacyList(D)};z.IM_RemovePrivacyList=function(D){qz_instance.IM_RemovePrivacyList(D)};z.UI_SetupEmptyMessage=function(D){b("#qlv_friendListContainer").append('<p id="fr_empty" style="display:none;" class="tc thirtyPxTxt sixtypxv midGrayTxt">'+
D+"</p>")};z.UI_AddManagedItem=function(D){b("#fr_empty").hide();var I=z.TPL_MANAGE_ITEM;I=jQuery(I);I.attr("id",D.jid.bare);I.find(".head_icon").css("background","url("+quakelive.resource("/images/players/icon_lg/"+D.model+"_"+D.skin+".jpg")+") no-repeat");I.find(".player_name > a").html("<span class='clan'>"+StripColors(D.clan)+"</span>"+D.player_nick);I.find(".player_name > img").attr("src",quakelive.resource("/images/flags/"+D.country.toLowerCase()+".gif"));I.find(".player_name > img").attr("title",
D.country_name);if(D.IsOnline()){I.find(".online").show();I.find(".info_left").html("<b>Online Now!</b>")}else I.find(".info_left").html('<b>Last online:</b> <span title="'+D.last_online_date+'">'+FormatTimeDelta(D.last_online)+" ago</span>");if(D.bio)I.find(".info_middle").html(D.bio);else{I.find(".info_middle").html("<b>This person has no bio entered yet.  </b>");I.find(".info_middle > b").after('To view more data on this user click the "view profile" button.')}I.find(".head_icon").click(function(){quakelive.Goto("profile/summary/"+
D.name)});I.find(".player_name > a").click(function(){quakelive.Goto("profile/summary/"+D.name)});I.find(".btn_fr_view_profile").click(function(){quakelive.Goto("profile/summary/"+D.name)});I.find(".btn_fr_delete_friend").click(function(){var R="Are you sure you want to remove this friend?";if(confirm(R)){z.UI_RemoveItem(D.jid.bare);z.Unsubscribe(D.jid.bare)}});b("#qlv_friendListContainer").append(I)};z.UI_AddIncomingItem=function(D){b("#fr_empty").hide();var I=z.TPL_INCOMING_ITEM;I=jQuery(I);var R=
new o(D.PLAYER_NICK.toLowerCase());I.attr("id",R.bare);I.find(".head_icon").css("background","url("+quakelive.resource("/images/players/icon_lg/"+D.MODEL+"_"+D.SKIN+".jpg")+") no-repeat");I.find(".player_name > a").html("<span class='clan'>"+StripColors(D.PLAYER_CLAN)+"</span>"+D.PLAYER_NICK);I.find(".player_name > img").attr("src",quakelive.resource("/images/flags/"+D.COUNTRY_ABBREV.toLowerCase()+".gif"));I.find(".player_name > img").attr("title",D.COUNTRY_NAME);if(D.STATUS==1){I.find(".online").show();
I.find(".info_left").html("<b>Online Now!</b>")}else I.find(".info_left").html('<b>Last online:</b> <span title="'+D.LAST_ONLINE_DATE+'">'+FormatTimeDelta(D.LAST_ONLINE)+" ago</span>");I.find(".head_icon").click(function(){quakelive.Goto("profile/summary/"+D.PLAYER_NICK)});I.find(".player_name > a").click(function(){quakelive.Goto("profile/summary/"+D.PLAYER_NICK)});I.find(".btn_fr_view_profile").click(function(){quakelive.Goto("profile/summary/"+D.PLAYER_NICK)});I.find(".btn_fr_accept_invite").click(function(){z.AnswerSubscriptionRequest(R.bare,
true)});I.find(".btn_fr_decline_invite").click(function(){z.AnswerSubscriptionRequest(R.bare,false)});I.find(".btn_fr_block_player").click(function(){P.BlockUser(R.bare);z.AnswerSubscriptionRequest(R.bare,false)});b("#qlv_friendListContainer").append(I)};z.UI_AddOutgoingItem=function(D){b("#fr_empty").hide();var I=z.TPL_OUTGOING_ITEM;I=jQuery(I);var R=new o(D.PLAYER_NICK.toLowerCase());I.attr("id",R.bare);I.find(".head_icon").css("background","url("+quakelive.resource("/images/players/icon_lg/"+D.MODEL+
"_"+D.SKIN+".jpg")+") no-repeat");I.find(".player_name > a").html("<span class='clan'>"+StripColors(D.PLAYER_CLAN)+"</span>"+D.PLAYER_NICK);I.find(".player_name > img").attr("src",quakelive.resource("/images/flags/"+D.COUNTRY_ABBREV.toLowerCase()+".gif"));I.find(".player_name > img").attr("title",D.COUNTRY_NAME);if(D.STATUS==1){I.find(".online").show();I.find(".info_left").html("<b>Online Now!</b>")}else I.find(".info_left").html('<b>Last online:</b> <span title="'+D.LAST_ONLINE_DATE+'">'+FormatTimeDelta(D.LAST_ONLINE)+
" ago</span>");if(D.BIO)I.find(".info_middle").html(D.BIO);else{I.find(".info_middle").html("<b>This person has no bio entered yet.  </b>");I.find(".info_middle > b").after('To view more data on this user click the "view profile" button.')}I.find(".head_icon").click(function(){quakelive.Goto("profile/summary/"+D.PLAYER_NICK)});I.find(".player_name > a").click(function(){quakelive.Goto("profile/summary/"+D.PLAYER_NICK)});I.find(".btn_fr_view_profile").click(function(){quakelive.Goto("profile/summary/"+
D.PLAYER_NICK)});I.find(".btn_fr_revoke_invite").click(function(){z.UI_RemoveItem(R.bare);z.Unsubscribe(R.bare)});b("#qlv_friendListContainer").append(I)};z.UI_AddBlockedItem=function(D){b("#fr_empty").hide();var I=z.TPL_BLOCK_ITEM;I=jQuery(I);var R=new o(D.PLAYER_NICK.toLowerCase());I.attr("id",R.bare);I.find(".head_icon").css("background","url("+quakelive.resource("/images/players/icon_gray_lg/"+D.MODEL+"_"+D.SKIN+".jpg")+") no-repeat");I.find(".player_name > a").text(StripColors(D.PLAYER_CLAN)+
D.PLAYER_NICK);I.find(".player_name > img").attr("src",quakelive.resource("/images/flags/"+D.COUNTRY_ABBREV.toLowerCase()+".gif"));I.find(".player_name > img").attr("title",D.COUNTRY_NAME);if(D.STATUS==1){I.find(".online").show();I.find(".info_left").html("<b>Online Now!</b>")}else I.find(".info_left").html('<b>Last online:</b> <span title="'+D.LAST_ONLINE_DATE+'">'+FormatTimeDelta(D.LAST_ONLINE)+" ago</span>");if(D.BIO)I.find(".info_middle").html(D.BIO);else{I.find(".info_middle").html("<b>This person has no bio entered yet.  </b>");
I.find(".info_middle > b").after('To view more data on this user click the "view profile" button.')}I.find(".head_icon").click(function(){quakelive.Goto("profile/summary/"+R.username)});I.find(".player_name > a").click(function(){quakelive.Goto("profile/summary/"+R.username)});I.find(".btn_fr_view_profile").click(function(){quakelive.Goto("profile/summary/"+R.username)});I.find(".btn_fr_unblock_player").click(function(){P.UnblockUser(R.bare);z.UI_RemoveItem(R.bare)});b("#qlv_friendListContainer").append(I)};
z.UI_RemoveItem=function(D){b('div[id="'+D+'"]').remove();b("#qlv_friendListContainer").children("div").length==0&&b("#fr_empty").show()};z.REMOTE_CONTACTS=[];z.LOCAL_CONTACTS=[];z.InviteRemoteContacts=function(D){D.length>0&&b.ajax({url:"/friends/social/invite",type:"POST",dataType:"json",data:"emails="+D,success:z.UI_RemoteInviteSuccess})};z.UI_RemoteInviteSuccess=function(D){var I="";I=D.COUNT==0||D.COUNT>1?D.COUNT+" Invites Sent":D.COUNT+" Invite Sent";b(".qlv_resultsListNA").text(I);setTimeout(function(){self.close()},
4E3)};z.UI_ResetContactSearch=function(){quakelive.Goto("friends/social");z.LOCAL_CONTACTS=[];z.REMOTE_CONTACTS=[]};z.IsLocalContact=function(D){var I=-1;D=D.toLowerCase();for(var R=0;R<z.LOCAL_CONTACTS.length;++R)if(z.LOCAL_CONTACTS[R].EMAIL.toLowerCase()==D){I=R;break}return I};z.UI_SearchContactRemote=function(){var D=z.TPL_SEARCH_EMAIL_REMOTE,I=z.REMOTE_CONTACTS,R=true;b(".qlv_resultsBody").empty();b(".qlv_resultsBody").html(D);b("#qlv_selectAllEmail").click(function(){if(b("#qlv_selectAllEmail").attr("checked")==
true)b(".qlv_emailInviteItem:not(:disabled)").attr("checked",true);else b("#qlv_selectAllEmail").attr("checked")==false&&b(".qlv_emailInviteItem:not(:disabled)").attr("checked",false)});b(".qlv_invitebutton").click(function(){var L=[];b(".qlv_emailInviteItem:checked").each(function(){L.push(this.value)});b(".qlv_resultsListNA").text("Sending Invites");b(".qlv_resultsListNA").show();b(".qlv_resultsTable").hide();z.InviteRemoteContacts(JSON.stringify(L));z.REMOTE_CONTACTS=[];z.LOCAL_CONTACTS=[]});b(".qlv_skipbutton > a").click(function(){self.close()});
for(D=0;D<I.length;D++)if(z.IsLocalContact(I[D].email)<0){var H=b("<tr></tr>");R==true&&H.addClass("odd");H.append('<td width="39"><div align="center"><input type="checkbox" value="'+I[D].email+'" class="qlv_emailInviteItem" /></div></td>');H.append("<td></td>");H.append('<td width="493">'+I[D].name+"</td>");H.append("<td></td>");b(".qlv_resultsTable > tbody:last").append(H);R==true?(R=false):(R=true)}};z.UI_SearchContactSuccess=function(D,I,R){b(".qlv_password").val("");if(D.LOCAL_LENGTH>0||D.REMOTE_LENGTH>
0){window.resizeTo(700,800);window.location="http://"+document.domain+"/friends/social/b/"+I+"/"+R+window.location.search}else{b(".qlv_resultsListNA").text("No Results");b(".qlv_resultsListNA").effect("highlight",{color:"#FF0000"},3E3)}};z.UI_SearchContactError=function(D){if(D.FIELDS){D=D.FIELDS;for(var I=0;I<D.length;I++)switch(D[I]){case "account":break;case "domain":b(".qlv_email_server").effect("highlight",{color:"#FF0000"},3E3);break;case "network":break;case "pw":b(".qlv_password").effect("highlight",
{color:"#FF0000"},3E3);break;case "user":b(".qlv_email_user").effect("highlight",{color:"#FF0000"},3E3);break;default:break}b(".qlv_resultsListNA").text("Error with flashing fields.")}else if(D.MSG){D=D.MSG;b(".qlv_resultsListNA").text(D)}b(".qlv_resultsListNA").effect("highlight",{color:"#FF0000"},3E3)};z.UI_SetupSearchContacts=function(){var D={url:"/friends/social/search",type:"POST",dataType:"json",success:function(I){I.ECODE==0?z.UI_SearchContactSuccess(I,b(".qlv_network").val(),b(".qlv_email_user").val()):
z.UI_SearchContactError(I)},beforeSubmit:function(){b(".qlv_resultsListNA").text("Searching...")}};b("#socialform").ajaxForm(D);b(".qlv_findFriendsBtn").click(function(){b(".qlv_resultsTable > tbody").empty();b(".qlv_resultsListNA").show();b(".qlv_resultsListNA").text("Searching...");b("#socialform").submit()})};z.UI_SetupContactInvite=function(){b(".qlv_email_user").val("");b(".qlv_password").val("");b(".qlv_network").attr("disabled","true");b(".qlv_email_user").attr("disabled","true");b(".qlv_password").attr("disabled",
"true");b(".qlv_findFriendsBtn").attr("disabled","true");var D=quakelive.Eval(b("#contacts_json").html())||[];z.LOCAL_CONTACTS=D.LOCAL;z.REMOTE_CONTACTS=D.REMOTE;D=z.LOCAL_CONTACTS;b("#qlv_selectAllEmail").click(function(){if(b("#qlv_selectAllEmail").attr("checked")==true)b(".qlv_emailInviteItem:not(:disabled)").attr("checked",true);else b("#qlv_selectAllEmail").attr("checked")==false&&b(".qlv_emailInviteItem:not(:disabled)").attr("checked",false)});b(".qlv_invitebutton > a").click(function(){b(".qlv_emailInviteItem").each(function(){if(this.checked==
true&&this.disabled==false){var f=b(this).attr("id");b(this).attr("disabled","true");var t=b(this).parent("td").parent("tr");t.effect("pulsate",{times:1},1E3);t.find(".qlv_btnSearchAdd").replaceWith('<img src="'+quakelive.resource("/images/sf/friends/plus_icon_gray.gif")+'"/>');z.Subscribe(f)}});z.REMOTE_CONTACTS.length>0&&z.UI_SearchContactRemote();return false});var I=true;if(z.LOCAL_CONTACTS.length>0){b(".qlv_resultsListNA").hide();for(var R=0;R<D.length;R++){var H=b("<tr></tr>");I==true&&H.addClass("odd");
D[R].STATUS==1&&H.addClass("online");var L=new PlayerIconSet(D[R].MODEL,D[R].SKIN);H.append('<td><input id="'+D[R].PLAYER_NICK.toLowerCase()+'" class="qlv_emailInviteItem" type="checkbox" /></td>');H.append("<td></td>");H.find("td:last").append(L.small);H.append("<td>"+D[R].PLAYER_NICK+"</td>");D[R].STATUS==1?H.append('<td><img alt="" src="'+quakelive.resource("/images/sf/friends/online_icon.gif")+'"/></td>'):H.append("<td></td>");H.append("<td>"+FormatTimeDelta(D[R].LAST_ONLINE)+"</td>");H.append("<td>"+
D[R].FNAME+"</td>");H.append('<td><a class="qlv_btnSearchView" href="javascript:;" onclick="self.opener.quakelive.Goto(\'profile/summary/'+D[R].PLAYER_NICK+"'); return false\" /></td>");if(self.opener.quakelive.mod_friends.IsOnRoster(D[R].PLAYER_NICK.toLowerCase())||D[R].PLAYER_NICK.toLowerCase()==quakelive.username.toLowerCase()){H.append('<td><img alt="" src="'+quakelive.resource("/images/sf/friends/plus_icon_gray.gif")+'"/></td>');H.find(".qlv_emailInviteItem").attr("disabled","true")}else{L=b('<a class="qlv_btnSearchAdd" href="javascript:;" onclick="self.opener.quakelive.mod_friends.Subscribe(\''+
D[R].PLAYER_NICK.toLowerCase()+"');\" />");L.click(function(){b(this).parent("td").parent("tr").find(".qlv_emailInviteItem").attr("disabled","true");b(this).parent("td").parent("tr").effect("pulsate",{times:1},1E3);b(this).replaceWith('<img src="'+quakelive.resource("/images/sf/friends/plus_icon_gray.gif")+'"/>');b(this).attr("onclick","");b(this).unbind();return false});L=b("<td></td>").append(L);H.append(L)}b(".qlv_resultsTable > tbody").append(H);I==true?(I=false):(I=true)}}else z.UI_SearchContactRemote();
if(z.REMOTE_CONTACTS.length>0){b(".qlv_skipbutton").show();b(".qlv_skipbutton > a").click(function(){z.UI_SearchContactRemote()})}};z.UI_SetupInvite=function(){b(".qlv_plusOption > a").click(function(){b(".qlv_inviteEmails > input:last").after('<input type="text" class="qlv_textfield" />')});b(".qlv_invitebutton > a").click(function(){z.SendMailInvites()})};z.UI_PerformSearch=function(D){var I=b(".qlv_keywordInput").val();I.length>0&&z.SendSearchKeywordRequest(I,D)};z.UI_SetupSearchKeyword=function(){b(".qlv_keywordInput").focus();
b(".qlv_keywordButtonEmail").click(function(){z.UI_PerformSearch("EMAIL");return false});b(".qlv_keywordButtonLastName").click(function(){z.UI_PerformSearch("LNAME");return false});b(".qlv_keywordButtonNameTag").click(function(){z.UI_PerformSearch("PLAYER_NICK");return false})};z.UI_SortRoster=function(D){b.each(z.node.find("#im-"+D+" .itemlist div"),function(I,R){b.each(z.node.find("#im-"+D+" .itemlist div"),function(H,L){b(R).find(">span.rosteritem-name").text().toLowerCase()<b(L).find(">span.rosteritem-name").text().toLowerCase()&&
b(L).before(R)})})};quakelive.AddHook("IM_OnConnected",function(){});quakelive.AddHook("IM_OnDisconnected",function(){});quakelive.AddHook("IM_OnRosterFilled",function(){N.skipNotices=true;N.fullRoster=[];z.ImportRosterData();z.IM_GetPrivacyList(E);setTimeout(function(){N.pendingRequests.length>0&&quakelive.notifier.Notify(quakelive.notifier.PendingInviteSummaryNotice(N.pendingRequests.length));N.skipNotices=false},6E3)});window.IM_OnMessage=function(D){D=quakelive.Eval(D);var I=new o(D.who),R=N.GetContactByJID(I);
if(I.username==J.QLive||I.username==J.Broadcast||I.username==J.Admin){if(!R){R=new k(I,I.username);R.UI_PlaceInGroup(A.Active);N.AddContact(R)}}else if(!R)return;R.ReceivedMsg(D.what)};window.IM_OnPresence=function(D){if(D=quakelive.Eval(D)){var I=new o(D.who);if(I=N.GetContactByJID(I)){var R=quakelive.Eval(D.status);I.UI_SetGameStatus(R);I.presence=D.presence;I.CanDisplayOnRoster()?I.UI_PlaceInGroup(A.Online):I.UI_PlaceInGroup(A.None);N.UI_OnRosterUpdated()}}};window.IM_OnSubscribeRequest=function(D){var I=
quakelive.Eval(D);N.AddPendingRequest(I);if(!N.skipNotices){D=new o(I.jid);b.ajax({url:"/friends/details/"+D.username,dataType:"json",success:function(R){var H=(R.MODEL+"_"+R.SKIN).toLowerCase();quakelive.notifier.Notify(quakelive.notifier.PendingInviteNotice(I.jid,R.PLAYER_NICK,H));quakelive.pathParts[0]=="friends"&&quakelive.pathParts[1]=="incoming"&&z.UI_AddIncomingItem(R)}})}};window.IM_OnItemAdded=function(D){if(D=quakelive.Eval(D)){var I=new o(D.jid),R=new e(I,I.username,v.None,K.Unavailable);
b.ajax({url:"/friends/details/"+D.jid.split("@")[0],dataType:"json",success:function(H){H.ECODE==0&&R.UpdateDetails(H)}});N.AddContact(R)}};window.IM_OnItemRemoved=function(D){if(D=quakelive.Eval(D)){N.RemoveContactByJID(new o(D.jid));N.UI_OnRosterUpdated();if(quakelive.pathParts[0]=="friends"&&quakelive.pathParts[1]=="manage"){z.UI_RemoveItem(D.jid);N.fullRoster.length<1&&quakelive.Goto("friends/search")}quakelive.SendModuleMessage("IM_OnRosterChanged")}};window.IM_OnItemSubscribed=function(D){if(D=
quakelive.Eval(D)){var I=N.GetContactByJID(new o(D.jid));if(I){I.subscription=D.subscription;N.UI_Show();N.UI_OnRosterUpdated();quakelive.pathParts[0]=="friends"&&quakelive.pathParts[1]=="manage"&&z.UI_AddManagedItem(I);quakelive.SendModuleMessage("IM_OnRosterChanged")}}};window.IM_OnItemUnsubscribed=function(D){if(D=quakelive.Eval(D)){var I=N.GetContactByJID(new o(D.jid));if(I){I.subscription=D.subscription;N.UI_OnRosterUpdated();I.UI_PlaceInGroup(A.None);quakelive.SendModuleMessage("IM_OnRosterChanged")}}};
window.IM_OnItemUpdated=function(D){if(D=quakelive.Eval(D)){var I=N.GetContactByJID(new o(D.jid));if(I){I.subscription=D.subscription;if(I.subscription==v.Both){I.CanDisplayOnRoster()&&I.UI_PlaceInGroup(A.Online);N.UI_OnRosterUpdated()}quakelive.SendModuleMessage("IM_OnRosterChanged")}}};window.IM_OnPrivacyNames=function(){};window.IM_OnPrivacyList=function(D){P.ImportPrivList(quakelive.Eval(D)||null)};window.IM_OnPrivacyChanged=function(D){z.IM_GetPrivacyList(D)};window.IM_OnPrivacyResult=function(D){D=
quakelive.Eval(D)||{};switch(D.result){case m.StoreSuccess:P.privItems.length==0&&z.IM_GetPrivacyList(E);break;case m.ActivateSuccess:break;case m.DefaultSuccess:break;case m.RemoveSuccess:r=null;break;case m.ItemNotFound:r=null;break}};window.IM_OnSelfPresence=function(){};window.IM_OnConnectFail=function(){var D="We're sorry, but it appears you are having problems connecting to the QUAKE LIVE network. If you are behind a firewall you must make sure that it permits the following connection:<br /><br />Protocol: TCP<br />Host: "+
quakelive.siteConfig.xmppDomain+"<br />Port: 5222<br /><br />Contact your network administrator for further instructions, or visit the <a href='/forum/'>QUAKE LIVE forums</a> to look for help.<br /><br />Click <b>reload</b> to try again or <a href='javascript:;' onclick='quakelive.Logout(); return false'>click here</a> to log out.</p>",I=((new Date).getTime()-quakelive.initTime)/1E3;b.post("/user/xmpp_connect_fail/"+quakelive.userstatus+"/"+OSGetName()+"/"+BrowserGetName()+"/"+quakelive.userid+"/"+
I);quakelive.TrackPageView("/user/xmpp_connect_fail/"+quakelive.userstatus+"/"+quakelive.userid);qlPrompt({title:"XMPP Connection Failure",body:D,fatal:true})};window.IM_OnKicked=function(){window.onbeforeunload=undefined;quakelive.ShutdownGame();quakelive.PageRedirect("/user/logout/kicked")};z.OnVidRestart=function(){quakelive.cvars.GetIntegerValue("r_fullscreen")!=0?b("#qlv_game_mode_chatlist").hide():b("#qlv_game_mode_chatlist").show()};z.OnGameStarted=function(){z.OnVidRestart()};quakelive.RegisterModule("friends",
z)})(jQuery);(function(b){function c(){b("#step"+d).slideDown("fast",function(){b("#step"+d+"_c").fadeIn("fast",function(){d++<2&&setTimeout(c,800)})})}var o={},d=0;o.OnOverlayLoaded=function(e){if(e[0]=="install"){d=0;setTimeout(c,500)}};quakelive.RegisterModule("install",o)})(jQuery);
(function(b){function c(q){if(q!=null&&q.ECODE==0)quakelive.Overlay("user/forgot/validate");else{b("#page-forgot-error").show().html(q?q.MSG:"Unknown Error - Try again");setTimeout(function(){b("#page-forgot-error").html("&nbsp;")},1E4)}}function o(q){if(q!=null&&q.ECODE==0)quakelive.Overlay("user/forgot/success");else{b("#page-forgot-error").show().html(q?q.MSG:"Unknown Error - Try again");setTimeout(function(){b("#page-forgot-error").html("&nbsp;")},1E4)}}var d={};d.Init=function(){};d.LAYOUT="postlogin";
quakelive.AddHook("OnCharacterChanged",function(q){d.UI_ChangeCharacter(q)});d.UI_ChangeCharacter=function(q){q=quakelive.mod_prefs.models.MODELS[q];var u=quakelive.mod_prefs.models.DETAILS[q.DETAILS_ID]||{RACE:"",DESC:""};b("#qlv_MainContent").find(".characterImg > img").attr("src",quakelive.resource("/images/players/body_lg/"+q.MODEL+"_"+q.SKIN+".png"));b("#qlv_MainContent").find(".charTypeLarge").text(q.NAME.substr(0,1).toUpperCase()+q.NAME.substr(1));b("#qlv_MainContent").find(".charType > img").attr("src",
quakelive.resource("/images/player_races/"+u.RACE+".png"));b("#qlv_MainContent").find(".charProfile").text(u.DESC)};d.FocusField=function(){var q=b("#help_"+this.id);q.find(".error").size()==0&&q.find(".success").size()==0&&q.addClass("lgrayBack").addClass("lgrayBorder").removeClass("transBorder").find(".help").show()};d.BlurField=function(){var q=b("#help_"+this.id);q.find(".error").size()==0&&q.find(".success").size()==0&&q.removeClass("lgrayBack").removeClass("lgrayBorder").addClass("transBorder").find(".help").hide()};
d.ShowContent=function(q){switch(quakelive.pathParts[1]){case "edit":d.UI_SetupEditAccount(q);break;case "delete":d.UI_SetupDeleteProfile(q);break}};var e=0;d.UI_SetupDeleteProfile=function(q){b("#qlv_contentBody").html(q).find("input,textarea").focus(d.FocusField).blur(d.BlurField);b("#qlv_contentBody").find("input[type='radio']").click(function(){e=b(this).val()});b("#deletebtn").click(function(){if(e){if(confirm("Are you sure you want to deactivate your account?")){var u={reason:e,password:b("#pw").val(),
comments:b("#comments").val()};b.ajax({url:"/user/delete/zap",type:"post",data:u,dataType:"json",success:function(B){B.ECODE==0&&quakelive.PageRedirect("/user/logout/deleted")}})}}else alert("You must choose a reason before you can deactivate.")});b("#cancelbtn").click(function(){alert("Thanks for reconsidering!");quakelive.Goto("home")})};d.UI_SetupEditAccount=function(q){b("#qlv_contentBody").html(q).find("input,textarea").focus(d.FocusField).blur(d.BlurField);b("#state").find('option[value="'+
b("#edit_hstate").val()+'"]').attr("selected",true);b("#country").find('option[value="'+b("#edit_hcountry").val()+'"]').attr("selected",true);b("#day").find('option[value="'+b("#edit_hday").val()+'"]').attr("selected",true);b("#month").find('option[value="'+b("#edit_hmonth").val()+'"]').attr("selected",true);b("#year").find('option[value="'+b("#edit_hyear").val()+'"]').attr("selected",true);b('input[name="shirtSize"][value="'+b("#edit_htsize").val()+'"]').attr("checked",true);var u=500;q=u-b("#bio").val().length;
b("#help_bio > span").html("&nbsp;"+q+" Characters");b("#bio").keyup(function(){b(this).val();var B=u-b("#bio").val().length;b("#help_bio > span").html("&nbsp;"+B+" Characters")});quakelive.cvars.GetIntegerValue("web_chattimestamps")&&b("#web_chattimestamps").attr("checked","checked");ReadCookie("xi")&&b("#web_xmppinvis").attr("checked","checked");b("#updatebtn").click(function(){d.SendAccountEdit()})};d.SendAccountEdit=function(){var q=b("#web_chattimestamps").attr("checked")?1:0,u=b("#web_xmppinvis").attr("checked")?
1:0,B=b("#web_xmppinvis").length;qlProcessing("Saving your profile changes","Please Wait&hellip;");var x=true;b.ajax({url:"/user/update",type:"POST",data:b("#profile_form").formToArray(),dataType:"json",success:function(p){d.ClearFields();if(p.ECODE==0){if(B&&u!=SafeParseInt(ReadCookie("xi"))){qlPrompt({title:"Your Changes Require a Page Reload",body:"To apply your changes you must reload QUAKE LIVE.",ok:function(){qlProcessing("Reloading QUAKE LIVE","Please Wait&hellip;");window.location.reload()},
okLabel:"Reload Now",cancelLabel:"Reload Later"});u?CreateCookie("xi",1,7):EraseCookie("xi");x=false}d.EditSuccess(p);SetCvar("web_chattimestamps",q);SetCvar("clan",b("#clantag").val())}else d.EditFail(p)},complete:function(){x&&qlHidePrompt()}})};d.EditSuccess=function(q){quakelive.userinfo.IGNORED_NOTICES=q.IGNORED_NOTICES;quakelive.notifier.LoadFilters();for(var u in q.FIELDS){b("#help_"+u+" .error").remove();b("#help_"+u+" .success").remove();b("#help_"+u).append("<span class='success'>"+q.FIELDS[u]+
"</span>");d.StyleAsSuccess(u)}};d.EditFail=function(q){for(var u in q.ERRORS){b("#help_"+u+" .error").remove();b("#help_"+u+" .success").remove();b("#help_"+u).append("<span class='error'>"+q.ERRORS[u]+"</span>");d.StyleAsError(u)}};var g=["bio","shirtSize"],k=["birthdate","country"];d.StyleAsError=function(q){b("#wrap_"+q).addClass("orangeBorder");b("#label_"+q).addClass("orangeTxt");b("#help_"+q).addClass("orangeBack").addClass("orangeBorder")};d.StyleAsSuccess=function(q){b("#wrap_"+q).addClass("greenBorder");
b("#label_"+q).addClass("greenTxt");b("#help_"+q).addClass("greenBack").addClass("greenBorder")};d.StyleAsDefault=function(q){b("#help_"+q+" .error").remove();b("#help_"+q+" .success").remove();b("#wrap_"+q).removeClass("orangeBorder");b("#wrap_"+q).removeClass("greenBorder");b("#label_"+q).removeClass("orangeTxt");b("#label_"+q).removeClass("greenTxt");b("#help_"+q).removeClass("orangeBack").removeClass("orangeBorder");b("#help_"+q).removeClass("greenBack").removeClass("greenBorder")};d.ClearFields=
function(){b("#profile_form").find("input").each(function(){d.StyleAsDefault(this.id)});for(var q in k)d.StyleAsDefault(k[q]);for(q in g){b("#error_"+g[q]).empty();b("#label_"+g[q]).removeClass("orangeTxt");b("#label_"+g[q]).removeClass("greenTxt")}};d.SubmitPasswordReset=function(){var q={url:"/user/forgot/handlereset",success:c,dataType:"json",clearForm:false};b("#forgotform").ajaxSubmit(q)};d.SubmitPasswordValidate=function(){var q={url:"/user/forgot/handlevalidate",success:o,dataType:"json",clearForm:false};
b("#validateform").ajaxSubmit(q)};d.SubmitLoginForm=function(){var q=b("#in_email").val().toLowerCase(),u=b("#in_password").val(),B=b("#in_remember").attr("checked")?1:0,x=false,p=["moztest@quakelive.com"];for(var z in p)if(q==p[z]){x=true;break}if(x||quakelive.CheckBrowserCompat()){q={u:q,p:u,r:B};q.u.length==0||q.p.length==0?d.ShowLoginError("You must enter your email and password."):b.ajax({url:"/user/login",mode:"abort",port:"login",type:"post",data:q,dataType:"json",error:d.SubmitLoginForm_Error,
success:d.SubmitLoginForm_Success})}};var l=null;d.ShowLoginError=function(q){if(l){clearTimeout(l);l=null}b("#qlv_badLogin").fadeIn().html("<p>"+q+"</p>");b("#qlv_badLogin p").effect("pulsate",{times:1},1E3);l=setTimeout(function(){l=null;b("#qlv_badLogin").fadeOut()},3E4)};var n="Unable to log in. Please try again later.";d.SubmitLoginForm_Error=function(){d.ShowLoginError(n)};d.SubmitLoginForm_Success=function(q){if(typeof q=="object")if(q.ECODE===0){quakelive.TrackPageView("/Login");b("#qlv_badLogin").fadeOut();
q.RESULT_CODE?quakelive.PageRedirect("/queue.php"):quakelive.PageRedirect("/user/login_redirect")}else d.ShowLoginError(q.MSG||n);else d.ShowLoginError(n)};quakelive.RegisterModule("user",d)})(jQuery);
(function(b){var c={};c.ReloadOverallStats=function(){};c.CanShowStats=function(){if(!quakelive.IsLoggedIn())return false;if(!qz_instance||qz_instance.IsGameRunning())return false;return true};c.Init=function(){function o(){c.CanShowStats()&&c.ReloadOverallStats(true)}function d(){if(c.CanShowStats()){o();setInterval(o,6E5);quakelive.RemoveHook("OnLayoutLoaded",d)}}quakelive.AddHook("OnLayoutLoaded",d)};c.WpnDisplayText={GAUNTLET:"Gauntlet",MACHINEGUN:"Machine Gun",SHOTGUN:"Shotgun",GRENADE:"Grenade Launcher",
ROCKET:"Rocket Launcher",LIGHTNING:"Lightning Gun",RAILGUN:"Railgun",PLASMA:"Plasma Gun",BFG:"BFG",CHAINGUN:"Chaingun",NAILGUN:"Nailgun",PROXMINE:"Proximity Mine",None:"None","N/A":"N/A"};c.GameTypeDisplayText={DM:"Free For All",TDM:"Team Death Match",CTF:"Capture The Flag",Tourney:"Duel",TOURNEY:"Duel",TOTAL:"TOTAL",CA:"Clan Arena",None:"None"};c.format_number=function(o){return Number(o)};c.format_seconds=function(o,d){d=typeof d!="undefined"?d:"hms";var e=(o/60|0)%60,g=Math.round(o%60),k=(o/3600|
0)%24;o=o/86400|0;var l="";if(d.search("d")>=0)l+=String(o)+"d ";if(d.search("h")>=0)l+=String(k)+"h ";if(d.search("m")>=0)l+=String(e)+"m ";if(d.search("s")>=0)l+=String(g)+"s ";return l};c.FinishString=function(o){function d(){if(o.PLAYER_RANK==null)return false;return true}var e="TBD";switch(o.GAME_TYPE.toLowerCase()){case "dm":case "tourney":e=d()?o.PLAYER_RANK!=1?o.PLAYER_RANK==1?"Win":"Loss":"Quit":o.SCOREBOARD[0].PLAYER_NICK;break;case "tdm":case "ctf":case "ca":e=d()?o.I_COMPETED?o.I_WIN?
"Win":"Loss":"Quit":o.WINNING_TEAM+" Wins";break;default:return e}return e};c.RankString=function(o){var d=o%100,e=o%10;d=e==1&&d!=11?"st":e==2&&d!=12?"nd":e==3&&d!=13?"rd":"th";return o+d};c.WinString=function(o){if(o==1)return"Win";return"Loss"};c.StyleRank=function(o){if(o>=1&&o<=3)return"<b>"+c.RankString(o)+"</b>";return c.RankString(o)};c.FillQuickStats=function(o){var d=b(c.TPL_QUICKSTATS),e=c.quickstats.playerdetails.DETAILS[0],g=c.quickstats.recordstats;d.find(".qlv_pltslb_title").html(quakelive.username);
var k=e.LAST_MATCH[0];k!="None"&&d.find(".qlv_pltslb_last_played").html("Last Played: "+k);d.find(".qlv_pltslb_character").css("background","url("+quakelive.resource("/images/players/body_md/"+e.PLAYER_MODEL[0]+"_"+e.PLAYER_SKIN[0]+".png")+") no-repeat");k=e.FAV_GAMETYPE[0];if(k!="None"){d.find(".fav_gametype_txt").html(c.GameTypeDisplayText[k]);d.find(".fav_gametype_img").html('<div style="background: url('+quakelive.resource("/images/gametypes/"+k.toLowerCase()+".png")+') no-repeat center center; width: 100%; height: 100%"></div>')}else{d.find(".fav_gametype_txt").html("None");
d.find(".fav_gametype_img").html('<div style="background: url('+quakelive.resource("/images/gametypes/no_data_icon.png")+') no-repeat center center; width: 100%; height: 100%"></div>')}if(e.FAV_ARENA[0]!="None"){d.find(".fav_map_txt").html(e.FAV_ARENA[0]);d.find(".fav_map_img").html('<div style="background: url('+quakelive.resource("/images/levelshots/ci/"+e.FAV_ARENA_SYSNAME[0]+".png")+') no-repeat center center; width: 100%; height: 100%"></div>')}else{d.find(".fav_map_txt").html("None");d.find(".fav_map_img").html('<div style="background: url('+
quakelive.resource("/images/gametypes/no_data_icon.png")+') no-repeat center center; width: 100%; height: 100%"></div>')}k=e.FAV_WPN[0];if(k!="None"){d.find(".fav_weapon_txt").html(c.WpnDisplayText[k]);d.find(".fav_weapon_img").html('<div style="background: url('+quakelive.resource("/images/weapons/3d/"+k.toLowerCase()+".png")+') no-repeat center center; width: 100%; height: 100%"></div>')}else{d.find(".fav_weapon_txt").html("None");d.find(".fav_weapon_img").html('<div style="background: url('+quakelive.resource("/images/gametypes/no_data_icon.png")+
') no-repeat center center; width: 100%; height: 100%"></div>')}d.find(".total_games").html(FormatNumber(e.GAMES_PLAYED[0]));d.find(".total_frags").html(FormatNumber(e.TOTAL_KILLS[0]));d.find(".total_time").html(c.format_seconds(e.TIME_PLAYED[0]));e={tdm:"TDM_RECORD",ctf:"CTF_RECORD",dm:"DM_RECORD",duel:"TRNY_RECORD",total:"TOTAL_RECORD"};for(var l in e){k=e[l];k=g[k][0];d.find(".played_"+l).html(FormatNumber(k.GAMES_FINISHED[0]));d.find(".wins_"+l).html(FormatNumber(k.WINS[0]))}o.empty().append(d)};
c.LoadQuickStats=function(o,d){c.quickstats={playerdetails:null,recordstats:null};b.getJSON("/stats/playerdetails/"+o,null,function(e){c.quickstats.playerdetails=e;c.quickstats.recordstats&&c.FillQuickStats(d)});b.getJSON("/stats/recordstats/"+o,null,function(e){c.quickstats.recordstats=e;c.quickstats.playerdetails&&c.FillQuickStats(d)})};c.overallStatsData=null;c.reloadCount=0;c.DisplayStatsData=function(){var o=c.overallStatsData,d="";if(o){var e={NUM_PLAYERS:"Online Players",NUM_FRAGS:"Frags Last Hour",
NUM_GAMES:"Games Last Hour"},g=[];for(var k in e)if(o[k]>1)g[g.length]=k;if(g.length>0){k=g[c.reloadCount++%g.length];d+=o[k]+" "+e[k]}}b("#qlv_siteStatus").fadeOut("fast",function(){b("#qlv_siteStatus .front,#qlv_siteStatus .outline").html(d);b("#qlv_siteStatus").fadeIn()})};c.ReloadOverallStats_Success=function(o){o=quakelive.Eval(o);c.overallStatsData=o};quakelive.RegisterModule("stats",c)})(jQuery);
(function(b){var c={};c.LAYOUT="postlogin";c.bFriendBoards=false;c.BASE_FILTERS={view:"FRAGS",startrec:1,numrecs:50,gt:"ALL",tf:"30DAY",map:"ALL",ctry:"ALL",social:"ALL"};c.SUMMARY_FILTER_ORDER=["tf","ctry"];c.FRIEND_SUMMARY_FILTER_ORDER=["gt","tf","map","ctry"];c.FILTER_ORDER=["view","startrec","numrecs","tf","ctry"];c.FRIEND_FILTER_ORDER=["view","gt","tf","map","ctry"];c.Init=function(){c.filter_params=b.extend({},c.BASE_FILTERS)};c.ShowContent=function(e){b("#qlv_contentBody").html(e);for(var g in quakelive.params)if(quakelive.params[g])c.filter_params[g]=
quakelive.params[g];b(".filter").each(function(){b(this).val(c.filter_params[this.name])});quakelive.IsLoggedIn()&&c.toggleSocialFilter(true);switch(quakelive.pathParts[1]){case "summary":c.filter_params.view="SUMMARY";b(".corner_img").each(function(k,l){k=b(l);if(quakelive.mod_friends.IsBlocked(k.attr("id"))){l=quakelive.SwapAvatarPath(k.attr("style"),quakelive.PlayerAvatarPath.G_LG);k.attr("style",l)}});break}};c.GetLoadPath=function(){switch(quakelive.pathParts[1]){case "friendsummary":for(var e=
"/leaders/friendsummary/full",g=0;g<this.FRIEND_SUMMARY_FILTER_ORDER.length;++g)e+="/"+(quakelive.params[this.FRIEND_SUMMARY_FILTER_ORDER[g]]||this.filter_params[this.FRIEND_SUMMARY_FILTER_ORDER[g]]);return e;case "summary":e="/leaders/summary/full";for(g=0;g<this.SUMMARY_FILTER_ORDER.length;++g)e+="/"+(quakelive.params[this.SUMMARY_FILTER_ORDER[g]]||this.filter_params[this.SUMMARY_FILTER_ORDER[g]]);return e;case "friends":e="/leaders/friends/full";for(g=0;g<this.FRIEND_FILTER_ORDER.length;++g)e+=
"/"+(quakelive.params[this.FRIEND_FILTER_ORDER[g]]||this.filter_params[this.FRIEND_FILTER_ORDER[g]]);return e;case "details":e="/leaders/details/full";for(g=0;g<this.FILTER_ORDER.length;++g)e+="/"+(quakelive.params[this.FILTER_ORDER[g]]||this.filter_params[this.FILTER_ORDER[g]]);return e}};c.set_filter_params=function(e,g){c.filter_params[e]=g;e=="social"&&c.toggleGranularFilters(g);if(e=="gt"&&g=="ALL")c.toggleMapFilter(true);else if(e=="gt"&&g!="ALL")c.toggleMapFilter(false);else if(e=="map"&&g==
"ALL")c.toggleGTFilter(true);else e=="map"&&g!="ALL"&&c.toggleGTFilter(false);c.RefreshLeaderBoardView()};c.SetFilter=function(e){b(".postlogin_nav > ul > .selected").removeClass("selected");b("#nav_"+e.toLowerCase()).addClass("selected");c.filter_params.startrec=1;c.set_filter_params("view",e)};c.toggleSocialFilter=function(e){if(e){b("#ctrl_filter_social").attr("disabled",false);b("#ctrl_filter_social")[0].style.color=""}else{b("#ctrl_filter_social").attr("disabled",true);b("#ctrl_filter_social")[0].style.color=
"#aaa";c.filter_params.social="ALL";b("#ctrl_filter_social").val("ALL")}};c.toggleGTFilter=function(e){if(e){b("#ctrl_filter_gt").attr("disabled",false);b("#ctrl_filter_gt")[0].style.color=""}else{b("#ctrl_filter_gt").attr("disabled",true);b("#ctrl_filter_gt")[0].style.color="#aaa";c.filter_params.gt="ALL";b("#ctrl_filter_gt").val("ALL")}};c.toggleMapFilter=function(e){if(e){b("#ctrl_filter_map").attr("disabled",false);b("#ctrl_filter_map")[0].style.color=""}else{b("#ctrl_filter_map").attr("disabled",
true);b("#ctrl_filter_map")[0].style.color="#aaa";c.filter_params.map="ALL";b("#ctrl_filter_map").val("ALL")}};c.toggleGranularFilters=function(e){if(e=="FRIENDS"){c.toggleMapFilter(true);c.toggleGTFilter(true)}else{c.toggleMapFilter(false);c.toggleGTFilter(false)}};c.make_lb_urlhash=function(e){var g=["#"+e];if(c.filter_params.view=="SUMMARY")return"#"+e;for(var k in c.filter_params){param_string=k+"="+c.filter_params[k];g.push(param_string)}return g.join(";")};c.set_lb_url=function(e){e=c.make_lb_urlhash(e);
quakelive.SetMonitorPath(e);window.location.hash=e;quakelive.ParsePath()};c.RefreshLeaderBoardView=function(){var e=c.filter_params.view,g=c.filter_params.social;if(e.toUpperCase()=="SUMMARY"&&g.toUpperCase()=="FRIENDS"){c.set_lb_url("leaders/friendsummary");c.LoadFriendSummaryBoards()}else if(e.toUpperCase()=="SUMMARY"){c.set_lb_url("leaders/summary");c.LoadSummaryLeaderBoards()}else if(g.toUpperCase()=="FRIENDS"){c.set_lb_url("leaders/friends");c.LoadFriendBoard(e.toUpperCase())}else{c.set_lb_url("leaders/details");
c.LoadLeaderBoard(e.toUpperCase())}};c.LoadLeaderBoard=function(e,g,k){quakelive.ReloadVerts();g=g||c.filter_params.startrec;k=k||c.filter_params.numrecs;c.filter_params.startrec=g;c.filter_params.numrecs=k;c.set_lb_url("leaders/details");g=[e,g,k,c.filter_params.tf,c.filter_params.ctry];if(b("#leaderboard_data").size()>0){g="/leaders/details/part/"+g.join("/");b.ajax({url:g,mode:"abort",port:"leaders",type:"get",error:function(){c.SetFindPlayerMsg("Error loading leaderboard")},success:function(l){b("#lb_section_header").attr("src",
quakelive.resource("/images/sf/leaderboard/hdr_"+e.toLowerCase()+".gif"));b("#leaderboard_data").html(l)}})}else{g="/leaders/details/full/"+g.join("/");b.ajax({url:g,mode:"abort",port:"leaders",type:"get",error:function(){c.SetFindPlayerMsg("Error loading leaderboard")},success:function(l){b("#qlv_contentBody").html(l)}})}};c.LoadSummaryLeaderBoards=function(){quakelive.ReloadVerts();c.set_lb_url("leaders/summary");var e=[c.filter_params.tf,c.filter_params.ctry];if(b("#leaderboard_data").size()>0){e=
"/leaders/summary/part/"+e.join("/");b.ajax({url:e,mode:"abort",port:"leaders",type:"get",error:function(){c.SetFindPlayerMsg("Error loading leaderboard summary")},success:function(g){b("#lb_section_header").attr("src",quakelive.resource("/images/sf/leaderboard/hdr_summary.gif"));b("#leaderboard_data").html(g)}})}else{e="/leaders/summary/full/"+e.join("/");b.ajax({url:e,mode:"abort",port:"leaders",type:"get",error:function(){c.SetFindPlayerMsg("Error loading leaderboard summary")},success:function(g){b("#qlv_contentBody").html(g)}})}};
c.LoadFriendBoard=function(e){quakelive.IsLoggedIn()||c.LoadLeaderBoard(e);quakelive.ReloadVerts();c.set_lb_url("leaders/friends");for(var g=[e,c.filter_params.gt,c.filter_params.tf,c.filter_params.map,c.filter_params.ctry],k=[],l=0;l<quakelive.mod_friends.roster.fullRoster.length;l++)quakelive.mod_friends.roster.fullRoster[l].IsSubscribed()&&k.push(quakelive.mod_friends.roster.fullRoster[l].player_id);k.length>0&&g.push(Base64.encode(k.join(",")));if(b("#leaderboard_data").size()>0){g="/leaders/friends/part/"+
g.join("/");b.ajax({url:g,mode:"abort",port:"leaders",type:"get",error:function(){c.SetFindPlayerMsg("Error loading friends leaderboard")},success:function(n){b("#lb_section_header").attr("src",quakelive.resource("/images/sf/leaderboard/hdr_"+e.toLowerCase()+".gif"));b("#leaderboard_data").html(n)}})}else{g="/leaders/friends/full/"+g.join("/");b.ajax({url:g,mode:"abort",port:"leaders",type:"get",error:function(){c.SetFindPlayerMsg("Error loading friends leaderboard")},success:function(n){b("#qlv_contentBody").html(n)}})}};
c.LoadFriendSummaryBoards=function(){quakelive.IsLoggedIn()||c.LoadSummaryLeaderBoards();quakelive.ReloadVerts();c.set_lb_url("leaders/friendsummary");for(var e=[c.filter_params.gt,c.filter_params.tf,c.filter_params.map,c.filter_params.ctry],g=[],k=0;k<quakelive.mod_friends.roster.fullRoster.length;k++)quakelive.mod_friends.roster.fullRoster[k].IsSubscribed()&&g.push(quakelive.mod_friends.roster.fullRoster[k].player_id);g.length>0&&e.push(Base64.encode(g.join(",")));if(b("#leaderboard_data").size()>
0){e="/leaders/friendsummary/part/"+e.join("/");b.ajax({url:e,mode:"abort",port:"leaders",type:"get",error:function(){c.SetFindPlayerMsg("Error loading friend leaderboard summary")},success:function(l){b("#lb_section_header").attr("src",quakelive.resource("/images/sf/leaderboard/hdr_summary.gif"));b("#leaderboard_data").html(l)}})}else{e="/leaders/friendsummary/full/"+e.join("/");b.ajax({url:e,mode:"abort",port:"leaders",type:"get",error:function(){c.SetFindPlayerMsg("Error loading friend leaderboard summary")},
success:function(l){b("#qlv_contentBody").html(l)}})}};c.SetFindPlayerMsg=function(e){b("#find_player_msg").text(e);e.length>0&&setTimeout(function(){b("#find_player_msg").fadeOut()},15E3)};c.FindPlayerClick=function(){c.SetFindPlayerMsg("");var e=c.filter_params.view;if(e=="SUMMARY")e="WINS";var g=b("#find_player_input").val();if(typeof g=="undefined")c.SetFindPlayerMsg("Missing Player Name");else{g=b.trim(g);if(g.length==0)c.SetFindPlayerMsg("Empty Player Name");else{g="/leaders/findplayer/"+g+
"/"+e+"/"+c.filter_params.tf+"/"+c.filter_params.ctry;b.ajax({url:g,mode:"abort",port:"leaders",type:"get",error:function(){c.SetFindPlayerMsg("Internal error - try again")},success:function(k){b("#lb_section_header").attr("src",quakelive.resource("/images/sf/leaderboard/hdr_"+e.toLowerCase()+".gif"));b("#leaderboard_data").html(k)}});return false}}};c.ToggleCustomize=function(){var e=b(".filterbar"),g=e.hasClass("filterbar_expanded"),k=b("#leaderboard_data").height(),l=e.height();if(g){e.removeClass("filterbar_expanded");
b("#leaderboard_data").css("height",k+l+"px");b(".filterbar_toggle").removeClass("selected")}else{e.addClass("filterbar_expanded");b("#leaderboard_data").css("height",k+l+"px");b(".filterbar_toggle").addClass("selected")}};var o=0,d="";c.FocusFindPlayer=function(e){e=b(e);if(o++==0)d=e.val();e.val()==d&&e.val("").removeClass("input_default")};c.BlurFindPlayer=function(e){e=b(e);e.val()==""&&e.val(d).addClass("input_default")};quakelive.RegisterModule("leaders",c)})(jQuery);
(function(b){var c=60,o=20,d={MINIMIZED:0,NORMAL:1,INQUEUE:2,READY:3},e={DISABLED:0,ENABLED:1,IN_CANCELLED:2,OUT_CANCELLED:3,ACCEPTED:4,DECLINED:5},g={};g.MenuStates=d;var k=d.MINIMIZED;g.haveAssets=false;g.isConnected=true;g.lastLFGType=-1;g.lastLFGState=e.DISABLED;g.lastLFGRequests=0;g.cancelMessage=null;g.cancelTimeoutHandle=null;g.shown=false;g.ShowLFG=function(){if(!b("#lfg").is(":visible"))if(g.isConnected&&g.haveAssets&&quakelive.userstatus=="ACTIVE"){g.UpdateLFGMessage(g.lastLFGRequests);
g.SetQueue(g.lastLFGType,e.DISABLED,true);g.shown=true}};g.Init=function(){quakelive.AddHook("IM_OnConnected",function(){g.isConnected=true;g.ShowLFG()});quakelive.AddHook("OnDownloadGroup",function(l){if(l.group==GROUP_EXTRA){g.haveAssets=true;g.ShowLFG()}});quakelive.AddHook("OnGameExited",function(){k!=d.MINIMIZED&&k!=d.NORMAL&&g.CloseGameNotify(e.DISABLED)});quakelive.AddHook("OnServerListReload",function(l){g.UpdateLFGMessage(l.lfg_requests)});quakelive.AddHook("OnContentLoaded",g.ShowLFG)};
g.SetQueue=function(l,n,q){if(g.lastLFGState==e.DISABLED&&n==e.DISABLED)g.ChangeState(d.MINIMIZED);else{g.lastLFGType=l;g.lastLFGState=n;b.ajax({url:"/lfg/setqueue",data:{type:l,state:n},type:"post",dataType:"json",mode:"abort",port:"lfg_queue",success:function(){if(q)if(n==e.DISABLED||n==e.DECLINED)k==d.MINIMIZED?g.ChangeState(d.MINIMIZED):g.ChangeState(d.NORMAL);else k==d.NORMAL||k==d.READY?g.ChangeState(d.INQUEUE):g.ChangeState(d.NORMAL)},error:function(){}})}};g.UpdateLFGMessage=function(l){g.lastLFGRequests=
l;l=l>1?"<b>"+l+"</b> players requesting games":"Let us find a match for you!";if(k==d.NORMAL)b("#lfg_normal .footer").html(l);else k==d.MINIMIZED&&b("#lfg_minimized .footer").html(l)};g.CloseGameNotify=function(l){if(g.notifyTimeoutHandle){clearTimeout(g.notifyTimeoutHandle);g.notifyTimeoutHandle=null}g.notifyServer=null;l>-1?g.SetQueue(g.lastLFGType,l,true):g.ChangeState(d.NORMAL)};g.JoinGame=function(){var l="+connect "+g.notifyServer.host_address;g.SetQueue(g.lastLFGType,e.ACCEPTED,false);LaunchGame(BuildCmdString()+
l,false,g.notifyServer)};g.WatchNotifyTimer=function(){b("#lfg").find(".timer").text(g.notifyTimeLeft);if(g.notifyTimeLeft==0){g.cancelMessage="Timed out waiting for user input. You must join your match within 60 seconds of being found.";g.CloseGameNotify(e.DISABLED)}else g.notifyTimeoutHandle=setTimeout(g.WatchNotifyTimer,1E3);g.notifyTimeLeft--};g.CancelNotifyTimer=function(){if(g.notifyTimeoutHandle){clearTimeout(g.notifyTimeoutHandle);g.notifyTimeoutHandle=null}};g.ChangeState=function(l){var n=
b("#lfg");k=l;switch(l){case d.MINIMIZED:n.html(g.TPL_MODE_MINIMIZED);n.find(".lfg_content").click(function(){g.ChangeState(d.NORMAL)});g.UpdateLFGMessage(g.lastLFGRequests);break;case d.NORMAL:n.html(g.TPL_MODE_NORMAL);n.find("ul.jd_menu").jdMenu();n.find(".collapse_proxy").click(function(){g.ChangeState(d.MINIMIZED)});g.UpdateLFGMessage(g.lastLFGRequests);n.find(".select_gt_5").click(function(){g.SetQueue(5,e.ENABLED,true)});l=function(){n.find(".cancel_blurb").hide();n.find(".blurb").show()};if(g.cancelMessage){n.find(".blurb").hide();
n.find(".cancel_blurb").text(g.cancelMessage).show();g.cancelTimeoutHandle&&clearTimeout(g.cancelTimeoutHandle);g.cancelTimeoutHandle=setTimeout(l,o*1E3);g.cancelMessage=null}else l();break;case d.INQUEUE:n.html(g.TPL_MODE_INQUEUE);l=function(){confirm("Stop searching for a Duel?")&&g.SetQueue(g.lastLFGType,e.DISABLED,true)};n.find(".collapse_proxy, .btn_stop").click(l);g.UpdateLFGMessage(g.lastLFGRequests);break;case d.READY:n.html(g.TPL_MODE_READY);n.find(".levelshot").css("background-image","url("+
quakelive.resource("/images/levelshots/sm/"+g.notifyServer.map+".jpg")+")");n.find(".description").text(g.notifyServer.map_title+" / "+g.notifyServer.game_type_title);n.find(".play").click(g.JoinGame);n.find(".decline").click(function(){g.CloseGameNotify(e.DECLINED)});quakelive.matchtip.BindMatchTooltip(b("#lfg_ready_tooltip"),g.notifyServer.public_id);g.notifyTimeLeft=c;g.WatchNotifyTimer();break;default:return}n.show()};window.OnLFGNotify=function(l,n){if(g.notifyTimeoutHandle==null){l=quakelive.Eval(n);
server=quakelive.Eval(l.DATA);g.SetQueue(g.lastLFGType,e.ENABLED,false);g.notifyServer=server;g.ChangeState(d.READY)}};window.OnLFGCancel=function(l){l=quakelive.Eval(l);g.cancelMessage=l.MESSAGE=="OK"?null:l.MESSAGE;g.CloseGameNotify(-1)};quakelive.RegisterModule("lfg",g)})(jQuery);
(function(b){var c={};c.LAYOUT="postlogin";c.TITLE="Profile";c.Init=function(){quakelive.AddHook("OnGameExited",function(){setTimeout(function(){c.TriggerPendingAwards()},3E3)})};c.BindRecentMatches=function(){var n=quakelive.BuildSubPath(3);quakelive.statstip.SetOptions(null);b(".recent_match").each(function(){var q=this.id.split("_");quakelive.statstip.BindStatsTooltip(b(this),q[1],q[0],n)})};c.GetFriendStatus=function(n){var q={friend:false,blocked:false};if(quakelive.mod_friends.IsOnRoster(n)||
n.toLowerCase()==quakelive.username.toLowerCase())q.friend=true;else if(quakelive.mod_friends.IsBlocked(n))q.blocked=true;return q};var o=false;c.SetupVSFriendControls=function(){if(o){var n=b("#prf_player_name").text(),q=b("#prf_friend_controls").empty();if(n.toLowerCase()==quakelive.username.toLowerCase())b(".prf_bannedbio").length>0&&q.html('<a class="btn_contactsupport" href=\'mailto:support@quakelive.com?subject=QUAKE%20LIVE%20Flagged%20Account%20'+quakelive.username+"'></a>");else{var u=c.GetFriendStatus(n);
if(u.friend)q.html('<div title="Already on friends list" class="btn_yourfriend"></div><a href="javascript:;" title="Remove from Friends" onclick="quakelive.mod_profile.UninvitePlayer( \''+n+'\' ); return false" class="btn_unfriend"></a>');else u.blocked?q.html('<a href="javascript:;" onclick="quakelive.mod_profile.UnblockPlayer( \''+n+'\' ); return false" class="btn_fr_unblock_player"></a>'):q.html('<a href="javascript:;" title="Add to Friends" onclick="quakelive.mod_profile.InvitePlayer( \''+n+'\' ); return false" class="btn_friendinvite"></a><a href="javascript:;" title="Add to Blocked Players" onclick="quakelive.mod_profile.BlockPlayer( \''+
n+'\' ); return false" class="btn_block"></a>')}}};c.SetupFriendControls=function(){o&&b(".prf_friend").each(function(n,q){n=b(q);q=n.find(".invite_controls");var u=q.attr("id"),B=u.indexOf("_");if(B!=-1){u=u.substr(B+1);B=c.GetFriendStatus(u);if(B.friend){q.html('<div title="'+u+' is already your friend" class="btn_fr_invite_inactive rpad_btn fl"></div><div class="cl"></div>');n.removeClass("is_blocked is_friend").addClass("is_friend")}else if(B.blocked){q=quakelive.SwapAvatarPath(n.find(".head_icon").attr("style"),
quakelive.PlayerAvatarPath.G_LG);n.find(".head_icon").attr("style",q);n.removeClass("is_blocked is_friend").addClass("is_blocked")}else q.html('<a href="javascript:;" onclick="quakelive.mod_profile.InvitePlayer( \''+u+'\' ); return false" class="btn_fr_invite rpad_btn fl"></a><div class="cl"></div>')}})};c.InvitePlayer=function(n){if(confirm("Are you sure you want to add "+n+" to your friends list?")){quakelive.mod_friends.Subscribe(n);(n=c.sections[c.activeSection])&&n.OnRosterChanged&&n.OnRosterChanged()}};
c.UninvitePlayer=function(n){if(confirm("Are you sure you want to remove "+n+" from your friends list?")){quakelive.mod_friends.Unsubscribe(n);(n=c.sections[c.activeSection])&&n.OnRosterChanged&&setTimeout(n.OnRosterChanged,300)}};c.BlockPlayer=function(n){if(confirm("Are you sure you want to block the player "+n+"?")){quakelive.mod_friends.BlockPlayer(n);c.SetupVSFriendControls()}};c.UnblockPlayer=function(n){if(confirm("Are you sure you want to unblock the player "+n+"?")){quakelive.mod_friends.UnblockPlayer(n);
c.SetupVSFriendControls()}};c.IM_OnRosterChanged=function(){o=true;if(quakelive.activeModule==c){var n=c.sections[c.activeSection];n&&n.OnRosterChanged&&n.OnRosterChanged()}};c.AlterSummaryContent=function(){c.BindRecentMatches();c.SetupVSFriendControls();c.CheckRecentCompetitors()};c.AlterStatisticsContent=function(){c.BindRecentMatches();c.SetupVSFriendControls()};c.AlterAwardsContent=function(){};c.AlterFriendsContent=function(){c.SetupFriendControls()};c.AlterCompetitorsContent=function(){c.BindRecentMatches();
c.SetupFriendControls()};c.AlterMatchesContent=function(){};c.CheckRecentCompetitors=function(){b(".icon_holder > img").each(function(n,q){n=b(q);if(quakelive.mod_friends.IsBlocked(n.attr("id"))){q=quakelive.SwapAvatarPath(n.attr("src"),quakelive.PlayerAvatarPath.G_MD);n.attr("src",q)}})};c.activeSection="";c.sections={summary:{OnShow:c.AlterSummaryContent,OnRosterChanged:c.SetupVSFriendControls},statistics:{OnShow:c.AlterStatisticsContent,OnRosterChanged:c.SetupVSFriendControls},awards:{OnShow:c.AlterAwardsContent,
OnRosterChanged:null},friends:{OnShow:c.AlterFriendsContent,OnRosterChanged:c.SetupFriendControls},competitors:{OnShow:c.AlterCompetitorsContent,OnRosterChanged:c.SetupFriendControls},matches:{OnShow:c.AlterMatchesContent,OnRosterChanged:null}};c.activeProfileName="";c.ShowContent=function(n){b("#qlv_contentBody").html(n);if(quakelive.pathParts[0]=="profile"){c.activeSection=quakelive.pathParts[1];(n=c.sections[c.activeSection])&&n.OnShow&&n.OnShow()}c.activeProfileName=quakelive.pathParts[2];n=quakelive.pathParts.length-
2;quakelive.pathParts[n]&&quakelive.pathParts[n]==parseInt(quakelive.pathParts[n])&&quakelive.statstip.ShowStatsDetails(quakelive.pathParts[n],quakelive.pathParts[n+1]);switch(quakelive.pathParts[1]){case "awards":n=quakelive.GetParam("award")||0;var q=quakelive.GetParam("type")||1;g=-1;c.AwardsSelectBar(q,quakelive.pathParts[2],n);break;case "matches":c.LoadMatchesForWeek(quakelive.pathParts[2],quakelive.pathParts[3]||"last_7_days");break}};var d=0,e="";c.FocusProfileJump=function(n){n=b(n);if(d++==
0)e=n.val();n.val()==e&&n.val("").removeClass("input_default")};c.BlurProfileJump=function(n){n=b(n);n.val()==""&&n.val(e).addClass("input_default")};c.SetProfileJumpMsg=function(n){b("#profil_jump_msg").text(n);n.length>0&&setTimeout(function(){b("#profile_jump_msg").fadeOut()},15E3)};c.ProfileJumpClick=function(){c.SetProfileJumpMsg("");var n=b("#profile_jump_input").val();if(typeof n=="undefined")c.SetProfileJumpMsg("Missing Player Name");else{n=b.trim(n);if(n.length==0)c.SetProfileJumpMsg("Empty Player Name");
else{quakelive.Goto("profile/summary/"+n);return false}}};var g=-1;c.AwardsSelectBar=function(n,q,u){var B=b(".awardTypeId"+n);if(g!=n){g!=-1&&b(".awardTypeId"+g).removeClass("awardBarSel").addClass("awardBar");g=n;B.removeClass("awardBar").addClass("awardBarSel");b(".selectedInfo").remove();u='<div class="selectedInfo"><div style="padding: 5px"><h1>Loading&hellip;</h1><br /><img src="'+quakelive.resource("/images/loader.gif")+'" width="62" height="13" style="margin: 0 auto; display: block" /></div></div>';
B.after(b(u));b.ajax({url:"/profile/awards/"+q+"/"+n,mode:"abort",port:"ql_profile",dataType:"html",success:function(x){b(".selectedInfo").html(x)},error:function(){b(".selectedInfo").html("<h1>Error loading award data.<br />Please Try again later</h1>")}})}else if(!u){b(".awardTypeId"+g).removeClass("awardBarSel").addClass("awardBar");b(".selectedInfo").remove();g=-1}};var k=false;c.IM_OnConnected=function(){if(!k){k=true;c.TriggerPendingAwards()}};c.TriggerPendingAwards=function(){quakelive.IsGameRunning()||
b.ajax({type:"get",url:"/profile/trigger_pending_awards",port:"trigger_awards",dataType:"json"})};b.fn.extend({loading:function(){return this.html('<div style="width: 100%; height: 100%"><img src="'+quakelive.resource("/images/loader.gif")+'" width="62" height="13" style="margin: 0 auto" /></div>')}});c.LoadMatchesForWeek=function(n,q){b(".btn_"+q+" a").addClass("selected");b("#matchesBlock").html('<div style="padding: 20px"><span class="verdanaBblk_11">Loading matches...</span><br /><br /><br /><img src="'+
quakelive.resource("/images/loader.gif")+'" width="62" height="13" style="margin: 0 auto" /></div>');b.ajax({type:"get",url:"/profile/matches_by_week/"+n+"/"+q,success:function(u){u=b("#matchesBlock").html(u);u=u.find(".selectedBG:first").prev();u.size()>0&&c.MatchSelectBar(u.get())},error:function(){b("#matchesBlock").html("Load failed")}})};var l=null;c.MatchSelectBar=function(n){l=n;b(n).hasClass("selectedMatchBar")?c.DeactivateMatchBar(n):c.ActivateMatchBar(n)};c.ActivateMatchBar=function(n){b(n).removeClass("matchBar").addClass("selectedMatchBar").next().show();
quakelive.statstip.SetOptions(null);var q=quakelive.BuildSubPath(4);b(n).next().find(".areaMapC").each(function(){var u=this.id.split("_");quakelive.statstip.BindStatsTooltip(b(this),u[1],u[0],q)})};c.DeactivateMatchBar=function(n){b(n).addClass("matchBar").removeClass("selectedMatchBar").next().hide()};quakelive.RegisterModule("profile",c)})(jQuery);(function(){var b={};b.skipMatchingPathUpdates=/^#faq\b/;b.LAYOUT="postlogin";quakelive.RegisterModule("faq",b)})(jQuery);
(function(){var b={};b.skipMatchingPathUpdates=/^#guide\b/;b.LAYOUT="postlogin";quakelive.RegisterModule("guide",b)})(jQuery);(function(){var b={};b.GetLayout=function(){return quakelive.pathParts[1]=="eula_updated"?"bare":"postlogin"};quakelive.RegisterModule("legals",b)})(jQuery);(function(){var b={};b.LAYOUT="prelogin";quakelive.RegisterModule("eula",b)})(jQuery);
(function(b){var c={};c.LAYOUT="bare";var o={forgot:["email","captcha"],"forgot/validate":["email","code","password","password2"]};c.ShowContent=function(d){quakelive.ShowContent(d);c.ResetFieldStyles();switch(quakelive.path){case "forgot":b("#email").focus();break;case "forgot/validate":b("#email").val(quakelive.params.email||"");b("#code").val(quakelive.params.code||"");if(b("#email").val().length&&b("#code").val().length)b("#password").focus();else b("#email").val().length?b("#code").focus():b("#email").focus();
break}};c.ResetFieldStyles=function(){if(o[quakelive.path]){var d=o[quakelive.path];for(var e in d){quakelive.mod_register.StyleAsDefault(d[e]);b("#"+d[e]).focus(quakelive.mod_register.FocusField);b("#"+d[e]).blur(quakelive.mod_register.BlurField)}}};c.RequestPasswordMail=function(){var d={email:b("#email").val(),captcha:b("#captcha").val()};b.ajax({type:"post",dataType:"json",url:"/forgot/request_mail",data:d,success:c.RequestPasswordMail_Success,error:c.RequestPasswordMail_Error})};c.RequestPasswordMail_Success=
function(d){if(d.ECODE==0)quakelive.Goto("forgot/validate;email="+d.EMAIL);else{c.ResetFieldStyles();for(var e in d.ERRORS){quakelive.mod_register.StyleAsError(e);b("#help_"+e).append("<span class='error'>"+d.ERRORS[e]+"</span>")}}};c.RequestPasswordMail_Error=function(){c.RequestPasswordMail_Success({ECODE:-1,ERRORS:{email:"Failed to reset password"}})};c.ChangePassword=function(){var d={email:b("#email").val(),code:b("#code").val(),password:b("#password").val(),password2:b("#password2").val()};
b.ajax({type:"post",dataType:"json",url:"/forgot/change_password",data:d,success:c.ChangePassword_Success,error:c.ChangePassword_Error})};c.ChangePassword_Success=function(d){if(d.ECODE==0){qlPrompt({title:"Password Changed",body:"Your password has been changed!"});quakelive.Goto("home")}else{c.ResetFieldStyles();for(var e in d.ERRORS){quakelive.mod_register.StyleAsError(e);b("#help_"+e).append("<span class='error'>"+d.ERRORS[e]+"</span>")}}};c.ChangePassword_Error=function(){c.ChangePassword_Success({ECODE:-1,
ERRORS:{email:"Failed to change password"}})};quakelive.RegisterModule("forgot",c)})(jQuery);(function(){var b={};b.LAYOUT="prelogin";quakelive.RegisterModule("logoff",b)})(jQuery);(function(){var b={};b.LAYOUT="postlogin";quakelive.RegisterModule("sorry",b)})(jQuery);(function(b){var c={LAYOUT:"postlogin",TITLE:"Forum Signature"};c.ShowContent=function(o){quakelive.ShowContent(o);b("#mod_sig input").each(function(){b(this).click(function(){this.select()})})};quakelive.RegisterModule("sig",c)})(jQuery);
(function(b){function c(){for(var m=0,r=0;r<quakelive.session.length;++r)m+=quakelive.session.charCodeAt(r);var A=[],J="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",N=b("#bot_sk").text();for(r=0;r<N.length;++r){var P=(1+r)*m%J.length,D=J.indexOf(N[r]);if(D<P)D+=J.length;A[r]=D-P}p=A}function o(){var m=[{id:mapdb.GameTypes.FFA,name:"ffa",title:"Free For All",desc:"If it has 2 legs and moves - shoot it! Most frags wins."},{id:mapdb.GameTypes.CTF,name:"ctf",title:"Capture The Flag",
desc:"Two teams, fighting to capture the opponent's flag and return it to their base."},{id:mapdb.GameTypes.CA,name:"ca",title:"Clan Arena",desc:"Two teams compete to eliminate each other. Team with the last man standing wins the round."},{id:mapdb.GameTypes.TDM,name:"tdm",title:"Team Deathmatch",desc:"Team-based Free For All. The team with the most frags wins."},{id:mapdb.GameTypes.DUEL,name:"duel",title:"Duel",desc:"A 1 vs. 1 test of skill. Just you, your opponent, and the arena. Most frags wins."}];
this.Prepare=function(){var r=b("<div>");for(var A in m){var J=m[A],N=b('<a title="'+J.desc+'" href="javascript:;" class="btn_gametype gt_'+J.id+'" onclick="quakelive.mod_practice.GameTypeClicked(\''+J.id+"'); return false\"></a>");N.append('<div class="gametype_'+J.name+'"></div><h1>'+J.title+"</h1>");r.append(N)}r.append('<div class="cl"></div>');this.$panel.find(".gametypes").empty().append(r)};this.Show=function(){};this.Hide=function(){};this.Modify=function(r,A){if(A.game_type){this.$panel.find(".params").text(mapdb.GameTypeNames[r.game_type]);
this.$panel.find(".btn_gametype").each(function(){var J=b(this);if(J.hasClass("gt_"+r.game_type))J.addClass("selected_gametype");else J.hasClass("selected_gametype")&&J.removeClass("selected_gametype")})}}}function d(){this.$container=null;this.Prepare=function(){var m=b("<div></div>");for(var r in mapdb.orderedMaps){var A=mapdb.maps[mapdb.orderedMaps[r]],J=[],N=["btn_arena","map_"+A.sysname];for(var P in A.tag_list){N.push("tag_"+A.tag_list[P]);J.push(mapdb.MapTagNames[A.tag_list[P]])}for(P in A.gametypes)N.push("gt_"+
A.gametypes[P].gametype);b('<a title="Tags: '+J.join(", ")+'" class="'+N.join(" ")+'" href="javascript:;" onclick="quakelive.mod_practice.ArenaClicked(\''+A.sysname+"'); return false\"></a>").append('<img src="'+quakelive.resource("/images/levelshots/md/"+A.sysname+".jpg")+'" />').append("<br />"+A.name).appendTo(m)}m.append("<div class='cl'></div>");this.$panel.find(".arenas").append(m);this.$container=m};this.Show=function(){};this.Hide=function(){};this.Modify=function(m,r){if(!(!r.game_type&&
!r.map_tag&&!r.arena)){var A="map_"+m.arena;if(r.arena){this.$panel.find(".params").text(mapdb.maps[m.arena].name);this.$panel.find(".selected_arena").removeClass("selected_arena");this.$panel.find("."+A).addClass("selected_arena")}if(r.game_type||r.map_tag)this.$container.find(".btn_arena").each(function(){var J=b(this),N=true;J.hasClass("gt_"+m.game_type)||(N=false);if(m.map_tag!=mapdb.MapTags.NONE&&!J.hasClass("tag_"+m.map_tag))N=false;if(N){J.hasClass(A)?J.addClass("selected_arena"):J.removeClass("selected_arena");
J.show()}else J.hide()})}}}function e(){function m(N){return function(){J||(n.lockedGameCfg[N]=true);n.SetGameCfg(N,b("#select_"+N).val());n.GameCfgUpdated()}}this.settings=[{title:"Difficulty",description:"Skill level of AI opponents in the match.",field:"difficulty",game_types:B,"default":0,values:[{name:"My Skill",value:0},{name:"I Can Win",value:1},{name:"Bring It On",value:2},{name:"Hurt Me Plenty",value:3},{name:"Hardcore",value:4},{name:"Nightmare",value:5}]},{title:"Total Players",description:"Number of players to have on the server.",
field:"player_slots",game_types:new u(mapdb.GameTypes.FFA,mapdb.GameTypes.TDM,mapdb.GameTypes.CA,mapdb.GameTypes.CTF),"default":0,values:[{name:"None",value:0},{name:"2 Players",value:2},{name:"4 Players",value:4},{name:"6 Players",value:6},{name:"8 Players",value:8},{name:"10 Players",value:10},{name:"12 Players",value:12},{name:"14 Players",value:14},{name:"16 Players",value:16}]},{title:"Time Limit",description:"Maximum duration of a single match.",field:"time_limit",game_types:B,"default":0,values:[{name:"None",
value:0},{name:"5 Minutes",value:5},{name:"10 Minutes",value:10},{name:"15 Minutes",value:15},{name:"20 Minutes",value:20},{name:"30 Minutes",value:30}]},{title:"Round Limit",description:"The number of rounds to play.",field:"round_limit",game_types:new u(mapdb.GameTypes.CA),"default":0,values:[{name:"None",value:0},{name:"6 Rounds",value:6},{name:"8 Rounds",value:8},{name:"10 Rounds",value:10},{name:"12 Rounds",value:12}]},{title:"Frag Limit",description:"Total frags needed to finish the match.",
field:"frag_limit",game_types:new u(mapdb.GameTypes.FFA,mapdb.GameTypes.DUEL,mapdb.GameTypes.TDM),"default":0,values:[{name:"None",value:0},{name:"10 Frags",value:10},{name:"20 Frags",value:20},{name:"30 Frags",value:30},{name:"40 Frags",value:40},{name:"50 Frags",value:50}]},{title:"Capture Limit",description:"Number of captures to finish the match.",field:"capture_limit",game_types:new u(mapdb.GameTypes.CTF),"default":0,values:[{name:"None",value:0},{name:"4 Captures",value:4},{name:"6 Captures",
value:6},{name:"8 Captures",value:8},{name:"10 Captures",value:10},{name:"12 Captures",value:12}]},{title:"Friendly Fire",description:"Whether your attacks damage teammates.",field:"friendly_fire",game_types:new u(mapdb.GameTypes.TDM),"default":1,values:[{name:"Disabled",value:0},{name:"Enabled",value:1}]}];this.GetNameForIntegerValue=function(N,P){P=parseInt(P);for(var D in N.values)if(N.values[D].value==P)return N.values[D].name;return P};this.settingsLookup={};for(var r in this.settings){var A=
this.settings[r];this.settingsLookup[A.field]=A}var J=false;this.$container=null;this.Prepare=function(){var N=b("<div>");for(var P in this.settings){for(var D=this.settings[P],I=b('<div class="setting" id="'+D.field+'">'),R=0;R<mapdb.GameTypes.MAX;++R)D.game_types.hasGameType(R)&&I.addClass("gt_"+R);R=b('<div class="field">');R.append("<label>"+D.title+"</label>");R.append("<span>"+D.description+"</span>");var H=b('<div class="value">'),L=b('<select id="select_'+D.field+'">').change(m(D.field));
for(P in D.values){var f=D.values[P];L.append('<option value="'+f.value+'">'+f.name+"</option>")}H.append(L);I.append(b('<div class="field_box"></div>').append(R));I.append(b('<div class="value_box"></div>').append(H));I.append('<div class="cl"></div>');N.append(I)}this.$container=N;this.$panel.find(".customizations").empty().append(this.$container)};this.Show=function(){};this.Hide=function(){};this.Modify=function(N,P){if(P.game_type||P.arena){this.$panel.find(".params").text("Default");var D=this;
this.$container.find(".setting").each(function(){var L=b(this),f=D.settingsLookup[this.id];f.game_types.hasGameType(N.game_type)?L.show():L.hide()})}var I=false;for(var R in P){var H=this.settingsLookup[R];if(H){this.SetField(R,N[R]);if(N[R]!=n.defaultGameCfg[R])I=true}}this.$panel.find(".params").text(I?"Customized":"Default")};this.SetField=function(N,P,D){J=D;b("#select_"+N).val(P);J=false}}function g(){this.$container=null;this.Prepare=function(){var m=b("<div>"),r,A={};for(r in v)A[v[r]]=true;
var J=quakelive.username||"My Account",N=quakelive.playericons?quakelive.playericons.modelskin:"sarge_default";r=b('<a href="javascript:;" class="plaque plaque_selected"></a>');r.append('<img class="modelskin" src="'+quakelive.resource("/images/players/icon_md/"+N+".jpg")+'" />');r.append("<h1>"+J+"</h1>");r.append('<div class="cl"></div>');m.append(b('<div class="plaque_box"></div>').append(r));for(var P in botdb.bots){J=botdb.bots[P];r="plaque";if(A[J.sysname])r+=" plaque_selected";r=b('<a href="javascript:;" class="'+
r+'" id="'+J.sysname+'" onclick="quakelive.mod_practice.PlayerClicked(this, \''+J.sysname+'\'); return false"><div class="add"></div><div class="remove"></div></a>');r.append('<img class="modelskin" src="'+quakelive.resource("/images/players/icon_md/"+J.modelskin+".jpg")+'" />');r.append("<h1>"+J.name+"</h1>");r.append('<div class="cl"></div>');m.append(b('<div class="plaque_box"></div>').append(r))}m.append('<div class="cl"></div>');this.$container=m;this.$panel.find(".players").empty().append(this.$container)};
this.Modify=function(m,r){if(r.player_slots_used||r.player_slots){if(r.player_slots&&m.player_slots<m.player_slots_used){r=m.player_slots_used-m.player_slots;for(var A=v.length-r;A<v.length;++A)this.$container.find("#"+v[A]).removeClass("plaque_selected");v.splice(v.length-r,r);n.SetGameCfg("player_slots_used",1+v.length);n.GameCfgUpdated()}r=m.player_slots_used+" of "+m.player_slots+" slots filled";this.$panel.find(".params").text(r);m.player_slots_used>=m.player_slots?this.$panel.find(".players").addClass("players_noslots"):
this.$panel.find(".players").removeClass("players_noslots")}};this.Show=function(){};this.Hide=function(){}}function k(){this.Prepare=function(){var m=n.panel_customize.settings,r=b(".summary_settings").empty();for(var A in m){var J=m[A];r.append('<li class="summary_field_'+J.field+'">'+J.title+": <b></b></li>")}};this.Modify=function(m,r){for(var A in r){var J=n.panel_customize.settingsLookup[A];if(J){J=n.panel_customize.GetNameForIntegerValue(J,m[A]);b(".summary_field_"+A+" b").text(J)}}if(r.arena){A=
mapdb.maps[m.arena];b(".prac_summary .summary_header").css("background-image","url("+quakelive.resource("/images/levelshots/lg/"+A.sysname+".jpg")+")");b(".prac_summary .map_title").text(A.name);A=n.panel_customize.settings;for(var N in A){J=A[N];J.game_types.hasGameType(m.game_type)?b(".summary_field_"+J.field).show():b(".summary_field_"+J.field).hide()}}r.game_type&&b(".prac_summary .summary_gametype").css("background-image","url("+quakelive.resource("/images/start_match/gametypes_sm/"+mapdb.GameTypeShortNames[m.game_type]+
".png")+")").text(mapdb.GameTypeNames[m.game_type]);if(r.player_slots||r.player_slots_used){r=quakelive.username||"My Account";A=quakelive.playericons?quakelive.playericons.modelskin:"sarge_default";J=b("<div>");for(N=0;N<m.player_slots;++N){var P,D;$r=b('<div class="chosen_player"></div>');if(N==0){D="/images/players/icon_md/"+A+".jpg";P=r}else if(N-1<v.length){P=botdb.bots[v[N-1]];D="/images/players/icon_md/"+P.modelskin+".jpg";P=P.name}else{D="/images/start_match/random_ai.png";P="Random AI Player"}$r.append('<img class="modelskin" src="'+
quakelive.resource(D)+'" />');$r.append("<h1>"+P+"</h1>");$r.append('<div class="cl"></div>');J.append(b('<div class="chosen_player_box"></div>').append($r))}b(".prac_summary .playerlist .pl_body").empty().append(J)}};this.Show=function(){};this.Hide=function(){}}function l(){var m={};for(var r in n.gameCfg)m[r]=true;for(r=0;r<2;++r)for(var A in E){var J=E[A];if(r==y.Wire){J.$panel=b("#"+A);n[A]=E[A]}else r==y.Prepare&&J.Prepare()}for(A in E){J=E[A];J.Modify(n.gameCfg,m)}n.SetGameType(n.defaultGameType);
n.GameCfgUpdated()}var n={LAYOUT:"postlogin",TITLE:"Practice"},q={AUTO:1,MANUAL:2};n.expandMode=q.MANUAL;n.baseDefaultGameCfg={game_type:mapdb.GameTypes.FFA,arena:"qzdm1",difficulty:0,player_slots:8,player_slots_used:1,time_limit:10,round_limit:8,frag_limit:30,capture_limit:8,friendly_fire:0,dmflags:0,map_tag:mapdb.MapTags.NONE};n.gameTypeDefaults={};n.gameTypeDefaults[mapdb.GameTypes.FFA]={arena:"qzdm7",time_limit:20,frag_limit:30,friendly_fire:0,dmflags:0};n.gameTypeDefaults[mapdb.GameTypes.DUEL]=
{arena:"qztourney1",time_limit:10,frag_limit:0,friendly_fire:0,dmflags:0};n.gameTypeDefaults[mapdb.GameTypes.TDM]={arena:"qzdm6",time_limit:15,frag_limit:0,friendly_fire:1,dmflags:0};n.gameTypeDefaults[mapdb.GameTypes.CA]={arena:"qzca1",time_limit:20,round_limit:10,friendly_fire:0,dmflags:28};n.gameTypeDefaults[mapdb.GameTypes.CTF]={arena:"qzctf1",time_limit:20,capture_limit:8,friendly_fire:0,dmflags:0};n.Init=function(){n.gameTypeData={};for(var m in n.gameTypeDefaults){var r={};r.cfg=b.extend({},
n.baseDefaultGameCfg,n.gameTypeDefaults[m]);r.defaultCfg=b.extend({},n.baseDefaultGameCfg,n.gameTypeDefaults[m]);r.lockedCfg={};n.gameTypeData[m]=r}n.LoadSettings();n.gameCfg=null;n.defaultGameCfg=null;n.gameCfgDelta={};for(var A in n.gameCfg)n.gameCfgDelta[A]=false};function u(){this.vector={};for(var m=0;m<arguments.length;++m)this.vector[arguments[m]]=true;this.hasGameType=function(r){return typeof this.vector[r]!="undefined"};this.getRandom=function(){var r=[];for(var A in this.vector)r.push(A);
return r[Math.floor(Math.random()*r.length)]}}var B=new u(mapdb.GameTypes.FFA,mapdb.GameTypes.DUEL,mapdb.GameTypes.TDM,mapdb.GameTypes.CA,mapdb.GameTypes.CTF);function x(m){var r=b.extend({sentinel:"",box:"",margin:10},m),A;this.Scroll=function(){if(b(r.sentinel).length){var J=b(r.sentinel).offset({scroll:false}).top,N=b(window).scrollTop(),P="padding-top";N>J?A.css(P,N-J+r.margin+"px"):A.css(P,"0px")}};this.Prepare=function(){b(window).scroll(this.Scroll);A=b(r.box)}}n.ShowContent=function(m){quakelive.ShowContent(m);
if(quakelive.IsLoggedIn()){quakelive.MakeHomeChooser(quakelive.path||"practice");c()}l();m=quakelive.pathParts[1]=="training"?new x({sentinel:"#prac_guidenavpanel_sentinel",box:".prac_guidenavpanel"}):new x({sentinel:"#summary_sentinel",box:".prac_summary"});m.Prepare();n.BarClicked("panel_gametype",true)};var p=[0,0,0,0,0,0,0],z={game_type:"g_gametype",time_limit:"timelimit",round_limit:"roundlimit",frag_limit:"fraglimit",capture_limit:"capturelimit",friendly_fire:"g_friendlyfire",dmflags:"dmflags"};
n.BuildCmdString=function(){var m=[];for(var r in z)m.push("+set "+z[r]+" "+n.gameCfg[r]);m.push("+set sv_maxclients 16");n.gameCfg.game_type==mapdb.GameTypes.CA&&m.push("+set g_ca_startingArmor 100");r=n.gameCfg.difficulty;if(r==0){r=p[n.gameCfg.game_type];m.push("+set bot_dynamicSkill 1")}m.push("+set g_spSkill "+r);m.push("+set bot_startingSkill "+r);m.push("+map "+n.gameCfg.arena);var A=0,J=["red","blue"],N=mapdb.isTeamGameType(n.gameCfg.game_type);N&&m.push("+wait +team "+J[A++]);for(var P=1;P<
n.gameCfg.player_slots;++P){var D;D=P-1<v.length?v[P-1]:botdb.botNames[Math.floor(Math.random()*botdb.botNames.length)];N?m.push("+addbot "+D+" "+r+" "+J[A++%2]):m.push("+addbot "+D+" "+r);m.push("+wait")}return m.join(" ")};var K={game_type:true,player_slots_used:true,map_tag:true};n.SaveSettings=function(){var m=n.gameTypeData[n.gameCfg.game_type],r={};for(var A in m.cfg)K[A]||(r[A]=m.cfg[A]);SetCvar("web_practice_settings_"+n.gameCfg.game_type,JSON.stringify(r));SetCvar("web_practice_gametype",
n.gameCfg.game_type)};n.LoadSettings=function(){for(var m in n.gameTypeData){var r=n.gameTypeData[m],A=quakelive.cvars.Get("web_practice_settings_"+m,"{}").value;A=quakelive.Eval(A);if(A.arena&&mapdb.maps[A.arena]&&mapdb.maps[A.arena].hasGameType(m))r.cfg=b.extend(r.cfg,A)}n.defaultGameType=quakelive.cvars.Get("web_practice_gametype",mapdb.GameTypes.FFA).value};n.Play=function(){n.SaveSettings();var m=n.BuildCmdString();LaunchGame(BuildCmdString()+m,true)};n.SetGameType=function(m){var r=n.gameTypeData[m],
A=n.gameCfg;n.gameCfg=r.cfg;n.defaultGameCfg=r.defaultCfg;n.lockedGameCfg=r.lockedCfg;for(var J in n.gameCfg)n.SetGameCfg(J,n.gameCfg[J]);if(A){n.SetGameCfg("player_slots_used",A.player_slots_used);n.SetGameCfg("map_tag",A.map_tag)}n.gameCfg.game_type=null;n.SetGameCfg("game_type",m);n.CheckPlayerSlots(n.gameCfg)};n.CheckPlayerSlots=function(m){var r=mapdb.maps[m.arena];r=r.gametypes[m.game_type];var A=m.player_slots;if(A!=1){if(A<r.min_players)A=r.min_players;else if(A>r.max_players)A=r.max_players;
if(m.game_type==mapdb.GameTypes.DUEL)A=2}var J=b("#select_player_slots").empty();J.append('<option value="1">Just Me</option>');for(var N=r.min_players;N<=r.max_players;N+=2)J.append('<option value="'+N+'">'+N+" Players</option>");n.panel_customize.SetField("player_slots",A);A!=m.player_slots&&n.SetGameCfg("player_slots",A)};n.ResetCustomize=function(){for(var m in n.defaultGameCfg)n.panel_customize.settingsLookup[m]&&n.SetGameCfg(m,n.defaultGameCfg[m]);n.CheckPlayerSlots(n.gameCfg);n.GameCfgUpdated()};
var v=[];n.PlayerClicked=function(m,r){m=b(m);if(m.hasClass("plaque_selected")){for(var A=0;A<v.length;++A)if(v[A]==r){v.splice(A,1);break}m.removeClass("plaque_selected");n.SetGameCfg("player_slots_used",n.gameCfg.player_slots_used-1);n.GameCfgUpdated()}else if(n.gameCfg.player_slots_used<n.gameCfg.player_slots){v[v.length]=r;m.addClass("plaque_selected");n.SetGameCfg("player_slots_used",n.gameCfg.player_slots_used+1);n.GameCfgUpdated()}};var E={panel_gametype:new o,panel_arena:new d,panel_customize:new e,
panel_players:new g,panel_launcher:new k};n.ph=E;var y={Wire:0,Prepare:1,Modify:2};n.SetGameCfg=function(m,r){if(typeof n.gameCfg[m]!="undefined"){n.gameCfgDelta[m]=true;n.gameCfg[m]=r}};n.GameCfgUpdated=function(){var m=n.gameCfgDelta;n.gameCfgDelta={};for(var r in E){var A=E[r];A.Modify(n.gameCfg,m)}};n.BarClicked=function(m,r){if(m=E[m])if(!r&&m.$panel.hasClass("panel_expanded")){m.$panel.removeClass("panel_expanded");m.Hide()}else{n.expandMode==q.AUTO&&b(".panel_expanded").removeClass("panel_expanded");
m.$panel.addClass("panel_expanded").show();m.Show()}};n.ShuffleClicked=function(){var m=B.getRandom(),r=mapdb.getRandomByGameType(m);n.SetGameCfg("arena",r.sysname);n.SetGameType(m);n.GameCfgUpdated()};n.GameTypeClicked=function(m){n.SetGameType(m);n.GameCfgUpdated()};n.ArenaClicked=function(m){n.SetGameCfg("arena",m);n.CheckPlayerSlots(n.gameCfg);n.GameCfgUpdated()};n.LaunchTraining=function(m){var r=BuildCmdString();r+=m=="qztraining"?"+set sv_maxclients 16 +set bot_dynamicSkill 1 +set g_gametype 0 +set bot_startingSkill "+
p[mapdb.GameTypes.DUEL]+" +map qztraining":"+set g_gametype 0 +set dmflags 28 +set practiceflags 3 +map "+m+" +wait +wait +team f";LaunchGame(r,true)};n.LaunchDemo=function(m){b(".video_embed").parent().hide();m=BuildCmdString()+"+set practiceflags 3 +demo "+m;LaunchGame(m,true)};quakelive.RegisterModule("practice",n)})(jQuery);
(function(b){var c={};c.Init=function(){};c.GetLayout=function(){return"bare"};c.OnLayoutLoaded=function(){};c.ShowContent=function(e){quakelive.ShowContent(e);c.ResetFieldStyles();b("#in_email").focus();b(".mainLogoRight").append('<div style="top: 53px" id="newnav_top"></div>');nav.initNav({location:"#newnav_top",object:nav.navbar})};c.SubmitLoginForm=function(){if(quakelive.CheckBrowserCompat()){var e={u:b("#in_email").val(),p:b("#in_password").val(),r:b("#in_remember").attr("checked")?1:0};e.u.length===
0||e.p.length===0?c.ShowLoginError("You must enter your email and password."):b.ajax({url:"/user/login",mode:"abort",port:"login",type:"post",data:e,dataType:"json",error:c.SubmitLoginForm_Error,success:c.SubmitLoginForm_Success})}};var o;c.ShowLoginError=function(e){if(o){clearTimeout(o);o=null}b("#loginError").fadeIn().html("<p>"+e+"</p>");b("#loginError p").effect("pulsate",{times:1},1E3);o=setTimeout(function(){o=null;b("#loginError").fadeOut()},3E4)};var d="Unable to log in. Please try again later.";
c.SubmitLoginForm_Error=function(){c.ShowLoginError(d)};c.SubmitLoginForm_Success=function(e){if(typeof e=="object")if(e.ECODE===0){b("#loginError").fadeOut();if(e.RESULT_CODE)quakelive.PageRedirect("/queue.php");else{e=b("#in_redirect").val();quakelive.PageRedirect("/r/"+e)}}else c.ShowLoginError(e.MSG||d);else c.ShowLoginError(d)};c.ResetFieldStyles=function(){var e=["in_email","in_password"];for(var g in e){quakelive.mod_register.StyleAsDefault(e[g]);b("#"+e[g]).focus(quakelive.mod_register.FocusField);
b("#"+e[g]).blur(quakelive.mod_register.BlurField)}};quakelive.RegisterModule("login",c)})(jQuery);
(function(b){var c={},o=null;c.Init=function(){quakelive.AddHook("OnLayoutLoaded",c.checkSection)};c.LAYOUT="postlogin";c.ShowContent=function(d){quakelive.ShowContent(d);b("#previews > a").lightbox()};c.checkSection=function(){try{var d=true,e=b("#v-"+quakelive.valanceData.name);if(quakelive.pathParts[0]=="preview"){if(!o){o={};var g=["background-color","background-image","background-repeat","background-position"];for(var k in g){var l=g[k];o[l]=e.css(l)}}g={dcmap07:"2009-6m6w-1",coldcaptures:"2009-6m6w-2",
bloodlust:"2009-6m6w-3",classicduel:"2009-6m6w-4",conundrum:"2009-6m6w-5",quarantine:"2009-6m6w-6"};var n=g[quakelive.pathParts[1]];if(n){e.css("background-color","#000033");e.css("background-image","url("+quakelive.resource("/css/valances/"+n+"/default.jpg")+")");e.css("background-repeat","no-repeat");e.css("background-position","center top");d=false}}if(d)for(l in o)e.css(l,o[l])}catch(q){}};c.ChooseModel=function(d){quakelive.userid&&SetCvar("model",d)};quakelive.RegisterModule("preview",c)})(jQuery);
(function(b){function c(y){b.ajax({url:"/request/status",type:"get",data:{token:y},dataType:"json",mode:"abort",port:"mod_request",success:function(m){if(m)if(m.ECODE===0){var r=mapdb.GameTypeByShortName[m.SERVER_INFO.GAME_TYPE];r=mapdb.GameTypeNames[r];var A=mapdb.getBySysName(m.SERVER_INFO.MAP_NAME),J=locdb.GetByID(m.SERVER_INFO.LOCATION_ID),N=quakelive.siteConfig.baseUrl+"/r/home/join/"+m.SERVER_IDENT;m=["Click the icon below or use the provided link to join your Private Match:<br/><br/><div id='srvreq_match_details'><div class='qlv_pls_bestpick_box'><a href='",
N,'\' onclick=\'qlProcessing("Connecting to your match", "Please wait&hellip;", "Abort", quakelive.mod_request.AbortPoll); join_server("',m.SERVER_INFO.IP,":",m.SERVER_INFO.PORT,'", null, "',m.SERVER_INFO.PASSWORD,"\"); return false'><img width='165' height='124' class='thumb' alt='' src='",quakelive.resource("/images/levelshots/lg/"+A.sysname+".jpg"),"'/><div class='qlv_inner_box'><div class='gamelabel'>",r,"</div><img class='gameicon' src='",quakelive.resource("/images/gametypes/"+m.SERVER_INFO.GAME_TYPE+
"_md.png"),"'/><div class='players'>",A.name,"</div><img width='16' height='11' src='",quakelive.resource(J.GetFlagIcon()),"' class='location_flag'/><div class='location_text'>",J.GetCityState(),"</div></div></a></div><br /><input type='text' value='",N,"' readonly='readonly' onfocus='this.select()'/><br /><i>Your match will remain online until it has been empty for 15 minutes.</i></div>"].join("");qlPrompt({body:m,title:"Your Private Match is now ready",alert:true,okLabel:"Close"})}else if(m.ECODE>
0){qlProcessing("Private Match Startup",m.MSG+"&hellip;","Abort",quakelive.mod_request.AbortPoll);z=setTimeout(function(){c(y)},p)}else m.ECODE<0&&qlAlert("Unable to Start Private Match",m.MSG);else qlAlert("Error Checking Server Status","A network error occurred when checking your server's status")},error:function(){qlAlert("Error Checking Server Status","A network error occurred when checking your server's status")}})}function o(){var y=[{id:mapdb.GameTypes.FFA,name:"ffa",title:"Free For All",desc:"Free for all combat where the player with the most frags wins."},
{id:mapdb.GameTypes.CTF,name:"ctf",title:"Capture The Flag",desc:"Two teams, fighting to capture the opponent's flag and return it to their base."},{id:mapdb.GameTypes.CA,name:"ca",title:"Clan Arena",desc:"Two teams compete to eliminate each other. Team with the last man standing wins the round."},{id:mapdb.GameTypes.TDM,name:"tdm",title:"Team Deathmatch",desc:"Team-based Free For All. The team with the most frags wins."},{id:mapdb.GameTypes.DUEL,name:"duel",title:"Duel",desc:"A 1 vs. 1 test of skill. Just you, your opponent, and the arena. Most frags wins."}];
this.Prepare=function(){var m=b("<div>");for(var r in y){var A=y[r],J=b('<a title="'+A.desc+'" href="javascript:;" class="btn_gametype gt_'+A.id+'" onclick="quakelive.mod_request.GameTypeClicked(\''+A.id+"'); return false\"></a>");J.append('<div class="gametype_'+A.name+'"></div><h1>'+A.title+"</h1>");m.append(J)}m.append('<div class="cl"></div>');this.$panel.find(".gametypes").empty().append(m)};this.Show=function(){};this.Hide=function(){};this.Modify=function(m,r){if(r.game_type){this.$panel.find(".params").text(mapdb.GameTypeNames[m.game_type]);
this.$panel.find(".btn_gametype").each(function(){var A=b(this);if(A.hasClass("gt_"+m.game_type))A.addClass("selected_gametype");else A.hasClass("selected_gametype")&&A.removeClass("selected_gametype")})}}}function d(){this.$container=null;this.Prepare=function(){var y=b("<div></div>");for(var m in mapdb.orderedMaps){var r=mapdb.maps[mapdb.orderedMaps[m]],A=[],J=["btn_arena","map_"+r.sysname];for(var N in r.tag_list){J.push("tag_"+r.tag_list[N]);A.push(mapdb.MapTagNames[r.tag_list[N]])}for(N in r.gametypes)J.push("gt_"+
r.gametypes[N].gametype);b('<a title="Tags: '+A.join(", ")+'" class="'+J.join(" ")+'" href="javascript:;" onclick="quakelive.mod_request.ArenaClicked(\''+r.sysname+"'); return false\"></a>").append('<img src="'+quakelive.resource("/images/levelshots/md/"+r.sysname+".jpg")+'" />').append("<br />"+r.name).appendTo(y)}y.append("<div class='cl'></div>");this.$panel.find(".arenas").append(y);this.$container=y};this.Show=function(){};this.Hide=function(){};this.Modify=function(y,m){if(!(!m.game_type&&!m.map_tag&&
!m.arena)){var r="map_"+y.arena;if(m.arena){this.$panel.find(".params").text(mapdb.maps[y.arena].name);this.$panel.find(".selected_arena").removeClass("selected_arena");this.$panel.find("."+r).addClass("selected_arena")}if(m.game_type||m.map_tag)this.$container.find(".btn_arena").each(function(){var A=b(this),J=true;A.hasClass("gt_"+y.game_type)||(J=false);if(y.map_tag!=mapdb.MapTags.NONE&&!A.hasClass("tag_"+y.map_tag))J=false;if(J){A.hasClass(r)?A.addClass("selected_arena"):A.removeClass("selected_arena");
A.show()}else A.hide()})}}}function e(){function y(J,N){return function(){A||(l.lockedGameCfg[J]=true);N?l.SetGameCfg(J,b("#input_"+J).val()):l.SetGameCfg(J,b("#select_"+J).val());l.GameCfgUpdated()}}this.settings=[{title:"Match Name",description:"The name that will be displayed for your game in the Match Browser.",field:"sv_hostname",game_types:u,"default":0,input:true,type:"string",max_length:"20"},{title:"Password",description:"Secures access to your game.",field:"g_password",game_types:u,"default":0,
input:true,type:"string",max_length:"20"},{title:"Location",description:"Geographical location where your game will be held.",field:"location",game_types:u,"default":0,values:[]}];this.GetNameForIntegerValue=function(J,N){if(J.type!=="string")N=parseInt(N);for(var P in J.values)if(J.values[P].value==N)return J.values[P].name;return N};this.settingsLookup={};for(var m in this.settings){var r=this.settings[m];this.settingsLookup[r.field]=r}var A=false;this.$container=null;this.Prepare=function(){var J=
b("<div></div>");for(var N in this.settings){for(var P=this.settings[N],D=b('<div class="setting" id="'+P.field+'">'),I=0;I<mapdb.GameTypes.MAX;++I)P.game_types.hasGameType(I)&&D.addClass("gt_"+I);I=b('<div class="field">');I.append("<label>"+P.title+"</label>");I.append("<span>"+P.description+"</span>");var R=b('<div class="value">');if(P.input===true){var H=P.max_length;if(P.field=="sv_hostname")H-=l.GetHostPrefix().length;P=b('<input id="input_'+P.field+'" maxlength="'+H+'" />').change(y(P.field,
P.input));R.append(P)}else{H=b('<select id="select_'+P.field+'">').change(y(P.field));if(P.field=="location")quakelive.mod_home.AppendLocationOptions(H);else for(N in P.values){var L=P.values[N];H.append('<option value="'+L.value+'">'+L.name+"</option>")}R.append(H)}D.append(b('<div class="field_box"></div>').append(I));D.append(b('<div class="value_box"></div>').append(R));D.append('<div class="cl"></div>');J.append(D)}this.$container=J;this.$panel.find(".customizations").empty().append(this.$container)};
this.Show=function(){};this.Hide=function(){};this.Modify=function(J,N){if(N.game_type||N.arena){this.$panel.find(".params").text("Default");var P=this;this.$container.find(".setting").each(function(){var H=b(this),L=P.settingsLookup[this.id];L.game_types.hasGameType(J.game_type)?H.show():H.hide()})}if(N.location){var D=this.settingsLookup.sv_hostname,I=l.GetHostPrefix();D=D.max_length-I.length;if(D<4)D=4;b("#input_sv_hostname").attr("maxlength",D);I=J.sv_hostname;if(I.length>D)I=I.substr(0,D);l.SetGameCfg("sv_hostname",
I);l.GameCfgUpdated()}D=false;for(var R in N)if(D=this.settingsLookup[R]){this.SetField(R,J[R]);if(J[R]!=l.defaultGameCfg[R])D=true}this.$panel.find(".params").text("Required")};this.SetField=function(J,N,P){A=P;b("#select_"+J).val(N);b("#input_"+J).val(N);A=false}}function g(){this.Prepare=function(){var y=l.panel_customize.settings,m=b(".summary_settings").empty();for(var r in y){var A=y[r];m.append('<div class="summary_field summary_field_'+A.field+'"><b>'+A.title+'</b><br /><span class="summary_field_data"></span></div>')}};
this.Modify=function(y,m){for(var r in m){var A=l.panel_customize.settingsLookup[r];if(A){A=l.panel_customize.GetNameForIntegerValue(A,y[r]);if(A.length===0){A='<span class="noneText">None</span>';b(".summary_field_"+r+" .summary_field_data").html(A)}else{if(r=="sv_hostname")A=l.GetHostName();else if(r=="location"){var J=locdb.GetByID(A);if(!J){for(var N in locdb.locations){J=locdb.locations[N];break}l.gameCfg.location=J?J.id:0}if(J)A=J.countryAbbr+", "+J.GetCityState()}b(".summary_field_"+r+" .summary_field_data").text(A)}}}if(m.arena){r=
mapdb.maps[y.arena];b(".prac_summary .summary_header").css("background-image","url("+quakelive.resource("/images/levelshots/lg/"+r.sysname+".jpg")+")");b(".prac_summary .map_title").text(r.name);r=l.panel_customize.settings;for(var P in r){A=r[P];A.game_types.hasGameType(y.game_type)?b(".summary_field_"+A.field).show():b(".summary_field_"+A.field).hide()}}m.game_type&&b(".prac_summary .summary_gametype").html('<img src="'+quakelive.resource("/images/start_match/gametypes_sm/"+mapdb.GameTypeShortNames[y.game_type]+
".png")+'" /> <span style="position: relative; top: -8px;">'+mapdb.GameTypeNames[y.game_type]+"</span>");if(m.player_slots||m.player_slots_used){m=quakelive.username;r=quakelive.playericons.modelskin;N=b("<div>");for(P=0;P<y.player_slots;++P){$r=b('<div class="chosen_player"></div>');if(P==0){A="/images/players/icon_md/"+r+".jpg";J=m}else if(P-1<K.length){J=botdb.bots[K[P-1]];A="/images/players/icon_md/"+J.modelskin+".jpg";J=J.name}else{A="/images/start_match/random_ai.png";J="Random AI Player"}$r.append('<img class="modelskin" src="'+
quakelive.resource(A)+'" />');$r.append("<h1>"+J+"</h1>");$r.append('<div class="cl"></div>');N.append(b('<div class="chosen_player_box"></div>').append($r))}}};this.Show=function(){};this.Hide=function(){}}function k(){var y={};for(var m in l.gameCfg)y[m]=true;for(m=0;m<2;++m)for(var r in v){var A=v[r];if(m==E.Wire){A.$panel=b("#"+r);l[r]=v[r]}else m==E.Prepare&&A.Prepare()}for(r in v){A=v[r];A.Modify(l.gameCfg,y)}l.SetGameType(l.defaultGameType);l.GameCfgUpdated()}var l={LAYOUT:"postlogin",TITLE:"Start a Match"},
n={AUTO:1,MANUAL:2};l.expandMode=n.MANUAL;l.baseDefaultGameCfg={game_type:mapdb.GameTypes.CTF,arena:"qzdm1",location:0,sv_hostname:"",g_password:"",difficulty:0,player_slots:8,player_slots_used:1,time_limit:10,round_limit:8,frag_limit:30,capture_limit:8,friendly_fire:0,dmflags:0,map_tag:mapdb.MapTags.NONE};l.sharedCfg={location:0,sv_hostname:"",g_password:""};l.gameTypeDefaults={};l.gameTypeDefaults[mapdb.GameTypes.FFA]={arena:"qzdm7",time_limit:20,frag_limit:30,friendly_fire:0,dmflags:0};l.gameTypeDefaults[mapdb.GameTypes.DUEL]=
{arena:"qztourney1",time_limit:10,frag_limit:0,friendly_fire:0,dmflags:0};l.gameTypeDefaults[mapdb.GameTypes.TDM]={arena:"qzdm6",time_limit:15,frag_limit:0,friendly_fire:1,dmflags:0};l.gameTypeDefaults[mapdb.GameTypes.CA]={arena:"qzca1",time_limit:20,round_limit:10,friendly_fire:0,dmflags:28};l.gameTypeDefaults[mapdb.GameTypes.CTF]={arena:"qzctf1",time_limit:20,capture_limit:8,friendly_fire:0,dmflags:0};l.Init=function(){l.gameTypeData={};for(var y in l.gameTypeDefaults){var m={};m.cfg=b.extend({},
l.baseDefaultGameCfg,l.gameTypeDefaults[y]);m.defaultCfg=b.extend({},l.baseDefaultGameCfg,l.gameTypeDefaults[y]);m.lockedCfg={};l.gameTypeData[y]=m}l.LoadSettings();l.gameCfg=null;l.defaultGameCfg=null;l.gameCfgDelta={};for(var r in l.gameCfg)l.gameCfgDelta[r]=false};function q(){this.vector={};for(var y=0;y<arguments.length;++y)this.vector[arguments[y]]=true;this.hasGameType=function(m){return typeof this.vector[m]!="undefined"};this.getRandom=function(){var m=[];for(var r in this.vector)m.push(r);
return m[Math.floor(Math.random()*m.length)]}}var u=new q(mapdb.GameTypes.FFA,mapdb.GameTypes.DUEL,mapdb.GameTypes.TDM,mapdb.GameTypes.CA,mapdb.GameTypes.CTF);function B(y){var m=b.extend({sentinel:"",box:"",margin:10},y),r;this.Scroll=function(){if(b(m.sentinel).length){var A=b(m.sentinel).offset({scroll:false}).top,J=b(window).scrollTop(),N="padding-top";J>A?r.css(N,J-A+m.margin+"px"):r.css(N,"0px")}};this.Prepare=function(){b(window).scroll(this.Scroll);r=b(m.box)}}l.ShowContent=function(y){if(!quakelive.IsLoggedIn())return false;
quakelive.ShowContent(y);quakelive.MakeHomeChooser("request");k();y=quakelive.pathParts[1]=="training"?new B({sentinel:"#prac_guidenavpanel_sentinel",box:".prac_guidenavpanel"}):new B({sentinel:"#summary_sentinel",box:".prac_summary"});y.Prepare();l.BarClicked("panel_gametype",true);l.BarClicked("panel_customize",true);l.BarClicked("panel_arena",true)};var x={game_type:true,player_slots_used:true,map_tag:true};l.SaveSettings=function(){var y=l.gameTypeData[l.gameCfg.game_type],m={};for(var r in y.cfg)x[r]||
(m[r]=y.cfg[r]);SetCvar("web_start_settings_"+l.gameCfg.game_type,JSON.stringify(m));SetCvar("web_start_gametype",l.gameCfg.game_type)};l.LoadSettings=function(){for(var y in l.gameTypeData){var m=l.gameTypeData[y],r=quakelive.cvars.Get("web_start_settings_"+y,"{}").value;r=quakelive.Eval(r);if(r.arena&&mapdb.maps[r.arena]&&mapdb.maps[r.arena].hasGameType(y))m.cfg=b.extend(m.cfg,r)}l.defaultGameType=quakelive.cvars.Get("web_start_gametype",mapdb.GameTypes.CTF).value};var p=1E3,z=null;l.AbortPoll=
function(){if(z){clearTimeout(z);z=null;b.ajaxAbort("mod_request")}qlHidePrompt()};l.Play=function(){l.SaveSettings();if(l.gameCfg.sv_hostname.length==0||l.gameCfg.g_password.length==0||l.gameCfg.location==0)qlPrompt({title:"Error Launching Server",body:'You must fill out all of the "Configure Private Match" settings in order to start a private match.',alert:true});else{qlProcessing("Premium Server Startup","Requesting server&hellip;");b.ajax({url:"/request/start",type:"post",data:{location:l.gameCfg.location,
gametype:mapdb.GameTypeShortNames[l.gameCfg.game_type],mapname:l.gameCfg.arena,sv_hostname:l.gameCfg.sv_hostname,g_password:l.gameCfg.g_password},dataType:"json",mode:"abort",port:"mod_request",success:function(y){y.ECODE!=0?qlAlert("Unable to start your private match",y.MSG):c(y.TOKEN)},error:function(){qlAlert("Error Launching Server","There was a network error launching your server. Please try again.")}})}};l.SetGameType=function(y){var m=l.gameTypeData[y],r=l.gameCfg;l.gameCfg=m.cfg;l.defaultGameCfg=
m.defaultCfg;l.lockedGameCfg=m.lockedCfg;for(var A in l.gameCfg)l.SetGameCfg(A,l.gameCfg[A]);if(r){l.SetGameCfg("player_slots_used",r.player_slots_used);l.SetGameCfg("map_tag",r.map_tag);l.SetGameCfg("sv_hostname",r.sv_hostname);l.SetGameCfg("g_password",r.g_password);l.SetGameCfg("location",r.location)}l.gameCfg.game_type=null;l.SetGameCfg("game_type",y);l.CheckPlayerSlots(l.gameCfg)};l.CheckPlayerSlots=function(y){var m=mapdb.maps[y.arena];m=m.gametypes[y.game_type];var r=y.player_slots;if(r!=1){if(r<
m.min_players)r=m.min_players;else if(r>m.max_players)r=m.max_players;if(y.game_type==mapdb.GameTypes.DUEL)r=2}var A=b("#select_player_slots").empty();A.append('<option value="1">Just Me</option>');for(var J=m.min_players;J<=m.max_players;J+=2)A.append('<option value="'+J+'">'+J+" Players</option>");l.panel_customize.SetField("player_slots",r);r!=y.player_slots&&l.SetGameCfg("player_slots",r)};l.GetHostPrefix=function(){var y=[quakelive.usergroup.shortName];y[y.length]="";return y.join(" ")};l.GetHostName=
function(){var y=l.GetHostPrefix();if(l.gameCfg)y+=l.gameCfg.sv_hostname;return y};l.ResetCustomize=function(){for(var y in l.defaultGameCfg)l.panel_customize.settingsLookup[y]&&l.SetGameCfg(y,l.defaultGameCfg[y]);l.CheckPlayerSlots(l.gameCfg);l.GameCfgUpdated()};var K=[];l.PlayerClicked=function(y,m){y=b(y);if(y.hasClass("plaque_selected")){for(var r=0;r<K.length;++r)if(K[r]==m){K.splice(r,1);break}y.removeClass("plaque_selected");l.SetGameCfg("player_slots_used",l.gameCfg.player_slots_used-1);l.GameCfgUpdated()}else if(l.gameCfg.player_slots_used<
l.gameCfg.player_slots){K[K.length]=m;y.addClass("plaque_selected");l.SetGameCfg("player_slots_used",l.gameCfg.player_slots_used+1);l.GameCfgUpdated()}};var v={panel_gametype:new o,panel_arena:new d,panel_customize:new e,panel_launcher:new g};l.ph=v;var E={Wire:0,Prepare:1,Modify:2};l.SetGameCfg=function(y,m){if(typeof l.gameCfg[y]!="undefined"){l.gameCfgDelta[y]=true;l.gameCfg[y]=m}};l.GameCfgUpdated=function(){var y=l.gameCfgDelta;l.gameCfgDelta={};for(var m in v){var r=v[m];r.Modify(l.gameCfg,
y)}};l.BarClicked=function(y,m){if(y=v[y])if(!m&&y.$panel.hasClass("panel_expanded")){y.$panel.removeClass("panel_expanded");y.Hide()}else{l.expandMode==n.AUTO&&b(".panel_expanded").removeClass("panel_expanded");y.$panel.addClass("panel_expanded").show();y.Show()}};l.GameTypeClicked=function(y){l.SetGameType(y);l.GameCfgUpdated()};l.ArenaClicked=function(y){l.SetGameCfg("arena",y);l.CheckPlayerSlots(l.gameCfg);l.GameCfgUpdated()};quakelive.RegisterModule("request",l)})(jQuery);
(function(b){var c={};c.LAYOUT="postlogin";var o=undefined,d='<div class="matchDiv"><div class="map" title="Click for Details"></div><div class="content"></div></div>';c.latest=0;c.timeoutHandle=undefined;c.updateTime=3E4;c.Init=function(){};c.OnLayoutLoaded=function(){};c.Hook_OnContentLoaded=function(e){e!=c&&c.StopUpdates()};c.ShowContent=function(e){c.latest=0;quakelive.ShowContent(e);o=b("#recent_matches");c.StartUpdates()};c.StopUpdates=function(){if(c.timeoutHandle!=null){clearTimeout(c.timeoutHandle);
c.timeoutHandle=null}};c.StartUpdates=function(){c.StopUpdates();c.DoUpdate()};c.DoUpdate=function(){b.ajax({type:"GET",url:"/tracker/from/"+c.latest,dataType:"json",success:function(e){c.UpdateDisplay(e)},complete:function(){c.timeoutHandle=setTimeout(c.DoUpdate,c.updateTime)}});quakelive.Tick()};c.UpdateDisplay=function(e){if(e.length!=0){c.latest==0&&o.empty();c.latest=e[0].PUBLIC_ID;for(var g=e.length-1;g>=0;g--){var k=e[g],l=b(d),n=new Date(k.GAME_TIMESTAMP),q=["Jan.","Feb.","Mar.","Apr.","May",
"Jun.","Jul.","Aug.","Sep.","Oct.","Nov.","Dec."];n=[q[n.getMonth()]," ",n.getDate(),", ",n.getHours(),":",ZeroPad(n.getMinutes())].join("");q=l.find(".map");q.append('<div class="levelshot"/>');var u=q.find(".levelshot");u.css("background-image",'url("'+quakelive.resource("/images/levelshots/md/"+k.MAP_NAME_SHORT+".jpg")+'")');u.append('<div class="gametype"><img src="'+quakelive.resource("/images/gametypes/"+k.GAME_TYPE.toLowerCase()+"_md.png")+'"/></div>');q.append('<div class="mapTitle">'+k.MAP_NAME+
"</div>");q.append('<div class="gameType">'+k.GAME_TYPE_FULL+"</div>");q.append('<div class="gameTimestamp">'+n+"</div>");n=ZeroPad(Math.floor(k.GAME_LENGTH/60))+":"+ZeroPad(k.GAME_LENGTH%60);q.append('<div class="gameLength">Duration: '+n+"</div>");q.data("id",k.PUBLIC_ID);q.data("gt",k.GAME_TYPE);q.click(function(){quakelive.statstip.OnClickStatsTooltip(l,b(this).data("id"),b(this).data("gt"),"tracker")});for(var B in quakelive.statstip.BOARD_DEFS)try{l.find(".content").append(quakelive.statstip.GetScoreboard(k,
quakelive.statstip.BOARD_DEFS[B],{show_optional:false}))}catch(x){}l.find(".content").append('<div class="cl"></div>');o.prepend(l)}}};quakelive.AddHook("OnContentLoaded",c.Hook_OnContentLoaded);quakelive.RegisterModule("tracker",c)})(jQuery);
(function(b){function c(){var m;if(quakelive.userstatus=="REGISTERED"){if(ReadCookie("newaccount"))m="Welcome to Quake Live, %USER!"}else if(quakelive.userstatus=="ACTIVE")if(ReadCookie("newtraining"))m="You're now ready to play online!";m||(m=y[parseInt(Math.random()*y.length)]);m=m.replace("%USER",quakelive.username);b("#qlv_welcome .top_heading").html(m)}function o(){if(u!=null){clearTimeout(u);u=null}}function d(){if(quakelive.activeModule==l){var m;m=quakelive.userid?b.extend({},quakelive.mod_home.filter,
{max_servers:n}):q;quakelive.serverManager.RefreshServers(m);u=setTimeout(d,E*1E3)}}function e(){if(x){clearTimeout(x);x=null}var m=b("#qlv_welcome .welcome_banner");if(!(m.length==0||m.children().length==0)){if(!p){K=(K+1)%z.length;var r=b("<img src='"+quakelive.resource("/images/modules/welcome/banner_"+z[K]+".jpg")+"' width='640' height='160' />").load(function(){p||(b.browser.msie?m.empty().append(r):m.fadeOut(function(){p||m.empty().append(r).fadeIn()}))})}x=setTimeout(e,1E3*B)}}function g(){var m=
b("#welcome_carousel");if(m.length>0){var r=m.find("li").length,A=[],J=[];J.push('<span class="carousel_nav_prev"></span> ');for(var N=0;N<r;++N){A.push(".carousel_item_"+N);J.push('<span class="carousel_nav_item carousel_item_'+N+(N==0?" carousel_nav_selitem":"")+'"></span> ')}J.push('<span class="carousel_nav_next"></span>');J.push('<div class="cl"><div>');b("#welcome_carousel_nav_inner").html(J.join(""));m.jCarouselLite({auto:15E3,speed:500,visible:1,circluar:true,btnNext:".carousel_nav_next",
btnPrev:".carousel_nav_prev",btnGo:A,afterEnd:function(P,D){P=(D-1)%r;b(".carousel_nav_selitem").removeClass("carousel_nav_selitem");b(".carousel_item_"+P).addClass("carousel_nav_selitem")},beforeStart:function(){}})}}function k(){var m=b("#tips_carousel");m.length>0&&m.find("li").length>1&&m.jCarouselLite({auto:25E3,speed:500,visible:1,circluar:true})}var l={TITLE:"Welcome",LAYOUT:"postlogin"},n=3,q={filters:{group:"any",game_type:"any",arena:"any",state:"any",difficulty:"any",location:"any","private":0},
arena_type:"",players:[],game_types:[],ig:0,max_servers:n},u=null,B=25,x=null,p=false,z=["fun","fast","free"],K=parseInt(Math.random()*z.length),v=true,E,y=["%USER is ready to go!","%USER is ready to rock!","%USER needs frags &#151; badly!"];l.ReloadServerList=function(){o();d()};l.HoverFeatureOn=function(m){p=true;v=false;b("#qlv_welcome .welcome_banner").html('<embed src="'+quakelive.resource("/flash/welcome/feature_detail_"+m+".swf")+'" wmode="opaque" quality="high" bgcolor="#333333" width="640" height="160" name="default" align="middle" allowscriptaccess="always" allowfullscreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />')};
l.HoverFeatureOff=function(){if(--K<0)K=z.length-1;p=false;v&&e()};l.FeatureDone=function(){v=true;p||e()};l.ShowContent=function(m){quakelive.ShowContent(m);b("#qlv_chatfill").hide();quakelive.MakeHomeChooser("welcome");c();e();E=quakelive.userid?45:60;m=new quakelive.ServerPreviewIconView;m.SetDisplayProps({target:"qlv_welcome_matches"});quakelive.serverManager.listener=m;l.ReloadServerList();g();k();quakelive.path=="welcome/tour"&&quakelive.mod_home.ShowTour()};l.ShowRegisterPrompt=function(){var m=
"You're just a few clicks away from playing the most exciting and energetic game on the Internet!  Complete the quick and easy registration to start playing now!";qlPrompt({title:"Registration Required to Play",body:m,ok:function(){quakelive.Goto("register","returnto=welcome");qlHidePrompt()},okLabel:"Register Now",cancelLabel:"Close"})};l.ShowSkillTestPrompt=function(m){var r='<div class="fl" style="width: 330px">There are a wide range of player skills on QUAKE LIVE, and the Skill Test is the best way to identify where you place within them.<br /><br />Click the "Skill Test" button to begin.  You will be given a brief introduction followed by a short 10-minute match against "Crash", the QUAKE LIVE trainer.<br /><br />This is the most reliable way to determine your starting skill.</div><a href="javascript:;" onclick="quakelive.mod_register.StartTraining(); return false" class="btn_skill_test fl"></a><div class="cl"></div>';
qlPrompt({title:m||"Skill Test Required to Play Online",body:r,okLabel:"Close",alert:true})};l.ShowSkillPrompt=function(){var m='<div class="fl" style="width: 330px">There are a wide range of player skills on QUAKE LIVE, and the Skill Test is the best way to identify where you place within them. We strongly recommend that all new players take the Skill Test so that we can find the best matches for your skill level.<br /><br />Click the "Skill Test" button to begin.</div><a href="javascript:;" onclick="quakelive.mod_register.StartTraining(); return false" class="btn_skill_test fl"></a><div class="cl"></div><hr /><div style="margin-top: 15px; margin-bottom: 25px"><div class="fl">I already know my skill level:</div><select id="user_skill" style="margin-left: 5px; display: block; width: 230px; float: left; position: relative; top: -2px" onchange="return quakelive.mod_welcome.ChooseSkill(this)"><option value="0">Select your skill at FPS games</option><option value="1">I\'ve never played one before</option><option value="2">I play them occasionally</option><option value="3">I play them often</option><option value="4">I\'m an expert</option></select><div class="cl"></div></div>';
qlPrompt({title:"Are you sure you want to bypass the skill test?",body:m,okLabel:"Close",ok:qlHidePrompt,alert:true})};l.BuildAjaxSuccessHandlers=function(m,r,A,J){var N={};J||(J=[]);N.onSuccess=function(P){if(typeof P.ECODE!="undefined"&&P.ECODE===m){J.unshift(P);return r.apply(J)}else return A.apply(J,[])};N.onError=function(){return A.apply(J,arguments)};return N};l.BypassSuccess=function(){qlProcessing("Your Skill has Been Updated!","Updating account for online play&hellip;");quakelive.PageRedirect("/user/login_redirect")};
l.BypassFailed=function(){qlAlert("Failed to Update Your Skill","There has been a problem updating your skill. Please try again later.")};l.ChooseSkill=function(m){var r=b(m);r=r.val();if(r==0)return true;qlProcessing("Manually Updating Your Skill","Please Wait&hellip;");m=l.BuildAjaxSuccessHandlers(0,l.BypassSuccess,l.BypassFailed,[m]);b.ajax({url:"/user/bypass_skill_test/"+r,type:"post",mode:"abort",port:"skill_test",dataType:"json",success:m.onSuccess,error:m.onError});quakelive.TrackPageView("/user/bypass_skill_test/"+
r);return true};quakelive.RegisterModule("welcome",l)})(jQuery);
(function(b){var c={},o=null;c.Init=function(){quakelive.AddHook("OnLayoutLoaded",c.checkSection)};c.LAYOUT="postlogin";c.ShowContent=function(d){quakelive.ShowContent(d);b("#previews > a").lightbox()};c.checkSection=function(){try{var d=true,e=b("#v-"+quakelive.valanceData.name);if(quakelive.pathParts[0]=="review"){if(!o){o={};var g=["background-color","background-image","background-repeat","background-position"];for(var k in g){var l=g[k];o[l]=e.css(l)}}g={dcmap07:"2009-6m6w-1",coldcaptures:"2009-6m6w-2",
bloodlust:"2009-6m6w-3",classicduel:"2009-6m6w-4",conundrum:"2009-6m6w-5"};var n=g[quakelive.pathParts[1]];if(n){e.css("background-color","#000033");e.css("background-image","url("+quakelive.resource("/css/valances/"+n+"/default.jpg")+")");e.css("background-repeat","no-repeat");e.css("background-position","center top");d=false}}if(d)for(l in o)e.css(l,o[l])}catch(q){}};quakelive.RegisterModule("review",c)})(jQuery);
(function(b){function c(){if(k!==null){clearTimeout(k);k=null}}function o(n){c();k=setInterval(function(){e.PollGameInfo(n)},g)}function d(n){var q=e.Opts;q.servername=n.host_name;q.mapname=n.map;q.maptitle=n.map_title;q.mapicon="/images/levelshots/sm/"+n.map+".jpg";q.gametype=n.game_type_title;q.gametypeshort=mapdb.GameTypeShortNames[n.game_type];q.gametypeicon="/images/gametypes/"+q.gametypeshort+"_md.png";q.numclients=n.num_clients;q.maxclients=n.max_clients;q.redscore=n.g_redscore;q.bluescore=
n.g_bluescore;q.roundlimit=n.roundlimit;q.capturelimit=n.capturelimit;q.fraglimit=n.fraglimit;q.timelimit=n.timelimit;if(n.players){function u(z,K){return z.team==K.team?z.score<K.score?1:z.score>K.score?-1:0:z.team<K.team?-1:z.team>K.team?1:0}n.players.sort(u);for(var B=0;B<n.players.length;B++){var x=n.players[B];x.bot=parseInt(x.bot);x.score=parseInt(x.score);x.team=parseInt(x.team);x.rank=parseInt(x.rank);var p=x.model?x.model.split("/"):["sarge","default"];if(x.team==l.Red)p[1]="red";else if(x.team==
l.Blue)p[1]="blue";else if(p.length==1||p[1]=="*")p[1]="default";if(x.team==l.Spec)x.score="SPEC";q["p"+B+"_clan"]=StripColors(x.clan);q["p"+B+"_name"]=StripColors(x.name)+(x.bot?" (Bot)":"");q["p"+B+"_icon"]=quakelive.PlayerAvatarPath.SM+p[0]+"_"+p[1]+".jpg";q["p"+B+"_score"]=x.score}}e.UpdateXFire()}var e={};window.QLXFire=e;e.enabled=false;e.Opts=null;e.DefaultOpts={gameid:5771,status:"Browsing Quake Live",siteurl:quakelive.siteConfig.baseUrl,mediaurl:quakelive.siteConfig.staticUrl,profileurl:"",
username:"",usericon:""};e.ServerInfo={mapname:"",joinurl:"",publicid:0,servername:"",maptitle:"",mapicon:"",gametype:"",gametypeshort:"",gametypeicon:"",numclients:0,maxclients:0,redscore:0,bluescore:0,roundlimit:0,capturelimit:0,fraglimit:0,timelimit:0};e.EnableXFire=function(){e.enabled!==true&&b.ajax({url:"http://www.xfire.com/xfire_egame/egame_engine.xf",dataType:"script",success:function(){if(typeof xfire_egame!=="undefined"){var n=ParseModelSkin(quakelive.cvars.Get("model","sarge/default").value);
e.DefaultOpts.usericon=quakelive.PlayerAvatarPath.MD+n.model+"_"+n.skin+".jpg";e.DefaultOpts.username=quakelive.username;e.DefaultOpts.profileurl="/r/profile/summary/"+quakelive.username;e.DefaultXFire();quakelive.AddHook("OnGameUpdated",e.OnGameUpdated);quakelive.AddHook("OnGameStarted",e.OnGameStarted);quakelive.AddHook("OnGameExited",e.OnGameExited);e.enabled=true}}})};var g=12E4,k=null,l={Free:0,Red:1,Blue:2,Spec:3};e.PollGameInfo=function(n){if(typeof n=="object"&&n.g_levelstarttime)d(n);else{n=
n.public_id||n;b.ajax({url:"/home/matchdetails/"+n,dataType:"json",mode:"abort",port:"matchdetails",success:d})}};e.DefaultXFire=function(){e.Opts=b.extend({},e.DefaultOpts);e.UpdateXFire()};e.UpdateXFire=function(){xfire_egame.Start(e.Opts)};e.OnGameStarted=function(n){e.OnGameUpdated(n)};e.OnGameUpdated=function(n){!n.isBotGame&&typeof n.serverInfo=="object"?o(n.serverInfo.public_id):c();var q=b.extend({},e.DefaultOpts,e.ServerInfo);if(n.isBotGame===true){q.status="Playing a Practice Match";e.Opts=
q;e.UpdateXFire()}else if(n.serverInfo!==false){q.status="Playing "+mapdb.GameTypeNames[n.serverInfo.game_type];q.publicid=n.serverInfo.public_id;q.joinurl="/r/home/join/"+n.serverInfo.public_id;e.Opts=q;e.PollGameInfo(n.serverInfo,true)}else{q.status="Playing an Online Match";e.Opts=q}};e.OnGameExited=function(){c();e.DefaultXFire()}})(jQuery);
quakelive.mod_friends.TPL_MANAGE_ITEM=[unescape("%3Cdiv class=%22prf_friend%22%3E%3Cdiv class=%22head_icon interactive%22%3E%3Cimg class=%22online%22 src=%22"),quakelive.resource("/images/profile/icn_onlineflag.png"),unescape("%22 width=%2230%22 height=%2230%22 style=%22display:none;%22/%3E%3C/div%3E%3Cdiv class=%22player_name%22%3E%3Cimg width=%2216%22 height=%2211%22 /%3E%3Ca href='javascript:;'%3E%3C/a%3E%3Cdiv class=%22cl%22%3E%3C/div%3E%3C/div%3E%3Cdiv class=%22info_left%22%3E%3C/div%3E%3Cdiv class=%22info_middle%22%3E%3C/div%3E%3Cdiv class=%22info_right%22%3E%3Cdiv class=%22invite_controls%22%3E%3Ca href=%22javascript:;%22 class=%22btn_fr_view_profile%22 %3E%3C/a%3E%3Cdiv class=%22cl%22/%3E%3C/div%3E%3Ca href=%22javascript:;%22 class=%22btn_fr_delete_friend%22 %3E%3C/a%3E%3C/div%3E%3C/div%3E")].join("");
quakelive.mod_friends.TPL_INCOMING_ITEM=[unescape("%3Cdiv class=%22prf_friend%22%3E%3Cdiv class=%22head_icon interactive%22%3E%3Cimg class=%22online%22 src=%22"),quakelive.resource("/images/profile/icn_onlineflag.png"),unescape("%22 width=%2230%22 height=%2230%22 style=%22display:none;%22/%3E%3C/div%3E%3Cdiv class=%22player_name%22%3E%3Cimg width=%2216%22 height=%2211%22 /%3E%3Ca href='javascript:;'%3E%3C/a%3E%3Cdiv class=%22cl%22%3E%3C/div%3E%3C/div%3E%3Cdiv class=%22info_left%22%3E%3C/div%3E%3Cdiv class=%22info_middle_right%22%3E%3Cdiv class=%22invite_controls%22%3E%3Ca href=%22javascript:;%22 class=%22btn_fr_view_profile%22 %3E%3C/a%3E%3Cdiv class=%22cl%22/%3E%3C/div%3E%3Ca href=%22javascript:;%22 class=%22btn_fr_block_player%22 %3E%3C/a%3E%3C/div%3E%3Cdiv class=%22info_right%22%3E%3Cdiv class=%22invite_controls%22%3E%3Ca href=%22javascript:;%22 class=%22btn_fr_accept_invite%22 %3E%3C/a%3E%3Cdiv class=%22cl%22/%3E%3C/div%3E%3Ca href=%22javascript:;%22 class=%22btn_fr_decline_invite%22 %3E%3C/a%3E%3C/div%3E%3C/div%3E")].join("");
quakelive.mod_friends.TPL_OUTGOING_ITEM=[unescape("%3Cdiv class=%22prf_friend%22%3E%3Cdiv class=%22head_icon interactive%22%3E%3Cimg class=%22online%22 src=%22"),quakelive.resource("/images/profile/icn_onlineflag.png"),unescape("%22 width=%2230%22 height=%2230%22 style=%22display:none;%22/%3E%3C/div%3E%3Cdiv class=%22player_name%22%3E%3Cimg width=%2216%22 height=%2211%22 /%3E%3Ca href='javascript:;'%3E%3C/a%3E%3Cdiv class=%22cl%22%3E%3C/div%3E%3C/div%3E%3Cdiv class=%22info_left%22%3E%3C/div%3E%3Cdiv class=%22info_middle%22%3E%3C/div%3E%3Cdiv class=%22info_right%22%3E%3Cdiv class=%22invite_controls%22%3E%3Ca href=%22javascript:;%22 class=%22btn_fr_view_profile%22 %3E%3C/a%3E%3Cdiv class=%22cl%22/%3E%3C/div%3E%3Ca href=%22javascript:;%22 class=%22btn_fr_revoke_invite%22 %3E%3C/a%3E%3C/div%3E%3C/div%3E")].join("");
quakelive.mod_friends.TPL_BLOCK_ITEM=[unescape("%3Cdiv class=%22prf_friend%22%3E%3Cdiv class=%22head_icon interactive%22%3E%3Cimg class=%22online%22 src=%22"),quakelive.resource("/images/profile/icn_onlineflag.png"),unescape("%22 width=%2230%22 height=%2230%22 style=%22display:none;%22/%3E%3C/div%3E%3Cdiv class=%22player_name%22%3E%3Cimg width=%2216%22 height=%2211%22 /%3E%3Ca href='javascript:;'%3E%3C/a%3E%3Cdiv class=%22cl%22%3E%3C/div%3E%3C/div%3E%3Cdiv class=%22info_left%22%3E%3C/div%3E%3Cdiv class=%22info_middle%22%3E%3C/div%3E%3Cdiv class=%22info_right%22%3E%3Cdiv class=%22invite_controls%22%3E%3Ca href=%22javascript:;%22 class=%22btn_fr_view_profile%22 %3E%3C/a%3E%3Cdiv class=%22cl%22/%3E%3C/div%3E%3Ca href=%22javascript:;%22 class=%22btn_fr_unblock_player%22 %3E%3C/a%3E%3C/div%3E%3C/div%3E")].join("");
quakelive.mod_friends.TPL_SEARCH_EMAIL_REMOTE=[unescape("%3Cdiv class=%22qlv_searchForm%22%3E%3Cdiv class=%22qlv_success_left%22%3E%3Cimg src=%22"),quakelive.resource("/images/sf/friends/invite_success.gif"),unescape("%22 width=%22215%22 height=%22103%22 /%3E%3Cp%3E&nbsp;%3C/p%3E%3C/div%3E%3Cdiv class=%22qlv_searchForm_right%22%3E%3Cp class=%22footerCopy%22%3E&nbsp;%3C/p%3E%3Cp style=%22margin-bottom: 0px;%22%3E%3Cspan style=%22font-family: Arial,Helvetica,sans-serif; font-size: 12pt; font-weight: bold;%22%3EInvites Sent! %3Cbr /%3E However, you have Gmail contacts that are not current QUAKE LIVE players.%3C/span%3E%3Cbr /%3E%3Cbr /%3ESelect which contacts to invite from the list.%3C/p%3E%3Cp%3E%3C/p%3E%3C/div%3E%3C/div%3E%3Cdiv class=%22qlv_resultListIE6Fix%22%3E%3Cdiv class=%22qlv_resultsList_popup%22%3E%3Cdiv class=%22qlv_resultsListNA%22 style=%22margin: 20px; text-align: center; font-size: 16px; font-family: Arial; display: none;%22%3E%3C/div%3E%3Ctable cellpadding=%220%22 cellspacing=%220%22 class=%22qlv_resultsTable%22%3E%3Ctr%3E%3Ctd%3E%3Cdiv align=%22center%22%3E%3Cinput id=%22qlv_selectAllEmail%22 type=%22checkbox%22 /%3E%3C/div%3E%3C/td%3E%3Ctd%3E%3Cspan style=%22width:198px;%22%3E%3Cimg src=%22"),
quakelive.resource("/images/sf/friends/sort_down_icon.gif"),unescape("%22 /%3E%3C/span%3E%3C/td%3E%3Ctd width=%22485%22 style=%22width:198px;%22%3E  email%3C/td%3E%3Ctd width=%2233%22%3E%3Cdiv align=%22right%22%3E%3C/div%3E%3C/td%3E%3C/tr%3E%3Ctbody%3E%3C/tbody%3E%3C/table%3E%3C/div%3E%3C/div%3E%3Cp class=%22qlv_skipbutton%22%3E%3Ca href=%22javascript:;%22 onclick=%22return false%22 /%3E%3C/p%3E%3Cp class=%22qlv_invitebutton%22%3E%3Ca href=%22javascript:;%22 onclick=%22return false%22 /%3E%3C/p%3E")].join("");
quakelive.mod_friends.TPL_FRIENDS_LIST=""+unescape("%3Cdiv id=%22im-header%22%3E%3C/div%3E%3Cdiv id=%22im-body%22%3E%3Cdiv id=%22im-active%22%3E%3Ch1%3E%3C/h1%3E%3Cdiv class=%22itemlist%22%3E%3C/div%3E%3C/div%3E%3Cdiv id=%22im-online%22%3E%3Ch1%3E%3C/h1%3E%3Cdiv class=%22itemlist%22%3E%3C/div%3E%3C/div%3E%3C/div%3E%3Cdiv id=%22im-footer%22%3E%3C/div%3E");
quakelive.mod_prefs.TPL_CHARACTER=[unescape("%3Cdiv class=%22innerpanel fl%22%3E%3Cdiv class=%22rollover fl%22%3E%3Ca href=%22javascript:;%22 onclick=%22quakelive.mod_prefs.Nav('character')%22 class=%22btn_character fl selected%22%3E%3C/a%3E%3Ca href=%22javascript:;%22 onclick=%22quakelive.mod_prefs.Nav('controls_movement')%22 class=%22btn_controls fl%22%3E%3C/a%3E%3Ca href=%22javascript:;%22 onclick=%22quakelive.mod_prefs.Nav('settings_basic')%22 class=%22btn_settings fl%22%3E%3C/a%3E%3Cdiv class=%22cl%22%3E%3C/div%3E%3C/div%3E%3Cdiv class=%22character_gallery fl%22%3E%3Cdiv class=%22thirtypxhigh%22%3E%3C/div%3E%3Cdiv id=%22character_list%22 class=%22character_select fl%22%3E%3Cimg src=%22"),quakelive.resource("/images/loader.gif"),
unescape("%22 width=%2262%22 height=%2213%22 /%3E Loading model list&hellip;%3C/div%3E%3Cdiv class=%22fl twentypxh long%22%3E%3Cdiv class=%22fl%22%3E%3Cdiv id=%22cfg_char_lgicon%22 class=%22char_lgicon fl%22%3E%3C/div%3E%3Cdiv class=%22fl twelvepxv tenpxh%22%3E%3Cdiv id=%22cfg_char_name%22 style=%22width: 220px; height: 24px%22%3E%3C/div%3E%3Cdiv id=%22cfg_char_race%22 style=%22width: 220px; height: 24px%22%3E%3C/div%3E%3C/div%3E%3Cdiv class=%22cl%22%3E%3C/div%3E%3C/div%3E%3Cdiv class=%22cl%22%3E%3C/div%3E%3Cdiv id=%22cfg_char_description%22 class=%22fl tenpxv eightypxhigh footerCopy%22 style=%22overflow: hidden%22%3E%3C/div%3E%3Cdiv class=%22cl%22%3E%3C/div%3E%3Cdiv class=%22fifteenpxhigh%22%3E%3C/div%3E%3Cdiv class=%22team_game_version%22%3E%3C/div%3E%3Cdiv class=%22cl%22%3E%3C/div%3E%3Cdiv id=%22cfg_char_redteam%22 class=%22red_team fl%22%3E%3C/div%3E%3Cdiv id=%22cfg_char_blueteam%22 class=%22blue_team fl%22%3E%3C/div%3E%3Cdiv class=%22cl%22%3E%3C/div%3E%3C/div%3E%3C/div%3E%3Cdiv class=%22fl%22 style=%22position: relative%22%3E%3Cdiv id=%22cfg_char_body%22 style=%22position: absolute; top: 10px; left: -15px%22 class=%22bodyshot fl%22%3E%3C/div%3E%3C/div%3E%3Cdiv class=%22cl%22%3E%3C/div%3E%3Cdiv class=%22twentypxh twentytwopxv%22%3E%3Ca href=%22javascript:;%22 onclick=%22quakelive.mod_prefs.ResetDefaults(); return false%22 class=%22fl reset_settings_defaults%22%3E%3C/a%3E%3Cdiv class=%22fl tenpxh light-midGrayTxt footerCopy%22%3EReset Defaults for all game settings%3C/div%3E%3Cdiv class=%22cl%22%3E%3C/div%3E%3C/div%3E%3C/div%3E")].join("");
quakelive.mod_prefs.TPL_SETTINGS_BASIC=""+unescape("%3Cdiv class=%22innerpanellong fl%22%3E%3Cdiv class=%22rollover fl%22%3E%3Ca href=%22javascript:;%22 onclick=%22quakelive.mod_prefs.Nav('character')%22 class=%22btn_character fl%22%3E%3C/a%3E%3Ca href=%22javascript:;%22 onclick=%22quakelive.mod_prefs.Nav('controls_movement')%22 class=%22btn_controls fl%22%3E%3C/a%3E%3Ca href=%22javascript:;%22 onclick=%22quakelive.mod_prefs.Nav('settings_basic')%22 class=%22btn_settings fl selected%22%3E%3C/a%3E%3Cdiv class=%22cl%22%3E%3C/div%3E%3C/div%3E%3Cdiv class=%22cl%22%3E%3C/div%3E%3Cdiv%3E%3Cdiv class=%22fl%22 style=%22width: 276px;%22%3E&nbsp;%3C/div%3E%3Ca href=%22javascript:;%22 onclick=%22quakelive.mod_prefs.Nav('settings_basic')%22 class=%22btn_basic_active fl%22%3E%3C/a%3E%3Ca href=%22javascript:;%22 onclick=%22quakelive.mod_prefs.Nav('settings_advanced')%22 class=%22btn_advanced fl%22%3E%3C/a%3E%3Cdiv class=%22cl%22%3E%3C/div%3E%3C/div%3E%3Cdiv class=%22fl sixteenpxv%22%3E%3Cdiv class=%22fl twentypxh%22%3E%3Cdiv class=%22panel_audio%22%3E%3Cdiv class=%22twentythreepxhigh%22%3E%3C/div%3E%3Cdiv class=%22fourteenpxh footerCopy%22%3E%3Cp%3E%3Cdiv class='fl'%3EEffects volume:&nbsp;%3C/div%3E %3Cdiv id='effects_volume_value' class='fl'%3E%3C/div%3E%3Cdiv class='cl'%3E%3C/div%3E%3C/p%3E%3Cdiv id=%22slider_s_volume%22 class=%22slider ui-slider%22%3E%3C/div%3E%3Cdiv class=%22sliderpxh%22%3E%3Cdiv class=%22fl ninePxTxt lightGrayTxt%22%3Emin%3C/div%3E%3Cdiv class=%22fr ninePxTxt lightGrayTxt%22%3Emax%3C/div%3E%3Cdiv class=%22cl%22%3E%3C/div%3E%3C/div%3E%3C/div%3E%3Cdiv class=%22fourpxv%22%3E%3C/div%3E%3Cdiv class=%22fourteenpxh footerCopy%22%3E%3Cp%3E%3Cdiv class='fl'%3EMusic volume:&nbsp;%3C/div%3E %3Cdiv id='music_volume_value' class='fl'%3E%3C/div%3E%3Cdiv class='cl'%3E%3C/div%3E%3C/p%3E%3Cdiv id=%22slider_s_musicvolume%22 class=%22slider ui-slider%22%3E%3C/div%3E%3Cdiv class=%22sliderpxh%22%3E%3Cdiv class=%22cl%22%3E%3C/div%3E%3Cdiv class=%22fl ninePxTxt lightGrayTxt%22%3Emin%3C/div%3E%3Cdiv class=%22fr ninePxTxt lightGrayTxt%22%3Emax%3C/div%3E%3Cdiv class=%22cl%22%3E%3C/div%3E%3C/div%3E%3C/div%3E%3C/div%3E%3Cdiv class=%22twentypxv%22%3E%3C/div%3E%3Cdiv class=%22panel_video%22%3E%3Cdiv class=%22twentythreepxhigh%22%3E%3C/div%3E%3Cdiv class=%22fourteenpxh twohundredseventywide%22%3E%3Cdiv class=%22fl med%22%3E%3Cdiv class=%22footerCopy thirtypxhigh%22%3EPlay Full Screen:%3C/div%3E%3Cdiv class=%22footerCopy thirtypxhigh%22%3EFull Screen Resolution:%3C/div%3E%3Cdiv class=%22footerCopy thirtypxhigh%22%3EBrowser Resolution:%3C/div%3E%3Cdiv class=%22footerCopy%22%3E%3Cp%3E%3Cdiv class='fl'%3EBrightness:&nbsp;%3C/div%3E %3Cdiv id='brightness_value' class='fl'%3E%3C/div%3E%3Cdiv class='cl'%3E%3C/div%3E%3C/p%3E%3C/div%3E%3C/div%3E%3Cdiv class=%22fl fourteenpxh%22%3E%3Cdiv class=%22ninePxTxt lightGrayTxt thirtypxhigh%22 id=%22r_fullscreen%22%3E%3C/div%3E%3Cdiv class=%22thirtypxhigh%22%3E%3Cselect id='select_r_mode' name='r_mode'%3E%3C/select%3E%3C/div%3E%3Cdiv class=%22thirtypxhigh%22%3E%3Cselect id='select_r_inbrowsermode' name='r_inbrowsermode'%3E%3C/select%3E%3C/div%3E%3C/div%3E%3Cdiv class=%22cl%22%3E%3C/div%3E%3Cdiv id=%22slider_r_gamma%22 class=%22slider ui-slider%22%3E%3C/div%3E%3Cdiv class=%22sliderpxh%22%3E%3Cdiv class=%22fl ninePxTxt lightGrayTxt%22%3Emin%3C/div%3E%3Cdiv class=%22fr ninePxTxt lightGrayTxt%22%3Emax%3C/div%3E%3Cdiv class=%22cl%22%3E%3C/div%3E%3C/div%3E%3C/div%3E%3C/div%3E%3C/div%3E%3Cdiv class=%22panel_weapons fl twentypxh%22%3E%3Cdiv style=%22height: 25px%22%3E&nbsp;%3C/div%3E%3Cdiv class=%22fourteenpxh twohundredseventywide%22%3E%3Cdiv class=%22fl%22%3E%3Cdiv class=%22footerCopy thirtypxhigh%22%3EAuto Switch:%3C/div%3E%3C/div%3E%3Cdiv class=%22fl twentypxh%22%3E%3Cdiv class=%22ninePxTxt lightGrayTxt thirtypxhigh%22 id=%22cg_autoswitch%22%3E%3C/div%3E%3Cdiv class=%22cl%22%3E%3C/div%3E%3C/div%3E%3Cdiv class=%22cl%22%3E%3C/div%3E%3Cdiv class=%22footerCopy%22%3ERail Gun Primary Color:%3C/div%3E%3Cdiv id=%22color1_select%22 class=%22rail_select%22%3E%3Ca href=%22javascript:;%22 onclick=%22quakelive.mod_prefs.SelectColor('color1', 1); return false%22 id=%22color1_1%22 class=%22red%22%3E%3C/a%3E%3Ca href=%22javascript:;%22 onclick=%22quakelive.mod_prefs.SelectColor('color1', 9); return false%22 id=%22color1_2%22 class=%22green%22%3E%3C/a%3E%3Ca href=%22javascript:;%22 onclick=%22quakelive.mod_prefs.SelectColor('color1', 5); return false%22 id=%22color1_3%22 class=%22yellow%22%3E%3C/a%3E%3Ca href=%22javascript:;%22 onclick=%22quakelive.mod_prefs.SelectColor('color1', 17); return false%22 id=%22color1_4%22 class=%22blue%22%3E%3C/a%3E%3Ca href=%22javascript:;%22 onclick=%22quakelive.mod_prefs.SelectColor('color1', 13); return false%22 id=%22color1_5%22 class=%22ltpurple%22%3E%3C/a%3E%3Ca href=%22javascript:;%22 onclick=%22quakelive.mod_prefs.SelectColor('color1', 21); return false%22 id=%22color1_6%22 class=%22purple%22%3E%3C/a%3E%3Ca href=%22javascript:;%22 onclick=%22quakelive.mod_prefs.SelectColor('color1', 26); return false%22 id=%22color1_7%22 class=%22white%22%3E%3C/a%3E%3Cdiv class=%22cl%22%3E%3C/div%3E%3C/div%3E%3Cdiv class=%22cl%22%3E%3C/div%3E%3Cdiv class=%22tenpxhigh%22%3E%3C/div%3E%3Cdiv class=%22footerCopy%22%3ERail Gun Secondary Color:%3C/div%3E%3Cdiv id=%22color2_select%22 class=%22rail_select%22%3E%3Ca href=%22javascript:;%22 onclick=%22quakelive.mod_prefs.SelectColor('color2', 1); return false%22 id=%22color2_1%22 class=%22red%22%3E%3C/a%3E%3Ca href=%22javascript:;%22 onclick=%22quakelive.mod_prefs.SelectColor('color2', 9); return false%22 id=%22color2_2%22 class=%22green%22%3E%3C/a%3E%3Ca href=%22javascript:;%22 onclick=%22quakelive.mod_prefs.SelectColor('color2', 5); return false%22 id=%22color2_3%22 class=%22yellow%22%3E%3C/a%3E%3Ca href=%22javascript:;%22 onclick=%22quakelive.mod_prefs.SelectColor('color2', 17); return false%22 id=%22color2_4%22 class=%22blue%22%3E%3C/a%3E%3Ca href=%22javascript:;%22 onclick=%22quakelive.mod_prefs.SelectColor('color2', 13); return false%22 id=%22color2_5%22 class=%22ltpurple%22%3E%3C/a%3E%3Ca href=%22javascript:;%22 onclick=%22quakelive.mod_prefs.SelectColor('color2', 21); return false%22 id=%22color2_6%22 class=%22purple%22%3E%3C/a%3E%3Ca href=%22javascript:;%22 onclick=%22quakelive.mod_prefs.SelectColor('color2', 26); return false%22 id=%22color2_7%22 class=%22white%22%3E%3C/a%3E%3Cdiv class=%22cl%22%3E%3C/div%3E%3C/div%3E%3Cdiv class=%22cl%22%3E%3C/div%3E%3Cdiv class=%22fifteenpxhigh%22%3E%3C/div%3E%3Cdiv class=%22footerCopy%22%3ECrosshair Symbol:%3C/div%3E%3Cdiv id=%22crosshair_select%22 class=%22crosshair_select%22%3E%3Ca href=%22javascript:;%22 onclick=%22quakelive.mod_prefs.SelectCrosshair(1); return false%22 id=%22crosshair_1%22 class=%22a%22%3E%3C/a%3E%3Ca href=%22javascript:;%22 onclick=%22quakelive.mod_prefs.SelectCrosshair(2); return false%22 id=%22crosshair_2%22 class=%22b%22%3E%3C/a%3E%3Ca href=%22javascript:;%22 onclick=%22quakelive.mod_prefs.SelectCrosshair(3); return false%22 id=%22crosshair_3%22 class=%22c%22%3E%3C/a%3E%3Ca href=%22javascript:;%22 onclick=%22quakelive.mod_prefs.SelectCrosshair(4); return false%22 id=%22crosshair_4%22 class=%22d%22%3E%3C/a%3E%3Ca href=%22javascript:;%22 onclick=%22quakelive.mod_prefs.SelectCrosshair(5); return false%22 id=%22crosshair_5%22 class=%22e%22%3E%3C/a%3E%3Ca href=%22javascript:;%22 onclick=%22quakelive.mod_prefs.SelectCrosshair(6); return false%22 id=%22crosshair_6%22 class=%22f%22%3E%3C/a%3E%3Ca href=%22javascript:;%22 onclick=%22quakelive.mod_prefs.SelectCrosshair(7); return false%22 id=%22crosshair_7%22 class=%22g%22%3E%3C/a%3E%3Ca href=%22javascript:;%22 onclick=%22quakelive.mod_prefs.SelectCrosshair(8); return false%22 id=%22crosshair_8%22 class=%22h%22%3E%3C/a%3E%3Ca href=%22javascript:;%22 onclick=%22quakelive.mod_prefs.SelectCrosshair(9); return false%22 id=%22crosshair_9%22 class=%22i%22%3E%3C/a%3E%3Ca href=%22javascript:;%22 onclick=%22quakelive.mod_prefs.SelectCrosshair(10); return false%22 id=%22crosshair_10%22 class=%22j%22%3E%3C/a%3E%3C/div%3E%3Cdiv class=%22cl%22%3E%3C/div%3E%3Cdiv class=%22tenpxhigh%22%3E%3C/div%3E%3Cdiv class=%22footerCopy%22%3ECrosshair Color:%3C/div%3E%3Cdiv id=%22color2_select%22 class=%22rail_select%22%3E%3Ca href=%22javascript:;%22 onclick=%22quakelive.mod_prefs.SelectColor('cg_crosshairColor', 1); return false%22 id=%22cg_crosshairColor_1%22 class=%22red%22%3E%3C/a%3E%3Ca href=%22javascript:;%22 onclick=%22quakelive.mod_prefs.SelectColor('cg_crosshairColor', 9); return false%22 id=%22cg_crosshairColor_2%22 class=%22green%22%3E%3C/a%3E%3Ca href=%22javascript:;%22 onclick=%22quakelive.mod_prefs.SelectColor('cg_crosshairColor', 5); return false%22 id=%22cg_crosshairColor_3%22 class=%22yellow%22%3E%3C/a%3E%3Ca href=%22javascript:;%22 onclick=%22quakelive.mod_prefs.SelectColor('cg_crosshairColor', 17); return false%22 id=%22cg_crosshairColor_4%22 class=%22blue%22%3E%3C/a%3E%3Ca href=%22javascript:;%22 onclick=%22quakelive.mod_prefs.SelectColor('cg_crosshairColor', 13); return false%22 id=%22cg_crosshairColor_5%22 class=%22ltpurple%22%3E%3C/a%3E%3Ca href=%22javascript:;%22 onclick=%22quakelive.mod_prefs.SelectColor('cg_crosshairColor', 21); return false%22 id=%22cg_crosshairColor_6%22 class=%22purple%22%3E%3C/a%3E%3Ca href=%22javascript:;%22 onclick=%22quakelive.mod_prefs.SelectColor('cg_crosshairColor', 26); return false%22 id=%22cg_crosshairColor_7%22 class=%22white%22%3E%3C/a%3E%3Cdiv class=%22cl%22%3E%3C/div%3E%3C/div%3E%3C/div%3E%3C/div%3E%3Cdiv class=%22character_overlay fl%22%3E%3C/div%3E%3Cdiv class=%22cl%22%3E%3C/div%3E%3C/div%3E%3Cdiv class=%22cl%22%3E%3C/div%3E%3Cdiv class=%22twentypxh%22%3E%3Ca href=%22javascript:;%22 onclick=%22quakelive.mod_prefs.ResetDefaults(); return false%22 class=%22fl reset_settings_defaults%22%3E%3C/a%3E%3Cdiv class=%22fl tenpxh light-midGrayTxt footerCopy%22%3EReset Defaults for all game settings%3C/div%3E%3Cdiv class=%22cl%22%3E%3C/div%3E%3C/div%3E%3C/div%3E");
quakelive.mod_prefs.TPL_SETTINGS_ADVANCED=""+unescape("%3Cdiv class=%22innerpanellong fl%22%3E%3Cdiv class=%22rollover fl%22%3E%3Ca href=%22javascript:;%22 onclick=%22quakelive.mod_prefs.Nav('character')%22 class=%22btn_character fl%22%3E%3C/a%3E%3Ca href=%22javascript:;%22 onclick=%22quakelive.mod_prefs.Nav('controls_movement')%22 class=%22btn_controls fl%22%3E%3C/a%3E%3Ca href=%22javascript:;%22 onclick=%22quakelive.mod_prefs.Nav('settings_basic')%22 class=%22btn_settings fl selected%22%3E%3C/a%3E%3Cdiv class=%22cl%22%3E%3C/div%3E%3C/div%3E%3Cdiv class=%22cl%22%3E%3C/div%3E%3Cdiv%3E%3Cdiv class=%22fl%22 style=%22width: 276px;%22%3E&nbsp;%3C/div%3E%3Ca href=%22javascript:;%22 onclick=%22quakelive.mod_prefs.Nav('settings_basic')%22 class=%22btn_basic fl%22%3E%3C/a%3E%3Ca href=%22javascript:;%22 onclick=%22quakelive.mod_prefs.Nav('settings_advanced')%22 class=%22btn_advanced_active fl%22%3E%3C/a%3E%3Cdiv class=%22cl%22%3E%3C/div%3E%3C/div%3E%3Cdiv class=%22fl sixteenpxv%22%3E%3Cdiv class=%22fl hundredwide%22%3E&nbsp;%3C/div%3E%3Cdiv class=%22fl%22%3E%3Cdiv class=%22panel_audio_advanced%22%3E%3Cdiv class=%22twentythreepxhigh%22%3E%3C/div%3E%3Cdiv class=%22fourteenpxh twohundredseventywide%22%3E%3Cdiv class=%22fl hundredwide%22%3E%3Cdiv class=%22footerCopy thirtypxhigh%22%3EDoppler%3C/div%3E%3C/div%3E%3Cdiv class=%22fl fourteenpxh%22%3E%3Cdiv class=%22ninePxTxt lightGrayTxt thirtypxhigh%22 id=%22s_doppler%22%3E%3C/div%3E%3C/div%3E%3C/div%3E%3Cdiv class=%22cl%22%3E%3C/div%3E%3C/div%3E%3Cdiv class=%22twentypxv%22%3E%3C/div%3E%3Cdiv class=%22panel_options_advanced%22%3E%3Cdiv class=%22twentythreepxhigh%22%3E%3C/div%3E%3Cdiv class=%22fourteenpxh twohundredseventywide%22%3E%3Cdiv class=%22fl med tenpxh%22%3E%3Cdiv class=%22tenpxhigh%22%3E%3C/div%3E%3Cdiv class=%22footerCopy thirtypxhigh%22%3EDraw Target Names%3C/div%3E%3Cdiv class=%22footerCopy thirtypxhigh%22%3EVoice Chat%3C/div%3E%3Cdiv class=%22footerCopy thirtypxhigh%22%3EVoice Text%3C/div%3E%3Cdiv class=%22footerCopy thirtypxhigh%22%3ETaunts%3C/div%3E%3C/div%3E%3Cdiv class=%22fl%22%3E%3Cdiv class=%22tenpxhigh%22%3E%3C/div%3E%3Cdiv class=%22ninePxTxt lightGrayTxt thirtypxhigh%22 id=%22cg_drawtargetnames%22%3E%3C/div%3E%3Cdiv class=%22ninePxTxt lightGrayTxt thirtypxhigh%22 id=%22cg_playvoicechats%22%3E%3C/div%3E%3Cdiv class=%22ninePxTxt lightGrayTxt thirtypxhigh%22 id=%22cg_showvoicetext%22%3E%3C/div%3E%3Cdiv class=%22ninePxTxt lightGrayTxt thirtypxhigh%22 id=%22cg_allowtaunt%22%3E%3C/div%3E%3C/div%3E%3Cdiv class=%22cl%22%3E%3C/div%3E%3C/div%3E%3C/div%3E%3C/div%3E%3Cdiv class=%22advanced_panels_right fl%22%3E%3Cdiv class=%22twentyfivepxhigh%22%3E%3C/div%3E%3Cdiv class=%22panel_video_advanced fl%22%3E%3Cdiv class=%22thirtypxhigh%22%3E%3C/div%3E%3Cdiv class=%22twentypxh twohundredseventywide%22%3E%3Cdiv class=%22fl%22%3E%3Cdiv class=%22footerCopy thirtypxhigh hundredtwentywide%22%3ELighting Model%3C/div%3E%3Cdiv class=%22footerCopy thirtypxhigh hundredtwentywide%22%3EGeometry Detail%3C/div%3E%3Cdiv class=%22footerCopy thirtypxhigh hundredtwentywide%22%3ETexture Filter%3C/div%3E%3Cdiv class=%22footerCopy thirtypxhigh hundredtwentywide%22%3ETexture Quality%3C/div%3E%3Cdiv class=%22footerCopy thirtypxhigh hundredtwentywide%22%3ETexture Compression%3C/div%3E%3C/div%3E%3Cdiv class=%22fl twentypxh%22%3E%3Cdiv class=%22thirtypxhigh hundredwide tr%22%3E%3Cselect id=%22select_r_vertexlight%22 name=%22r_vertexlight%22%3E%3C/select%3E%3C/div%3E%3Cdiv class=%22thirtypxhigh hundredwide tr%22%3E%3Cselect id=%22select_r_lodbias%22 name=%22r_lodbias%22%3E%3C/select%3E%3C/div%3E%3Cdiv class=%22thirtypxhigh hundredwide tr%22%3E%3Cselect id=%22select_r_texturemode%22 name=%22r_texturemode%22%3E%3C/select%3E%3C/div%3E%3Cdiv class=%22thirtypxhigh hundredwide tr%22%3E%3Cselect id=%22select_r_picmip%22 name=%22r_picmip%22%3E%3C/select%3E%3C/div%3E%3Cdiv class=%22ninePxTxt lightGrayTxt thirtypxhigh hundredwide tr%22 id=%22r_ext_compressed_textures%22%3E%3C/div%3E%3Cdiv class=%22cl%22%3E%3C/div%3E%3C/div%3E%3Cdiv class=%22cl%22%3E%3C/div%3E%3Cdiv class=%22footerCopy%22%3E%3Cp%3E%3Cdiv class='fl'%3EField of view:&nbsp;%3C/div%3E %3Cdiv id='fov_value' class='fl'%3E%3C/div%3E%3Cdiv class='cl'%3E%3C/div%3E%3C/p%3E%3Cdiv id=%22slider_cg_fov%22 class=%22slider ui-slider%22%3E%3C/div%3E%3Cdiv class=%22sliderpxh%22%3E%3Cdiv class=%22fl ninePxTxt lightGrayTxt%22%3Emin%3C/div%3E%3Cdiv class=%22fr ninePxTxt lightGrayTxt%22%3Emax%3C/div%3E%3Cdiv class=%22cl%22%3E%3C/div%3E%3C/div%3E%3Cdiv class=%22fifteenpxhigh%22%3E%3C/div%3E%3C/div%3E%3Cdiv class=%22fifteenpxhigh%22%3E%3C/div%3E%3C/div%3E%3C/div%3E%3C/div%3E%3Cdiv class=%22cl%22%3E%3C/div%3E%3C/div%3E%3Cdiv class=%22cl%22%3E%3C/div%3E%3Cdiv class=%22twentypxh twentypxlh%22%3E%3Ca href=%22javascript:;%22 onclick=%22quakelive.mod_prefs.ResetDefaults(); return false%22 class=%22fl reset_settings_defaults%22%3E%3C/a%3E%3Cdiv class=%22fl tenpxh light-midGrayTxt footerCopy%22%3EReset Defaults for all game settings%3C/div%3E%3Cdiv class=%22cl%22%3E%3C/div%3E%3C/div%3E%3C/div%3E");
quakelive.mod_prefs.TPL_CONTROLS_ACTIONS=""+unescape("%3Cdiv class=%22innerpanellong fl%22%3E%3Cdiv class=%22rollover fl%22%3E%3Ca href=%22javascript:;%22 onclick=%22quakelive.mod_prefs.Nav('character'); return false%22 class=%22btn_character fl%22%3E%3C/a%3E%3Ca href=%22javascript:;%22 onclick=%22quakelive.mod_prefs.Nav('controls_movement'); return false%22 class=%22btn_controls fl selected%22%3E%3C/a%3E%3Ca href=%22javascript:;%22 onclick=%22quakelive.mod_prefs.Nav('settings_basic'); return false%22 class=%22btn_settings fl%22%3E%3C/a%3E%3Cdiv class=%22cl%22%3E%3C/div%3E%3C/div%3E%3Cdiv class=%22cl%22%3E%3C/div%3E%3Cdiv class=%22innerpanelsubnav%22%3E%3Cdiv class=%22fl%22 style=%22width:132px;%22%3E&nbsp;%3C/div%3E%3Ca href=%22javascript:;%22 onclick=%22quakelive.mod_prefs.Nav('controls_movement'); return false%22 class=%22btn_movement fl%22%3E%3C/a%3E%3Ca href=%22javascript:;%22 onclick=%22quakelive.mod_prefs.Nav('controls_actions'); return false%22 class=%22btn_actions fl selected%22%3E%3C/a%3E%3Ca href=%22javascript:;%22 onclick=%22quakelive.mod_prefs.Nav('controls_weapons'); return false%22 class=%22btn_weapons fl%22%3E%3C/a%3E%3Ca href=%22javascript:;%22 onclick=%22quakelive.mod_prefs.Nav('controls_mouse'); return false%22 class=%22btn_mouse fl%22%3E%3C/a%3E%3Cdiv class=%22cl%22%3E%3C/div%3E%3C/div%3E%3Cdiv class=%22innerpanelsettings%22%3E%3Cdiv class=%22controlsBG fl%22%3E%3Cdiv class=%22row%22%3E%3Cdiv class=%22medlong fl twentypxh fourpxpadtop%22%3E%3Cdiv class=%22txtCommand%22%3E%3C/div%3E%3C/div%3E%3Cdiv class=%22sixtypxwide fl fourpxpadtop%22%3E%3Cdiv class=%22txtMainKey%22%3E%3C/div%3E%3C/div%3E%3Cdiv class=%22cl%22%3E%3C/div%3E%3C/div%3E%3Cdiv id=%22controls_actions_binds0%22%3E%3C/div%3E%3C/div%3E%3Cdiv class=%22greyVertLine fl%22%3E%3C/div%3E%3Cdiv class=%22controlsBG fl%22%3E%3Cdiv class=%22row%22%3E%3Cdiv class=%22medlong fl twentypxh fourpxpadtop%22%3E%3Cdiv class=%22txtCommand%22%3E%3C/div%3E%3C/div%3E%3Cdiv class=%22sixtypxwide fl fourpxpadtop%22%3E%3Cdiv class=%22txtMainKey%22%3E%3C/div%3E%3C/div%3E%3Cdiv class=%22cl%22%3E%3C/div%3E%3C/div%3E%3Cdiv id=%22controls_actions_binds1%22%3E%3C/div%3E%3C/div%3E%3Cdiv class=%22cl%22%3E%3C/div%3E%3C/div%3E%3Cdiv class=%22fivepxhigh%22%3E%3C/div%3E%3Cdiv class=%22mainkeyhr%22%3E%3C/div%3E%3Cdiv class=%22keyboard_container%22%3E%3C/div%3E%3Cdiv class=%22cl%22%3E%3C/div%3E%3Cdiv class=%22threepxhigh%22%3E%3C/div%3E%3Cdiv class=%22twentypxh%22%3E%3Ca href=%22javascript:;%22 onclick=%22quakelive.mod_prefs.ResetDefaults(); return false%22 class=%22fl reset_settings_defaults%22%3E%3C/a%3E%3Cdiv class=%22fl tenpxh light-midGrayTxt footerCopy%22%3EReset Defaults for all game settings%3C/div%3E%3Cdiv class=%22cl%22%3E%3C/div%3E%3C/div%3E%3C/div%3E");
quakelive.mod_prefs.TPL_CONTROLS_MOVEMENT=""+unescape("%3Cdiv class=%22innerpanellong fl%22%3E%3Cdiv class=%22rollover fl%22%3E%3Ca href=%22javascript:;%22 onclick=%22quakelive.mod_prefs.Nav('character'); return false%22 class=%22btn_character fl%22%3E%3C/a%3E%3Ca href=%22javascript:;%22 onclick=%22quakelive.mod_prefs.Nav('controls_movement'); return false%22 class=%22btn_controls fl selected%22%3E%3C/a%3E%3Ca href=%22javascript:;%22 onclick=%22quakelive.mod_prefs.Nav('settings_basic'); return false%22 class=%22btn_settings fl%22%3E%3C/a%3E%3Cdiv class=%22cl%22%3E%3C/div%3E%3C/div%3E%3Cdiv class=%22cl%22%3E%3C/div%3E%3Cdiv class=%22innerpanelsubnav%22%3E%3Cdiv class=%22fl%22 style=%22width:132px;%22%3E&nbsp;%3C/div%3E%3Ca href=%22javascript:;%22 onclick=%22quakelive.mod_prefs.Nav('controls_movement'); return false%22 class=%22btn_movement fl selected%22%3E%3C/a%3E%3Ca href=%22javascript:;%22 onclick=%22quakelive.mod_prefs.Nav('controls_actions'); return false%22 class=%22btn_actions fl%22%3E%3C/a%3E%3Ca href=%22javascript:;%22 onclick=%22quakelive.mod_prefs.Nav('controls_weapons'); return false%22 class=%22btn_weapons fl%22%3E%3C/a%3E%3Ca href=%22javascript:;%22 onclick=%22quakelive.mod_prefs.Nav('controls_mouse'); return false%22 class=%22btn_mouse fl%22%3E%3C/a%3E%3Cdiv class=%22cl%22%3E%3C/div%3E%3C/div%3E%3Cdiv class=%22innerpanelsettings%22%3E%3Cdiv class=%22controlsBG fl%22%3E%3Cdiv class=%22row%22%3E%3Cdiv class=%22medlong fl twentypxh fourpxpadtop%22%3E%3Cdiv class=%22txtCommand%22%3E%3C/div%3E%3C/div%3E%3Cdiv class=%22sixtypxwide fl fourpxpadtop%22%3E%3Cdiv class=%22txtMainKey%22%3E%3C/div%3E%3C/div%3E%3Cdiv class=%22cl%22%3E%3C/div%3E%3C/div%3E%3Cdiv id=%22controls_movement_binds0%22%3E%3C/div%3E%3C/div%3E%3Cdiv class=%22greyVertLine fl%22%3E%3C/div%3E%3Cdiv class=%22controlsBG fl%22%3E%3Cdiv class=%22row%22%3E%3Cdiv class=%22medlong fl twentypxh fourpxpadtop%22%3E%3Cdiv class=%22txtCommand%22%3E%3C/div%3E%3C/div%3E%3Cdiv class=%22sixtypxwide fl fourpxpadtop%22%3E%3Cdiv class=%22txtMainKey%22%3E%3C/div%3E%3C/div%3E%3Cdiv class=%22cl%22%3E%3C/div%3E%3C/div%3E%3Cdiv id=%22controls_movement_binds1%22%3E%3C/div%3E%3C/div%3E%3Cdiv class=%22cl%22%3E%3C/div%3E%3C/div%3E%3Cdiv class=%22fivepxhigh%22%3E%3C/div%3E%3Cdiv class=%22mainkeyhr%22%3E%3C/div%3E%3Cdiv class=%22keyboard_container%22%3E%3C/div%3E%3Cdiv class=%22cl%22%3E%3C/div%3E%3Cdiv class=%22threepxhigh%22%3E%3C/div%3E%3Cdiv class=%22twentypxh%22%3E%3Ca href=%22javascript:;%22 onclick=%22quakelive.mod_prefs.ResetDefaults(); return false%22 class=%22fl reset_settings_defaults%22%3E%3C/a%3E%3Cdiv class=%22fl tenpxh light-midGrayTxt footerCopy%22%3EReset Defaults for all game settings%3C/div%3E%3Cdiv class=%22cl%22%3E%3C/div%3E%3C/div%3E%3C/div%3E");
quakelive.mod_prefs.TPL_CONTROLS_WEAPONS=""+unescape("%3Cdiv class=%22innerpanellong fl%22%3E%3Cdiv class=%22rollover fl%22%3E%3Ca href=%22javascript:;%22 onclick=%22quakelive.mod_prefs.Nav('character'); return false%22 class=%22btn_character fl%22%3E%3C/a%3E%3Ca href=%22javascript:;%22 onclick=%22quakelive.mod_prefs.Nav('controls_movement'); return false%22 class=%22btn_controls fl selected%22%3E%3C/a%3E%3Ca href=%22javascript:;%22 onclick=%22quakelive.mod_prefs.Nav('settings_basic'); return false%22 class=%22btn_settings fl%22%3E%3C/a%3E%3Cdiv class=%22cl%22%3E%3C/div%3E%3C/div%3E%3Cdiv class=%22cl%22%3E%3C/div%3E%3Cdiv class=%22innerpanelsubnav%22%3E%3Cdiv class=%22fl%22 style=%22width:132px;%22%3E&nbsp;%3C/div%3E%3Ca href=%22javascript:;%22 onclick=%22quakelive.mod_prefs.Nav('controls_movement'); return false%22 class=%22btn_movement fl%22%3E%3C/a%3E%3Ca href=%22javascript:;%22 onclick=%22quakelive.mod_prefs.Nav('controls_actions'); return false%22 class=%22btn_actions fl%22%3E%3C/a%3E%3Ca href=%22javascript:;%22 onclick=%22quakelive.mod_prefs.Nav('controls_weapons'); return false%22 class=%22btn_weapons fl selected%22%3E%3C/a%3E%3Ca href=%22javascript:;%22 onclick=%22quakelive.mod_prefs.Nav('controls_mouse'); return false%22 class=%22btn_mouse fl%22%3E%3C/a%3E%3Cdiv class=%22cl%22%3E%3C/div%3E%3C/div%3E%3Cdiv class=%22innerpanelsettings%22%3E%3Cdiv class=%22controlsBG fl%22%3E%3Cdiv class=%22row%22%3E%3Cdiv class=%22medlong fl twentypxh fourpxpadtop%22%3E%3Cdiv class=%22txtCommand%22%3E%3C/div%3E%3C/div%3E%3Cdiv class=%22sixtypxwide fl fourpxpadtop%22%3E%3Cdiv class=%22txtMainKey%22%3E%3C/div%3E%3C/div%3E%3Cdiv class=%22cl%22%3E%3C/div%3E%3C/div%3E%3Cdiv id=%22controls_weapons_binds0%22%3E%3C/div%3E%3C/div%3E%3Cdiv class=%22greyVertLine fl%22%3E%3C/div%3E%3Cdiv class=%22controlsBG fl%22%3E%3Cdiv class=%22row%22%3E%3Cdiv class=%22medlong fl twentypxh fourpxpadtop%22%3E%3Cdiv class=%22txtCommand%22%3E%3C/div%3E%3C/div%3E%3Cdiv class=%22sixtypxwide fl fourpxpadtop%22%3E%3Cdiv class=%22txtMainKey%22%3E%3C/div%3E%3C/div%3E%3Cdiv class=%22cl%22%3E%3C/div%3E%3C/div%3E%3Cdiv id=%22controls_weapons_binds1%22%3E%3C/div%3E%3C/div%3E%3Cdiv class=%22cl%22%3E%3C/div%3E%3C/div%3E%3Cdiv class=%22fivepxhigh%22%3E%3C/div%3E%3Cdiv class=%22mainkeyhr%22%3E%3C/div%3E%3Cdiv class=%22keyboard_container%22%3E%3C/div%3E%3Cdiv class=%22cl%22%3E%3C/div%3E%3Cdiv class=%22threepxhigh%22%3E%3C/div%3E%3Cdiv class=%22twentypxh%22%3E%3Ca href=%22javascript:;%22 onclick=%22quakelive.mod_prefs.ResetDefaults(); return false%22 class=%22fl reset_settings_defaults%22%3E%3C/a%3E%3Cdiv class=%22fl tenpxh light-midGrayTxt footerCopy%22%3EReset Defaults for all game settings%3C/div%3E%3Cdiv class=%22cl%22%3E%3C/div%3E%3C/div%3E%3C/div%3E");
quakelive.mod_prefs.TPL_CONTROLS_MOUSE=[unescape("%3Cdiv class=%22innerpanellong fl%22%3E%3Cdiv class=%22rollover fl%22%3E%3Ca href=%22javascript:;%22 onclick=%22quakelive.mod_prefs.Nav('character'); return false%22 class=%22btn_character fl%22%3E%3C/a%3E%3Ca href=%22javascript:;%22 onclick=%22quakelive.mod_prefs.Nav('controls_movement'); return false%22 class=%22btn_controls fl selected%22%3E%3C/a%3E%3Ca href=%22javascript:;%22 onclick=%22quakelive.mod_prefs.Nav('settings_basic'); return false%22 class=%22btn_settings fl%22%3E%3C/a%3E%3Cdiv class=%22cl%22%3E%3C/div%3E%3C/div%3E%3Cdiv class=%22cl%22%3E%3C/div%3E%3Cdiv class=%22innerpanelsubnav%22%3E%3Cdiv class=%22fl%22 style=%22width:132px;%22%3E&nbsp;%3C/div%3E%3Ca href=%22javascript:;%22 onclick=%22quakelive.mod_prefs.Nav('controls_movement'); return false%22 class=%22btn_movement fl%22%3E%3C/a%3E%3Ca href=%22javascript:;%22 onclick=%22quakelive.mod_prefs.Nav('controls_actions'); return false%22 class=%22btn_actions fl%22%3E%3C/a%3E%3Ca href=%22javascript:;%22 onclick=%22quakelive.mod_prefs.Nav('controls_weapons'); return false%22 class=%22btn_weapons fl%22%3E%3C/a%3E%3Ca href=%22javascript:;%22 onclick=%22quakelive.mod_prefs.Nav('controls_mouse'); return false%22 class=%22btn_mouse fl selected%22%3E%3C/a%3E%3Cdiv class=%22cl%22%3E%3C/div%3E%3C/div%3E%3Cdiv class=%22innerpanelsettings%22%3E%3Cdiv class=%22fl%22%3E%3Cdiv class=%22mc_panel%22%3E%3Cimg src=%22"),
quakelive.resource("/images/sf/registration/controls/mouse_invert_label.gif"),unescape("%22 class=%22label%22 /%3E%3Cdiv class=%22tenpxv%22%3E%3C/div%3E%3Cdiv class=%22mc_opts tc%22%3E%3Cdiv class=%22fl tenpxwide%22%3E&nbsp;%3C/div%3E%3Cdiv class=%22fl%22%3E%3Cdiv class=%22fivepxv%22%3E%3C/div%3E%3Cdiv id=%22m_pitch%22%3E%3C/div%3E%3C/div%3E%3Cdiv class=%22fl tenpxwide%22%3E&nbsp;%3C/div%3E%3Cdiv class=%22fl tl%22%3E&quot;On&quot; will reverse the direction%3Cbr /%3Eof looking up and down.%3C/div%3E%3Cdiv class=%22cl%22%3E%3C/div%3E%3C/div%3E%3C/div%3E%3C/div%3E%3Cdiv class=%22greyVertLine fl%22%3E%3C/div%3E%3Cdiv class=%22fl%22%3E%3Cdiv class=%22mc_panel%22%3E%3Cimg src=%22"),
quakelive.resource("/images/sf/registration/controls/mouse_sensitivity_label.gif"),unescape("%22 class=%22label%22 /%3E%3Cdiv class=%22mc_opts%22%3E%3Cp%3E%3Cdiv class='fl'%3EMouse sensitivity:&nbsp;%3C/div%3E %3Cdiv id='mouse_sens_value' class='fl'%3E%3C/div%3E%3Cdiv class='cl'%3E%3C/div%3E%3C/p%3E%3Cdiv class=%22fivepxv%22%3E%3C/div%3E%3Cdiv id=%22slider_sensitivity%22 class=%22slider ui-slider%22%3E%3C/div%3E%3Cdiv class=%22sliderpxh%22%3E%3Cdiv class=%22fl ninePxTxt lightGrayTxt%22%3Emin%3C/div%3E%3Cdiv class=%22fr ninePxTxt lightGrayTxt%22%3Emax%3C/div%3E%3Cdiv class=%22cl%22%3E%3C/div%3E%3C/div%3E%3C/div%3E%3C/div%3E%3C/div%3E%3Cdiv class=%22cl%22%3E%3C/div%3E%3C/div%3E%3Cdiv class=%22fivepxhigh%22%3E%3C/div%3E%3Cdiv class=%22mainkeyhr%22%3E%3C/div%3E%3Cdiv class=%22keyboard_container%22%3E%3C/div%3E%3Cdiv class=%22cl%22%3E%3C/div%3E%3Cdiv class=%22threepxhigh%22%3E%3C/div%3E%3Cdiv class=%22twentypxh%22%3E%3Ca href=%22javascript:;%22 onclick=%22quakelive.mod_prefs.ResetDefaults(); return false%22 class=%22fl reset_settings_defaults%22%3E%3C/a%3E%3Cdiv class=%22fl tenpxh light-midGrayTxt footerCopy%22%3EReset Defaults for all game settings%3C/div%3E%3Cdiv class=%22cl%22%3E%3C/div%3E%3C/div%3E%3C/div%3E")].join("");
quakelive.mod_prefs.TPL_KEYBOARD=""+unescape("%3Cdiv id=%22qlv_keyboard%22%3E%3Cdiv class=%22left%22%3E%3Cdiv%3E%3Cspan class=%22key_ESCAPE esc%22%3E%3C/span%3E%3Cspan class=%22key_F1 f1%22%3E%3C/span%3E%3Cspan class=%22key_F2 f2%22%3E%3C/span%3E%3Cspan class=%22key_F3 f3%22%3E%3C/span%3E%3Cspan class=%22key_F4 f4%22%3E%3C/span%3E%3Cspan class=%22key_F5 f5%22%3E%3C/span%3E%3Cspan class=%22key_F6 f6%22%3E%3C/span%3E%3Cspan class=%22key_F7 f7%22%3E%3C/span%3E%3Cspan class=%22key_F8 f8%22%3E%3C/span%3E%3Cspan class=%22key_F9 f9%22%3E%3C/span%3E%3Cspan class=%22key_F10 f10%22%3E%3C/span%3E%3Cspan class=%22key_F11 f11%22%3E%3C/span%3E%3Cspan class=%22key_F12 f12%22%3E%3C/span%3E%3C/div%3E%3Cdiv%3E%3Cspan class=%22key_TILDE tilde%22%3E%3C/span%3E%3Cspan class=%22key_1 k1%22%3E%3C/span%3E%3Cspan class=%22key_2 k2%22%3E%3C/span%3E%3Cspan class=%22key_3 k3%22%3E%3C/span%3E%3Cspan class=%22key_4 k4%22%3E%3C/span%3E%3Cspan class=%22key_5 k5%22%3E%3C/span%3E%3Cspan class=%22key_6 k6%22%3E%3C/span%3E%3Cspan class=%22key_7 k7%22%3E%3C/span%3E%3Cspan class=%22key_8 k8%22%3E%3C/span%3E%3Cspan class=%22key_9 k9%22%3E%3C/span%3E%3Cspan class=%22key_0 k0%22%3E%3C/span%3E%3Cspan class=%22key_MINUS minus%22%3E%3C/span%3E%3Cspan class=%22key_EQUALS equal%22%3E%3C/span%3E%3Cspan class=%22key_BACKSPACE backspace%22%3E%3C/span%3E%3C/div%3E%3Cdiv%3E%3Cspan class=%22key_TAB tab%22%3E%3C/span%3E%3Cspan class=%22key_Q q%22%3E%3C/span%3E%3Cspan class=%22key_W w%22%3E%3C/span%3E%3Cspan class=%22key_E e%22%3E%3C/span%3E%3Cspan class=%22key_R r%22%3E%3C/span%3E%3Cspan class=%22key_T t%22%3E%3C/span%3E%3Cspan class=%22key_Y y%22%3E%3C/span%3E%3Cspan class=%22key_U u%22%3E%3C/span%3E%3Cspan class=%22key_I i%22%3E%3C/span%3E%3Cspan class=%22key_O o%22%3E%3C/span%3E%3Cspan class=%22key_P p%22%3E%3C/span%3E%3Cspan class=%22key_LEFTBRACKET lbrack%22%3E%3C/span%3E%3Cspan class=%22key_RIGHTBRACKET rbrack%22%3E%3C/span%3E%3Cspan class=%22key_BACKSLASH bslash%22%3E%3C/span%3E%3C/div%3E%3Cdiv%3E%3Cspan class=%22key_CAPSLOCK capslock%22%3E%3C/span%3E%3Cspan class=%22key_A a%22%3E%3C/span%3E%3Cspan class=%22key_S s%22%3E%3C/span%3E%3Cspan class=%22key_D d%22%3E%3C/span%3E%3Cspan class=%22key_F f%22%3E%3C/span%3E%3Cspan class=%22key_G g%22%3E%3C/span%3E%3Cspan class=%22key_H h%22%3E%3C/span%3E%3Cspan class=%22key_J j%22%3E%3C/span%3E%3Cspan class=%22key_K k%22%3E%3C/span%3E%3Cspan class=%22key_L l%22%3E%3C/span%3E%3Cspan class=%22key_SEMICOLON semicolon%22%3E%3C/span%3E%3Cspan class=%22key_APOSTROPHE apos%22%3E%3C/span%3E%3Cspan class=%22key_ENTER return%22%3E%3C/span%3E%3C/div%3E%3Cdiv%3E%3Cspan class=%22key_SHIFT shiftl%22%3E%3C/span%3E%3Cspan class=%22key_Z z%22%3E%3C/span%3E%3Cspan class=%22key_X x%22%3E%3C/span%3E%3Cspan class=%22key_C c%22%3E%3C/span%3E%3Cspan class=%22key_V v%22%3E%3C/span%3E%3Cspan class=%22key_B b%22%3E%3C/span%3E%3Cspan class=%22key_N n%22%3E%3C/span%3E%3Cspan class=%22key_M m%22%3E%3C/span%3E%3Cspan class=%22key_COMMA comma%22%3E%3C/span%3E%3Cspan class=%22key_PERIOD period%22%3E%3C/span%3E%3Cspan class=%22key_FORWARDSLASH fslash%22%3E%3C/span%3E%3Cspan class=%22key_SHIFT shiftr%22%3E%3C/span%3E%3C/div%3E%3Cdiv%3E%3Cspan class=%22key_CTRL ctrll%22%3E%3C/span%3E%3Cspan class=%22key_LEFTWIN winl%22%3E%3C/span%3E%3Cspan class=%22key_LEFTALT altl%22%3E%3C/span%3E%3Cspan class=%22key_SPACE spacebar%22%3E%3C/span%3E%3Cspan class=%22key_RIGHTALT altr%22%3E%3C/span%3E%3Cspan class=%22key_RIGHTWIN winr%22%3E%3C/span%3E%3Cspan class=%22key_CTRL ctrlr%22%3E%3C/span%3E%3Ca href=%22#%22 class=%22%22%3E%3C/a%3E%3C/div%3E%3C/div%3E%3Cdiv class=%22center%22%3E%3Cdiv%3E%3Cspan class=%22key_PRTSCRN prtscr%22%3E%3C/span%3E%3Cspan class=%22key_SCROLLLOCK scrolllock%22%3E%3C/span%3E%3Cspan class=%22key_PAUSE pausebreak%22%3E%3C/span%3E%3C/div%3E%3Cdiv%3E%3Cspan class=%22key_INS insert%22%3E%3C/span%3E%3Cspan class=%22key_HOME home%22%3E%3C/span%3E%3Cspan class=%22key_PGUP pgup%22%3E%3C/span%3E%3C/div%3E%3Cdiv%3E%3Cspan class=%22key_DEL delete%22%3E%3C/span%3E%3Cspan class=%22key_END end%22%3E%3C/span%3E%3Cspan class=%22key_PGDN pgdown%22%3E%3C/span%3E%3C/div%3E%3Cdiv%3E%3Cspan class=%22key_UPARROW arrowup%22%3E%3C/span%3E%3C/div%3E%3Cdiv%3E%3Cspan class=%22key_LEFTARROW arrowleft%22%3E%3C/span%3E%3Cspan class=%22key_DOWNARROW arrowdown%22%3E%3C/span%3E%3Cspan class=%22key_RIGHTARROW arrowright%22%3E%3C/span%3E%3C/div%3E%3C/div%3E%3Cdiv class=%22tenkey%22%3E%3Cdiv%3E%3Ca href=%22#%22 class=%22scrollLights%22%3E%3C/a%3E%3C/div%3E%3Cdiv%3E%3Cspan class=%22key_KP_NUMLOCK numlock%22%3E%3C/span%3E%3Cspan class=%22key_KP_SLASH slash%22%3E%3C/span%3E%3Cspan class=%22key_KP_STAR asterick%22%3E%3C/span%3E%3Cspan class=%22key_KP_MINUS minus%22%3E%3C/span%3E%3C/div%3E%3Cdiv%3E%3Cspan class=%22key_KP_HOME seven%22%3E%3C/span%3E%3Cspan class=%22key_KP_UPARROW eight%22%3E%3C/span%3E%3Cspan class=%22key_KP_PGUP nine%22%3E%3C/span%3E%3C/div%3E%3Cdiv%3E%3Cspan class=%22key_KP_LEFTARROW four%22%3E%3C/span%3E%3Cspan class=%22key_KP_5 five%22%3E%3C/span%3E%3Cspan class=%22key_KP_RIGHTARROW six%22%3E%3C/span%3E%3Cspan class=%22key_KP_PLUS tkPlus%22%3E%3C/span%3E%3C/div%3E%3Cdiv%3E%3Cspan class=%22key_KP_END one tkRow5%22%3E%3C/span%3E%3Cspan class=%22key_KP_DOWNARROW two tkRow5%22%3E%3C/span%3E%3Cspan class=%22key_KP_PGDN three tkRow5%22%3E%3C/span%3E%3C/div%3E%3Cdiv%3E%3Cspan class=%22key_KP_INS zero tkRow6%22%3E%3C/span%3E%3Cspan class=%22key_KP_DEL tkDelete tkRow6%22%3E%3C/span%3E%3Cspan class=%22key_KP_ENTER tkEnter%22%3E%3C/span%3E%3C/div%3E%3C/div%3E%3C/div%3E%3Cdiv class=%22mouse fl%22 %3E%3Cdiv class=%22mouse_top%22%3E%3C/div%3E%3Ca class=%22key_KP_MOUSE2 btn_rmouse%22%3E%3C/a%3E%3Cdiv class=%22mouse_body%22%3E%3C/div%3E%3Cdiv class=%22mouse_bottom%22%3E%3C/div%3E%3C/div%3E");
quakelive.mod_prefs.TPL_OVERLAY_CONTAINER=""+unescape("%3Cdiv style='width: 100%; height: 100%'%3E%3Cdiv id=%22qlv_prefsoverlay%22 class=%22tl%22%3E%3Cdiv id=%22qlv_regWindow%22 class=%22regNone%22%3E%3C/div%3E%3C/div%3E%3Cdiv id=%22qlv_registrationContent%22 class=%22tl tenpxpad%22%3E%3Cdiv class=%22fortypxhigh%22%3E%3C/div%3E%3Cdiv class=%22registration leftAlign%22%3E%3Cdiv%3E%3Cdiv class=%22title fl%22%3E%3C/div%3E%3Ca href=%22javascript:;%22 onclick=%22quakelive.mod_prefs.CloseOverlay(); return false%22 class=%22close_window fr%22%3E%3C/a%3E%3Cdiv class=%22cl%22%3E%3C/div%3E%3C/div%3E%3Cdiv class=%22fiftypxhigh%22%3E%3C/div%3E%3Cdiv%3E%3Cdiv class=%22fifteenpxhigh%22%3E%3C/div%3E%3Cdiv id=%22configContainer%22 style=%22position: relative; z-index: 1%22%3E%3C/div%3E%3C/div%3E%3C/div%3E%3C/div%3E%3Cdiv class=%22cl%22%3E%3C/div%3E%3C/div%3E");
quakelive.mod_stats.TPL_QUICKSTATS=[unescape("%3Ca href=%22javascript:;%22 onclick=%22quakelive.Goto('stats'); return false%22 class=%22qlv_plts_offline%22%3E %3Cimg src=%22"),quakelive.resource("/images/sf/login/btn_viewfullstats.png"),unescape("%22 alt=%22offline%22 width=%22160%22 height=%2220%22 /%3E %3C/a%3E%3Cdiv class=%22qlv_plts_leftbox%22%3E%3Cdiv class=%22qlv_pltslb_top%22%3E %3Cspan class=%22qlv_pltslb_title%22%3E%3C/span%3E %3Cspan class=%22qlv_pltslb_last_played%22%3E%3C/span%3E %3C/div%3E%3Cdiv class=%22qlv_pltslb_bottom%22%3E%3Cdiv class=%22qlv_pltslb_character nametag-body-md%22%3E%3C/div%3E%3Ctable class=%22qlv_pltslb_bl%22%3E%3Ctr%3E%3Ctd%3E%3Cspan class=%22title%22%3EMost Played Arena%3C/span%3E %3Cspan class=%22fav_map_txt%22%3E%3C/span%3E %3C/td%3E%3Ctd height=%2260%22 width=%22100%22 class=%22fav_map_img tc%22%3E%3C/td%3E%3C/tr%3E%3Ctr%3E%3Ctd%3E%3Cspan class=%22title%22%3EMost Games Played%3C/span%3E %3Cspan class=%22fav_gametype_txt%22%3E%3C/span%3E %3C/td%3E%3Ctd height=%2260%22 width=%22100%22 class=%22fav_gametype_img tc%22%3E%3C/td%3E%3C/tr%3E%3Ctr%3E%3Ctd%3E%3Cspan class=%22title%22%3EWeapon of Choice%3C/span%3E %3Cspan class=%22fav_weapon_txt%22%3E%3C/span%3E %3C/td%3E%3Ctd height=%2260%22 width=%22100%22 class=%22fav_weapon_img%22%3E%3C/td%3E%3C/tr%3E%3C/table%3E%3C/div%3E%3C/div%3E%3Cdiv class=%22qlv_plts_rightbox%22%3E%3Cdiv class=%22qlv_pltsrb_top%22%3E%3Ctable%3E%3Ctr class=%22qlv_pltslb_hd%22%3E%3Ctd%3ETotal Frags:%3C/td%3E%3Ctd style=%22width:94px%22 class=%22total_frags%22%3E%3C/td%3E%3C/tr%3E%3Ctr%3E%3Ctd%3ETotal Games Played:%3C/td%3E%3Ctd class=%22total_games%22%3E%3C/td%3E%3C/tr%3E%3Ctr%3E%3Ctd%3ETotal Time Played:%3C/td%3E%3Ctd class=%22total_time%22%3E%3C/td%3E%3C/tr%3E%3C/table%3E%3C/div%3E%3Cdiv class=%22qlv_pltsrb_middle%22%3E%3C/div%3E%3Cdiv class=%22qlv_pltsrb_bottom%22%3E%3Ctable%3E%3Ctr class=%22qlv_pltsrb_hd%22%3E%3Ctd%3EGame Type%3C/td%3E%3Ctd class=%22tc%22%3EPlayed%3C/td%3E%3Ctd class=%22tc%22%3EWins%3C/td%3E%3C/tr%3E%3Ctr%3E%3Ctd%3EDeath Match%3C/td%3E%3Ctd class=%22tc played_dm%22%3E%3C/td%3E%3Ctd class=%22tc wins_dm%22%3E%3C/td%3E%3C/tr%3E%3Ctr%3E%3Ctd%3EDuel%3C/td%3E%3Ctd class=%22tc played_duel%22%3E%3C/td%3E%3Ctd class=%22tc wins_duel%22%3E%3C/td%3E%3C/tr%3E%3Ctr%3E%3Ctd%3ECapture The Flag%3C/td%3E%3Ctd class=%22tc played_ctf%22%3E%3C/td%3E%3Ctd class=%22tc wins_ctf%22%3E%3C/td%3E%3C/tr%3E%3Ctr%3E%3Ctd%3ETeam Death Match%3C/td%3E%3Ctd class=%22tc played_tdm%22%3E%3C/td%3E%3Ctd class=%22tc wins_tdm%22%3E%3C/td%3E%3C/tr%3E%3Ctr class=%22qlv_pltsrb_totals%22%3E%3Ctd%3ETOTALS%3C/td%3E%3Ctd class=%22tc played_total%22%3E%3C/td%3E%3Ctd class=%22tc wins_total%22%3E%3C/td%3E%3C/tr%3E%3C/table%3E%3C/div%3E%3C/div%3E")].join("");
quakelive.mod_stats.TPL_MATCH_SUMMARY=[unescape("%3Cdiv id=%22stats_tip%22 style=%22position: absolute; z-index: 1000; left: 0; top: 0; display: none%22%3E%3Cimg src=%22"),quakelive.resource("/images/sf/pop_up/game_data_windows/onOver/shadow_top.png"),unescape("%22 width=%22385%22 height=%225%22 /%3E%3Cdiv style=%22background: url("),quakelive.resource("/images/sf/pop_up/game_data_windows/onOver/shadow_middle.png"),unescape("); width: 385px; text-align: center%22%3E%3Cdiv class=%22popheaderS%22%3E%3Cimg src=%22"),
quakelive.resource("/images/sf/pop_up/game_data_windows/onOver/hdr_gamesummary.png"),unescape("%22 class=%22fl%22 style=%22margin-left: 10px; margin-top: 2px%22 /%3E%3Cimg src=%22"),quakelive.resource("/images/sf/pop_up/game_data_windows/onOver/btn_clickformore.png"),unescape("%22 class=%22fr%22 style=%22margin-right: 10px; margin-top: 5px%22 /%3E%3Cdiv class=%22cl%22%3E%3C/div%3E%3C/div%3E%3Cdiv id=%22stats_datacontainer%22 class=%22popupBorder%22%3E%3Cdiv class=%22tc%22%3E%3Cimg src=%22"),quakelive.resource("/images/loader.gif"),
unescape("%22 width=%2262%22 height=%2213%22 style=%22margin: 20px 0px%22 /%3E%3C/div%3E%3C/div%3E%3C/div%3E%3Cimg src=%22"),quakelive.resource("/images/sf/pop_up/game_data_windows/onOver/shadow_bottom.png"),unescape("%22 width=%22385%22 height=%225%22 /%3E%3C/div%3E")].join("");quakelive.mod_stats.TPL_MATCH_SUMMARY_INNER=""+unescape("%3Cdiv class=%22mainData%22%3E%3Cdiv id=%22match_mapshot%22%3E%3C/div%3E%3Cdiv id=%22match_maindata%22 class=%22mainDataInfo%22%3E%3C/div%3E%3C/div%3E%3Cdiv class=%22dataDetail%22%3E%3Cdiv class=%22match_highlights Norm11px%22%3E%3C/div%3E%3C/div%3E");
quakelive.mod_stats.TPL_MATCH_DETAILS=[unescape("%3Cdiv id=%22stats_details%22 style=%22position: absolute; z-index: 1001; left: 0; top: 0%22%3E%3Cimg src=%22"),quakelive.resource("/images/sf/pop_up/game_data_windows/onClick/shadow_top.png"),unescape("%22 width=%22645%22 height=%225%22 /%3E%3Cdiv style=%22background: url("),quakelive.resource("/images/sf/pop_up/game_data_windows/onClick/shadow_middle.png"),unescape("); width: 645px; text-align: center; margin: 0 auto%22%3E%3Cdiv class=%22statsDetailsBody%22%3E%3Cdiv id=%22stats_details_top_vert%22 style=%22background: url("),
quakelive.resource("/images/sf/pop_up/game_data_windows/onClick/bkd_header.jpg"),unescape(") no-repeat; width: 635px; height: 40px%22%3E%3C/div%3E%3Cdiv class=%22popupBorderW%22%3E%3Cdiv%3E%3Cdiv id=%22match_gametype%22 class=%22gameTypeContainer fl%22%3ELoading&hellip;%3C/div%3E%3Ca href=%22javascript:;%22 onclick=%22quakelive.statstip.CloseStatsDetails(); return false%22 class=%22closeBtn fr%22%3E%3C/a%3E%3Cdiv id=%22stats_datacontainer%22 class=%22cl%22%3E%3Cdiv class=%22tc%22%3E%3Cimg src=%22"),
quakelive.resource("/images/loader.gif"),unescape("%22 width=%2262%22 height=%2213%22 style=%22margin: 20px 0px%22 /%3E%3C/div%3E%3C/div%3E%3C/div%3E%3Cdiv class=%22statsDetailsFooter%22%3E%3Cdiv class=%22adContainer%22 id=%22stats_details_bot_vert%22 style=%22background: url("),quakelive.resource("/images/a/full.jpg"),unescape(") no-repeat; width: 468px; height: 60px%22%3E%3C/div%3E%3C/div%3E%3C/div%3E%3C/div%3E%3C/div%3E%3Cimg src=%22"),quakelive.resource("/images/sf/pop_up/game_data_windows/onClick/shadow_bottom.png"),
unescape("%22 width=%22645%22 height=%225%22 /%3E%3C/div%3E")].join("");quakelive.mod_stats.TPL_MATCH_DETAILS_INNER=""+unescape("%3Cdiv class=%22mainDataW%22%3E%3Cdiv id=%22match_mapshot%22%3E%3C/div%3E%3Cdiv id=%22match_maindata%22 class=%22mainDataInfoW%22%3E%3C/div%3E%3C/div%3E%3Cdiv id=%22match_vscontainer%22 class=%22fr%22%3E%3C/div%3E%3Cdiv class=%22matchNavBar%22%3E%3Cdiv class=%22leftSide%22%3E%3Ca href=%22javascript:;%22 onclick=%22quakelive.statstip.SetDetailsMode('scoreboard'); return false%22 class=%22fl nav_scoreboard selected%22%3EScoreboard%3C/a%3E%3Cspan class=%22fl%22%3E&nbsp;|&nbsp;%3C/span%3E%3Ca href=%22javascript:;%22 onclick=%22quakelive.statstip.SetDetailsMode('weaponaccuracy'); return false%22 class=%22fl nav_weaponaccuracy%22%3EWeapon Accuracy%3C/a%3E%3Cdiv class=%22cl%22%3E%3C/div%3E%3C/div%3E%3Cdiv class=%22rightSide%22%3E%3Cspan class=%22fr addthis_container%22%3E%3C/span%3E%3Cspan class=%22fr%22%3E&nbsp;&nbsp;%3C/span%3E%3Ca href=%22javascript:;%22 class=%22share_email fr%22%3Eemail%3C/a%3E%3Ca href=%22javascript:;%22 class=%22share_email_img share_email fr%22%3E%3C/a%3E%3Cspan class=%22fr%22%3E&nbsp;&nbsp;%3C/span%3E%3Ca href=%22javascript:;%22 class=%22share_link fr%22%3Elink%3C/a%3E%3Ca href=%22javascript:;%22 class=%22share_link_img share_link fr%22%3E%3C/a%3E%3Cdiv class=%22cl%22%3E%3C/div%3E%3C/div%3E%3Cdiv class=%22cl%22%3E%3C/div%3E%3C/div%3E%3Cdiv class=%22dataDetailL%22%3E%3Cdiv class=%22match_scoreboard Norm11px%22%3E%3C/div%3E%3Cdiv class=%22match_weapons Norm11px%22 style=%22display: none%22%3E%3C/div%3E%3Cdiv class=%22match_weaponaccuracy Norm11px%22 style=%22display: none%22%3E%3C/div%3E%3C/div%3E");
quakelive.mod_stats.TPL_MATCH_VSCONTAINER=""+unescape("%3Cdiv class=%22vsFrameContainer%22%3E%3Cdiv class=%22gameTypeIcon%22%3E%3C/div%3E%3Cdiv class=%22headNum1%22%3E%3C/div%3E%3Cdiv class=%22headNum2%22%3E%3C/div%3E%3Cdiv class=%22vsFrame%22%3E%3C/div%3E%3Cdiv class=%22rankNum1%22%3E%3C/div%3E%3Cdiv class=%22scoreNum1%22%3E%3C/div%3E%3Cdiv class=%22nameNum1%22%3E%3C/div%3E%3Cdiv class=%22flagNum1%22%3E%3C/div%3E%3Cdiv class=%22rankNum2%22%3E%3C/div%3E%3Cdiv class=%22scoreNum2%22%3E%3C/div%3E%3Cdiv class=%22nameNum2%22%3E%3C/div%3E%3Cdiv class=%22flagNum2%22%3E%3C/div%3E%3Cdiv class=%22noPlayer2%22%3ENo Teammate Available%3C/div%3E%3C/div%3E");
quakelive.mod_lfg.TPL_MODE_MINIMIZED=""+unescape("%3Cdiv class=%22lfg_content%22 id=%22lfg_minimized%22%3E%3Cdiv class=%22footer%22%3E%3C/div%3E%3C/div%3E");
quakelive.mod_lfg.TPL_MODE_NORMAL=[unescape("%3Cdiv class=%22lfg_content%22 id=%22lfg_normal%22%3E%3Cdiv class=%22collapse_proxy%22%3E%3C/div%3E%3Cul class=%22jd_menu%22%3E%3Cli class=%22top%22%3E%3Ca href=%22javascript:;%22 class=%22accessible%22 style=%22position: relative; padding-left: 20px; padding-right: 31px%22%3E%3Cdiv class=%22arrow_right%22%3E%3C/div%3ESelect Game Type%3C/a%3E%3Cul%3E%3Cli class=%22select_gt_5 tl%22%3E%3Cimg src=%22"),quakelive.resource("/images/lfg/tny.png"),unescape("%22 width=%2220%22 height=%2220%22 /%3EDuel%3C/li%3E%3C/ul%3E%3C/li%3E%3C/ul%3E%3Cdiv class=%22blurb%22%3EWe'll find an opponent at your skill level, then alert you when the game is ready.%3C/div%3E%3Cdiv class=%22cancel_blurb%22%3E%3C/div%3E%3Cdiv class=%22footer%22%3E%3C/div%3E%3C/div%3E")].join("");
quakelive.mod_lfg.TPL_MODE_READY=""+unescape("%3Cdiv class=%22lfg_content%22 id=%22lfg_matchready%22%3E%3Cdiv class=%22description%22%3E%3C/div%3E%3Cdiv id=%22lfg_ready_tooltip%22%3E%3Cdiv class=%22levelshot%22%3E%3C/div%3E%3Ca href=%22javascript:;%22 class=%22play%22%3E%3C/a%3E%3C/div%3E%3Ca href=%22javascript:;%22 class=%22decline%22%3E%3C/a%3E%3Cdiv class=%22timer_header%22%3Eopen for%3C/div%3E%3Cdiv class=%22timer%22%3E%3C/div%3E%3C/div%3E");
quakelive.mod_lfg.TPL_MODE_INQUEUE=[unescape("%3Cdiv class=%22lfg_content%22 id=%22lfg_inqueue%22%3E%3Cdiv class=%22collapse_proxy%22%3E%3C/div%3E%3Cdiv class=%22blurb%22%3EWe're now finding you a Duel at your skill level. Please wait&hellip;%3C/div%3E%3Cdiv class=%22footer%22%3E%3Cimg src=%22"),quakelive.resource("/images/loader.gif"),unescape("%22 class=%22fl ticker%22 /%3E%3Cspan class=%22fl search_status%22%3ESearching%3C/span%3E%3Ca href=%22javascript:;%22 class=%22btn_stop fr%22%3E%3C/a%3E%3Cdiv class=%22cl%22%3E%3C/div%3E%3C/div%3E%3C/div%3E")].join("");
quakelive.mod_home.TPL_TOUR_OVERLAY=[unescape("%3Cdiv class=%22jqmWindow%22 id=%22tour_overlay%22%3E    %3Ca class=%22jqmClose%22%3E%3C/a%3E    %3Cdiv class='header'%3E        %3Cimg src=%22"),quakelive.resource("/images/tour_header.png"),unescape("%22 width=%22411%22 height=%2248%22 /%3E    %3C/div%3E    %3Cdiv class=%22tc%22%3E        %3Ciframe src=%22"),quakelive.resource("/flash/tour/index_tour.html"),unescape("?4b84634fa2d97%22 width=%22960%22 height=%22425%22 marginwidth=%220%22 marginheight=%220%22 frameborder=%220%22 scrolling=%22no%22 /%3E    %3C/div%3E%3C/div%3E")].join("");
