// Copyright 2011 The Brewmance authors. All Rights Reserved.
// Portions include the following:
/*!
 * jQuery JavaScript Library v1.6.2
 * http://jquery.com/
 *
 * Copyright 2011, John Resig
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * Includes Sizzle.js
 * http://sizzlejs.com/
 * Copyright 2011, The Dojo Foundation
 * Released under the MIT, BSD, and GPL Licenses.
 *
 * Date: Thu Jun 30 14:16:56 2011 -0400
 */

/*!
 * jQuery UI 1.8.14
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI
 */

/**
 * jQuery custom checkboxes
 * 
 * Copyright (c) 2008 Khavilo Dmitry (http://widowmaker.kiev.ua/checkbox/)
 * Licensed under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 * @version 1.1.0 Beta
 * @author Khavilo Dmitry
 * @mailto wm.morgun@gmail.com
**/

/*
 * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
 *
 * Uses the built in easing capabilities added In jQuery 1.1
 * to offer multiple easing options
 *
 * TERMS OF USE - jQuery Easing
 * 
 * Open source under the BSD License. 
 * 
 * Copyright © 2008 George McGinley Smith
 * All rights reserved.
 */

/**
 * jQuery.ScrollTo - Easy element scrolling using jQuery.
 * Copyright (c) 2007-2009 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com
 * Dual licensed under MIT and GPL.
 * Date: 5/25/2009
 * @author Ariel Flesler
 * @version 1.4.2
 *
 * http://flesler.blogspot.com/2007/10/jqueryscrollto.html
 */

/*
 * jQuery.SerialScroll - Animated scrolling of series
 * Copyright (c) 2007-2009 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com
 * Dual licensed under MIT and GPL.
 * Date: 06/14/2009
 * @author Ariel Flesler
 * @version 1.2.2
 * http://flesler.blogspot.com/2008/02/jqueryserialscroll.html
 */

/*
 * highlight v3
 * Highlights arbitrary terms.
 * <http://johannburkard.de/blog/programming/javascript/highlight-javascript-text-higlighting-jquery-plugin.html>
 * MIT license.
 * Johann Burkard
 * <http://johannburkard.de>
 * <mailto:jb@eaio.com>
 */
(function(){var COMPILED=!0,goog=goog||{};goog.global=this;goog.DEBUG=!0;goog.LOCALE="en";goog.evalWorksForGlobals_=null;goog.provide=function(a){if(!COMPILED){if(goog.isProvided_(a))throw Error('Namespace "'+a+'" already declared.');delete goog.implicitNamespaces_[a];for(var b=a;b=b.substring(0,b.lastIndexOf("."));){if(goog.getObjectByName(b))break;goog.implicitNamespaces_[b]=!0}}goog.exportPath_(a)};goog.isProvided_=function(a){return!goog.implicitNamespaces_[a]&&!!goog.getObjectByName(a)};
goog.setTestOnly=function(a){if(COMPILED&&!goog.DEBUG)throw a=a||"",Error("Importing test-only code into non-debug environment"+a?": "+a:".");};if(!COMPILED)goog.implicitNamespaces_={};goog.exportPath_=function(a,b,d){a=a.split(".");d=d||goog.global;!(a[0]in d)&&d.execScript&&d.execScript("var "+a[0]);for(var e;a.length&&(e=a.shift());)!a.length&&goog.isDef(b)?d[e]=b:d=d[e]?d[e]:d[e]={}};
goog.getObjectByName=function(a,b){for(var d=a.split("."),e=b||goog.global,g;g=d.shift();)if(goog.isDefAndNotNull(e[g]))e=e[g];else return null;return e};goog.globalize=function(a,b){var d=b||goog.global,e;for(e in a)d[e]=a[e]};
goog.addDependency=function(a,b,d){if(!COMPILED){for(var e,a=a.replace(/\\/g,"/"),g=goog.dependencies_,h=0;e=b[h];h++)g.nameToPath[e]=a,a in g.pathToNames||(g.pathToNames[a]={}),g.pathToNames[a][e]=!0;for(e=0;b=d[e];e++)a in g.requires||(g.requires[a]={}),g.requires[a][b]=!0}};
goog.require=function(a){if(!COMPILED&&!goog.getObjectByName(a)){var b=goog.getPathFromDeps_(a);if(b)goog.included_[b]=!0,goog.writeScripts_();else throw a="goog.require could not find: "+a,goog.global.console&&goog.global.console.error(a),Error(a);}};goog.basePath="";goog.nullFunction=function(){};goog.identityFunction=function(a){return a};goog.abstractMethod=function(){throw Error("unimplemented abstract method");};
goog.addSingletonGetter=function(a){a.getInstance=function(){return a.instance_||(a.instance_=new a)}};
if(!COMPILED)goog.included_={},goog.dependencies_={pathToNames:{},nameToPath:{},requires:{},visited:{},written:{}},goog.inHtmlDocument_=function(){var a=goog.global.document;return typeof a!="undefined"&&"write"in a},goog.findBasePath_=function(){if(goog.global.CLOSURE_BASE_PATH)goog.basePath=goog.global.CLOSURE_BASE_PATH;else if(goog.inHtmlDocument_())for(var a=goog.global.document.getElementsByTagName("script"),b=a.length-1;b>=0;--b){var d=a[b].src,e=d.lastIndexOf("?"),e=e==-1?d.length:e;if(d.substr(e-
7,7)=="base.js"){goog.basePath=d.substr(0,e-7);break}}},goog.importScript_=function(a){var b=goog.global.CLOSURE_IMPORT_SCRIPT||goog.writeScriptTag_;!goog.dependencies_.written[a]&&b(a)&&(goog.dependencies_.written[a]=!0)},goog.writeScriptTag_=function(a){return goog.inHtmlDocument_()?(goog.global.document.write('<script type="text/javascript" src="'+a+'"><\/script>'),!0):!1},goog.writeScripts_=function(){function a(g){if(!(g in e.written)){if(!(g in e.visited)&&(e.visited[g]=!0,g in e.requires))for(var i in e.requires[g])if(!goog.isProvided_(i))if(i in
e.nameToPath)a(e.nameToPath[i]);else throw Error("Undefined nameToPath for "+i);g in d||(d[g]=!0,b.push(g))}}var b=[],d={},e=goog.dependencies_,g;for(g in goog.included_)e.written[g]||a(g);for(g=0;g<b.length;g++)if(b[g])goog.importScript_(goog.basePath+b[g]);else throw Error("Undefined script input");},goog.getPathFromDeps_=function(a){return a in goog.dependencies_.nameToPath?goog.dependencies_.nameToPath[a]:null},goog.findBasePath_(),goog.global.CLOSURE_NO_DEPS||goog.importScript_(goog.basePath+
"deps.js");
goog.typeOf=function(a){var b=typeof a;if(b=="object")if(a){if(a instanceof Array)return"array";else if(a instanceof Object)return b;var d=Object.prototype.toString.call(a);if(d=="[object Window]")return"object";if(d=="[object Array]"||typeof a.length=="number"&&typeof a.splice!="undefined"&&typeof a.propertyIsEnumerable!="undefined"&&!a.propertyIsEnumerable("splice"))return"array";if(d=="[object Function]"||typeof a.call!="undefined"&&typeof a.propertyIsEnumerable!="undefined"&&!a.propertyIsEnumerable("call"))return"function"}else return"null";else if(b==
"function"&&typeof a.call=="undefined")return"object";return b};goog.propertyIsEnumerableCustom_=function(a,b){if(b in a)for(var d in a)if(d==b&&Object.prototype.hasOwnProperty.call(a,b))return!0;return!1};goog.propertyIsEnumerable_=function(a,b){return a instanceof Object?Object.prototype.propertyIsEnumerable.call(a,b):goog.propertyIsEnumerableCustom_(a,b)};goog.isDef=function(a){return a!==void 0};goog.isNull=function(a){return a===null};goog.isDefAndNotNull=function(a){return a!=null};
goog.isArray=function(a){return goog.typeOf(a)=="array"};goog.isArrayLike=function(a){var b=goog.typeOf(a);return b=="array"||b=="object"&&typeof a.length=="number"};goog.isDateLike=function(a){return goog.isObject(a)&&typeof a.getFullYear=="function"};goog.isString=function(a){return typeof a=="string"};goog.isBoolean=function(a){return typeof a=="boolean"};goog.isNumber=function(a){return typeof a=="number"};goog.isFunction=function(a){return goog.typeOf(a)=="function"};
goog.isObject=function(a){a=goog.typeOf(a);return a=="object"||a=="array"||a=="function"};goog.getUid=function(a){return a[goog.UID_PROPERTY_]||(a[goog.UID_PROPERTY_]=++goog.uidCounter_)};goog.removeUid=function(a){"removeAttribute"in a&&a.removeAttribute(goog.UID_PROPERTY_);try{delete a[goog.UID_PROPERTY_]}catch(b){}};goog.UID_PROPERTY_="closure_uid_"+Math.floor(Math.random()*2147483648).toString(36);goog.uidCounter_=0;goog.getHashCode=goog.getUid;goog.removeHashCode=goog.removeUid;
goog.cloneObject=function(a){var b=goog.typeOf(a);if(b=="object"||b=="array"){if(a.clone)return a.clone();var b=b=="array"?[]:{},d;for(d in a)b[d]=goog.cloneObject(a[d]);return b}return a};goog.bindNative_=function(a){return a.call.apply(a.bind,arguments)};
goog.bindJs_=function(a,b){var d=b||goog.global;if(arguments.length>2){var e=Array.prototype.slice.call(arguments,2);return function(){var b=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(b,e);return a.apply(d,b)}}else return function(){return a.apply(d,arguments)}};goog.bind=function(){goog.bind=Function.prototype.bind&&Function.prototype.bind.toString().indexOf("native code")!=-1?goog.bindNative_:goog.bindJs_;return goog.bind.apply(null,arguments)};
goog.partial=function(a){var b=Array.prototype.slice.call(arguments,1);return function(){var d=Array.prototype.slice.call(arguments);d.unshift.apply(d,b);return a.apply(this,d)}};goog.mixin=function(a,b){for(var d in b)a[d]=b[d]};goog.now=Date.now||function(){return+new Date};
goog.globalEval=function(a){if(goog.global.execScript)goog.global.execScript(a,"JavaScript");else if(goog.global.eval){if(goog.evalWorksForGlobals_==null)goog.global.eval("var _et_ = 1;"),typeof goog.global._et_!="undefined"?(delete goog.global._et_,goog.evalWorksForGlobals_=!0):goog.evalWorksForGlobals_=!1;if(goog.evalWorksForGlobals_)goog.global.eval(a);else{var b=goog.global.document,d=b.createElement("script");d.type="text/javascript";d.defer=!1;d.appendChild(b.createTextNode(a));b.body.appendChild(d);
b.body.removeChild(d)}}else throw Error("goog.globalEval not available");};goog.getCssName=function(a,b){var d=function(a){return goog.cssNameMapping_[a]||a},e;e=goog.cssNameMapping_?goog.cssNameMappingStyle_=="BY_WHOLE"?d:function(a){for(var a=a.split("-"),b=[],e=0;e<a.length;e++)b.push(d(a[e]));return b.join("-")}:function(a){return a};return b?a+"-"+e(b):e(a)};goog.setCssNameMapping=function(a,b){goog.cssNameMapping_=a;goog.cssNameMappingStyle_=b};
goog.getMsg=function(a,b){var d=b||{},e;for(e in d)var g=(""+d[e]).replace(/\$/g,"$$$$"),a=a.replace(RegExp("\\{\\$"+e+"\\}","gi"),g);return a};goog.exportSymbol=function(a,b,d){goog.exportPath_(a,b,d)};goog.exportProperty=function(a,b,d){a[b]=d};goog.inherits=function(a,b){function d(){}d.prototype=b.prototype;a.superClass_=b.prototype;a.prototype=new d;a.prototype.constructor=a};
goog.base=function(a,b){var d=arguments.callee.caller;if(d.superClass_)return d.superClass_.constructor.apply(a,Array.prototype.slice.call(arguments,1));for(var e=Array.prototype.slice.call(arguments,2),g=!1,h=a.constructor;h;h=h.superClass_&&h.superClass_.constructor)if(h.prototype[b]===d)g=!0;else if(g)return h.prototype[b].apply(a,e);if(a[b]===d)return a.constructor.prototype[b].apply(a,e);else throw Error("goog.base called from a method of one name to a method of a different name");};
goog.scope=function(a){a.call(goog.global)};(function(a,b){function d(c){return f.isWindow(c)?c:c.nodeType===9?c.defaultView||c.parentWindow:!1}function e(c){if(!ha[c]){var a=m.body,b=f("<"+c+">").appendTo(a),l=b.css("display");b.remove();if(l==="none"||l===""){H||(H=m.createElement("iframe"),H.frameBorder=H.width=H.height=0);a.appendChild(H);if(!R||!H.createElement)R=(H.contentWindow||H.contentDocument).document,R.write((m.compatMode==="CSS1Compat"?"<!doctype html>":"")+"<html><body>"),R.close();b=R.createElement(c);R.body.appendChild(b);
l=f.css(b,"display");a.removeChild(H)}ha[c]=l}return ha[c]}function g(c,a){var b={};f.each(va.concat.apply([],va.slice(0,a)),function(){b[this]=c});return b}function h(){da=b}function i(){setTimeout(h,0);return da=f.now()}function j(){try{return new a.XMLHttpRequest}catch(c){}}function n(c,a,b,l){if(f.isArray(a))f.each(a,function(a,k){b||Wa.test(c)?l(c,k):n(c+"["+(typeof k=="object"||f.isArray(k)?a:"")+"]",k,b,l)});else if(!b&&a!=null&&typeof a=="object")for(var d in a)n(c+"["+d+"]",a[d],b,l);else l(c,
a)}function p(c,a,f,l,d,e){d=d||a.dataTypes[0];e=e||{};e[d]=!0;for(var d=c[d],g=0,h=d?d.length:0,q=c===ia,i;g<h&&(q||!i);g++)i=d[g](a,f,l),typeof i=="string"&&(!q||e[i]?i=b:(a.dataTypes.unshift(i),i=p(c,a,f,l,i,e)));(q||!i)&&!e["*"]&&(i=p(c,a,f,l,"*",e));return i}function u(c){return function(a,b){var k;typeof a!="string"&&(b=a,a="*");if(f.isFunction(b))for(var l=a.toLowerCase().split(wa),d=0,e=l.length,g,h;d<e;d++)g=l[d],(h=/^\+/.test(g))&&(g=g.substr(1)||"*"),k=c[g]=c[g]||[],g=k,g[h?"unshift":"push"](b)}}
function v(c,a,b){var l=a==="width"?c.offsetWidth:c.offsetHeight,d=a==="width"?Xa:Ya;if(l>0)return b!=="border"&&f.each(d,function(){b||(l-=parseFloat(f.css(c,"padding"+this))||0);b==="margin"?l+=parseFloat(f.css(c,b+this))||0:l-=parseFloat(f.css(c,"border"+this+"Width"))||0}),l+"px";l=W(c,a,a);if(l<0||l==null)l=c.style[a]||0;l=parseFloat(l)||0;b&&f.each(d,function(){l+=parseFloat(f.css(c,"padding"+this))||0;b!=="padding"&&(l+=parseFloat(f.css(c,"border"+this+"Width"))||0);b==="margin"&&(l+=parseFloat(f.css(c,
b+this))||0)});return l+"px"}function C(c,a){a.src?f.ajax({url:a.src,async:!1,dataType:"script"}):f.globalEval((a.text||a.textContent||a.innerHTML||"").replace(Za,"/*$0*/"));a.parentNode&&a.parentNode.removeChild(a)}function x(c){f.nodeName(c,"input")?M(c):"getElementsByTagName"in c&&f.grep(c.getElementsByTagName("input"),M)}function M(c){if(c.type==="checkbox"||c.type==="radio")c.defaultChecked=c.checked}function D(c){return"getElementsByTagName"in c?c.getElementsByTagName("*"):"querySelectorAll"in
c?c.querySelectorAll("*"):[]}function J(c,a){var b;if(a.nodeType===1){a.clearAttributes&&a.clearAttributes();a.mergeAttributes&&a.mergeAttributes(c);b=a.nodeName.toLowerCase();if(b==="object")a.outerHTML=c.outerHTML;else if(b!=="input"||c.type!=="checkbox"&&c.type!=="radio")if(b==="option")a.selected=c.defaultSelected;else{if(b==="input"||b==="textarea")a.defaultValue=c.defaultValue}else c.checked&&(a.defaultChecked=a.checked=c.checked),a.value!==c.value&&(a.value=c.value);a.removeAttribute(f.expando)}}
function t(c,a){if(a.nodeType===1&&f.hasData(c)){var b=f.expando,l=f.data(c),d=f.data(a,l);if(l=l[b]){var e=l.events,d=d[b]=f.extend({},l);if(e){delete d.handle;d.events={};for(var g in e){b=0;for(l=e[g].length;b<l;b++)f.event.add(a,g+(e[g][b].namespace?".":"")+e[g][b].namespace,e[g][b],e[g][b].data)}}}}}function G(c,a,b){a=a||0;if(f.isFunction(a))return f.grep(c,function(c,f){return!!a.call(c,f,c)===b});if(a.nodeType)return f.grep(c,function(c){return c===a===b});if(typeof a=="string"){var l=f.grep(c,
function(c){return c.nodeType===1});if($a.test(a))return f.filter(a,l,!b);a=f.filter(a,l)}return f.grep(c,function(c){return f.inArray(c,a)>=0===b})}function A(c,a){return(c&&c!=="*"?c+".":"")+a.replace(ab,"`").replace(bb,"&")}function T(c){var a,b,l,d,e,g,h,i,r,s,j,n=[];d=[];e=f._data(this,"events");if(!(c.liveFired===this||!e||!e.live||c.target.disabled||c.button&&c.type==="click")){c.namespace&&(j=RegExp("(^|\\.)"+c.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)"));c.liveFired=this;var m=
e.live.slice(0);for(h=0;h<m.length;h++)e=m[h],e.origType.replace(ka,"")===c.type?d.push(e.selector):m.splice(h--,1);d=f(c.target).closest(d,c.currentTarget);i=0;for(r=d.length;i<r;i++){s=d[i];for(h=0;h<m.length;h++)if(e=m[h],s.selector===e.selector&&(!j||j.test(e.namespace))&&!s.elem.disabled){g=s.elem;l=null;if(e.preType==="mouseenter"||e.preType==="mouseleave")c.type=e.preType,(l=f(c.relatedTarget).closest(e.selector)[0])&&f.contains(g,l)&&(l=g);(!l||l!==g)&&n.push({elem:g,handleObj:e,level:s.level})}}i=
0;for(r=n.length;i<r;i++){d=n[i];if(b&&d.level>b)break;c.currentTarget=d.elem;c.data=d.handleObj.data;c.handleObj=d.handleObj;j=d.handleObj.origHandler.apply(d.elem,arguments);if(j===!1||c.isPropagationStopped())if(b=d.level,j===!1&&(a=!1),c.isImmediatePropagationStopped())break}return a}}function N(c,a,o){var l=f.extend({},o[0]);l.type=c;l.originalEvent={};l.liveFired=b;f.event.handle.call(a,l);l.isDefaultPrevented()&&o[0].preventDefault()}function F(){return!0}function L(){return!1}function xa(c,
a,o){var l=a+"defer",d=a+"queue",e=a+"mark",g=f.data(c,l,b,!0);g&&(o==="queue"||!f.data(c,d,b,!0))&&(o==="mark"||!f.data(c,e,b,!0))&&setTimeout(function(){!f.data(c,d,b,!0)&&!f.data(c,e,b,!0)&&(f.removeData(c,l,!0),g.resolve())},0)}function la(c){for(var a in c)if(a!=="toJSON")return!1;return!0}function Q(c,a,o){if(o===b&&c.nodeType===1)if(o="data-"+a.replace(db,"$1-$2").toLowerCase(),o=c.getAttribute(o),typeof o=="string"){try{o=o==="true"?!0:o==="false"?!1:o==="null"?null:f.isNaN(o)?eb.test(o)?
f.parseJSON(o):o:parseFloat(o)}catch(d){}f.data(c,a,o)}else o=b;return o}var m=a.document,fb=a.navigator,gb=a.location,f=function(){function c(){if(!k.isReady){try{m.documentElement.doScroll("left")}catch(a){setTimeout(c,1);return}k.ready()}}var k=function(c,a){return new k.fn.init(c,a,e)},f=a.jQuery,d=a.$,e,g=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,h=/\S/,S=/^\s+/,i=/\s+$/,r=/\d/,j=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,p=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,u=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
v=/(?:^|:|,)(?:\s*\[)+/g,T=/(webkit)[ \/]([\w.]+)/,t=/(opera)(?:.*version)?[ \/]([\w.]+)/,F=/(msie) ([\w.]+)/,x=/(mozilla)(?:.*? rv:([\w.]+))?/,hb=/-([a-z])/ig,w=function(c,a){return a.toUpperCase()},aa=fb.userAgent,ea,X,ib=Object.prototype.toString,ma=Object.prototype.hasOwnProperty,na=Array.prototype.push,ba=Array.prototype.slice,ya=String.prototype.trim,za=Array.prototype.indexOf,D={};k.fn=k.prototype={constructor:k,init:function(c,a,f){var o,d;if(!c)return this;if(c.nodeType)return this.context=
this[0]=c,this.length=1,this;if(c==="body"&&!a&&m.body)return this.context=m,this[0]=m.body,this.selector=c,this.length=1,this;if(typeof c=="string"){c.charAt(0)!=="<"||c.charAt(c.length-1)!==">"||c.length<3?o=g.exec(c):o=[null,c,null];if(o&&(o[1]||!a)){if(o[1])return d=(a=a instanceof k?a[0]:a)?a.ownerDocument||a:m,(f=j.exec(c))?k.isPlainObject(a)?(c=[m.createElement(f[1])],k.fn.attr.call(c,a,!0)):c=[d.createElement(f[1])]:(f=k.buildFragment([o[1]],[d]),c=(f.cacheable?k.clone(f.fragment):f.fragment).childNodes),
k.merge(this,c);if((a=m.getElementById(o[2]))&&a.parentNode){if(a.id!==o[2])return f.find(c);this.length=1;this[0]=a}this.context=m;this.selector=c;return this}return!a||a.jquery?(a||f).find(c):this.constructor(a).find(c)}if(k.isFunction(c))return f.ready(c);c.selector!==b&&(this.selector=c.selector,this.context=c.context);return k.makeArray(c,this)},selector:"",jquery:"1.6.2",length:0,size:function(){return this.length},toArray:function(){return ba.call(this,0)},get:function(c){return c==null?this.toArray():
c<0?this[this.length+c]:this[c]},pushStack:function(c,a,b){var f=this.constructor();k.isArray(c)?na.apply(f,c):k.merge(f,c);f.prevObject=this;f.context=this.context;a==="find"?f.selector=this.selector+(this.selector?" ":"")+b:a&&(f.selector=this.selector+"."+a+"("+b+")");return f},each:function(c,a){return k.each(this,c,a)},ready:function(c){k.bindReady();ea.done(c);return this},eq:function(c){return c===-1?this.slice(c):this.slice(c,+c+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},
slice:function(){return this.pushStack(ba.apply(this,arguments),"slice",ba.call(arguments).join(","))},map:function(c){return this.pushStack(k.map(this,function(a,b){return c.call(a,b,a)}))},end:function(){return this.prevObject||this.constructor(null)},push:na,sort:[].sort,splice:[].splice};k.fn.init.prototype=k.fn;k.extend=k.fn.extend=function(){var c,a,f,o,d,l,e=arguments[0]||{},z=1,g=arguments.length,h=!1;typeof e=="boolean"&&(h=e,e=arguments[1]||{},z=2);typeof e!="object"&&!k.isFunction(e)&&
(e={});for(g===z&&(e=this,--z);z<g;z++)if((c=arguments[z])!=null)for(a in c)f=e[a],o=c[a],e!==o&&(h&&o&&(k.isPlainObject(o)||(d=k.isArray(o)))?(d?(d=!1,l=f&&k.isArray(f)?f:[]):l=f&&k.isPlainObject(f)?f:{},e[a]=k.extend(h,l,o)):o!==b&&(e[a]=o));return e};k.extend({noConflict:function(c){a.$===k&&(a.$=d);c&&a.jQuery===k&&(a.jQuery=f);return k},isReady:!1,readyWait:1,holdReady:function(c){c?k.readyWait++:k.ready(!0)},ready:function(c){if(c===!0&&!--k.readyWait||c!==!0&&!k.isReady){if(!m.body)return setTimeout(k.ready,
1);k.isReady=!0;c!==!0&&--k.readyWait>0||(ea.resolveWith(m,[k]),k.fn.trigger&&k(m).trigger("ready").unbind("ready"))}},bindReady:function(){if(!ea){ea=k._Deferred();if(m.readyState==="complete")return setTimeout(k.ready,1);if(m.addEventListener)m.addEventListener("DOMContentLoaded",X,!1),a.addEventListener("load",k.ready,!1);else if(m.attachEvent){m.attachEvent("onreadystatechange",X);a.attachEvent("onload",k.ready);var b=!1;try{b=a.frameElement==null}catch(f){}m.documentElement.doScroll&&b&&c()}}},
isFunction:function(c){return k.type(c)==="function"},isArray:Array.isArray||function(c){return k.type(c)==="array"},isWindow:function(c){return c&&typeof c=="object"&&"setInterval"in c},isNaN:function(c){return c==null||!r.test(c)||isNaN(c)},type:function(c){return c==null?String(c):D[ib.call(c)]||"object"},isPlainObject:function(c){if(!c||k.type(c)!=="object"||c.nodeType||k.isWindow(c))return!1;if(c.constructor&&!ma.call(c,"constructor")&&!ma.call(c.constructor.prototype,"isPrototypeOf"))return!1;
for(var a in c);return a===b||ma.call(c,a)},isEmptyObject:function(c){for(var a in c)return!1;return!0},error:function(c){throw c;},parseJSON:function(c){if(typeof c!="string"||!c)return null;c=k.trim(c);if(a.JSON&&a.JSON.parse)return a.JSON.parse(c);if(n.test(c.replace(p,"@").replace(u,"]").replace(v,"")))return(new Function("return "+c))();k.error("Invalid JSON: "+c)},parseXML:function(c,b,f){a.DOMParser?(f=new DOMParser,b=f.parseFromString(c,"text/xml")):(b=new ActiveXObject("Microsoft.XMLDOM"),
b.async="false",b.loadXML(c));f=b.documentElement;(!f||!f.nodeName||f.nodeName==="parsererror")&&k.error("Invalid XML: "+c);return b},noop:function(){},globalEval:function(c){c&&h.test(c)&&(a.execScript||function(c){a.eval.call(a,c)})(c)},camelCase:function(c){return c.replace(hb,w)},nodeName:function(c,a){return c.nodeName&&c.nodeName.toUpperCase()===a.toUpperCase()},each:function(c,a,f){var o,d=0,l=c.length,e=l===b||k.isFunction(c);if(f)if(e)for(o in c){if(a.apply(c[o],f)===!1)break}else for(;d<
l;){if(a.apply(c[d++],f)===!1)break}else if(e)for(o in c){if(a.call(c[o],o,c[o])===!1)break}else for(;d<l;)if(a.call(c[d],d,c[d++])===!1)break;return c},trim:ya?function(c){return c==null?"":ya.call(c)}:function(c){return c==null?"":(c+"").replace(S,"").replace(i,"")},makeArray:function(c,a){var b=a||[];if(c!=null){var f=k.type(c);c.length==null||f==="string"||f==="function"||f==="regexp"||k.isWindow(c)?na.call(b,c):k.merge(b,c)}return b},inArray:function(c,a){if(za)return za.call(a,c);for(var b=
0,k=a.length;b<k;b++)if(a[b]===c)return b;return-1},merge:function(c,a){var k=c.length,f=0;if(typeof a.length=="number")for(var o=a.length;f<o;f++)c[k++]=a[f];else for(;a[f]!==b;)c[k++]=a[f++];c.length=k;return c},grep:function(c,a,b){for(var k=[],f,b=!!b,o=0,d=c.length;o<d;o++)f=!!a(c[o],o),b!==f&&k.push(c[o]);return k},map:function(c,a,f){var o,d,l=[],e=0,z=c.length;if(c instanceof k||z!==b&&typeof z=="number"&&(z>0&&c[0]&&c[z-1]||z===0||k.isArray(c)))for(;e<z;e++)o=a(c[e],e,f),o!=null&&(l[l.length]=
o);else for(d in c)o=a(c[d],d,f),o!=null&&(l[l.length]=o);return l.concat.apply([],l)},guid:1,proxy:function(c,a){if(typeof a=="string")var f=c[a],a=c,c=f;if(!k.isFunction(c))return b;var o=ba.call(arguments,2),f=function(){return c.apply(a,o.concat(ba.call(arguments)))};f.guid=c.guid=c.guid||f.guid||k.guid++;return f},access:function(c,a,f,o,d,l){var e=c.length;if(typeof a=="object"){for(var z in a)k.access(c,z,a[z],o,d,f);return c}if(f!==b){o=!l&&o&&k.isFunction(f);for(z=0;z<e;z++)d(c[z],a,o?f.call(c[z],
z,d(c[z],a)):f,l);return c}return e?d(c[0],a):b},now:function(){return(new Date).getTime()},uaMatch:function(c){c=c.toLowerCase();c=T.exec(c)||t.exec(c)||F.exec(c)||c.indexOf("compatible")<0&&x.exec(c)||[];return{browser:c[1]||"",version:c[2]||"0"}},sub:function(){function c(a,b){return new c.fn.init(a,b)}k.extend(!0,c,this);c.superclass=this;c.fn=c.prototype=this();c.fn.constructor=c;c.sub=this.sub;c.fn.init=function(b,f){f&&f instanceof k&&!(f instanceof c)&&(f=c(f));return k.fn.init.call(this,
b,f,a)};c.fn.init.prototype=c.fn;var a=c(m);return c},browser:{}});k.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(c,a){D["[object "+a+"]"]=a.toLowerCase()});aa=k.uaMatch(aa);aa.browser&&(k.browser[aa.browser]=!0,k.browser.version=aa.version);k.browser.webkit&&(k.browser.safari=!0);h.test(" ")&&(S=/^[\s\xA0]+/,i=/[\s\xA0]+$/);e=k(m);m.addEventListener?X=function(){m.removeEventListener("DOMContentLoaded",X,!1);k.ready()}:m.attachEvent&&(X=function(){m.readyState===
"complete"&&(m.detachEvent("onreadystatechange",X),k.ready())});return k}(),oa="done fail isResolved isRejected promise then always pipe".split(" "),Aa=[].slice;f.extend({_Deferred:function(){var c=[],a,b,d,e={done:function(){if(!d){var b=arguments,o,g,h,i,j;a&&(j=a,a=0);o=0;for(g=b.length;o<g;o++)h=b[o],i=f.type(h),i==="array"?e.done.apply(e,h):i==="function"&&c.push(h);j&&e.resolveWith(j[0],j[1])}return this},resolveWith:function(f,e){if(!d&&!a&&!b){e=e||[];b=1;try{for(;c[0];)c.shift().apply(f,
e)}finally{a=[f,e],b=0}}return this},resolve:function(){e.resolveWith(this,arguments);return this},isResolved:function(){return!!b||!!a},cancel:function(){d=1;c=[];return this}};return e},Deferred:function(c){var a=f._Deferred(),b=f._Deferred(),d;f.extend(a,{then:function(c,b){a.done(c).fail(b);return this},always:function(){return a.done.apply(a,arguments).fail.apply(this,arguments)},fail:b.done,rejectWith:b.resolveWith,reject:b.resolve,isRejected:b.isResolved,pipe:function(c,b){return f.Deferred(function(o){f.each({done:[c,
"resolve"],fail:[b,"reject"]},function(c,b){var d=b[0],l=b[1],e;f.isFunction(d)?a[c](function(){(e=d.apply(this,arguments))&&f.isFunction(e.promise)?e.promise().then(o.resolve,o.reject):o[l](e)}):a[c](o[l])})}).promise()},promise:function(c){if(c==null){if(d)return d;d=c={}}for(var b=oa.length;b--;)c[oa[b]]=a[oa[b]];return c}});a.done(b.cancel).fail(a.cancel);delete a.cancel;c&&c.call(a,a);return a},when:function(c){function a(c){return function(a){b[c]=arguments.length>1?Aa.call(arguments,0):a;--g||
h.resolveWith(h,Aa.call(b,0))}}var b=arguments,d=0,e=b.length,g=e,h=e<=1&&c&&f.isFunction(c.promise)?c:f.Deferred();if(e>1){for(;d<e;d++)b[d]&&f.isFunction(b[d].promise)?b[d].promise().then(a(d),h.reject):--g;g||h.resolveWith(h,b)}else h!==c&&h.resolveWith(h,e?[c]:[]);return h.promise()}});f.support=function(){var c=m.createElement("div"),a=m.documentElement,b,d,e,g,h,i,q;c.setAttribute("className","t");c.innerHTML="   <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>";
b=c.getElementsByTagName("*");d=c.getElementsByTagName("a")[0];if(!b||!b.length||!d)return{};e=m.createElement("select");g=e.appendChild(m.createElement("option"));b=c.getElementsByTagName("input")[0];i={leadingWhitespace:c.firstChild.nodeType===3,tbody:!c.getElementsByTagName("tbody").length,htmlSerialize:!!c.getElementsByTagName("link").length,style:/top/.test(d.getAttribute("style")),hrefNormalized:d.getAttribute("href")==="/a",opacity:/^0.55$/.test(d.style.opacity),cssFloat:!!d.style.cssFloat,
checkOn:b.value==="on",optSelected:g.selected,getSetAttribute:c.className!=="t",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0};b.checked=!0;i.noCloneChecked=b.cloneNode(!0).checked;e.disabled=!0;i.optDisabled=!g.disabled;try{delete c.test}catch(r){i.deleteExpando=!1}!c.addEventListener&&c.attachEvent&&c.fireEvent&&(c.attachEvent("onclick",function(){i.noCloneEvent=!1}),c.cloneNode(!0).fireEvent("onclick"));
b=m.createElement("input");b.value="t";b.setAttribute("type","radio");i.radioValue=b.value==="t";b.setAttribute("checked","checked");c.appendChild(b);d=m.createDocumentFragment();d.appendChild(c.firstChild);i.checkClone=d.cloneNode(!0).cloneNode(!0).lastChild.checked;c.innerHTML="";c.style.width=c.style.paddingLeft="1px";e=m.getElementsByTagName("body")[0];d=m.createElement(e?"div":"body");g={visibility:"hidden",width:0,height:0,border:0,margin:0};e&&f.extend(g,{position:"absolute",left:-1E3,top:-1E3});
for(q in g)d.style[q]=g[q];d.appendChild(c);a=e||a;a.insertBefore(d,a.firstChild);i.appendChecked=b.checked;i.boxModel=c.offsetWidth===2;"zoom"in c.style&&(c.style.display="inline",c.style.zoom=1,i.inlineBlockNeedsLayout=c.offsetWidth===2,c.style.display="",c.innerHTML="<div style='width:4px;'></div>",i.shrinkWrapBlocks=c.offsetWidth!==2);c.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>";e=c.getElementsByTagName("td");b=e[0].offsetHeight===0;e[0].style.display=
"";e[1].style.display="none";i.reliableHiddenOffsets=b&&e[0].offsetHeight===0;c.innerHTML="";m.defaultView&&m.defaultView.getComputedStyle&&(h=m.createElement("div"),h.style.width="0",h.style.marginRight="0",c.appendChild(h),i.reliableMarginRight=(parseInt((m.defaultView.getComputedStyle(h,null)||{marginRight:0}).marginRight,10)||0)===0);d.innerHTML="";a.removeChild(d);if(c.attachEvent)for(q in{submit:1,change:1,focusin:1})h="on"+q,(b=h in c)||(c.setAttribute(h,"return;"),b=typeof c[h]=="function"),
i[q+"Bubbles"]=b;d=d=e=g=e=h=c=b=null;return i}();f.boxModel=f.support.boxModel;var eb=/^(?:\{.*\}|\[.*\])$/,db=/([a-z])([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(c){c=c.nodeType?f.cache[c[f.expando]]:c[f.expando];return!!c&&!la(c)},data:function(c,a,d,l){if(f.acceptData(c)){var e=f.expando,g=typeof a=="string",h=c.nodeType,i=h?f.cache:c,q=h?c[f.expando]:
c[f.expando]&&f.expando;if(q&&(!l||!q||i[q][e])||!(g&&d===b)){q||(h?c[f.expando]=q=++f.uuid:q=f.expando);i[q]||(i[q]={},h||(i[q].toJSON=f.noop));if(typeof a=="object"||typeof a=="function")l?i[q][e]=f.extend(i[q][e],a):i[q]=f.extend(i[q],a);c=i[q];l&&(c[e]||(c[e]={}),c=c[e]);d!==b&&(c[f.camelCase(a)]=d);if(a==="events"&&!c[a])return c[e]&&c[e].events;return g?c[f.camelCase(a)]||c[a]:c}}},removeData:function(c,b,d){if(f.acceptData(c)){var l=f.expando,e=c.nodeType,g=e?f.cache:c,h=e?c[f.expando]:f.expando;
if(g[h]){if(b){var i=d?g[h][l]:g[h];if(i&&(delete i[b],!la(i)))return}if(d&&(delete g[h][l],!la(g[h])))return;b=g[h][l];f.support.deleteExpando||g!=a?delete g[h]:g[h]=null;b?(g[h]={},e||(g[h].toJSON=f.noop),g[h][l]=b):e&&(f.support.deleteExpando?delete c[f.expando]:c.removeAttribute?c.removeAttribute(f.expando):c[f.expando]=null)}}},_data:function(c,a,b){return f.data(c,a,b,!0)},acceptData:function(c){if(c.nodeName){var a=f.noData[c.nodeName.toLowerCase()];if(a)return a!==!0&&c.getAttribute("classid")===
a}return!0}});f.fn.extend({data:function(c,a){var d=null;if(typeof c=="undefined"){if(this.length&&(d=f.data(this[0]),this[0].nodeType===1))for(var l=this[0].attributes,e,g=0,h=l.length;g<h;g++)e=l[g].name,e.indexOf("data-")===0&&(e=f.camelCase(e.substring(5)),Q(this[0],e,d[e]));return d}if(typeof c=="object")return this.each(function(){f.data(this,c)});var i=c.split(".");i[1]=i[1]?"."+i[1]:"";if(a===b)return d=this.triggerHandler("getData"+i[1]+"!",[i[0]]),d===b&&this.length&&(d=f.data(this[0],c),
d=Q(this[0],c,d)),d===b&&i[1]?this.data(i[0]):d;return this.each(function(){var b=f(this),d=[i[0],a];b.triggerHandler("setData"+i[1]+"!",d);f.data(this,c,a);b.triggerHandler("changeData"+i[1]+"!",d)})},removeData:function(c){return this.each(function(){f.removeData(this,c)})}});f.extend({_mark:function(c,a){c&&(a=(a||"fx")+"mark",f.data(c,a,(f.data(c,a,b,!0)||0)+1,!0))},_unmark:function(c,a,d){c!==!0&&(d=a,a=c,c=!1);if(a){var d=d||"fx",l=d+"mark";(c=c?0:(f.data(a,l,b,!0)||1)-1)?f.data(a,l,c,!0):(f.removeData(a,
l,!0),xa(a,d,"mark"))}},queue:function(c,a,d){if(c){var a=(a||"fx")+"queue",l=f.data(c,a,b,!0);d&&(!l||f.isArray(d)?l=f.data(c,a,f.makeArray(d),!0):l.push(d));return l||[]}},dequeue:function(c,a){var a=a||"fx",b=f.queue(c,a),d=b.shift();d==="inprogress"&&(d=b.shift());d&&(a==="fx"&&b.unshift("inprogress"),d.call(c,function(){f.dequeue(c,a)}));b.length||(f.removeData(c,a+"queue",!0),xa(c,a,"queue"))}});f.fn.extend({queue:function(c,a){typeof c!="string"&&(a=c,c="fx");if(a===b)return f.queue(this[0],
c);return this.each(function(){var b=f.queue(this,c,a);c==="fx"&&b[0]!=="inprogress"&&f.dequeue(this,c)})},dequeue:function(c){return this.each(function(){f.dequeue(this,c)})},delay:function(c,a){c=f.fx?f.fx.speeds[c]||c:c;a=a||"fx";return this.queue(a,function(){var b=this;setTimeout(function(){f.dequeue(b,a)},c)})},clearQueue:function(c){return this.queue(c||"fx",[])},promise:function(c){function a(){--g||d.resolveWith(l,[l])}typeof c!="string"&&(c=b);var c=c||"fx",d=f.Deferred(),l=this,e=l.length,
g=1,h=c+"defer",i=c+"queue";c+="mark";for(var q;e--;)if(q=f.data(l[e],h,b,!0)||(f.data(l[e],i,b,!0)||f.data(l[e],c,b,!0))&&f.data(l[e],h,f._Deferred(),!0))g++,q.done(a);a();return d.promise()}});var Ba=/[\n\t\r]/g,pa=/\s+/,jb=/\r/g,kb=/^(?:button|input)$/i,lb=/^(?:button|input|object|select|textarea)$/i,mb=/^a(?:rea)?$/i,Ca=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,nb=/\:|^on/,P,Da;f.fn.extend({attr:function(c,a){return f.access(this,
c,a,!0,f.attr)},removeAttr:function(c){return this.each(function(){f.removeAttr(this,c)})},prop:function(c,a){return f.access(this,c,a,!0,f.prop)},removeProp:function(c){c=f.propFix[c]||c;return this.each(function(){try{this[c]=b,delete this[c]}catch(a){}})},addClass:function(c){var a,b,d,e,g,h,i;if(f.isFunction(c))return this.each(function(a){f(this).addClass(c.call(this,a,this.className))});if(c&&typeof c=="string"){a=c.split(pa);b=0;for(d=this.length;b<d;b++)if(e=this[b],e.nodeType===1)if(!e.className&&
a.length===1)e.className=c;else{g=" "+e.className+" ";h=0;for(i=a.length;h<i;h++)~g.indexOf(" "+a[h]+" ")||(g+=a[h]+" ");e.className=f.trim(g)}}return this},removeClass:function(c){var a,d,e,g,h,i,S;if(f.isFunction(c))return this.each(function(a){f(this).removeClass(c.call(this,a,this.className))});if(c&&typeof c=="string"||c===b){a=(c||"").split(pa);d=0;for(e=this.length;d<e;d++)if(g=this[d],g.nodeType===1&&g.className)if(c){h=(" "+g.className+" ").replace(Ba," ");i=0;for(S=a.length;i<S;i++)h=h.replace(" "+
a[i]+" "," ");g.className=f.trim(h)}else g.className=""}return this},toggleClass:function(c,a){var b=typeof c,d=typeof a=="boolean";if(f.isFunction(c))return this.each(function(b){f(this).toggleClass(c.call(this,b,this.className,a),a)});return this.each(function(){if(b==="string")for(var e,g=0,h=f(this),i=a,q=c.split(pa);e=q[g++];)i=d?i:!h.hasClass(e),h[i?"addClass":"removeClass"](e);else if(b==="undefined"||b==="boolean")this.className&&f._data(this,"__className__",this.className),this.className=
this.className||c===!1?"":f._data(this,"__className__")||""})},hasClass:function(c){for(var c=" "+c+" ",a=0,b=this.length;a<b;a++)if((" "+this[a].className+" ").replace(Ba," ").indexOf(c)>-1)return!0;return!1},val:function(c){var a,d,e=this[0];if(!arguments.length){if(e){if((a=f.valHooks[e.nodeName.toLowerCase()]||f.valHooks[e.type])&&"get"in a&&(d=a.get(e,"value"))!==b)return d;d=e.value;return typeof d=="string"?d.replace(jb,""):d==null?"":d}return b}var g=f.isFunction(c);return this.each(function(d){var o=
f(this),e;if(this.nodeType===1&&(g?e=c.call(this,d,o.val()):e=c,e==null?e="":typeof e=="number"?e+="":f.isArray(e)&&(e=f.map(e,function(c){return c==null?"":c+""})),a=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type],!a||!("set"in a)||a.set(this,e,"value")===b))this.value=e})}});f.extend({valHooks:{option:{get:function(c){var a=c.attributes.value;return!a||a.specified?c.value:c.text}},select:{get:function(c){var a,b=c.selectedIndex,d=[],e=c.options,c=c.type==="select-one";if(b<0)return null;
for(var g=c?b:0,h=c?b+1:e.length;g<h;g++)if(a=e[g],a.selected&&(f.support.optDisabled?!a.disabled:a.getAttribute("disabled")===null)&&(!a.parentNode.disabled||!f.nodeName(a.parentNode,"optgroup"))){a=f(a).val();if(c)return a;d.push(a)}if(c&&!d.length&&e.length)return f(e[b]).val();return d},set:function(c,a){var b=f.makeArray(a);f(c).find("option").each(function(){this.selected=f.inArray(f(this).val(),b)>=0});b.length||(c.selectedIndex=-1);return b}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,
width:!0,height:!0,offset:!0},attrFix:{tabindex:"tabIndex"},attr:function(c,a,d,e){var g=c.nodeType;if(!c||g===3||g===8||g===2)return b;if(e&&a in f.attrFn)return f(c)[a](d);if(!("getAttribute"in c))return f.prop(c,a,d);var h,i;(e=g!==1||!f.isXMLDoc(c))&&(a=f.attrFix[a]||a,i=f.attrHooks[a],i||(Ca.test(a)?i=Da:P&&a!=="className"&&(f.nodeName(c,"form")||nb.test(a))&&(i=P)));if(d!==b){if(d===null)return f.removeAttr(c,a),b;if(i&&"set"in i&&e&&(h=i.set(c,d,a))!==b)return h;c.setAttribute(a,""+d);return d}if(i&&
"get"in i&&e&&(h=i.get(c,a))!==null)return h;h=c.getAttribute(a);return h===null?b:h},removeAttr:function(c,a){var b;c.nodeType===1&&(a=f.attrFix[a]||a,f.support.getSetAttribute?c.removeAttribute(a):(f.attr(c,a,""),c.removeAttributeNode(c.getAttributeNode(a))),Ca.test(a)&&(b=f.propFix[a]||a)in c&&(c[b]=!1))},attrHooks:{type:{set:function(c,a){if(kb.test(c.nodeName)&&c.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&a==="radio"&&f.nodeName(c,"input")){var b=c.value;
c.setAttribute("type",a);b&&(c.value=b);return a}}},tabIndex:{get:function(c){var a=c.getAttributeNode("tabIndex");return a&&a.specified?parseInt(a.value,10):lb.test(c.nodeName)||mb.test(c.nodeName)&&c.href?0:b}},value:{get:function(c,a){if(P&&f.nodeName(c,"button"))return P.get(c,a);return a in c?c.value:null},set:function(c,a,b){if(P&&f.nodeName(c,"button"))return P.set(c,a,b);c.value=a}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",
cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(c,a,d){var e=c.nodeType;if(!c||e===3||e===8||e===2)return b;var g,h;(e!==1||!f.isXMLDoc(c))&&(a=f.propFix[a]||a,h=f.propHooks[a]);return d!==b?h&&"set"in h&&(g=h.set(c,d,a))!==b?g:c[a]=d:h&&"get"in h&&(g=h.get(c,a))!==b?g:c[a]},propHooks:{}});Da={get:function(c,a){return f.prop(c,a)?a.toLowerCase():b},set:function(c,a,b){var d;
a===!1?f.removeAttr(c,b):(d=f.propFix[b]||b,d in c&&(c[d]=!0),c.setAttribute(b,b.toLowerCase()));return b}};f.support.getSetAttribute||(f.attrFix=f.propFix,P=f.attrHooks.name=f.attrHooks.title=f.valHooks.button={get:function(c,a){var f;return(f=c.getAttributeNode(a))&&f.nodeValue!==""?f.nodeValue:b},set:function(c,a,b){if(c=c.getAttributeNode(b))return c.nodeValue=a}},f.each(["width","height"],function(c,a){f.attrHooks[a]=f.extend(f.attrHooks[a],{set:function(c,b){if(b==="")return c.setAttribute(a,
"auto"),b}})}));f.support.hrefNormalized||f.each(["href","src","width","height"],function(c,a){f.attrHooks[a]=f.extend(f.attrHooks[a],{get:function(c){c=c.getAttribute(a,2);return c===null?b:c}})});f.support.style||(f.attrHooks.style={get:function(c){return c.style.cssText.toLowerCase()||b},set:function(c,a){return c.style.cssText=""+a}});f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(){}}));f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]=
{get:function(c){return c.getAttribute("value")===null?"on":c.value}}});f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(c,a){if(f.isArray(a))return c.checked=f.inArray(f(c).val(),a)>=0}})});var ka=/\.(.*)$/,qa=/^(?:textarea|input|select)$/i,ab=/\./g,bb=/ /g,ob=/[^\w\s.|`]/g,pb=function(c){return c.replace(ob,"\\$&")};f.event={add:function(c,a,d,e){if(c.nodeType!==3&&c.nodeType!==8){if(d===!1)d=L;else if(!d)return;var g,h;d.handler&&(g=d,d=g.handler);
d.guid||(d.guid=f.guid++);if(h=f._data(c)){var i=h.events,j=h.handle;i||(h.events=i={});j||(h.handle=j=function(c){return typeof f!="undefined"&&(!c||f.event.triggered!==c.type)?f.event.handle.apply(j.elem,arguments):b});j.elem=c;for(var a=a.split(" "),q,r=0,n;q=a[r++];){h=g?f.extend({},g):{handler:d,data:e};q.indexOf(".")>-1?(n=q.split("."),q=n.shift(),h.namespace=n.slice(0).sort().join(".")):(n=[],h.namespace="");h.type=q;h.guid||(h.guid=d.guid);var m=i[q],p=f.event.special[q]||{};if(!m&&(m=i[q]=
[],!p.setup||p.setup.call(c,e,n,j)===!1))c.addEventListener?c.addEventListener(q,j,!1):c.attachEvent&&c.attachEvent("on"+q,j);p.add&&(p.add.call(c,h),h.handler.guid||(h.handler.guid=d.guid));m.push(h);f.event.global[q]=!0}c=null}}},global:{},remove:function(c,a,d,e){if(c.nodeType!==3&&c.nodeType!==8){d===!1&&(d=L);var g,h,i=0,j,q,r,n,m,p,u=f.hasData(c)&&f._data(c),v=u&&u.events;if(u&&v)if(a&&a.type&&(d=a.handler,a=a.type),!a||typeof a=="string"&&a.charAt(0)===".")for(g in a=a||"",v)f.event.remove(c,
g+a);else{for(a=a.split(" ");g=a[i++];)if(n=g,j=g.indexOf(".")<0,q=[],j||(q=g.split("."),g=q.shift(),r=RegExp("(^|\\.)"+f.map(q.slice(0).sort(),pb).join("\\.(?:.*\\.)?")+"(\\.|$)")),m=v[g])if(d){n=f.event.special[g]||{};for(h=e||0;h<m.length;h++)if(p=m[h],d.guid===p.guid){if(j||r.test(p.namespace))e==null&&m.splice(h--,1),n.remove&&n.remove.call(c,p);if(e!=null)break}if(m.length===0||e!=null&&m.length===1)(!n.teardown||n.teardown.call(c,q)===!1)&&f.removeEvent(c,g,u.handle),delete v[g]}else for(h=
0;h<m.length;h++)if(p=m[h],j||r.test(p.namespace))f.event.remove(c,n,p.handler,h),m.splice(h--,1);if(f.isEmptyObject(v))(a=u.handle)&&(a.elem=null),delete u.events,delete u.handle,f.isEmptyObject(u)&&f.removeData(c,b,!0)}}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,e,g){var h=c.type||c,i=[],B;h.indexOf("!")>=0&&(h=h.slice(0,-1),B=!0);h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if(e&&!f.event.customEvent[h]||f.event.global[h]){c=typeof c=="object"?c[f.expando]?
c:new f.Event(h,c):new f.Event(h);c.type=h;c.exclusive=B;c.namespace=i.join(".");c.namespace_re=RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)");if(g||!e)c.preventDefault(),c.stopPropagation();if(e){if(!(e.nodeType===3||e.nodeType===8)){c.result=b;c.target=e;d=d!=null?f.makeArray(d):[];d.unshift(c);i=e;g=h.indexOf(":")<0?"on"+h:"";do B=f._data(i,"handle"),c.currentTarget=i,B&&B.apply(i,d),g&&f.acceptData(i)&&i[g]&&i[g].apply(i,d)===!1&&(c.result=!1,c.preventDefault()),i=i.parentNode||i.ownerDocument||
i===c.target.ownerDocument&&a;while(i&&!c.isPropagationStopped());if(!c.isDefaultPrevented()){var j,i=f.event.special[h]||{};if((!i._default||i._default.call(e.ownerDocument,c)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)){try{g&&e[h]&&(j=e[g],j&&(e[g]=null),f.event.triggered=h,e[h]())}catch(q){}j&&(e[g]=j);f.event.triggered=b}}return c.result}}else f.each(f.cache,function(){var a=this[f.expando];a&&a.events&&a.events[h]&&f.event.trigger(c,d,a.handle.elem)})}},handle:function(c){var c=
f.event.fix(c||a.event),d=((f._data(this,"events")||{})[c.type]||[]).slice(0),e=!c.exclusive&&!c.namespace,g=Array.prototype.slice.call(arguments,0);g[0]=c;c.currentTarget=this;for(var h=0,i=d.length;h<i;h++){var B=d[h];if(e||c.namespace_re.test(B.namespace))if(c.handler=B.handler,c.data=B.data,c.handleObj=B,B=B.handler.apply(this,g),B!==b&&(c.result=B,B===!1&&(c.preventDefault(),c.stopPropagation())),c.isImmediatePropagationStopped())break}return c.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),
fix:function(c){if(c[f.expando])return c;for(var a=c,c=f.Event(a),d=this.props.length,e;d;)e=this.props[--d],c[e]=a[e];c.target||(c.target=c.srcElement||m);c.target.nodeType===3&&(c.target=c.target.parentNode);!c.relatedTarget&&c.fromElement&&(c.relatedTarget=c.fromElement===c.target?c.toElement:c.fromElement);if(c.pageX==null&&c.clientX!=null)d=c.target.ownerDocument||m,a=d.documentElement,d=d.body,c.pageX=c.clientX+(a&&a.scrollLeft||d&&d.scrollLeft||0)-(a&&a.clientLeft||d&&d.clientLeft||0),c.pageY=
c.clientY+(a&&a.scrollTop||d&&d.scrollTop||0)-(a&&a.clientTop||d&&d.clientTop||0);c.which==null&&(c.charCode!=null||c.keyCode!=null)&&(c.which=c.charCode!=null?c.charCode:c.keyCode);!c.metaKey&&c.ctrlKey&&(c.metaKey=c.ctrlKey);!c.which&&c.button!==b&&(c.which=c.button&1?1:c.button&2?3:c.button&4?2:0);return c},guid:1E8,proxy:f.proxy,special:{ready:{setup:f.bindReady,teardown:f.noop},live:{add:function(c){f.event.add(this,A(c.origType,c.selector),f.extend({},c,{handler:T,guid:c.handler.guid}))},remove:function(c){f.event.remove(this,
A(c.origType,c.selector),c)}},beforeunload:{setup:function(c,a,b){f.isWindow(this)&&(this.onbeforeunload=b)},teardown:function(c,a){this.onbeforeunload===a&&(this.onbeforeunload=null)}}}};f.removeEvent=m.removeEventListener?function(c,a,b){c.removeEventListener&&c.removeEventListener(a,b,!1)}:function(c,a,b){c.detachEvent&&c.detachEvent("on"+a,b)};f.Event=function(c,a){if(!this.preventDefault)return new f.Event(c,a);c&&c.type?(this.originalEvent=c,this.type=c.type,this.isDefaultPrevented=c.defaultPrevented||
c.returnValue===!1||c.getPreventDefault&&c.getPreventDefault()?F:L):this.type=c;a&&f.extend(this,a);this.timeStamp=f.now();this[f.expando]=!0};f.Event.prototype={preventDefault:function(){this.isDefaultPrevented=F;var c=this.originalEvent;!c||(c.preventDefault?c.preventDefault():c.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=F;var c=this.originalEvent;!c||(c.stopPropagation&&c.stopPropagation(),c.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=
F;this.stopPropagation()},isDefaultPrevented:L,isPropagationStopped:L,isImmediatePropagationStopped:L};var Ea=function(c){var a=c.relatedTarget,b=!1,d=c.type;c.type=c.data;a!==this&&(a&&(b=f.contains(this,a)),b||(f.event.handle.apply(this,arguments),c.type=d))},Fa=function(c){c.type=c.data;f.event.handle.apply(this,arguments)};f.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(c,a){f.event.special[c]={setup:function(b){f.event.add(this,a,b&&b.selector?Fa:Ea,c)},teardown:function(c){f.event.remove(this,
a,c&&c.selector?Fa:Ea)}}});f.support.submitBubbles||(f.event.special.submit={setup:function(){if(f.nodeName(this,"form"))return!1;else f.event.add(this,"click.specialSubmit",function(c){var a=c.target,b=a.type;(b==="submit"||b==="image")&&f(a).closest("form").length&&N("submit",this,arguments)}),f.event.add(this,"keypress.specialSubmit",function(c){var a=c.target,b=a.type;(b==="text"||b==="password")&&f(a).closest("form").length&&c.keyCode===13&&N("submit",this,arguments)})},teardown:function(){f.event.remove(this,
".specialSubmit")}});if(!f.support.changeBubbles){var ca,Ga=function(c){var a=c.type,b=c.value;a==="radio"||a==="checkbox"?b=c.checked:a==="select-multiple"?b=c.selectedIndex>-1?f.map(c.options,function(c){return c.selected}).join("-"):"":f.nodeName(c,"select")&&(b=c.selectedIndex);return b},fa=function(c,a){var d=c.target,e,h;if(qa.test(d.nodeName)&&!d.readOnly&&(e=f._data(d,"_change_data"),h=Ga(d),(c.type!=="focusout"||d.type!=="radio")&&f._data(d,"_change_data",h),!(e===b||h===e)))if(e!=null||
h)c.type="change",c.liveFired=b,f.event.trigger(c,a,d)};f.event.special.change={filters:{focusout:fa,beforedeactivate:fa,click:function(c){var a=c.target,b=f.nodeName(a,"input")?a.type:"";(b==="radio"||b==="checkbox"||f.nodeName(a,"select"))&&fa.call(this,c)},keydown:function(c){var a=c.target,b=f.nodeName(a,"input")?a.type:"";(c.keyCode===13&&!f.nodeName(a,"textarea")||c.keyCode===32&&(b==="checkbox"||b==="radio")||b==="select-multiple")&&fa.call(this,c)},beforeactivate:function(c){c=c.target;f._data(c,
"_change_data",Ga(c))}},setup:function(){if(this.type==="file")return!1;for(var c in ca)f.event.add(this,c+".specialChange",ca[c]);return qa.test(this.nodeName)},teardown:function(){f.event.remove(this,".specialChange");return qa.test(this.nodeName)}};ca=f.event.special.change.filters;ca.focus=ca.beforeactivate}f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(c,a){function b(c){var d=f.event.fix(c);d.type=a;d.originalEvent={};f.event.trigger(d,null,d.target);d.isDefaultPrevented()&&
c.preventDefault()}var d=0;f.event.special[a]={setup:function(){d++===0&&m.addEventListener(c,b,!0)},teardown:function(){--d===0&&m.removeEventListener(c,b,!0)}}});f.each(["bind","one"],function(c,a){f.fn[a]=function(c,d,e){var h;if(typeof c=="object"){for(var g in c)this[a](g,d,c[g],e);return this}if(arguments.length===2||d===!1)e=d,d=b;a==="one"?(h=function(c){f(this).unbind(c,h);return e.apply(this,arguments)},h.guid=e.guid||f.guid++):h=e;if(c==="unload"&&a!=="one")this.one(c,d,e);else{g=0;for(var i=
this.length;g<i;g++)f.event.add(this[g],c,h,d)}return this}});f.fn.extend({unbind:function(c,a){if(typeof c=="object"&&!c.preventDefault)for(var b in c)this.unbind(b,c[b]);else{b=0;for(var d=this.length;b<d;b++)f.event.remove(this[b],c,a)}return this},delegate:function(c,a,b,f){return this.live(a,b,f,c)},undelegate:function(c,a,b){return arguments.length===0?this.unbind("live"):this.die(a,null,b,c)},trigger:function(c,a){return this.each(function(){f.event.trigger(c,a,this)})},triggerHandler:function(c,
a){if(this[0])return f.event.trigger(c,a,this[0],!0)},toggle:function(c){var a=arguments,b=c.guid||f.guid++,d=0,e=function(b){var e=(f.data(this,"lastToggle"+c.guid)||0)%d;f.data(this,"lastToggle"+c.guid,e+1);b.preventDefault();return a[e].apply(this,arguments)||!1};for(e.guid=b;d<a.length;)a[d++].guid=b;return this.click(e)},hover:function(c,a){return this.mouseenter(c).mouseleave(a||c)}});var ra={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};f.each(["live","die"],
function(c,a){f.fn[a]=function(c,d,e,h){var g=0,i,j,n=h||this.selector,m=h?this:f(this.context);if(typeof c=="object"&&!c.preventDefault){for(i in c)m[a](i,d,c[i],n);return this}if(a==="die"&&!c&&h&&h.charAt(0)===".")return m.unbind(h),this;if(d===!1||f.isFunction(d))e=d||L,d=b;for(c=(c||"").split(" ");(h=c[g++])!=null;)if(i=ka.exec(h),j="",i&&(j=i[0],h=h.replace(ka,"")),h==="hover")c.push("mouseenter"+j,"mouseleave"+j);else if(i=h,ra[h]?(c.push(ra[h]+j),h+=j):h=(ra[h]||h)+j,a==="live"){j=0;for(var p=
m.length;j<p;j++)f.event.add(m[j],"live."+A(h,n),{data:d,selector:n,handler:e,origType:h,origHandler:e,preType:i})}else m.unbind("live."+A(h,n),e);return this}});f.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),function(c,a){f.fn[a]=function(c,b){b==null&&(b=c,c=null);return arguments.length>0?this.bind(a,c,b):this.trigger(a)};f.attrFn&&(f.attrFn[a]=
!0)});(function(){function c(c,a,b,f,d,e){for(var d=0,h=f.length;d<h;d++){var g=f[d];if(g){for(var k=!1,g=g[c];g;){if(g.sizcache===b){k=f[g.sizset];break}if(g.nodeType===1)if(e||(g.sizcache=b,g.sizset=d),typeof a!="string"){if(g===a){k=!0;break}}else if(r.filter(a,[g]).length>0){k=g;break}g=g[c]}f[d]=k}}}function a(c,b,f,d,e,h){for(var e=0,g=d.length;e<g;e++){var k=d[e];if(k){for(var l=!1,k=k[c];k;){if(k.sizcache===f){l=d[k.sizset];break}k.nodeType===1&&!h&&(k.sizcache=f,k.sizset=e);if(k.nodeName.toLowerCase()===
b){l=k;break}k=k[c]}d[e]=l}}}var d=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,e=0,h=Object.prototype.toString,g=!1,i=!0,j=/\\/g,n=/\W/;[0,0].sort(function(){i=!1;return 0});var r=function(c,a,b,f){var b=b||[],e=a=a||m;if(a.nodeType!==1&&a.nodeType!==9)return[];if(!c||typeof c!="string")return b;var g,k,l,i,j,V,B=!0,n=r.isXML(a),q=[],S=c;do if(d.exec(""),g=d.exec(S))if(S=g[3],q.push(g[1]),g[2]){i=g[3];break}while(g);
if(q.length>1&&p.exec(c))if(q.length===2&&s.relative[q[0]])k=x(q[0]+q[1],a);else for(k=s.relative[q[0]]?[a]:r(q.shift(),a);q.length;)c=q.shift(),s.relative[c]&&(c+=q.shift()),k=x(c,k);else if(!f&&q.length>1&&a.nodeType===9&&!n&&s.match.ID.test(q[0])&&!s.match.ID.test(q[q.length-1])&&(j=r.find(q.shift(),a,n),a=j.expr?r.filter(j.expr,j.set)[0]:j.set[0]),a){j=f?{expr:q.pop(),set:O(f)}:r.find(q.pop(),q.length===1&&(q[0]==="~"||q[0]==="+")&&a.parentNode?a.parentNode:a,n);k=j.expr?r.filter(j.expr,j.set):
j.set;for(q.length>0?l=O(k):B=!1;q.length;)g=V=q.pop(),s.relative[V]?g=q.pop():V="",g==null&&(g=a),s.relative[V](l,g,n)}else l=[];l||(l=k);l||r.error(V||c);if(h.call(l)==="[object Array]")if(B)if(a&&a.nodeType===1)for(c=0;l[c]!=null;c++)l[c]&&(l[c]===!0||l[c].nodeType===1&&r.contains(a,l[c]))&&b.push(k[c]);else for(c=0;l[c]!=null;c++)l[c]&&l[c].nodeType===1&&b.push(k[c]);else b.push.apply(b,l);else O(l,b);i&&(r(i,e,b,f),r.uniqueSort(b));return b};r.uniqueSort=function(c){if(t&&(g=i,c.sort(t),g))for(var a=
1;a<c.length;a++)c[a]===c[a-1]&&c.splice(a--,1);return c};r.matches=function(c,a){return r(c,null,null,a)};r.matchesSelector=function(c,a){return r(a,null,null,[c]).length>0};r.find=function(c,a,b){var f;if(!c)return[];for(var d=0,e=s.order.length;d<e;d++){var g,h=s.order[d];if(g=s.leftMatch[h].exec(c)){var k=g[1];g.splice(1,1);if(k.substr(k.length-1)!=="\\"&&(g[1]=(g[1]||"").replace(j,""),f=s.find[h](g,a,b),f!=null)){c=c.replace(s.match[h],"");break}}}f||(f=typeof a.getElementsByTagName!="undefined"?
a.getElementsByTagName("*"):[]);return{set:f,expr:c}};r.filter=function(c,a,f,d){for(var e,g,h=c,k=[],l=a,o=a&&a[0]&&r.isXML(a[0]);c&&a.length;){for(var i in s.filter)if((e=s.leftMatch[i].exec(c))!=null&&e[2]){var z,j,V=s.filter[i];j=e[1];g=!1;e.splice(1,1);if(j.substr(j.length-1)!=="\\"){l===k&&(k=[]);if(s.preFilter[i])if(e=s.preFilter[i](e,l,f,k,d,o)){if(e===!0)continue}else g=z=!0;if(e)for(var B=0;(j=l[B])!=null;B++)if(j){z=V(j,e,B,l);var q=d^!!z;f&&z!=null?q?g=!0:l[B]=!1:q&&(k.push(j),g=!0)}if(z!==
b){f||(l=k);c=c.replace(s.match[i],"");if(!g)return[];break}}}if(c===h)if(g==null)r.error(c);else break;h=c}return l};r.error=function(c){throw"Syntax error, unrecognized expression: "+c;};var s=r.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|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,
CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(c){return c.getAttribute("href")},type:function(c){return c.getAttribute("type")}},relative:{"+":function(c,a){var b=typeof a=="string",f=b&&!n.test(a),
b=b&&!f;f&&(a=a.toLowerCase());for(var f=0,d=c.length,e;f<d;f++)if(e=c[f]){for(;(e=e.previousSibling)&&e.nodeType!==1;);c[f]=b||e&&e.nodeName.toLowerCase()===a?e||!1:e===a}b&&r.filter(a,c,!0)},">":function(c,a){var b,f=typeof a=="string",d=0,e=c.length;if(f&&!n.test(a))for(a=a.toLowerCase();d<e;d++){if(b=c[d])b=b.parentNode,c[d]=b.nodeName.toLowerCase()===a?b:!1}else{for(;d<e;d++)(b=c[d])&&(c[d]=f?b.parentNode:b.parentNode===a);f&&r.filter(a,c,!0)}},"":function(b,f,d){var g,h=e++,o=c;typeof f=="string"&&
!n.test(f)&&(f=f.toLowerCase(),g=f,o=a);o("parentNode",f,h,b,g,d)},"~":function(b,f,d){var g,h=e++,o=c;typeof f=="string"&&!n.test(f)&&(f=f.toLowerCase(),g=f,o=a);o("previousSibling",f,h,b,g,d)}},find:{ID:function(c,a,b){if(typeof a.getElementById!="undefined"&&!b)return(c=a.getElementById(c[1]))&&c.parentNode?[c]:[]},NAME:function(c,a){if(typeof a.getElementsByName!="undefined"){for(var b=[],f=a.getElementsByName(c[1]),d=0,e=f.length;d<e;d++)f[d].getAttribute("name")===c[1]&&b.push(f[d]);return b.length===
0?null:b}},TAG:function(c,a){if(typeof a.getElementsByTagName!="undefined")return a.getElementsByTagName(c[1])}},preFilter:{CLASS:function(c,a,b,f,d,e){c=" "+c[1].replace(j,"")+" ";if(e)return c;for(var e=0,g;(g=a[e])!=null;e++)g&&(d^(g.className&&(" "+g.className+" ").replace(/[\t\n\r]/g," ").indexOf(c)>=0)?b||f.push(g):b&&(a[e]=!1));return!1},ID:function(c){return c[1].replace(j,"")},TAG:function(c){return c[1].replace(j,"").toLowerCase()},CHILD:function(c){if(c[1]==="nth"){c[2]||r.error(c[0]);
c[2]=c[2].replace(/^\+|\s*/g,"");var a=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(c[2]==="even"&&"2n"||c[2]==="odd"&&"2n+1"||!/\D/.test(c[2])&&"0n+"+c[2]||c[2]);c[2]=a[1]+(a[2]||1)-0;c[3]=a[3]-0}else c[2]&&r.error(c[0]);c[0]=e++;return c},ATTR:function(c,a,b,f,d,e){a=c[1]=c[1].replace(j,"");!e&&s.attrMap[a]&&(c[1]=s.attrMap[a]);c[4]=(c[4]||c[5]||"").replace(j,"");c[2]==="~="&&(c[4]=" "+c[4]+" ");return c},PSEUDO:function(c,a,b,f,e){if(c[1]==="not")if((d.exec(c[3])||"").length>1||/^\w/.test(c[3]))c[3]=r(c[3],
null,null,a);else return c=r.filter(c[3],a,b,1^e),b||f.push.apply(f,c),!1;else if(s.match.POS.test(c[0])||s.match.CHILD.test(c[0]))return!0;return c},POS:function(c){c.unshift(!0);return c}},filters:{enabled:function(c){return c.disabled===!1&&c.type!=="hidden"},disabled:function(c){return c.disabled===!0},checked:function(c){return c.checked===!0},selected:function(c){return c.selected===!0},parent:function(c){return!!c.firstChild},empty:function(c){return!c.firstChild},has:function(c,a,b){return!!r(b[3],
c).length},header:function(c){return/h\d/i.test(c.nodeName)},text:function(c){var a=c.getAttribute("type"),b=c.type;return c.nodeName.toLowerCase()==="input"&&"text"===b&&(a===b||a===null)},radio:function(c){return c.nodeName.toLowerCase()==="input"&&"radio"===c.type},checkbox:function(c){return c.nodeName.toLowerCase()==="input"&&"checkbox"===c.type},file:function(c){return c.nodeName.toLowerCase()==="input"&&"file"===c.type},password:function(c){return c.nodeName.toLowerCase()==="input"&&"password"===
c.type},submit:function(c){var a=c.nodeName.toLowerCase();return(a==="input"||a==="button")&&"submit"===c.type},image:function(c){return c.nodeName.toLowerCase()==="input"&&"image"===c.type},reset:function(c){var a=c.nodeName.toLowerCase();return(a==="input"||a==="button")&&"reset"===c.type},button:function(c){var a=c.nodeName.toLowerCase();return a==="input"&&"button"===c.type||a==="button"},input:function(c){return/input|select|textarea|button/i.test(c.nodeName)},focus:function(c){return c===c.ownerDocument.activeElement}},
setFilters:{first:function(c,a){return a===0},last:function(c,a,b,f){return a===f.length-1},even:function(c,a){return a%2===0},odd:function(c,a){return a%2===1},lt:function(c,a,b){return a<b[3]-0},gt:function(c,a,b){return a>b[3]-0},nth:function(c,a,b){return b[3]-0===a},eq:function(c,a,b){return b[3]-0===a}},filter:{PSEUDO:function(c,a,b,f){var d=a[1],e=s.filters[d];if(e)return e(c,b,a,f);if(d==="contains")return(c.textContent||c.innerText||r.getText([c])||"").indexOf(a[3])>=0;if(d==="not"){a=a[3];
b=0;for(f=a.length;b<f;b++)if(a[b]===c)return!1;return!0}r.error(d)},CHILD:function(c,a){var b=a[1],f=c;switch(b){case "only":case "first":for(;f=f.previousSibling;)if(f.nodeType===1)return!1;if(b==="first")return!0;f=c;case "last":for(;f=f.nextSibling;)if(f.nodeType===1)return!1;return!0;case "nth":var b=a[2],d=a[3];if(b===1&&d===0)return!0;var e=a[0],g=c.parentNode;if(g&&(g.sizcache!==e||!c.nodeIndex)){for(var h=0,f=g.firstChild;f;f=f.nextSibling)f.nodeType===1&&(f.nodeIndex=++h);g.sizcache=e}f=
c.nodeIndex-d;return b===0?f===0:f%b===0&&f/b>=0}},ID:function(c,a){return c.nodeType===1&&c.getAttribute("id")===a},TAG:function(c,a){return a==="*"&&c.nodeType===1||c.nodeName.toLowerCase()===a},CLASS:function(c,a){return(" "+(c.className||c.getAttribute("class"))+" ").indexOf(a)>-1},ATTR:function(c,a){var b=a[1],b=s.attrHandle[b]?s.attrHandle[b](c):c[b]!=null?c[b]:c.getAttribute(b),f=b+"",d=a[2],e=a[4];return b==null?d==="!=":d==="="?f===e:d==="*="?f.indexOf(e)>=0:d==="~="?(" "+f+" ").indexOf(e)>=
0:e?d==="!="?f!==e:d==="^="?f.indexOf(e)===0:d==="$="?f.substr(f.length-e.length)===e:d==="|="?f===e||f.substr(0,e.length+1)===e+"-":!1:f&&b!==!1},POS:function(c,a,b,f){var d=s.setFilters[a[2]];if(d)return d(c,b,a,f)}}},p=s.match.POS,u=function(c,a){return"\\"+(a-0+1)},v;for(v in s.match)s.match[v]=RegExp(s.match[v].source+/(?![^\[]*\])(?![^\(]*\))/.source),s.leftMatch[v]=RegExp(/(^(?:.|\r|\n)*?)/.source+s.match[v].source.replace(/\\(\d+)/g,u));var O=function(c,a){c=Array.prototype.slice.call(c,0);
if(a)return a.push.apply(a,c),a;return c};try{Array.prototype.slice.call(m.documentElement.childNodes,0)}catch(T){O=function(c,a){var b=0,f=a||[];if(h.call(c)==="[object Array]")Array.prototype.push.apply(f,c);else if(typeof c.length=="number")for(var d=c.length;b<d;b++)f.push(c[b]);else for(;c[b];b++)f.push(c[b]);return f}}var t,F;m.documentElement.compareDocumentPosition?t=function(c,a){if(c===a)return g=!0,0;if(!c.compareDocumentPosition||!a.compareDocumentPosition)return c.compareDocumentPosition?
-1:1;return c.compareDocumentPosition(a)&4?-1:1}:(t=function(c,a){if(c===a)return g=!0,0;if(c.sourceIndex&&a.sourceIndex)return c.sourceIndex-a.sourceIndex;var b,f,d=[],e=[];b=c.parentNode;f=a.parentNode;var h=b;if(b===f)return F(c,a);if(!b)return-1;if(!f)return 1;for(;h;)d.unshift(h),h=h.parentNode;for(h=f;h;)e.unshift(h),h=h.parentNode;b=d.length;f=e.length;for(h=0;h<b&&h<f;h++)if(d[h]!==e[h])return F(d[h],e[h]);return h===b?F(c,e[h],-1):F(d[h],a,1)},F=function(c,a,b){if(c===a)return b;for(c=c.nextSibling;c;){if(c===
a)return-1;c=c.nextSibling}return 1});r.getText=function(c){for(var a="",b,f=0;c[f];f++)b=c[f],b.nodeType===3||b.nodeType===4?a+=b.nodeValue:b.nodeType!==8&&(a+=r.getText(b.childNodes));return a};(function(){var c=m.createElement("div"),a="script"+(new Date).getTime(),f=m.documentElement;c.innerHTML="<a name='"+a+"'/>";f.insertBefore(c,f.firstChild);m.getElementById(a)&&(s.find.ID=function(c,a,f){if(typeof a.getElementById!="undefined"&&!f)return(a=a.getElementById(c[1]))?a.id===c[1]||typeof a.getAttributeNode!=
"undefined"&&a.getAttributeNode("id").nodeValue===c[1]?[a]:b:[]},s.filter.ID=function(c,a){var b=typeof c.getAttributeNode!="undefined"&&c.getAttributeNode("id");return c.nodeType===1&&b&&b.nodeValue===a});f.removeChild(c);f=c=null})();(function(){var c=m.createElement("div");c.appendChild(m.createComment(""));c.getElementsByTagName("*").length>0&&(s.find.TAG=function(c,a){var b=a.getElementsByTagName(c[1]);if(c[1]==="*"){for(var f=[],d=0;b[d];d++)b[d].nodeType===1&&f.push(b[d]);b=f}return b});c.innerHTML=
"<a href='#'></a>";c.firstChild&&typeof c.firstChild.getAttribute!="undefined"&&c.firstChild.getAttribute("href")!=="#"&&(s.attrHandle.href=function(c){return c.getAttribute("href",2)});c=null})();m.querySelectorAll&&function(){var c=r,a=m.createElement("div");a.innerHTML="<p class='TEST'></p>";if(!a.querySelectorAll||a.querySelectorAll(".TEST").length!==0){r=function(a,b,f,d){b=b||m;if(!d&&!r.isXML(b)){var e=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(a);if(e&&(b.nodeType===1||b.nodeType===9)){if(e[1])return O(b.getElementsByTagName(a),
f);if(e[2]&&s.find.CLASS&&b.getElementsByClassName)return O(b.getElementsByClassName(e[2]),f)}if(b.nodeType===9){if(a==="body"&&b.body)return O([b.body],f);if(e&&e[3]){var g=b.getElementById(e[3]);if(!g||!g.parentNode)return O([],f);if(g.id===e[3])return O([g],f)}try{return O(b.querySelectorAll(a),f)}catch(h){}}else if(b.nodeType===1&&b.nodeName.toLowerCase()!=="object"){var e=b,k=(g=b.getAttribute("id"))||"__sizzle__",l=b.parentNode,o=/^\s*[+~]/.test(a);g?k=k.replace(/'/g,"\\$&"):b.setAttribute("id",
k);o&&l&&(b=b.parentNode);try{if(!o||l)return O(b.querySelectorAll("[id='"+k+"'] "+a),f)}catch(i){}finally{g||e.removeAttribute("id")}}}return c(a,b,f,d)};for(var b in c)r[b]=c[b];a=null}}();(function(){var c=m.documentElement,a=c.matchesSelector||c.mozMatchesSelector||c.webkitMatchesSelector||c.msMatchesSelector;if(a){var b=!a.call(m.createElement("div"),"div"),f=!1;try{a.call(m.documentElement,"[test!='']:sizzle")}catch(d){f=!0}r.matchesSelector=function(c,d){d=d.replace(/\=\s*([^'"\]]*)\s*\]/g,
"='$1']");if(!r.isXML(c))try{if(f||!s.match.PSEUDO.test(d)&&!/!=/.test(d)){var e=a.call(c,d);if(e||!b||c.document&&c.document.nodeType!==11)return e}}catch(g){}return r(d,null,null,[c]).length>0}}})();(function(){var c=m.createElement("div");c.innerHTML="<div class='test e'></div><div class='test'></div>";if(c.getElementsByClassName&&c.getElementsByClassName("e").length!==0&&(c.lastChild.className="e",c.getElementsByClassName("e").length!==1))s.order.splice(1,0,"CLASS"),s.find.CLASS=function(c,a,
b){if(typeof a.getElementsByClassName!="undefined"&&!b)return a.getElementsByClassName(c[1])},c=null})();m.documentElement.contains?r.contains=function(c,a){return c!==a&&(c.contains?c.contains(a):!0)}:m.documentElement.compareDocumentPosition?r.contains=function(c,a){return!!(c.compareDocumentPosition(a)&16)}:r.contains=function(){return!1};r.isXML=function(c){return(c=(c?c.ownerDocument||c:0).documentElement)?c.nodeName!=="HTML":!1};var x=function(c,a){for(var b,f=[],d="",e=a.nodeType?[a]:a;b=s.match.PSEUDO.exec(c);)d+=
b[0],c=c.replace(s.match.PSEUDO,"");c=s.relative[c]?c+"*":c;b=0;for(var g=e.length;b<g;b++)r(c,e[b],f);return r.filter(d,f)};f.find=r;f.expr=r.selectors;f.expr[":"]=f.expr.filters;f.unique=r.uniqueSort;f.text=r.getText;f.isXMLDoc=r.isXML;f.contains=r.contains})();var qb=/Until$/,rb=/^(?:parents|prevUntil|prevAll)/,sb=/,/,$a=/^.[^:#\[\.,]*$/,tb=Array.prototype.slice,Ha=f.expr.match.POS,ub={children:!0,contents:!0,next:!0,prev:!0};f.fn.extend({find:function(c){var a=this,b,d;if(typeof c!="string")return f(c).filter(function(){b=
0;for(d=a.length;b<d;b++)if(f.contains(a[b],this))return!0});var e=this.pushStack("","find",c),g,h,i;b=0;for(d=this.length;b<d;b++)if(g=e.length,f.find(c,this[b],e),b>0)for(h=g;h<e.length;h++)for(i=0;i<g;i++)if(e[i]===e[h]){e.splice(h--,1);break}return e},has:function(c){var a=f(c);return this.filter(function(){for(var c=0,b=a.length;c<b;c++)if(f.contains(this,a[c]))return!0})},not:function(c){return this.pushStack(G(this,c,!1),"not",c)},filter:function(c){return this.pushStack(G(this,c,!0),"filter",
c)},is:function(c){return!!c&&(typeof c=="string"?f.filter(c,this).length>0:this.filter(c).length>0)},closest:function(c,a){var b=[],d,e,g=this[0];if(f.isArray(c)){var h,i={},j=1;if(g&&c.length){d=0;for(e=c.length;d<e;d++)h=c[d],i[h]||(i[h]=Ha.test(h)?f(h,a||this.context):h);for(;g&&g.ownerDocument&&g!==a;){for(h in i)d=i[h],(d.jquery?d.index(g)>-1:f(g).is(d))&&b.push({selector:h,elem:g,level:j});g=g.parentNode;j++}}return b}h=Ha.test(c)||typeof c!="string"?f(c,a||this.context):0;d=0;for(e=this.length;d<
e;d++)for(g=this[d];g;){if(h?h.index(g)>-1:f.find.matchesSelector(g,c)){b.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===a||g.nodeType===11)break}b=b.length>1?f.unique(b):b;return this.pushStack(b,"closest",c)},index:function(c){if(!c||typeof c=="string")return f.inArray(this[0],c?f(c):this.parent().children());return f.inArray(c.jquery?c[0]:c,this)},add:function(c,a){var b=typeof c=="string"?f(c,a):f.makeArray(c&&c.nodeType?[c]:c),d=f.merge(this.get(),b);return this.pushStack(!b[0]||!b[0].parentNode||
b[0].parentNode.nodeType===11||!d[0]||!d[0].parentNode||d[0].parentNode.nodeType===11?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}});f.each({parent:function(c){return(c=c.parentNode)&&c.nodeType!==11?c:null},parents:function(c){return f.dir(c,"parentNode")},parentsUntil:function(c,a,b){return f.dir(c,"parentNode",b)},next:function(c){return f.nth(c,2,"nextSibling")},prev:function(c){return f.nth(c,2,"previousSibling")},nextAll:function(c){return f.dir(c,"nextSibling")},prevAll:function(c){return f.dir(c,
"previousSibling")},nextUntil:function(c,a,b){return f.dir(c,"nextSibling",b)},prevUntil:function(c,a,b){return f.dir(c,"previousSibling",b)},siblings:function(c){return f.sibling(c.parentNode.firstChild,c)},children:function(c){return f.sibling(c.firstChild)},contents:function(c){return f.nodeName(c,"iframe")?c.contentDocument||c.contentWindow.document:f.makeArray(c.childNodes)}},function(c,a){f.fn[c]=function(b,d){var e=f.map(this,a,b),g=tb.call(arguments);qb.test(c)||(d=b);d&&typeof d=="string"&&
(e=f.filter(d,e));e=this.length>1&&!ub[c]?f.unique(e):e;(this.length>1||sb.test(d))&&rb.test(c)&&(e=e.reverse());return this.pushStack(e,c,g.join(","))}});f.extend({filter:function(c,a,b){b&&(c=":not("+c+")");return a.length===1?f.find.matchesSelector(a[0],c)?[a[0]]:[]:f.find.matches(c,a)},dir:function(c,a,d){for(var e=[],c=c[a];c&&c.nodeType!==9&&(d===b||c.nodeType!==1||!f(c).is(d));)c.nodeType===1&&e.push(c),c=c[a];return e},nth:function(c,a,b){for(var a=a||1,f=0;c;c=c[b])if(c.nodeType===1&&++f===
a)break;return c},sibling:function(c,a){for(var b=[];c;c=c.nextSibling)c.nodeType===1&&c!==a&&b.push(c);return b}});var vb=/ jQuery\d+="(?:\d+|null)"/g,sa=/^\s+/,Ia=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Ja=/<([\w:]+)/,wb=/<tbody/i,xb=/<|&#?\w+;/,Ka=/<(?:script|object|embed|option|style)/i,La=/checked\s*(?:[^=]|=\s*.checked.)/i,yb=/\/(java|ecma)script/i,Za=/^\s*<!(?:\[CDATA\[|\-\-)/,y={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>",
"</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};y.optgroup=y.option;y.tbody=y.tfoot=y.colgroup=y.caption=y.thead;y.th=y.td;f.support.htmlSerialize||(y._default=[1,"div<div>","</div>"]);f.fn.extend({text:function(c){if(f.isFunction(c))return this.each(function(a){var b=f(this);b.text(c.call(this,a,
b.text()))});if(typeof c!="object"&&c!==b)return this.empty().append((this[0]&&this[0].ownerDocument||m).createTextNode(c));return f.text(this)},wrapAll:function(c){if(f.isFunction(c))return this.each(function(a){f(this).wrapAll(c.call(this,a))});if(this[0]){var a=f(c,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&a.insertBefore(this[0]);a.map(function(){for(var c=this;c.firstChild&&c.firstChild.nodeType===1;)c=c.firstChild;return c}).append(this)}return this},wrapInner:function(c){if(f.isFunction(c))return this.each(function(a){f(this).wrapInner(c.call(this,
a))});return this.each(function(){var a=f(this),b=a.contents();b.length?b.wrapAll(c):a.append(c)})},wrap:function(c){return this.each(function(){f(this).wrapAll(c)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(c){this.nodeType===1&&this.appendChild(c)})},prepend:function(){return this.domManip(arguments,!0,function(c){this.nodeType===1&&this.insertBefore(c,
this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(c){this.parentNode.insertBefore(c,this)});if(arguments.length){var c=f(arguments[0]);c.push.apply(c,this.toArray());return this.pushStack(c,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(c){this.parentNode.insertBefore(c,this.nextSibling)});if(arguments.length){var c=this.pushStack(this,"after",arguments);c.push.apply(c,f(arguments[0]).toArray());
return c}},remove:function(c,a){for(var b=0,d;(d=this[b])!=null;b++)if(!c||f.filter(c,[d]).length)!a&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var c=0,a;(a=this[c])!=null;c++)for(a.nodeType===1&&f.cleanData(a.getElementsByTagName("*"));a.firstChild;)a.removeChild(a.firstChild);return this},clone:function(c,a){c=c==null?!1:c;a=a==null?c:a;return this.map(function(){return f.clone(this,c,a)})},
html:function(c){if(c===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(vb,""):null;if(typeof c=="string"&&!Ka.test(c)&&(f.support.leadingWhitespace||!sa.test(c))&&!y[(Ja.exec(c)||["",""])[1].toLowerCase()]){c=c.replace(Ia,"<$1></$2>");try{for(var a=0,d=this.length;a<d;a++)this[a].nodeType===1&&(f.cleanData(this[a].getElementsByTagName("*")),this[a].innerHTML=c)}catch(e){this.empty().append(c)}}else f.isFunction(c)?this.each(function(a){var b=f(this);b.html(c.call(this,a,b.html()))}):
this.empty().append(c);return this},replaceWith:function(c){if(this[0]&&this[0].parentNode){if(f.isFunction(c))return this.each(function(a){var b=f(this),d=b.html();b.replaceWith(c.call(this,a,d))});typeof c!="string"&&(c=f(c).detach());return this.each(function(){var a=this.nextSibling,b=this.parentNode;f(this).remove();a?f(a).before(c):f(b).append(c)})}return this.length?this.pushStack(f(f.isFunction(c)?c():c),"replaceWith",c):this},detach:function(c){return this.remove(c,!0)},domManip:function(c,
a,d){var e,g,h,i=c[0],j=[];if(!f.support.checkClone&&arguments.length===3&&typeof i=="string"&&La.test(i))return this.each(function(){f(this).domManip(c,a,d,!0)});if(f.isFunction(i))return this.each(function(e){var g=f(this);c[0]=i.call(this,e,a?g.html():b);g.domManip(c,a,d)});if(this[0]){h=i&&i.parentNode;f.support.parentNode&&h&&h.nodeType===11&&h.childNodes.length===this.length?e={fragment:h}:e=f.buildFragment(c,this,j);h=e.fragment;h.childNodes.length===1?g=h=h.firstChild:g=h.firstChild;if(g){a=
a&&f.nodeName(g,"tr");g=0;for(var q=this.length,n=q-1;g<q;g++)d.call(a?f.nodeName(this[g],"table")?this[g].getElementsByTagName("tbody")[0]||this[g].appendChild(this[g].ownerDocument.createElement("tbody")):this[g]:this[g],e.cacheable||q>1&&g<n?f.clone(h,!0,!0):h)}j.length&&f.each(j,C)}return this}});f.buildFragment=function(c,a,b){var d,e,g,h;a&&a[0]&&(h=a[0].ownerDocument||a[0]);h.createDocumentFragment||(h=m);c.length===1&&typeof c[0]=="string"&&c[0].length<512&&h===m&&c[0].charAt(0)==="<"&&!Ka.test(c[0])&&
(f.support.checkClone||!La.test(c[0]))&&(e=!0,g=f.fragments[c[0]],g&&g!==1&&(d=g));d||(d=h.createDocumentFragment(),f.clean(c,h,d,b));e&&(f.fragments[c[0]]=g?d:1);return{fragment:d,cacheable:e}};f.fragments={};f.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(c,a){f.fn[c]=function(b){var d=[],b=f(b),e=this.length===1&&this[0].parentNode;if(e&&e.nodeType===11&&e.childNodes.length===1&&b.length===1)return b[a](this[0]),this;for(var e=
0,g=b.length;e<g;e++){var h=(e>0?this.clone(!0):this).get();f(b[e])[a](h);d=d.concat(h)}return this.pushStack(d,c,b.selector)}});f.extend({clone:function(c,a,b){var d=c.cloneNode(!0),e,g,h;if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(c.nodeType===1||c.nodeType===11)&&!f.isXMLDoc(c)){J(c,d);e=D(c);g=D(d);for(h=0;e[h];++h)J(e[h],g[h])}if(a&&(t(c,d),b)){e=D(c);g=D(d);for(h=0;e[h];++h)t(e[h],g[h])}return d},clean:function(c,a,b,d){a=a||m;typeof a.createElement=="undefined"&&(a=a.ownerDocument||
a[0]&&a[0].ownerDocument||m);for(var e=[],g,h=0,i;(i=c[h])!=null;h++)if(typeof i=="number"&&(i+=""),i){if(typeof i=="string")if(xb.test(i)){i=i.replace(Ia,"<$1></$2>");g=(Ja.exec(i)||["",""])[1].toLowerCase();var j=y[g]||y._default,n=j[0],s=a.createElement("div");for(s.innerHTML=j[1]+i+j[2];n--;)s=s.lastChild;if(!f.support.tbody){n=wb.test(i);j=g==="table"&&!n?s.firstChild&&s.firstChild.childNodes:j[1]==="<table>"&&!n?s.childNodes:[];for(g=j.length-1;g>=0;--g)f.nodeName(j[g],"tbody")&&!j[g].childNodes.length&&
j[g].parentNode.removeChild(j[g])}!f.support.leadingWhitespace&&sa.test(i)&&s.insertBefore(a.createTextNode(sa.exec(i)[0]),s.firstChild);i=s.childNodes}else i=a.createTextNode(i);var p;if(!f.support.appendChecked)if(i[0]&&typeof(p=i.length)=="number")for(g=0;g<p;g++)x(i[g]);else x(i);i.nodeType?e.push(i):e=f.merge(e,i)}if(b){c=function(c){return!c.type||yb.test(c.type)};for(h=0;e[h];h++)d&&f.nodeName(e[h],"script")&&(!e[h].type||e[h].type.toLowerCase()==="text/javascript")?d.push(e[h].parentNode?
e[h].parentNode.removeChild(e[h]):e[h]):(e[h].nodeType===1&&(a=f.grep(e[h].getElementsByTagName("script"),c),e.splice.apply(e,[h+1,0].concat(a))),b.appendChild(e[h]))}return e},cleanData:function(c){for(var a,b,d=f.cache,e=f.expando,g=f.event.special,h=f.support.deleteExpando,i=0,j;(j=c[i])!=null;i++)if(!j.nodeName||!f.noData[j.nodeName.toLowerCase()])if(b=j[f.expando]){if((a=d[b]&&d[b][e])&&a.events){for(var n in a.events)g[n]?f.event.remove(j,n):f.removeEvent(j,n,a.handle);a.handle&&(a.handle.elem=
null)}h?delete j[f.expando]:j.removeAttribute&&j.removeAttribute(f.expando);delete d[b]}}});var Ma=/alpha\([^)]*\)/i,zb=/opacity=([^)]*)/,Ab=/([A-Z]|^ms)/g,Na=/^-?\d+(?:px)?$/i,Bb=/^-?\d/,Cb=/^[+\-]=/,Db=/[^+\-\.\de]+/g,Eb={position:"absolute",visibility:"hidden",display:"block"},Xa=["Left","Right"],Ya=["Top","Bottom"],W,Oa,Pa;f.fn.css=function(c,a){if(arguments.length===2&&a===b)return this;return f.access(this,c,a,!0,function(c,a,d){return d!==b?f.style(c,a,d):f.css(c,a)})};f.extend({cssHooks:{opacity:{get:function(c,
a){if(a){var b=W(c,"opacity","opacity");return b===""?"1":b}return c.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(c,a,d,e){if(c&&c.nodeType!==3&&c.nodeType!==8&&c.style){var g,h=f.camelCase(a),i=c.style,j=f.cssHooks[h],a=f.cssProps[h]||h;if(d===b){if(j&&"get"in j&&(g=j.get(c,!1,e))!==b)return g;return i[a]}e=typeof d;if(!(e==="number"&&isNaN(d)||
d==null))if(e==="string"&&Cb.test(d)&&(d=+d.replace(Db,"")+parseFloat(f.css(c,a)),e="number"),e==="number"&&!f.cssNumber[h]&&(d+="px"),!j||!("set"in j)||(d=j.set(c,d))!==b)try{i[a]=d}catch(n){}}},css:function(c,a,d){var e,g,a=f.camelCase(a);g=f.cssHooks[a];a=f.cssProps[a]||a;a==="cssFloat"&&(a="float");if(g&&"get"in g&&(e=g.get(c,!0,d))!==b)return e;if(W)return W(c,a)},swap:function(c,a,b){var d={},f;for(f in a)d[f]=c.style[f],c.style[f]=a[f];b.call(c);for(f in a)c.style[f]=d[f]}});f.curCSS=f.css;
f.each(["height","width"],function(c,a){f.cssHooks[a]={get:function(c,b,d){var e;if(b){if(c.offsetWidth!==0)return v(c,a,d);f.swap(c,Eb,function(){e=v(c,a,d)});return e}},set:function(c,a){if(!Na.test(a))return a;a=parseFloat(a);if(a>=0)return a+"px"}}});f.support.opacity||(f.cssHooks.opacity={get:function(c,a){return zb.test((a&&c.currentStyle?c.currentStyle.filter:c.style.filter)||"")?parseFloat(RegExp.$1)/100+"":a?"1":""},set:function(a,b){var d=a.style,e=a.currentStyle;d.zoom=1;var g=f.isNaN(b)?
"":"alpha(opacity="+b*100+")",e=e&&e.filter||d.filter||"";d.filter=Ma.test(e)?e.replace(Ma,g):e+" "+g}});f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var d;f.swap(a,{display:"inline-block"},function(){b?d=W(a,"margin-right","marginRight"):d=a.style.marginRight});return d}})});m.defaultView&&m.defaultView.getComputedStyle&&(Oa=function(a,d){var e,g,d=d.replace(Ab,"-$1").toLowerCase();if(!(g=a.ownerDocument.defaultView))return b;if(g=g.getComputedStyle(a,null))e=
g.getPropertyValue(d),e===""&&!f.contains(a.ownerDocument.documentElement,a)&&(e=f.style(a,d));return e});m.documentElement.currentStyle&&(Pa=function(a,b){var d,f=a.currentStyle&&a.currentStyle[b],e=a.runtimeStyle&&a.runtimeStyle[b],g=a.style;!Na.test(f)&&Bb.test(f)&&(d=g.left,e&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f||0,f=g.pixelLeft+"px",g.left=d,e&&(a.runtimeStyle.left=e));return f===""?"auto":f});W=Oa||Pa;f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=
a.offsetHeight;return a.offsetWidth===0&&b===0||!f.support.reliableHiddenOffsets&&(a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var Fb=/%20/g,Wa=/\[\]$/,Qa=/\r?\n/g,Gb=/#.*$/,Hb=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,Ib=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,Jb=/^(?:GET|HEAD)$/,Kb=/^\/\//,Ra=/\?/,Lb=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,Mb=/^(?:select|textarea)/i,
wa=/\s+/,Nb=/([?&])_=[^&]*/,Sa=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,Ta=f.fn.load,ia={},Ua={},I,K;try{I=gb.href}catch(Tb){I=m.createElement("a"),I.href="",I=I.href}K=Sa.exec(I.toLowerCase())||[];f.fn.extend({load:function(a,d,e){if(typeof a!="string"&&Ta)return Ta.apply(this,arguments);if(!this.length)return this;var g=a.indexOf(" ");if(g>=0)var h=a.slice(g,a.length),a=a.slice(0,g);g="GET";d&&(f.isFunction(d)?(e=d,d=b):typeof d=="object"&&(d=f.param(d,f.ajaxSettings.traditional),g="POST"));
var i=this;f.ajax({url:a,type:g,dataType:"html",data:d,complete:function(a,c,b){b=a.responseText;a.isResolved()&&(a.done(function(a){b=a}),i.html(h?f("<div>").append(b.replace(Lb,"")).find(h):b));e&&i.each(e,[b,c,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||Mb.test(this.nodeName)||Ib.test(this.type))}).map(function(a,
b){var d=f(this).val();return d==null?null:f.isArray(d)?f.map(d,function(a){return{name:b.name,value:a.replace(Qa,"\r\n")}}):{name:b.name,value:d.replace(Qa,"\r\n")}}).get()}});f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.bind(b,a)}});f.each(["get","post"],function(a,d){f[d]=function(a,c,e,g){f.isFunction(c)&&(g=g||e,e=c,c=b);return f.ajax({type:d,url:a,data:c,success:e,dataType:g})}});f.extend({getScript:function(a,
d){return f.get(a,b,d,"script")},getJSON:function(a,b,d){return f.get(a,b,d,"json")},ajaxSetup:function(a,b){b?f.extend(!0,a,f.ajaxSettings,b):(b=a,a=f.extend(!0,f.ajaxSettings,b));for(var d in{context:1,url:1})d in b?a[d]=b[d]:d in f.ajaxSettings&&(a[d]=f.ajaxSettings[d]);return a},ajaxSettings:{url:I,isLocal:/^(?:about|app|app\-storage|.+\-extension|file|widget):$/.test(K[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",
html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":"*/*"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML}},ajaxPrefilter:u(ia),ajaxTransport:u(Ua),ajax:function(a,d){function e(a,c,d,k){if(D!==2){D=2;T&&clearTimeout(T);F=b;v=k||"";w.readyState=a?4:0;var o,s,p;if(d){var k=g,u=w,x=k.contents,t=k.dataTypes,C=k.responseFields,y,E,
A,ja;for(E in C)E in d&&(u[C[E]]=d[E]);for(;t[0]==="*";)t.shift(),y===b&&(y=k.mimeType||u.getResponseHeader("content-type"));if(y)for(E in x)if(x[E]&&x[E].test(y)){t.unshift(E);break}if(t[0]in d)A=t[0];else{for(E in d){if(!t[0]||k.converters[E+" "+t[0]]){A=E;break}ja||(ja=E)}A=A||ja}A?(A!==t[0]&&t.unshift(A),d=d[A]):d=void 0}else d=b;if(a>=200&&a<300||a===304){if(g.ifModified){if(y=w.getResponseHeader("Last-Modified"))f.lastModified[m]=y;if(y=w.getResponseHeader("Etag"))f.etag[m]=y}if(a===304)c="notmodified",
o=!0;else try{y=g;y.dataFilter&&(d=y.dataFilter(d,y.dataType));var M=y.dataTypes;E={};var G,H,cb=M.length,L,N=M[0],Q,P,U,I,K;for(G=1;G<cb;G++){if(G===1)for(H in y.converters)typeof H=="string"&&(E[H.toLowerCase()]=y.converters[H]);Q=N;N=M[G];if(N==="*")N=Q;else if(Q!=="*"&&Q!==N){P=Q+" "+N;U=E[P]||E["* "+N];if(!U)for(I in K=b,E)if(L=I.split(" "),L[0]===Q||L[0]==="*")if(K=E[L[1]+" "+N]){I=E[I];I===!0?U=K:K===!0&&(U=I);break}!U&&!K&&f.error("No conversion from "+P.replace(" "," to "));U!==!0&&(d=U?
U(d):K(I(d)))}}s=d;c="success";o=!0}catch(R){c="parsererror",p=R}}else if(p=c,!c||a)c="error",a<0&&(a=0);w.status=a;w.statusText=c;o?j.resolveWith(h,[s,c,w]):j.rejectWith(h,[w,c,p]);w.statusCode(q);q=b;J&&i.trigger("ajax"+(o?"Success":"Error"),[w,g,o?s:p]);n.resolveWith(h,[w,c]);J&&(i.trigger("ajaxComplete",[w,g]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(d=a,a=b);var d=d||{},g=f.ajaxSetup({},d),h=g.context||g,i=h!==g&&(h.nodeType||h instanceof f)?f(h):f.event,j=f.Deferred(),
n=f._Deferred(),q=g.statusCode||{},m,s={},u={},v,t,F,T,x,D=0,J,C,w={readyState:0,setRequestHeader:function(a,c){if(!D){var b=a.toLowerCase(),a=u[b]=u[b]||a;s[a]=c}return this},getAllResponseHeaders:function(){return D===2?v:null},getResponseHeader:function(a){var c;if(D===2){if(!t)for(t={};c=Hb.exec(v);)t[c[1].toLowerCase()]=c[2];c=t[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){D||(g.mimeType=a);return this},abort:function(a){a=a||"abort";F&&F.abort(a);e(0,a);return this}};j.promise(w);
w.success=w.done;w.error=w.fail;w.complete=n.done;w.statusCode=function(a){if(a){var c;if(D<2)for(c in a)q[c]=[q[c],a[c]];else c=a[w.status],w.then(c,c)}return this};g.url=((a||g.url)+"").replace(Gb,"").replace(Kb,K[1]+"//");g.dataTypes=f.trim(g.dataType||"*").toLowerCase().split(wa);g.crossDomain==null&&(x=Sa.exec(g.url.toLowerCase()),g.crossDomain=!(!x||x[1]==K[1]&&x[2]==K[2]&&(x[3]||(x[1]==="http:"?80:443))==(K[3]||(K[1]==="http:"?80:443))));g.data&&g.processData&&typeof g.data!="string"&&(g.data=
f.param(g.data,g.traditional));p(ia,g,d,w);if(D===2)return!1;J=g.global;g.type=g.type.toUpperCase();g.hasContent=!Jb.test(g.type);J&&f.active++===0&&f.event.trigger("ajaxStart");if(!g.hasContent&&(g.data&&(g.url+=(Ra.test(g.url)?"&":"?")+g.data),m=g.url,g.cache===!1)){x=f.now();var y=g.url.replace(Nb,"$1_="+x);g.url=y+(y===g.url?(Ra.test(g.url)?"&":"?")+"_="+x:"")}(g.data&&g.hasContent&&g.contentType!==!1||d.contentType)&&w.setRequestHeader("Content-Type",g.contentType);g.ifModified&&(m=m||g.url,
f.lastModified[m]&&w.setRequestHeader("If-Modified-Since",f.lastModified[m]),f.etag[m]&&w.setRequestHeader("If-None-Match",f.etag[m]));w.setRequestHeader("Accept",g.dataTypes[0]&&g.accepts[g.dataTypes[0]]?g.accepts[g.dataTypes[0]]+(g.dataTypes[0]!=="*"?", */*; q=0.01":""):g.accepts["*"]);for(C in g.headers)w.setRequestHeader(C,g.headers[C]);if(g.beforeSend&&(g.beforeSend.call(h,w,g)===!1||D===2))return w.abort(),!1;for(C in{success:1,error:1,complete:1})w[C](g[C]);if(F=p(Ua,g,d,w)){w.readyState=1;
J&&i.trigger("ajaxSend",[w,g]);g.async&&g.timeout>0&&(T=setTimeout(function(){w.abort("timeout")},g.timeout));try{D=1,F.send(s,e)}catch(A){status<2?e(-1,A):f.error(A)}}else e(-1,"No Transport");return w},param:function(a,d){var e=[],g=function(a,c){c=f.isFunction(c)?c():c;e[e.length]=encodeURIComponent(a)+"="+encodeURIComponent(c)};d===b&&(d=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){g(this.name,this.value)});else for(var h in a)n(h,a[h],d,g);return e.join("&").replace(Fb,
"+")}});f.extend({active:0,lastModified:{},etag:{}});var Ob=f.now(),ga=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+Ob++}});f.ajaxPrefilter("json jsonp",function(c,b,d){b=c.contentType==="application/x-www-form-urlencoded"&&typeof c.data=="string";if(c.dataTypes[0]==="jsonp"||c.jsonp!==!1&&(ga.test(c.url)||b&&ga.test(c.data))){var e,g=c.jsonpCallback=f.isFunction(c.jsonpCallback)?c.jsonpCallback():c.jsonpCallback,h=a[g],i=c.url,j=c.data,n="$1"+g+
"$2";c.jsonp!==!1&&(i=i.replace(ga,n),c.url===i&&(b&&(j=j.replace(ga,n)),c.data===j&&(i+=(/\?/.test(i)?"&":"?")+c.jsonp+"="+g)));c.url=i;c.data=j;a[g]=function(a){e=[a]};d.always(function(){a[g]=h;e&&f.isFunction(h)&&a[g](e[0])});c.converters["script json"]=function(){e||f.error(g+" was not called");return e[0]};c.dataTypes[0]="json";return"script"}});f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},
converters:{"text script":function(a){f.globalEval(a);return a}}});f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1);a.crossDomain&&(a.type="GET",a.global=!1)});f.ajaxTransport("script",function(a){if(a.crossDomain){var d,f=m.head||m.getElementsByTagName("head")[0]||m.documentElement;return{send:function(e,g){d=m.createElement("script");d.async="async";a.scriptCharset&&(d.charset=a.scriptCharset);d.src=a.url;d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=
d.onreadystatechange=null,f&&d.parentNode&&f.removeChild(d),d=b,c||g(200,"success")};f.insertBefore(d,f.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var ta=a.ActiveXObject?function(){for(var a in Y)Y[a](0,1)}:!1,Pb=0,Y;f.ajaxSettings.xhr=a.ActiveXObject?function(){var c;if(!(c=!this.isLocal&&j()))a:{try{c=new a.ActiveXObject("Microsoft.XMLHTTP");break a}catch(b){}c=void 0}return c}:j;(function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})})(f.ajaxSettings.xhr());f.support.ajax&&
f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType);!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(n){}h.send(c.hasContent&&c.data||null);d=function(a,
e){var j,o,n,m,p;try{if(d&&(e||h.readyState===4))if(d=b,i&&(h.onreadystatechange=f.noop,ta&&delete Y[i]),e)h.readyState!==4&&h.abort();else{j=h.status;n=h.getAllResponseHeaders();m={};(p=h.responseXML)&&p.documentElement&&(m.xml=p);m.text=h.responseText;try{o=h.statusText}catch(u){o=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}catch(v){e||g(-1,v)}m&&g(j,o,m,n)};!c.async||h.readyState===4?d():(i=++Pb,ta&&(Y||(Y={},f(a).unload(ta)),Y[i]=d),h.onreadystatechange=d)},abort:function(){d&&
d(0,1)}}}});var ha={},H,R,Qb=/^(?:toggle|show|hide)$/,Rb=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,Z,va=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],da,ua=a.webkitRequestAnimationFrame||a.mozRequestAnimationFrame||a.oRequestAnimationFrame;f.fn.extend({show:function(a,b,d){var h;if(a||a===0)return this.animate(g("show",3),a,b,d);b=0;for(d=this.length;b<d;b++)a=this[b],a.style&&(h=a.style.display,!f._data(a,
"olddisplay")&&h==="none"&&(h=a.style.display=""),h===""&&f.css(a,"display")==="none"&&f._data(a,"olddisplay",e(a.nodeName)));for(b=0;b<d;b++)if(a=this[b],a.style&&(h=a.style.display,h===""||h==="none"))a.style.display=f._data(a,"olddisplay")||"";return this},hide:function(a,b,d){if(a||a===0)return this.animate(g("hide",3),a,b,d);a=0;for(b=this.length;a<b;a++)this[a].style&&(d=f.css(this[a],"display"),d!=="none"&&!f._data(this[a],"olddisplay")&&f._data(this[a],"olddisplay",d));for(a=0;a<b;a++)this[a].style&&
(this[a].style.display="none");return this},_toggle:f.fn.toggle,toggle:function(a,b,d){var e=typeof a=="boolean";f.isFunction(a)&&f.isFunction(b)?this._toggle.apply(this,arguments):a==null||e?this.each(function(){var b=e?a:f(this).is(":hidden");f(this)[b?"show":"hide"]()}):this.animate(g("toggle",3),a,b,d);return this},fadeTo:function(a,b,d,f){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,d,f)},animate:function(a,b,d,g){var h=f.speed(b,d,g);if(f.isEmptyObject(a))return this.each(h.complete,
[!1]);a=f.extend({},a);return this[h.queue===!1?"each":"queue"](function(){var c;h.queue===!1&&f._mark(this);var b=f.extend({},h),d=this.nodeType===1,g=d&&f(this).is(":hidden"),i,k,j,l,o,n,m,p;b.animatedProperties={};for(j in a){i=f.camelCase(j);j!==i&&(a[i]=a[j],delete a[j]);k=a[i];f.isArray(k)?(b.animatedProperties[i]=k[1],c=a[i]=k[0],k=c):b.animatedProperties[i]=b.specialEasing&&b.specialEasing[i]||b.easing||"swing";if(k==="hide"&&g||k==="show"&&!g)return b.complete.call(this);d&&(i==="height"||
i==="width")&&(b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],f.css(this,"display")==="inline"&&f.css(this,"float")==="none"&&(f.support.inlineBlockNeedsLayout?(l=e(this.nodeName),l==="inline"?this.style.display="inline-block":(this.style.display="inline",this.style.zoom=1)):this.style.display="inline-block"))}b.overflow!=null&&(this.style.overflow="hidden");for(j in a)d=new f.fx(this,b,j),k=a[j],Qb.test(k)?d[k==="toggle"?g?"show":"hide":k]():(o=Rb.exec(k),n=d.cur(),o?
(m=parseFloat(o[2]),p=o[3]||(f.cssNumber[j]?"":"px"),p!=="px"&&(f.style(this,j,(m||1)+p),n*=(m||1)/d.cur(),f.style(this,j,n+p)),o[1]&&(m=(o[1]==="-="?-1:1)*m+n),d.custom(n,m,p)):d.custom(n,k,""));return!0})},stop:function(a,b){a&&this.queue([]);this.each(function(){var a=f.timers,c=a.length;for(b||f._unmark(!0,this);c--;)a[c].elem===this&&(b&&a[c](!0),a.splice(c,1))});b||this.dequeue();return this}});f.each({slideDown:g("show",1),slideUp:g("hide",1),slideToggle:g("toggle",1),fadeIn:{opacity:"show"},
fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){f.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}});f.extend({speed:function(a,b,d){var e=a&&typeof a=="object"?f.extend({},a):{complete:d||!d&&b||f.isFunction(a)&&a,duration:a,easing:d&&b||b&&!f.isFunction(b)&&b};e.duration=f.fx.off?0:typeof e.duration=="number"?e.duration:e.duration in f.fx.speeds?f.fx.speeds[e.duration]:f.fx.speeds._default;e.old=e.complete;e.complete=function(a){f.isFunction(e.old)&&e.old.call(this);e.queue!==
!1?f.dequeue(this):a!==!1&&f._unmark(this)};return e},easing:{linear:function(a,b,d,f){return d+f*a},swing:function(a,b,d,f){return(-Math.cos(a*Math.PI)/2+0.5)*f+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;b.orig=b.orig||{}}});f.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(f.fx.step[this.prop]||f.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];
var a,b=f.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a},custom:function(a,b,d){function e(a){return g.step(a)}var g=this,h=f.fx,j;this.startTime=da||i();this.start=a;this.end=b;this.unit=d||this.unit||(f.cssNumber[this.prop]?"":"px");this.now=this.start;this.pos=this.state=0;e.elem=this.elem;e()&&f.timers.push(e)&&!Z&&(ua?(Z=!0,j=function(){Z&&(ua(j),h.tick())},ua(j)):Z=setInterval(h.tick,h.interval))},show:function(){this.options.orig[this.prop]=f.style(this.elem,this.prop);
this.options.show=!0;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());f(this.elem).show()},hide:function(){this.options.orig[this.prop]=f.style(this.elem,this.prop);this.options.hide=!0;this.custom(this.cur(),0)},step:function(a){var b=da||i(),d=!0,e=this.elem,g=this.options,h,j;if(a||b>=g.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();g.animatedProperties[this.prop]=!0;for(h in g.animatedProperties)g.animatedProperties[h]!==!0&&(d=!1);if(d){g.overflow!=
null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,c){e.style["overflow"+c]=g.overflow[a]});g.hide&&f(e).hide();if(g.hide||g.show)for(var n in g.animatedProperties)f.style(e,n,g.orig[n]);g.complete.call(e)}return!1}g.duration==Infinity?this.now=b:(j=b-this.startTime,this.state=j/g.duration,this.pos=f.easing[g.animatedProperties[this.prop]](this.state,j,0,1,g.duration),this.now=this.start+(this.end-this.start)*this.pos);this.update();return!0}};f.extend(f.fx,{tick:function(){for(var a=
f.timers,b=0;b<a.length;++b)a[b]()||a.splice(b--,1);a.length||f.fx.stop()},interval:13,stop:function(){clearInterval(Z);Z=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){f.style(a.elem,"opacity",a.now)},_default:function(a){a.elem.style&&a.elem.style[a.prop]!=null?a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit:a.elem[a.prop]=a.now}}});f.expr&&f.expr.filters&&(f.expr.filters.animated=function(a){return f.grep(f.timers,function(b){return a===
b.elem}).length});var Sb=/^t(?:able|d|h)$/i,Va=/^(?:body|html)$/i;"getBoundingClientRect"in m.documentElement?f.fn.offset=function(a){var b=this[0],e;if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);try{e=b.getBoundingClientRect()}catch(g){}var h=b.ownerDocument,i=h.documentElement;if(!e||!f.contains(i,b))return e?{top:e.top,left:e.left}:{top:0,left:0};b=h.body;h=d(h);return{top:e.top+(h.pageYOffset||
f.support.boxModel&&i.scrollTop||b.scrollTop)-(i.clientTop||b.clientTop||0),left:e.left+(h.pageXOffset||f.support.boxModel&&i.scrollLeft||b.scrollLeft)-(i.clientLeft||b.clientLeft||0)}}:f.fn.offset=function(a){var b=this[0];if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);f.offset.initialize();var d,e=b.offsetParent,g=b.ownerDocument,h=g.documentElement,i=g.body;d=(g=g.defaultView)?g.getComputedStyle(b,
null):b.currentStyle;for(var j=b.offsetTop,n=b.offsetLeft;(b=b.parentNode)&&b!==i&&b!==h;){if(f.offset.supportsFixedPosition&&d.position==="fixed")break;d=g?g.getComputedStyle(b,null):b.currentStyle;j-=b.scrollTop;n-=b.scrollLeft;b===e&&(j+=b.offsetTop,n+=b.offsetLeft,f.offset.doesNotAddBorder&&(!f.offset.doesAddBorderForTableAndCells||!Sb.test(b.nodeName))&&(j+=parseFloat(d.borderTopWidth)||0,n+=parseFloat(d.borderLeftWidth)||0),e=b.offsetParent);f.offset.subtractsBorderForOverflowNotVisible&&d.overflow!==
"visible"&&(j+=parseFloat(d.borderTopWidth)||0,n+=parseFloat(d.borderLeftWidth)||0)}if(d.position==="relative"||d.position==="static")j+=i.offsetTop,n+=i.offsetLeft;f.offset.supportsFixedPosition&&d.position==="fixed"&&(j+=Math.max(h.scrollTop,i.scrollTop),n+=Math.max(h.scrollLeft,i.scrollLeft));return{top:j,left:n}};f.offset={initialize:function(){var a=m.body,b=m.createElement("div"),d,e,g,h=parseFloat(f.css(a,"marginTop"))||0;f.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,
width:"1px",height:"1px",visibility:"hidden"});b.innerHTML="<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>";a.insertBefore(b,a.firstChild);d=b.firstChild;e=d.firstChild;g=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=e.offsetTop!==5;this.doesAddBorderForTableAndCells=
g.offsetTop===5;e.style.position="fixed";e.style.top="20px";this.supportsFixedPosition=e.offsetTop===20||e.offsetTop===15;e.style.position=e.style.top="";d.style.overflow="hidden";d.style.position="relative";this.subtractsBorderForOverflowNotVisible=e.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==h;a.removeChild(b);f.offset.initialize=f.noop},bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;f.offset.initialize();f.offset.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,
"marginTop"))||0,d+=parseFloat(f.css(a,"marginLeft"))||0);return{top:b,left:d}},setOffset:function(a,b,d){var e=f.css(a,"position");e==="static"&&(a.style.position="relative");var g=f(a),h=g.offset(),i=f.css(a,"top"),j=f.css(a,"left"),n={},m={},p,u;(e==="absolute"||e==="fixed")&&f.inArray("auto",[i,j])>-1?(m=g.position(),p=m.top,u=m.left):(p=parseFloat(i)||0,u=parseFloat(j)||0);f.isFunction(b)&&(b=b.call(a,d,h));b.top!=null&&(n.top=b.top-h.top+p);b.left!=null&&(n.left=b.left-h.left+u);"using"in b?
b.using.call(a,n):g.css(n)}};f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),e=Va.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(f.css(a,"marginTop"))||0;d.left-=parseFloat(f.css(a,"marginLeft"))||0;e.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0;e.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:d.top-e.top,left:d.left-e.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||
m.body;a&&!Va.test(a.nodeName)&&f.css(a,"position")==="static";)a=a.offsetParent;return a})}});f.each(["Left","Top"],function(a,e){var g="scroll"+e;f.fn[g]=function(e){var h,i;if(e===b){h=this[0];if(!h)return null;return(i=d(h))?"pageXOffset"in i?i[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&i.document.documentElement[g]||i.document.body[g]:h[g]}return this.each(function(){(i=d(this))?i.scrollTo(a?f(i).scrollLeft():e,a?e:f(i).scrollTop()):this[g]=e})}});f.each(["Height","Width"],function(a,
d){var e=d.toLowerCase();f.fn["inner"+d]=function(){var a=this[0];return a&&a.style?parseFloat(f.css(a,e,"padding")):null};f.fn["outer"+d]=function(a){var c=this[0];return c&&c.style?parseFloat(f.css(c,e,a?"margin":"border")):null};f.fn[e]=function(a){var c=this[0];if(!c)return a==null?null:this;if(f.isFunction(a))return this.each(function(c){var b=f(this);b[e](a.call(this,c,b[e]()))});if(f.isWindow(c)){var g=c.document.documentElement["client"+d];return c.document.compatMode==="CSS1Compat"&&g||c.document.body["client"+
d]||g}if(c.nodeType===9)return Math.max(c.documentElement["client"+d],c.body["scroll"+d],c.documentElement["scroll"+d],c.body["offset"+d],c.documentElement["offset"+d]);if(a===b)return c=f.css(c,e),g=parseFloat(c),f.isNaN(g)?c:g;return this.css(e,typeof a=="string"?a:a+"px")}});a.jQuery=a.$=f})(window);(function(a,b){function d(b,d){var i=b.nodeName.toLowerCase();if("area"===i){d=b.parentNode;i=d.name;if(!b.href||!i||d.nodeName.toLowerCase()!=="map")return!1;b=a("img[usemap=#"+i+"]")[0];return!!b&&e(b)}return(/input|select|textarea|button|object/.test(i)?!b.disabled:"a"==i?b.href||d:d)&&e(b)}function e(b){return!a(b).parents().andSelf().filter(function(){return a.curCSS(this,"visibility")==="hidden"||a.expr.filters.hidden(this)}).length}a.ui=a.ui||{};a.ui.version||(a.extend(a.ui,{version:"1.8.14",
keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,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,WINDOWS:91}}),a.fn.extend({_focus:a.fn.focus,focus:function(b,d){return typeof b==="number"?this.each(function(){var e=this;setTimeout(function(){a(e).focus();
d&&d.call(e)},b)}):this._focus.apply(this,arguments)},scrollParent:function(){var b;b=a.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(a.curCSS(this,"position",1))&&/(auto|scroll)/.test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(a.curCSS(this,"overflow",1)+a.curCSS(this,
"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||!b.length?a(document):b},zIndex:function(d){if(d!==b)return this.css("zIndex",d);if(this.length)for(var d=a(this[0]),e;d.length&&d[0]!==document;){e=d.css("position");if(e==="absolute"||e==="relative"||e==="fixed")if(e=parseInt(d.css("zIndex"),10),!isNaN(e)&&e!==0)return e;d=d.parent()}return 0},disableSelection:function(){return this.bind((a.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",
function(a){a.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),a.each(["Width","Height"],function(d,e){function i(b,d,e,g){a.each(j,function(){d-=parseFloat(a.curCSS(b,"padding"+this,!0))||0;e&&(d-=parseFloat(a.curCSS(b,"border"+this+"Width",!0))||0);g&&(d-=parseFloat(a.curCSS(b,"margin"+this,!0))||0)});return d}var j=e==="Width"?["Left","Right"]:["Top","Bottom"],n=e.toLowerCase(),p={innerWidth:a.fn.innerWidth,innerHeight:a.fn.innerHeight,outerWidth:a.fn.outerWidth,
outerHeight:a.fn.outerHeight};a.fn["inner"+e]=function(d){if(d===b)return p["inner"+e].call(this);return this.each(function(){a(this).css(n,i(this,d)+"px")})};a.fn["outer"+e]=function(b,d){if(typeof b!=="number")return p["outer"+e].call(this,b);return this.each(function(){a(this).css(n,i(this,b,!0,d)+"px")})}}),a.extend(a.expr[":"],{data:function(b,d,e){return!!a.data(b,e[3])},focusable:function(b){return d(b,!isNaN(a.attr(b,"tabindex")))},tabbable:function(b){var e=a.attr(b,"tabindex"),i=isNaN(e);
return(i||e>=0)&&d(b,!i)}}),a(function(){var b=document.body,d=b.appendChild(d=document.createElement("div"));a.extend(d.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});a.support.minHeight=d.offsetHeight===100;a.support.selectstart="onselectstart"in d;b.removeChild(d).style.display="none"}),a.extend(a.ui,{plugin:{add:function(b,d,e){var b=a.ui[b].prototype,j;for(j in e)b.plugins[j]=b.plugins[j]||[],b.plugins[j].push([d,e[j]])},call:function(a,b,d){if((b=a.plugins[b])&&a.element[0].parentNode)for(var e=
0;e<b.length;e++)a.options[b[e][0]]&&b[e][1].apply(a.element,d)}},contains:function(a,b){return document.compareDocumentPosition?a.compareDocumentPosition(b)&16:a!==b&&a.contains(b)},hasScroll:function(b,d){if(a(b).css("overflow")==="hidden")return!1;var d=d&&d==="left"?"scrollLeft":"scrollTop",e=!1;if(b[d]>0)return!0;b[d]=1;e=b[d]>0;b[d]=0;return e},isOverAxis:function(a,b,d){return a>b&&a<b+d},isOver:function(b,d,e,j,n,p){return a.ui.isOverAxis(b,e,n)&&a.ui.isOverAxis(d,j,p)}}))})(jQuery);
(function(a,b){if(a.cleanData){var d=a.cleanData;a.cleanData=function(b){for(var e=0,i;(i=b[e])!=null;e++)a(i).triggerHandler("remove");d(b)}}else{var e=a.fn.remove;a.fn.remove=function(b,d){return this.each(function(){d||(!b||a.filter(b,[this]).length)&&a("*",this).add([this]).each(function(){a(this).triggerHandler("remove")});return e.call(a(this),b,d)})}}a.widget=function(b,d,e){var j=b.split(".")[0],n,b=b.split(".")[1];n=j+"-"+b;if(!e)e=d,d=a.Widget;a.expr[":"][n]=function(d){return!!a.data(d,
b)};a[j]=a[j]||{};a[j][b]=function(a,b){arguments.length&&this._createWidget(a,b)};d=new d;d.options=a.extend(!0,{},d.options);a[j][b].prototype=a.extend(!0,d,{namespace:j,widgetName:b,widgetEventPrefix:a[j][b].prototype.widgetEventPrefix||b,widgetBaseClass:n},e);a.widget.bridge(b,a[j][b])};a.widget.bridge=function(d,e){a.fn[d]=function(i){var j=typeof i==="string",n=Array.prototype.slice.call(arguments,1),p=this,i=!j&&n.length?a.extend.apply(null,[!0,i].concat(n)):i;if(j&&i.charAt(0)==="_")return p;
j?this.each(function(){var e=a.data(this,d),h=e&&a.isFunction(e[i])?e[i].apply(e,n):e;if(h!==e&&h!==b)return p=h,!1}):this.each(function(){var b=a.data(this,d);b?b.option(i||{})._init():a.data(this,d,new e(i,this))});return p}};a.Widget=function(a,b){arguments.length&&this._createWidget(a,b)};a.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:!1},_createWidget:function(b,d){a.data(d,this.widgetName,this);this.element=a(d);this.options=a.extend(!0,{},this.options,this._getCreateOptions(),
b);var e=this;this.element.bind("remove."+this.widgetName,function(){e.destroy()});this._create();this._trigger("create");this._init()},_getCreateOptions:function(){return a.metadata&&a.metadata.get(this.element[0])[this.widgetName]},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},widget:function(){return this.element},
option:function(d,e){var i=d;if(arguments.length===0)return a.extend({},this.options);if(typeof d==="string"){if(e===b)return this.options[d];i={};i[d]=e}this._setOptions(i);return this},_setOptions:function(b){var d=this;a.each(b,function(a,b){d._setOption(a,b)});return this},_setOption:function(a,b){this.options[a]=b;a==="disabled"&&this.widget()[b?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",b);return this},enable:function(){return this._setOption("disabled",
!1)},disable:function(){return this._setOption("disabled",!0)},_trigger:function(b,d,e){var j=this.options[b],d=a.Event(d);d.type=(b===this.widgetEventPrefix?b:this.widgetEventPrefix+b).toLowerCase();e=e||{};if(d.originalEvent)for(var b=a.event.props.length,n;b;)n=a.event.props[--b],d[n]=d.originalEvent[n];this.element.trigger(d,e);return!(a.isFunction(j)&&j.call(this.element[0],d,e)===!1||d.isDefaultPrevented())}}})(jQuery);
(function(a){var b=!1;a(document).mousedown(function(){b=!1});a.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var b=this;this.element.bind("mousedown."+this.widgetName,function(a){return b._mouseDown(a)}).bind("click."+this.widgetName,function(e){if(!0===a.data(e.target,b.widgetName+".preventClickEvent"))return a.removeData(e.target,b.widgetName+".preventClickEvent"),e.stopImmediatePropagation(),!1});this.started=!1},_mouseDestroy:function(){this.element.unbind("."+
this.widgetName)},_mouseDown:function(d){if(!b){this._mouseStarted&&this._mouseUp(d);this._mouseDownEvent=d;var e=this,g=d.which==1,h=typeof this.options.cancel=="string"?a(d.target).closest(this.options.cancel).length:!1;if(!g||h||!this._mouseCapture(d))return!0;this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet)this._mouseDelayTimer=setTimeout(function(){e.mouseDelayMet=!0},this.options.delay);if(this._mouseDistanceMet(d)&&this._mouseDelayMet(d)&&(this._mouseStarted=this._mouseStart(d)!==
!1,!this._mouseStarted))return d.preventDefault(),!0;!0===a.data(d.target,this.widgetName+".preventClickEvent")&&a.removeData(d.target,this.widgetName+".preventClickEvent");this._mouseMoveDelegate=function(a){return e._mouseMove(a)};this._mouseUpDelegate=function(a){return e._mouseUp(a)};a(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);d.preventDefault();return b=!0}},_mouseMove:function(b){if(a.browser.msie&&!(document.documentMode>=
9)&&!b.button)return this._mouseUp(b);if(this._mouseStarted)return this._mouseDrag(b),b.preventDefault();if(this._mouseDistanceMet(b)&&this._mouseDelayMet(b))(this._mouseStarted=this._mouseStart(this._mouseDownEvent,b)!==!1)?this._mouseDrag(b):this._mouseUp(b);return!this._mouseStarted},_mouseUp:function(b){a(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted)this._mouseStarted=!1,b.target==this._mouseDownEvent.target&&
a.data(b.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(b);return!1},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})})(jQuery);
(function(a){a.widget("ui.slider",a.ui.mouse,{widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null},_create:function(){var b=this,d=this.options,e=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),g=d.values&&d.values.length||1,h=[];this._mouseSliding=this._keySliding=!1;this._animateOff=!0;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass("ui-slider ui-slider-"+
this.orientation+" ui-widget ui-widget-content ui-corner-all"+(d.disabled?" ui-slider-disabled ui-disabled":""));this.range=a([]);if(d.range){if(d.range===!0){if(!d.values)d.values=[this._valueMin(),this._valueMin()];if(d.values.length&&d.values.length!==2)d.values=[d.values[0],d.values[0]]}this.range=a("<div></div>").appendTo(this.element).addClass("ui-slider-range ui-widget-header"+(d.range==="min"||d.range==="max"?" ui-slider-range-"+d.range:""))}for(var i=e.length;i<g;i+=1)h.push("<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>");
this.handles=e.add(a(h.join("")).appendTo(b.element));this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(a){a.preventDefault()}).hover(function(){d.disabled||a(this).addClass("ui-state-hover")},function(){a(this).removeClass("ui-state-hover")}).focus(function(){d.disabled?a(this).blur():(a(".ui-slider .ui-state-focus").removeClass("ui-state-focus"),a(this).addClass("ui-state-focus"))}).blur(function(){a(this).removeClass("ui-state-focus")});this.handles.each(function(b){a(this).data("index.ui-slider-handle",
b)});this.handles.keydown(function(d){var e=!0,g=a(this).data("index.ui-slider-handle"),h,i,C;if(!b.options.disabled){switch(d.keyCode){case a.ui.keyCode.HOME:case a.ui.keyCode.END:case a.ui.keyCode.PAGE_UP:case a.ui.keyCode.PAGE_DOWN:case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:if(e=!1,!b._keySliding&&(b._keySliding=!0,a(this).addClass("ui-state-active"),h=b._start(d,g),h===!1))return}C=b.options.step;h=b.options.values&&b.options.values.length?i=b.values(g):
i=b.value();switch(d.keyCode){case a.ui.keyCode.HOME:i=b._valueMin();break;case a.ui.keyCode.END:i=b._valueMax();break;case a.ui.keyCode.PAGE_UP:i=b._trimAlignValue(h+(b._valueMax()-b._valueMin())/5);break;case a.ui.keyCode.PAGE_DOWN:i=b._trimAlignValue(h-(b._valueMax()-b._valueMin())/5);break;case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:if(h===b._valueMax())return;i=b._trimAlignValue(h+C);break;case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:if(h===b._valueMin())return;i=b._trimAlignValue(h-C)}b._slide(d,
g,i);return e}}).keyup(function(d){var e=a(this).data("index.ui-slider-handle");if(b._keySliding)b._keySliding=!1,b._stop(d,e),b._change(d,e),a(this).removeClass("ui-state-active")});this._refreshValue();this._animateOff=!1},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();return this},_mouseCapture:function(b){var d=
this.options,e,g,h,i,j;if(d.disabled)return!1;this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();e=this._normValueFromMouse({x:b.pageX,y:b.pageY});g=this._valueMax()-this._valueMin()+1;i=this;this.handles.each(function(b){var d=Math.abs(e-i.values(b));g>d&&(g=d,h=a(this),j=b)});d.range===!0&&this.values(1)===d.min&&(j+=1,h=a(this.handles[j]));if(this._start(b,j)===!1)return!1;this._mouseSliding=!0;i._handleIndex=j;h.addClass("ui-state-active").focus();
d=h.offset();this._clickOffset=!a(b.target).parents().andSelf().is(".ui-slider-handle")?{left:0,top:0}:{left:b.pageX-d.left-h.width()/2,top:b.pageY-d.top-h.height()/2-(parseInt(h.css("borderTopWidth"),10)||0)-(parseInt(h.css("borderBottomWidth"),10)||0)+(parseInt(h.css("marginTop"),10)||0)};this.handles.hasClass("ui-state-hover")||this._slide(b,j,e);return this._animateOff=!0},_mouseStart:function(){return!0},_mouseDrag:function(a){var d=this._normValueFromMouse({x:a.pageX,y:a.pageY});this._slide(a,
this._handleIndex,d);return!1},_mouseStop:function(a){this.handles.removeClass("ui-state-active");this._mouseSliding=!1;this._stop(a,this._handleIndex);this._change(a,this._handleIndex);this._clickOffset=this._handleIndex=null;return this._animateOff=!1},_detectOrientation:function(){this.orientation=this.options.orientation==="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(a){var d;this.orientation==="horizontal"?(d=this.elementSize.width,a=a.x-this.elementOffset.left-(this._clickOffset?
this._clickOffset.left:0)):(d=this.elementSize.height,a=a.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0));d=a/d;d>1&&(d=1);d<0&&(d=0);this.orientation==="vertical"&&(d=1-d);a=this._valueMax()-this._valueMin();return this._trimAlignValue(this._valueMin()+d*a)},_start:function(a,d){var e={handle:this.handles[d],value:this.value()};if(this.options.values&&this.options.values.length)e.value=this.values(d),e.values=this.values();return this._trigger("start",a,e)},_slide:function(a,
d,e){var g;if(this.options.values&&this.options.values.length){g=this.values(d?0:1);if(this.options.values.length===2&&this.options.range===!0&&(d===0&&e>g||d===1&&e<g))e=g;e!==this.values(d)&&(g=this.values(),g[d]=e,a=this._trigger("slide",a,{handle:this.handles[d],value:e,values:g}),this.values(d?0:1),a!==!1&&this.values(d,e,!0))}else e!==this.value()&&(a=this._trigger("slide",a,{handle:this.handles[d],value:e}),a!==!1&&this.value(e))},_stop:function(a,d){var e={handle:this.handles[d],value:this.value()};
if(this.options.values&&this.options.values.length)e.value=this.values(d),e.values=this.values();this._trigger("stop",a,e)},_change:function(a,d){if(!this._keySliding&&!this._mouseSliding){var e={handle:this.handles[d],value:this.value()};if(this.options.values&&this.options.values.length)e.value=this.values(d),e.values=this.values();this._trigger("change",a,e)}},value:function(a){if(arguments.length)this.options.value=this._trimAlignValue(a),this._refreshValue(),this._change(null,0);else return this._value()},
values:function(b,d){var e,g,h;if(arguments.length>1)this.options.values[b]=this._trimAlignValue(d),this._refreshValue(),this._change(null,b);else if(arguments.length)if(a.isArray(arguments[0])){e=this.options.values;g=arguments[0];for(h=0;h<e.length;h+=1)e[h]=this._trimAlignValue(g[h]),this._change(null,h);this._refreshValue()}else return this.options.values&&this.options.values.length?this._values(b):this.value();else return this._values()},_setOption:function(b,d){var e,g=0;if(a.isArray(this.options.values))g=
this.options.values.length;a.Widget.prototype._setOption.apply(this,arguments);switch(b){case "disabled":d?(this.handles.filter(".ui-state-focus").blur(),this.handles.removeClass("ui-state-hover"),this.handles.attr("disabled","disabled"),this.element.addClass("ui-disabled")):(this.handles.removeAttr("disabled"),this.element.removeClass("ui-disabled"));break;case "orientation":this._detectOrientation();this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation);
this._refreshValue();break;case "value":this._animateOff=!0;this._refreshValue();this._change(null,0);this._animateOff=!1;break;case "values":this._animateOff=!0;this._refreshValue();for(e=0;e<g;e+=1)this._change(null,e);this._animateOff=!1}},_value:function(){return this._trimAlignValue(this.options.value)},_values:function(a){var d,e;if(arguments.length)return d=this.options.values[a],this._trimAlignValue(d);else{d=this.options.values.slice();for(e=0;e<d.length;e+=1)d[e]=this._trimAlignValue(d[e]);
return d}},_trimAlignValue:function(a){if(a<=this._valueMin())return this._valueMin();if(a>=this._valueMax())return this._valueMax();var d=this.options.step>0?this.options.step:1,e=(a-this._valueMin())%d;alignValue=a-e;Math.abs(e)*2>=d&&(alignValue+=e>0?d:-d);return parseFloat(alignValue.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var b=this.options.range,d=this.options,e=this,g=!this._animateOff?d.animate:!1,h,
i={},j,n,p,u;if(this.options.values&&this.options.values.length)this.handles.each(function(b){h=(e.values(b)-e._valueMin())/(e._valueMax()-e._valueMin())*100;i[e.orientation==="horizontal"?"left":"bottom"]=h+"%";a(this).stop(1,1)[g?"animate":"css"](i,d.animate);if(e.options.range===!0)if(e.orientation==="horizontal"){if(b===0)e.range.stop(1,1)[g?"animate":"css"]({left:h+"%"},d.animate);if(b===1)e.range[g?"animate":"css"]({width:h-j+"%"},{queue:!1,duration:d.animate})}else{if(b===0)e.range.stop(1,
1)[g?"animate":"css"]({bottom:h+"%"},d.animate);if(b===1)e.range[g?"animate":"css"]({height:h-j+"%"},{queue:!1,duration:d.animate})}j=h});else{n=this.value();p=this._valueMin();u=this._valueMax();h=u!==p?(n-p)/(u-p)*100:0;i[e.orientation==="horizontal"?"left":"bottom"]=h+"%";this.handle.stop(1,1)[g?"animate":"css"](i,d.animate);if(b==="min"&&this.orientation==="horizontal")this.range.stop(1,1)[g?"animate":"css"]({width:h+"%"},d.animate);if(b==="max"&&this.orientation==="horizontal")this.range[g?"animate":
"css"]({width:100-h+"%"},{queue:!1,duration:d.animate});if(b==="min"&&this.orientation==="vertical")this.range.stop(1,1)[g?"animate":"css"]({height:h+"%"},d.animate);if(b==="max"&&this.orientation==="vertical")this.range[g?"animate":"css"]({height:100-h+"%"},{queue:!1,duration:d.animate})}}});a.extend(a.ui.slider,{version:"1.8.14"})})(jQuery);(function(a){a.fn.checkbox=function(b){try{document.execCommand("BackgroundImageCache",!1,!0)}catch(d){}var e={cls:"jquery-checkbox",empty:"empty.png"},e=a.extend(e,b||{}),g=function(b){var d=b.checked,e=b.disabled,g=a(b);b.stateInterval&&clearInterval(b.stateInterval);b.stateInterval=setInterval(function(){b.disabled!=e&&g.trigger((e=!!b.disabled)?"disable":"enable");b.checked!=d&&g.trigger((d=!!b.checked)?"check":"uncheck")},10);return g};return this.each(function(){var b=this,d=g(b);b.wrapper&&
b.wrapper.remove();b.wrapper=a('<span class="'+e.cls+'"><span class="mark"><img src="'+e.empty+'" /></span></span>');b.wrapperInner=b.wrapper.children("span");b.wrapper.hover(function(){b.wrapperInner.addClass(e.cls+"-hover")},function(){b.wrapperInner.removeClass(e.cls+"-hover")});d.css({position:"absolute",zIndex:-1}).after(b.wrapper);var j=d.parents("label");j.length?j.click(function(b){d.trigger("click",[b]);return a.browser.msie&&a.browser.version<7}):b.wrapper.click(function(a){d.trigger("click",
[a])});delete j;d.bind("disable",function(){b.wrapperInner.addClass(e.cls+"-disabled")}).bind("enable",function(){b.wrapperInner.removeClass(e.cls+"-disabled")});d.bind("check",function(){b.wrapper.addClass(e.cls+"-checked")}).bind("uncheck",function(){b.wrapper.removeClass(e.cls+"-checked")});a("img",b.wrapper).bind("dragstart",function(){return!1}).bind("mousedown",function(){return!1});window.getSelection&&b.wrapper.css("MozUserSelect","none");b.checked&&b.wrapper.addClass(e.cls+"-checked");b.disabled&&
b.wrapperInner.addClass(e.cls+"-disabled")})}})(jQuery);jQuery.easing.jswing=jQuery.easing.swing;
jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(a,b,d,e,g){return jQuery.easing[jQuery.easing.def](a,b,d,e,g)},easeInQuad:function(a,b,d,e,g){return e*(b/=g)*b+d},easeOutQuad:function(a,b,d,e,g){return-e*(b/=g)*(b-2)+d},easeInOutQuad:function(a,b,d,e,g){if((b/=g/2)<1)return e/2*b*b+d;return-e/2*(--b*(b-2)-1)+d},easeInCubic:function(a,b,d,e,g){return e*(b/=g)*b*b+d},easeOutCubic:function(a,b,d,e,g){return e*((b=b/g-1)*b*b+1)+d},easeInOutCubic:function(a,b,d,e,g){if((b/=g/2)<1)return e/
2*b*b*b+d;return e/2*((b-=2)*b*b+2)+d},easeInQuart:function(a,b,d,e,g){return e*(b/=g)*b*b*b+d},easeOutQuart:function(a,b,d,e,g){return-e*((b=b/g-1)*b*b*b-1)+d},easeInOutQuart:function(a,b,d,e,g){if((b/=g/2)<1)return e/2*b*b*b*b+d;return-e/2*((b-=2)*b*b*b-2)+d},easeInQuint:function(a,b,d,e,g){return e*(b/=g)*b*b*b*b+d},easeOutQuint:function(a,b,d,e,g){return e*((b=b/g-1)*b*b*b*b+1)+d},easeInOutQuint:function(a,b,d,e,g){if((b/=g/2)<1)return e/2*b*b*b*b*b+d;return e/2*((b-=2)*b*b*b*b+2)+d},easeInSine:function(a,
b,d,e,g){return-e*Math.cos(b/g*(Math.PI/2))+e+d},easeOutSine:function(a,b,d,e,g){return e*Math.sin(b/g*(Math.PI/2))+d},easeInOutSine:function(a,b,d,e,g){return-e/2*(Math.cos(Math.PI*b/g)-1)+d},easeInExpo:function(a,b,d,e,g){return b==0?d:e*Math.pow(2,10*(b/g-1))+d},easeOutExpo:function(a,b,d,e,g){return b==g?d+e:e*(-Math.pow(2,-10*b/g)+1)+d},easeInOutExpo:function(a,b,d,e,g){if(b==0)return d;if(b==g)return d+e;if((b/=g/2)<1)return e/2*Math.pow(2,10*(b-1))+d;return e/2*(-Math.pow(2,-10*--b)+2)+d},
easeInCirc:function(a,b,d,e,g){return-e*(Math.sqrt(1-(b/=g)*b)-1)+d},easeOutCirc:function(a,b,d,e,g){return e*Math.sqrt(1-(b=b/g-1)*b)+d},easeInOutCirc:function(a,b,d,e,g){if((b/=g/2)<1)return-e/2*(Math.sqrt(1-b*b)-1)+d;return e/2*(Math.sqrt(1-(b-=2)*b)+1)+d},easeInElastic:function(a,b,d,e,g){var a=1.70158,h=0,i=e;if(b==0)return d;if((b/=g)==1)return d+e;h||(h=g*0.3);i<Math.abs(e)?(i=e,a=h/4):a=h/(2*Math.PI)*Math.asin(e/i);return-(i*Math.pow(2,10*(b-=1))*Math.sin((b*g-a)*2*Math.PI/h))+d},easeOutElastic:function(a,
b,d,e,g){var a=1.70158,h=0,i=e;if(b==0)return d;if((b/=g)==1)return d+e;h||(h=g*0.3);i<Math.abs(e)?(i=e,a=h/4):a=h/(2*Math.PI)*Math.asin(e/i);return i*Math.pow(2,-10*b)*Math.sin((b*g-a)*2*Math.PI/h)+e+d},easeInOutElastic:function(a,b,d,e,g){var a=1.70158,h=0,i=e;if(b==0)return d;if((b/=g/2)==2)return d+e;h||(h=g*0.3*1.5);i<Math.abs(e)?(i=e,a=h/4):a=h/(2*Math.PI)*Math.asin(e/i);if(b<1)return-0.5*i*Math.pow(2,10*(b-=1))*Math.sin((b*g-a)*2*Math.PI/h)+d;return i*Math.pow(2,-10*(b-=1))*Math.sin((b*g-a)*
2*Math.PI/h)*0.5+e+d},easeInBack:function(a,b,d,e,g,h){h==void 0&&(h=1.70158);return e*(b/=g)*b*((h+1)*b-h)+d},easeOutBack:function(a,b,d,e,g,h){h==void 0&&(h=1.70158);return e*((b=b/g-1)*b*((h+1)*b+h)+1)+d},easeInOutBack:function(a,b,d,e,g,h){h==void 0&&(h=1.70158);if((b/=g/2)<1)return e/2*b*b*(((h*=1.525)+1)*b-h)+d;return e/2*((b-=2)*b*(((h*=1.525)+1)*b+h)+2)+d},easeInBounce:function(a,b,d,e,g){return e-jQuery.easing.easeOutBounce(a,g-b,0,e,g)+d},easeOutBounce:function(a,b,d,e,g){return(b/=g)<1/
2.75?e*7.5625*b*b+d:b<2/2.75?e*(7.5625*(b-=1.5/2.75)*b+0.75)+d:b<2.5/2.75?e*(7.5625*(b-=2.25/2.75)*b+0.9375)+d:e*(7.5625*(b-=2.625/2.75)*b+0.984375)+d},easeInOutBounce:function(a,b,d,e,g){if(b<g/2)return jQuery.easing.easeInBounce(a,b*2,0,e,g)*0.5+d;return jQuery.easing.easeOutBounce(a,b*2-g,0,e,g)*0.5+e*0.5+d}});
jQuery.fn.highlight=function(a){function b(a,e){var g=0;if(a.nodeType==3){var h=a.data.toUpperCase().indexOf(e);if(h>=0){g=document.createElement("span");g.className="highlight";h=a.splitText(h);h.splitText(e.length);var i=h.cloneNode(!0);g.appendChild(i);h.parentNode.replaceChild(g,h);g=1}}else if(a.nodeType==1&&a.childNodes&&!/(script|style)/i.test(a.tagName))for(h=0;h<a.childNodes.length;++h)h+=b(a.childNodes[h],e);return g}return this.each(function(){b(this,a.toUpperCase())})};
jQuery.fn.removeHighlight=function(){return this.find("span.highlight").each(function(){with(this.parentNode)replaceChild(this.firstChild,this),normalize()}).end()};(function(a){function b(a){return typeof a=="object"?a:{top:a,left:a}}var d=a.scrollTo=function(b,d,h){a(window).scrollTo(b,d,h)};d.defaults={axis:"xy",duration:parseFloat(a.fn.jquery)>=1.3?0:1};d.window=function(){return a(window)._scrollable()};a.fn._scrollable=function(){return this.map(function(){if(this.nodeName&&a.inArray(this.nodeName.toLowerCase(),["iframe","#document","html","body"])==-1)return this;var b=(this.contentWindow||this).document||this.ownerDocument||this;return a.browser.safari||
b.compatMode=="BackCompat"?b.body:b.documentElement})};a.fn.scrollTo=function(e,g,h){typeof g=="object"&&(h=g,g=0);typeof h=="function"&&(h={onAfter:h});e=="max"&&(e=9E9);h=a.extend({},d.defaults,h);g=g||h.speed||h.duration;h.queue=h.queue&&h.axis.length>1;h.queue&&(g/=2);h.offset=b(h.offset);h.over=b(h.over);return this._scrollable().each(function(){function i(a){n.animate(v,g,h.easing,a&&function(){a.call(this,e,h)})}var j=this,n=a(j),p=e,u,v={},C=n.is("html,body");switch(typeof p){case "number":case "string":if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(p)){p=
b(p);break}p=a(p,this);case "object":if(p.is||p.style)u=(p=a(p)).offset()}a.each(h.axis.split(""),function(a,b){var e=b=="x"?"Left":"Top",g=e.toLowerCase(),t="scroll"+e,G=j[t],A=d.max(j,b);u?(v[t]=u[g]+(C?0:G-n.offset()[g]),h.margin&&(v[t]-=parseInt(p.css("margin"+e))||0,v[t]-=parseInt(p.css("border"+e+"Width"))||0),v[t]+=h.offset[g]||0,h.over[g]&&(v[t]+=p[b=="x"?"width":"height"]()*h.over[g])):(e=p[g],v[t]=e.slice&&e.slice(-1)=="%"?parseFloat(e)/100*A:e);/^\d+$/.test(v[t])&&(v[t]=v[t]<=0?0:Math.min(v[t],
A));!a&&h.queue&&(G!=v[t]&&i(h.onAfterFirst),delete v[t])});i(h.onAfter)}).end()};d.max=function(b,d){var h=d=="x"?"Width":"Height",i="scroll"+h;if(!a(b).is("html,body"))return b[i]-a(b)[h.toLowerCase()]();var h="client"+h,j=b.ownerDocument.documentElement,n=b.ownerDocument.body;return Math.max(j[i],n[i])-Math.min(j[h],n[h])}})(jQuery);(function(a){var b=a.serialScroll=function(b){return a(window).serialScroll(b)};b.defaults={duration:1E3,axis:"x",event:"click",start:0,step:1,lock:!0,cycle:!0,constant:!0};a.fn.serialScroll=function(d){return this.each(function(){function e(a){a.data+=J;g(a,this)}function g(a,b){if(!isNaN(b))a.data=b;var d=a.data,e=a.type,g=n.exclude?i().slice(0,-n.exclude):i(),j=g.length,p=g[d],m=n.duration;e&&a.preventDefault();t&&(clearTimeout(A),A=setTimeout(h,n.interval));if(!p){d=d<0?0:j-1;if(J==d)if(n.cycle)d=
j-d-1;else return;p=g[d]}if(p&&!(n.lock&&x.is(":animated")||e&&n.onBefore&&n.onBefore(a,p,x,i(),d)===!1))n.stop&&x.queue("fx",[]).stop(),n.constant&&(m=Math.abs(m/u*(J-d))),x.scrollTo(p,m,n).trigger("notify.serialScroll",[d])}function h(){x.trigger("next.serialScroll")}function i(){return a(D,M)}function j(a){if(!isNaN(a))return a;for(var b=i(),d;(d=b.index(a))==-1&&a!=M;)a=a.parentNode;return d}var n=a.extend({},b.defaults,d),p=n.event,u=n.step,v=n.lazy,C=n.target?this:document,x=a(n.target||this,
C),M=x[0],D=n.items,J=n.start,t=n.interval,G=n.navigation,A;v||(D=i());n.force&&g({},J);a(n.prev||[],C).bind(p,-u,e);a(n.next||[],C).bind(p,u,e);M.ssbound||x.bind("prev.serialScroll",-u,e).bind("next.serialScroll",u,e).bind("goto.serialScroll",g);t&&x.bind("start.serialScroll",function(){t||(clearTimeout(A),t=!0,h())}).bind("stop.serialScroll",function(){clearTimeout(A);t=!1});x.bind("notify.serialScroll",function(a,b){var d=j(b);d>-1&&(J=d)});M.ssbound=!0;n.jump&&(v?x:i()).bind(p,function(a){g(a,
j(a.target))});G&&(G=a(G,C).bind(p,function(a){a.data=Math.round(i().length/G.length)*G.index(this);g(a,this)}))})}})(jQuery);(function(a){a.fn.alertMessage=function(b){var d=b.start||'<div class="validation-message"><div class="arrow"></div><span>',e=b.end||"</span></div>",g=b.msg,h=b.timeout||5E3,i=b.top||a(this).position().top,b=b.left||a(this).position().left,j=a(d+g+e).insertAfter(a(this)).hide();j.css({left:b,top:i-j.outerHeight()});j.fadeIn();setTimeout(function(){j.fadeOut()},h);return a(this)};a.fn.autogrow=function(b){var b=b||{},d=b.maxHeight||200;a(this).filter("textarea").each(function(){var b=parseInt(a(this).css("line-height"))||
16,g=parseInt(a(this).css("padding-top"))+parseInt(a(this).css("padding-bottom"))||0;a(this).css("overflow","hidden");a(this).data("originalHeight",a(this).css("height"));a(this).bind("keyup",function(){var h=this.scrollHeight,i=this.clientHeight;if(i>=d)return a(this).css("overflow","auto"),!1;h>i&&a(this).css("height",h+b*2-g+"px")})});return a(this)};a.fn.buttonMessage=function(b){var b=b||{},d=b.msg,e=b.animated,g=b.disable,h=b.timeout;a.clearValidationErrors();a(this).each(function(){var b=a(this).parent().addClass("action-message");
e?b.addClass("animated"):b.removeClass("animated");g?b.find("button").css("visibility","hidden"):b.find("button").css("visibility","visible");b.find(".message").html(d);h&&setTimeout(function(){b.find(".message").empty();b.removeClass("action-message");b.removeClass("animated");b.find("button").css("visibility","visible")},h)});return a(this)};a.fn.emailLinkBuilder=function(){if(!this||!this[0])return!1;a(this).each(function(){var b=a(this).attr("rel"),d=a(this).attr("subdomain")||"brewmance",e=a(this).attr("domain")||
"com";a(this).attr({href:"mailto:"+b+"@"+d+"."+e})});return a(this)};a.fn.loader=function(b){var b=b||{},d=b.loader;b.append?a(this).append(d):a(this).hide().addClass("hidden-by-loader").after(d);return a(this)};a.fn.placeholder=function(){a(this).each(function(){if(a(this).data("placeholder"))return!0;a(this).data("placeholder",a(this).val());a(this).focus(function(){a(this).val()==a(this).data("placeholder")&&(a(this).val(""),a(this).removeClass("placeholder"))});a(this).blur(function(){a(this).val()==
""&&(a(this).addClass("placeholder"),a(this).val(a(this).data("placeholder")))})});return a(this)};a.fn.validationError=function(b){var b=b||{},d=b.msg;a.clearValidationErrors();a(this).each(function(){a(this).parent().addClass("validation-error");d&&a(this).alertMessage({msg:d})});return a(this)};a.clearValidationErrors=function(){a(".validation-message").parent().removeClass("validation-error").end().remove()}})(jQuery);String.prototype.isEmail=function(){return RegExp(/^\s*[\w\-\+_]+(\.[\w\-\+_]+)*\@[\w\-\+_]+\.[\w\-\+_]+(\.[\w\-\+_]+)*\s*$/).test(this)};
String.prototype.isABC=function(){return RegExp(/^[a-zA-Z0-9\-_]*$/).test(this)};var BM=function(){if(BM.__instance)return BM.__instance;else BM.__instance=this;this.loader='<img src="/static/images/no-index/loader.gif" alt="loader" class="loader" title="loading..."/>';this.loaderDark='<img src="/static/images/no-index/loader-dark.gif" alt="loader" class="loader" title="loading..."/>';this.loaderBar='<img src="/static/images/no-index/pbar-ani.gif" alt="loader bar" class="hide" />';this.suggestLoader='<ul><li class="message">'+this.loader+" Loading...</li></ul>";this.beerSuggestAction=
"/util/beer-search";this.isLoggedIn=$("#isLoggedIn").length>0;this.source={MY_QUEUE:1,USER_REVIEWS:2,USER_QUEUE:3,BEER_PROFILE:4,BREWERY_PROFILE:5,PUB_MENU:6};BM.Controller.init()};
BM.analytics={setCustomer:function(){if(bm.isLoggedIn)try{pageTracker._setVar("customer")}catch(a){}},trackEvent:function(a){if(!a)return!1;if(!a.category)a.category=$("body").attr("id");if(!a.action)return!1;try{pageTracker._trackEvent(a.category,a.action,a.label,a.value)}catch(b){}},trackPage:function(a){if(!a)return!1;if(!a.page)return!1;if($.browser.msie)a.page=a.page.replace("http://www.brewmance.com","");try{pageTracker._trackPageview(a.page)}catch(b){}}};
BM.Cookie={create:function(a,b,d){if(d){var e=new Date;e.setTime(e.getTime()+d*864E5);d="; expires="+e.toGMTString()}else d="";document.cookie=a+"="+b+d+"; path=/"},read:function(a){a+="=";for(var b=document.cookie.split(";"),d=0;d<b.length;d++){for(var e=b[d];e.charAt(0)==" ";)e=e.substring(1,e.length);if(e.indexOf(a)==0)return e.substring(a.length,e.length)}return null},erase:function(a){this.create(a,"",-1)}};BM.prototype.reset=function(){$.clearValidationErrors();$(".hidden-by-loader").show().next().filter(".loader").remove().end().removeClass("hidden-by-loader")};
BM.prototype.queue={_init:function(){this.q=$(".brew-queue");this.form=this.q.find("form");this.searchbox=this.q.find(".beer-suggest");this.removeButton=this.q.find(".removeFromQueue");this.reviewButton=this.q.find(".addReview");bm.queue.beerSuggest({searchbox:this.searchbox,action:bm.beerSuggestAction});this.searchbox.closest("form").submit(function(a){a.preventDefault();bm.queue.searchbox.val().length||bm.queue.searchbox.validationError({msg:"Please begin typing a beer name."});return!1});this.reviewButton.click(function(){var a=
$(this).closest("li").find("[name='id']").val(),b=$(this).closest("li").find(".beerName").text(),d={id:a,name:b};if(bm.post.active&&bm.post.elems.form.is(":visible"))return bm.post.tagBeer(d),!1;if(BM.Frames.hasInstance()){var e=BM.Frames.getInstance();e.delegate.didDisplayFrame=function(a){a=="post"&&(bm.post.tagBeer(d),delete e.delegate.didDisplayFrame)};e.openFrameWithId("post");return!1}});this.removeButton.click(bm.queue.remove)},add:function(a){$.ajax({url:a.action,type:"GET",data:a.data,dataType:"json",
error:function(b){a.addError(b.responseText)},success:function(b){b.code===0?a.addSuccess(b):a.addError(b.msg)}})},addAndDraw:function(a){var b=a.beerName,d=a.beerId,e=a.beerUrl,g=a.idField;if(this.q.children("input[value='"+d+"']").length)return this.searchbox.alertMessage({msg:a.beerName+" is already in your list"}),!1;var h=this.q.find(".template").clone(!0).removeClass("template").appendTo(this.q);h.find("[name='id']").val(d);a=h.find(".removeFromQueue").attr("href");h.find(".removeFromQueue").attr({href:a+
d}).attr("title","Remove "+b+" from your queue");h.find(".beerName").text(b).attr({href:e});h.find(".addReview").attr({href:e+"/post"}).attr({title:"Add "+b+" to a new post"});this.q.children("li:visible:last").hasClass("alt")&&h.removeClass("alt");this.q.find(".image-tip").hide();h.removeClass("hide");this.add({data:{beer:d},action:this.form.attr("action"),addError:function(a){a=a||"We couldn't add your beer at this time";h.stop().css("opacity","0.5").show().alertMessage({msg:a});setTimeout(function(){h.fadeOut("normal",
function(){$(this).remove()});$.clearValidationErrors()},4E3);g.val("").blur()},addSuccess:function(){g.val("").blur()}})},beerSuggest:function(a){var b=a.searchbox.siblings("input[name='beer']");$.extend(a,{delegate:{onResultClick:function(d){if(!d)return!1;a.searchbox.val("");b.val(d.id);bm.queue.addAndDraw({beerName:d.name,beerId:d.id,beerUrl:d.url,idField:b})}}});this.beerSuggest=new BM.Suggest(a)},remove:function(a){var a=$(a.target).closest("a"),b=a.attr("href"),d=a.closest("li");$.ajax({url:b,
type:"GET",dataType:"json",error:function(){d.stop().css("opacity","0.5").show().alertMessage({msg:"We couldn't remove your beer at this time."});setTimeout(function(){d.css("opacity","1.0");$.clearValidationErrors()},4E3)},success:function(){d.remove()}});d.fadeOut("slow");return!1}};
BM.prototype.scroller=function(a){var b=a.find(".scrollContainer > .panel"),d=a.find(".scrollContainer");if(!b.length||!d.length)return!1;b.css({"float":"left",position:"relative"});d.css("width",b[0].offsetWidth*b.length);var e=a.find(".scroll").css("overflow","hidden"),g=a.find(".scroll-nav"),d=parseInt(d.css("paddingTop")||0,10)*-1;a.serialScroll({target:e,items:b,prev:".prev",next:".next",axis:"x",navigation:g,onBefore:function(a,b,d,e,p){g.filter(".sel").removeClass("sel");g.filter("[href='#"+
b.id+"']").addClass("sel");p===0?$(".prev").hide():$(".prev").show();p==e.length-1?($(".next").hide(),$(".submit").show()):($(".next").show(),$(".submit").hide())},offset:d,duration:400,constant:!1,easing:"easeInQuad"})};
BM.prototype.signup={bind:function(a){var b=a.find(".submit"),d=a.find(":text"),e=d.filter("[name='handle']");d.focus(function(){$(this).closest(".table-cell").addClass("active-row")});d.blur(function(){$(this).closest(".table-cell").removeClass("active-row")});$(bm.loader).hide().appendTo($("body"));a.submit(function(){bm.reset();if(!e.val().length)return e.validationError({msg:"user handle is required."}),!1;if(!e.val().isABC())return e.validationError({msg:"user handle can only contain numbers or letters."}),
!1;b.find("img").loader({loader:bm.loader});$.ajax({type:"POST",url:a.attr("action"),data:a.serializeArray(),dataType:"json",error:function(a,d){bm.reset();b.alertMessage({msg:"We can't sign you up at this time. Please try again later. ("+d+")"})},success:function(a){a.code=="0"?(BM.analytics.trackPage({page:"/signup/success"}),window.location=a.redirect):a.code=="-101"?(bm.reset(),e.validationError({msg:a.msg})):(bm.reset(),b.alertMessage({msg:a.msg}))}});return!1})}};
BM.prototype.questions={_init:function(){this.form=$("#quiz");this.submitButton=this.form.find(".submit");this.results=$("#results");this.saveBox=$("#SaveBox");this.beers=[];this.count=this.form.find(".bullet-list").length;this.requiredAnswers=1;bm.scroller($("#questions"));this.bindForm(this.form);$("input:radio").checkbox({empty:"/static/images/no-index/empty.png"});$(bm.loader).hide().appendTo($("body"))},bindForm:function(a){var b=this.submitButton;$(window).bind("keydown",function(a){if(a.keyCode==
37)return $(".prev:visible").click(),!1;if(a.keyCode==39)return $(".next:visible").click(),!1});a.submit(function(){b.attr("disabled","disabled");BM.analytics.trackEvent({category:"quiz",action:"submit"});BM.analytics.trackPage({page:"/util/quiz/submit"});var d=bm.questions.results.find(".results-list").html(),e=[];a.find(":radio:checked").each(function(){e.push($(this).val())});if(e.length<bm.questions.requiredAnswers)return a.find(".submit").alertMessage({msg:"Please fill out all questions for best results!"}),
a.find(".submit").removeAttr("disabled"),a.find(".bullet-list").each(function(a){if(!$(this).find(":radio:checked").length)return $(".scroll-nav[href='#question"+(a+1)+"']").click(),!1}),!1;$(".scroll").hide();bm.questions.results.show().find(".results-list").loader({loader:bm.loader,append:!0});$.ajax({url:a.attr("action"),type:a.attr("method"),data:{answers:e},dataType:"json",error:function(){g()},success:function(b){bm.questions.results.css("height","335px");setTimeout(function(){if(b.code===0)if(bm.questions.beers=
b.beers,$("#questions .actions").slideUp(),a.find(".submit").removeAttr("disabled"),b.beers.length>0){bm.questions.results.find(".results-list").html('<h2>Based on your answers, we suggest these beers:</h2><ul class="beers"></ul><ul class="tried-buttons"></ul>');var d=0,e=setInterval(function(){var a='<li><img src="'+b.beers[d].image+'" alt="'+b.beers[d].name+'">';a+='<a href="'+b.beers[d].url+'" class="name">'+b.beers[d].name+"</a>";a+='<span class="brewery">'+b.beers[d].brewery+"</span>";a+="</li>";
var g=[$(a).appendTo(bm.questions.results.find(".beers")).hide()];bm.isLoggedIn&&g.push($('<li><a href="javascript:;" class="sel"><img src="/static/images/no-index/empty.png" class="icon-20 icon-check"/> Save it</a></li>').appendTo(bm.questions.results.find(".tried-buttons")).hide());setTimeout(function(){$(g).each(function(){$(this).fadeIn()})},500);d++;d==b.beers.length&&(clearInterval(e),bm.isLoggedIn&&(a=$('<a href="'+bm.questions.saveLink()+'" class="save-link action-button medium-blue">'+bm.questions.saveText()+
"</a>"),bm.questions.saveBox.html(a).append('<div class="clear"></div>'),bm.questions.queueChooser()),setTimeout(function(){bm.questions.saveBox.fadeIn()},500))},400)}else g();else g()},600)}});var g=function(){bm.questions.results.find(".results-list").html("<h2>Something wen't wrong</h2><p>Please try submitting again in a few minutes.</p>");a.find(".submit").removeAttr("disabled");setTimeout(function(){bm.questions.results.fadeOut("normal",function(){$(".scroll").show();bm.questions.results.html(d);
$(".scroll-nav:first").click();$("#questions .actions").slideDown()})},2200)};return!1})},queueChooser:function(){var a=this,b=this.results.find(".tried-buttons li");this.results.find(".beers li");var d=this.results.find(".save-link");b.click(function(b){b=$(b.target).closest("a");if(b.length==0)return!1;b.hasClass("sel")?b.removeClass("sel"):b.addClass("sel");d.attr("href",a.saveLink());d.text(a.saveText())})},saveLink:function(){for(var a=this.results.find(".tried-buttons li"),b="",d=0;d<a.length;d++)$(a[d]).find(".sel").length>
0&&(b+="beer="+this.beers[d].key,d!=a.length-1&&(b+="&amp;"));return"/util/add-to-queue?"+b},saveText:function(){var a=this.results.find(".tried-buttons .sel").length;if(a==0)return"Continue to your profile";return"Save "+a+" brews to your queue"}};BM.Suggest=function(a){function b(a){var b={q:a};h.load(e,b,function(){h.find("li.match:first").addClass("sel");h.find("li.match").highlight(a);$.isFunction(g.didLoadResults)&&g.didLoadResults(b)})}var d=a.searchbox,e=a.action,g=a.delegate||{},h=d.siblings(".suggestions"),i=bm.suggestLoader;d.bind("keydown",function(a){var b=h.find(".sel"),a=a.keyCode;if(a==13&&b.length)return b.find("a").click(),!1;if(!b.length&&(a==38||a==40)&&h.is(":visible"))return h.find("li.match:first").addClass("sel"),!1;
if(a==38)return b.prev("li.match").length&&(b.removeClass("sel"),b.prev("li.match").addClass("sel")),!1;if(a==40&&h.is(":visible"))return b.next("li.match").length&&(b.removeClass("sel"),b.next("li.match").addClass("sel")),!1});d.bind("keyup",function(a){a=a.keyCode;if(a==40&&h.is(":hidden")&&h.html().length>0)return h.show(),!1;if(a!=8&&a!=27&&a!=46&&!(a>=48&&a<=111))return!1;a==27&&(d.val(""),$.clearValidationErrors());d.removeClass("set");h.find(".loader").length==0&&h.html(i).show();clearTimeout(BM.typeAheadTimeout);
d.val().length?BM.typeAheadTimeout=setTimeout(function(){h.show();b(d.val())},350):h.hide().empty()});d.bind("blur",function(){h.fadeOut("fast")});d.bind("focus",function(){clearTimeout(void 0);(d.val().length==0||d.hasClass("placeholder"))&&b("b")});h.bind("mouseenter",function(){h.find(".sel").removeClass("sel")});h.bind("mouseleave",function(a){$(a.target).closest("li.match").addClass("sel")});h.bind("click",function(a){clearTimeout(void 0);var b=$(a.target);if(b.closest(".match").length){var a=
b.closest("a").find(".key").text(),d=b.closest("a").find(".id").val(),b=b.closest("a").find(".url").val();if($.isFunction(g.onResultClick))g.onResultClick({name:a,id:d,url:b});h.hide().empty()}else b.hasClass("addBeer")&&$.isFunction(g.addBeer)&&(g.addBeer(),h.hide().empty());return!1})};BM.addBeer=function(a){this.action="/beer/create";this.form=a.form;this.delegate=a.delegate||{};this.submitButton=a.submitButton||this.form.find("button.addBeer");this.cancelButton=a.cancelButton||this.form.find("button.cancel");this.fields={name:this.form.find("input[name='newBeer.name']"),breweryKey:this.form.find("input[name='newBeer.brewery']"),breweryText:this.form.find("input[name='brewery-suggest']"),styleKey:this.form.find("input[name='newBeer.style']"),styleText:this.form.find("input[name='style-suggest']"),
abv:this.form.find("input[name='newBeer.abv']")};var b=this;this.submitButton.click(function(){b.submit();return!1});this.cancelButton.click(function(){b.cancel();return!1});this.brewerySuggest=new BM.Suggest({searchbox:this.fields.breweryText,action:"/util/search/brewery",delegate:{onResultClick:function(a){if(!a)return!1;b.fields.breweryText.val(a.name).addClass("set");b.fields.breweryKey.val(a.id);b.fields.styleText.focus()}}});this.styleSuggest=new BM.Suggest({searchbox:this.fields.styleText,
action:"/util/search/style",delegate:{onResultClick:function(a){if(!a)return!1;b.fields.styleText.val(a.name).addClass("set");b.fields.styleKey.val(a.id);b.fields.abv.focus()}}})};
BM.addBeer.prototype={submit:function(){var a=this;if(this.fields.name.hasClass("placeholder")||this.fields.name.val().length===0)this.fields.name.alertMessage({msg:"A beer name is required."});else if(this.fields.breweryText.hasClass("placeholder")||this.fields.breweryText.val().length===0)this.fields.breweryText.alertMessage({msg:"A brewery name is required."});else if(this.fields.styleText.val().length===0)this.fields.styleText.alertMessage({msg:"A beer style is required"});else if(this.fields.styleText.hasClass("set"))if(isNaN(this.fields.abv.val())||
parseFloat(this.fields.abv.val())<=0||parseFloat(this.fields.abv.val())>=100)this.fields.abv.alertMessage({msg:"Please enter a valid number for ABV"});else{var b={name:this.fields.name.val(),breweryKey:this.fields.breweryText.hasClass("set")?this.fields.breweryKey.val():"",breweryText:this.fields.breweryText.val(),styleKey:this.fields.styleKey.val(),abv:this.fields.abv.hasClass("placeholder")?"":this.fields.abv.val()};$.ajax({url:a.action,type:"POST",dataType:"json",data:b,success:function(b){switch(b.code){case 0:$.isFunction(a.delegate.addBeerSuccess)&&
a.delegate.addBeerSuccess(b.beer);break;default:b={code:b.code,msg:b.msg},$.isFunction(a.delegate.addBeerFailure)&&a.delegate.addBeerFailure(b)}},error:function(b,e){var g={code:-300,msg:e};$.isFunction(a.delegate.addBeerFailure)&&a.delegate.addBeerFailure(g)}})}else this.fields.styleText.alertMessage({msg:"New styles aren't allowed at this time. Please select one from the list."})},cancel:function(){this.reset();$.isFunction(this.delegate.addBeerCancel)&&this.delegate.addBeerCancel()},reset:function(){$.each(this.fields,
function(a,b){b.val("").blur()})},setBeerName:function(a){this.fields.name.val(a).removeClass("placeholder")}};BM.Frames=function(a){this.nav=a.nav;this.frames=a.frames;this.delegate=a.delegate||{};this.openHash="";var b=this;BM.Frames.__instance=this;if(!$("#frame-").length)return!1;this.nav.click(function(){b.open($(this).attr("href"));b.nav.removeClass("sel");$(this).addClass("sel");$.isFunction(b.delegate.didClickNavLink)&&b.delegate.didClickNavLink($(this));return!1});this.interceptor()};BM.Frames.getInstance=function(){return BM.Frames.__instance instanceof BM.Frames?BM.Frames.__instance:null};
BM.Frames.hasInstance=function(){return BM.Frames.__instance instanceof BM.Frames?!0:!1};
BM.Frames.prototype={open:function(a){var b=this,d=a.split("/"),e=d[d.length-1];if(!(e.length===0&&window.location.hash==""))window.location.hash=e,this.openHash=window.location.hash;this.frames.hide();this.frames.filter("#frame-"+e).length?(this.frames.filter("#frame-"+e).show(),$.isFunction(b.delegate.didDisplayFrame)&&b.delegate.didDisplayFrame(e)):(d=this.frames.filter(".template").clone(!0).appendTo(this.frames.parent()).removeClass("template").fadeIn("fast"),this.frames=$(this.frames.selector),
d.attr("id","frame-"+e),d.load(a,{},function(){if(BM.Controller.frames[e])BM.Controller.frames[e]();BM.analytics.trackPage({page:a});$.isFunction(b.delegate.didLoadFrame)&&b.delegate.didLoadFrame(e);$.isFunction(b.delegate.didDisplayFrame)&&b.delegate.didDisplayFrame(e)}))},openFrameWithId:function(a){this.nav.filter("[href$="+a+"]:first").click()},expireFrame:function(a){a=this.frames.filter("#frame-"+a+":hidden:not(.template)").remove().length>0;this.frames=$(this.frames.selector);return a},expireAllFrames:function(){var a=
this.frames.filter(":hidden:not(.template)").remove().length;this.frames=$(this.frames.selector);return a},interceptor:function(){var a=this;clearInterval(this.snifferInterval);this.snifferInterval=setInterval(function(){a.sniffer()},100)},loadMore:function(a){var b=a.replace(/\?.*/,"").split("/"),d=b[b.length-1],e=this.frames.filter("#frame-"+d);e.length&&(e.find(".more").html(bm.loader),$.ajax({error:function(){e.find(".more").text("An error occurred. Please try again later.")},success:function(a){a=
$(a);e.find(".more").remove();debugger;BM.Controller.frames[d](a);$("#"+a.attr("id")).append(a.children())},url:a}))},sniffer:function(){if(this.openHash!=window.location.hash)this.openHash=window.location.hash,this.openFrameWithId(window.location.hash.replace("#",""))}};BM.Post=function(){};BM.Post.prototype={};
BM.Post.controller=function(a){if(!a.form)return!1;this.idField=this.form.find("input[name='beer']");this.searchbox=this.form.find("input[name='beer-suggest']");this.overallField=this.form.find("input:hidden[name='overall']");this.comments=this.form.find("textarea[name='comments']");this.overallText=this.form.find(".percent-tooltip");this.ratingFieldset=this.form.find("fieldset.rating, .rating-label");this.boundaries=this.form.find(".rating .boundaries");this.slider=this.form.find(".rate-bar");this.createBeerForm=
this.form.find("fieldset#addBeer");this.barSearchBox=this.form.find("input[name='bar-search']");this.barSearchButton=this.form.find("#barSearchButton");this.barSearchForm=this.form.find("fieldset#barSearch");this.barSearchMap=this.form.find("#map");this.barSearchResults=this.form.find("#barSearch .results")};BM.Post.controller.prototype={};BM.Post.manager=function(){};BM.Post.manager.prototype={};
BM.prototype.post={_init:function(a){if(this.elems||!a.form.length)return!1;this.delegate=a.delegate||{};this.elems={form:a.form};this.idField=this.elems.form.find("input[name='beer']");this.searchbox=this.elems.form.find("input[name='beer-suggest']");this.overallField=this.elems.form.find("input:hidden[name='overall']");this.comments=this.elems.form.find("textarea[name='comments']");this.overallText=this.elems.form.find(".percent-tooltip");this.ratingFieldset=this.elems.form.find("fieldset.rating, .rating-label");
this.boundaries=this.elems.form.find(".rating .boundaries");this.slider=this.elems.form.find(".rate-bar");this.createBeerForm=this.elems.form.find("fieldset#addBeer");this.barSearchBox=this.elems.form.find("input[name='bar-search']");this.barSearchButton=this.elems.form.find("#barSearchButton");this.barSearchForm=this.elems.form.find("fieldset#barSearch");this.barSearchMap=this.elems.form.find("#map");this.barSearchResults=this.elems.form.find("#barSearch .results");this.source=this.elems.form.find("input[name='source']").val();
var b=this;this.slider.slider({range:"min",value:50,slide:function(a,e){b.slide(a,e)},change:function(a,e){b.change(a,e)},start:function(a,e){b.sliderStart(a,e)},stop:function(a,e){b.sliderStop(a,e)}});this.ratingFieldset.hover(function(a){b.ratingActive(a)},function(a){b.ratingInactive(a)});this.elems.form.submit(function(a){return b.submit(a)});this.beerSuggest(a);this.elems.form.find(":text,textarea").focus(function(){if(b.inProgress==!1)b.inProgress=!0,BM.analytics.trackPage({page:"/util/beer-review-submit/begin"})});
this.comments.keypress(function(a){if(a.which==13&&a.shiftKey==!0)return b.submit()});this.comments.autogrow();this.comments.focus(function(){b.hideMap(!0)});this.barSearchBox.focus(function(){b.ratingInactive();if(!bm.broogle)bm.broogle=new Broogle(b),bm.broogle.initMaps();b.showMap()});this.barSearchForm.find(".cancel").click(function(){b.barSearchBox.val("").blur();b.clearBarInfo();b.hideMap()});this.barSearchResults.click(function(a){return b.resultsClick(a)});this.active=!0;this.inProgress=!1;
$("body").append(bm.loaderBar);$("body").append('<img src="/static/images/no-index/boundary-tooltips.png" class="hide" />')},showMap:function(){this.barSearchButton.removeAttr("disabled");this.barSearchForm.show()},hideMap:function(a){a?this.barSearchForm.hide():this.barSearchForm.fadeOut("fast");this.barSearchButton.attr("disabled","disabled")},tagBeer:function(a){var a=a||{},b=a.id;this.searchbox.val(a.name).addClass("set").removeClass("placeholder");this.idField.val(b);this.ratingFieldset.css("visibility",
"visible").find(".ui-slider-handle").focus();this.ratingActive()},beerSuggest:function(){var a=this,b={onResultClick:function(b){if(!b)return!1;a.tagBeer({name:b.name,id:b.id})},addBeer:function(){a.addBeer.setBeerName(a.searchbox.hasClass("placeholder")?"":a.searchbox.val());a.searchbox.val("").blur();a.searchbox.attr("disabled","disabled");a.createBeerForm.slideDown()},addBeerFailure:function(b){a.createBeerForm.find(".addBeer").alertMessage(b)},addBeerSuccess:function(b){this.onResultClick(b);
a.searchbox.removeAttr("disabled");a.createBeerForm.slideUp()},addBeerCancel:function(){a.searchbox.removeAttr("disabled");a.createBeerForm.slideUp()}};a.beerSuggest=new BM.Suggest({delegate:b,action:"/util/beer-search",searchbox:a.searchbox});a.addBeer=new BM.addBeer({form:a.createBeerForm,delegate:b})},reset:function(){this.searchbox.is("[type='text']")&&(this.searchbox.val("").removeClass("set").focus().blur(),this.idField.val(""),this.ratingFieldset.css("visibility","hidden"));this.comments.val("").focus().blur().css({height:this.comments.data("originalHeight"),
overflow:"hidden"});this.boundaries.empty();this.hideMap();this.clearBarInfo();this.barSearchBox.val("").blur();this.slider.slider("value",50)},reviewBoundaries:function(a){var b=this;$.get("/util/review-boundaries/",{value:a.value},function(a){$(a).appendTo(b.boundaries.empty());b.boundaries.css({opacity:1})})},submit:function(){var a=this,b=a.elems.form,d=b.find("textarea[name='comments']"),e=b.find(":submit"),g={overall:a.overallField.val(),comments:d.val()};if(a.source)g.source=a.source;if(a.createBeerForm.is(":visible"))return a.addBeer&&
a.addBeer.submit(),!1;if(a.searchbox.hasClass("placeholder")||a.searchbox.length&&a.searchbox.val().length==0)return a.searchbox.alertMessage({msg:"Please choose a beer to review."}),!1;if(d.hasClass("placeholder")||$.trim(d.val()).length==0)return d.alertMessage({msg:"Please write something."}),!1;if(a.searchbox.hasClass("set"))g.beer=a.idField.val(),g["bar.title"]=b.find("[name='bar.title']").val(),g["bar.lat"]=b.find("[name='bar.lat']").val(),g["bar.lng"]=b.find("[name='bar.lng']").val(),g["bar.url"]=
b.find("[name='bar.url']").val();else if(a.searchbox.val().length)return a.searchbox.alertMessage({msg:"Please select a beer from the suggestion list."}),!1;e.attr("disabled","disabled").buttonMessage({msg:"Saving",animated:!0});$.ajax({type:"POST",url:b.attr("action"),data:g,dataType:"json",error:function(a,b){bm.reset();e.buttonMessage({msg:"We can't save your review at this time. Please try again later. ("+b+")",timeout:5E3});e.removeAttr("disabled")},success:function(b){if(b.code=="0"){if(a.reset(),
b=$(b.body).addClass("hide"),$("#Reviews .post:first").hasClass("alt")?b.removeClass("alt"):b.addClass("alt"),b.prependTo("#Reviews").slideDown(),BM.Frames.hasInstance()&&BM.Frames.getInstance().expireFrame(""),e.buttonMessage({msg:"Post saved succesfully",timeout:5E3}),BM.analytics.trackPage({page:"/util/beer-review-submit/success"}),a.inProgress=!1,$.isFunction(a.delegate.onSuccess))a.delegate.onSuccess({elem:b})}else bm.reset(),e.buttonMessage({msg:b.msg,timeout:5E3});e.removeAttr("disabled")}});
return!1},ratingActive:function(){clearTimeout(this.hideTimer);this.boundaries.show().css({opacity:1});this.overallText.show().css({opacity:1})},ratingInactive:function(){var a=this;a.boundaries.css({opacity:0});a.overallText.css({opacity:0});a.hideTimer=setTimeout(function(){a.boundaries.hide();a.overallText.hide()},110)},change:function(a,b){this.slide(a,b);this.reviewBoundaries({value:b.value})},slide:function(a,b){var d=2*b.value-33;this.overallText.text(b.value+"%");this.overallText.css({left:d});
this.overallField.val(b.value)},sliderStart:function(){this.overallText.css({opacity:0.6});this.boundaries.css({opacity:0})},sliderStop:function(){this.overallText.css({opacity:1})},onsearchload:function(){var a=this;a.gmap=bm.broogle.newmap(a.barSearchMap.get(0));a.barSearchForm.append('<span class="loader"><img src="/static/images/no-index/loader-dark.gif" alt="loader" /> Locating you...</span>');bm.broogle.geoLocate();a.barSearchBox.bind("keydown",function(b){$(this).hasClass("set")&&a.clearBarInfo();
if(b.keyCode==13)return a.barSearch(),!1;return!0});a.barSearchButton.click(function(){return a.barSearch()})},geoLocateSuccess:function(){this.barSearchForm.find(".loader").remove();bm.broogle.reCenterMap()},geoLocateError:function(a){a.err.code!=-1&&this.barSearchForm.find(".loader").alertMessage({msg:a.msg});this.barSearchForm.find(".loader").remove()},barSearch:function(){var a=this.barSearchBox.val();if(this.barSearchBox.hasClass("placeholder"))return!1;if(!a.length)return!1;if(this.barSearchForm.is(":hidden"))return!1;
bm.broogle.executeSearch(a);return!1},onsearchcomplete:function(a){var b=this;b.barResults=a;var d=function(){for(var d="<ul>",g=0;g<a.length;g++)d+='<li><a href="javascript:;">'+a[g].title+"</a></li>";a.length==0&&(d+="<li>No results found for <b>&quot;"+b.barSearchBox.val()+"&quot;</b></li>");d+="</ul>";b.barSearchResults.html(d)};b.barSearchResults.is(":visible")?d():(b.barSearchResults.css({width:"0",opacity:"0"}),b.barSearchResults.animate({width:"140px",opacity:"0.8"},"fast",d))},onmarkerclick:function(a){this.showBarInfo(a)},
resultsClick:function(a){$(a.target).closest("a").length&&this.showBarInfo(this.barSearchResults.find("li").index($(a.target).closest("li")));return!1},showBarInfo:function(a){var b=this.barResults[a];if(b){for(var d="<b>"+b.titleNoFormatting+"</b>",e=0;e<b.addressLines.length;e++)d+="<br/>"+b.addressLines[e];d+='<br/><a href="javascript:;" onClick="bm.post.saveBarInfo('+a+')">Choose location</a>';bm.broogle.showInfo(a,d)}},saveBarInfo:function(a){a=this.barResults[a];this.barSearchBox.removeClass("placeholder").addClass("set").val(a.titleNoFormatting);
this.hideMap();this.elems.form.find("[name='bar.title']").val(a.titleNoFormatting);this.elems.form.find("[name='bar.lat']").val(a.lat);this.elems.form.find("[name='bar.lng']").val(a.lng);this.elems.form.find("[name='bar.url']").val(a.url)},clearBarInfo:function(){this.barSearchBox.removeClass("set");this.elems.form.find("[name='bar.title']").val("");this.elems.form.find("[name='bar.lat']").val("");this.elems.form.find("[name='bar.lng']").val("");this.elems.form.find("[name='bar.url']").val("")}};
BM.Post.Edit=function(a){this.elems={row:a.row,rating:a.row.find(".rating"),comment:a.row.find(".review-text"),form:$('<form class="post-form"><label class="rating-label">My rating: </label><fieldset class="rating"><div class="percent-tooltip">50%</div><div class="rate-bar"></div><input type="hidden" name="overall" value="50"/></fieldset><fieldset class="comment"><textarea name="comments"></textarea></fieldset></form>'),cancel:$('<a href="javascript:;" title="Cancel editing this post" class="cancel badge">cancel</a>'),
deleteButton:$('<a href="javascript:;" title="Delete this post" class="delete badge">delete</a>')};this.currentRating=a.currentRating;this.delegate=a.delegate||{};this.saveUrl=this.elems.rating.attr("href");this._init()};
BM.Post.Edit.prototype={_init:function(){var a=this;this.elems.rating.text("save");this.elems.form.hide().insertAfter(this.elems.comment);this.elems.cancel.insertAfter(this.elems.rating);this.elems.deleteButton.insertAfter(this.elems.cancel);this.elems.newComment=this.elems.form.find("[name='comments']");this.elems.newRating=this.elems.form.find("[name='overall']");this.elems.slider=this.elems.form.find(".rate-bar");this.elems.overallText=this.elems.form.find(".percent-tooltip");this.elems.newComment.val($.trim(this.elems.comment.html()).replace(/<br([\/ ]*)>/g,
"\n").replace(/<[\/\w]+>/g,""));this.elems.newComment.height(this.elems.comment.height()+20);this.elems.newRating.val(parseInt(a.elems.rating.data("rating")));this.elems.slider.slider({range:"min",value:this.elems.newRating.val(),slide:function(b,d){a.slide(b,d)},change:function(b,d){a.change(b,d)},start:function(b,d){a.sliderStart(b,d)},stop:function(b,d){a.sliderStop(b,d)}});this.slide(null,{value:this.elems.newRating.val()});this.elems.slider.hover(function(b){a.ratingActive(b)},function(b){a.ratingInactive(b)});
this.elems.cancel.css("top","74px");this.elems.deleteButton.css("top","102px");this.elems.row.addClass("editing");this.elems.form.fadeIn(400);this.elems.rating.bind("click.edit",function(){a._submit()});this.elems.cancel.bind("click.edit",function(){a._destroy()});this.elems.deleteButton.bind("click.edit",function(){a._deleteConfirm()})},_submit:function(){var a=this;if($.trim(a.elems.newComment.val()).length==0)return a.elems.newComment.alertMessage({msg:"Please write something."}),!1;a.elems.rating.addClass("animated");
a.elems.cancel.css("top","46px");a.elems.deleteButton.css("top","46px");$.ajax({url:a.saveUrl,type:"POST",data:{comment:a.elems.newComment.val(),rating:a.elems.newRating.val()},dataType:"json",error:function(b,d){a.elems.rating.alertMessage({msg:"Could not edit your post: "+d});a.elems.rating.removeClass("animated");a._destroy()},success:function(){a.elems.rating.data("rating",a.elems.newRating.val()+"%");a.elems.comment.html("<p>"+a.elems.newComment.val().replace(/<[\/\w]+>/g,"").replace(/\n\n/g,
"</p>\n\n<p>").replace(/([^\n])\n([^\n])/g,"$1<br/>$2")+"</p>");a.elems.rating.removeClass("animated");a._destroy()}})},_delete:function(){var a=this;a.elems.row.css("opacity","0.5").append(bm.loader);$.ajax({url:a.saveUrl+"/delete",type:"GET",dataType:"json",error:function(b,d){var e=d;b.status==404&&(e="Beer not found");a.elems.rating.alertMessage({msg:"Could not delete your post: "+e});a.elems.row.css("opacity","1.0")},success:function(){a.elems.row.fadeOut(200,function(){a.elems.row.remove()})}})},
_deleteConfirm:function(){window.confirm("Are you sure you want to delete this post? There is no undo.")&&this._delete()},_destroy:function(){this.elems.row.removeClass("editing");this.elems.rating.unbind("click.edit");this.elems.cancel.remove();this.elems.deleteButton.remove();this.elems.form.remove();this.elems.comment.fadeIn("fast");this._alertDelegate("didFinish")},_alertDelegate:function(a){$.isFunction(this.delegate[a])&&$.isFunction(this.delegate[a]())},ratingActive:function(){clearTimeout(this.hideTimer);
this.elems.overallText.show().css({opacity:1})},ratingInactive:function(){var a=this;a.elems.overallText.css({opacity:0});a.hideTimer=setTimeout(function(){a.elems.overallText.hide()},110)},change:function(a,b){this.slide(a,b)},slide:function(a,b){var d=2*b.value-33;this.elems.overallText.text(b.value+"%");this.elems.overallText.css({left:d});this.elems.newRating.val(b.value)},sliderStart:function(){this.elems.overallText.css({opacity:0.6})},sliderStop:function(){this.elems.overallText.css({opacity:1})},
getRatingElem:function(){return this.elems.rating}};BM.Views={};BM.Views.NewPost=function(){};
BM.Views.Posts=function(a){var b=this;this.elems={postList:a.postList};this.currentEdit=null;this.editDelegate={didFinish:function(){b.currentEdit.getRatingElem().text(b.currentEdit.getRatingElem().data("rating"));b.currentEdit=null}};this.elems.postList.children(".post.mine").each(function(){b.bindPost($(this))});this.elems.postList.find(".addToQueue").click(function(a){a.preventDefault();var b=$(this);bm.queue.add({action:$(this).attr("href"),addError:function(a){b.alertMessage({msg:a})},addSuccess:function(a){b.alertMessage({msg:a.msg})}})})};
BM.Views.Posts.prototype={bindPost:function(a){var b=this,a={myRating:a.find(".rating"),myReviewText:a.find(".review-text")};a.myRating.data("rating",a.myRating.text());a.myRating.hover(function(){b.currentEdit||$(this).text("edit")},function(){b.currentEdit||$(this).text($(this).data("rating"))});a.myRating.click(function(a){a.preventDefault();if(!b.currentEdit)b.currentEdit=new BM.Post.Edit({row:$(this).closest(".post"),delegate:b.editDelegate})});a.myReviewText.dblclick(function(a){a.preventDefault();
if(!b.currentEdit)b.currentEdit=new BM.Post.Edit({row:$(this).closest(".post"),delegate:b.editDelegate})})}};var Broogle=function(a){this.delegate=a||{}};Broogle.getFormattedLocation=function(){return google.loader.ClientLocation.address.country_code=="US"&&google.loader.ClientLocation.address.region?google.loader.ClientLocation.address.city+", "+google.loader.ClientLocation.address.region.toUpperCase():google.loader.ClientLocation.address.city+", "+google.loader.ClientLocation.address.country_code};
Broogle.prototype.initMaps=function(){var a=this;typeof google=="object"&&google.load("maps","3",{other_params:"sensor=false",callback:function(){a.onmapsload()}})};
Broogle.prototype.onmapsload=function(){var a=this;google.load("search","1",{nocss:!0,callback:function(){a.onsearchload()}});a.zoom=3;a.latlng=new google.maps.LatLng(37.4419,-100.1419);if(google.loader.ClientLocation)a.zoom=13,a.latlng=new google.maps.LatLng(google.loader.ClientLocation.latitude,google.loader.ClientLocation.longitude);if(typeof a.delegate.onmapsload=="function")a.delegate.onmapsload()};
Broogle.prototype.geoLocate=function(){var a=this;return navigator.geolocation?(navigator.geolocation.getCurrentPosition(function(b){a.geoLocateSuccess(b)},function(b){a.geoLocateError(b)}),!0):(a.geoLocateError({code:-1}),!1)};Broogle.prototype.geoLocateSuccess=function(a){a=a.coords||a.coordinate||a;this.latlng=new google.maps.LatLng(a.latitude,a.longitude);this.zoom=13;typeof this.delegate.geoLocateSuccess=="function"&&this.delegate.geoLocateSuccess()};
Broogle.prototype.geoLocateError=function(a){var b;switch(a.code){case a.UNKNOWN_ERROR:b="Unable to find your location";break;case a.PERMISSION_DENINED:b="Permissioned denied in finding your location";break;case a.POSITION_UNAVAILABLE:b="Your location is currently unknown";break;case a.BREAK:b="Attempt to find location took too long";break;default:b="Location detection not supported"}typeof this.delegate.geoLocateError=="function"&&this.delegate.geoLocateError({err:a,msg:b})};
Broogle.prototype.newmap=function(a){return this.gmap=new google.maps.Map(a,{zoom:this.zoom,center:this.latlng,mapTypeId:google.maps.MapTypeId.ROADMAP,mapTypeControl:!1})};Broogle.prototype.reCenterMap=function(){this.gmap&&this.gmap.setCenter(this.latlng)};
Broogle.prototype.onsearchload=function(){var a=this;a.localSearch=new google.search.LocalSearch;a.localSearch.setCenterPoint(a.latlng);a.localSearch.setSearchCompleteCallback(null,function(){a.onsearchcomplete()});if(typeof a.delegate.onsearchload=="function")a.delegate.onsearchload()};Broogle.prototype.executeSearch=function(a){this.localSearch.setCenterPoint(this.gmap.getCenter());this.localSearch.execute(a)};
Broogle.prototype.onsearchcomplete=function(){var a=this,b=a.localSearch.results;if(a.gmap){a.infowindow&&a.infowindow.close();if(typeof a.markers=="object")for(var d=0;d<a.markers.length;d++)a.markers[d].setMap(null);if(b.length){var e=new google.maps.LatLngBounds;a.markers=[];for(d=0;d<b.length;d++){var g=new google.maps.Marker({position:new google.maps.LatLng(b[d].lat,b[d].lng),map:a.gmap});e.extend(g.getPosition());google.maps.event.addListener(g,"click",function(){var b=jQuery.inArray(this,a.markers);
if(typeof a.delegate.onmarkerclick=="function")a.delegate.onmarkerclick(b)});a.markers[d]=g}a.gmap.fitBounds(e);a.gmap.getZoom()>16&&a.gmap.setZoom(16)}}if(typeof a.delegate.onsearchcomplete=="function")a.delegate.onsearchcomplete(a.localSearch.results)};
Broogle.prototype.showInfo=function(a,b){if(a>=this.markers.length)return!1;if(!this.gmap)return!1;this.infowindow&&this.infowindow.close();var d=this.markers[a];this.infowindow=new google.maps.InfoWindow({content:b});this.infowindow.open(this.gmap,d)};BM.Controller={init:function(){bm=new BM;$(".placeholder").placeholder();$(".maillink").emailLinkBuilder();if($("body").attr("id")&&this.pages[$("body").attr("id")])this.pages[$("body").attr("id")]()},pages:{base:function(){function a(){$(".glasses > *").each(function(a,e){if(b){var g=parseInt($(e).css("left"),10);$(e).css({left:"900px",opacity:0})}else $(e).hide();setTimeout(function(){b?$(e).css({opacity:"1.0",left:g+"px"}):$.support.opacity?$(e).fadeIn(300):$(e).show()},300*(a+1))})}var b=typeof window.document.body.style["-webkit-transition"]!=
"undefined"||typeof window.document.body.style["-moz-transition"]!="undefined";BM.Cookie.read("beerGlassAnimation")||(BM.Cookie.create("beerGlassAnimation","1",730),a())},beerPage:function(){bm.frames=new BM.Frames({nav:$(".main-menu .scroll-nav"),frames:$(".main-frame .panel")});bm.postList=new BM.Views.Posts({postList:$(".posts")});$(".posts").find(".more a").click(function(a){a.preventDefault();bm.frames.loadMore($(this).attr("href"))});bm.post._init({form:$("#newPost"),delegate:{onSuccess:function(a){bm.postList.bindPost(a.elem)}}});
bm.post._init({form:$("#newPost")});$(".addToQueue").click(function(){var a=$(this),b="BEERPAGE";a.closest(".brew-queue").length&&(b="BEERSIMILAR");bm.queue.add({data:{sourceType:b,sourceId:$("#beer-key:first").text()},action:$(this).attr("href"),addError:function(b){a.alertMessage({msg:b})},addSuccess:function(b){a.alertMessage({msg:b.msg})}});return!1})},breweryPage:function(){bm.frames=new BM.Frames({nav:$(".main-menu .scroll-nav"),frames:$(".main-frame .panel")});$(".addToQueue").click(function(a){a.preventDefault();
var b=$(this);bm.queue.add({action:$(this).attr("href"),addError:function(a){b.alertMessage({msg:a})},addSuccess:function(a){b.alertMessage({msg:a.msg})}})})},questions:function(){bm.questions._init()},reviewPage:function(){$(".addToQueue").click(function(){var a=$(this);bm.queue.add({action:$(this).attr("href"),addError:function(b){a.alertMessage({msg:b})},addSuccess:function(b){a.alertMessage({msg:b.msg})}});return!1})},search:function(){$(".addToQueue").click(function(){var a=$(this);bm.queue.add({action:$(this).attr("href"),
addError:function(b){a.alertMessage({msg:b})},addSuccess:function(b){a.alertMessage({msg:b.msg})}});return!1})},signup:function(){bm.signup.bind($("#Signup"))},user:function(){bm.frames=new BM.Frames({nav:$(".main-menu .scroll-nav"),frames:$(".main-frame .panel")});bm.postList=new BM.Views.Posts({postList:$(".posts")});$(".posts").find(".more a").click(function(a){a.preventDefault();bm.frames.loadMore($(this).attr("href"))});bm.post._init({form:$("#newPost"),delegate:{onSuccess:function(a){bm.postList.bindPost(a.elem)}}});
bm.queue._init();$(".addToQueue").click(function(){var a=$(this);bm.queue.add({action:$(this).attr("href"),addError:function(b){a.alertMessage({msg:b})},addSuccess:function(b){a.alertMessage({msg:b.msg})}});return!1});$("a.buddy").click(function(a){a.preventDefault();var b=$(this),d=b.find(".tip").text();b.hasClass("addBuddy");$.ajax({url:b.attr("href"),type:"GET",error:function(a){b.alertMessage({msg:"Failed with code "+a.status});b.find(".tip").text(d)},success:function(){b.hasClass("addBuddy")?
(b.removeClass("addBuddy"),b.addClass("removeFromQueue"),b.attr("href",b.attr("href").replace("add-","remove-")),b.find(".tip").text("Remove Drinking Buddy"),b.find(".icon-20").removeClass("icon-heart").addClass("icon-remove")):(b.addClass("addBuddy").removeClass("removeFromQueue"),b.attr("href",b.attr("href").replace("remove-","add-")),b.find(".tip").text("Add Drinking Buddy"),b.find(".icon-20").removeClass("icon-remove").addClass("icon-heart"))}});b.find(".tip").text("Saving...")});BM.analytics.setCustomer()}},
modals:{},frames:{beers:function(a){a=a||$(".posts");bm.postList=new BM.Views.Posts({postList:a});a.find(".more a").click(function(a){a.preventDefault();BM.Frames.getInstance().loadMore($(this).attr("href"))})},friends:function(){$("#frame-friends a.buddy").click(function(a){a.preventDefault();var b=$(this),d=b.find(".tip").text();b.hasClass("addBuddy");$.ajax({url:b.attr("href"),type:"GET",error:function(a){b.alertMessage({msg:"Failed with code "+a.status});b.find(".tip").text(d)},success:function(){b.hasClass("addBuddy")?
(b.removeClass("addBuddy"),b.addClass("removeFromQueue"),b.attr("href",b.attr("href").replace("add-","remove-")),b.find(".tip").text("Remove Drinking Buddy"),b.find(".icon-20").removeClass("icon-heart").addClass("icon-remove")):(b.addClass("addBuddy").removeClass("removeFromQueue"),b.attr("href",b.attr("href").replace("remove-","add-")),b.find(".tip").text("Add Drinking Buddy"),b.find(".icon-20").removeClass("icon-remove").addClass("icon-heart"))}});b.find(".tip").text("Saving...")})},post:function(){bm.post._init({form:$("#newPost"),
delegate:{onSuccess:function(a){bm.postList.bindPost(a.elem)}}});$(".placeholder").placeholder()},reviews:function(a){a=a||$(".posts");bm.postList=new BM.Views.Posts({postList:a});a.find(".more a").click(function(a){a.preventDefault();BM.Frames.getInstance().loadMore($(this).attr("href"))})}}};$(document).ready(function(){new BM});})();

