(function(c,g){function k(a,b,f){if(f===g&&a.nodeType===1){f="data-"+b.replace(Va,"-$1").toLowerCase();f=a.getAttribute(f);if(typeof f==="string"){try{f=f==="true"?true:f==="false"?false:f==="null"?null:!d.isNaN(f)?parseFloat(f):Da.test(f)?d.parseJSON(f):f}catch(h){}d.data(a,b,f)}else f=g}return f}function o(a){for(var b in a)if(b!=="toJSON")return false;return true}function s(a,b,f){var h=b+"defer",j=b+"queue",l=b+"mark",n=d.data(a,h,g,true);if(n&&(f==="queue"||!d.data(a,j,g,true))&&(f==="mark"||
!d.data(a,l,g,true)))setTimeout(function(){if(!d.data(a,j,g,true)&&!d.data(a,l,g,true)){d.removeData(a,h,true);n.resolve()}},0)}function D(){return false}function P(){return true}function Q(a,b,f){var h=d.extend({},f[0]);h.type=a;h.originalEvent={};h.liveFired=g;d.event.handle.call(b,h);h.isDefaultPrevented()&&f[0].preventDefault()}function I(a){var b,f,h,j,l,n,r,u,w,C,T,da=[];j=[];l=d._data(this,"events");if(!(a.liveFired===this||!l||!l.live||a.target.disabled||a.button&&a.type==="click")){if(a.namespace)T=
RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)");a.liveFired=this;var ba=l.live.slice(0);for(r=0;r<ba.length;r++){l=ba[r];l.origType.replace(ca,"")===a.type?j.push(l.selector):ba.splice(r--,1)}j=d(a.target).closest(j,a.currentTarget);u=0;for(w=j.length;u<w;u++){C=j[u];for(r=0;r<ba.length;r++){l=ba[r];if(C.selector===l.selector&&(!T||T.test(l.namespace))&&!C.elem.disabled){n=C.elem;h=null;if(l.preType==="mouseenter"||l.preType==="mouseleave"){a.type=l.preType;if((h=d(a.relatedTarget).closest(l.selector)[0])&&
d.contains(n,h))h=n}if(!h||h!==n)da.push({elem:n,handleObj:l,level:C.level})}}}u=0;for(w=da.length;u<w;u++){j=da[u];if(f&&j.level>f)break;a.currentTarget=j.elem;a.data=j.handleObj.data;a.handleObj=j.handleObj;T=j.handleObj.origHandler.apply(j.elem,arguments);if(T===false||a.isPropagationStopped()){f=j.level;if(T===false)b=false;if(a.isImmediatePropagationStopped())break}}return b}}function L(a,b){return(a&&a!=="*"?a+".":"")+b.replace(ha,"`").replace(ia,"&")}function t(a,b,f){b=b||0;if(d.isFunction(b))return d.grep(a,
function(j,l){return!!b.call(j,l,j)===f});else if(b.nodeType)return d.grep(a,function(j){return j===b===f});else if(typeof b==="string"){var h=d.grep(a,function(j){return j.nodeType===1});if(Jb.test(b))return d.filter(b,h,!f);else b=d.filter(b,h)}return d.grep(a,function(j){return d.inArray(j,b)>=0===f})}function N(a,b){if(!(b.nodeType!==1||!d.hasData(a))){var f=d.expando,h=d.data(a),j=d.data(b,h);if(h=h[f]){var l=h.events;j=j[f]=d.extend({},h);if(l){delete j.handle;j.events={};for(var n in l){f=
0;for(h=l[n].length;f<h;f++)d.event.add(b,n+(l[n][f].namespace?".":"")+l[n][f].namespace,l[n][f],l[n][f].data)}}}}}function U(a,b){var f;if(b.nodeType===1){b.clearAttributes&&b.clearAttributes();b.mergeAttributes&&b.mergeAttributes(a);f=b.nodeName.toLowerCase();if(f==="object")b.outerHTML=a.outerHTML;else if(f==="input"&&(a.type==="checkbox"||a.type==="radio")){if(a.checked)b.defaultChecked=b.checked=a.checked;if(b.value!==a.value)b.value=a.value}else if(f==="option")b.selected=a.defaultSelected;
else if(f==="input"||f==="textarea")b.defaultValue=a.defaultValue;b.removeAttribute(d.expando)}}function fa(a){return"getElementsByTagName"in a?a.getElementsByTagName("*"):"querySelectorAll"in a?a.querySelectorAll("*"):[]}function ua(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function qa(a){if(d.nodeName(a,"input"))ua(a);else"getElementsByTagName"in a&&d.grep(a.getElementsByTagName("input"),ua)}function Ea(a,b){b.src?d.ajax({url:b.src,async:false,dataType:"script"}):d.globalEval((b.text||
b.textContent||b.innerHTML||"").replace(Kb,"/*$0*/"));b.parentNode&&b.parentNode.removeChild(b)}function cb(a,b,f){var h=b==="width"?a.offsetWidth:a.offsetHeight,j=b==="width"?Lb:Mb;if(h>0){f!=="border"&&d.each(j,function(){f||(h-=parseFloat(d.css(a,"padding"+this))||0);if(f==="margin")h+=parseFloat(d.css(a,f+this))||0;else h-=parseFloat(d.css(a,"border"+this+"Width"))||0});return h+"px"}h=Wa(a,b,b);if(h<0||h==null)h=a.style[b]||0;h=parseFloat(h)||0;f&&d.each(j,function(){h+=parseFloat(d.css(a,"padding"+
this))||0;if(f!=="padding")h+=parseFloat(d.css(a,"border"+this+"Width"))||0;if(f==="margin")h+=parseFloat(d.css(a,f+this))||0});return h+"px"}function ga(a){return function(b,f){if(typeof b!=="string"){f=b;b="*"}if(d.isFunction(f))for(var h=b.toLowerCase().split(sb),j=0,l=h.length,n,r;j<l;j++){n=h[j];if(r=/^\+/.test(n))n=n.substr(1)||"*";n=a[n]=a[n]||[];n[r?"unshift":"push"](f)}}}function ra(a,b,f,h,j,l){j=j||b.dataTypes[0];l=l||{};l[j]=true;j=a[j];for(var n=0,r=j?j.length:0,u=a===lb,w;n<r&&(u||!w);n++){w=
j[n](b,f,h);if(typeof w==="string")if(!u||l[w])w=g;else{b.dataTypes.unshift(w);w=ra(a,b,f,h,w,l)}}if((u||!w)&&!l["*"])w=ra(a,b,f,h,"*",l);return w}function Ka(a,b){var f,h,j=d.ajaxSettings.flatOptions||{};for(f in b)if(b[f]!==g)(j[f]?a:h||(h={}))[f]=b[f];h&&d.extend(true,a,h)}function Xa(a,b,f,h){if(d.isArray(b))d.each(b,function(l,n){f||Nb.test(a)?h(a,n):Xa(a+"["+(typeof n==="object"||d.isArray(n)?l:"")+"]",n,f,h)});else if(!f&&b!=null&&typeof b==="object")for(var j in b)Xa(a+"["+j+"]",b[j],f,h);
else h(a,b)}function sa(){try{return new c.XMLHttpRequest}catch(a){}}function W(){setTimeout(za,0);return eb=d.now()}function za(){eb=g}function Fa(a,b){var f={};d.each(tb.concat.apply([],tb.slice(0,b)),function(){f[this]=a});return f}function La(a){if(!mb[a]){var b=K.body,f=d("<"+a+">").appendTo(b),h=f.css("display");f.remove();if(h==="none"||h===""){if(!Aa){Aa=K.createElement("iframe");Aa.frameBorder=Aa.width=Aa.height=0}b.appendChild(Aa);if(!Ya||!Aa.createElement){Ya=(Aa.contentWindow||Aa.contentDocument).document;
Ya.write((K.compatMode==="CSS1Compat"?"<!doctype html>":"")+"<html><body>");Ya.close()}f=Ya.createElement(a);Ya.body.appendChild(f);h=d.css(f,"display");b.removeChild(Aa)}mb[a]=h}return mb[a]}function va(a){return d.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var K=c.document,Ha=c.navigator,Ma=c.location,d=function(){function a(){if(!b.isReady){try{K.documentElement.doScroll("left")}catch(q){setTimeout(a,1);return}b.ready()}}var b=function(q,E){return new b.fn.init(q,E,j)},f=
c.jQuery,h=c.$,j,l=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,n=/\S/,r=/^\s+/,u=/\s+$/,w=/\d/,C=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,T=/^[\],:{}\s]*$/,da=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,ba=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,ea=/(?:^|:|,)(?:\s*\[)+/g,Na=/(webkit)[ \/]([\w.]+)/,oa=/(opera)(?:.*version)?[ \/]([\w.]+)/,na=/(msie) ([\w.]+)/,Ba=/(mozilla)(?:.*? rv:([\w.]+))?/,m=/-([a-z]|[0-9])/ig,p=/^-ms-/,x=function(q,E){return(E+"").toUpperCase()},z=Ha.userAgent,v,A,F=Object.prototype.toString,
G=Object.prototype.hasOwnProperty,X=Array.prototype.push,pa=Array.prototype.slice,ma=String.prototype.trim,la=Array.prototype.indexOf,Y={};b.fn=b.prototype={constructor:b,init:function(q,E,M){var J;if(!q)return this;if(q.nodeType){this.context=this[0]=q;this.length=1;return this}if(q==="body"&&!E&&K.body){this.context=K;this[0]=K.body;this.selector=q;this.length=1;return this}if(typeof q==="string")if((J=q.charAt(0)==="<"&&q.charAt(q.length-1)===">"&&q.length>=3?[null,q,null]:l.exec(q))&&(J[1]||!E))if(J[1]){M=
(E=E instanceof b?E[0]:E)?E.ownerDocument||E:K;if(q=C.exec(q))if(b.isPlainObject(E)){q=[K.createElement(q[1])];b.fn.attr.call(q,E,true)}else q=[M.createElement(q[1])];else{q=b.buildFragment([J[1]],[M]);q=(q.cacheable?b.clone(q.fragment):q.fragment).childNodes}return b.merge(this,q)}else{if((E=K.getElementById(J[2]))&&E.parentNode){if(E.id!==J[2])return M.find(q);this.length=1;this[0]=E}this.context=K;this.selector=q;return this}else return!E||E.jquery?(E||M).find(q):this.constructor(E).find(q);else if(b.isFunction(q))return M.ready(q);
if(q.selector!==g){this.selector=q.selector;this.context=q.context}return b.makeArray(q,this)},selector:"",jquery:"1.6.4",length:0,size:function(){return this.length},toArray:function(){return pa.call(this,0)},get:function(q){return q==null?this.toArray():q<0?this[this.length+q]:this[q]},pushStack:function(q,E,M){var J=this.constructor();b.isArray(q)?X.apply(J,q):b.merge(J,q);J.prevObject=this;J.context=this.context;if(E==="find")J.selector=this.selector+(this.selector?" ":"")+M;else if(E)J.selector=
this.selector+"."+E+"("+M+")";return J},each:function(q,E){return b.each(this,q,E)},ready:function(q){b.bindReady();v.done(q);return this},eq:function(q){return q===-1?this.slice(q):this.slice(q,+q+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(pa.apply(this,arguments),"slice",pa.call(arguments).join(","))},map:function(q){return this.pushStack(b.map(this,function(E,M){return q.call(E,M,E)}))},end:function(){return this.prevObject||
this.constructor(null)},push:X,sort:[].sort,splice:[].splice};b.fn.init.prototype=b.fn;b.extend=b.fn.extend=function(){var q,E,M,J,V,aa=arguments[0]||{},ja=1,ka=arguments.length,Ga=false;if(typeof aa==="boolean"){Ga=aa;aa=arguments[1]||{};ja=2}if(typeof aa!=="object"&&!b.isFunction(aa))aa={};if(ka===ja){aa=this;--ja}for(;ja<ka;ja++)if((q=arguments[ja])!=null)for(E in q){M=aa[E];J=q[E];if(aa!==J)if(Ga&&J&&(b.isPlainObject(J)||(V=b.isArray(J)))){if(V){V=false;M=M&&b.isArray(M)?M:[]}else M=M&&b.isPlainObject(M)?
M:{};aa[E]=b.extend(Ga,M,J)}else if(J!==g)aa[E]=J}return aa};b.extend({noConflict:function(q){if(c.$===b)c.$=h;if(q&&c.jQuery===b)c.jQuery=f;return b},isReady:false,readyWait:1,holdReady:function(q){if(q)b.readyWait++;else b.ready(true)},ready:function(q){if(q===true&&!--b.readyWait||q!==true&&!b.isReady){if(!K.body)return setTimeout(b.ready,1);b.isReady=true;if(!(q!==true&&--b.readyWait>0)){v.resolveWith(K,[b]);b.fn.trigger&&b(K).trigger("ready").unbind("ready")}}},bindReady:function(){if(!v){v=
b._Deferred();if(K.readyState==="complete")return setTimeout(b.ready,1);if(K.addEventListener){K.addEventListener("DOMContentLoaded",A,false);c.addEventListener("load",b.ready,false)}else if(K.attachEvent){K.attachEvent("onreadystatechange",A);c.attachEvent("onload",b.ready);var q=false;try{q=c.frameElement==null}catch(E){}K.documentElement.doScroll&&q&&a()}}},isFunction:function(q){return b.type(q)==="function"},isArray:Array.isArray||function(q){return b.type(q)==="array"},isWindow:function(q){return q&&
typeof q==="object"&&"setInterval"in q},isNaN:function(q){return q==null||!w.test(q)||isNaN(q)},type:function(q){return q==null?String(q):Y[F.call(q)]||"object"},isPlainObject:function(q){if(!q||b.type(q)!=="object"||q.nodeType||b.isWindow(q))return false;try{if(q.constructor&&!G.call(q,"constructor")&&!G.call(q.constructor.prototype,"isPrototypeOf"))return false}catch(E){return false}for(var M in q);return M===g||G.call(q,M)},isEmptyObject:function(q){for(var E in q)return false;return true},error:function(q){throw q;
},parseJSON:function(q){if(typeof q!=="string"||!q)return null;q=b.trim(q);if(c.JSON&&c.JSON.parse)return c.JSON.parse(q);if(T.test(q.replace(da,"@").replace(ba,"]").replace(ea,"")))return(new Function("return "+q))();b.error("Invalid JSON: "+q)},parseXML:function(q){var E,M;try{if(c.DOMParser){M=new DOMParser;E=M.parseFromString(q,"text/xml")}else{E=new ActiveXObject("Microsoft.XMLDOM");E.async="false";E.loadXML(q)}}catch(J){E=g}if(!E||!E.documentElement||E.getElementsByTagName("parsererror").length)b.error("Invalid XML: "+
q);return E},noop:function(){},globalEval:function(q){if(q&&n.test(q))(c.execScript||function(E){c.eval.call(c,E)})(q)},camelCase:function(q){return q.replace(p,"ms-").replace(m,x)},nodeName:function(q,E){return q.nodeName&&q.nodeName.toUpperCase()===E.toUpperCase()},each:function(q,E,M){var J,V=0,aa=q.length,ja=aa===g||b.isFunction(q);if(M)if(ja)for(J in q){if(E.apply(q[J],M)===false)break}else for(;V<aa;){if(E.apply(q[V++],M)===false)break}else if(ja)for(J in q){if(E.call(q[J],J,q[J])===false)break}else for(;V<
aa;)if(E.call(q[V],V,q[V++])===false)break;return q},trim:ma?function(q){return q==null?"":ma.call(q)}:function(q){return q==null?"":q.toString().replace(r,"").replace(u,"")},makeArray:function(q,E){var M=E||[];if(q!=null){var J=b.type(q);q.length==null||J==="string"||J==="function"||J==="regexp"||b.isWindow(q)?X.call(M,q):b.merge(M,q)}return M},inArray:function(q,E){if(!E)return-1;if(la)return la.call(E,q);for(var M=0,J=E.length;M<J;M++)if(E[M]===q)return M;return-1},merge:function(q,E){var M=q.length,
J=0;if(typeof E.length==="number")for(var V=E.length;J<V;J++)q[M++]=E[J];else for(;E[J]!==g;)q[M++]=E[J++];q.length=M;return q},grep:function(q,E,M){var J=[],V;M=!!M;for(var aa=0,ja=q.length;aa<ja;aa++){V=!!E(q[aa],aa);M!==V&&J.push(q[aa])}return J},map:function(q,E,M){var J,V,aa=[],ja=0,ka=q.length;if(q instanceof b||ka!==g&&typeof ka==="number"&&(ka>0&&q[0]&&q[ka-1]||ka===0||b.isArray(q)))for(;ja<ka;ja++){J=E(q[ja],ja,M);if(J!=null)aa[aa.length]=J}else for(V in q){J=E(q[V],V,M);if(J!=null)aa[aa.length]=
J}return aa.concat.apply([],aa)},guid:1,proxy:function(q,E){if(typeof E==="string"){var M=q[E];E=q;q=M}if(!b.isFunction(q))return g;var J=pa.call(arguments,2);M=function(){return q.apply(E,J.concat(pa.call(arguments)))};M.guid=q.guid=q.guid||M.guid||b.guid++;return M},access:function(q,E,M,J,V,aa){var ja=q.length;if(typeof E==="object"){for(var ka in E)b.access(q,ka,E[ka],J,V,M);return q}if(M!==g){J=!aa&&J&&b.isFunction(M);for(ka=0;ka<ja;ka++)V(q[ka],E,J?M.call(q[ka],ka,V(q[ka],E)):M,aa);return q}return ja?
V(q[0],E):g},now:function(){return(new Date).getTime()},uaMatch:function(q){q=q.toLowerCase();q=Na.exec(q)||oa.exec(q)||na.exec(q)||q.indexOf("compatible")<0&&Ba.exec(q)||[];return{browser:q[1]||"",version:q[2]||"0"}},sub:function(){function q(M,J){return new q.fn.init(M,J)}b.extend(true,q,this);q.superclass=this;q.fn=q.prototype=this();q.fn.constructor=q;q.sub=this.sub;q.fn.init=function(M,J){if(J&&J instanceof b&&!(J instanceof q))J=q(J);return b.fn.init.call(this,M,J,E)};q.fn.init.prototype=q.fn;
var E=q(K);return q},browser:{}});b.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(q,E){Y["[object "+E+"]"]=E.toLowerCase()});z=b.uaMatch(z);if(z.browser){b.browser[z.browser]=true;b.browser.version=z.version}if(b.browser.webkit)b.browser.safari=true;if(n.test("\u00a0")){r=/^[\s\xA0]+/;u=/[\s\xA0]+$/}j=b(K);if(K.addEventListener)A=function(){K.removeEventListener("DOMContentLoaded",A,false);b.ready()};else if(K.attachEvent)A=function(){if(K.readyState==="complete"){K.detachEvent("onreadystatechange",
A);b.ready()}};return b}(),Oa="done fail isResolved isRejected promise then always pipe".split(" "),db=[].slice;d.extend({_Deferred:function(){var a=[],b,f,h,j={done:function(){if(!h){var l=arguments,n,r,u,w,C;if(b){C=b;b=0}n=0;for(r=l.length;n<r;n++){u=l[n];w=d.type(u);if(w==="array")j.done.apply(j,u);else w==="function"&&a.push(u)}C&&j.resolveWith(C[0],C[1])}return this},resolveWith:function(l,n){if(!h&&!b&&!f){n=n||[];f=1;try{for(;a[0];)a.shift().apply(l,n)}finally{b=[l,n];f=0}}return this},resolve:function(){j.resolveWith(this,
arguments);return this},isResolved:function(){return!!(f||b)},cancel:function(){h=1;a=[];return this}};return j},Deferred:function(a){var b=d._Deferred(),f=d._Deferred(),h;d.extend(b,{then:function(j,l){b.done(j).fail(l);return this},always:function(){return b.done.apply(b,arguments).fail.apply(this,arguments)},fail:f.done,rejectWith:f.resolveWith,reject:f.resolve,isRejected:f.isResolved,pipe:function(j,l){return d.Deferred(function(n){d.each({done:[j,"resolve"],fail:[l,"reject"]},function(r,u){var w=
u[0],C=u[1],T;d.isFunction(w)?b[r](function(){(T=w.apply(this,arguments))&&d.isFunction(T.promise)?T.promise().then(n.resolve,n.reject):n[C+"With"](this===b?n:this,[T])}):b[r](n[C])})}).promise()},promise:function(j){if(j==null){if(h)return h;h=j={}}for(var l=Oa.length;l--;)j[Oa[l]]=b[Oa[l]];return j}});b.done(f.cancel).fail(b.cancel);delete b.cancel;a&&a.call(b,b);return b},when:function(a){function b(r){return function(u){f[r]=arguments.length>1?db.call(arguments,0):u;--l||n.resolveWith(n,db.call(f,
0))}}var f=arguments,h=0,j=f.length,l=j,n=j<=1&&a&&d.isFunction(a.promise)?a:d.Deferred();if(j>1){for(;h<j;h++)if(f[h]&&d.isFunction(f[h].promise))f[h].promise().then(b(h),n.reject);else--l;l||n.resolveWith(n,f)}else if(n!==a)n.resolveWith(n,j?[a]:[]);return n.promise()}});d.support=function(){var a=K.createElement("div"),b=K.documentElement,f,h,j,l,n,r;a.setAttribute("className","t");a.innerHTML="   <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>";
f=a.getElementsByTagName("*");h=a.getElementsByTagName("a")[0];if(!f||!f.length||!h)return{};j=K.createElement("select");l=j.appendChild(K.createElement("option"));f=a.getElementsByTagName("input")[0];n={leadingWhitespace:a.firstChild.nodeType===3,tbody:!a.getElementsByTagName("tbody").length,htmlSerialize:!!a.getElementsByTagName("link").length,style:/top/.test(h.getAttribute("style")),hrefNormalized:h.getAttribute("href")==="/a",opacity:/^0.55$/.test(h.style.opacity),cssFloat:!!h.style.cssFloat,
checkOn:f.value==="on",optSelected:l.selected,getSetAttribute:a.className!=="t",submitBubbles:true,changeBubbles:true,focusinBubbles:false,deleteExpando:true,noCloneEvent:true,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableMarginRight:true};f.checked=true;n.noCloneChecked=f.cloneNode(true).checked;j.disabled=true;n.optDisabled=!l.disabled;try{delete a.test}catch(u){n.deleteExpando=false}if(!a.addEventListener&&a.attachEvent&&a.fireEvent){a.attachEvent("onclick",function(){n.noCloneEvent=
false});a.cloneNode(true).fireEvent("onclick")}f=K.createElement("input");f.value="t";f.setAttribute("type","radio");n.radioValue=f.value==="t";f.setAttribute("checked","checked");a.appendChild(f);h=K.createDocumentFragment();h.appendChild(a.firstChild);n.checkClone=h.cloneNode(true).cloneNode(true).lastChild.checked;a.innerHTML="";a.style.width=a.style.paddingLeft="1px";j=K.getElementsByTagName("body")[0];h=K.createElement(j?"div":"body");l={visibility:"hidden",width:0,height:0,border:0,margin:0,
background:"none"};j&&d.extend(l,{position:"absolute",left:"-1000px",top:"-1000px"});for(r in l)h.style[r]=l[r];h.appendChild(a);b=j||b;b.insertBefore(h,b.firstChild);n.appendChecked=f.checked;n.boxModel=a.offsetWidth===2;if("zoom"in a.style){a.style.display="inline";a.style.zoom=1;n.inlineBlockNeedsLayout=a.offsetWidth===2;a.style.display="";a.innerHTML="<div style='width:4px;'></div>";n.shrinkWrapBlocks=a.offsetWidth!==2}a.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>";
j=a.getElementsByTagName("td");f=j[0].offsetHeight===0;j[0].style.display="";j[1].style.display="none";n.reliableHiddenOffsets=f&&j[0].offsetHeight===0;a.innerHTML="";if(K.defaultView&&K.defaultView.getComputedStyle){f=K.createElement("div");f.style.width="0";f.style.marginRight="0";a.appendChild(f);n.reliableMarginRight=(parseInt((K.defaultView.getComputedStyle(f,null)||{marginRight:0}).marginRight,10)||0)===0}h.innerHTML="";b.removeChild(h);if(a.attachEvent)for(r in{submit:1,change:1,focusin:1}){b=
"on"+r;f=b in a;if(!f){a.setAttribute(b,"return;");f=typeof a[b]==="function"}n[r+"Bubbles"]=f}h=h=j=l=j=f=a=f=null;return n}();d.boxModel=d.support.boxModel;var Da=/^(?:\{.*\}|\[.*\])$/,Va=/([A-Z])/g;d.extend({cache:{},uuid:0,expando:"jQuery"+(d.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:true,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:true},hasData:function(a){a=a.nodeType?d.cache[a[d.expando]]:a[d.expando];return!!a&&!o(a)},data:function(a,b,f,h){if(d.acceptData(a)){var j=
d.expando,l=typeof b==="string",n=a.nodeType,r=n?d.cache:a,u=n?a[d.expando]:a[d.expando]&&d.expando;if(!((!u||h&&u&&r[u]&&!r[u][j])&&l&&f===g)){if(!u)if(n)a[d.expando]=u=++d.uuid;else u=d.expando;if(!r[u]){r[u]={};if(!n)r[u].toJSON=d.noop}if(typeof b==="object"||typeof b==="function")if(h)r[u][j]=d.extend(r[u][j],b);else r[u]=d.extend(r[u],b);a=r[u];if(h){a[j]||(a[j]={});a=a[j]}if(f!==g)a[d.camelCase(b)]=f;if(b==="events"&&!a[b])return a[j]&&a[j].events;if(l){f=a[b];if(f==null)f=a[d.camelCase(b)]}else f=
a;return f}}},removeData:function(a,b,f){if(d.acceptData(a)){var h,j=d.expando,l=a.nodeType,n=l?d.cache:a,r=l?a[d.expando]:d.expando;if(n[r]){if(b)if(h=f?n[r][j]:n[r]){h[b]||(b=d.camelCase(b));delete h[b];if(!o(h))return}if(f){delete n[r][j];if(!o(n[r]))return}b=n[r][j];if(d.support.deleteExpando||!n.setInterval)delete n[r];else n[r]=null;if(b){n[r]={};if(!l)n[r].toJSON=d.noop;n[r][j]=b}else if(l)if(d.support.deleteExpando)delete a[d.expando];else if(a.removeAttribute)a.removeAttribute(d.expando);
else a[d.expando]=null}}},_data:function(a,b,f){return d.data(a,b,f,true)},acceptData:function(a){if(a.nodeName){var b=d.noData[a.nodeName.toLowerCase()];if(b)return!(b===true||a.getAttribute("classid")!==b)}return true}});d.fn.extend({data:function(a,b){var f=null;if(typeof a==="undefined"){if(this.length){f=d.data(this[0]);if(this[0].nodeType===1)for(var h=this[0].attributes,j,l=0,n=h.length;l<n;l++){j=h[l].name;if(j.indexOf("data-")===0){j=d.camelCase(j.substring(5));k(this[0],j,f[j])}}}return f}else if(typeof a===
"object")return this.each(function(){d.data(this,a)});var r=a.split(".");r[1]=r[1]?"."+r[1]:"";if(b===g){f=this.triggerHandler("getData"+r[1]+"!",[r[0]]);if(f===g&&this.length){f=d.data(this[0],a);f=k(this[0],a,f)}return f===g&&r[1]?this.data(r[0]):f}else return this.each(function(){var u=d(this),w=[r[0],b];u.triggerHandler("setData"+r[1]+"!",w);d.data(this,a,b);u.triggerHandler("changeData"+r[1]+"!",w)})},removeData:function(a){return this.each(function(){d.removeData(this,a)})}});d.extend({_mark:function(a,
b){if(a){b=(b||"fx")+"mark";d.data(a,b,(d.data(a,b,g,true)||0)+1,true)}},_unmark:function(a,b,f){if(a!==true){f=b;b=a;a=false}if(b){f=f||"fx";var h=f+"mark";if(a=a?0:(d.data(b,h,g,true)||1)-1)d.data(b,h,a,true);else{d.removeData(b,h,true);s(b,f,"mark")}}},queue:function(a,b,f){if(a){b=(b||"fx")+"queue";var h=d.data(a,b,g,true);if(f)if(!h||d.isArray(f))h=d.data(a,b,d.makeArray(f),true);else h.push(f);return h||[]}},dequeue:function(a,b){b=b||"fx";var f=d.queue(a,b),h=f.shift();if(h==="inprogress")h=
f.shift();if(h){b==="fx"&&f.unshift("inprogress");h.call(a,function(){d.dequeue(a,b)})}if(!f.length){d.removeData(a,b+"queue",true);s(a,b,"queue")}}});d.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b===g)return d.queue(this[0],a);return this.each(function(){var f=d.queue(this,a,b);a==="fx"&&f[0]!=="inprogress"&&d.dequeue(this,a)})},dequeue:function(a){return this.each(function(){d.dequeue(this,a)})},delay:function(a,b){a=d.fx?d.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,
function(){var f=this;setTimeout(function(){d.dequeue(f,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a){function b(){--l||f.resolveWith(h,[h])}if(typeof a!=="string")a=g;a=a||"fx";var f=d.Deferred(),h=this,j=h.length,l=1,n=a+"defer",r=a+"queue";a=a+"mark";for(var u;j--;)if(u=d.data(h[j],n,g,true)||(d.data(h[j],r,g,true)||d.data(h[j],a,g,true))&&d.data(h[j],n,d._Deferred(),true)){l++;u.done(b)}b();return f.promise()}});var wa=/[\n\t\r]/g,Pa=/\s+/,fb=/\r/g,S=/^(?:button|input)$/i,
y=/^(?:button|input|object|select|textarea)$/i,B=/^a(?:rea)?$/i,H=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,O,R;d.fn.extend({attr:function(a,b){return d.access(this,a,b,true,d.attr)},removeAttr:function(a){return this.each(function(){d.removeAttr(this,a)})},prop:function(a,b){return d.access(this,a,b,true,d.prop)},removeProp:function(a){a=d.propFix[a]||a;return this.each(function(){try{this[a]=g;delete this[a]}catch(b){}})},
addClass:function(a){var b,f,h,j,l,n,r;if(d.isFunction(a))return this.each(function(u){d(this).addClass(a.call(this,u,this.className))});if(a&&typeof a==="string"){b=a.split(Pa);f=0;for(h=this.length;f<h;f++){j=this[f];if(j.nodeType===1)if(!j.className&&b.length===1)j.className=a;else{l=" "+j.className+" ";n=0;for(r=b.length;n<r;n++)~l.indexOf(" "+b[n]+" ")||(l+=b[n]+" ");j.className=d.trim(l)}}}return this},removeClass:function(a){var b,f,h,j,l,n,r;if(d.isFunction(a))return this.each(function(u){d(this).removeClass(a.call(this,
u,this.className))});if(a&&typeof a==="string"||a===g){b=(a||"").split(Pa);f=0;for(h=this.length;f<h;f++){j=this[f];if(j.nodeType===1&&j.className)if(a){l=(" "+j.className+" ").replace(wa," ");n=0;for(r=b.length;n<r;n++)l=l.replace(" "+b[n]+" "," ");j.className=d.trim(l)}else j.className=""}}return this},toggleClass:function(a,b){var f=typeof a,h=typeof b==="boolean";if(d.isFunction(a))return this.each(function(j){d(this).toggleClass(a.call(this,j,this.className,b),b)});return this.each(function(){if(f===
"string")for(var j,l=0,n=d(this),r=b,u=a.split(Pa);j=u[l++];){r=h?r:!n.hasClass(j);n[r?"addClass":"removeClass"](j)}else if(f==="undefined"||f==="boolean"){this.className&&d._data(this,"__className__",this.className);this.className=this.className||a===false?"":d._data(this,"__className__")||""}})},hasClass:function(a){a=" "+a+" ";for(var b=0,f=this.length;b<f;b++)if(this[b].nodeType===1&&(" "+this[b].className+" ").replace(wa," ").indexOf(a)>-1)return true;return false},val:function(a){var b,f,h=
this[0];if(!arguments.length){if(h){if((b=d.valHooks[h.nodeName.toLowerCase()]||d.valHooks[h.type])&&"get"in b&&(f=b.get(h,"value"))!==g)return f;f=h.value;return typeof f==="string"?f.replace(fb,""):f==null?"":f}return g}var j=d.isFunction(a);return this.each(function(l){var n=d(this);if(this.nodeType===1){l=j?a.call(this,l,n.val()):a;if(l==null)l="";else if(typeof l==="number")l+="";else if(d.isArray(l))l=d.map(l,function(r){return r==null?"":r+""});b=d.valHooks[this.nodeName.toLowerCase()]||d.valHooks[this.type];
if(!b||!("set"in b)||b.set(this,l,"value")===g)this.value=l}})}});d.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,f=a.selectedIndex,h=[],j=a.options;a=a.type==="select-one";if(f<0)return null;for(var l=a?f:0,n=a?f+1:j.length;l<n;l++){b=j[l];if(b.selected&&(d.support.optDisabled?!b.disabled:b.getAttribute("disabled")===null)&&(!b.parentNode.disabled||!d.nodeName(b.parentNode,"optgroup"))){b=d(b).val();if(a)return b;
h.push(b)}}if(a&&!h.length&&j.length)return d(j[f]).val();return h},set:function(a,b){var f=d.makeArray(b);d(a).find("option").each(function(){this.selected=d.inArray(d(this).val(),f)>=0});if(!f.length)a.selectedIndex=-1;return f}}},attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attrFix:{tabindex:"tabIndex"},attr:function(a,b,f,h){var j=a.nodeType;if(!a||j===3||j===8||j===2)return g;if(h&&b in d.attrFn)return d(a)[b](f);if(!("getAttribute"in a))return d.prop(a,
b,f);var l,n;if(h=j!==1||!d.isXMLDoc(a)){b=d.attrFix[b]||b;n=d.attrHooks[b];if(!n)if(H.test(b))n=R;else if(O)n=O}if(f!==g)if(f===null){d.removeAttr(a,b);return g}else if(n&&"set"in n&&h&&(l=n.set(a,f,b))!==g)return l;else{a.setAttribute(b,""+f);return f}else if(n&&"get"in n&&h&&(l=n.get(a,b))!==null)return l;else{l=a.getAttribute(b);return l===null?g:l}},removeAttr:function(a,b){var f;if(a.nodeType===1){b=d.attrFix[b]||b;d.attr(a,b,"");a.removeAttribute(b);if(H.test(b)&&(f=d.propFix[b]||b)in a)a[f]=
false}},attrHooks:{type:{set:function(a,b){if(S.test(a.nodeName)&&a.parentNode)d.error("type property can't be changed");else if(!d.support.radioValue&&b==="radio"&&d.nodeName(a,"input")){var f=a.value;a.setAttribute("type",b);if(f)a.value=f;return b}}},value:{get:function(a,b){if(O&&d.nodeName(a,"button"))return O.get(a,b);return b in a?a.value:null},set:function(a,b,f){if(O&&d.nodeName(a,"button"))return O.set(a,b,f);a.value=b}}},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(a,b,f){var h=a.nodeType;if(!a||h===3||h===8||h===2)return g;var j,l;if(h!==1||!d.isXMLDoc(a)){b=d.propFix[b]||b;l=d.propHooks[b]}return f!==g?l&&"set"in l&&(j=l.set(a,f,b))!==g?j:a[b]=f:l&&"get"in l&&(j=l.get(a,b))!==null?j:a[b]},propHooks:{tabIndex:{get:function(a){var b=a.getAttributeNode("tabindex");
return b&&b.specified?parseInt(b.value,10):y.test(a.nodeName)||B.test(a.nodeName)&&a.href?0:g}}}});d.attrHooks.tabIndex=d.propHooks.tabIndex;R={get:function(a,b){var f;return d.prop(a,b)===true||(f=a.getAttributeNode(b))&&f.nodeValue!==false?b.toLowerCase():g},set:function(a,b,f){if(b===false)d.removeAttr(a,f);else{b=d.propFix[f]||f;if(b in a)a[b]=true;a.setAttribute(f,f.toLowerCase())}return f}};if(!d.support.getSetAttribute){O=d.valHooks.button={get:function(a,b){var f;return(f=a.getAttributeNode(b))&&
f.nodeValue!==""?f.nodeValue:g},set:function(a,b,f){var h=a.getAttributeNode(f);if(!h){h=K.createAttribute(f);a.setAttributeNode(h)}return h.nodeValue=b+""}};d.each(["width","height"],function(a,b){d.attrHooks[b]=d.extend(d.attrHooks[b],{set:function(f,h){if(h===""){f.setAttribute(b,"auto");return h}}})})}d.support.hrefNormalized||d.each(["href","src","width","height"],function(a,b){d.attrHooks[b]=d.extend(d.attrHooks[b],{get:function(f){f=f.getAttribute(b,2);return f===null?g:f}})});if(!d.support.style)d.attrHooks.style=
{get:function(a){return a.style.cssText.toLowerCase()||g},set:function(a,b){return a.style.cssText=""+b}};if(!d.support.optSelected)d.propHooks.selected=d.extend(d.propHooks.selected,{get:function(){return null}});d.support.checkOn||d.each(["radio","checkbox"],function(){d.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}});d.each(["radio","checkbox"],function(){d.valHooks[this]=d.extend(d.valHooks[this],{set:function(a,b){if(d.isArray(b))return a.checked=d.inArray(d(a).val(),
b)>=0}})});var ca=/\.(.*)$/,Z=/^(?:textarea|input|select)$/i,ha=/\./g,ia=/ /g,Qa=/[^\w\s.|`]/g,Za=function(a){return a.replace(Qa,"\\$&")};d.event={add:function(a,b,f,h){if(!(a.nodeType===3||a.nodeType===8)){if(f===false)f=D;else if(!f)return;var j,l;if(f.handler){j=f;f=j.handler}if(!f.guid)f.guid=d.guid++;if(l=d._data(a)){var n=l.events,r=l.handle;if(!n)l.events=n={};if(!r)l.handle=r=function(ba){return typeof d!=="undefined"&&(!ba||d.event.triggered!==ba.type)?d.event.handle.apply(r.elem,arguments):
g};r.elem=a;b=b.split(" ");for(var u,w=0,C;u=b[w++];){l=j?d.extend({},j):{handler:f,data:h};if(u.indexOf(".")>-1){C=u.split(".");u=C.shift();l.namespace=C.slice(0).sort().join(".")}else{C=[];l.namespace=""}l.type=u;if(!l.guid)l.guid=f.guid;var T=n[u],da=d.event.special[u]||{};if(!T){T=n[u]=[];if(!da.setup||da.setup.call(a,h,C,r)===false)if(a.addEventListener)a.addEventListener(u,r,false);else a.attachEvent&&a.attachEvent("on"+u,r)}if(da.add){da.add.call(a,l);if(!l.handler.guid)l.handler.guid=f.guid}T.push(l);
d.event.global[u]=true}a=null}}},global:{},remove:function(a,b,f,h){if(!(a.nodeType===3||a.nodeType===8)){if(f===false)f=D;var j,l,n=0,r,u,w,C,T,da,ba=d.hasData(a)&&d._data(a),ea=ba&&ba.events;if(ba&&ea){if(b&&b.type){f=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(j in ea)d.event.remove(a,j+b)}else{for(b=b.split(" ");j=b[n++];){C=j;r=j.indexOf(".")<0;u=[];if(!r){u=j.split(".");j=u.shift();w=RegExp("(^|\\.)"+d.map(u.slice(0).sort(),Za).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(T=
ea[j])if(f){C=d.event.special[j]||{};for(l=h||0;l<T.length;l++){da=T[l];if(f.guid===da.guid){if(r||w.test(da.namespace)){h==null&&T.splice(l--,1);C.remove&&C.remove.call(a,da)}if(h!=null)break}}if(T.length===0||h!=null&&T.length===1){if(!C.teardown||C.teardown.call(a,u)===false)d.removeEvent(a,j,ba.handle);delete ea[j]}}else for(l=0;l<T.length;l++){da=T[l];if(r||w.test(da.namespace)){d.event.remove(a,C,da.handler,l);T.splice(l--,1)}}}if(d.isEmptyObject(ea)){if(b=ba.handle)b.elem=null;delete ba.events;
delete ba.handle;d.isEmptyObject(ba)&&d.removeData(a,g,true)}}}}},customEvent:{getData:true,setData:true,changeData:true},trigger:function(a,b,f,h){var j=a.type||a,l=[],n;if(j.indexOf("!")>=0){j=j.slice(0,-1);n=true}if(j.indexOf(".")>=0){l=j.split(".");j=l.shift();l.sort()}if(!((!f||d.event.customEvent[j])&&!d.event.global[j])){a=typeof a==="object"?a[d.expando]?a:new d.Event(j,a):new d.Event(j);a.type=j;a.exclusive=n;a.namespace=l.join(".");a.namespace_re=RegExp("(^|\\.)"+l.join("\\.(?:.*\\.)?")+
"(\\.|$)");if(h||!f){a.preventDefault();a.stopPropagation()}if(f){if(!(f.nodeType===3||f.nodeType===8)){a.result=g;a.target=f;b=b!=null?d.makeArray(b):[];b.unshift(a);l=f;h=j.indexOf(":")<0?"on"+j:"";do{n=d._data(l,"handle");a.currentTarget=l;n&&n.apply(l,b);if(h&&d.acceptData(l)&&l[h]&&l[h].apply(l,b)===false){a.result=false;a.preventDefault()}l=l.parentNode||l.ownerDocument||l===a.target.ownerDocument&&c}while(l&&!a.isPropagationStopped());if(!a.isDefaultPrevented()){var r;l=d.event.special[j]||
{};if((!l._default||l._default.call(f.ownerDocument,a)===false)&&!(j==="click"&&d.nodeName(f,"a"))&&d.acceptData(f)){try{if(h&&f[j]){if(r=f[h])f[h]=null;d.event.triggered=j;f[j]()}}catch(u){}if(r)f[h]=r;d.event.triggered=g}}return a.result}}else d.each(d.cache,function(){var w=this[d.expando];w&&w.events&&w.events[j]&&d.event.trigger(a,b,w.handle.elem)})}},handle:function(a){a=d.event.fix(a||c.event);var b=((d._data(this,"events")||{})[a.type]||[]).slice(0),f=!a.exclusive&&!a.namespace,h=Array.prototype.slice.call(arguments,
0);h[0]=a;a.currentTarget=this;for(var j=0,l=b.length;j<l;j++){var n=b[j];if(f||a.namespace_re.test(n.namespace)){a.handler=n.handler;a.data=n.data;a.handleObj=n;n=n.handler.apply(this,h);if(n!==g){a.result=n;if(n===false){a.preventDefault();a.stopPropagation()}}if(a.isImmediatePropagationStopped())break}}return a.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(a){if(a[d.expando])return a;var b=a;a=d.Event(b);for(var f=this.props.length,h;f;){h=this.props[--f];a[h]=b[h]}if(!a.target)a.target=a.srcElement||K;if(a.target.nodeType===3)a.target=a.target.parentNode;if(!a.relatedTarget&&a.fromElement)a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;if(a.pageX==null&&a.clientX!=null){f=a.target.ownerDocument||K;b=f.documentElement;f=f.body;a.pageX=a.clientX+(b&&b.scrollLeft||f&&f.scrollLeft||0)-(b&&b.clientLeft||f&&f.clientLeft||
0);a.pageY=a.clientY+(b&&b.scrollTop||f&&f.scrollTop||0)-(b&&b.clientTop||f&&f.clientTop||0)}if(a.which==null&&(a.charCode!=null||a.keyCode!=null))a.which=a.charCode!=null?a.charCode:a.keyCode;if(!a.metaKey&&a.ctrlKey)a.metaKey=a.ctrlKey;if(!a.which&&a.button!==g)a.which=a.button&1?1:a.button&2?3:a.button&4?2:0;return a},guid:1E8,proxy:d.proxy,special:{ready:{setup:d.bindReady,teardown:d.noop},live:{add:function(a){d.event.add(this,L(a.origType,a.selector),d.extend({},a,{handler:I,guid:a.handler.guid}))},
remove:function(a){d.event.remove(this,L(a.origType,a.selector),a)}},beforeunload:{setup:function(a,b,f){if(d.isWindow(this))this.onbeforeunload=f},teardown:function(a,b){if(this.onbeforeunload===b)this.onbeforeunload=null}}}};d.removeEvent=K.removeEventListener?function(a,b,f){a.removeEventListener&&a.removeEventListener(b,f,false)}:function(a,b,f){a.detachEvent&&a.detachEvent("on"+b,f)};d.Event=function(a,b){if(!this.preventDefault)return new d.Event(a,b);if(a&&a.type){this.originalEvent=a;this.type=
a.type;this.isDefaultPrevented=a.defaultPrevented||a.returnValue===false||a.getPreventDefault&&a.getPreventDefault()?P:D}else this.type=a;b&&d.extend(this,b);this.timeStamp=d.now();this[d.expando]=true};d.Event.prototype={preventDefault:function(){this.isDefaultPrevented=P;var a=this.originalEvent;if(a)if(a.preventDefault)a.preventDefault();else a.returnValue=false},stopPropagation:function(){this.isPropagationStopped=P;var a=this.originalEvent;if(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=
true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=P;this.stopPropagation()},isDefaultPrevented:D,isPropagationStopped:D,isImmediatePropagationStopped:D};var ya=function(a){var b=a.relatedTarget,f=false,h=a.type;a.type=a.data;if(b!==this){if(b)f=d.contains(this,b);if(!f){d.event.handle.apply(this,arguments);a.type=h}}},xa=function(a){a.type=a.data;d.event.handle.apply(this,arguments)};d.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){d.event.special[a]=
{setup:function(f){d.event.add(this,b,f&&f.selector?xa:ya,a)},teardown:function(f){d.event.remove(this,b,f&&f.selector?xa:ya)}}});if(!d.support.submitBubbles)d.event.special.submit={setup:function(){if(d.nodeName(this,"form"))return false;else{d.event.add(this,"click.specialSubmit",function(a){var b=a.target,f=d.nodeName(b,"input")||d.nodeName(b,"button")?b.type:"";if((f==="submit"||f==="image")&&d(b).closest("form").length)Q("submit",this,arguments)});d.event.add(this,"keypress.specialSubmit",function(a){var b=
a.target,f=d.nodeName(b,"input")||d.nodeName(b,"button")?b.type:"";if((f==="text"||f==="password")&&d(b).closest("form").length&&a.keyCode===13)Q("submit",this,arguments)})}},teardown:function(){d.event.remove(this,".specialSubmit")}};if(!d.support.changeBubbles){var Ca,Ra=function(a){var b=d.nodeName(a,"input")?a.type:"",f=a.value;if(b==="radio"||b==="checkbox")f=a.checked;else if(b==="select-multiple")f=a.selectedIndex>-1?d.map(a.options,function(h){return h.selected}).join("-"):"";else if(d.nodeName(a,
"select"))f=a.selectedIndex;return f},gb=function(a,b){var f=a.target,h,j;if(!(!Z.test(f.nodeName)||f.readOnly)){h=d._data(f,"_change_data");j=Ra(f);if(a.type!=="focusout"||f.type!=="radio")d._data(f,"_change_data",j);if(!(h===g||j===h))if(h!=null||j){a.type="change";a.liveFired=g;d.event.trigger(a,b,f)}}};d.event.special.change={filters:{focusout:gb,beforedeactivate:gb,click:function(a){var b=a.target,f=d.nodeName(b,"input")?b.type:"";if(f==="radio"||f==="checkbox"||d.nodeName(b,"select"))gb.call(this,
a)},keydown:function(a){var b=a.target,f=d.nodeName(b,"input")?b.type:"";if(a.keyCode===13&&!d.nodeName(b,"textarea")||a.keyCode===32&&(f==="checkbox"||f==="radio")||f==="select-multiple")gb.call(this,a)},beforeactivate:function(a){a=a.target;d._data(a,"_change_data",Ra(a))}},setup:function(){if(this.type==="file")return false;for(var a in Ca)d.event.add(this,a+".specialChange",Ca[a]);return Z.test(this.nodeName)},teardown:function(){d.event.remove(this,".specialChange");return Z.test(this.nodeName)}};
Ca=d.event.special.change.filters;Ca.focus=Ca.beforeactivate}d.support.focusinBubbles||d.each({focus:"focusin",blur:"focusout"},function(a,b){function f(j){var l=d.event.fix(j);l.type=b;l.originalEvent={};d.event.trigger(l,null,l.target);l.isDefaultPrevented()&&j.preventDefault()}var h=0;d.event.special[b]={setup:function(){h++===0&&K.addEventListener(a,f,true)},teardown:function(){--h===0&&K.removeEventListener(a,f,true)}}});d.each(["bind","one"],function(a,b){d.fn[b]=function(f,h,j){var l;if(typeof f===
"object"){for(var n in f)this[b](n,h,f[n],j);return this}if(arguments.length===2||h===false){j=h;h=g}if(b==="one"){l=function(u){d(this).unbind(u,l);return j.apply(this,arguments)};l.guid=j.guid||d.guid++}else l=j;if(f==="unload"&&b!=="one")this.one(f,h,j);else{n=0;for(var r=this.length;n<r;n++)d.event.add(this[n],f,l,h)}return this}});d.fn.extend({unbind:function(a,b){if(typeof a==="object"&&!a.preventDefault)for(var f in a)this.unbind(f,a[f]);else{f=0;for(var h=this.length;f<h;f++)d.event.remove(this[f],
a,b)}return this},delegate:function(a,b,f,h){return this.live(b,f,h,a)},undelegate:function(a,b,f){return arguments.length===0?this.unbind("live"):this.die(b,null,f,a)},trigger:function(a,b){return this.each(function(){d.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return d.event.trigger(a,b,this[0],true)},toggle:function(a){var b=arguments,f=a.guid||d.guid++,h=0,j=function(l){var n=(d.data(this,"lastToggle"+a.guid)||0)%h;d.data(this,"lastToggle"+a.guid,n+1);l.preventDefault();
return b[n].apply(this,arguments)||false};for(j.guid=f;h<b.length;)b[h++].guid=f;return this.click(j)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var nb={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};d.each(["live","die"],function(a,b){d.fn[b]=function(f,h,j,l){var n=0,r,u,w=l||this.selector,C=l?this:d(this.context);if(typeof f==="object"&&!f.preventDefault){for(r in f)C[b](r,h,f[r],w);return this}if(b==="die"&&!f&&l&&l.charAt(0)==="."){C.unbind(l);
return this}if(h===false||d.isFunction(h)){j=h||D;h=g}for(f=(f||"").split(" ");(l=f[n++])!=null;){r=ca.exec(l);u="";if(r){u=r[0];l=l.replace(ca,"")}if(l==="hover")f.push("mouseenter"+u,"mouseleave"+u);else{r=l;if(nb[l]){f.push(nb[l]+u);l+=u}else l=(nb[l]||l)+u;if(b==="live"){u=0;for(var T=C.length;u<T;u++)d.event.add(C[u],"live."+L(l,w),{data:h,selector:w,handler:j,origType:l,origHandler:j,preType:r})}else C.unbind("live."+L(l,w),j)}}return this}});d.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(a,b){d.fn[b]=function(f,h){if(h==null){h=f;f=null}return arguments.length>0?this.bind(b,f,h):this.trigger(b)};if(d.attrFn)d.attrFn[b]=true});(function(){function a(m,p,x,z,v,A){v=0;for(var F=z.length;v<F;v++){var G=z[v];if(G){var X=false;for(G=G[m];G;){if(G.sizcache===x){X=z[G.sizset];break}if(G.nodeType===1&&!A){G.sizcache=x;G.sizset=v}if(G.nodeName.toLowerCase()===p){X=G;break}G=G[m]}z[v]=X}}}function b(m,p,x,z,v,A){v=0;for(var F=z.length;v<F;v++){var G=z[v];if(G){var X=false;for(G=G[m];G;){if(G.sizcache===
x){X=z[G.sizset];break}if(G.nodeType===1){if(!A){G.sizcache=x;G.sizset=v}if(typeof p!=="string"){if(G===p){X=true;break}}else if(w.filter(p,[G]).length>0){X=G;break}}G=G[m]}z[v]=X}}}var f=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,h=0,j=Object.prototype.toString,l=false,n=true,r=/\\/g,u=/\W/;[0,0].sort(function(){n=false;return 0});var w=function(m,p,x,z){x=x||[];var v=p=p||K;if(p.nodeType!==1&&p.nodeType!==
9)return[];if(!m||typeof m!=="string")return x;var A,F,G,X,pa,ma=true,la=w.isXML(p),Y=[],q=m;do{f.exec("");if(A=f.exec(q)){q=A[3];Y.push(A[1]);if(A[2]){X=A[3];break}}}while(A);if(Y.length>1&&T.exec(m))if(Y.length===2&&C.relative[Y[0]])F=Ba(Y[0]+Y[1],p);else for(F=C.relative[Y[0]]?[p]:w(Y.shift(),p);Y.length;){m=Y.shift();if(C.relative[m])m+=Y.shift();F=Ba(m,F)}else{if(!z&&Y.length>1&&p.nodeType===9&&!la&&C.match.ID.test(Y[0])&&!C.match.ID.test(Y[Y.length-1])){A=w.find(Y.shift(),p,la);p=A.expr?w.filter(A.expr,
A.set)[0]:A.set[0]}if(p){A=z?{expr:Y.pop(),set:ea(z)}:w.find(Y.pop(),Y.length===1&&(Y[0]==="~"||Y[0]==="+")&&p.parentNode?p.parentNode:p,la);F=A.expr?w.filter(A.expr,A.set):A.set;if(Y.length>0)G=ea(F);else ma=false;for(;Y.length;){A=pa=Y.pop();if(C.relative[pa])A=Y.pop();else pa="";if(A==null)A=p;C.relative[pa](G,A,la)}}else G=[]}G||(G=F);G||w.error(pa||m);if(j.call(G)==="[object Array]")if(ma)if(p&&p.nodeType===1)for(m=0;G[m]!=null;m++){if(G[m]&&(G[m]===true||G[m].nodeType===1&&w.contains(p,G[m])))x.push(F[m])}else for(m=
0;G[m]!=null;m++)G[m]&&G[m].nodeType===1&&x.push(F[m]);else x.push.apply(x,G);else ea(G,x);if(X){w(X,v,x,z);w.uniqueSort(x)}return x};w.uniqueSort=function(m){if(oa){l=n;m.sort(oa);if(l)for(var p=1;p<m.length;p++)m[p]===m[p-1]&&m.splice(p--,1)}return m};w.matches=function(m,p){return w(m,null,null,p)};w.matchesSelector=function(m,p){return w(p,null,null,[m]).length>0};w.find=function(m,p,x){var z;if(!m)return[];for(var v=0,A=C.order.length;v<A;v++){var F,G=C.order[v];if(F=C.leftMatch[G].exec(m)){var X=
F[1];F.splice(1,1);if(X.substr(X.length-1)!=="\\"){F[1]=(F[1]||"").replace(r,"");z=C.find[G](F,p,x);if(z!=null){m=m.replace(C.match[G],"");break}}}}z||(z=typeof p.getElementsByTagName!=="undefined"?p.getElementsByTagName("*"):[]);return{set:z,expr:m}};w.filter=function(m,p,x,z){for(var v,A,F=m,G=[],X=p,pa=p&&p[0]&&w.isXML(p[0]);m&&p.length;){for(var ma in C.filter)if((v=C.leftMatch[ma].exec(m))!=null&&v[2]){var la,Y,q=C.filter[ma];Y=v[1];A=false;v.splice(1,1);if(Y.substr(Y.length-1)!=="\\"){if(X===
G)G=[];if(C.preFilter[ma])if(v=C.preFilter[ma](v,X,x,G,z,pa)){if(v===true)continue}else A=la=true;if(v)for(var E=0;(Y=X[E])!=null;E++)if(Y){la=q(Y,v,E,X);var M=z^!!la;if(x&&la!=null)if(M)A=true;else X[E]=false;else if(M){G.push(Y);A=true}}if(la!==g){x||(X=G);m=m.replace(C.match[ma],"");if(!A)return[];break}}}if(m===F)if(A==null)w.error(m);else break;F=m}return X};w.error=function(m){throw"Syntax error, unrecognized expression: "+m;};var C=w.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(m){return m.getAttribute("href")},type:function(m){return m.getAttribute("type")}},relative:{"+":function(m,p){var x=typeof p==="string",z=x&&!u.test(p);x=x&&!z;if(z)p=p.toLowerCase();z=0;for(var v=m.length,A;z<v;z++)if(A=m[z]){for(;(A=A.previousSibling)&&A.nodeType!==1;);m[z]=x||A&&A.nodeName.toLowerCase()===p?A||false:A===p}x&&w.filter(p,m,true)},">":function(m,p){var x,z=typeof p==="string",v=0,A=m.length;if(z&&
!u.test(p))for(p=p.toLowerCase();v<A;v++){if(x=m[v]){x=x.parentNode;m[v]=x.nodeName.toLowerCase()===p?x:false}}else{for(;v<A;v++)if(x=m[v])m[v]=z?x.parentNode:x.parentNode===p;z&&w.filter(p,m,true)}},"":function(m,p,x){var z,v=h++,A=b;if(typeof p==="string"&&!u.test(p)){z=p=p.toLowerCase();A=a}A("parentNode",p,v,m,z,x)},"~":function(m,p,x){var z,v=h++,A=b;if(typeof p==="string"&&!u.test(p)){z=p=p.toLowerCase();A=a}A("previousSibling",p,v,m,z,x)}},find:{ID:function(m,p,x){if(typeof p.getElementById!==
"undefined"&&!x)return(m=p.getElementById(m[1]))&&m.parentNode?[m]:[]},NAME:function(m,p){if(typeof p.getElementsByName!=="undefined"){for(var x=[],z=p.getElementsByName(m[1]),v=0,A=z.length;v<A;v++)z[v].getAttribute("name")===m[1]&&x.push(z[v]);return x.length===0?null:x}},TAG:function(m,p){if(typeof p.getElementsByTagName!=="undefined")return p.getElementsByTagName(m[1])}},preFilter:{CLASS:function(m,p,x,z,v,A){m=" "+m[1].replace(r,"")+" ";if(A)return m;A=0;for(var F;(F=p[A])!=null;A++)if(F)if(v^
(F.className&&(" "+F.className+" ").replace(/[\t\n\r]/g," ").indexOf(m)>=0))x||z.push(F);else if(x)p[A]=false;return false},ID:function(m){return m[1].replace(r,"")},TAG:function(m){return m[1].replace(r,"").toLowerCase()},CHILD:function(m){if(m[1]==="nth"){m[2]||w.error(m[0]);m[2]=m[2].replace(/^\+|\s*/g,"");var p=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(m[2]==="even"&&"2n"||m[2]==="odd"&&"2n+1"||!/\D/.test(m[2])&&"0n+"+m[2]||m[2]);m[2]=p[1]+(p[2]||1)-0;m[3]=p[3]-0}else m[2]&&w.error(m[0]);m[0]=h++;return m},
ATTR:function(m,p,x,z,v,A){p=m[1]=m[1].replace(r,"");if(!A&&C.attrMap[p])m[1]=C.attrMap[p];m[4]=(m[4]||m[5]||"").replace(r,"");if(m[2]==="~=")m[4]=" "+m[4]+" ";return m},PSEUDO:function(m,p,x,z,v){if(m[1]==="not")if((f.exec(m[3])||"").length>1||/^\w/.test(m[3]))m[3]=w(m[3],null,null,p);else{m=w.filter(m[3],p,x,true^v);x||z.push.apply(z,m);return false}else if(C.match.POS.test(m[0])||C.match.CHILD.test(m[0]))return true;return m},POS:function(m){m.unshift(true);return m}},filters:{enabled:function(m){return m.disabled===
false&&m.type!=="hidden"},disabled:function(m){return m.disabled===true},checked:function(m){return m.checked===true},selected:function(m){return m.selected===true},parent:function(m){return!!m.firstChild},empty:function(m){return!m.firstChild},has:function(m,p,x){return!!w(x[3],m).length},header:function(m){return/h\d/i.test(m.nodeName)},text:function(m){var p=m.getAttribute("type"),x=m.type;return m.nodeName.toLowerCase()==="input"&&"text"===x&&(p===x||p===null)},radio:function(m){return m.nodeName.toLowerCase()===
"input"&&"radio"===m.type},checkbox:function(m){return m.nodeName.toLowerCase()==="input"&&"checkbox"===m.type},file:function(m){return m.nodeName.toLowerCase()==="input"&&"file"===m.type},password:function(m){return m.nodeName.toLowerCase()==="input"&&"password"===m.type},submit:function(m){var p=m.nodeName.toLowerCase();return(p==="input"||p==="button")&&"submit"===m.type},image:function(m){return m.nodeName.toLowerCase()==="input"&&"image"===m.type},reset:function(m){var p=m.nodeName.toLowerCase();
return(p==="input"||p==="button")&&"reset"===m.type},button:function(m){var p=m.nodeName.toLowerCase();return p==="input"&&"button"===m.type||p==="button"},input:function(m){return/input|select|textarea|button/i.test(m.nodeName)},focus:function(m){return m===m.ownerDocument.activeElement}},setFilters:{first:function(m,p){return p===0},last:function(m,p,x,z){return p===z.length-1},even:function(m,p){return p%2===0},odd:function(m,p){return p%2===1},lt:function(m,p,x){return p<x[3]-0},gt:function(m,
p,x){return p>x[3]-0},nth:function(m,p,x){return x[3]-0===p},eq:function(m,p,x){return x[3]-0===p}},filter:{PSEUDO:function(m,p,x,z){var v=p[1],A=C.filters[v];if(A)return A(m,x,p,z);else if(v==="contains")return(m.textContent||m.innerText||w.getText([m])||"").indexOf(p[3])>=0;else if(v==="not"){p=p[3];x=0;for(z=p.length;x<z;x++)if(p[x]===m)return false;return true}else w.error(v)},CHILD:function(m,p){var x=p[1],z=m;switch(x){case "only":case "first":for(;z=z.previousSibling;)if(z.nodeType===1)return false;
if(x==="first")return true;z=m;case "last":for(;z=z.nextSibling;)if(z.nodeType===1)return false;return true;case "nth":x=p[2];var v=p[3];if(x===1&&v===0)return true;var A=p[0],F=m.parentNode;if(F&&(F.sizcache!==A||!m.nodeIndex)){var G=0;for(z=F.firstChild;z;z=z.nextSibling)if(z.nodeType===1)z.nodeIndex=++G;F.sizcache=A}z=m.nodeIndex-v;return x===0?z===0:z%x===0&&z/x>=0}},ID:function(m,p){return m.nodeType===1&&m.getAttribute("id")===p},TAG:function(m,p){return p==="*"&&m.nodeType===1||m.nodeName.toLowerCase()===
p},CLASS:function(m,p){return(" "+(m.className||m.getAttribute("class"))+" ").indexOf(p)>-1},ATTR:function(m,p){var x=p[1];x=C.attrHandle[x]?C.attrHandle[x](m):m[x]!=null?m[x]:m.getAttribute(x);var z=x+"",v=p[2],A=p[4];return x==null?v==="!=":v==="="?z===A:v==="*="?z.indexOf(A)>=0:v==="~="?(" "+z+" ").indexOf(A)>=0:!A?z&&x!==false:v==="!="?z!==A:v==="^="?z.indexOf(A)===0:v==="$="?z.substr(z.length-A.length)===A:v==="|="?z===A||z.substr(0,A.length+1)===A+"-":false},POS:function(m,p,x,z){var v=C.setFilters[p[2]];
if(v)return v(m,x,p,z)}}},T=C.match.POS,da=function(m,p){return"\\"+(p-0+1)},ba;for(ba in C.match){C.match[ba]=RegExp(C.match[ba].source+/(?![^\[]*\])(?![^\(]*\))/.source);C.leftMatch[ba]=RegExp(/(^(?:.|\r|\n)*?)/.source+C.match[ba].source.replace(/\\(\d+)/g,da))}var ea=function(m,p){m=Array.prototype.slice.call(m,0);if(p){p.push.apply(p,m);return p}return m};try{Array.prototype.slice.call(K.documentElement.childNodes,0)}catch(Na){ea=function(m,p){var x=0,z=p||[];if(j.call(m)==="[object Array]")Array.prototype.push.apply(z,
m);else if(typeof m.length==="number")for(var v=m.length;x<v;x++)z.push(m[x]);else for(;m[x];x++)z.push(m[x]);return z}}var oa,na;if(K.documentElement.compareDocumentPosition)oa=function(m,p){if(m===p){l=true;return 0}if(!m.compareDocumentPosition||!p.compareDocumentPosition)return m.compareDocumentPosition?-1:1;return m.compareDocumentPosition(p)&4?-1:1};else{oa=function(m,p){if(m===p){l=true;return 0}else if(m.sourceIndex&&p.sourceIndex)return m.sourceIndex-p.sourceIndex;var x,z,v=[],A=[];x=m.parentNode;
z=p.parentNode;var F=x;if(x===z)return na(m,p);else if(x){if(!z)return 1}else return-1;for(;F;){v.unshift(F);F=F.parentNode}for(F=z;F;){A.unshift(F);F=F.parentNode}x=v.length;z=A.length;for(F=0;F<x&&F<z;F++)if(v[F]!==A[F])return na(v[F],A[F]);return F===x?na(m,A[F],-1):na(v[F],p,1)};na=function(m,p,x){if(m===p)return x;for(m=m.nextSibling;m;){if(m===p)return-1;m=m.nextSibling}return 1}}w.getText=function(m){for(var p="",x,z=0;m[z];z++){x=m[z];if(x.nodeType===3||x.nodeType===4)p+=x.nodeValue;else if(x.nodeType!==
8)p+=w.getText(x.childNodes)}return p};(function(){var m=K.createElement("div"),p="script"+(new Date).getTime(),x=K.documentElement;m.innerHTML="<a name='"+p+"'/>";x.insertBefore(m,x.firstChild);if(K.getElementById(p)){C.find.ID=function(z,v,A){if(typeof v.getElementById!=="undefined"&&!A)return(v=v.getElementById(z[1]))?v.id===z[1]||typeof v.getAttributeNode!=="undefined"&&v.getAttributeNode("id").nodeValue===z[1]?[v]:g:[]};C.filter.ID=function(z,v){var A=typeof z.getAttributeNode!=="undefined"&&
z.getAttributeNode("id");return z.nodeType===1&&A&&A.nodeValue===v}}x.removeChild(m);x=m=null})();(function(){var m=K.createElement("div");m.appendChild(K.createComment(""));if(m.getElementsByTagName("*").length>0)C.find.TAG=function(p,x){var z=x.getElementsByTagName(p[1]);if(p[1]==="*"){for(var v=[],A=0;z[A];A++)z[A].nodeType===1&&v.push(z[A]);z=v}return z};m.innerHTML="<a href='#'></a>";if(m.firstChild&&typeof m.firstChild.getAttribute!=="undefined"&&m.firstChild.getAttribute("href")!=="#")C.attrHandle.href=
function(p){return p.getAttribute("href",2)};m=null})();K.querySelectorAll&&function(){var m=w,p=K.createElement("div");p.innerHTML="<p class='TEST'></p>";if(!(p.querySelectorAll&&p.querySelectorAll(".TEST").length===0)){w=function(z,v,A,F){v=v||K;if(!F&&!w.isXML(v)){var G=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(z);if(G&&(v.nodeType===1||v.nodeType===9))if(G[1])return ea(v.getElementsByTagName(z),A);else if(G[2]&&C.find.CLASS&&v.getElementsByClassName)return ea(v.getElementsByClassName(G[2]),A);
if(v.nodeType===9){if(z==="body"&&v.body)return ea([v.body],A);else if(G&&G[3]){var X=v.getElementById(G[3]);if(X&&X.parentNode){if(X.id===G[3])return ea([X],A)}else return ea([],A)}try{return ea(v.querySelectorAll(z),A)}catch(pa){}}else if(v.nodeType===1&&v.nodeName.toLowerCase()!=="object"){G=v;var ma=(X=v.getAttribute("id"))||"__sizzle__",la=v.parentNode,Y=/^\s*[+~]/.test(z);if(X)ma=ma.replace(/'/g,"\\$&");else v.setAttribute("id",ma);if(Y&&la)v=v.parentNode;try{if(!Y||la)return ea(v.querySelectorAll("[id='"+
ma+"'] "+z),A)}catch(q){}finally{X||G.removeAttribute("id")}}}return m(z,v,A,F)};for(var x in m)w[x]=m[x];p=null}}();(function(){var m=K.documentElement,p=m.matchesSelector||m.mozMatchesSelector||m.webkitMatchesSelector||m.msMatchesSelector;if(p){var x=!p.call(K.createElement("div"),"div"),z=false;try{p.call(K.documentElement,"[test!='']:sizzle")}catch(v){z=true}w.matchesSelector=function(A,F){F=F.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!w.isXML(A))try{if(z||!C.match.PSEUDO.test(F)&&!/!=/.test(F)){var G=
p.call(A,F);if(G||!x||A.document&&A.document.nodeType!==11)return G}}catch(X){}return w(F,null,null,[A]).length>0}}})();(function(){var m=K.createElement("div");m.innerHTML="<div class='test e'></div><div class='test'></div>";if(!(!m.getElementsByClassName||m.getElementsByClassName("e").length===0)){m.lastChild.className="e";if(m.getElementsByClassName("e").length!==1){C.order.splice(1,0,"CLASS");C.find.CLASS=function(p,x,z){if(typeof x.getElementsByClassName!=="undefined"&&!z)return x.getElementsByClassName(p[1])};
m=null}}})();w.contains=K.documentElement.contains?function(m,p){return m!==p&&(m.contains?m.contains(p):true)}:K.documentElement.compareDocumentPosition?function(m,p){return!!(m.compareDocumentPosition(p)&16)}:function(){return false};w.isXML=function(m){return(m=(m?m.ownerDocument||m:0).documentElement)?m.nodeName!=="HTML":false};var Ba=function(m,p){for(var x,z=[],v="",A=p.nodeType?[p]:p;x=C.match.PSEUDO.exec(m);){v+=x[0];m=m.replace(C.match.PSEUDO,"")}m=C.relative[m]?m+"*":m;x=0;for(var F=A.length;x<
F;x++)w(m,A[x],z);return w.filter(v,z)};d.find=w;d.expr=w.selectors;d.expr[":"]=d.expr.filters;d.unique=w.uniqueSort;d.text=w.getText;d.isXMLDoc=w.isXML;d.contains=w.contains})();var Ob=/Until$/,Pb=/^(?:parents|prevUntil|prevAll)/,Qb=/,/,Jb=/^.[^:#\[\.,]*$/,Rb=Array.prototype.slice,ub=d.expr.match.POS,Sb={children:true,contents:true,next:true,prev:true};d.fn.extend({find:function(a){var b=this,f,h;if(typeof a!=="string")return d(a).filter(function(){f=0;for(h=b.length;f<h;f++)if(d.contains(b[f],this))return true});
var j=this.pushStack("","find",a),l,n,r;f=0;for(h=this.length;f<h;f++){l=j.length;d.find(a,this[f],j);if(f>0)for(n=l;n<j.length;n++)for(r=0;r<l;r++)if(j[r]===j[n]){j.splice(n--,1);break}}return j},has:function(a){var b=d(a);return this.filter(function(){for(var f=0,h=b.length;f<h;f++)if(d.contains(this,b[f]))return true})},not:function(a){return this.pushStack(t(this,a,false),"not",a)},filter:function(a){return this.pushStack(t(this,a,true),"filter",a)},is:function(a){return!!a&&(typeof a==="string"?
d.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var f=[],h,j,l=this[0];if(d.isArray(a)){var n,r={},u=1;if(l&&a.length){h=0;for(j=a.length;h<j;h++){n=a[h];r[n]||(r[n]=ub.test(n)?d(n,b||this.context):n)}for(;l&&l.ownerDocument&&l!==b;){for(n in r){h=r[n];if(h.jquery?h.index(l)>-1:d(l).is(h))f.push({selector:n,elem:l,level:u})}l=l.parentNode;u++}}return f}n=ub.test(a)||typeof a!=="string"?d(a,b||this.context):0;h=0;for(j=this.length;h<j;h++)for(l=this[h];l;)if(n?n.index(l)>
-1:d.find.matchesSelector(l,a)){f.push(l);break}else{l=l.parentNode;if(!l||!l.ownerDocument||l===b||l.nodeType===11)break}f=f.length>1?d.unique(f):f;return this.pushStack(f,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a==="string")return d.inArray(this[0],d(a));return d.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var f=typeof a==="string"?d(a,b):d.makeArray(a&&a.nodeType?[a]:a),h=d.merge(this.get(),f);return this.pushStack(!f[0]||
!f[0].parentNode||f[0].parentNode.nodeType===11||!h[0]||!h[0].parentNode||h[0].parentNode.nodeType===11?h:d.unique(h))},andSelf:function(){return this.add(this.prevObject)}});d.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return d.dir(a,"parentNode")},parentsUntil:function(a,b,f){return d.dir(a,"parentNode",f)},next:function(a){return d.nth(a,2,"nextSibling")},prev:function(a){return d.nth(a,2,"previousSibling")},nextAll:function(a){return d.dir(a,"nextSibling")},
prevAll:function(a){return d.dir(a,"previousSibling")},nextUntil:function(a,b,f){return d.dir(a,"nextSibling",f)},prevUntil:function(a,b,f){return d.dir(a,"previousSibling",f)},siblings:function(a){return d.sibling(a.parentNode.firstChild,a)},children:function(a){return d.sibling(a.firstChild)},contents:function(a){return d.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:d.makeArray(a.childNodes)}},function(a,b){d.fn[a]=function(f,h){var j=d.map(this,b,f),l=Rb.call(arguments);Ob.test(a)||
(h=f);if(h&&typeof h==="string")j=d.filter(h,j);j=this.length>1&&!Sb[a]?d.unique(j):j;if((this.length>1||Qb.test(h))&&Pb.test(a))j=j.reverse();return this.pushStack(j,a,l.join(","))}});d.extend({filter:function(a,b,f){if(f)a=":not("+a+")";return b.length===1?d.find.matchesSelector(b[0],a)?[b[0]]:[]:d.find.matches(a,b)},dir:function(a,b,f){var h=[];for(a=a[b];a&&a.nodeType!==9&&(f===g||a.nodeType!==1||!d(a).is(f));){a.nodeType===1&&h.push(a);a=a[b]}return h},nth:function(a,b,f){b=b||1;for(var h=0;a;a=
a[f])if(a.nodeType===1&&++h===b)break;return a},sibling:function(a,b){for(var f=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&f.push(a);return f}});var Tb=/ jQuery\d+="(?:\d+|null)"/g,ob=/^\s+/,vb=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,wb=/<([\w:]+)/,Ub=/<tbody/i,Vb=/<|&#?\w+;/,xb=/<(?:script|object|embed|option|style)/i,yb=/checked\s*(?:[^=]|=\s*.checked.)/i,Wb=/\/(java|ecma)script/i,Kb=/^\s*<!(?:\[CDATA\[|\-\-)/,ta={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,"",""]};ta.optgroup=ta.option;ta.tbody=ta.tfoot=ta.colgroup=ta.caption=ta.thead;ta.th=ta.td;if(!d.support.htmlSerialize)ta._default=[1,"div<div>","</div>"];d.fn.extend({text:function(a){if(d.isFunction(a))return this.each(function(b){var f=
d(this);f.text(a.call(this,b,f.text()))});if(typeof a!=="object"&&a!==g)return this.empty().append((this[0]&&this[0].ownerDocument||K).createTextNode(a));return d.text(this)},wrapAll:function(a){if(d.isFunction(a))return this.each(function(f){d(this).wrapAll(a.call(this,f))});if(this[0]){var b=d(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var f=this;f.firstChild&&f.firstChild.nodeType===1;)f=f.firstChild;return f}).append(this)}return this},
wrapInner:function(a){if(d.isFunction(a))return this.each(function(b){d(this).wrapInner(a.call(this,b))});return this.each(function(){var b=d(this),f=b.contents();f.length?f.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){d(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){d.nodeName(this,"body")||d(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})},
prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=d(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,
this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,d(arguments[0]).toArray());return a}},remove:function(a,b){for(var f=0,h;(h=this[f])!=null;f++)if(!a||d.filter(a,[h]).length){if(!b&&h.nodeType===1){d.cleanData(h.getElementsByTagName("*"));d.cleanData([h])}h.parentNode&&h.parentNode.removeChild(h)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&d.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild);
return this},clone:function(a,b){a=a==null?false:a;b=b==null?a:b;return this.map(function(){return d.clone(this,a,b)})},html:function(a){if(a===g)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Tb,""):null;else if(typeof a==="string"&&!xb.test(a)&&(d.support.leadingWhitespace||!ob.test(a))&&!ta[(wb.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(vb,"<$1></$2>");try{for(var b=0,f=this.length;b<f;b++)if(this[b].nodeType===1){d.cleanData(this[b].getElementsByTagName("*"));this[b].innerHTML=
a}}catch(h){this.empty().append(a)}}else d.isFunction(a)?this.each(function(j){var l=d(this);l.html(a.call(this,j,l.html()))}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(d.isFunction(a))return this.each(function(b){var f=d(this),h=f.html();f.replaceWith(a.call(this,b,h))});if(typeof a!=="string")a=d(a).detach();return this.each(function(){var b=this.nextSibling,f=this.parentNode;d(this).remove();b?d(b).before(a):d(f).append(a)})}else return this.length?
this.pushStack(d(d.isFunction(a)?a():a),"replaceWith",a):this},detach:function(a){return this.remove(a,true)},domManip:function(a,b,f){var h,j,l,n=a[0],r=[];if(!d.support.checkClone&&arguments.length===3&&typeof n==="string"&&yb.test(n))return this.each(function(){d(this).domManip(a,b,f,true)});if(d.isFunction(n))return this.each(function(C){var T=d(this);a[0]=n.call(this,C,b?T.html():g);T.domManip(a,b,f)});if(this[0]){h=n&&n.parentNode;h=d.support.parentNode&&h&&h.nodeType===11&&h.childNodes.length===
this.length?{fragment:h}:d.buildFragment(a,this,r);l=h.fragment;if(j=l.childNodes.length===1?l=l.firstChild:l.firstChild){b=b&&d.nodeName(j,"tr");j=0;for(var u=this.length,w=u-1;j<u;j++)f.call(b?d.nodeName(this[j],"table")?this[j].getElementsByTagName("tbody")[0]||this[j].appendChild(this[j].ownerDocument.createElement("tbody")):this[j]:this[j],h.cacheable||u>1&&j<w?d.clone(l,true,true):l)}r.length&&d.each(r,Ea)}return this}});d.buildFragment=function(a,b,f){var h,j,l,n;if(b&&b[0])n=b[0].ownerDocument||
b[0];n.createDocumentFragment||(n=K);if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&n===K&&a[0].charAt(0)==="<"&&!xb.test(a[0])&&(d.support.checkClone||!yb.test(a[0]))){j=true;if((l=d.fragments[a[0]])&&l!==1)h=l}if(!h){h=n.createDocumentFragment();d.clean(a,n,h,f)}if(j)d.fragments[a[0]]=l?h:1;return{fragment:h,cacheable:j}};d.fragments={};d.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){d.fn[a]=function(f){var h=
[];f=d(f);var j=this.length===1&&this[0].parentNode;if(j&&j.nodeType===11&&j.childNodes.length===1&&f.length===1){f[b](this[0]);return this}else{j=0;for(var l=f.length;j<l;j++){var n=(j>0?this.clone(true):this).get();d(f[j])[b](n);h=h.concat(n)}return this.pushStack(h,a,f.selector)}}});d.extend({clone:function(a,b,f){var h=a.cloneNode(true),j,l,n;if((!d.support.noCloneEvent||!d.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!d.isXMLDoc(a)){U(a,h);j=fa(a);l=fa(h);for(n=0;j[n];++n)l[n]&&
U(j[n],l[n])}if(b){N(a,h);if(f){j=fa(a);l=fa(h);for(n=0;j[n];++n)N(j[n],l[n])}}return h},clean:function(a,b,f,h){b=b||K;if(typeof b.createElement==="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||K;for(var j=[],l,n=0,r;(r=a[n])!=null;n++){if(typeof r==="number")r+="";if(r){if(typeof r==="string")if(Vb.test(r)){r=r.replace(vb,"<$1></$2>");l=(wb.exec(r)||["",""])[1].toLowerCase();var u=ta[l]||ta._default,w=u[0],C=b.createElement("div");for(C.innerHTML=u[1]+r+u[2];w--;)C=C.lastChild;if(!d.support.tbody){w=
Ub.test(r);u=l==="table"&&!w?C.firstChild&&C.firstChild.childNodes:u[1]==="<table>"&&!w?C.childNodes:[];for(l=u.length-1;l>=0;--l)d.nodeName(u[l],"tbody")&&!u[l].childNodes.length&&u[l].parentNode.removeChild(u[l])}!d.support.leadingWhitespace&&ob.test(r)&&C.insertBefore(b.createTextNode(ob.exec(r)[0]),C.firstChild);r=C.childNodes}else r=b.createTextNode(r);var T;if(!d.support.appendChecked)if(r[0]&&typeof(T=r.length)==="number")for(l=0;l<T;l++)qa(r[l]);else qa(r);if(r.nodeType)j.push(r);else j=d.merge(j,
r)}}if(f){a=function(da){return!da.type||Wb.test(da.type)};for(n=0;j[n];n++)if(h&&d.nodeName(j[n],"script")&&(!j[n].type||j[n].type.toLowerCase()==="text/javascript"))h.push(j[n].parentNode?j[n].parentNode.removeChild(j[n]):j[n]);else{if(j[n].nodeType===1){b=d.grep(j[n].getElementsByTagName("script"),a);j.splice.apply(j,[n+1,0].concat(b))}f.appendChild(j[n])}}return j},cleanData:function(a){for(var b,f,h=d.cache,j=d.expando,l=d.event.special,n=d.support.deleteExpando,r=0,u;(u=a[r])!=null;r++)if(!(u.nodeName&&
d.noData[u.nodeName.toLowerCase()]))if(f=u[d.expando]){if((b=h[f]&&h[f][j])&&b.events){for(var w in b.events)l[w]?d.event.remove(u,w):d.removeEvent(u,w,b.handle);if(b.handle)b.handle.elem=null}if(n)delete u[d.expando];else u.removeAttribute&&u.removeAttribute(d.expando);delete h[f]}}});var pb=/alpha\([^)]*\)/i,Xb=/opacity=([^)]*)/,Yb=/([A-Z]|^ms)/g,zb=/^-?\d+(?:px)?$/i,Zb=/^-?\d/,$b=/^([\-+])=([\-+.\de]+)/,ac={position:"absolute",visibility:"hidden",display:"block"},Lb=["Left","Right"],Mb=["Top",
"Bottom"],Wa,Ab,Bb;d.fn.css=function(a,b){if(arguments.length===2&&b===g)return this;return d.access(this,a,b,true,function(f,h,j){return j!==g?d.style(f,h,j):d.css(f,h)})};d.extend({cssHooks:{opacity:{get:function(a,b){if(b){var f=Wa(a,"opacity","opacity");return f===""?"1":f}else return a.style.opacity}}},cssNumber:{fillOpacity:true,fontWeight:true,lineHeight:true,opacity:true,orphans:true,widows:true,zIndex:true,zoom:true},cssProps:{"float":d.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,
b,f,h){if(!(!a||a.nodeType===3||a.nodeType===8||!a.style)){var j,l=d.camelCase(b),n=a.style,r=d.cssHooks[l];b=d.cssProps[l]||l;if(f!==g){h=typeof f;if(h==="string"&&(j=$b.exec(f))){f=+(j[1]+1)*+j[2]+parseFloat(d.css(a,b));h="number"}if(!(f==null||h==="number"&&isNaN(f))){if(h==="number"&&!d.cssNumber[l])f+="px";if(!r||!("set"in r)||(f=r.set(a,f))!==g)try{n[b]=f}catch(u){}}}else{if(r&&"get"in r&&(j=r.get(a,false,h))!==g)return j;return n[b]}}},css:function(a,b,f){var h,j;b=d.camelCase(b);j=d.cssHooks[b];
b=d.cssProps[b]||b;if(b==="cssFloat")b="float";if(j&&"get"in j&&(h=j.get(a,true,f))!==g)return h;else if(Wa)return Wa(a,b)},swap:function(a,b,f){var h={},j;for(j in b){h[j]=a.style[j];a.style[j]=b[j]}f.call(a);for(j in b)a.style[j]=h[j]}});d.curCSS=d.css;d.each(["height","width"],function(a,b){d.cssHooks[b]={get:function(f,h,j){var l;if(h){if(f.offsetWidth!==0)return cb(f,b,j);else d.swap(f,ac,function(){l=cb(f,b,j)});return l}},set:function(f,h){if(zb.test(h)){h=parseFloat(h);if(h>=0)return h+"px"}else return h}}});
if(!d.support.opacity)d.cssHooks.opacity={get:function(a,b){return Xb.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var f=a.style,h=a.currentStyle,j=d.isNaN(b)?"":"alpha(opacity="+b*100+")",l=h&&h.filter||f.filter||"";f.zoom=1;if(b>=1&&d.trim(l.replace(pb,""))===""){f.removeAttribute("filter");if(h&&!h.filter)return}f.filter=pb.test(l)?l.replace(pb,j):l+" "+j}};d(function(){if(!d.support.reliableMarginRight)d.cssHooks.marginRight=
{get:function(a,b){var f;d.swap(a,{display:"inline-block"},function(){f=b?Wa(a,"margin-right","marginRight"):a.style.marginRight});return f}}});if(K.defaultView&&K.defaultView.getComputedStyle)Ab=function(a,b){var f,h;b=b.replace(Yb,"-$1").toLowerCase();if(!(h=a.ownerDocument.defaultView))return g;if(h=h.getComputedStyle(a,null)){f=h.getPropertyValue(b);if(f===""&&!d.contains(a.ownerDocument.documentElement,a))f=d.style(a,b)}return f};if(K.documentElement.currentStyle)Bb=function(a,b){var f,h=a.currentStyle&&
a.currentStyle[b],j=a.runtimeStyle&&a.runtimeStyle[b],l=a.style;if(!zb.test(h)&&Zb.test(h)){f=l.left;if(j)a.runtimeStyle.left=a.currentStyle.left;l.left=b==="fontSize"?"1em":h||0;h=l.pixelLeft+"px";l.left=f;if(j)a.runtimeStyle.left=j}return h===""?"auto":h};Wa=Ab||Bb;if(d.expr&&d.expr.filters){d.expr.filters.hidden=function(a){var b=a.offsetHeight;return a.offsetWidth===0&&b===0||!d.support.reliableHiddenOffsets&&(a.style.display||d.css(a,"display"))==="none"};d.expr.filters.visible=function(a){return!d.expr.filters.hidden(a)}}var bc=
/%20/g,Nb=/\[\]$/,Cb=/\r?\n/g,cc=/#.*$/,dc=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,ec=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,fc=/^(?:GET|HEAD)$/,gc=/^\/\//,Db=/\?/,hc=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,ic=/^(?:select|textarea)/i,sb=/\s+/,jc=/([?&])_=[^&]*/,Eb=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,Fb=d.fn.load,lb={},Gb={},Sa,Ta,Hb=["*/"]+["*"];try{Sa=Ma.href}catch(rc){Sa=K.createElement("a");Sa.href="";
Sa=Sa.href}Ta=Eb.exec(Sa.toLowerCase())||[];d.fn.extend({load:function(a,b,f){if(typeof a!=="string"&&Fb)return Fb.apply(this,arguments);else if(!this.length)return this;var h=a.indexOf(" ");if(h>=0){var j=a.slice(h,a.length);a=a.slice(0,h)}h="GET";if(b)if(d.isFunction(b)){f=b;b=g}else if(typeof b==="object"){b=d.param(b,d.ajaxSettings.traditional);h="POST"}var l=this;d.ajax({url:a,type:h,dataType:"html",data:b,complete:function(n,r,u){u=n.responseText;if(n.isResolved()){n.done(function(w){u=w});
l.html(j?d("<div>").append(u.replace(hc,"")).find(j):u)}f&&l.each(f,[u,r,n])}});return this},serialize:function(){return d.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?d.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||ic.test(this.nodeName)||ec.test(this.type))}).map(function(a,b){var f=d(this).val();return f==null?null:d.isArray(f)?d.map(f,function(h){return{name:b.name,value:h.replace(Cb,
"\r\n")}}):{name:b.name,value:f.replace(Cb,"\r\n")}}).get()}});d.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){d.fn[b]=function(f){return this.bind(b,f)}});d.each(["get","post"],function(a,b){d[b]=function(f,h,j,l){if(d.isFunction(h)){l=l||j;j=h;h=g}return d.ajax({type:b,url:f,data:h,success:j,dataType:l})}});d.extend({getScript:function(a,b){return d.get(a,g,b,"script")},getJSON:function(a,b,f){return d.get(a,b,f,"json")},ajaxSetup:function(a,b){if(b)Ka(a,
d.ajaxSettings);else{b=a;a=d.ajaxSettings}Ka(a,b);return a},ajaxSettings:{url:Sa,isLocal:/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/.test(Ta[1]),global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":Hb},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":c.String,
"text html":true,"text json":d.parseJSON,"text xml":d.parseXML},flatOptions:{context:true,url:true}},ajaxPrefilter:ga(lb),ajaxTransport:ga(Gb),ajax:function(a,b){function f(v,A,F,G){if(na!==2){na=2;Na&&clearTimeout(Na);ea=g;da=G||"";p.readyState=v>0?4:0;var X,pa,ma;G=A;if(F){var la=h,Y=p,q=la.contents,E=la.dataTypes,M=la.responseFields,J,V,aa,ja;for(V in M)if(V in F)Y[M[V]]=F[V];for(;E[0]==="*";){E.shift();if(J===g)J=la.mimeType||Y.getResponseHeader("content-type")}if(J)for(V in q)if(q[V]&&q[V].test(J)){E.unshift(V);
break}if(E[0]in F)aa=E[0];else{for(V in F){if(!E[0]||la.converters[V+" "+E[0]]){aa=V;break}ja||(ja=V)}aa=aa||ja}if(aa){aa!==E[0]&&E.unshift(aa);F=F[aa]}else F=void 0}else F=g;F=F;if(v>=200&&v<300||v===304){if(h.ifModified){if(J=p.getResponseHeader("Last-Modified"))d.lastModified[w]=J;if(J=p.getResponseHeader("Etag"))d.etag[w]=J}if(v===304){G="notmodified";X=true}else try{J=h;F=F;if(J.dataFilter)F=J.dataFilter(F,J.dataType);var ka=J.dataTypes;V={};var Ga,hb,kc=ka.length,ib,Ia=ka[0],$a,qb,Ja,Ua,ab;
for(Ga=1;Ga<kc;Ga++){if(Ga===1)for(hb in J.converters)if(typeof hb==="string")V[hb.toLowerCase()]=J.converters[hb];$a=Ia;Ia=ka[Ga];if(Ia==="*")Ia=$a;else if($a!=="*"&&$a!==Ia){qb=$a+" "+Ia;Ja=V[qb]||V["* "+Ia];if(!Ja){ab=g;for(Ua in V){ib=Ua.split(" ");if(ib[0]===$a||ib[0]==="*")if(ab=V[ib[1]+" "+Ia]){Ua=V[Ua];if(Ua===true)Ja=ab;else if(ab===true)Ja=Ua;break}}}Ja||ab||d.error("No conversion from "+qb.replace(" "," to "));if(Ja!==true)F=Ja?Ja(F):ab(Ua(F))}}pa=F;G="success";X=true}catch(lc){G="parsererror";
ma=lc}}else{ma=G;if(!G||v){G="error";if(v<0)v=0}}p.status=v;p.statusText=""+(A||G);X?n.resolveWith(j,[pa,G,p]):n.rejectWith(j,[p,G,ma]);p.statusCode(u);u=g;if(Ba)l.trigger("ajax"+(X?"Success":"Error"),[p,h,X?pa:ma]);r.resolveWith(j,[p,G]);if(Ba){l.trigger("ajaxComplete",[p,h]);--d.active||d.event.trigger("ajaxStop")}}}if(typeof a==="object"){b=a;a=g}b=b||{};var h=d.ajaxSetup({},b),j=h.context||h,l=j!==h&&(j.nodeType||j instanceof d)?d(j):d.event,n=d.Deferred(),r=d._Deferred(),u=h.statusCode||{},w,
C={},T={},da,ba,ea,Na,oa,na=0,Ba,m,p={readyState:0,setRequestHeader:function(v,A){if(!na){var F=v.toLowerCase();v=T[F]=T[F]||v;C[v]=A}return this},getAllResponseHeaders:function(){return na===2?da:null},getResponseHeader:function(v){var A;if(na===2){if(!ba)for(ba={};A=dc.exec(da);)ba[A[1].toLowerCase()]=A[2];A=ba[v.toLowerCase()]}return A===g?null:A},overrideMimeType:function(v){if(!na)h.mimeType=v;return this},abort:function(v){v=v||"abort";ea&&ea.abort(v);f(0,v);return this}};n.promise(p);p.success=
p.done;p.error=p.fail;p.complete=r.done;p.statusCode=function(v){if(v){var A;if(na<2)for(A in v)u[A]=[u[A],v[A]];else{A=v[p.status];p.then(A,A)}}return this};h.url=((a||h.url)+"").replace(cc,"").replace(gc,Ta[1]+"//");h.dataTypes=d.trim(h.dataType||"*").toLowerCase().split(sb);if(h.crossDomain==null){oa=Eb.exec(h.url.toLowerCase());h.crossDomain=!!(oa&&(oa[1]!=Ta[1]||oa[2]!=Ta[2]||(oa[3]||(oa[1]==="http:"?80:443))!=(Ta[3]||(Ta[1]==="http:"?80:443))))}if(h.data&&h.processData&&typeof h.data!=="string")h.data=
d.param(h.data,h.traditional);ra(lb,h,b,p);if(na===2)return false;Ba=h.global;h.type=h.type.toUpperCase();h.hasContent=!fc.test(h.type);Ba&&d.active++===0&&d.event.trigger("ajaxStart");if(!h.hasContent){if(h.data){h.url+=(Db.test(h.url)?"&":"?")+h.data;delete h.data}w=h.url;if(h.cache===false){oa=d.now();var x=h.url.replace(jc,"$1_="+oa);h.url=x+(x===h.url?(Db.test(h.url)?"&":"?")+"_="+oa:"")}}if(h.data&&h.hasContent&&h.contentType!==false||b.contentType)p.setRequestHeader("Content-Type",h.contentType);
if(h.ifModified){w=w||h.url;d.lastModified[w]&&p.setRequestHeader("If-Modified-Since",d.lastModified[w]);d.etag[w]&&p.setRequestHeader("If-None-Match",d.etag[w])}p.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+(h.dataTypes[0]!=="*"?", "+Hb+"; q=0.01":""):h.accepts["*"]);for(m in h.headers)p.setRequestHeader(m,h.headers[m]);if(h.beforeSend&&(h.beforeSend.call(j,p,h)===false||na===2)){p.abort();return false}for(m in{success:1,error:1,complete:1})p[m](h[m]);
if(ea=ra(Gb,h,b,p)){p.readyState=1;Ba&&l.trigger("ajaxSend",[p,h]);if(h.async&&h.timeout>0)Na=setTimeout(function(){p.abort("timeout")},h.timeout);try{na=1;ea.send(C,f)}catch(z){na<2?f(-1,z):d.error(z)}}else f(-1,"No Transport");return p},param:function(a,b){var f=[],h=function(l,n){n=d.isFunction(n)?n():n;f[f.length]=encodeURIComponent(l)+"="+encodeURIComponent(n)};if(b===g)b=d.ajaxSettings.traditional;if(d.isArray(a)||a.jquery&&!d.isPlainObject(a))d.each(a,function(){h(this.name,this.value)});else for(var j in a)Xa(j,
a[j],b,h);return f.join("&").replace(bc,"+")}});d.extend({active:0,lastModified:{},etag:{}});var mc=d.now(),jb=/(\=)\?(&|$)|\?\?/i;d.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return d.expando+"_"+mc++}});d.ajaxPrefilter("json jsonp",function(a,b,f){b=a.contentType==="application/x-www-form-urlencoded"&&typeof a.data==="string";if(a.dataTypes[0]==="jsonp"||a.jsonp!==false&&(jb.test(a.url)||b&&jb.test(a.data))){var h,j=a.jsonpCallback=d.isFunction(a.jsonpCallback)?a.jsonpCallback():a.jsonpCallback,
l=c[j],n=a.url,r=a.data,u="$1"+j+"$2";if(a.jsonp!==false){n=n.replace(jb,u);if(a.url===n){if(b)r=r.replace(jb,u);if(a.data===r)n+=(/\?/.test(n)?"&":"?")+a.jsonp+"="+j}}a.url=n;a.data=r;c[j]=function(w){h=[w]};f.always(function(){c[j]=l;h&&d.isFunction(l)&&c[j](h[0])});a.converters["script json"]=function(){h||d.error(j+" was not called");return h[0]};a.dataTypes[0]="json";return"script"}});d.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},
contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){d.globalEval(a);return a}}});d.ajaxPrefilter("script",function(a){if(a.cache===g)a.cache=false;if(a.crossDomain){a.type="GET";a.global=false}});d.ajaxTransport("script",function(a){if(a.crossDomain){var b,f=K.head||K.getElementsByTagName("head")[0]||K.documentElement;return{send:function(h,j){b=K.createElement("script");b.async="async";if(a.scriptCharset)b.charset=a.scriptCharset;b.src=a.url;b.onload=b.onreadystatechange=
function(l,n){if(n||!b.readyState||/loaded|complete/.test(b.readyState)){b.onload=b.onreadystatechange=null;f&&b.parentNode&&f.removeChild(b);b=g;n||j(200,"success")}};f.insertBefore(b,f.firstChild)},abort:function(){b&&b.onload(0,1)}}}});var rb=c.ActiveXObject?function(){for(var a in bb)bb[a](0,1)}:false,nc=0,bb;d.ajaxSettings.xhr=c.ActiveXObject?function(){var a;if(!(a=!this.isLocal&&sa()))a:{try{a=new c.ActiveXObject("Microsoft.XMLHTTP");break a}catch(b){}a=void 0}return a}:sa;(function(a){d.extend(d.support,
{ajax:!!a,cors:!!a&&"withCredentials"in a})})(d.ajaxSettings.xhr());d.support.ajax&&d.ajaxTransport(function(a){if(!a.crossDomain||d.support.cors){var b;return{send:function(f,h){var j=a.xhr(),l,n;a.username?j.open(a.type,a.url,a.async,a.username,a.password):j.open(a.type,a.url,a.async);if(a.xhrFields)for(n in a.xhrFields)j[n]=a.xhrFields[n];a.mimeType&&j.overrideMimeType&&j.overrideMimeType(a.mimeType);if(!a.crossDomain&&!f["X-Requested-With"])f["X-Requested-With"]="XMLHttpRequest";try{for(n in f)j.setRequestHeader(n,
f[n])}catch(r){}j.send(a.hasContent&&a.data||null);b=function(u,w){var C,T,da,ba,ea;try{if(b&&(w||j.readyState===4)){b=g;if(l){j.onreadystatechange=d.noop;rb&&delete bb[l]}if(w)j.readyState!==4&&j.abort();else{C=j.status;da=j.getAllResponseHeaders();ba={};if((ea=j.responseXML)&&ea.documentElement)ba.xml=ea;ba.text=j.responseText;try{T=j.statusText}catch(Na){T=""}if(!C&&a.isLocal&&!a.crossDomain)C=ba.text?200:404;else if(C===1223)C=204}}}catch(oa){w||h(-1,oa)}ba&&h(C,T,ba,da)};if(!a.async||j.readyState===
4)b();else{l=++nc;if(rb){if(!bb){bb={};d(c).unload(rb)}bb[l]=b}j.onreadystatechange=b}},abort:function(){b&&b(0,1)}}}});var mb={},Aa,Ya,oc=/^(?:toggle|show|hide)$/,pc=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,kb,tb=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],eb;d.fn.extend({show:function(a,b,f){if(a||a===0)return this.animate(Fa("show",3),a,b,f);else{f=0;for(var h=this.length;f<h;f++){a=this[f];if(a.style){b=
a.style.display;if(!d._data(a,"olddisplay")&&b==="none")b=a.style.display="";b===""&&d.css(a,"display")==="none"&&d._data(a,"olddisplay",La(a.nodeName))}}for(f=0;f<h;f++){a=this[f];if(a.style){b=a.style.display;if(b===""||b==="none")a.style.display=d._data(a,"olddisplay")||""}}return this}},hide:function(a,b,f){if(a||a===0)return this.animate(Fa("hide",3),a,b,f);else{a=0;for(b=this.length;a<b;a++)if(this[a].style){f=d.css(this[a],"display");f!=="none"&&!d._data(this[a],"olddisplay")&&d._data(this[a],
"olddisplay",f)}for(a=0;a<b;a++)if(this[a].style)this[a].style.display="none";return this}},_toggle:d.fn.toggle,toggle:function(a,b,f){var h=typeof a==="boolean";if(d.isFunction(a)&&d.isFunction(b))this._toggle.apply(this,arguments);else a==null||h?this.each(function(){var j=h?a:d(this).is(":hidden");d(this)[j?"show":"hide"]()}):this.animate(Fa("toggle",3),a,b,f);return this},fadeTo:function(a,b,f,h){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,f,h)},animate:function(a,
b,f,h){var j=d.speed(b,f,h);if(d.isEmptyObject(a))return this.each(j.complete,[false]);a=d.extend({},a);return this[j.queue===false?"each":"queue"](function(){j.queue===false&&d._mark(this);var l=d.extend({},j),n=this.nodeType===1,r=n&&d(this).is(":hidden"),u,w,C,T,da;l.animatedProperties={};for(C in a){u=d.camelCase(C);if(C!==u){a[u]=a[C];delete a[C]}w=a[u];if(d.isArray(w)){l.animatedProperties[u]=w[1];w=a[u]=w[0]}else l.animatedProperties[u]=l.specialEasing&&l.specialEasing[u]||l.easing||"swing";
if(w==="hide"&&r||w==="show"&&!r)return l.complete.call(this);if(n&&(u==="height"||u==="width")){l.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY];if(d.css(this,"display")==="inline"&&d.css(this,"float")==="none")if(d.support.inlineBlockNeedsLayout){w=La(this.nodeName);if(w==="inline")this.style.display="inline-block";else{this.style.display="inline";this.style.zoom=1}}else this.style.display="inline-block"}}if(l.overflow!=null)this.style.overflow="hidden";for(C in a){n=new d.fx(this,
l,C);w=a[C];if(oc.test(w))n[w==="toggle"?r?"show":"hide":w]();else{u=pc.exec(w);T=n.cur();if(u){w=parseFloat(u[2]);da=u[3]||(d.cssNumber[C]?"":"px");if(da!=="px"){d.style(this,C,(w||1)+da);T=(w||1)/n.cur()*T;d.style(this,C,T+da)}if(u[1])w=(u[1]==="-="?-1:1)*w+T;n.custom(T,w,da)}else n.custom(T,w,"")}}return true})},stop:function(a,b){a&&this.queue([]);this.each(function(){var f=d.timers,h=f.length;for(b||d._unmark(true,this);h--;)if(f[h].elem===this){b&&f[h](true);f.splice(h,1)}});b||this.dequeue();
return this}});d.each({slideDown:Fa("show",1),slideUp:Fa("hide",1),slideToggle:Fa("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){d.fn[a]=function(f,h,j){return this.animate(b,f,h,j)}});d.extend({speed:function(a,b,f){var h=a&&typeof a==="object"?d.extend({},a):{complete:f||!f&&b||d.isFunction(a)&&a,duration:a,easing:f&&b||b&&!d.isFunction(b)&&b};h.duration=d.fx.off?0:typeof h.duration==="number"?h.duration:h.duration in d.fx.speeds?d.fx.speeds[h.duration]:
d.fx.speeds._default;h.old=h.complete;h.complete=function(j){d.isFunction(h.old)&&h.old.call(this);if(h.queue!==false)d.dequeue(this);else j!==false&&d._unmark(this)};return h},easing:{linear:function(a,b,f,h){return f+h*a},swing:function(a,b,f,h){return(-Math.cos(a*Math.PI)/2+0.5)*h+f}},timers:[],fx:function(a,b,f){this.options=b;this.elem=a;this.prop=f;b.orig=b.orig||{}}});d.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(d.fx.step[this.prop]||
d.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=d.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a},custom:function(a,b,f){function h(n){return j.step(n)}var j=this,l=d.fx;this.startTime=eb||W();this.start=a;this.end=b;this.unit=f||this.unit||(d.cssNumber[this.prop]?"":"px");this.now=this.start;this.pos=this.state=0;h.elem=this.elem;if(h()&&d.timers.push(h)&&
!kb)kb=setInterval(l.tick,l.interval)},show:function(){this.options.orig[this.prop]=d.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());d(this.elem).show()},hide:function(){this.options.orig[this.prop]=d.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(a){var b=eb||W(),f=true,h=this.elem,j=this.options,l;if(a||b>=j.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();
j.animatedProperties[this.prop]=true;for(l in j.animatedProperties)if(j.animatedProperties[l]!==true)f=false;if(f){j.overflow!=null&&!d.support.shrinkWrapBlocks&&d.each(["","X","Y"],function(r,u){h.style["overflow"+u]=j.overflow[r]});j.hide&&d(h).hide();if(j.hide||j.show)for(var n in j.animatedProperties)d.style(h,n,j.orig[n]);j.complete.call(h)}return false}else{if(j.duration==Infinity)this.now=b;else{a=b-this.startTime;this.state=a/j.duration;this.pos=d.easing[j.animatedProperties[this.prop]](this.state,
a,0,1,j.duration);this.now=this.start+(this.end-this.start)*this.pos}this.update()}return true}};d.extend(d.fx,{tick:function(){for(var a=d.timers,b=0;b<a.length;++b)a[b]()||a.splice(b--,1);a.length||d.fx.stop()},interval:13,stop:function(){clearInterval(kb);kb=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){d.style(a.elem,"opacity",a.now)},_default:function(a){if(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;else a.elem[a.prop]=a.now}}});if(d.expr&&d.expr.filters)d.expr.filters.animated=function(a){return d.grep(d.timers,function(b){return a===b.elem}).length};var qc=/^t(?:able|d|h)$/i,Ib=/^(?:body|html)$/i;d.fn.offset="getBoundingClientRect"in K.documentElement?function(a){var b=this[0],f;if(a)return this.each(function(n){d.offset.setOffset(this,a,n)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return d.offset.bodyOffset(b);try{f=b.getBoundingClientRect()}catch(h){}var j=
b.ownerDocument,l=j.documentElement;if(!f||!d.contains(l,b))return f?{top:f.top,left:f.left}:{top:0,left:0};b=j.body;j=va(j);return{top:f.top+(j.pageYOffset||d.support.boxModel&&l.scrollTop||b.scrollTop)-(l.clientTop||b.clientTop||0),left:f.left+(j.pageXOffset||d.support.boxModel&&l.scrollLeft||b.scrollLeft)-(l.clientLeft||b.clientLeft||0)}}:function(a){var b=this[0];if(a)return this.each(function(w){d.offset.setOffset(this,a,w)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return d.offset.bodyOffset(b);
d.offset.initialize();var f,h=b.offsetParent,j=b.ownerDocument,l=j.documentElement,n=j.body;f=(j=j.defaultView)?j.getComputedStyle(b,null):b.currentStyle;for(var r=b.offsetTop,u=b.offsetLeft;(b=b.parentNode)&&b!==n&&b!==l;){if(d.offset.supportsFixedPosition&&f.position==="fixed")break;f=j?j.getComputedStyle(b,null):b.currentStyle;r-=b.scrollTop;u-=b.scrollLeft;if(b===h){r+=b.offsetTop;u+=b.offsetLeft;if(d.offset.doesNotAddBorder&&!(d.offset.doesAddBorderForTableAndCells&&qc.test(b.nodeName))){r+=
parseFloat(f.borderTopWidth)||0;u+=parseFloat(f.borderLeftWidth)||0}h=b.offsetParent}if(d.offset.subtractsBorderForOverflowNotVisible&&f.overflow!=="visible"){r+=parseFloat(f.borderTopWidth)||0;u+=parseFloat(f.borderLeftWidth)||0}f=f}if(f.position==="relative"||f.position==="static"){r+=n.offsetTop;u+=n.offsetLeft}if(d.offset.supportsFixedPosition&&f.position==="fixed"){r+=Math.max(l.scrollTop,n.scrollTop);u+=Math.max(l.scrollLeft,n.scrollLeft)}return{top:r,left:u}};d.offset={initialize:function(){var a=
K.body,b=K.createElement("div"),f,h,j,l=parseFloat(d.css(a,"marginTop"))||0;d.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);f=b.firstChild;h=f.firstChild;j=f.nextSibling.firstChild.firstChild;this.doesNotAddBorder=h.offsetTop!==5;this.doesAddBorderForTableAndCells=j.offsetTop===5;h.style.position="fixed";h.style.top="20px";this.supportsFixedPosition=h.offsetTop===20||h.offsetTop===15;h.style.position=h.style.top="";f.style.overflow="hidden";f.style.position="relative";this.subtractsBorderForOverflowNotVisible=h.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==l;a.removeChild(b);d.offset.initialize=
d.noop},bodyOffset:function(a){var b=a.offsetTop,f=a.offsetLeft;d.offset.initialize();if(d.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(d.css(a,"marginTop"))||0;f+=parseFloat(d.css(a,"marginLeft"))||0}return{top:b,left:f}},setOffset:function(a,b,f){var h=d.css(a,"position");if(h==="static")a.style.position="relative";var j=d(a),l=j.offset(),n=d.css(a,"top"),r=d.css(a,"left"),u={},w={};if((h==="absolute"||h==="fixed")&&d.inArray("auto",[n,r])>-1){w=j.position();h=w.top;r=w.left}else{h=parseFloat(n)||
0;r=parseFloat(r)||0}if(d.isFunction(b))b=b.call(a,f,l);if(b.top!=null)u.top=b.top-l.top+h;if(b.left!=null)u.left=b.left-l.left+r;"using"in b?b.using.call(a,u):j.css(u)}};d.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),f=this.offset(),h=Ib.test(b[0].nodeName)?{top:0,left:0}:b.offset();f.top-=parseFloat(d.css(a,"marginTop"))||0;f.left-=parseFloat(d.css(a,"marginLeft"))||0;h.top+=parseFloat(d.css(b[0],"borderTopWidth"))||0;h.left+=parseFloat(d.css(b[0],"borderLeftWidth"))||
0;return{top:f.top-h.top,left:f.left-h.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||K.body;a&&!Ib.test(a.nodeName)&&d.css(a,"position")==="static";)a=a.offsetParent;return a})}});d.each(["Left","Top"],function(a,b){var f="scroll"+b;d.fn[f]=function(h){var j,l;if(h===g){j=this[0];if(!j)return null;return(l=va(j))?"pageXOffset"in l?l[a?"pageYOffset":"pageXOffset"]:d.support.boxModel&&l.document.documentElement[f]||l.document.body[f]:j[f]}return this.each(function(){if(l=
va(this))l.scrollTo(!a?h:d(l).scrollLeft(),a?h:d(l).scrollTop());else this[f]=h})}});d.each(["Height","Width"],function(a,b){var f=b.toLowerCase();d.fn["inner"+b]=function(){var h=this[0];return h&&h.style?parseFloat(d.css(h,f,"padding")):null};d.fn["outer"+b]=function(h){var j=this[0];return j&&j.style?parseFloat(d.css(j,f,h?"margin":"border")):null};d.fn[f]=function(h){var j=this[0];if(!j)return h==null?null:this;if(d.isFunction(h))return this.each(function(r){var u=d(this);u[f](h.call(this,r,u[f]()))});
if(d.isWindow(j)){var l=j.document.documentElement["client"+b],n=j.document.body;return j.document.compatMode==="CSS1Compat"&&l||n&&n["client"+b]||l}else if(j.nodeType===9)return Math.max(j.documentElement["client"+b],j.body["scroll"+b],j.documentElement["scroll"+b],j.body["offset"+b],j.documentElement["offset"+b]);else if(h===g){j=d.css(j,f);l=parseFloat(j);return d.isNaN(l)?j:l}else return this.css(f,typeof h==="string"?h:h+"px")}});c.jQuery=c.$=d})(window);(function(c){function g(I){var L=this,t,N=I.data||{};if(N.elem){L=I.dragTarget=N.elem;I.dragProxy=Q.proxy||L;I.cursorOffsetX=N.pageX-N.left;I.cursorOffsetY=N.pageY-N.top;I.offsetX=I.pageX-I.cursorOffsetX;I.offsetY=I.pageY-I.cursorOffsetY}else if(Q.dragging||N.which>0&&I.which!=N.which||c(I.target).is(N.not))return;switch(I.type){case "mousedown":c.extend(N,c(L).offset(),{elem:L,target:I.target,pageX:I.pageX,pageY:I.pageY});D.add(document,"mousemove mouseup",g,N);s(L,false);Q.dragging=null;return false;
case !Q.dragging&&"mousemove":if(Math.pow(I.pageX-N.pageX,2)+Math.pow(I.pageY-N.pageY,2)<N.distance)break;I.target=N.target;t=k(I,"dragstart",L);if(t!==false){Q.dragging=L;Q.proxy=I.dragProxy=c(t||L)[0]}case "mousemove":if(Q.dragging){t=k(I,"drag",L);if(P.drop){P.drop.allowed=t!==false;P.drop.handler(I)}if(t!==false)break;I.type="mouseup"}case "mouseup":D.remove(document,"mousemove mouseup",g);if(Q.dragging){P.drop&&P.drop.handler(I);k(I,"dragend",L)}s(L,true);Q.dragging=Q.proxy=N.elem=false}return true}
function k(I,L,t){I.type=L;L=c.event.handle.call(t,I);return L===false?false:L||I.result}function o(){return Q.dragging===false}function s(I,L){if(I){I.unselectable=L?"off":"on";I.onselectstart=function(){return L};if(I.style)I.style.MozUserSelect=L?"":"none"}}c.fn.drag=function(I,L,t){L&&this.bind("dragstart",I);t&&this.bind("dragend",t);return!I?this.trigger("drag"):this.bind("drag",L?L:I)};var D=c.event,P=D.special,Q=P.drag={not:":input",distance:0,which:1,dragging:false,setup:function(I){I=c.extend({distance:Q.distance,
which:Q.which,not:Q.not},I||{});I.distance=Math.pow(I.distance,2);D.add(this,"mousedown",g,I);this.attachEvent&&this.attachEvent("ondragstart",o)},teardown:function(){D.remove(this,"mousedown",g);if(this===Q.dragging)Q.dragging=Q.proxy=false;s(this,true);this.detachEvent&&this.detachEvent("ondragstart",o)}};P.dragstart=P.dragend={setup:function(){},teardown:function(){}}})(jQuery);function make_url_safe(c){if(!arguments.callee.c_search){arguments.callee.c_search=[/\u2122/g,/\u00a9/g,/\u00ae/g,/\u00e4/g,/\u00c4/g,/\u00e6/g,/\u00c6/g,/\u00f6/g,/\u00d6/g,/\u00fc/g,/\u00dc/g,/\u00df/g].concat([/\u00aa\u00e0\u00e1\u00e2\u00e3\u00e5/g,/\u00e7/g,/\u00e8\u00e9\u00ea\u00eb/g,/\u00ec\u00ed\u00ee\u00ef/g,/\u00f1/g,/\u00ba\u00f2\u00f3\u00f4\u00f5\u00f8/g,/\u00b5\u00f9\u00fa\u00fb/g,/\u00d7/g,/\u00fd\u00ff/g],[/\u00c0\u00c1\u00c2\u00c3\u00c5/g,/\u00c7/g,/\u00d0/g,/\u00c8\u00c9\u00ca\u00cb/g,
/\u00cc\u00cd\u00ce\u00cf/g,/\u00d1/g,/\u00d2\u00d3\u00d4\u00d5\u00d8/g,/\u00d9\u00da\u00db/g,/\u00dd/g],[/<\u2039\u00ab\{\[/g,/>\u203a\u00bb\}\]/g,/\u00b9/g,/\u00b2/g,/\u00b3/g]);arguments.callee.c_replace=["(TM)","(C)","(R)","ae","Ae","ae","Ae","oe","Oe","ue","Ue","ss"].concat(["a","c","e","i","n","o","u","x","y"],["A","C","D","E","I","N","O","U","Y"],["(",")","1","2","3"]);arguments.callee.c_search.push(/['!%"\u2018\u2019\u201a\u201c\u201d\u201e:; ,&_#^=~@\u2013\u2014\u203e\u00ac\u00a1\u00bf\u00a4\u00a6\u00a7\u00b0\u00b7\u00b6\u00f7\\\|\?\+\/\.\*\t\r\n]+/g);
arguments.callee.c_replace.push("-")}c=c.replace(/^\s\s*/,"").replace(/\s\s*$/,"");for(var g in arguments.callee.c_search)c=c.replace(arguments.callee.c_search[g],arguments.callee.c_replace[g]);c=c.replace(/[^-a-zA-Z0-9()]/,"");c=c.replace(/-+/,"-");c=c.substr(0,64);c=c.replace(/^--*/,"").replace(/--*$/,"");c.length||(c="untitled");c=c.toLowerCase();if(c.match(/^-?[0-9]+$/)!=null)return c.substr(0,1)!="-"?"no-"+c:"minus-"+c.substr(1);if(c.length==1)c="letter-"+c;return c};window.sprintf=function(){function c(){var s=arguments[1],D=arguments[3],P=arguments[4],Q=arguments[5],I=arguments[6],L=arguments[7];if(L=="%")return"%";else{var t;if(s)t=k[s];else if(o.length<1){console.error("sprintf Error: Arguments count ("+arguments.length+") does not match replacement token count ("+str.match("%","g").length+").");return str}else t=o.shift();s=t;if(L=="b")s=parseInt(t).toString(2);else if(L=="c")s=String.fromCharCode(parseInt(t));else if(L=="d")s=parseInt(t)?parseInt(t):0;else if(L==
"u")s=Math.abs(t);else if(L=="o")s=parseInt(t).toString(8);else if(L=="s")s=t;else if(L=="x")s=(""+parseInt(t).toString(16)).toLowerCase();else if(L=="X")s=(""+parseInt(t).toString(16)).toUpperCase();else if(L=="f"){I=I?parseInt(I.substring(1)):6;s=Math.round(parseFloat(t)*Math.pow(10,I))/Math.pow(10,I)}if(Q){if(D&&D.substr(0,1)=="'")D=D.substr(1,1);else if(D.length==0)D=" ";D=Array(parseInt(Q)+1-s.length).join(D);if(P!=="-")s=D+s;else s+=D}}return s}var g=/%(?:(\d+)$)?(\+?)('.|0|\x20)?(-)?(\d+)?(\.\d+)?([%bcdufosxX])/g,
k,o;return function(s){try{var D=Array.prototype.slice.call(arguments),P=D.shift();if(D.length==1&&"object"==typeof D[0])D=D[0];k=o=D;return P.replace(g,c)}catch(Q){return s}}}();(function(){var c=this.Class=function(){},g=true;c.prototype.__ctor=c;c.extend=function(k){var o=k?function(){g&&arguments.callee.__ctor.apply(this,arguments)}:this,s;for(s in this)o[s]=this[s];g=false;o.prototype=new this;g=true;o.prototype.__super=this;o.prototype.__parent=this.prototype;o.prototype.__self=o;o.__ctor=k?k:o;return o.constructor=o}})();jQuery.fn.mousehold=function(c,g){if(c&&typeof c=="function"){g=c;c=100}if(g&&typeof g=="function"){var k=0,o=0;return this.each(function(){jQuery(this).mousedown(function(){o=1;var s=0,D=this;k=setInterval(function(){s++;g.call(D,s);o=2},c)});clearMousehold=function(){clearInterval(k);o==1&&g.call(this,1);o=0};jQuery(this).mouseout(clearMousehold);jQuery(this).mouseup(clearMousehold)})}};(function(c){c.fn.unselectable=function(){return this.each(function(){c(this).css("-moz-user-select","none").css("-khtml-user-select","none").css("user-select","none");if(c.browser.msie){c(this).each(function(){this.ondrag=function(){return false}});c(this).each(function(){this.onselectstart=function(){return false}})}else c.browser.opera&&c(this).attr("unselectable","on")})}})(jQuery);var swfobject=function(){function c(){if(!Da){try{var y=W.getElementsByTagName("body")[0].appendChild(W.createElement("span"));y.parentNode.removeChild(y)}catch(B){return}Da=true;y=La.length;for(var H=0;H<y;H++)La[H]()}}function g(y){if(Da)y();else La[La.length]=y}function k(y){if(typeof sa.addEventListener!=ga)sa.addEventListener("load",y,false);else if(typeof W.addEventListener!=ga)W.addEventListener("load",y,false);else if(typeof sa.attachEvent!=ga)fa(sa,"onload",y);else if(typeof sa.onload=="function"){var B=
sa.onload;sa.onload=function(){B();y()}}else sa.onload=y}function o(){var y=W.getElementsByTagName("body")[0],B=W.createElement(ra);B.setAttribute("type",Ka);var H=y.appendChild(B);if(H){var O=0;(function(){if(typeof H.GetVariable!=ga){var R=H.GetVariable("$version");if(R){R=R.split(" ")[1].split(",");S.pv=[parseInt(R[0],10),parseInt(R[1],10),parseInt(R[2],10)]}}else if(O<10){O++;setTimeout(arguments.callee,10);return}y.removeChild(B);H=null;s()})()}else s()}function s(){var y=va.length;if(y>0)for(var B=
0;B<y;B++){var H=va[B].id,O=va[B].callbackFn,R={success:false,id:H};if(S.pv[0]>0){var ca=U(H);if(ca)if(ua(va[B].swfVersion)&&!(S.wk&&S.wk<312)){Ea(H,true);if(O){R.success=true;R.ref=D(H);O(R)}}else if(va[B].expressInstall&&P()){R={};R.data=va[B].expressInstall;R.width=ca.getAttribute("width")||"0";R.height=ca.getAttribute("height")||"0";if(ca.getAttribute("class"))R.styleclass=ca.getAttribute("class");if(ca.getAttribute("align"))R.align=ca.getAttribute("align");var Z={};ca=ca.getElementsByTagName("param");
for(var ha=ca.length,ia=0;ia<ha;ia++)if(ca[ia].getAttribute("name").toLowerCase()!="movie")Z[ca[ia].getAttribute("name")]=ca[ia].getAttribute("value");Q(R,Z,H,O)}else{I(ca);O&&O(R)}}else{Ea(H,true);if(O){if((H=D(H))&&typeof H.SetVariable!=ga){R.success=true;R.ref=H}O(R)}}}}function D(y){var B=null;if((y=U(y))&&y.nodeName=="OBJECT")if(typeof y.SetVariable!=ga)B=y;else if(y=y.getElementsByTagName(ra)[0])B=y;return B}function P(){return!Va&&ua("6.0.65")&&(S.win||S.mac)&&!(S.wk&&S.wk<312)}function Q(y,
B,H,O){Va=true;Oa=O||null;db={success:false,id:H};var R=U(H);if(R){if(R.nodeName=="OBJECT"){Ma=L(R);d=null}else{Ma=R;d=H}y.id=Xa;if(typeof y.width==ga||!/%$/.test(y.width)&&parseInt(y.width,10)<310)y.width="310";if(typeof y.height==ga||!/%$/.test(y.height)&&parseInt(y.height,10)<137)y.height="137";W.title=W.title.slice(0,47)+" - Flash Player Installation";O=S.ie&&S.win?"ActiveX":"PlugIn";O="MMredirectURL="+sa.location.toString().replace(/&/g,"%26")+"&MMplayerType="+O+"&MMdoctitle="+W.title;if(typeof B.flashvars!=
ga)B.flashvars+="&"+O;else B.flashvars=O;if(S.ie&&S.win&&R.readyState!=4){O=W.createElement("div");H+="SWFObjectNew";O.setAttribute("id",H);R.parentNode.insertBefore(O,R);R.style.display="none";(function(){R.readyState==4?R.parentNode.removeChild(R):setTimeout(arguments.callee,10)})()}t(y,B,H)}}function I(y){if(S.ie&&S.win&&y.readyState!=4){var B=W.createElement("div");y.parentNode.insertBefore(B,y);B.parentNode.replaceChild(L(y),B);y.style.display="none";(function(){y.readyState==4?y.parentNode.removeChild(y):
setTimeout(arguments.callee,10)})()}else y.parentNode.replaceChild(L(y),y)}function L(y){var B=W.createElement("div");if(S.win&&S.ie)B.innerHTML=y.innerHTML;else if(y=y.getElementsByTagName(ra)[0])if(y=y.childNodes)for(var H=y.length,O=0;O<H;O++)!(y[O].nodeType==1&&y[O].nodeName=="PARAM")&&y[O].nodeType!=8&&B.appendChild(y[O].cloneNode(true));return B}function t(y,B,H){var O,R=U(H);if(S.wk&&S.wk<312)return O;if(R){if(typeof y.id==ga)y.id=H;if(S.ie&&S.win){var ca="",Z;for(Z in y)if(y[Z]!=Object.prototype[Z])if(Z.toLowerCase()==
"data")B.movie=y[Z];else if(Z.toLowerCase()=="styleclass")ca+=' class="'+y[Z]+'"';else if(Z.toLowerCase()!="classid")ca+=" "+Z+'="'+y[Z]+'"';Z="";for(var ha in B)if(B[ha]!=Object.prototype[ha])Z+='<param name="'+ha+'" value="'+B[ha]+'" />';R.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+ca+">"+Z+"</object>";K[K.length]=y.id;O=U(y.id)}else{ha=W.createElement(ra);ha.setAttribute("type",Ka);for(var ia in y)if(y[ia]!=Object.prototype[ia])if(ia.toLowerCase()=="styleclass")ha.setAttribute("class",
y[ia]);else ia.toLowerCase()!="classid"&&ha.setAttribute(ia,y[ia]);for(ca in B)if(B[ca]!=Object.prototype[ca]&&ca.toLowerCase()!="movie"){y=ha;Z=ca;ia=B[ca];H=W.createElement("param");H.setAttribute("name",Z);H.setAttribute("value",ia);y.appendChild(H)}R.parentNode.replaceChild(ha,R);O=ha}}return O}function N(y){var B=U(y);if(B&&B.nodeName=="OBJECT")if(S.ie&&S.win){B.style.display="none";(function(){if(B.readyState==4){var H=U(y);if(H){for(var O in H)if(typeof H[O]=="function")H[O]=null;H.parentNode.removeChild(H)}}else setTimeout(arguments.callee,
10)})()}else B.parentNode.removeChild(B)}function U(y){var B=null;try{B=W.getElementById(y)}catch(H){}return B}function fa(y,B,H){y.attachEvent(B,H);Ha[Ha.length]=[y,B,H]}function ua(y){var B=S.pv;y=y.split(".");y[0]=parseInt(y[0],10);y[1]=parseInt(y[1],10)||0;y[2]=parseInt(y[2],10)||0;return B[0]>y[0]||B[0]==y[0]&&B[1]>y[1]||B[0]==y[0]&&B[1]==y[1]&&B[2]>=y[2]?true:false}function qa(y,B,H,O){if(!(S.ie&&S.mac)){var R=W.getElementsByTagName("head")[0];if(R){H=H&&typeof H=="string"?H:"screen";if(O)Pa=
wa=null;if(!wa||Pa!=H){O=W.createElement("style");O.setAttribute("type","text/css");O.setAttribute("media",H);wa=R.appendChild(O);if(S.ie&&S.win&&typeof W.styleSheets!=ga&&W.styleSheets.length>0)wa=W.styleSheets[W.styleSheets.length-1];Pa=H}if(S.ie&&S.win)wa&&typeof wa.addRule==ra&&wa.addRule(y,B);else wa&&typeof W.createTextNode!=ga&&wa.appendChild(W.createTextNode(y+" {"+B+"}"))}}}function Ea(y,B){if(fb){var H=B?"visible":"hidden";if(Da&&U(y))U(y).style.visibility=H;else qa("#"+y,"visibility:"+
H)}}function cb(y){return/[\\\"<>\.;]/.exec(y)!=null&&typeof encodeURIComponent!=ga?encodeURIComponent(y):y}var ga="undefined",ra="object",Ka="application/x-shockwave-flash",Xa="SWFObjectExprInst",sa=window,W=document,za=navigator,Fa=false,La=[function(){Fa?o():s()}],va=[],K=[],Ha=[],Ma,d,Oa,db,Da=false,Va=false,wa,Pa,fb=true,S=function(){var y=typeof W.getElementById!=ga&&typeof W.getElementsByTagName!=ga&&typeof W.createElement!=ga,B=za.userAgent.toLowerCase(),H=za.platform.toLowerCase(),O=H?/win/.test(H):
/win/.test(B);H=H?/mac/.test(H):/mac/.test(B);B=/webkit/.test(B)?parseFloat(B.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false;var R=!+"\u000b1",ca=[0,0,0],Z=null;if(typeof za.plugins!=ga&&typeof za.plugins["Shockwave Flash"]==ra){if((Z=za.plugins["Shockwave Flash"].description)&&!(typeof za.mimeTypes!=ga&&za.mimeTypes[Ka]&&!za.mimeTypes[Ka].enabledPlugin)){Fa=true;R=false;Z=Z.replace(/^.*\s+(\S+\s+\S+$)/,"$1");ca[0]=parseInt(Z.replace(/^(.*)\..*$/,"$1"),10);ca[1]=parseInt(Z.replace(/^.*\.(.*)\s.*$/,
"$1"),10);ca[2]=/[a-zA-Z]/.test(Z)?parseInt(Z.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else if(typeof sa.ActiveXObject!=ga)try{var ha=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");if(ha)if(Z=ha.GetVariable("$version")){R=true;Z=Z.split(" ")[1].split(",");ca=[parseInt(Z[0],10),parseInt(Z[1],10),parseInt(Z[2],10)]}}catch(ia){}return{w3:y,pv:ca,wk:B,ie:R,win:O,mac:H}}();(function(){if(S.w3){if(typeof W.readyState!=ga&&W.readyState=="complete"||typeof W.readyState==ga&&(W.getElementsByTagName("body")[0]||
W.body))c();if(!Da){typeof W.addEventListener!=ga&&W.addEventListener("DOMContentLoaded",c,false);if(S.ie&&S.win){W.attachEvent("onreadystatechange",function(){if(W.readyState=="complete"){W.detachEvent("onreadystatechange",arguments.callee);c()}});sa==top&&function(){if(!Da){try{W.documentElement.doScroll("left")}catch(y){setTimeout(arguments.callee,0);return}c()}}()}S.wk&&function(){Da||(/loaded|complete/.test(W.readyState)?c():setTimeout(arguments.callee,0))}();k(c)}}})();(function(){S.ie&&S.win&&
window.attachEvent("onunload",function(){for(var y=Ha.length,B=0;B<y;B++)Ha[B][0].detachEvent(Ha[B][1],Ha[B][2]);y=K.length;for(B=0;B<y;B++)N(K[B]);for(var H in S)S[H]=null;S=null;for(var O in swfobject)swfobject[O]=null;swfobject=null})})();return{registerObject:function(y,B,H,O){if(S.w3&&y&&B){var R={};R.id=y;R.swfVersion=B;R.expressInstall=H;R.callbackFn=O;va[va.length]=R;Ea(y,false)}else O&&O({success:false,id:y})},getObjectById:function(y){if(S.w3)return D(y)},embedSWF:function(y,B,H,O,R,ca,
Z,ha,ia,Qa){var Za={success:false,id:B};if(S.w3&&!(S.wk&&S.wk<312)&&y&&B&&H&&O&&R){Ea(B,false);g(function(){H+="";O+="";var ya={};if(ia&&typeof ia===ra)for(var xa in ia)ya[xa]=ia[xa];ya.data=y;ya.width=H;ya.height=O;xa={};if(ha&&typeof ha===ra)for(var Ca in ha)xa[Ca]=ha[Ca];if(Z&&typeof Z===ra)for(var Ra in Z)if(typeof xa.flashvars!=ga)xa.flashvars+="&"+Ra+"="+Z[Ra];else xa.flashvars=Ra+"="+Z[Ra];if(ua(R)){Ca=t(ya,xa,B);ya.id==B&&Ea(B,true);Za.success=true;Za.ref=Ca}else if(ca&&P()){ya.data=ca;Q(ya,
xa,B,Qa);return}else Ea(B,true);Qa&&Qa(Za)})}else Qa&&Qa(Za)},switchOffAutoHideShow:function(){fb=false},ua:S,getFlashPlayerVersion:function(){return{major:S.pv[0],minor:S.pv[1],release:S.pv[2]}},hasFlashPlayerVersion:ua,createSWF:function(y,B,H){if(S.w3)return t(y,B,H)},showExpressInstall:function(y,B,H,O){S.w3&&P()&&Q(y,B,H,O)},removeSWF:function(y){S.w3&&N(y)},createCSS:function(y,B,H,O){S.w3&&qa(y,B,H,O)},addDomLoadEvent:g,addLoadEvent:k,getQueryParamValue:function(y){var B=W.location.search||
W.location.hash;if(B){if(/\?/.test(B))B=B.split("?")[1];if(y==null)return cb(B);B=B.split("&");for(var H=0;H<B.length;H++)if(B[H].substring(0,B[H].indexOf("="))==y)return cb(B[H].substring(B[H].indexOf("=")+1))}return""},expressInstallCallback:function(){if(Va){var y=U(Xa);if(y&&Ma){y.parentNode.replaceChild(Ma,y);if(d){Ea(d,true);if(S.ie&&S.win)Ma.style.display="block"}Oa&&Oa(db)}Va=false}}}}();(function(c,g,k){function o(t,N){var U=(t[0]||0)-(N[0]||0);return U>0||!U&&t.length>0&&o(t.slice(1),N.slice(1))}function s(t){if(typeof t!=D)return t;var N=[],U="",fa;for(fa in t){U=typeof t[fa]==D?s(t[fa]):[fa,P?encodeURI(t[fa]):t[fa]].join("=");N.push(U)}return N.join("&")}var D="object",P=true;try{var Q=k.description||(new k("ShockwaveFlash.ShockwaveFlash")).GetVariable("$version")}catch(I){Q="Unavailable"}var L=Q.match(/\d+/g)||[0];c[g]={available:L[0]>0,activeX:k&&!k.name,version:{original:Q,
array:L,string:L.join("."),major:parseInt(L[0],10)||0,minor:parseInt(L[1],10)||0,release:parseInt(L[2],10)||0},hasVersion:function(t){t=/string|number/.test(typeof t)?t.toString().split("."):/object/.test(typeof t)?[t.major,t.minor]:t||[0,0];return o(L,t)},encodeParams:true,expressInstall:"expressInstall.swf",expressInstallIsActive:false,create:function(t){if(!t.swf||this.expressInstallIsActive||!this.available&&!t.hasVersionFail)return false;if(!this.hasVersion(t.hasVersion||1)){this.expressInstallIsActive=
true;if(typeof t.hasVersionFail=="function")if(!t.hasVersionFail.apply(t))return false;t={swf:t.expressInstall||this.expressInstall,height:137,width:214,flashvars:{MMredirectURL:location.href,MMplayerType:this.activeX?"ActiveX":"PlugIn",MMdoctitle:document.title.slice(0,47)+" - Flash Player Installation"}}}attrs={data:t.swf,type:"application/x-shockwave-flash",id:t.id||"flash_"+Math.floor(Math.random()*999999999),width:t.width||320,height:t.height||180,style:t.style||""};P=typeof t.useEncode!=="undefined"?
t.useEncode:this.encodeParams;t.movie=t.swf;t.wmode=t.wmode||"opaque";delete t.fallback;delete t.hasVersion;delete t.hasVersionFail;delete t.height;delete t.id;delete t.swf;delete t.useEncode;delete t.width;var N=document.createElement("div"),U=attrs,fa=[],ua;for(ua in U)U[ua]&&fa.push([ua,'="',U[ua],'"'].join(""));U=fa.join(" ");var qa;t=t;fa=[];for(qa in t)fa.push(['<param name="',qa,'" value="',s(t[qa]),'" />'].join(""));qa=fa.join("");qa=["<object ",U,">",qa,"</object>"];N.innerHTML=qa.join.call(qa,
"");return N.firstChild}};c.fn[g]=function(t){var N=this.find(D).andSelf().filter(D);/string|object/.test(typeof t)&&this.each(function(){var U=c(this),fa;t=typeof t==D?t:{swf:t};t.fallback=this;if(fa=c[g].create(t)){U.children().remove();U.html(fa)}});typeof t=="function"&&N.each(function(){var U=this;U.jsInteractionTimeoutMs=U.jsInteractionTimeoutMs||0;if(U.jsInteractionTimeoutMs<660)U.clientWidth||U.clientHeight?t.call(U):setTimeout(function(){c(U)[g](t)},U.jsInteractionTimeoutMs+66)});return N}})(jQuery,
"flash",navigator.plugins["Shockwave Flash"]||window.ActiveXObject);if(!window.console){var names=["log","debug","info","warn","error","assert","dir","dirxml","group","groupEnd","time","timeEnd","count","trace","profile","profileEnd"];window.console={};for(var i=0;i<names.length;++i)window.console[names[i]]=function(){}}var TxtBear=function(){var c={};return{getSettingsContext:function(){return c},addSettings:function(g){$.extend(c,g)},getSetting:function(g,k){return"undefined"==typeof c[g]?k:c[g]},setSetting:function(g,k){c[g]=k}}}();window.TxtBear=TxtBear;TxtBear.Base=Class.extend(function(){this._settingsContext=TxtBear.getSettingsContext();this._settingsPath=""});TxtBear.Base.trigger=function(){if(!this.prototype.eo)this.prototype.eo={};var c=$(this.prototype.eo);c.trigger.apply(c,arguments)};TxtBear.Base.bind=function(){if(!this.prototype.eo)this.prototype.eo={};var c=$(this.prototype.eo);c.bind.apply(c,arguments)};TxtBear.Base.prototype.getSetting=function(c,g){return TxtBear.getSetting(this._settingsPath?this._settingsPath+c:c,g)};
TxtBear.Base.prototype.setSettingsPath=function(c){this._settingsPath=c};TxtBear.Base.prototype.getEl=function(){return this._el};TxtBear.Base.prototype.bind=function(){var c=$(this);return c.bind.apply(c,arguments)};TxtBear.Base.prototype.trigger=function(){var c=$(this);return c.trigger.apply(c,arguments)};TxtBear.Gettext=function(){var c={},g=null,k;return k={gettext:function(o){if(g&&c[g]&&"object"==typeof c[g][o]&&c[g][o][1].length)o=c[g][o][1];return o},addLanguageData:function(o,s){c[o]=s},setLang:function(o){g=o},getLang:function(){return g},formatNumber:function(o,s,D,P){o=o;var Q=isNaN(s=Math.abs(s))?2:s;s=D==undefined?",":D;P=P==undefined?".":P;D=o<0?"-":"";var I=parseInt(o=Math.abs(+o||0).toFixed(Q))+"",L=(L=I.length)>3?L%3:0;return D+(L?I.substr(0,L)+P:"")+I.substr(L).replace(/(\d{3})(?=\d)/g,
"$1"+P)+(Q?s+Math.abs(o-I).toFixed(Q).slice(2):"")},formatFilesize:function(o){return o=o>=1073741824?k.formatNumber(o/1073741824,2,".","")+" GB":o>=1048576?k.formatNumber(o/1048576,2,".","")+" MB":o>=1024?k.formatNumber(o/1024,0)+" KB":k.formatNumber(o,0)+" bytes"}}}();window.gettext=TxtBear.Gettext.gettext;TxtBear.Util=function(){var c=/^(("[\w-\s]+")|([\w-]+(?:\.[\w-]+)*)|("[\w-\s]+")([\w-]+(?:\.[\w-]+)*))(@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$)|(@\[?((25[0-5]\.|2[0-4][0-9]\.|1[0-9]{2}\.|[0-9]{1,2}\.))((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\.){2}(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\]?$)/i,g;return g={setupMouseStates:function(k,o){k.mouseenter(function(){$(this).addClass("tbHover")});k.mouseleave(function(){$(this).removeClass("tbHover")});k.mousedown(function(){var s=
$(this);if(o){if(o!=="custom")if(o=="group"){var D=s.siblings().andSelf(),P=s.hasClass("tbActive");D.removeClass("tbActive");P||s.addClass("tbActive")}else s.toggleClass("tbActive")}else{s.addClass("tbActive");$("body").mouseup(function Q(){$("body").unbind("mouseup",Q);s.removeClass("tbActive")})}})},getShortId:function(k){for(var o="";k;){o=String.fromCharCode(k%256)+o;k>>=8}k="";for(var s,D,P,Q,I,L,t=0;t<o.length;){s=o.charCodeAt(t++);D=o.charCodeAt(t++);P=o.charCodeAt(t++);Q=s>>2;s=((s&3)<<4)+
(D>>4);I=((D&15)<<2)+(P>>6);L=P&63;k+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".charAt(Q)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".charAt(s)+(isNaN(D)?"":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".charAt(I))+(isNaN(P)?"":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".charAt(L))}return k},createCookie:function(k,o,s){if(s){var D=new Date;D.setTime(D.getTime()+s*24*60*60*1E3);s="; expires="+D.toGMTString()}else s=
"";document.cookie=k+"="+o+s+"; path=/"},readCookie:function(k){k=k+"=";for(var o=document.cookie.split(";"),s=0;s<o.length;s++){for(var D=o[s];D.charAt(0)==" ";)D=D.substring(1,D.length);if(D.indexOf(k)==0)return D.substring(k.length,D.length)}return null},clearCookie:function(k){g.createCookie(k,"",-1)},isValidEmail:function(k){return c.test(k)},urlEncode:function(k){k=(k+"").toString();return encodeURIComponent(k).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,
"%2A").replace(/%20/g,"+")},buildQuery:function(k,o,s){var D,P,Q=[],I=$.proxy(function(L,t,N){var U,fa=[];if(t===true)t="1";else if(t===false)t="0";if(t!==null&&typeof t==="object"){for(U in t)t[U]!==null&&fa.push(I(L+"["+U+"]",t[U],N));return fa.join(N)}else if(typeof t!=="function")return this.urlEncode(L)+"="+this.urlEncode(t);else throw Error("There was an error processing for http_build_query().");},this);s||(s="&");for(P in k){D=k[P];if(o&&!isNaN(P))P=String(o)+P;Q.push(I(P,D,s))}return Q.join(s)},
detectCssPropertySupport:function(k,o){if("string"===typeof k)k=[k];if("object"===typeof o)o=o[0];if("undefined"===typeof o)o=document.body;for(var s;s=k.shift();)if("undefined"!==typeof o.style[s])return s;return null},arrayUnique:function(k){for(var o=[],s=k.length,D=0;D<s;D++){for(var P=D+1;P<s;P++)if(k[D]===k[P])P=++D;o.push(k[D])}return o}}}();TxtBear.API=function(){var c;return c={url:"http://api.txtbear.com/",urlSecure:"https://api.txtbear.com/",getUrl:function(g,k,o){if("object"==typeof k)k=TxtBear.Util.buildQuery(k);else if("string"!=typeof k)k="";if("object"!=typeof o)o={};if(k.length)k+="&";if(TxtBear.User&&TxtBear.User.isLoggedIn())k+="__session="+TxtBear.User.getToken()+"&";return(o.ssl?c.urlSecure:c.url)+g+".json?"+k+"__force200&callback=?"},call:function(g,k,o,s){$.getJSON(c.getUrl(g,k,s),o)},callSecure:function(g,k,o,s){if("object"!=
typeof s)s={};s=$.extend({ssl:true},s);TxtBear.API.call(g,k,o,s)}}}();TxtBear.Transform={};TxtBear.Transform.create=function(c){switch(TxtBear.Util.detectCssPropertySupport(["transform","WebkitTransform","MozTransform"],c)){case "WebkitTransform":return new this.WebkitTransform(c);default:return new this.CssPosition(c)}};TxtBear.Transform.Abstract=Class.extend(function(c){this._el=c;this._values={left:0,top:0,scale:1};this.units={left:"px",top:"px",scale:""}});TxtBear.Transform.Abstract.prototype.set=function(c,g){if(!isNaN(g)){this._values[c]=g;this.invalidate()}};
TxtBear.Transform.Abstract.prototype.get=function(c){return this._values[c]};TxtBear.Transform.Abstract.prototype.invalidate=function(){};TxtBear.Transform.CssPosition=TxtBear.Transform.Abstract.extend(function(c){this.__super(c)});TxtBear.Transform.CssPosition.prototype.set=function(c,g){if(!isNaN(g)){this._values[c]=g;switch(c){case "top":case "left":this._el.css(c,g+this.units[c])}}};TxtBear.Transform.WebkitTransform=TxtBear.Transform.Abstract.extend(function(c){this.__super(c)});
TxtBear.Transform.WebkitTransform.prototype.invalidate=function(){var c=this.makeProp("left"),g=this.makeProp("top");this.makeProp("scale");transformString="";transformString+="translate3d("+c+", "+g+", 0)";if(this._values.scale!=1)transformString+=" scale("+this._values.scale+")";this._el.css("-webkit-transform",transformString)};
TxtBear.Transform.WebkitTransform.prototype.makeProp=function(c){return this.units[c]=="%"?this._el.parent().width()*(this._values[c]-50)/100+"px":this.units[c]=="px"?this._values[c]+"px":"0"};TxtBear.ModalMask=function(){var c=null;return{modalize:function(g){if(!c){c=$('<div id="tbModalMask"></div>');c.appendTo(document.body)}g=$(g);var k=parseInt(c.css("z-index"));c.css("z-index",k+2);var o=parseInt(g.css("z-index"));g.css("z-index",Math.max(k+3,o));g=$(document).height();k=$(window).width();c.css({width:k,height:g});c.fadeTo(0,0).fadeTo(2E3,0.6)},close:function(){c&&c.remove();c=null}}}();TxtBear.Dialog=TxtBear.Base.extend(function(c){this._config=$.extend({},TxtBear.Dialog.defaultConfig,c);this._el=this._config.el?$(this._config.el):$(this._config.tplBase);c="";if(this._config.el)c=this._el.html();this._config.id&&this._el.attr("id",this._config.id);if(this._config.bg)c=this._config.tplBG+c;if(this._config.content)c+=this._config.content;if(this._config.footer)c+=this._config.tplFooter.replace("{$content}",this._config.footer);this._el.html(c);this._config.el||this._el.appendTo(document.body);
this._config.closable&&this.addCloseTitleIcon();if(this._config.modal){$(this).bind("showDialog",function(g){TxtBear.ModalMask.modalize(g.target.getEl())});$(this).bind("hideDialog",function(){TxtBear.ModalMask.close()})}});
TxtBear.Dialog.defaultConfig={id:null,content:null,footer:null,closable:false,bg:true,tplBase:'<div class="tbDialog" style="display:none"></div>',tplBG:'<img src="http://static.txtbear.com/t/gx/tb_dialog_bg.png" alt="" class="tbBG"/>',tplCloseButton:'<div class="tbCloseButton">&nbsp;</div>',tplFooter:'<div class="tbDialogFooter">{$content}</div>'};TxtBear.Dialog.prototype.show=function(){this._el.show();$(this).trigger("showDialog")};
TxtBear.Dialog.prototype.hide=function(){$(this).trigger("hideDialog");this._el.hide()};TxtBear.Dialog.prototype.close=function(){$(this).trigger("hide");$(this).trigger("close");this._el.remove()};TxtBear.Dialog.prototype.addCloseTitleIcon=function(){$(this._config.tplCloseButton).prependTo(this._el).click($.proxy(this.hide,this))};$.extend(TxtBear,function(){function c(){$(document.body).addClass("tbViewer");$('<div id="tbBackground"></div>').prependTo(document.body);$("#tbCover").remove();D=$("#tbEbook");D.width("100%");D.height("100%");D.css("position","absolute");D.css("top","0");D.css("left","0");var t=new TxtBear.Document;P.push(t);t.parseHtmlPages(D);TxtBear.getSetting("docInfoUrl")&&t.loadDocInfo(TxtBear.getSetting("docInfoUrl"));t=new (TxtBear.DefaultViewer?TxtBear.DefaultViewer:TxtBear.TouchViewer)(t,D);Q.push(t);
I=t;$(window).resize($.proxy(t.invalidateLayout,t));t.invalidateLayout();$(window).bind(window.opera?"keypress":"keydown",g);window.addEventListener&&window.addEventListener("DOMMouseScroll",k,false);window.onmousewheel=document.onmousewheel=k;if(TxtBear.getSetting("embed")){$(document.body).addClass("tbEmbed");t.getToolbar().addButton("tbClose",{align:"right",handler:function(){L.sendMessage("close")}})}}function g(t){t=t.which;if(t==38)I&&I.getViewport().scrollVerticalBy(-30);else if(t==40)I&&I.getViewport().scrollVerticalBy(30);
else if(t==33){if(I){t=I.getViewport();var N=t.getLogicalPos();t.setLogicalPos(N-1)}}else if(t==34)if(I){t=I.getViewport();N=t.getLogicalPos();t.setLogicalPos(N+1)}}function k(t){var N=0;if(!t)t=window.event;if(t.wheelDelta){N=t.wheelDelta/120;if(window.opera&&window.opera.version()<9.2)N=-N}else if(t.detail)N=-t.detail/3;for(var U=0;U<Q.length;U++)Q[U].handleMouseWheel(N,t);t.preventDefault&&t.preventDefault();t.returnValue=false}function o(t){t=unescape(t);L.sendMessage=function(N){parent.location.replace(t+
"#txtbear_"+N);parent.focus();document.body.focus()}}TxtBear.addSettings({svg:false,shadows:true,zoomMode:"normal",adFormat:"TxtBear_Right_160x600",share:true,embed:false,imageUrl:"[coverUrl]p[pageNo].[format]",ipagesUrl:"ipages.js",pageMargin:10,imageRules:[{format:"swf"},{format:"svg"},{minSize:1.4,format:"jpg",size:"m"},{format:"jpg"}]});var s=[],D,P=[],Q=[],I,L=TxtBear;return{adFormat:{format:"TxtBear_None_0x0",height:0,position:"none",width:0},coverUrl:"",addHashSettings:function(){var t=window.location.hash.slice(1).split("&");
$.each(t,function(){if(this.length){var N=this.split("=");s[N[0]]||TxtBear.setSetting(N[0],N[1])}})},start:function(){$(".tbTableOfContents").hide();$(".tbConfig").each(function(){TxtBear.addSettings(eval("("+$(this).html()+")"))});L.addHashSettings();L.detectCapabilities();TxtBear.getSetting("locale")&&TxtBear.Gettext.setLang(TxtBear.getSetting("locale"));TxtBear.getSetting("embed")&&TxtBear.getSetting("msgUrl")&&o(TxtBear.getSetting("msgUrl"));L.sendMessage("loaded");parseInt($("#tbEbook").attr("title"));
if($("#tbCover").length){L.coverUrl=$("#tbCover").attr("src");L.coverUrl=L.coverUrl.substr(0,L.coverUrl.length-9)}TxtBear.adFormat=TxtBear.AdTool.parseAdFormat(TxtBear.getSetting("adFormat"));c();if(TxtBear.getSetting("plugins"))if("string"==typeof TxtBear.getSetting("plugins"))L.loadScript(TxtBear.getSetting("plugins"));else"array"==typeof TxtBear.getSetting("plugins")&&$.each(TxtBear.getSetting("plugins"),function(){L.loadScript(this)})},loadScript:function(t){var N=document.createElement("script");
N.src=t;N.type="text/javascript";document.getElementsByTagName("head")[0].appendChild(N)},addCssString:function(t){var N=document.createElement("style");N.type="text/css";if(N.styleSheet)N.styleSheet.cssText=t;else N.appendChild(document.createTextNode(t));document.getElementsByTagName("head")[0].appendChild(N)},getFocusedViewer:function(){return I},setTracker:function(){},trackPageview:function(t){if("undefined"!==typeof _gaq&&_gaq){_gaq.push(["_trackPageview",t]);TxtBear.getSetting("gaAccount")&&
_gaq.push(["pubacc._trackPageview",t])}},setContentAdFormat:function(t){TxtBear.adFormat=TxtBear.AdTool.parseAdFormat(t)},createShadow:function(t){if(!(!t||t.find(".tbShadowContainer").length))if(L.capabilities.shadows)if(L.capabilities.shadows=="css3")t.addClass("tbBoxShadow");else{var N=$('<div class="tbShadowContainer"/>').prependTo(t);$.each(["tbShadowTL","tbShadowT","tbShadowTR","tbShadowR","tbShadowBR","tbShadowB","tbShadowBL","tbShadowL","tbShadowBg"],function(U,fa){$("<div/>").addClass(fa).appendTo(N)})}},
sendMessage:function(t){var N=parent.postMessage?parent:parent.document.postMessage?parent.document:undefined;"undefined"!=typeof N&&N.postMessage(t,"*")}}}());var FreebookViewer=TxtBear;TxtBear.capabilities={};
TxtBear.detectCapabilities=function(){var c=TxtBear;c.capabilities.svg=c.getSetting("svg")&&!jQuery.browser.msie;c.capabilities.shadows=!!c.getSetting("shadows");c.capabilities.alphafix=false;var g=swfobject.getFlashPlayerVersion();c.capabilities.swf=+c.getSetting("swf",true)&&g.major>=9;if(jQuery.browser.msie){$("html").addClass("tbIE");if(jQuery.browser.version<=6){$("html").addClass("tbIE6");document.execCommand("BackgroundImageCache",false,true);c.capabilities.alphafix=true;c.capabilities.shadows=
false}}};TxtBear.Page=Class.extend(function(c,g){this._no=parseInt(c);this._width=parseInt(g.w);this._height=parseInt(g.h);if(this._width&&this._height)this._sizeKnown=true;else{this._width=TxtBear.Page.defaultWidth;this._height=TxtBear.Page.defaultHeight;this._sizeKnown=false}});TxtBear.Page.defaultWidth=256;TxtBear.Page.defaultHeight=256;TxtBear.Page.prototype.isSizeKnown=function(){return this._sizeKnown};TxtBear.Page.prototype.confirmSize=function(){this._sizeKnown=true};
TxtBear.Page.prototype.setWidth=function(c){if(this._width!=c){this._width=c;$(this).trigger("beforeResize");$(this).trigger("resize")}};TxtBear.Page.prototype.getWidth=function(){return this._width};TxtBear.Page.prototype.setHeight=function(c){if(this._height!=c){this._height=c;$(this).trigger("beforeResize");$(this).trigger("resize")}};TxtBear.Page.prototype.getHeight=function(){return this._height};
TxtBear.Page.prototype.setSize=function(c,g){if(this._width!=c||this._height!=g){this._width=c;this._height=g;$(this).trigger("beforeResize");$(this).trigger("resize")}};TxtBear.AdTool={parseAdFormat:function(c){var g=c.split("_"),k=g[2].split("x");return{format:c,width:parseInt(k[0]),height:parseInt(k[1]),position:g[1].toLowerCase()}},place:function(c,g,k){var o=location.pathname.split("/");o.pop();g="http://"+location.host+o.join("/")+"/p"+g+".txt";c.html('<div style="position:absolute; top: 0; left: 0; width: '+k.width+"px; height: "+k.height+'px; text-align:center; line-height: 1.2; background-color: #5184D2; color: #fff;"><p style="padding: 50px 0 15px; font-weight: bold; font-size: 140%;">Ad here</p><p>Content: <a href="'+
g+'" target="_blank" style="color:#fff; text-decoration: underline;">link</a></p></div>')}};TxtBear.Document=TxtBear.Base.extend(function(){this._settings={};this._pages=[];this._pageCount=0;this.getSetting("inferFrontpageSize")&&this.addPage(0,0)});TxtBear.Document.prototype.getSetting=function(c){return"undefined"!=typeof this._settings[c]?this._settings[c]:TxtBear.getSetting(c)};TxtBear.Document.prototype.parseHtmlPages=function(c){c.find("a").each(function(){var g=$(this).attr("title").split(";");this.addPage(g[0],g[1]);$(this).remove()})};
TxtBear.Document.prototype.addPage=function(c,g){this._pages.push({w:c,h:g});this._pageCount++;$(this).trigger("update")};TxtBear.Document.prototype.loadPages=function(c){pages=pages.concat(c);$(this).trigger("update")};TxtBear.Document.prototype.getPageCount=function(){return this._pageCount};TxtBear.Document.prototype.setPageCount=function(c){for(;this._pageCount<c;){this._pages.push({w:0,h:0});this._pageCount++}$(this).trigger("update")};
TxtBear.Document.prototype.getPage=function(c){return this._pages[c-1]instanceof TxtBear.Page?this._pages[c-1]:this._pages[c-1]=new TxtBear.Page(c,this._pages[c-1])};
TxtBear.Document.prototype.loadDocInfo=function(c){var g=this;if(/^[a-z]+\:\/\//.test(c)){c+=c.indexOf("?")==-1?"?":"&";c+="callback=?"}jQuery.getJSON(c,$.proxy(function(k){if(k._log)for(var o=0;o<k._log.length;o++){var s="[SERVER "+k._log[o].type+"] "+k._log[o].message;if(k._log[o].type.substr(-5)=="ERROR")console.error(s);else k._log[o].type.substr(-7)=="WARNING"?console.warn(s):console.info(s)}if(k.fail)$(this).trigger("error",[k]);else{k.numPages&&g.setPageCount(k.numPages);k.title&&this.getSetting("title")===
"Untitled TxtBear Document"&&$("title").text(k.title);$(this).trigger("load")}},this))};TxtBear.PageView=TxtBear.Base.extend(function(c,g){this._viewport=c;this._page=g;this._zoomFactor=1;this._elAd=this._el=null;$(g).bind("resize",$.proxy(this.invalidatePageSize,this));$(this._viewport).bind("zoomChanged",$.proxy(this.invalidateZoom,this));$(this._viewport).bind("zoomModeChanged",$.proxy(this.invalidateZoom,this));var k=jQuery.Event("new");k.instance=this;TxtBear.PageView.trigger(k)});
TxtBear.PageView.prototype.show=function(){if(this._el)return false;this.getMargin();this._el=$("<p/>").addClass("tbPage");this._elImg=null;this._elAd=$('<div class="tbAd"></div>').appendTo(this._el);this._transform=TxtBear.DefaultViewer?new TxtBear.Transform.CssPosition(this._el):TxtBear.Transform.create(this._el);this.invalidateZoom();this.loadPage();this._el.appendTo(this._viewport.getContainer());return true};
TxtBear.PageView.prototype.hide=function(){if(this._el){this._el.find("img").remove();this._el.remove();this._elImg=this._el=null}};TxtBear.PageView.prototype.getEl=function(){return this._el};TxtBear.PageView.prototype.getImgEl=function(){return this._elImg};TxtBear.PageView.prototype.getPage=function(){return this._page};TxtBear.PageView.prototype.getNo=function(){return this._page._no};
TxtBear.PageView.prototype.getOuterWidth=function(){var c=this._page._width*this.getZoomFactor();if(TxtBear.adFormat.position=="left"||TxtBear.adFormat.position=="right")c+=TxtBear.adFormat.width;else c=Math.max(c,TxtBear.adFormat.width);c+=this.getMargin()*2;return c};
TxtBear.PageView.prototype.getOuterHeight=function(){var c=this._page._height*this.getZoomFactor();if(TxtBear.adFormat.position=="top"||TxtBear.adFormat.position=="bottom")c+=TxtBear.adFormat.height;else if(TxtBear.adFormat.position=="left"||TxtBear.adFormat.position=="right")c=Math.max(c,TxtBear.adFormat.height);c+=this.getMargin()*2;return c};TxtBear.PageView.prototype.setTop=function(c){this._el&&this._transform.set("top",c+this.getMargin())};
TxtBear.PageView.prototype.getTop=function(){return this._transform.get("top")-this.getMargin()};TxtBear.PageView.prototype.setLeft=function(c){this._el&&this._transform.set("left",c+this.getMargin())};TxtBear.PageView.prototype.getLeft=function(){return this._transform.get("left")-this.getMargin()};TxtBear.PageView.prototype.getMargin=function(){return this._viewport.getZoomMode()!="flip"?this._viewport.getSetting("pageMargin"):0};
TxtBear.PageView.prototype.resizePage=function(c,g){if(this._el){var k=TxtBear.adFormat;this._viewport.getZoomMode();this._el.find(".tbPageImageWrapper, .tbContent").width(c).height(g);var o=this._elAd.find("div");this._el.css("text-align","left");this._elAd.css("top","auto").css("left","auto").css("right","auto").css("bottom","auto");o.css("left",0);if(k.position=="top"||k.position=="bottom"){c=Math.max(c,k.width);this._el.width(c+"px").height(g+k.height+"px").css("text-align","center");this._elAd.height(k.height+
"px");this._elAd.width(c+"px");this._elAd.css("position","absolute").css("left","0px").css(k.position,"0px");o.css("left",(c-k.width)/2+"px")}else if(k.position=="left"||k.position=="right"){g=Math.max(g,k.height);this._el.width(c+k.width+"px").height(g+"px");this._elAd.width(k.width+"px");this._elAd.height(g+"px");this._elAd.css("position","absolute").css("top","0px").css(k.position,"0px")}else{this._elAd.remove();this._el.width(c+"px").height(g+"px")}}};
TxtBear.PageView.prototype.invalidatePageSize=function(){if(this._el){var c=this._viewport.getZoomMode(),g=this.getZoomFactor();this.resizePage(this._page._width*g,this._page._height*g);var k,o;k=this.getImgSettings(g);g=this.getImgUrl(k);if(jQuery.browser.mozilla&&k.format=="svgz"){k=this._el.find(".tbPageImageWrapper object");o="data"}else{k=this._el.find(".tbPageImageWrapper img");o="src"}k.attr(o)!=g&&k.attr(o,g);c!="normal"&&this.invalidateZoom();this.trigger(jQuery.Event("resize"))}};
TxtBear.PageView.prototype.getZoomFactor=function(){return this._zoomFactor};
TxtBear.PageView.prototype.invalidateZoom=function(){var c=TxtBear.adFormat,g=this._viewport.getZoomMode(),k=this._viewport.getPageAvailableArea(this);if(g=="normal")c=this._viewport.getZoom()/100;else{var o=c.position=="top"||c.position=="bottom"?c.height:0;c=Math.min((k[0]-(c.position=="left"||c.position=="right"?c.width:0))/this._page._width,2);if(g=="flip")c=Math.min((k[1]-o)/this._page._height,c);c*=this._viewport.getZoom()/100}if(c!=this._zoomFactor){this._zoomFactor=c;this.invalidatePageSize()}};
TxtBear.PageView.prototype.getPageInfoUrl=function(){var c=TxtBear.getSetting("pageInfoUrl");return c=c.replace("[pageNo]",this._page._no)};
TxtBear.PageView.prototype.getImgSettings=function(c){var g=TxtBear.getSetting("imageRules"),k="jpg",o="";if("string"==typeof g)g=$.parseJSON(g);for(var s=0;s<g.length;s++)if(!(g[s].format=="swf"&&!TxtBear.capabilities.swf))if(!(g[s].format=="svg"&&!TxtBear.capabilities.svg))if(!(g[s].minSize&&c<g[s].minSize))if(!(g[s].maxSize&&c<g[s].maxSize)){if(g[s].format)k=g[s].format;if(g[s].size)o=g[s].size;break}return{format:k,size:o}};
TxtBear.PageView.prototype.getImgUrl=function(c){var g=TxtBear.getSetting("imageUrl");g=g.replace("[pageNo]",this._page._no);g=g.replace("[coverUrl]",TxtBear.coverUrl);g=g.replace("[format]",c.format);return g=g.replace("[size]",c.size)};TxtBear.PageView.prototype.loadPage=function(){if(this._el.find(".tbContent").length==0){console.log("Load page "+this._page._no);this._el.addClass("tbPageLoading");this._page.isSizeKnown()?setTimeout($.proxy(this.loadPageImage,this),1):this.loadPageInfo()}};
TxtBear.PageView.prototype.loadPageInfo=function(){var c=this.getPageInfoUrl();if(/^[a-z]+\:\/\//.test(c)){c+=c.indexOf("?")==-1?"?":"&";c+="callback=?"}$.getJSON(c,$.proxy(function(g){this.loadPageImage();this._page.setSize(g.width,g.height);this._page.confirmSize()},this))};
TxtBear.PageView.prototype.loadPageImage=function(){var c=this.getImgSettings(this.getZoomFactor()),g=this.getImgUrl(c);if(c.format=="svg")this._elImg=jQuery.browser.mozilla?$('<div class="tbPageImageWrapper"><object type="image/svg+xml" id="svg"></object></div>').find("object").attr("data",g).attr("width","100%").attr("height","100%").end().prependTo(this._el):$('<div class="tbPageImageWrapper"><img width="100%" height="100%"/></div>').find("img").attr("src",g).end().prependTo(this._el);else if(c.format==
"swf"){this._elImg=$('<div class="tbPageImageWrapper"></div>').prependTo(this._el);this._elImg.flash({swf:g,width:"100%",height:"100%"});$('<div class="tbMouseDisableOverlay"></div>').prependTo(this._elImg)}else{this._elImg=$('<div class="tbPageImageWrapper"><img/></div>');var k=this._elImg.find("img").attr("src",g).css("width","100%").css("height","100%");this._elImg.prependTo(this._el);k.one("load",$.proxy(function(){this._el&&this._el.removeClass("tbPageLoading")},this))}TxtBear.capabilities.shadows&&
TxtBear.createShadow(this._el);this.invalidatePageSize();k=jQuery.Event("imageLoad");k.imageSettings=c;k.imageUrl=g;this.trigger(k)};TxtBear.PageView.prototype.loadAds=function(){this._elAd&&this._elAd.length&&this._elAd.find("div").length==0&&TxtBear.AdTool.place(this._elAd,this._page._no,TxtBear.adFormat)};TxtBear.PageView.prototype.resetAds=function(){if(this._elAd){this._elAd.empty();this.loadAds()}};TxtBear.PageFlipButtons=function(c){this._viewport=c;this._document=c.getDocument();this._hidden=false;this._elLeft=$('<div class="tbPageFlipLeft"><div class="tbArrow">\u25c0</div></div>').appendTo(this._viewport.getEl()).unselectable();this._elRight=$('<div class="tbPageFlipRight"><div class="tbArrow">\u25b6</div></div>').appendTo(this._viewport.getEl()).unselectable();$(this._document).bind("update",$.proxy(this.invalidateVisibility,this));$(this._viewport).bind("scrollVertical",$.proxy(this.invalidateVisibility,
this));this._elLeft.bind("click",$.proxy(this.handleLeftButtonClick,this));this._elRight.bind("click",$.proxy(this.handleRightButtonClick,this));this.invalidateVisibility()};TxtBear.PageFlipButtons.prototype.invalidateVisibility=function(){if(this._hidden)this.hide();else{var c=this._viewport.getCurrentPageNo();c<=1?this._elLeft.hide():this._elLeft.show();!c||c==this._document.getPageCount()?this._elRight.hide():this._elRight.show()}};TxtBear.PageFlipButtons.prototype.handleLeftButtonClick=function(){this._viewport.gotoPageOffset(-1)};
TxtBear.PageFlipButtons.prototype.handleRightButtonClick=function(){this._viewport.gotoPageOffset(1)};TxtBear.PageFlipButtons.prototype.hide=function(){this._hidden=true;this._elLeft.hide();this._elRight.hide()};TxtBear.PageFlipButtons.prototype.show=function(){this._hidden=false;this.invalidateVisibility()};TxtBear.PageFlipButtons.prototype.visible=function(){return!this._hidden};TxtBear.PageFlipButtons.prototype.getTotalWidth=function(){return this._elLeft.width()*2};TxtBear.PageScrollbar=function(c){this._viewport=c;this._document=c.getDocument();this._trackBottom=this._trackTop=16;this._el=$('<div class="tbPageScrollbar"></div>');this._elTrack=$('<div class="tbPageScrollbarTrack"></div>').appendTo(this._el);this._elHandle=$('<div class="tbPageScrollbarHandle"></div>').appendTo(this._elTrack);this._elButtonUp=$('<div class="tbPageScrollbarUp">\u25b2</div>').appendTo(this._el).unselectable();this._elButtonDown=$('<div class="tbPageScrollbarDown">\u25bc</div>').appendTo(this._el).unselectable();
if(navigator.userAgent.indexOf("Mac")!=-1){this._trackTop=0;this._trackBottom=32;this._elButtonUp.css("top","auto");this._elButtonUp.css("bottom","16px");if(navigator.vendor.indexOf("Apple")!=-1){this._trackBottom=48;this._elButtonUp.css("bottom","32px");this._elButtonDown.css("top","auto");this._elButtonDown.css("bottom","16px")}}this._el.appendTo(this._viewport.getEl());$(this._document).bind("update",$.proxy(this.invalidateDocument,this));$(this._viewport).bind("scrollVertical",$.proxy(this.invalidateScrollPosition,
this));this._elHandle.bind("drag",$.proxy(this.handleDrag,this));this._elTrack.bind("click",$.proxy(this.handleTrackClick,this));this._elButtonUp.mousehold($.proxy(this.handleButtonUp,this));this._elButtonDown.mousehold($.proxy(this.handleButtonDown,this));this.invalidateDocument();this.invalidateScrollPosition()};TxtBear.PageScrollbar.minHandleHeight=8;
TxtBear.PageScrollbar.prototype.invalidateDocument=function(){var c=this._elTrack.height()-this._trackTop-this._trackBottom,g=Math.round(c/this._document.getPageCount());g=Math.min(g,Math.round(c/2));g=Math.max(g,TxtBear.PageScrollbar.minHandleHeight);this._elHandle.height(g);this._minLogicalPos=this._viewport.getMinLogicalPos();this._maxLogicalPos=this._viewport.getMaxLogicalPos()};
TxtBear.PageScrollbar.prototype.invalidateScrollPosition=function(){var c=this._viewport.getLogicalPos();this._minLogicalPos=this._viewport.getMinLogicalPos();this._maxLogicalPos=this._viewport.getMaxLogicalPos();if(this._viewport.getZoomMode()=="flip")this._maxLogicalPos-=0.5;c=(c-this._minLogicalPos)/(this._maxLogicalPos-this._minLogicalPos);c=Math.max(c,0);c=Math.min(c,1);var g=this._elTrack.height()-this._trackTop-this._trackBottom,k=this._elHandle.height();this._elHandle.css("top",parseInt(this._trackTop-
1+c*(g-k))+"px")};TxtBear.PageScrollbar.prototype.handleDrag=function(c){this._minLogicalPos=this._viewport.getMinLogicalPos();this._maxLogicalPos=this._viewport.getMaxLogicalPos();var g=this._elTrack.height()-this._trackTop-this._trackBottom;c=(c.offsetY-this._el.offset().top-this._trackTop+1)/(g-this._elHandle.height());c=Math.max(c,0);c=Math.min(c,1);this._viewport.setLogicalPos(c*(this._maxLogicalPos-this._minLogicalPos)+this._minLogicalPos)};TxtBear.PageScrollbar.prototype.handleButtonUp=function(){this._viewport.scrollVerticalBy(-30)};
TxtBear.PageScrollbar.prototype.handleButtonDown=function(){this._viewport.scrollVerticalBy(30)};TxtBear.PageScrollbar.prototype.handleTrackClick=function(c){if(c.target==this._elTrack[0]){c=c.layerY;var g=parseInt(this._elHandle.css("top"));if(c>g){c=this._viewport.getLogicalPos();this._viewport.setLogicalPos(c+0.5)}else{c=this._viewport.getLogicalPos();this._viewport.setLogicalPos(c-0.5)}}};TxtBear.PageScrollbar.prototype.hide=function(){this._el.hide()};TxtBear.PageScrollbar.prototype.show=function(){this._el.show()};
TxtBear.PageScrollbar.prototype.visible=function(){return this._el.is(":visible")};TxtBear.PageScrollbar.prototype.getWidth=function(){return this._el.width()};TxtBear.Viewport=TxtBear.Base.extend(function(c,g,k){this._container=c;this._el=$("<div/>").appendTo(c);this._id="tbViewport"+TxtBear.Viewport.unique++;this._settings={};this._pageStayTimer=null;this._pageViews=[];this._zoomMode=null;this._currentQuickZoom=this._currentZoom=100;this._logicalPos=this._quickZoomCorrY=0;this._currentPage=null;this._hScrollPos=0.5;this._stickyWidth=80;this._stickyScroll=false;this._transform=null;this._noSideBySide=this.getSetting("noSideBySide",1);this._firstRowPageOffset=
parseInt(this.getSetting("firstRowPageOffset",0));this._zoomMode=this.getSetting("zoomMode");this._zoomDefault=this.getSetting("zoomDefault",TxtBear.Viewport.zoomDefault);this._zoomHigh=this.getSetting("zoomHigh",TxtBear.Viewport.zoomHigh);this._zoomMin=this.getSetting("zoomMin",TxtBear.Viewport.zoomMin);this._zoomMax=this.getSetting("zoomMax",TxtBear.Viewport.zoomMax);this._document=g;this._el.addClass("tbViewport");this._el.attr("id",this._id);if(TxtBear.PageScrollbar&&!k&&!this.getSetting("hideScrollbar"))this._scrollbar=
new TxtBear.PageScrollbar(this);if(TxtBear.PageFlipButtons&&!this.getSetting("hideFlipButtons"))this._flipButtons=new TxtBear.PageFlipButtons(this);this._elContent=$('<div class="tbViewportContent"></div>').appendTo(this._el);this._transform=TxtBear.DefaultViewer?new TxtBear.Transform.CssPosition(this._elContent):TxtBear.Transform.create(this._elContent);this._transform.units.left="%";this._transform.set("left",50);this.setupGrabAndScroll();this.setupDoubleclickZoom();this.setLogicalPos(1);$(this._document).bind("update",
$.proxy(this.invalidateDocument,this));$(this._document).bind("error",$.proxy(this.handleError,this));$(this).bind("zoomModeChanged",$.proxy(this.invalidateZoomMode,this));var o=this.getSetting("page",1);o!=1&&$(this._document).bind("load",$.proxy(function(){this.gotoPage(o)},this));$(this).trigger("zoomModeChanged");$('<div class="tbWatermark"></div>').click(function(){window.open("http://www.txtbear.com/")}).appendTo(this._el);c=jQuery.Event("new");c.instance=this;TxtBear.Viewport.trigger(c)});
TxtBear.Viewport.unique=0;TxtBear.Viewport.zoomDefault=100;TxtBear.Viewport.zoomHigh=200;TxtBear.Viewport.zoomMin=20;TxtBear.Viewport.zoomMax=300;
TxtBear.Viewport.prototype.setLogicalPos=function(c,g){c=parseFloat(c);var k=this.getMinLogicalPos(),o=this.getMaxLogicalPos();if(c<k)c=k;else if(c>o)c=o;if(g&&this._currentPage){k=this._el.height()/2/this._currentPage.getOuterHeight();k*=100/this._currentQuickZoom;o=c%1;o=Math.max(o,k);o=Math.min(o,1-k);c=Math.floor(this._logicalPos)+o}k=Math.max(Math.floor(c-1)*this._noSideBySide+1-this._firstRowPageOffset,1);this._logicalPos=c;this.setCurrentPage(k);this.invalidatePixelPos();$(this).trigger("scrollVertical")};
TxtBear.Viewport.prototype.setLateralPos=function(c){if(this._currentPage){this._hScrollPos=0.5-c*this._currentPage.getOuterWidth()/this.getInnerWidth();this.invalidateLateralPos()}};
TxtBear.Viewport.prototype.gotoPage=function(c){this.setCurrentPage(c);this._transform.set("top",0);var g=this.measureLogicalPos();g=Math.min(g,c+0.999999);this.setLogicalPos(g);if(!this._currentPage.getPage().isSizeKnown()){$(this._currentPage.getPage()).one("resize.pageAlign",$.proxy(function(){this.gotoPage(c)},this));$(this).one("scrollVertical.pageAlign",$.proxy(function(){},this))}};
TxtBear.Viewport.prototype.gotoPageOffset=function(c){c=this.getCurrentPageNo()+c*this._noSideBySide;c=Math.min(c,this._document.getPageCount());c=Math.max(c,1);this.gotoPage(c)};TxtBear.Viewport.prototype.getCurrentPageNo=function(){return this._currentPage?this._currentPage.getNo():null};TxtBear.Viewport.prototype.getCurrentPage=function(){return this._currentPage?this._currentPage:null};
TxtBear.Viewport.prototype.invalidateSize=function(){if(this._zoomMode=="flip"||this._zoomMode=="width"){$(this).trigger("zoomChanged");this.invalidatePageViewPlacement()}this.invalidatePixelPos()};
TxtBear.Viewport.prototype.invalidatePixelPos=function(){var c=0;if(this._currentPage){c=Math.floor(this._logicalPos);var g=this._logicalPos%1;g=this._el.height()/2-this._currentPage.getOuterHeight()*g*this._currentQuickZoom/100;g=Math.round(g*1E3)/1E3;if(this._zoomMode=="flip"&&this.getTotalZoom()<=100)if(this._currentRow){c=this._currentRow.height;c*=this._currentQuickZoom/100;c=this.getHeight()/2-c/2}else c=0;else c=c==1&&g>0?0:g}this._transform.set("top",c)};
TxtBear.Viewport.prototype.getLogicalPos=function(){return this._logicalPos};TxtBear.Viewport.prototype.measureLogicalPos=function(c){var g=this._transform.get("top");if(parseInt(c))g+=c;c=this._el.height()/2-g;c*=100/this._currentQuickZoom;g=null;for(var k=this._pageViews.length-1;k>=0;k--)if(c>this._pageViews[k].getTop()){g=this._pageViews[k];break}g||(g=this._pageViews[0]);c=c-g.getTop();k=g.getOuterHeight();return Math.floor((g.getNo()+this._firstRowPageOffset-1)/this._noSideBySide)+1+c/k};
TxtBear.Viewport.prototype.measureLateralPos=function(){if(!this._currentPage)return 0;var c=this._currentPage.getOuterWidth();return(this._hScrollPos-0.5)*this.getWidth()/-c};
TxtBear.Viewport.prototype.setCurrentPage=function(c){if(c<1)c=1;else if(c>this._document.getPageCount())c=this._document.getPageCount();else if(!c)return;if(!(this._currentPage&&c==this._currentPage.getNo())){clearTimeout(this._pageStayTimer);this._currentPage=this.createPageView(c);this.invalidatePageViews();this.invalidateLateralPos();console.log("Page Switch to "+this._currentPage.getNo());$(this).trigger("pageSwitch");this._pageStayTimer=setTimeout($.proxy(this.pageStay,this),300)}};
TxtBear.Viewport.prototype.invalidatePageViews=function(){function c(g,k){var o=g.getNo(),s=k.getNo();return o<s?-1:o>s?1:0}return function(){var g;g=this._currentPage.getNo();var k=g-this._noSideBySide,o=g+Math.ceil(this._noSideBySide*1.2);for(g=k;g<=o;g++)g>=1&&g<=this._document.getPageCount()&&this.createPageView(g);for(g=0;g<this._pageViews.length;g++){var s=this._pageViews[g].getNo();if(s<k||s>o){this._pageViews[g].hide();this._pageViews.splice(g,1);g--}}this._pageViews.sort(c);this.invalidatePageViewPlacement()}}();
TxtBear.Viewport.prototype.getPageView=function(c){for(var g=0;g<this._pageViews.length;g++)if(this._pageViews[g].getNo()==c)return this._pageViews[g];return null};TxtBear.Viewport.prototype.createPageView=function(c){var g=this.getPageView(c);if(g)return g;if(page=this._document.getPage(c)){g=new TxtBear.PageView(this,page);c=jQuery.Event("pvCreate");c.pageView=g;this.trigger(c);g.show();$(g.getPage()).bind("resize",$.proxy(this.invalidatePageViewPlacement,this));this._pageViews.push(g);return g}return null};
TxtBear.Viewport.prototype.clearViewport=function(){for(var c;c=this._pageViews.pop();)c.hide()};
TxtBear.Viewport.prototype.invalidatePageViewPlacement=function(){var c,g,k=0,o=0;g=this._pageViews.length;this._pageRows=[];this._currentRow=null;if(this._noSideBySide==1){for(c=0;c<g;c++){if(this._pageViews[c]===this._currentPage)o=k;k+=this._pageViews[c].getOuterHeight()}k=-o;for(c=0;c<g;c++){this._pageViews[c].setTop(k);this._pageViews[c].setLeft(-this._pageViews[c].getOuterWidth()/2);k+=this._pageViews[c].getOuterHeight()}}else{var s=0,D;for(c=0;c<g;c++){if("object"!=typeof this._pageRows[s])this._pageRows[s]=
{pages:[],width:0,height:0};this._pageRows[s].pages.push(this._pageViews[c]);this._pageRows[s].width+=this._pageViews[c].getOuterWidth();this._pageRows[s].height=Math.max(this._pageRows[s].height,this._pageViews[c].getOuterHeight());if(this._pageViews[c]===this._currentPage){o=k;this._currentRow=this._pageRows[s]}D=(this._pageViews[c].getNo()+this._firstRowPageOffset-1)%this._noSideBySide;if(D==this._noSideBySide-1){k+=this._pageRows[s].height;s++}}if(this._zoomMode!="flip"){k=-o;for(c=0;c<this._pageRows.length;c++){o=
-this._pageRows[c].width/2;for(g=0;g<this._pageRows[c].pages.length;g++){this._pageRows[c].pages[g].setTop(k);this._pageRows[c].pages[g].setLeft(o);o+=this._pageRows[c].pages[g].getOuterWidth()}k+=this._pageRows[c].height}}else{c=this.getHeight();k=Math.max(c,this._currentRow.height)+50;for(c=0;c<this._pageRows.length;c++)for(g=0;g<this._pageRows[c].pages.length;g++)this._pageRows[c].pages[g].setTop(k);o=-this._currentRow.width/2;for(c=0;c<this._currentRow.pages.length;c++){this._currentRow.pages[c].setTop(0);
this._currentRow.pages[c].setLeft(o);o+=this._currentRow.pages[c].getOuterWidth()}}}this.invalidatePixelPos()};
TxtBear.Viewport.prototype.invalidateLateralPos=function(){var c=this.getWidth(),g=this.getInnerWidth(),k=0;if(this._zoomMode=="flip")k=this._noSideBySide>1&&this._currentRow?this._currentRow.width:this._currentPage.getOuterWidth();else if(this._noSideBySide>1)for(var o=0;o<this._pageRows.length;o++)k=Math.max(k,this._pageRows[o].width);else for(o=0;o<this._pageViews.length;o++)k=Math.max(k,this._pageViews[o].getOuterWidth());k*=this._currentQuickZoom/100;k=k/g-1;k=Math.max(0,k);if(this._zoomMode==
"normal")if(this._hScrollPos<-k/2)this._hScrollPos=-k/2;else{if(this._hScrollPos>1+k/2)this._hScrollPos=1+k/2}else if(this._hScrollPos<0.5-k/2)this._hScrollPos=0.5-k/2;else if(this._hScrollPos>0.5+k/2)this._hScrollPos=0.5+k/2;o=this._stickyWidth/c;if(k==0&&Math.abs(this._hScrollPos-0.5)<o){k=0.5;this._stickyScroll=true}else{k=this._hScrollPos;this._stickyScroll=false}k=(k-0.5)/c*g+0.5;this._transform.set("left",Math.round(k*1E4)/100)};TxtBear.Viewport.prototype.getContainer=function(){return this._elContent};
TxtBear.Viewport.prototype.scrollBy=function(c,g){this.scrollHorizontalBy(c);this.scrollVerticalBy(g)};TxtBear.Viewport.prototype.scrollHorizontalBy=function(c){var g=this.getWidth();if(!(!g||isNaN(c)))if((this._zoomMode=="width"||this._zoomMode=="flip")&&this.getTotalZoom()<=100)this._transform.set("left",50);else if(!isNaN(c)){this._hScrollPos-=c/g;this.invalidateLateralPos()}};
TxtBear.Viewport.prototype.scrollVerticalBy=function(c){if(!isNaN(c)){var g=this._zoomMode=="flip";this.setLogicalPos(this.measureLogicalPos(-c),g);if(this._stickyScroll)if(g=this._el.height()){c=Math.min(1,Math.abs(5*c/g));this._hScrollPos=this._hScrollPos*(1-c)+0.5*c}}};
TxtBear.Viewport.prototype.pageStay=function(){console.log("Page Stay on "+this._currentPage.getNo());this.showPageAds();var c=document.location.pathname;c=c.substring(0,c.lastIndexOf("/")+1);TxtBear.trackPageview(c+"p"+this._currentPage.getNo()+".html")};
TxtBear.Viewport.prototype.getPageAvailableArea=function(c){c=c.getNo();var g=this._noSideBySide;if(c<=g-this._firstRowPageOffset)g-=this._firstRowPageOffset;var k=(this._document.getPageCount()+this._firstRowPageOffset)%this._noSideBySide;if(c>this._document.getPageCount()-k)g=k;if(g==0)g=1;c=this.getInnerWidth()/g;g=this.getHeight();return[c,g]};TxtBear.Viewport.prototype.showPageAds=function(){0>=Math.min(TxtBear.adFormat.width,TxtBear.adFormat.height)||this._currentPage.loadAds()};
TxtBear.Viewport.prototype.resetAds=function(){for(var c=0;c<this._pageViews.length;c++)this._pageViews[c].resetAds()};
TxtBear.Viewport.prototype.setupGrabAndScroll=function(){function c(s){o.scrollHorizontalBy(g-s.screenX);o.scrollVerticalBy(k-s.screenY);g=s.screenX;k=s.screenY;return false}var g,k,o=this;$("#"+this._id+" .tbPage").live("mousedown",function(s){if(!(o._zoomMode=="flip"&&o.getTotalZoom()==100)){g=s.screenX;k=s.screenY;var D=$(this);D.addClass("tbGrabbing");$(document).mousemove(c);$(document).one("mouseup",function(){$(document).unbind("mousemove",c);D.removeClass("tbGrabbing");return false});return false}},
this)};TxtBear.Viewport.prototype.setupDoubleclickZoom=function(){var c=this;$("#"+this._id+" .tbPage").live("dblclick",function(g){var k=g.pageX-c._el.position().left-c.getWidth()/2;g=g.pageY-c._el.position().top-c.getHeight()/2;c.getZoom()<c._zoomDefault*1.2?c.setZoom(c._zoomHigh,k,g):c.setZoom(c._zoomDefault,k,g)})};TxtBear.Viewport.prototype.getDocument=function(){return this._document};
TxtBear.Viewport.prototype.setZoom=function(c){if(this._zoomMode=="normal"){if(c<this._zoomMin)c=this._zoomMin}else if(c<100)c=100;if(c>this._zoomMax)c=this._zoomMax;var g=this.measureLogicalPos(),k=this.measureLateralPos();if(this._currentQuickZoom!=100){this._transform.set("scale",1);this._currentQuickZoom=100;this._quickZoomCorrY=0}this._currentZoom=c;$(this).trigger("zoomChanged");this.setLogicalPos(g);this.setLateralPos(k);this.invalidatePageViewPlacement();if(this._zoomMode=="flip")if(this.getTotalZoom()>
100)this._el.addClass("tbGrabbablePages");else{this._el.removeClass("tbGrabbablePages");this.setLateralPos(0)}};TxtBear.Viewport.prototype.getZoom=function(){return this._currentZoom};
TxtBear.Viewport.prototype.setQuickZoom=function(c){c=c/100*this._currentZoom;if(this._zoomMode=="normal"){if(c<this._zoomMin)c=this._zoomMin}else if(c<100)c=100;if(c>this._zoomMax)c=this._zoomMax;c=c/this._currentZoom*100;if(c!=this._currentQuickZoom){var g=this.measureLogicalPos();this.measureLateralPos();this._currentQuickZoom=c;this._transform.set("scale",this._currentQuickZoom/100);this.setLogicalPos(g,true)}};TxtBear.Viewport.prototype.getZoom=function(){return this._currentZoom};
TxtBear.Viewport.prototype.getQuickZoom=function(){return this._currentQuickZoom};TxtBear.Viewport.prototype.getTotalZoom=function(){return this._currentZoom*this._currentQuickZoom/100};TxtBear.Viewport.prototype.applyZoomCorrection=function(c,g,k){g=g?-g*(1-c):0;k=k?-k*(1-c):0;this.scrollBy(g,k)};TxtBear.Viewport.prototype.setZoomMode=function(c){if(this._zoomMode!=c){var g=this.getLogicalPos();this._zoomMode=c;$(this).trigger("zoomModeChanged");this.invalidatePageViews();this.setLogicalPos(g)}};
TxtBear.Viewport.prototype.getZoomMode=function(){return this._zoomMode};
TxtBear.Viewport.prototype.invalidateZoomMode=function(){this._el.removeClass("tbModeNormal").removeClass("tbModeWidth").removeClass("tbModeFlip").removeClass("tbGrabbablePages");this._hScrollPos=0.5;if(this._zoomMode=="flip"){this._el.addClass("tbModeFlip");this.setZoom(100);this._transform.set("left",50);this._scrollbar&&this._scrollbar.hide();this._flipButtons&&this._flipButtons.show()}else{this._el.addClass("tbGrabbablePages");this._transform.units.top="px";this._transform.set("left",50);this._transform.set("top",
0);this._scrollbar&&this._scrollbar.show();this._flipButtons&&this._flipButtons.hide();this.setZoom(100);this._zoomMode=="width"?this._el.addClass("tbModeWidth"):this._el.addClass("tbModeNormal")}};TxtBear.Viewport.prototype.forcePageLayoutUpdate=function(){this.updatePageZoom()};TxtBear.Viewport.prototype.invalidatePageCache=function(){pageSwitch()};TxtBear.Viewport.prototype.invalidateDocument=function(){this.invalidatePageViews();$(this).trigger("logicalSizeChanged")};
TxtBear.Viewport.prototype.handleMouseWheel=function(c,g){if(c)if(this._zoomMode=="flip"){var k=g.pageX-this._el.position().left-this.getWidth()/2,o=g.pageY-this._el.position().top-this.getHeight()/2;if(c>0)this.setZoom(this.getZoom()+20,k,o);else c<0&&this.setZoom(this.getZoom()-20,k,o)}else this.scrollVerticalBy(c*-70)};TxtBear.Viewport.prototype.getMinLogicalPos=function(){var c=0;try{c=this.getPageView(1).getOuterHeight()}catch(g){}return c?1+this._el.height()/2/c:1};
TxtBear.Viewport.prototype.getMaxLogicalPos=function(){return Math.floor((this._document.getPageCount()+this._firstRowPageOffset-1)/this._noSideBySide)+1+0.9999999};TxtBear.Viewport.prototype.getWidth=function(){return this._el.width()};TxtBear.Viewport.prototype.getHeight=function(){return this._el.height()};
TxtBear.Viewport.prototype.getInnerWidth=function(){var c=0;if(this._scrollbar&&this._scrollbar.visible())c+=this._scrollbar.getWidth();if(this._flipButtons&&this._flipButtons.visible())c+=this._flipButtons.getTotalWidth();return this.getWidth()-c};TxtBear.Viewport.prototype.setRowLayout=function(c,g){g||(g=0);g%=c;this._noSideBySide=c;this._firstRowPageOffset=g;this.invalidatePageViews();$(this).trigger("logicalSizeChanged")};
TxtBear.Viewport.prototype.handleError=function(c,g){this.showViewportDialog({content:'<h1 class="tbDialogTitle">Error</h1><p>'+g.message+"</p>"})};TxtBear.Viewport.prototype.showViewportDialog=function(c){this._elContent.hide();this._dialogEl=$("<div/>").addClass("tbDialog tbViewportDialog tbViewportDialogError").appendTo(this._el);c.el=this._dialogEl;this._dialog=new TxtBear.Dialog(c);this._dialog.show()};TxtBear.PanelManager=function(){var c=[];return{register:function(g){c.push(g)},get:function(){return c}}}();TxtBear.Panel={};TxtBear.Sidebar=TxtBear.Base.extend(function(c,g){this._container=c;this._el=$("<div/>").appendTo(c);this._viewer=g;this._lastPanel=this._currentPanel=null;this._el.addClass("tbSidebar");this._el.css("margin-left",-30-this._el.width()+"px")});TxtBear.Sidebar.prototype.getViewer=function(){return this._viewer};
TxtBear.Sidebar.prototype.openBar=function(){$(this).trigger("openStart");this._el.stop().animate({marginLeft:0},{step:$.proxy(function(){$(this).trigger("animStep")},this),complete:$.proxy(function(){$(this).trigger("openEnd")},this)})};
TxtBear.Sidebar.prototype.closeBar=function(){var c=this._currentPanel;$(this).trigger("closeStart");this._el.stop().animate({marginLeft:-this._el.width()-3},{step:$.proxy(function(){$(this).trigger("animStep")},this),complete:$.proxy(function(){this.closePanel(c);$(this).trigger("closeEnd")},this)})};TxtBear.Sidebar.prototype.closePanel=function(c){if(c){$(c).trigger("hide");c.getEl().hide();this._lastPanel=c;this._currentPanel=null}};
TxtBear.Sidebar.prototype.openPanel=function(c){this.closePanel(this._currentPanel);this.openBar();$(c).trigger("show");c.getEl().show();this._currentPanel=c};
TxtBear.Sidebar.prototype.setup=function(){var c=$(".tbTableOfContents");if(c.find("li").length>1){c.addClass("tbInfo");c.children("ul").wrap('<div class="tbPanel"></div>');c.prepend('<div class="tbHint">'+gettext("This is the <strong>Info</strong> sidebar. Currently this just shows the table of contents.")+"</div>");c.appendTo(e);TxtBear.Toolbar.addButton("tbInfo",{toggle:"custom",position:0,group:"tbSidebarButtonGroup",tooltip:gettext("Show document info sidebar"),handler:function(){this.toggle("tbInfo")}})}this._lastPanel=
"tbInfo";TxtBear.Util.setupMouseStates(this._el.find(c.find("li")));c.find("li").click(function(){var g=$(this).find("a").attr("href");g&&TxtBear.gotoPage(parseInt(g.substr(1,g.length-6))+1);(g=$(this).attr("title"))&&TxtBear.gotoPage(g);return false});this._el.children().hide();this._el.appendTo(document.body);this._el.css("margin-left",-this._el.width()-3)};TxtBear.Sidebar.prototype.toggle=function(c){c==this._currentPanel?this.closeBar():this.openPanel(c)};
TxtBear.Sidebar.prototype.open=function(c){if(c)this.openPanel(c);else this._currentPanel||this.openPanel(this._lastPanel)};TxtBear.Sidebar.prototype.close=function(){this.closeBar()};TxtBear.Sidebar.prototype.addPanel=function(c){c.getEl().appendTo(this._el).hide()};TxtBear.Sidebar.prototype.addSidebarToggle=function(){};TxtBear.Toolbar=TxtBear.Base.extend(function(c,g,k){this._container=c;this._el=$("<div/>").appendTo(c);this._viewport=g;this._tooltip=k;this._el.addClass("tbToolbar");this.addButton("-");this.addButton("tbPrev",$.proxy(function(){this._viewport.gotoPageOffset(-1)},this),gettext("Go to previous page"));var o=$('<div class="tbPage"><span class="tbCurrent">1</span><input class="tbPageEntry"/> / <span class="tbTotal">1</span></div>').appendTo(this._el),s=o.find(".tbPageEntry").hide();this._tooltip&&this._tooltip.addHover(o,
gettext("Click and enter any number to jump to that page"));this.addButton("tbNext",$.proxy(function(){this._viewport.gotoPageOffset(1)},this),gettext("Go to next page"));this.addButton("-");this.addButton("tbZoomOut",$.proxy(this.zoomOut,this),gettext("Zoom out"));$('<div class="tbZoom"><span class="tbCurrent">100</span> %</div>').appendTo(this._el);this.addButton("tbZoomIn",$.proxy(this.zoomIn,this),gettext("Zoom in"));this.addButton("tbZoomModeWidth",{group:"tbZoomModeGroup",toggle:"group",tooltip:gettext("Fit document by width"),
handler:$.proxy(function(){this._viewport.getZoomMode()!="width"?this._viewport.setZoomMode("width"):this._viewport.setZoomMode("normal")},this)});this.addButton("tbZoomModeFlip",{group:"tbZoomModeGroup",toggle:"group",tooltip:gettext("View document in flip-through mode"),handler:$.proxy(function(){this._viewport.getZoomMode()!="flip"?this._viewport.setZoomMode("flip"):this._viewport.setZoomMode("normal")},this)});this.addButton("-");$(document).trigger("tb:toolbarConstruct");$(this).trigger("construct");
o.click(function(){o.find(".tbCurrent").hide();s.val("").show().focus()});var D=function(){s.hide();o.find(".tbCurrent").show()},P=function(){var Q=parseInt(s.val());Q>0&&Q<=this._viewport.getDocument().getPageCount()&&this._viewport.gotoPage(Q);D()};s.blur($.proxy(P,this)).keypress($.proxy(function(Q){if(Q.which==0)D();else Q.which==13&&P.apply(this)},this));this.invalidatePageCountIndicator();$(this._viewport.getDocument()).bind("update",$.proxy(this.invalidatePageCountIndicator,this));$(this._viewport).bind("pageSwitch",
$.proxy(this.invalidatePageCurrentIndicator,this));$(this._viewport).bind("zoomChanged",$.proxy(this.invalidateZoomIndicator,this));(c=TxtBear.getSetting("toolbar_hide"))&&$.each(c,function(){this._el.find("."+this).hide()});TxtBear.capabilities.shadows&&$('<div class="tbToolbarShadow"><div class="tbLeft"></div><div class="tbCenter"></div><div class="tbRight"></div></div>').prependTo(this._container);$(document).trigger("tb:toolbarReady");$(this).trigger("ready")});
TxtBear.Toolbar.prototype.zoomIn=function(){this._viewport.setZoom(this._viewport.getZoom()+20)};TxtBear.Toolbar.prototype.zoomOut=function(){this._viewport.setZoom(this._viewport.getZoom()-20)};TxtBear.Toolbar.prototype.createElementAtPosition=function(c,g,k,o,s){s||(s="left");if(c.children().length==0)g.appendTo(c);else if("number"==typeof k){c=c.children().eq(k);g[o?o:"insertBefore"](c)}else g.insertAfter(c.children(":last"));s=="right"&&g.css("float","right")};
TxtBear.Toolbar.prototype.invalidatePageCountIndicator=function(){this._el&&this._el.find(".tbPage .tbTotal").text(this._viewport.getDocument().getPageCount())};TxtBear.Toolbar.prototype.invalidatePageCurrentIndicator=function(){this._el&&this._el.find(".tbPage .tbCurrent").text(this._viewport.getCurrentPageNo())};TxtBear.Toolbar.prototype.invalidateZoomIndicator=function(){this._el&&this._el.find(".tbZoom .tbCurrent").text(Math.round(this._viewport.getZoom()))};
TxtBear.Toolbar.prototype.addButton=function(c,g,k){if("function"==typeof g){g={handler:g};if(k&&"string"==typeof k)g.tooltip=k}else if("object"!=typeof g)g={};k=$("<div></div>");if(c=="-")k.addClass("tbSep");else{k.addClass("tbButton");k.addClass(c);var o=$("<div></div>");g.label&&o.text(g.label).addClass("tbLabel");o.appendTo(k);if(g.tooltip&&this._tooltip)this._tooltip.addHover(k,g.tooltip,c?c+"Tooltip":null)}g.handler&&k.click(g.handler);TxtBear.Util.setupMouseStates(k,g.toggle);this.addHtml(k,
g);return k};TxtBear.Toolbar.prototype.addHtml=function(c,g){var k=this._el;if("object"!=typeof g)g={};if(g.group){k=this._el.find("."+g.group);if(!k.length){k=$("<div></div>").addClass("tbGroup");this.createElementAtPosition(this._el,k,g.groupPosition,g.groupRelation);k.addClass(g.group)}k=k}if("string"==typeof c)c=$(c);this.createElementAtPosition(k,c,g.position,g.relation,g.align)};
TxtBear.Toolbar.prototype.invalidateZoomMode=function(){mode=this._viewport.getZoomMode();this._el.find(".tbZoomModeGroup div.tbButton").removeClass("tbActive");switch(mode){case "width":this._el.find(".tbZoom, .tbZoomIn, .tbZoomOut").hide();this._el.find(".tbZoomModeWidth").addClass("tbActive");break;case "flip":this._el.find(".tbZoom, .tbZoomIn, .tbZoomOut").hide();this._el.find(".tbZoomModeFlip").addClass("tbActive");break;default:this._el.find(".tbZoom, .tbZoomIn, .tbZoomOut").show()}this._viewport.setZoomMode(mode)};TxtBear.DefaultViewer=TxtBear.Base.extend(function(c,g){this._container=$(g);this._document=c;this._container.addClass("tbDefaultLayout");this._viewport=new TxtBear.Viewport(this._container,this._document);this._viewportEl=this._viewport.getEl();this._tooltip=new TxtBear.Tooltip(this._container);this._tooltipEl=this._tooltip.getEl();this._toolbar=new TxtBear.Toolbar(this._container,this._viewport,this._tooltip);this._toolbarEl=this._toolbar.getEl();this._sidebar=new TxtBear.Sidebar(this._container,
this);this._sidebarEl=this._sidebar.getEl();$(this._sidebar).bind("animStep openEnd closeEnd",$.proxy(this.invalidateLayout,this));for(var k=TxtBear.PanelManager.get(),o=0;o<k.length;o++)this.addPanel(k[o]);k=new $.Event("new");k.relatedTarget=this;TxtBear.DefaultViewer.trigger(k)});
TxtBear.DefaultViewer.prototype.invalidateLayout=function(){var c=TxtBear.adFormat.position=="outerleft"?TxtBear.adFormat.width:0,g=TxtBear.adFormat.position=="outerright"?TxtBear.adFormat.width:0,k=parseInt(this._toolbarEl.height()),o=this._sidebarEl.width(),s=parseInt(this._sidebarEl.css("margin-left"));s||(s=0);c+=Math.max(0,o+s);o=this._container.height()-k;this._tooltipEl.css("top",k+"px");this._viewportEl.width(this._container.width()-c-g);this._viewportEl.height(o);this._viewportEl.css("right",
g+"px");this._sidebarEl.height(o);this._viewport.invalidateSize()};TxtBear.DefaultViewer.prototype.getDocument=function(){return this._document};TxtBear.DefaultViewer.prototype.getViewport=function(){return this._viewport};TxtBear.DefaultViewer.prototype.getToolbar=function(){return this._toolbar};TxtBear.DefaultViewer.prototype.getTooltip=function(){return this._tooltip};TxtBear.DefaultViewer.prototype.handleMouseWheel=function(c,g){this._viewport.handleMouseWheel(c,g)};
TxtBear.DefaultViewer.prototype.addPanel=function(c){var g=new c.use(this);this._sidebar.addPanel(g);var k=this._sidebar,o=this._toolbar.addButton(c.cls,{toggle:"custom",group:"tbSidebarButtonGroup",groupPosition:0,tooltip:c.tooltip,label:c.label,position:-1,handler:function(){k.toggle(g)}});$(g).bind("show",function(){o.addClass("tbActive")});$(g).bind("hide",function(){o.removeClass("tbActive")})};TxtBear.Tooltip=TxtBear.Base.extend(function(c){this._container=c;this._el=$("<div/>").appendTo(c);this._el.addClass("tbToolbarTooltip");this._elWrapper=$('<div class="wrapper"></div>').hide().appendTo(this._el);this._elMessage=$('<div class="message"></div>').appendTo(this._elWrapper);this._elPerm=$('<div class="perm"></div>').hide().appendTo(this._elWrapper);this._elWrapper.mousedown(function(){return false})});TxtBear.Tooltip.prototype.moveWithMouse=function(){};
TxtBear.Tooltip.prototype.show=function(c,g){if("object"==typeof c){g=c.data&&c.data.cssClass?c.data.cssClass:null;c=c.data&&c.data.tooltip?c.data.tooltip:null}this._el[0].className="tbToolbarTooltip";g&&this._el.addClass(g);$(document).trigger("tb:Tooltip.show");$(this).trigger("shown");this._elWrapper.stop().fadeTo("fast",0.8);this._elMessage.show().text(c);this._elPerm.hide();$("body").bind("mousemove.tbTooltip",$.proxy(this.moveWithMouse,this))};
TxtBear.Tooltip.prototype.hide=function(){if(this._elPerm.is(":empty"))this._elWrapper.stop().fadeTo("fast",0);else{this._elPerm.show();this._elMessage.hide()}$("body").unbind("mousemove.tbTooltip")};
TxtBear.Tooltip.prototype.setPerm=function(c){this._elPerm.html(c);$('<a class="tbClose">\u00d7</a>').click($.proxy(function(){this.setPerm();return false},this)).prependTo(this._elPerm);if(c){this._elWrapper.stop().fadeTo("fast",0.8);this._elPerm.show();this._elMessage.hide()}else{this._elWrapper.stop().fadeTo("fast",0);this._elPerm.hide()}};
TxtBear.Tooltip.prototype.addHover=function(c,g,k){c=$(c);k||(k=false);c[0].tbTooltip=g;c.mouseenter({tooltip:g,cssClass:k},$.proxy(this.show,this));c.mouseleave($.proxy(this.hide,this))};TxtBear.Search=function(c){this._viewer=c;this._document=this._viewer.getDocument();this._viewport=this._viewer.getViewport();this._toolbar=this._viewer.getToolbar();this._tooltip=this._viewer.getTooltip();if(!this._document.searchIndex)this._document.searchIndex=null;$.proxy(this.doSearch,this);this._elSearchBox=$('<div class="tbSearchBoxWrapper"><input class="tbSearchBox" type="text" /></div>');this._toolbar.addHtml(this._elSearchBox);this._toolbar.addButton("tbSearch",$.proxy(this.doSearch,this),
gettext("Search this document"));this._elSearchBox.keydown($.proxy(function(g){g.which==13&&this.doSearch()},this));this._activeResult=0;this._currentQuery="";this._currentResults=null;$(this._viewport).bind("pageSwitch",$.proxy(this.refreshSearchHighlights,this))};TxtBear.Search.prototype.doSearch=function(){this.setQuery(this._elSearchBox.find(".tbSearchBox").val())};
TxtBear.Search.prototype.loadSearchIndex=function(c){var g=this._document;$.get("keywords.txt",function(k){data=k.split("\n");g.searchIndex={};$.each(data,function(){var o=this.split(";");g.searchIndex[o.shift()]=o});"function"==typeof c&&c()},"text")};TxtBear.Search.prototype.activateClosestResult=function(){for(var c=this._viewport.getCurrentPageNo(),g=0;g<this._currentResults.length;g++)if(this._currentResults[g][0]>=c){this.activateResult(g);break}};
TxtBear.Search.prototype.refreshSearchHighlights=function(){$(".tbSearchHighlight").remove();if(this._currentResults!==null)for(var c=0;c<this._currentResults.length;c++){var g=this._currentResults[c],k=this._viewport.getPageView(g[0]);if(k!=null){g[5]=$('<div class="tbSearchHighlight"></div>').appendTo(k.getEl().find(".tbPageImageWrapper")).css("left",g[1]+"%").css("top",g[2]+"%").width(g[3]+"%").height(g[4]+"%");this._activeResult==c&&g[5].addClass("tbSearchActiveResult")}}};
TxtBear.Search.prototype.refreshPermTooltip=function(){if(this._currentQuery){var c=parseInt(this._activeResult)+1,g='<span id="tbSearchTooltip">'+sprintf(gettext("Searching for %s: "),"<strong>"+this._currentQuery+"</strong>");if(this._currentResults.length){g+=sprintf(gettext("Showing result %d of %d "),c,this._currentResults.length);g+='<a class="tbPrev">\u25b2</a> <a class="tbNext">\u25bc</a></span>';g=$(g);g.find(".tbNext").click($.proxy(function(){this.nextResult();return false},this));g.find(".tbPrev").click($.proxy(function(){this.prevResult();
return false},this))}else g+=gettext("No results found")+"</span>";this._tooltip.setPerm(g)}else this._tooltip.setPerm("")};
TxtBear.Search.prototype.setQuery=function(c){if(!this._document.searchIndex)return this.loadSearchIndex($.proxy(function(){this.setQuery(c)},this));var g=c.split(" ");this._currentQuery=c;this._currentResults=[];var k=this;$.each(g,function(){var o=make_url_safe(this);if(o!="untitled")k._currentResults=k._currentResults.concat(k._document.searchIndex[o])});this._currentResults=$.map(this._currentResults,function(o){if("string"!=typeof o)return null;return[o.split(":")]});this._currentResults.sort(function(o,
s){return o[0]>s[0]?1:o[0]<s[0]?-1:parseFloat(o[2])>parseFloat(s[2])?1:parseFloat(o[2])<parseFloat(s[2])?-1:parseFloat(o[1])>parseFloat(s[1])?1:parseFloat(o[1])<parseFloat(s[1])?-1:0});this.activateClosestResult();this.refreshSearchHighlights();this.refreshPermTooltip()};
TxtBear.Search.prototype.activateResult=function(c){c=parseInt(c);var g=parseInt(this._currentResults[c][0]),k=parseFloat(this._currentResults[c][2])/100;this._viewport.setLogicalPos(g+k);this._currentResults[this._activeResult]&&this._currentResults[this._activeResult][5]&&this._currentResults[this._activeResult][5].removeClass("tbSearchActiveResult");this._activeResult=c;this._currentResults[c]&&this._currentResults[c][5]&&this._currentResults[c][5].addClass("tbSearchActiveResult");this.refreshPermTooltip()};
TxtBear.Search.prototype.nextResult=function(){this._activeResult+1>=this._currentResults.length?this.activateResult(0):this.activateResult(this._activeResult+1)};TxtBear.Search.prototype.prevResult=function(){this._activeResult-1<=-1?this.activateResult(this._currentResults.length-1):this.activateResult(this._activeResult-1)};TxtBear.Search.setup=function(c){new TxtBear.Search(c)};var viewerClass=TxtBear.DefaultViewer?TxtBear.DefaultViewer:TxtBear.TouchViewer;viewerClass.bind("new",function(c){TxtBear.Search.setup(c.relatedTarget)});TxtBear.Panel.Share=TxtBear.Base.extend(function(){this._el=$('<div class="tbShare"></div>');$(this).one("show",$.proxy(this.loadContent,this))});TxtBear.Panel.Share.topServices=[["facebook","Facebook","http://www.facebook.com/sharer.php?u=[url]&t=[title]",gettext("Post to your profile")],["twitter","Twitter","http://twitter.com/home?status=[url]",gettext("Tweet this document")]];TxtBear.Panel.Share.addServices=null;TxtBear.Panel.Share.addServicesLoading=false;
TxtBear.Panel.Share.prototype.getEl=function(){return this._el};TxtBear.Panel.Share.prototype.updateServiceBrowserList=function(){var c=this._el.find("#tbShareServiceBrowser .tbList"),g=this._el.find("#tbShareServiceBrowser input").val().toLowerCase();c.find(".tbService").each(function(){var k=$(this),o=k.text().toLowerCase().indexOf(g)!=-1;k[o?"show":"hide"]()})};
TxtBear.Panel.Share.prototype.loadContent=function(){var c,g=escape(window.location.href),k=escape(document.title);c='<div class="tbHint">'+gettext("This is the <strong>Share</strong> sidebar. Use this to share, promote or embed a document.")+"</div><h1>"+gettext("Share on the web")+'</h1><div class="tbPanel tbWebShare"><div>  <label for="tbShareInputUrl">'+gettext("URL")+'</label>  <input type="text" value="'+window.location.href+'"/></div><div class="tbShort" style="display:none">  <label for="tbShareInputShortUrl">'+
gettext("Short URL")+'</label>  <input type="text"/></div><div class="tbEmbedCode" style="display:none">  <label for="tbShareInputEmbed">'+gettext("Embed")+'</label>  <input type="text"/></div><p>'+gettext("Click to select, then copy&paste.")+'</p></div><h1>Share via...</h1><div class="tbPanel">';for(var o=0;o<this.__self.topServices.length;o++){var s=this.__self.topServices[o][2].replace("[url]",g).replace("[title]",k);c+='<div class="tbTopShare"><a href="'+s+'" target="_blank">  <img class="icon" src="http://static.txtbear.com/v/1.0/gx/share/'+
this.__self.topServices[o][0]+'.png"     alt="'+sprintf(gettext("Share to %s"),this.__self.topServices[o][1])+'"/>  <h4>'+this.__self.topServices[o][1]+"</h4>  <p>"+this.__self.topServices[o][3]+"</p></a></div>    "}c+='<div id="tbShareServiceBrowser"><input type="text" class="tbSearch tbInputHint" value="'+gettext("Filter Services")+'"/><div class="tbList">'+gettext("Loading...")+"</div></div></div>";$(c).appendTo(this._el);this._el.find("#tbShareServiceBrowser input").keyup($.proxy(this.updateServiceBrowserList,
this)).focus(function(){$(this).val("").removeClass("tbInputHint")});this._el.find(".tbWebShare input").bind("focus click mousedown",function(){this.select();return false}).end();this.loadServices();if(c=TxtBear.getSetting("id")){this._el.find(".tbShort").show().find("input").val("http://txt.li/"+TxtBear.Util.getShortId(c));$.getJSON("http://api.txtbear.com/book/embed.json?bid="+c+"&callback=?",$.proxy(function(D){this._el.find(".tbEmbedCode").show().find("input").val(D.code)},this))}$(window).resize($.proxy(this.updateListHeight,
this))};TxtBear.Panel.Share.prototype.loadServices=function(){if(null==this.__self.allServices){if(!this.__self.allServicesLoading){this.__self.allServicesLoading=true;$.getScript("http://static.txtbear.com/v/1.0/addthis.js")}TxtBear.Panel.Share.bind("servicesLoaded",$.proxy(this.fillServices,this))}else this.fillServices()};
TxtBear.Panel.Share.prototype.fillServices=function(){var c=this._el.find("#tbShareServiceBrowser .tbList");c.empty();for(var g in this.__self.allServices){var k='<div class="tbService"><a href="'+("http://api.addthis.com/oexchange/0.8/forward/"+g+"/offer?"+$.param({url:location.href,title:document.title,username:"eload24"}))+'" target="_blank">'+this.__self.allServices[g].n+"</a></div>";this.__self.allServices[g].i||(this.__self.allServices[g].i=0);$(k).css("background-position","0 -"+this.__self.allServices[g].i+
"px").hover(function(){$(this).addClass("tbHover")},function(){$(this).removeClass("tbHover")}).appendTo(c)}this.updateListHeight()};TxtBear.Panel.Share.prototype.updateListHeight=function(){var c=this._el.find("#tbShareServiceBrowser .tbList"),g=this._el.parent().height()-c.offset().top;c.height(g-g%21)};TxtBear.Panel.Share.parseServices=function(c){TxtBear.Panel.Share.allServices=c;TxtBear.Panel.Share.trigger("servicesLoaded")};
TxtBear.PanelManager.register({use:TxtBear.Panel.Share,cls:"tbShare",label:"Share",tooltip:gettext("Share this document via Facebook, Twitter, Email and more")});TxtBear.Sidebar.Download=function(){var c;return{setup:function(){var g='<div class="tbDownload"><div class="tbHint">'+gettext("This is the <strong>Download</strong> sidebar. Here you can download this document in various formats.")+"</div><h1>"+gettext("Download")+'</h1><div class="tbPanel">'+gettext("Download functionality coming soon.")+"<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/></div></div>";c=$(g);TxtBear.Sidebar.addPanel(c);TxtBear.Sidebar.addSidebarToggle("tbDownload")}}}();(function(){TxtBear.Interactive={};var c=TxtBear.Interactive.Area=TxtBear.Base.extend(function(g,k){this._pv=k;if("object"!==typeof g){console.error("TBIP: Invalid area definition with type "+typeof g);g=[0,0,0,0]}if(jQuery.isArray(g))g={left:g[0],top:g[1],width:g[2],height:g[3]};this._def=g});c.prototype.applyCss=function(g){g.css({position:"absolute",left:this._def.left+"%",top:this._def.top+"%",width:this._def.width+"%",height:this._def.height+"%"})};c.prototype.getPixelArea=function(){if(!this._pv){console.error("TBIP: Area cannot calculate pixel size without pageview.");
return{}}return{width:Math.round(this._pv._page.getWidth()*this._pv._zoomFactor*this._def.width/100),height:Math.round(this._pv._page.getHeight()*this._pv._zoomFactor*this._def.height/100)}};c.prototype.applyCssFit=function(g,k,o){var s=this.getPixelArea();o=s.width/s.height>k/o?s.width/k:s.height/o;console.log(s.width,k,o);g.css({"-ms-zoom":o,"-webkit-transform-origin":"left top","-webkit-transform":"scale("+o+")","-moz-transform-origin":"left top","-moz-transform":"scale("+o+")","-o-transform-origin":"left top",
"-o-transform":"scale("+o+")"})}})();(function(){var c=TxtBear.Interactive.Trigger=TxtBear.Base.extend(function(g,k,o){this._el=$("<div></div>");this._cfg=$.extend({},c.defaultConfig,g);this._pv=k;this._manager=o;if("undefined"===typeof this._cfg.once||null===this._cfg.once)this._cfg.once="object"===typeof this._cfg.click;this._el.addClass("tbiTrigger");if(this._cfg.area){this._area=new TxtBear.Interactive.Area(this._cfg.area);this._el.appendTo(k._el);this._area.applyCss(this._el);this._el.css({zIndex:5});this._cfg.once?this._el.one("click",
$.proxy(this.handleClick,this)):this._el.click($.proxy(this.handleClick,this));"object"===typeof this._cfg.css&&this._el.css(this._cfg.css)}else console.error("TBIP: Trigger component requires an area definition.")});c.defaultConfig={};c.prototype.handleClick=function(g){this._cfg.once&&this._el.remove();if("function"===typeof this._cfg.click){g.ipageview=this._pv;g.imanager=this._manager;g.itrigger=this;this._cfg.click(g)}else if("object"===typeof this._cfg.click){this._cfg.click.triggered=true;
this._manager.createElement(this._pv,this._cfg.click)}};c.prototype.getEl=function(){return this._el}})();(function(){var c=TxtBear.Interactive.Link=TxtBear.Base.extend(function(g,k,o){var s=this;this._el=$("<div></div>");this._cfg=$.extend({},c.defaultConfig,g);this._pv=k;this._manager=o;"string"!==typeof this._cfg.href?console.error("TBIP: Link component requires a URL."):this._manager.createElement(this._pv,{type:"trigger",area:this._cfg.area,click:function(){window.open(s._cfg.href,"_blank");newWindow.focus();return false}})});c.defaultConfig={}})();(function(){var c=0,g=TxtBear.Interactive.Video=TxtBear.Base.extend(function(k,o,s){this._el=$("<div></div>");this._cfg=$.extend({},g.defaultConfig,k);this._pv=o;this._manager=s;this._id="tbVideo"+ ++c;this._el.addClass("tbiVideo video-js-box");if(this._cfg.area){this._area=new TxtBear.Interactive.Area(this._cfg.area,o);this._el.appendTo(o._el);this._area.applyCss(this._el);this._el.css({zIndex:5});this.initEl();o.bind("resize",$.proxy(this.handleResize,this))}else console.error("TBIP: Video component requires an area definition.")});
g.defaultConfig={};g.prototype.initEl=function(){var k=this;if(this._cfg.triggered)this.play();else{var o={type:"trigger",area:this._cfg.area,once:true,click:function(){k.play()}};"object"===typeof this._cfg.trigger&&jQuery.extend(o,this._cfg.trigger);this._manager.createElement(this._pv,o)}};g.prototype.play=function(){if("object"!==typeof this._cfg.src)console.error("TBIP: Video component requires an source definition.");else{if("string"===typeof this._cfg.src.vidly){var k=this._cfg.src.vidly.replace("vid.ly",
"cf.cdn.vid.ly");this._cfg.src.mp4=k+"/mp4.mp4";this._cfg.src.webm=k+"/webm.webm";this._cfg.src.ogv=k+"/ogv.ogv"}var o=$("<video></video>");o.attr("id",this._id);o.attr("width","100%");o.attr("height","100%");o.attr("controls","controls");o.attr("preload","auto");o.attr("poster",this._cfg.poster);var s=$('<p class="vjs-no-video"></p>');s.html("<strong>Download Video:</strong>");$.each(this._cfg.src,function(P,Q){var I,L;switch(P){case "mp4":I='video/mp4; codecs="avc1.42E01E, mp4a.40.2"';L="MP4";break;
case "webm":I='video/webm; codecs="vp8, vorbis"';L="WebM";break;case "ogv":I='video/ogg; codecs="theora, vorbis"';L="Ogg";break;default:return}$("<source></source>").attr("src",Q).attr("type",I).appendTo(o);$("<a></a>").attr("href",Q).text(L).appendTo(s)});k="";if(this._cfg.poster)k+='<img src="'+this._cfg.poster+'" width="100%" height="100%" alt="Poster Image"title="No video playback capabilities." />';if(this._cfg.src.mp4){var D='<object id="'+this._id+'_fallback" class="vjs-flash-fallback" width="100%" height="100%" type="application/x-shockwave-flash"data="http://releases.flowplayer.org/swf/flowplayer-3.2.1.swf"><param name="movie" value="http://releases.flowplayer.org/swf/flowplayer-3.2.1.swf" /><param name="allowfullscreen" value="true" /><param name="flashvars" value=\'config={"playlist":[';
D+='{"url": "'+this._cfg.src.mp4+'","autoPlay":false,"autoBuffering":true}]}\' />';D+=k;D+="</object>";$(D).appendTo(o)}else k.length&&$(k).appendTo(o);o.appendTo(this._el);this._videoEl=o;this._player=VideoJS.setup(this._id);this._player.play()}};g.prototype.handleResize=function(){var k=this._area.getPixelArea();if(this._player){this._player.width(k.width);this._player.height(k.height);this._videoEl.attr({width:k.width,height:k.height});this._videoEl.css({width:k.width,height:k.height})}}})();(function(){var c=0,g=TxtBear.Interactive.Audio=TxtBear.Base.extend(function(k,o,s){this._el=$("<div></div>");this._cfg=$.extend({},g.defaultConfig,k);this._pv=o;this._manager=s;this._id="tbAudio"+ ++c;this._el.addClass("tbiAudio");if(this._cfg.area){this._area=new TxtBear.Interactive.Area(this._cfg.area);this._el.appendTo(o._el);this._area.applyCss(this._el);this._el.css({zIndex:5});this.init()}else console.error("TBIP: Audio component requires an area definition.")});g.defaultConfig={autoplay:false};
g.prototype.init=function(){var k=this;if(this._cfg.triggered)this.play();else{var o={type:"trigger",area:this._cfg.area,once:true,click:function(){k.play()}};"object"===typeof this._cfg.trigger&&jQuery.extend(o,this._cfg.trigger);this._manager.createElement(this._pv,o)}};g.prototype.play=function(){var k=$("<audio></audio>");k.attr("id",this._id);k.attr("controls","controls");k.attr("autoplay","autoplay");$.each(this._cfg.src,function(s,D){var P;switch(s){case "mp3":P="audio/mpeg";break;case "ogg":P=
"audio/ogg";break;default:return}$("<source></source>").attr("src",D).attr("type",P).appendTo(k)});if(this._cfg.src.mp3){var o='<object id="'+this._id+'_fallback" class="audio-flash-fallback" width="350" height="35" type="application/x-shockwave-flash"data="http://releases.flowplayer.org/swf/flowplayer-3.2.1.swf"><param name="movie" value="http://releases.flowplayer.org/swf/flowplayer-3.2.1.swf" /><param name="allowfullscreen" value="true" /><param name="flashvars" value=\'config={"playlist":["'+
this._cfg.src.mp3+'"],"plugins":{"controls":{"autoHide": false}}}\' />';o+="</object>";$(o).appendTo(k)}k.appendTo(this._el);k[0].play&&k[0].play()}})();(function(){var c=TxtBear.Interactive.Slideshow=TxtBear.Base.extend(function(g,k,o){this._el=$("<div></div>");this._cfg=$.extend({},c.defaultConfig,g);this._pv=k;this._manager=o;this._running=false;this._current=0;this._el.addClass("tbiSlideshow");if(this._cfg.area){this._area=new TxtBear.Interactive.Area(this._cfg.area);this._imageList=this._cfg.images;if("object"!==typeof this._imageList||this._imageList.length<1)console.error("TBIP: Slideshow component requires at least one image.");else{if(this._imageList.length===
1)this._imageList=[this._imageList[0],this._imageList[0]];this._el.appendTo(k._el);this._area.applyCss(this._el);this._el.css({zIndex:5});this.init();this._cfg.autoplay&&this.start()}}else console.error("TBIP: Slideshow component requires an area definition.")});c.defaultConfig={duration:4E3,speed:1E3,autoplay:true};c.prototype.init=function(){this._aEl=$("<img></img>").attr("src",this._imageList[0]).appendTo(this._el);this._bEl=$("<img></img>").attr("src",this._imageList[1]).appendTo(this._el);this._el.find("img").css({position:"absolute",
width:"100%",height:"100%"})};c.prototype.start=function(){function g(o){var s=k._imageList.length;if(!k._current||k._current>=s)k._current=0;k._bEl.css("opacity","0.01");o==s-1?k._bEl.attr("src",k._imageList[0]):k._bEl.attr("src",k._imageList[k._current+1]);k._bEl.animate({opacity:"0.01"},k._cfg.duration).animate({opacity:"1"},k._cfg.speed,function(){k._current++;var D=k._aEl;k._aEl=k._bEl;k._bEl=D;k._aEl.css("z-index",1);k._bEl.css("z-index",2);k._running&&g()})}var k=this;if(!k._running){k._running=
true;k._bEl.is(":animated")||g()}};c.prototype.stop=function(){this._running=false}})();(function(){var c=0,g=TxtBear.Interactive.Anim=TxtBear.Base.extend(function(k,o,s){this._el=$("<div></div>");this._cfg=$.extend({},g.defaultConfig,k);this._pv=o;this._manager=s;this._id="tbAnim"+ ++c;this._el.addClass("tbiAnim");this.scaling=false;if(this._cfg.area){this._area=new TxtBear.Interactive.Area(this._cfg.area,o);if("object"!==typeof this._cfg.src)console.error("TBIP: Anim component requires a src definition.");else{this._el.appendTo(this._cfg.onPage?o._elImg:o._el);this._area.applyCss(this._el);
this._el.css({zIndex:this._cfg.zIndex||5});this.initEl();o.bind("resize",$.proxy(this.handleResize,this))}}else console.error("TBIP: Anim component requires an area definition.")});g.defaultConfig={autoplay:false};g.prototype.initEl=function(){var k;k=this._cfg.flashVer||"7";if(this._cfg.src.swf&&swfobject.hasFlashPlayerVersion(k)){k=this._el;this._el.flash({swf:this._cfg.src.swf,width:"100%",height:"100%"})}else{this.scaling=true;k=$("<iframe></iframe>").attr("src",this._cfg.src.html5).css("width",
this._cfg.width).css("height",this._cfg.height).appendTo(this._el)}this._animEl=k};g.prototype.getArea=function(){return this._area};g.prototype.handleResize=function(){if("function"===typeof this._cfg.resize)this._cfg.resize.call(this,this._cfg,this._pv,this._manager);else this.scaling&&this.getArea().applyCssFit(this._el,this._cfg.width,this._cfg.height)}})();(function(){var c=TxtBear.Interactive.Custom=TxtBear.Base.extend(function(g,k,o){this._cfg=$.extend({},c.defaultConfig,g);this._pv=k;this._manager=o;if(this._cfg.area)this._area=new TxtBear.Interactive.Area(this._cfg.area,k);"function"===typeof this._cfg.init&&this._cfg.init.call(this,this._cfg,k,o);k.bind("resize",$.proxy(this.handleResize,this))});c.defaultConfig={};c.prototype.getArea=function(){return this._area};c.prototype.handleResize=function(){"function"===typeof this._cfg.resize&&this._cfg.resize.call(this,
this._cfg,this._pv,this._manager)}})();(function(){var c=TxtBear.Interactive.Manager=function(g){this._viewport=g};c.components={trigger:TxtBear.Interactive.Trigger,link:TxtBear.Interactive.Link,video:TxtBear.Interactive.Video,audio:TxtBear.Interactive.Audio,slideshow:TxtBear.Interactive.Slideshow,anim:TxtBear.Interactive.Anim,custom:TxtBear.Interactive.Custom};c.prototype.loadIpageInfo=function(g){TxtBear.Interactive.define=$.proxy(this.handleIpageLoad,this);$.getScript(g)};c.prototype.handleIpageLoad=function(g){var k=this;this.def=
g;if(!g.global)g.global={};if(!jQuery.isArray(g.global.css))g.global.css=[];if(!jQuery.isArray(g.global.js))g.global.js=[];g.global.modules&&this.expandDependencies(g);g.global.css=TxtBear.Util.arrayUnique(g.global.css);g.global.js=TxtBear.Util.arrayUnique(g.global.js);$.each(g.global.css,function(s,D){$("<link></link>").attr({rel:"stylesheet",type:"text/css",href:D}).appendTo($("head"))});var o=[];$.each(g.global.js,function(s,D){o.push($.ajax({type:"GET",url:D,dataType:"script",cache:true}))});
$.when(o).done(function(){k.handleIpageReady()})};c.prototype.expandDependencies=function(g){$.each(g.global.modules,function(k,o){var s=c.components[o];if(s&&s.deps){if(s.deps.css)g.global.css=g.global.css.concat(s.deps.css);if(s.deps.js)g.global.js=g.global.js.concat(s.deps.js)}})};c.prototype.handleIpageReady=function(){var g=this;this._viewport.bind("pvCreate",function(k){var o=k.pageView;o.bind("imageLoad",function(){g.handleImageLoad(o)})});$.each(this._viewport._pageViews,function(k,o){o._elImg?
g.handleImageLoad(o):o.bind("imageLoad",function(){g.handleImageLoad(o)})})};c.prototype.handleImageLoad=function(g){var k=this,o=this.def["p"+g._page._no];o&&$.each(o,function(s,D){k.createElement(g,D)})};c.prototype.createElement=function(g,k){if("object"===typeof k){var o=c.components[k.type];if(o)k.ignore||new o(k,g,this);else console.error('TBIP: Invalid component type: "'+k.type+'"')}};TxtBear.Viewport.bind("new",function(g){g=g.instance;g.getSetting("ipages")&&!g.getSetting("admin")&&(new c(g)).loadIpageInfo(g.getSetting("ipagesUrl"))})})();

