/*
 * jQuery JavaScript Library v1.3.2
 *
 * Copyright (c) 2009 John Resig, http://jquery.com/
 * 
 * Permission is hereby granted, free of charge, to any person obtaining
 * a copy of this software and associated documentation files (the
 * "Software"), to deal in the Software without restriction, including
 * without limitation the rights to use, copy, modify, merge, publish,
 * distribute, sublicense, and/or sell copies of the Software, and to
 * permit persons to whom the Software is furnished to do so, subject to
 * the following conditions:
 * 
 * The above copyright notice and this permission notice shall be
 * included in all copies or substantial portions of the Software.
 * 
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
 * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
 * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 *
 * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009)
 * Revision: 6246
 */
(function(){var D=this,g,l=D.jQuery,w=D.$,j=D.jQuery=D.$=function(E,F){return new j.fn.init(E,F)
},u=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,m=/^.[^:#\[\.,]*$/;
j.fn=j.prototype={init:function(G,E){G=G||document;
if(G.nodeType){this[0]=G;
this.length=1;
this.context=G;
return this
}if(typeof G==="string"){var I=u.exec(G);
if(I&&(I[1]||!E)){if(I[1]){G=j.clean([I[1]],E)
}else{var H=document.getElementById(I[3]);
if(H&&H.id!=I[3]){return j().find(G)
}var F=j(H||[]);
F.context=document;
F.selector=G;
return F
}}else{return j(E).find(G)
}}else{if(j.isFunction(G)){return j(document).ready(G)
}}if(G.selector&&G.context){this.selector=G.selector;
this.context=G.context
}return this.setArray(j.isArray(G)?G:j.makeArray(G))
},selector:"",jquery:"1.3.2",size:function(){return this.length
},get:function(E){return E===g?Array.prototype.slice.call(this):this[E]
},pushStack:function(G,H,F){var E=j(G);
E.prevObject=this;
E.context=this.context;
if(H==="find"){E.selector=this.selector+(this.selector?" ":"")+F
}else{if(H){E.selector=this.selector+"."+H+"("+F+")"
}}return E
},setArray:function(E){this.length=0;
Array.prototype.push.apply(this,E);
return this
},each:function(E,F){return j.each(this,E,F)
},index:function(E){return j.inArray(E&&E.jquery?E[0]:E,this)
},attr:function(H,E,F){var G=H;
if(typeof H==="string"){if(E===g){return this[0]&&j[F||"attr"](this[0],H)
}else{G={};
G[H]=E
}}return this.each(function(I){for(H in G){j.attr(F?this.style:this,H,j.prop(this,G[H],F,I,H))
}})
},css:function(E,F){if((E=="width"||E=="height")&&parseFloat(F)<0){F=g
}return this.attr(E,F,"curCSS")
},text:function(E){if(typeof E!=="object"&&E!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(E))
}var F="";
j.each(E||this,function(){j.each(this.childNodes,function(){if(this.nodeType!=8){F+=this.nodeType!=1?this.nodeValue:j.fn.text([this])
}})
});
return F
},wrapAll:function(E){if(this[0]){var F=j(E,this[0].ownerDocument).clone();
if(this[0].parentNode){F.insertBefore(this[0])
}F.map(function(){var G=this;
while(G.firstChild){G=G.firstChild
}return G
}).append(this)
}return this
},wrapInner:function(E){return this.each(function(){j(this).contents().wrapAll(E)
})
},wrap:function(E){return this.each(function(){j(this).wrapAll(E)
})
},append:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.appendChild(E)
}})
},prepend:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.insertBefore(E,this.firstChild)
}})
},before:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this)
})
},after:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this.nextSibling)
})
},end:function(){return this.prevObject||j([])
},push:[].push,sort:[].sort,splice:[].splice,find:function(E){if(this.length===1){var F=this.pushStack([],"find",E);
F.length=0;
j.find(E,this[0],F);
return F
}else{return this.pushStack(j.unique(j.map(this,function(G){return j.find(E,G)
})),"find",E)
}},clone:function(H){var G=this.map(function(){if(!j.support.noCloneEvent&&!j.isXMLDoc(this)){var I=this.outerHTML;
if(!I){var J=this.ownerDocument.createElement("div");
J.appendChild(this.cloneNode(true));
I=J.innerHTML
}return j.clean([I.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]
}else{return this.cloneNode(true)
}});
if(H===true){var E=this.find("*").andSelf(),F=0;
G.find("*").andSelf().each(function(){if(this.nodeName!==E[F].nodeName){return
}var K=j.data(E[F],"events");
for(var J in K){for(var I in K[J]){j.event.add(this,J,K[J][I],K[J][I].data)
}}F++
})
}return G
},filter:function(E){return this.pushStack(j.isFunction(E)&&j.grep(this,function(F,G){return E.call(F,G)
})||j.multiFilter(E,j.grep(this,function(F){return F.nodeType===1
})),"filter",E)
},closest:function(G){var F=j.expr.match.POS.test(G)?j(G):null,E=0;
return this.map(function(){var H=this;
while(H&&H.ownerDocument){if(F?F.index(H)>-1:j(H).is(G)){j.data(H,"closest",E);
return H
}H=H.parentNode;
E++
}})
},not:function(E){if(typeof E==="string"){if(m.test(E)){return this.pushStack(j.multiFilter(E,this,true),"not",E)
}else{E=j.multiFilter(E,this)
}}var F=E.length&&E[E.length-1]!==g&&!E.nodeType;
return this.filter(function(){return F?j.inArray(this,E)<0:this!=E
})
},add:function(E){return this.pushStack(j.unique(j.merge(this.get(),typeof E==="string"?j(E):j.makeArray(E))))
},is:function(E){return !!E&&j.multiFilter(E,this).length>0
},hasClass:function(E){return !!E&&this.is("."+E)
},val:function(E){if(E===g){var I=this[0];
if(I){if(j.nodeName(I,"option")){return(I.attributes.value||{}).specified?I.value:I.text
}if(j.nodeName(I,"select")){var K=I.selectedIndex,H=[],G=I.options,L=I.type=="select-one";
if(K<0){return null
}for(var F=L?K:0,M=L?K+1:G.length;
F<M;
F++){var J=G[F];
if(J.selected){E=j(J).val();
if(L){return E
}H.push(E)
}}return H
}return(I.value||"").replace(/\r/g,"")
}return g
}if(typeof E==="number"){E+=""
}return this.each(function(){if(this.nodeType!=1){return
}if(j.isArray(E)&&/radio|checkbox/.test(this.type)){this.checked=(j.inArray(this.value,E)>=0||j.inArray(this.name,E)>=0)
}else{if(j.nodeName(this,"select")){var N=j.makeArray(E);
j("option",this).each(function(){this.selected=(j.inArray(this.value,N)>=0||j.inArray(this.text,N)>=0)
});
if(!N.length){this.selectedIndex=-1
}}else{this.value=E
}}})
},html:function(E){return E===g?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(E)
},replaceWith:function(E){return this.after(E).remove()
},eq:function(E){return this.slice(E,+E+1)
},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))
},map:function(E){return this.pushStack(j.map(this,function(F,G){return E.call(F,G,F)
}))
},andSelf:function(){return this.add(this.prevObject)
},domManip:function(M,E,G){if(this[0]){var I=(this[0].ownerDocument||this[0]).createDocumentFragment(),L=j.clean(M,(this[0].ownerDocument||this[0]),I),J=I.firstChild;
if(J){for(var F=0,H=this.length;
F<H;
F++){G.call(K(this[F],J),this.length>1||F>0?I.cloneNode(true):I)
}}if(L){j.each(L,k)
}}return this;
function K(N,O){return E&&j.nodeName(N,"table")&&j.nodeName(O,"tr")?(N.getElementsByTagName("tbody")[0]||N.appendChild(N.ownerDocument.createElement("tbody"))):N
}}};
j.fn.init.prototype=j.fn;
function k(F,E){if(E.src){j.ajax({url:E.src,async:false,dataType:"script"})
}else{j.globalEval(E.text||E.textContent||E.innerHTML||"")
}if(E.parentNode){E.parentNode.removeChild(E)
}}function C(){return +new Date
}j.extend=j.fn.extend=function(){var I=arguments[0]||{},F=1,J=arguments.length,E=false,G;
if(typeof I==="boolean"){E=I;
I=arguments[1]||{};
F=2
}if(typeof I!=="object"&&!j.isFunction(I)){I={}
}if(J==F){I=this;
--F
}for(;
F<J;
F++){if((G=arguments[F])!=null){for(var H in G){var K=I[H],L=G[H];
if(I===L){continue
}if(E&&L&&typeof L==="object"&&!L.nodeType){I[H]=j.extend(E,K||(L.length!=null?[]:{}),L)
}else{if(L!==g){I[H]=L
}}}}}return I
};
var b=/z-?index|font-?weight|opacity|zoom|line-?height/i,o=document.defaultView||{},r=Object.prototype.toString;
j.extend({noConflict:function(E){D.$=w;
if(E){D.jQuery=l
}return j
},isFunction:function(E){return r.call(E)==="[object Function]"
},isArray:function(E){return r.call(E)==="[object Array]"
},isXMLDoc:function(E){return E.nodeType===9&&E.documentElement.nodeName!=="HTML"||!!E.ownerDocument&&j.isXMLDoc(E.ownerDocument)
},globalEval:function(F){if(F&&/\S/.test(F)){var E=document.getElementsByTagName("head")[0]||document.documentElement,G=document.createElement("script");
G.type="text/javascript";
if(j.support.scriptEval){G.appendChild(document.createTextNode(F))
}else{G.text=F
}E.insertBefore(G,E.firstChild);
E.removeChild(G)
}},nodeName:function(E,F){return E.nodeName&&E.nodeName.toUpperCase()==F.toUpperCase()
},each:function(H,G,K){var J,F=0,I=H.length;
if(K){if(I===g){for(J in H){if(G.apply(H[J],K)===false){break
}}}else{for(;
F<I;
){if(G.apply(H[F++],K)===false){break
}}}}else{if(I===g){for(J in H){if(G.call(H[J],J,H[J])===false){break
}}}else{for(var E=H[0];
F<I&&G.call(E,F,E)!==false;
E=H[++F]){}}}return H
},prop:function(H,E,G,F,I){if(j.isFunction(E)){E=E.call(H,F)
}return typeof E==="number"&&G=="curCSS"&&!b.test(I)?E+"px":E
},className:{add:function(E,F){j.each((F||"").split(/\s+/),function(H,G){if(E.nodeType==1&&!j.className.has(E.className,G)){E.className+=(E.className?" ":"")+G
}})
},remove:function(E,F){if(E.nodeType==1){E.className=F!==g?j.grep(E.className.split(/\s+/),function(G){return !j.className.has(F,G)
}).join(" "):""
}},has:function(E,F){return E&&j.inArray(F,(E.className||E).toString().split(/\s+/))>-1
}},swap:function(G,H,E){var I={};
for(var F in H){I[F]=G.style[F];
G.style[F]=H[F]
}E.call(G);
for(var F in H){G.style[F]=I[F]
}},css:function(E,L,F,I){if(L=="width"||L=="height"){var G,K={position:"absolute",visibility:"hidden",display:"block"},H=L=="width"?["Left","Right"]:["Top","Bottom"];
function J(){G=L=="width"?E.offsetWidth:E.offsetHeight;
if(I==="border"){return
}j.each(H,function(){if(!I){G-=parseFloat(j.curCSS(E,"padding"+this,true))||0
}if(I==="margin"){G+=parseFloat(j.curCSS(E,"margin"+this,true))||0
}else{G-=parseFloat(j.curCSS(E,"border"+this+"Width",true))||0
}})
}if(E.offsetWidth!==0){J()
}else{j.swap(E,K,J)
}return Math.max(0,Math.round(G))
}return j.curCSS(E,L,F)
},curCSS:function(F,M,G){var H,E=F.style;
if(M=="opacity"&&!j.support.opacity){H=j.attr(E,"opacity");
return H==""?"1":H
}if(M.match(/float/i)){M=n
}if(!G&&E&&E[M]){H=E[M]
}else{if(o.getComputedStyle){if(M.match(/float/i)){M="float"
}M=M.replace(/([A-Z])/g,"-$1").toLowerCase();
var K=o.getComputedStyle(F,null);
if(K){H=K.getPropertyValue(M)
}if(M=="opacity"&&H==""){H="1"
}}else{if(F.currentStyle){var I=M.replace(/\-(\w)/g,function(N,O){return O.toUpperCase()
});
H=F.currentStyle[M]||F.currentStyle[I];
if(!/^\d+(px)?$/i.test(H)&&/^\d/.test(H)){var J=E.left,L=F.runtimeStyle.left;
F.runtimeStyle.left=F.currentStyle.left;
E.left=H||0;
H=E.pixelLeft+"px";
E.left=J;
F.runtimeStyle.left=L
}}}}return H
},clean:function(K,G,L){G=G||document;
if(typeof G.createElement==="undefined"){G=G.ownerDocument||G[0]&&G[0].ownerDocument||document
}if(!L&&K.length===1&&typeof K[0]==="string"){var H=/^<(\w+)\s*\/?>$/.exec(K[0]);
if(H){return[G.createElement(H[1])]
}}var I=[],J=[],E=G.createElement("div");
j.each(K,function(P,O){if(typeof O==="number"){O+=""
}if(!O){return
}if(typeof O==="string"){O=O.replace(/(<(\w+)[^>]*?)\/>/g,function(U,V,T){return T.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?U:V+"></"+T+">"
});
var N=O.replace(/^\s+/,"").substring(0,10).toLowerCase();
var S=!N.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!N.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||N.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!N.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!N.indexOf("<td")||!N.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!N.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!j.support.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];
E.innerHTML=S[1]+O+S[2];
while(S[0]--){E=E.lastChild
}if(!j.support.tbody){var R=/<tbody/i.test(O),M=!N.indexOf("<table")&&!R?E.firstChild&&E.firstChild.childNodes:S[1]=="<table>"&&!R?E.childNodes:[];
for(var Q=M.length-1;
Q>=0;
--Q){if(j.nodeName(M[Q],"tbody")&&!M[Q].childNodes.length){M[Q].parentNode.removeChild(M[Q])
}}}if(!j.support.leadingWhitespace&&/^\s/.test(O)){E.insertBefore(G.createTextNode(O.match(/^\s*/)[0]),E.firstChild)
}O=j.makeArray(E.childNodes)
}if(O.nodeType){I.push(O)
}else{I=j.merge(I,O)
}});
if(L){for(var F=0;
I[F];
F++){if(j.nodeName(I[F],"script")&&(!I[F].type||I[F].type.toLowerCase()==="text/javascript")){J.push(I[F].parentNode?I[F].parentNode.removeChild(I[F]):I[F])
}else{if(I[F].nodeType===1){I.splice.apply(I,[F+1,0].concat(j.makeArray(I[F].getElementsByTagName("script"))))
}L.appendChild(I[F])
}}return J
}return I
},attr:function(F,J,E){if(!F||F.nodeType==3||F.nodeType==8){return g
}var L=!j.isXMLDoc(F),I=E!==g;
J=L&&j.props[J]||J;
if(F.tagName){var K=/href|src|style/.test(J);
if(J=="selected"&&F.parentNode){F.parentNode.selectedIndex
}if(J in F&&L&&!K){if(I){if(J=="type"&&j.nodeName(F,"input")&&F.parentNode){throw"type property can't be changed"
}F[J]=E
}if(j.nodeName(F,"form")&&F.getAttributeNode(J)){return F.getAttributeNode(J).nodeValue
}if(J=="tabIndex"){var G=F.getAttributeNode("tabIndex");
return G&&G.specified?G.value:F.nodeName.match(/(button|input|object|select|textarea)/i)?0:F.nodeName.match(/^(a|area)$/i)&&F.href?0:g
}return F[J]
}if(!j.support.style&&L&&J=="style"){return j.attr(F.style,"cssText",E)
}if(I){F.setAttribute(J,""+E)
}var H=!j.support.hrefNormalized&&L&&K?F.getAttribute(J,2):F.getAttribute(J);
return H===null?g:H
}if(!j.support.opacity&&J=="opacity"){if(I){F.zoom=1;
F.filter=(F.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(E)+""=="NaN"?"":"alpha(opacity="+E*100+")")
}return F.filter&&F.filter.indexOf("opacity=")>=0?(parseFloat(F.filter.match(/opacity=([^)]*)/)[1])/100)+"":""
}J=J.replace(/-([a-z])/ig,function(M,N){return N.toUpperCase()
});
if(I){F[J]=E
}return F[J]
},trim:function(E){return(E||"").replace(/^\s+|\s+$/g,"")
},makeArray:function(E){var G=[];
if(E!=null){var F=E.length;
if(F==null||typeof E==="string"||j.isFunction(E)||E.setInterval){G[0]=E
}else{while(F){G[--F]=E[F]
}}}return G
},inArray:function(H,E){for(var F=0,G=E.length;
F<G;
F++){if(E[F]===H){return F
}}return -1
},merge:function(G,F){var I=0,H,E=G.length;
if(!j.support.getAll){while((H=F[I++])!=null){if(H.nodeType!=8){G[E++]=H
}}}else{while((H=F[I++])!=null){G[E++]=H
}}return G
},unique:function(K){var H=[],G={};
try{for(var F=0,J=K.length;
F<J;
F++){var I=j.data(K[F]);
if(!G[I]){G[I]=true;
H.push(K[F])
}}}catch(E){H=K
}return H
},grep:function(I,F,J){var H=[];
for(var E=0,G=I.length;
E<G;
E++){if(!J!=!F(I[E],E)){H.push(I[E])
}}return H
},map:function(J,G){var I=[];
for(var F=0,H=J.length;
F<H;
F++){var E=G(J[F],F);
if(E!=null){I[I.length]=E
}}return I.concat.apply([],I)
}});
var s=navigator.userAgent.toLowerCase();
j.browser={version:(s.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],safari:/webkit/.test(s),opera:/opera/.test(s),msie:/msie/.test(s)&&!/opera/.test(s),mozilla:/mozilla/.test(s)&&!/(compatible|webkit)/.test(s)};
j.each({parent:function(E){return E.parentNode
},parents:function(E){return j.dir(E,"parentNode")
},next:function(E){return j.nth(E,2,"nextSibling")
},prev:function(E){return j.nth(E,2,"previousSibling")
},nextAll:function(E){return j.dir(E,"nextSibling")
},prevAll:function(E){return j.dir(E,"previousSibling")
},siblings:function(E){return j.sibling(E.parentNode.firstChild,E)
},children:function(E){return j.sibling(E.firstChild)
},contents:function(E){return j.nodeName(E,"iframe")?E.contentDocument||E.contentWindow.document:j.makeArray(E.childNodes)
}},function(F,E){j.fn[F]=function(G){var H=j.map(this,E);
if(G&&typeof G=="string"){H=j.multiFilter(G,H)
}return this.pushStack(j.unique(H),F,G)
}
});
j.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(E,F){j.fn[E]=function(G){var J=[],K=j(G);
for(var H=0,I=K.length;
H<I;
H++){var L=(H>0?this.clone(true):this).get();
j.fn[F].apply(j(K[H]),L);
J=J.concat(L)
}return this.pushStack(J,E,G)
}
});
j.each({removeAttr:function(E){j.attr(this,E,"");
if(this.nodeType==1){this.removeAttribute(E)
}},addClass:function(E){j.className.add(this,E)
},removeClass:function(E){j.className.remove(this,E)
},toggleClass:function(F,E){if(typeof E!=="boolean"){E=!j.className.has(this,F)
}j.className[E?"add":"remove"](this,F)
},remove:function(E){if(!E||j.filter(E,[this]).length){j("*",this).add([this]).each(function(){j.event.remove(this);
j.removeData(this)
});
if(this.parentNode){this.parentNode.removeChild(this)
}}},empty:function(){j(this).children().remove();
while(this.firstChild){this.removeChild(this.firstChild)
}}},function(F,E){j.fn[F]=function(){return this.each(E,arguments)
}
});
function h(E,F){return E[0]&&parseInt(j.curCSS(E[0],F,true),10)||0
}var q="jQuery"+C(),A=0,t={};
j.extend({cache:{},data:function(G,H,F){G=G==D?t:G;
var E=G[q];
if(!E){E=G[q]=++A
}if(H&&!j.cache[E]){j.cache[E]={}
}if(F!==g){j.cache[E][H]=F
}return H?j.cache[E][H]:E
},removeData:function(F,H){F=F==D?t:F;
var E=F[q];
if(H){if(j.cache[E]){delete j.cache[E][H];
H="";
for(H in j.cache[E]){break
}if(!H){j.removeData(F)
}}}else{try{delete F[q]
}catch(G){if(F.removeAttribute){F.removeAttribute(q)
}}delete j.cache[E]
}},queue:function(H,G,F){if(H){G=(G||"fx")+"queue";
var E=j.data(H,G);
if(!E||j.isArray(F)){E=j.data(H,G,j.makeArray(F))
}else{if(F){E.push(F)
}}}return E
},dequeue:function(G,F){var E=j.queue(G,F),H=E.shift();
if(!F||F==="fx"){H=E[0]
}if(H!==g){H.call(G)
}}});
j.fn.extend({data:function(H,E){var G=H.split(".");
G[1]=G[1]?"."+G[1]:"";
if(E===g){var F=this.triggerHandler("getData"+G[1]+"!",[G[0]]);
if(F===g&&this.length){F=j.data(this[0],H)
}return F===g&&G[1]?this.data(G[0]):F
}else{return this.trigger("setData"+G[1]+"!",[G[0],E]).each(function(){j.data(this,H,E)
})
}},removeData:function(E){return this.each(function(){j.removeData(this,E)
})
},queue:function(F,E){if(typeof F!=="string"){E=F;
F="fx"
}if(E===g){return j.queue(this[0],F)
}return this.each(function(){var G=j.queue(this,F,E);
if(F=="fx"&&G.length==1){G[0].call(this)
}})
},dequeue:function(E){return this.each(function(){j.dequeue(this,E)
})
}});
/*
 * Sizzle CSS Selector Engine - v0.9.3
 *  Copyright 2009, The Dojo Foundation
 *  More information: http://sizzlejs.com/
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 *
 */
(function(){var N=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,F=0,L=Object.prototype.toString;
var Q=function(ah,V,W,ae){W=W||[];
V=V||document;
if(V.nodeType!==1&&V.nodeType!==9){return[]
}if(!ah||typeof ah!=="string"){return W
}var Z=[],ad,ag,X,aa,U,ai,ac=true;
N.lastIndex=0;
while((ad=N.exec(ah))!==null){Z.push(ad[1]);
if(ad[2]){ai=RegExp.rightContext;
break
}}if(Z.length>1&&O.exec(ah)){if(Z.length===2&&M.relative[Z[0]]){ag=H(Z[0]+Z[1],V)
}else{ag=M.relative[Z[0]]?[V]:Q(Z.shift(),V);
while(Z.length){ah=Z.shift();
if(M.relative[ah]){ah+=Z.shift()
}ag=H(ah,ag)
}}}else{var af=ae?{expr:Z.pop(),set:S(ae)}:Q.find(Z.pop(),Z.length===1&&V.parentNode?V.parentNode:V,E(V));
ag=Q.filter(af.expr,af.set);
if(Z.length>0){X=S(ag)
}else{ac=false
}while(Z.length){var Y=Z.pop(),T=Y;
if(!M.relative[Y]){Y=""
}else{T=Z.pop()
}if(T==null){T=V
}M.relative[Y](X,T,E(V))
}}if(!X){X=ag
}if(!X){throw"Syntax error, unrecognized expression: "+(Y||ah)
}if(L.call(X)==="[object Array]"){if(!ac){W.push.apply(W,X)
}else{if(V.nodeType===1){for(var ab=0;
X[ab]!=null;
ab++){if(X[ab]&&(X[ab]===true||X[ab].nodeType===1&&K(V,X[ab]))){W.push(ag[ab])
}}}else{for(var ab=0;
X[ab]!=null;
ab++){if(X[ab]&&X[ab].nodeType===1){W.push(ag[ab])
}}}}}else{S(X,W)
}if(ai){Q(ai,V,W,ae);
if(R){hasDuplicate=false;
W.sort(R);
if(hasDuplicate){for(var ab=1;
ab<W.length;
ab++){if(W[ab]===W[ab-1]){W.splice(ab--,1)
}}}}}return W
};
Q.matches=function(T,U){return Q(T,null,null,U)
};
Q.find=function(Y,V,T){var Z,W;
if(!Y){return[]
}for(var U=0,X=M.order.length;
U<X;
U++){var ab=M.order[U],W;
if((W=M.match[ab].exec(Y))){var aa=RegExp.leftContext;
if(aa.substr(aa.length-1)!=="\\"){W[1]=(W[1]||"").replace(/\\/g,"");
Z=M.find[ab](W,V,T);
if(Z!=null){Y=Y.replace(M.match[ab],"");
break
}}}}if(!Z){Z=V.getElementsByTagName("*")
}return{set:Z,expr:Y}
};
Q.filter=function(ab,ai,V,ad){var af=ab,ae=[],ag=ai,X,Z,ac=ai&&ai[0]&&E(ai[0]);
while(ab&&ai.length){for(var Y in M.filter){if((X=M.match[Y].exec(ab))!=null){var U=M.filter[Y],W,ah;
Z=false;
if(ag==ae){ae=[]
}if(M.preFilter[Y]){X=M.preFilter[Y](X,ag,V,ae,ad,ac);
if(!X){Z=W=true
}else{if(X===true){continue
}}}if(X){for(var aa=0;
(ah=ag[aa])!=null;
aa++){if(ah){W=U(ah,X,aa,ag);
var T=ad^!!W;
if(V&&W!=null){if(T){Z=true
}else{ag[aa]=false
}}else{if(T){ae.push(ah);
Z=true
}}}}}if(W!==g){if(!V){ag=ae
}ab=ab.replace(M.match[Y],"");
if(!Z){return[]
}break
}}}if(ab==af){if(Z==null){throw"Syntax error, unrecognized expression: "+ab
}else{break
}}af=ab
}return ag
};
var M=Q.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(T){return T.getAttribute("href")
}},relative:{"+":function(ab,X,T){var U=typeof X==="string",Y=U&&!/\W/.test(X),Z=U&&!Y;
if(Y&&!T){X=X.toUpperCase()
}for(var V=0,W=ab.length,aa;
V<W;
V++){if((aa=ab[V])){while((aa=aa.previousSibling)&&aa.nodeType!==1){}ab[V]=Z||aa&&aa.nodeName===X?aa||false:aa===X
}}if(Z){Q.filter(X,ab,true)
}},">":function(aa,X,T){var Y=typeof X==="string";
if(Y&&!/\W/.test(X)){X=T?X:X.toUpperCase();
for(var U=0,W=aa.length;
U<W;
U++){var V=aa[U];
if(V){var Z=V.parentNode;
aa[U]=Z.nodeName===X?Z:false
}}}else{for(var U=0,W=aa.length;
U<W;
U++){var V=aa[U];
if(V){aa[U]=Y?V.parentNode:V.parentNode===X
}}if(Y){Q.filter(X,aa,true)
}}},"":function(Y,V,T){var X=F++,U=G;
if(!V.match(/\W/)){var W=V=T?V:V.toUpperCase();
U=J
}U("parentNode",V,X,Y,W,T)
},"~":function(Y,V,T){var X=F++,U=G;
if(typeof V==="string"&&!V.match(/\W/)){var W=V=T?V:V.toUpperCase();
U=J
}U("previousSibling",V,X,Y,W,T)
}},find:{ID:function(W,T,U){if(typeof T.getElementById!=="undefined"&&!U){var V=T.getElementById(W[1]);
return V?[V]:[]
}},NAME:function(W,V,T){if(typeof V.getElementsByName!=="undefined"){var Y=[],Z=V.getElementsByName(W[1]);
for(var U=0,X=Z.length;
U<X;
U++){if(Z[U].getAttribute("name")===W[1]){Y.push(Z[U])
}}return Y.length===0?null:Y
}},TAG:function(U,T){return T.getElementsByTagName(U[1])
}},preFilter:{CLASS:function(X,Y,W,aa,Z,T){X=" "+X[1].replace(/\\/g,"")+" ";
if(T){return X
}for(var U=0,V;
(V=Y[U])!=null;
U++){if(V){if(Z^(V.className&&(" "+V.className+" ").indexOf(X)>=0)){if(!W){aa.push(V)
}}else{if(W){Y[U]=false
}}}}return false
},ID:function(T){return T[1].replace(/\\/g,"")
},TAG:function(V,T){for(var U=0;
T[U]===false;
U++){}return T[U]&&E(T[U])?V[1]:V[1].toUpperCase()
},CHILD:function(U){if(U[1]=="nth"){var T=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(U[2]=="even"&&"2n"||U[2]=="odd"&&"2n+1"||!/\D/.test(U[2])&&"0n+"+U[2]||U[2]);
U[2]=(T[1]+(T[2]||1))-0;
U[3]=T[3]-0
}U[0]=F++;
return U
},ATTR:function(V,X,U,Z,Y,T){var W=V[1].replace(/\\/g,"");
if(!T&&M.attrMap[W]){V[1]=M.attrMap[W]
}if(V[2]==="~="){V[4]=" "+V[4]+" "
}return V
},PSEUDO:function(U,W,T,Y,X){if(U[1]==="not"){if(U[3].match(N).length>1||/^\w/.test(U[3])){U[3]=Q(U[3],null,null,W)
}else{var V=Q.filter(U[3],W,T,true^X);
if(!T){Y.push.apply(Y,V)
}return false
}}else{if(M.match.POS.test(U[0])||M.match.CHILD.test(U[0])){return true
}}return U
},POS:function(T){T.unshift(true);
return T
}},filters:{enabled:function(T){return T.disabled===false&&T.type!=="hidden"
},disabled:function(T){return T.disabled===true
},checked:function(T){return T.checked===true
},selected:function(T){T.parentNode.selectedIndex;
return T.selected===true
},parent:function(T){return !!T.firstChild
},empty:function(T){return !T.firstChild
},has:function(U,T,V){return !!Q(V[3],U).length
},header:function(T){return/h\d/i.test(T.nodeName)
},text:function(T){return"text"===T.type
},radio:function(T){return"radio"===T.type
},checkbox:function(T){return"checkbox"===T.type
},file:function(T){return"file"===T.type
},password:function(T){return"password"===T.type
},submit:function(T){return"submit"===T.type
},image:function(T){return"image"===T.type
},reset:function(T){return"reset"===T.type
},button:function(T){return"button"===T.type||T.nodeName.toUpperCase()==="BUTTON"
},input:function(T){return/input|select|textarea|button/i.test(T.nodeName)
}},setFilters:{first:function(T,U){return U===0
},last:function(V,U,W,T){return U===T.length-1
},even:function(T,U){return U%2===0
},odd:function(T,U){return U%2===1
},lt:function(U,T,V){return T<V[3]-0
},gt:function(U,T,V){return T>V[3]-0
},nth:function(U,T,V){return V[3]-0==T
},eq:function(U,T,V){return V[3]-0==T
}},filter:{PSEUDO:function(U,X,T,aa){var Z=X[1],W=M.filters[Z];
if(W){return W(U,T,X,aa)
}else{if(Z==="contains"){return(U.textContent||U.innerText||"").indexOf(X[3])>=0
}else{if(Z==="not"){var V=X[3];
for(var T=0,Y=V.length;
T<Y;
T++){if(V[T]===U){return false
}}return true
}}}},CHILD:function(U,W){var Y=W[1],ab=U;
switch(Y){case"only":case"first":while(ab=ab.previousSibling){if(ab.nodeType===1){return false
}}if(Y=="first"){return true
}ab=U;
case"last":while(ab=ab.nextSibling){if(ab.nodeType===1){return false
}}return true;
case"nth":var T=W[2],V=W[3];
if(T==1&&V==0){return true
}var aa=W[0],Z=U.parentNode;
if(Z&&(Z.sizcache!==aa||!U.nodeIndex)){var ac=0;
for(ab=Z.firstChild;
ab;
ab=ab.nextSibling){if(ab.nodeType===1){ab.nodeIndex=++ac
}}Z.sizcache=aa
}var X=U.nodeIndex-V;
if(T==0){return X==0
}else{return(X%T==0&&X/T>=0)
}}},ID:function(T,U){return T.nodeType===1&&T.getAttribute("id")===U
},TAG:function(T,U){return(U==="*"&&T.nodeType===1)||T.nodeName===U
},CLASS:function(T,U){return(" "+(T.className||T.getAttribute("class"))+" ").indexOf(U)>-1
},ATTR:function(U,V){var Y=V[1],Z=M.attrHandle[Y]?M.attrHandle[Y](U):U[Y]!=null?U[Y]:U.getAttribute(Y),T=Z+"",X=V[2],W=V[4];
return Z==null?X==="!=":X==="="?T===W:X==="*="?T.indexOf(W)>=0:X==="~="?(" "+T+" ").indexOf(W)>=0:!W?T&&Z!==false:X==="!="?T!=W:X==="^="?T.indexOf(W)===0:X==="$="?T.substr(T.length-W.length)===W:X==="|="?T===W||T.substr(0,W.length+1)===W+"-":false
},POS:function(U,W,T,Y){var X=W[2],V=M.setFilters[X];
if(V){return V(U,T,W,Y)
}}}};
var O=M.match.POS;
for(var I in M.match){M.match[I]=RegExp(M.match[I].source+/(?![^\[]*\])(?![^\(]*\))/.source)
}var S=function(U,T){U=Array.prototype.slice.call(U);
if(T){T.push.apply(T,U);
return T
}return U
};
try{Array.prototype.slice.call(document.documentElement.childNodes)
}catch(P){S=function(T,W){var X=W||[];
if(L.call(T)==="[object Array]"){Array.prototype.push.apply(X,T)
}else{if(typeof T.length==="number"){for(var U=0,V=T.length;
U<V;
U++){X.push(T[U])
}}else{for(var U=0;
T[U];
U++){X.push(T[U])
}}}return X
}
}var R;
if(document.documentElement.compareDocumentPosition){R=function(T,U){var V=T.compareDocumentPosition(U)&4?-1:T===U?0:1;
if(V===0){hasDuplicate=true
}return V
}
}else{if("sourceIndex" in document.documentElement){R=function(T,U){var V=T.sourceIndex-U.sourceIndex;
if(V===0){hasDuplicate=true
}return V
}
}else{if(document.createRange){R=function(U,V){var T=U.ownerDocument.createRange(),X=V.ownerDocument.createRange();
T.selectNode(U);
T.collapse(true);
X.selectNode(V);
X.collapse(true);
var W=T.compareBoundaryPoints(Range.START_TO_END,X);
if(W===0){hasDuplicate=true
}return W
}
}}}(function(){var T=document.createElement("form"),U="script"+(new Date).getTime();
T.innerHTML="<input name='"+U+"'/>";
var V=document.documentElement;
V.insertBefore(T,V.firstChild);
if(!!document.getElementById(U)){M.find.ID=function(Z,W,X){if(typeof W.getElementById!=="undefined"&&!X){var Y=W.getElementById(Z[1]);
return Y?Y.id===Z[1]||typeof Y.getAttributeNode!=="undefined"&&Y.getAttributeNode("id").nodeValue===Z[1]?[Y]:g:[]
}};
M.filter.ID=function(X,Y){var W=typeof X.getAttributeNode!=="undefined"&&X.getAttributeNode("id");
return X.nodeType===1&&W&&W.nodeValue===Y
}
}V.removeChild(T)
})();
(function(){var T=document.createElement("div");
T.appendChild(document.createComment(""));
if(T.getElementsByTagName("*").length>0){M.find.TAG=function(Y,U){var W=U.getElementsByTagName(Y[1]);
if(Y[1]==="*"){var V=[];
for(var X=0;
W[X];
X++){if(W[X].nodeType===1){V.push(W[X])
}}W=V
}return W
}
}T.innerHTML="<a href='#'></a>";
if(T.firstChild&&typeof T.firstChild.getAttribute!=="undefined"&&T.firstChild.getAttribute("href")!=="#"){M.attrHandle.href=function(U){return U.getAttribute("href",2)
}
}})();
if(document.querySelectorAll){(function(){var U=Q,T=document.createElement("div");
T.innerHTML="<p class='TEST'></p>";
if(T.querySelectorAll&&T.querySelectorAll(".TEST").length===0){return
}Q=function(X,V,W,Y){V=V||document;
if(!Y&&V.nodeType===9&&!E(V)){try{return S(V.querySelectorAll(X),W)
}catch(Z){}}return U(X,V,W,Y)
};
Q.find=U.find;
Q.filter=U.filter;
Q.selectors=U.selectors;
Q.matches=U.matches
})()
}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var T=document.createElement("div");
T.innerHTML="<div class='test e'></div><div class='test'></div>";
if(T.getElementsByClassName("e").length===0){return
}T.lastChild.className="e";
if(T.getElementsByClassName("e").length===1){return
}M.order.splice(1,0,"CLASS");
M.find.CLASS=function(W,U,V){if(typeof U.getElementsByClassName!=="undefined"&&!V){return U.getElementsByClassName(W[1])
}}
})()
}function J(ac,aa,Y,ad,ab,T){var U=ac=="previousSibling"&&!T;
for(var V=0,W=ad.length;
V<W;
V++){var Z=ad[V];
if(Z){if(U&&Z.nodeType===1){Z.sizcache=Y;
Z.sizset=V
}Z=Z[ac];
var X=false;
while(Z){if(Z.sizcache===Y){X=ad[Z.sizset];
break
}if(Z.nodeType===1&&!T){Z.sizcache=Y;
Z.sizset=V
}if(Z.nodeName===aa){X=Z;
break
}Z=Z[ac]
}ad[V]=X
}}}function G(ac,aa,Y,ad,ab,T){var U=ac=="previousSibling"&&!T;
for(var V=0,W=ad.length;
V<W;
V++){var Z=ad[V];
if(Z){if(U&&Z.nodeType===1){Z.sizcache=Y;
Z.sizset=V
}Z=Z[ac];
var X=false;
while(Z){if(Z.sizcache===Y){X=ad[Z.sizset];
break
}if(Z.nodeType===1){if(!T){Z.sizcache=Y;
Z.sizset=V
}if(typeof aa!=="string"){if(Z===aa){X=true;
break
}}else{if(Q.filter(aa,[Z]).length>0){X=Z;
break
}}}Z=Z[ac]
}ad[V]=X
}}}var K=document.compareDocumentPosition?function(T,U){return T.compareDocumentPosition(U)&16
}:function(T,U){return T!==U&&(T.contains?T.contains(U):true)
};
var E=function(T){return T.nodeType===9&&T.documentElement.nodeName!=="HTML"||!!T.ownerDocument&&E(T.ownerDocument)
};
var H=function(T,V){var Y=[],aa="",W,Z=V.nodeType?[V]:V;
while((W=M.match.PSEUDO.exec(T))){aa+=W[0];
T=T.replace(M.match.PSEUDO,"")
}T=M.relative[T]?T+"*":T;
for(var U=0,X=Z.length;
U<X;
U++){Q(T,Z[U],Y)
}return Q.filter(aa,Y)
};
j.find=Q;
j.filter=Q.filter;
j.expr=Q.selectors;
j.expr[":"]=j.expr.filters;
Q.selectors.filters.hidden=function(T){return T.offsetWidth===0||T.offsetHeight===0
};
Q.selectors.filters.visible=function(T){return T.offsetWidth>0||T.offsetHeight>0
};
Q.selectors.filters.animated=function(T){return j.grep(j.timers,function(U){return T===U.elem
}).length
};
j.multiFilter=function(T,V,U){if(U){T=":not("+T+")"
}return Q.matches(T,V)
};
j.dir=function(W,V){var T=[],U=W[V];
while(U&&U!=document){if(U.nodeType==1){T.push(U)
}U=U[V]
}return T
};
j.nth=function(T,U,V,W){U=U||1;
var X=0;
for(;
T;
T=T[V]){if(T.nodeType==1&&++X==U){break
}}return T
};
j.sibling=function(V,U){var T=[];
for(;
V;
V=V.nextSibling){if(V.nodeType==1&&V!=U){T.push(V)
}}return T
};
return;
D.Sizzle=Q
})();
j.event={add:function(F,I,H,E){if(F.nodeType==3||F.nodeType==8){return
}if(F.setInterval&&F!=D){F=D
}if(!H.guid){H.guid=this.guid++
}if(E!==g){var J=H;
H=this.proxy(J);
H.data=E
}var K=j.data(F,"events")||j.data(F,"events",{}),G=j.data(F,"handle")||j.data(F,"handle",function(){return typeof j!=="undefined"&&!j.event.triggered?j.event.handle.apply(arguments.callee.elem,arguments):g
});
G.elem=F;
j.each(I.split(/\s+/),function(L,M){var N=M.split(".");
M=N.shift();
H.type=N.slice().sort().join(".");
var O=K[M];
if(j.event.specialAll[M]){j.event.specialAll[M].setup.call(F,E,N)
}if(!O){O=K[M]={};
if(!j.event.special[M]||j.event.special[M].setup.call(F,E,N)===false){if(F.addEventListener){F.addEventListener(M,G,false)
}else{if(F.attachEvent){F.attachEvent("on"+M,G)
}}}}O[H.guid]=H;
j.event.global[M]=true
});
F=null
},guid:1,global:{},remove:function(E,J,K){if(E.nodeType==3||E.nodeType==8){return
}var L=j.data(E,"events"),H,G;
if(L){if(J===g||(typeof J==="string"&&J.charAt(0)==".")){for(var I in L){this.remove(E,I+(J||""))
}}else{if(J.type){K=J.handler;
J=J.type
}j.each(J.split(/\s+/),function(M,N){var O=N.split(".");
N=O.shift();
var Q=RegExp("(^|\\.)"+O.slice().sort().join(".*\\.")+"(\\.|$)");
if(L[N]){if(K){delete L[N][K.guid]
}else{for(var P in L[N]){if(Q.test(L[N][P].type)){delete L[N][P]
}}}if(j.event.specialAll[N]){j.event.specialAll[N].teardown.call(E,O)
}for(H in L[N]){break
}if(!H){if(!j.event.special[N]||j.event.special[N].teardown.call(E,O)===false){if(E.removeEventListener){E.removeEventListener(N,j.data(E,"handle"),false)
}else{if(E.detachEvent){E.detachEvent("on"+N,j.data(E,"handle"))
}}}H=null;
delete L[N]
}}})
}for(H in L){break
}if(!H){var F=j.data(E,"handle");
if(F){F.elem=null
}j.removeData(E,"events");
j.removeData(E,"handle")
}}},trigger:function(K,E,F,I){var J=K.type||K;
if(!I){K=typeof K==="object"?K[q]?K:j.extend(j.Event(J),K):j.Event(J);
if(J.indexOf("!")>=0){K.type=J=J.slice(0,-1);
K.exclusive=true
}if(!F){K.stopPropagation();
if(this.global[J]){j.each(j.cache,function(){if(this.events&&this.events[J]){j.event.trigger(K,E,this.handle.elem)
}})
}}if(!F||F.nodeType==3||F.nodeType==8){return g
}K.result=g;
K.target=F;
E=j.makeArray(E);
E.unshift(K)
}K.currentTarget=F;
var H=j.data(F,"handle");
if(H){H.apply(F,E)
}if((!F[J]||(j.nodeName(F,"a")&&J=="click"))&&F["on"+J]&&F["on"+J].apply(F,E)===false){K.result=false
}if(!I&&F[J]&&!K.isDefaultPrevented()&&!(j.nodeName(F,"a")&&J=="click")){this.triggered=true;
try{F[J]()
}catch(L){}}this.triggered=false;
if(!K.isPropagationStopped()){var G=F.parentNode||F.ownerDocument;
if(G){j.event.trigger(K,E,G,true)
}}},handle:function(J){var K,F;
J=arguments[0]=j.event.fix(J||D.event);
J.currentTarget=this;
var E=J.type.split(".");
J.type=E.shift();
K=!E.length&&!J.exclusive;
var I=RegExp("(^|\\.)"+E.slice().sort().join(".*\\.")+"(\\.|$)");
F=(j.data(this,"events")||{})[J.type];
for(var G in F){var H=F[G];
if(K||I.test(H.type)){J.handler=H;
J.data=H.data;
var L=H.apply(this,arguments);
if(L!==g){J.result=L;
if(L===false){J.preventDefault();
J.stopPropagation()
}}if(J.isImmediatePropagationStopped()){break
}}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(I){if(I[q]){return I
}var E=I;
I=j.Event(E);
for(var F=this.props.length,H;
F;
){H=this.props[--F];
I[H]=E[H]
}if(!I.target){I.target=I.srcElement||document
}if(I.target.nodeType==3){I.target=I.target.parentNode
}if(!I.relatedTarget&&I.fromElement){I.relatedTarget=I.fromElement==I.target?I.toElement:I.fromElement
}if(I.pageX==null&&I.clientX!=null){var J=document.documentElement,G=document.body;
I.pageX=I.clientX+(J&&J.scrollLeft||G&&G.scrollLeft||0)-(J.clientLeft||0);
I.pageY=I.clientY+(J&&J.scrollTop||G&&G.scrollTop||0)-(J.clientTop||0)
}if(!I.which&&((I.charCode||I.charCode===0)?I.charCode:I.keyCode)){I.which=I.charCode||I.keyCode
}if(!I.metaKey&&I.ctrlKey){I.metaKey=I.ctrlKey
}if(!I.which&&I.button){I.which=(I.button&1?1:(I.button&2?3:(I.button&4?2:0)))
}return I
},proxy:function(F,E){E=E||function(){return F.apply(this,arguments)
};
E.guid=F.guid=F.guid||E.guid||this.guid++;
return E
},special:{ready:{setup:p,teardown:function(){}}},specialAll:{live:{setup:function(E,F){j.event.add(this,F[0],a)
},teardown:function(E){if(E.length){var F=0,G=RegExp("(^|\\.)"+E[0]+"(\\.|$)");
j.each((j.data(this,"events").live||{}),function(){if(G.test(this.type)){F++
}});
if(F<1){j.event.remove(this,E[0],a)
}}}}}};
j.Event=function(E){if(!this.preventDefault){return new j.Event(E)
}if(E&&E.type){this.originalEvent=E;
this.type=E.type
}else{this.type=E
}this.timeStamp=C();
this[q]=true
};
function c(){return false
}function d(){return true
}j.Event.prototype={preventDefault:function(){this.isDefaultPrevented=d;
var E=this.originalEvent;
if(!E){return
}if(E.preventDefault){E.preventDefault()
}E.returnValue=false
},stopPropagation:function(){this.isPropagationStopped=d;
var E=this.originalEvent;
if(!E){return
}if(E.stopPropagation){E.stopPropagation()
}E.cancelBubble=true
},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=d;
this.stopPropagation()
},isDefaultPrevented:c,isPropagationStopped:c,isImmediatePropagationStopped:c};
var i=function(F){var E=F.relatedTarget;
while(E&&E!=this){try{E=E.parentNode
}catch(G){E=this
}}if(E!=this){F.type=F.data;
j.event.handle.apply(this,arguments)
}};
j.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(F,E){j.event.special[E]={setup:function(){j.event.add(this,F,i,E)
},teardown:function(){j.event.remove(this,F,i)
}}
});
j.fn.extend({bind:function(G,E,F){return G=="unload"?this.one(G,E,F):this.each(function(){j.event.add(this,G,F||E,F&&E)
})
},one:function(G,E,F){var H=j.event.proxy(F||E,function(I){j(this).unbind(I,H);
return(F||E).apply(this,arguments)
});
return this.each(function(){j.event.add(this,G,H,F&&E)
})
},unbind:function(F,E){return this.each(function(){j.event.remove(this,F,E)
})
},trigger:function(F,E){return this.each(function(){j.event.trigger(F,E,this)
})
},triggerHandler:function(F,E){if(this[0]){var G=j.Event(F);
G.preventDefault();
G.stopPropagation();
j.event.trigger(G,E,this[0]);
return G.result
}},toggle:function(F){var G=arguments,E=1;
while(E<G.length){j.event.proxy(F,G[E++])
}return this.click(j.event.proxy(F,function(H){this.lastToggle=(this.lastToggle||0)%E;
H.preventDefault();
return G[this.lastToggle++].apply(this,arguments)||false
}))
},hover:function(E,F){return this.mouseenter(E).mouseleave(F)
},ready:function(E){p();
if(j.isReady){E.call(document,j)
}else{j.readyList.push(E)
}return this
},live:function(G,F){var E=j.event.proxy(F);
E.guid+=this.selector+G;
j(document).bind(v(G,this.selector),this.selector,E);
return this
},die:function(F,E){j(document).unbind(v(F,this.selector),E?{guid:E.guid+this.selector+F}:null);
return this
}});
function a(G){var E=RegExp("(^|\\.)"+G.type+"(\\.|$)"),F=true,H=[];
j.each(j.data(this,"events").live||[],function(I,J){if(E.test(J.type)){var K=j(G.target).closest(J.data)[0];
if(K){H.push({elem:K,fn:J})
}}});
H.sort(function(I,J){return j.data(I.elem,"closest")-j.data(J.elem,"closest")
});
j.each(H,function(){if(this.fn.call(this.elem,G,this.fn.data)===false){return(F=false)
}});
return F
}function v(F,E){return["live",F,E.replace(/\./g,"`").replace(/ /g,"|")].join(".")
}j.extend({isReady:false,readyList:[],ready:function(){if(!j.isReady){j.isReady=true;
if(j.readyList){j.each(j.readyList,function(){this.call(document,j)
});
j.readyList=null
}j(document).triggerHandler("ready")
}}});
var z=false;
function p(){if(z){return
}z=true;
if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false);
j.ready()
},false)
}else{if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);
j.ready()
}});
if(document.documentElement.doScroll&&D==D.top){(function(){if(j.isReady){return
}try{document.documentElement.doScroll("left")
}catch(E){setTimeout(arguments.callee,0);
return
}j.ready()
})()
}}}j.event.add(D,"load",j.ready)
}j.each(("blur,focus,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave,change,select,submit,keydown,keypress,keyup,error").split(","),function(F,E){j.fn[E]=function(G){return G?this.bind(E,G):this.trigger(E)
}
});
j(D).bind("unload",function(){for(var E in j.cache){if(E!=1&&j.cache[E].handle){j.event.remove(j.cache[E].handle.elem)
}}});
(function(){j.support={};
var H=document.documentElement,E=document.createElement("script"),F=document.createElement("div"),G="script"+(new Date).getTime();
F.style.display="none";
F.innerHTML='   <link/><table></table><a href="/a" style="color:red;float:left;opacity:.5;">a</a><select><option>text</option></select><object><param/></object>';
var J=F.getElementsByTagName("*"),I=F.getElementsByTagName("a")[0];
if(!J||!J.length||!I){return
}j.support={leadingWhitespace:F.firstChild.nodeType==3,tbody:!F.getElementsByTagName("tbody").length,objectAll:!!F.getElementsByTagName("object")[0].getElementsByTagName("*").length,htmlSerialize:!!F.getElementsByTagName("link").length,style:/red/.test(I.getAttribute("style")),hrefNormalized:I.getAttribute("href")==="/a",opacity:I.style.opacity==="0.5",cssFloat:!!I.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};
E.type="text/javascript";
try{E.appendChild(document.createTextNode("window."+G+"=1;"))
}catch(K){}H.insertBefore(E,H.firstChild);
if(D[G]){j.support.scriptEval=true;
delete D[G]
}H.removeChild(E);
if(F.attachEvent&&F.fireEvent){F.attachEvent("onclick",function(){j.support.noCloneEvent=false;
F.detachEvent("onclick",arguments.callee)
});
F.cloneNode(true).fireEvent("onclick")
}j(function(){var L=document.createElement("div");
L.style.width=L.style.paddingLeft="1px";
document.body.appendChild(L);
j.boxModel=j.support.boxModel=L.offsetWidth===2;
document.body.removeChild(L).style.display="none"
})
})();
var n=j.support.cssFloat?"cssFloat":"styleFloat";
j.props={"for":"htmlFor","class":"className","float":n,cssFloat:n,styleFloat:n,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",tabindex:"tabIndex"};
j.fn.extend({_load:j.fn.load,load:function(I,G,H){if(typeof I!=="string"){return this._load(I)
}var E=I.indexOf(" ");
if(E>=0){var F=I.slice(E,I.length);
I=I.slice(0,E)
}var J="GET";
if(G){if(j.isFunction(G)){H=G;
G=null
}else{if(typeof G==="object"){G=j.param(G);
J="POST"
}}}var K=this;
j.ajax({url:I,type:J,dataType:"html",data:G,complete:function(L,M){if(M=="success"||M=="notmodified"){K.html(F?j("<div/>").append(L.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(F):L.responseText)
}if(H){K.each(H,[L.responseText,M,L])
}}});
return this
},serialize:function(){return j.param(this.serializeArray())
},serializeArray:function(){return this.map(function(){return this.elements?j.makeArray(this.elements):this
}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|search/i.test(this.type))
}).map(function(E,G){var F=j(this).val();
return F==null?null:j.isArray(F)?j.map(F,function(H,I){return{name:G.name,value:H}
}):{name:G.name,value:F}
}).get()
}});
j.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(E,F){j.fn[F]=function(G){return this.bind(F,G)
}
});
var e=C();
j.extend({get:function(E,F,H,G){if(j.isFunction(F)){H=F;
F=null
}return j.ajax({type:"GET",url:E,data:F,success:H,dataType:G})
},getScript:function(F,E){return j.get(F,null,E,"script")
},getJSON:function(E,F,G){return j.get(E,F,G,"json")
},post:function(E,F,H,G){if(j.isFunction(F)){H=F;
F={}
}return j.ajax({type:"POST",url:E,data:F,success:H,dataType:G})
},ajaxSetup:function(E){j.extend(j.ajaxSettings,E)
},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return D.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()
},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(K){K=j.extend(true,K,j.extend(true,{},j.ajaxSettings,K));
var G,I=/=\?(&|$)/g,V,S,L=K.type.toUpperCase();
if(K.data&&K.processData&&typeof K.data!=="string"){K.data=j.param(K.data)
}if(K.dataType=="jsonp"){if(L=="GET"){if(!K.url.match(I)){K.url+=(K.url.match(/\?/)?"&":"?")+(K.jsonp||"callback")+"=?"
}}else{if(!K.data||!K.data.match(I)){K.data=(K.data?K.data+"&":"")+(K.jsonp||"callback")+"=?"
}}K.dataType="json"
}if(K.dataType=="json"&&(K.data&&K.data.match(I)||K.url.match(I))){G="jsonp"+e++;
if(K.data){K.data=(K.data+"").replace(I,"="+G+"$1")
}K.url=K.url.replace(I,"="+G+"$1");
K.dataType="script";
D[G]=function(X){S=X;
N();
F();
D[G]=g;
try{delete D[G]
}catch(Y){}if(Q){Q.removeChild(P)
}}
}if(K.dataType=="script"&&K.cache==null){K.cache=false
}if(K.cache===false&&L=="GET"){var M=C();
var T=K.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+M+"$2");
K.url=T+((T==K.url)?(K.url.match(/\?/)?"&":"?")+"_="+M:"")
}if(K.data&&L=="GET"){K.url+=(K.url.match(/\?/)?"&":"?")+K.data;
K.data=null
}if(K.global&&!j.active++){j.event.trigger("ajaxStart")
}var J=/^(\w+:)?\/\/([^\/?#]+)/.exec(K.url);
if(K.dataType=="script"&&L=="GET"&&J&&(J[1]&&J[1]!=location.protocol||J[2]!=location.host)){var Q=document.getElementsByTagName("head")[0];
var P=document.createElement("script");
P.src=K.url;
if(K.scriptCharset){P.charset=K.scriptCharset
}if(!G){var H=false;
P.onload=P.onreadystatechange=function(){if(!H&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){H=true;
N();
F();
P.onload=P.onreadystatechange=null;
Q.removeChild(P)
}}
}Q.appendChild(P);
return g
}var R=false;
var W=K.xhr();
if(K.username){W.open(L,K.url,K.async,K.username,K.password)
}else{W.open(L,K.url,K.async)
}try{if(K.data){W.setRequestHeader("Content-Type",K.contentType)
}if(K.ifModified){W.setRequestHeader("If-Modified-Since",j.lastModified[K.url]||"Thu, 01 Jan 1970 00:00:00 GMT")
}W.setRequestHeader("X-Requested-With","XMLHttpRequest");
W.setRequestHeader("Accept",K.dataType&&K.accepts[K.dataType]?K.accepts[K.dataType]+", */*":K.accepts._default)
}catch(U){}if(K.beforeSend&&K.beforeSend(W,K)===false){if(K.global&&!--j.active){j.event.trigger("ajaxStop")
}W.abort();
return false
}if(K.global){j.event.trigger("ajaxSend",[W,K])
}var O=function(X){if(W.readyState==0){if(E){clearInterval(E);
E=null;
if(K.global&&!--j.active){j.event.trigger("ajaxStop")
}}}else{if(!R&&W&&(W.readyState==4||X=="timeout")){R=true;
if(E){clearInterval(E);
E=null
}V=X=="timeout"?"timeout":!j.httpSuccess(W)?"error":K.ifModified&&j.httpNotModified(W,K.url)?"notmodified":"success";
if(V=="success"){try{S=j.httpData(W,K.dataType,K)
}catch(Z){V="parsererror"
}}if(V=="success"){var Y;
try{Y=W.getResponseHeader("Last-Modified")
}catch(Z){}if(K.ifModified&&Y){j.lastModified[K.url]=Y
}if(!G){N()
}}else{j.handleError(K,W,V)
}F();
if(X){W.abort()
}if(K.async){W=null
}}}};
if(K.async){var E=setInterval(O,13);
if(K.timeout>0){setTimeout(function(){if(W&&!R){O("timeout")
}},K.timeout)
}}try{W.send(K.data)
}catch(U){j.handleError(K,W,null,U)
}if(!K.async){O()
}function N(){if(K.success){K.success(S,V)
}if(K.global){j.event.trigger("ajaxSuccess",[W,K])
}}function F(){if(K.complete){K.complete(W,V)
}if(K.global){j.event.trigger("ajaxComplete",[W,K])
}if(K.global&&!--j.active){j.event.trigger("ajaxStop")
}}return W
},handleError:function(F,E,G,H){if(F.error){F.error(E,G,H)
}if(F.global){j.event.trigger("ajaxError",[E,F,H])
}},active:0,httpSuccess:function(F){try{return !F.status&&location.protocol=="file:"||(F.status>=200&&F.status<300)||F.status==304||F.status==1223
}catch(E){}return false
},httpNotModified:function(E,F){try{var G=E.getResponseHeader("Last-Modified");
return E.status==304||G==j.lastModified[F]
}catch(H){}return false
},httpData:function(E,I,J){var F=E.getResponseHeader("content-type"),G=I=="xml"||!I&&F&&F.indexOf("xml")>=0,H=G?E.responseXML:E.responseText;
if(G&&H.documentElement.tagName=="parsererror"){throw"parsererror"
}if(J&&J.dataFilter){H=J.dataFilter(H,I)
}if(typeof H==="string"){if(I=="script"){j.globalEval(H)
}if(I=="json"){H=D["eval"]("("+H+")")
}}return H
},param:function(F){var G=[];
function H(I,J){G[G.length]=encodeURIComponent(I)+"="+encodeURIComponent(J)
}if(j.isArray(F)||F.jquery){j.each(F,function(){H(this.name,this.value)
})
}else{for(var E in F){if(j.isArray(F[E])){j.each(F[E],function(){H(E,this)
})
}else{H(E,j.isFunction(F[E])?F[E]():F[E])
}}}return G.join("&").replace(/%20/g,"+")
}});
var f={},B,x=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];
function y(F,E){var G={};
j.each(x.concat.apply([],x.slice(0,E)),function(){G[this]=F
});
return G
}j.fn.extend({show:function(L,G){if(L){return this.animate(y("show",3),L,G)
}else{for(var E=0,H=this.length;
E<H;
E++){var J=j.data(this[E],"olddisplay");
this[E].style.display=J||"";
if(j.css(this[E],"display")==="none"){var I=this[E].tagName,K;
if(f[I]){K=f[I]
}else{var F=j("<"+I+" />").appendTo("body");
K=F.css("display");
if(K==="none"){K="block"
}F.remove();
f[I]=K
}j.data(this[E],"olddisplay",K)
}}for(var E=0,H=this.length;
E<H;
E++){this[E].style.display=j.data(this[E],"olddisplay")||""
}return this
}},hide:function(F,H){if(F){return this.animate(y("hide",3),F,H)
}else{for(var E=0,G=this.length;
E<G;
E++){var I=j.data(this[E],"olddisplay");
if(!I&&I!=="none"){j.data(this[E],"olddisplay",j.css(this[E],"display"))
}}for(var E=0,G=this.length;
E<G;
E++){this[E].style.display="none"
}return this
}},_toggle:j.fn.toggle,toggle:function(F,G){var E=typeof F==="boolean";
return j.isFunction(F)&&j.isFunction(G)?this._toggle.apply(this,arguments):F==null||E?this.each(function(){var H=E?F:j(this).is(":hidden");
j(this)[H?"show":"hide"]()
}):this.animate(y("toggle",3),F,G)
},fadeTo:function(F,E,G){return this.animate({opacity:E},F,G)
},animate:function(F,G,H,I){var E=j.speed(G,H,I);
return this[E.queue===false?"each":"queue"](function(){var K=j.extend({},E),M,L=this.nodeType==1&&j(this).is(":hidden"),J=this;
for(M in F){if(F[M]=="hide"&&L||F[M]=="show"&&!L){return K.complete.call(this)
}if((M=="height"||M=="width")&&this.style){K.display=j.css(this,"display");
K.overflow=this.style.overflow
}}if(K.overflow!=null){this.style.overflow="hidden"
}K.curAnim=j.extend({},F);
j.each(F,function(S,Q){var T=new j.fx(J,K,S);
if(/toggle|show|hide/.test(Q)){T[Q=="toggle"?L?"show":"hide":Q](F)
}else{var R=Q.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),P=T.cur(true)||0;
if(R){var N=parseFloat(R[2]),O=R[3]||"px";
if(O!="px"){J.style[S]=(N||1)+O;
P=((N||1)/T.cur(true))*P;
J.style[S]=P+O
}if(R[1]){N=((R[1]=="-="?-1:1)*N)+P
}T.custom(P,N,O)
}else{T.custom(P,Q,"")
}}});
return true
})
},stop:function(F,G){var E=j.timers;
if(F){this.queue([])
}this.each(function(){for(var H=E.length-1;
H>=0;
H--){if(E[H].elem==this){if(G){E[H](true)
}E.splice(H,1)
}}});
if(!G){this.dequeue()
}return this
}});
j.each({slideDown:y("show",1),slideUp:y("hide",1),slideToggle:y("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(E,F){j.fn[E]=function(H,G){return this.animate(F,H,G)
}
});
j.extend({speed:function(E,G,H){var F=typeof E==="object"?E:{complete:H||!H&&G||j.isFunction(E)&&E,duration:E,easing:H&&G||G&&!j.isFunction(G)&&G};
F.duration=j.fx.off?0:typeof F.duration==="number"?F.duration:j.fx.speeds[F.duration]||j.fx.speeds._default;
F.old=F.complete;
F.complete=function(){if(F.queue!==false){j(this).dequeue()
}if(j.isFunction(F.old)){F.old.call(this)
}};
return F
},easing:{linear:function(H,G,E,F){return E+F*H
},swing:function(H,G,E,F){return((-Math.cos(H*Math.PI)/2)+0.5)*F+E
}},timers:[],fx:function(F,G,E){this.options=G;
this.elem=F;
this.prop=E;
if(!G.orig){G.orig={}
}}});
j.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)
}(j.fx.step[this.prop]||j.fx.step._default)(this);
if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"
}},cur:function(F){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]
}var E=parseFloat(j.css(this.elem,this.prop,F));
return E&&E>-10000?E:parseFloat(j.curCSS(this.elem,this.prop))||0
},custom:function(H,E,G){this.startTime=C();
this.start=H;
this.end=E;
this.unit=G||this.unit||"px";
this.now=this.start;
this.pos=this.state=0;
var I=this;
function F(J){return I.step(J)
}F.elem=this.elem;
if(F()&&j.timers.push(F)&&!B){B=setInterval(function(){var J=j.timers;
for(var K=0;
K<J.length;
K++){if(!J[K]()){J.splice(K--,1)
}}if(!J.length){clearInterval(B);
B=g
}},13)
}},show:function(){this.options.orig[this.prop]=j.attr(this.elem.style,this.prop);
this.options.show=true;
this.custom(this.prop=="width"||this.prop=="height"?1:0,this.cur());
j(this.elem).show()
},hide:function(){this.options.orig[this.prop]=j.attr(this.elem.style,this.prop);
this.options.hide=true;
this.custom(this.cur(),0)
},step:function(H){var J=C();
if(H||J>=this.options.duration+this.startTime){this.now=this.end;
this.pos=this.state=1;
this.update();
this.options.curAnim[this.prop]=true;
var F=true;
for(var E in this.options.curAnim){if(this.options.curAnim[E]!==true){F=false
}}if(F){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;
this.elem.style.display=this.options.display;
if(j.css(this.elem,"display")=="none"){this.elem.style.display="block"
}}if(this.options.hide){j(this.elem).hide()
}if(this.options.hide||this.options.show){for(var I in this.options.curAnim){j.attr(this.elem.style,I,this.options.orig[I])
}}this.options.complete.call(this.elem)
}return false
}else{var G=J-this.startTime;
this.state=G/this.options.duration;
this.pos=j.easing[this.options.easing||(j.easing.swing?"swing":"linear")](this.state,G,0,1,this.options.duration);
this.now=this.start+((this.end-this.start)*this.pos);
this.update()
}return true
}};
j.extend(j.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(E){j.attr(E.elem.style,"opacity",E.now)
},_default:function(E){if(E.elem.style&&E.elem.style[E.prop]!=null){E.elem.style[E.prop]=E.now+E.unit
}else{E.elem[E.prop]=E.now
}}}});
if(document.documentElement.getBoundingClientRect){j.fn.offset=function(){if(!this[0]){return{top:0,left:0}
}if(this[0]===this[0].ownerDocument.body){return j.offset.bodyOffset(this[0])
}var E=this[0].getBoundingClientRect(),H=this[0].ownerDocument,F=H.body,K=H.documentElement,J=K.clientTop||F.clientTop||0,L=K.clientLeft||F.clientLeft||0,I=E.top+(self.pageYOffset||j.boxModel&&K.scrollTop||F.scrollTop)-J,G=E.left+(self.pageXOffset||j.boxModel&&K.scrollLeft||F.scrollLeft)-L;
return{top:I,left:G}
}
}else{j.fn.offset=function(){if(!this[0]){return{top:0,left:0}
}if(this[0]===this[0].ownerDocument.body){return j.offset.bodyOffset(this[0])
}j.offset.initialized||j.offset.initialize();
var F=this[0],J=F.offsetParent,E=F,M=F.ownerDocument,K,N=M.documentElement,G=M.body,O=M.defaultView,I=O.getComputedStyle(F,null),L=F.offsetTop,H=F.offsetLeft;
while((F=F.parentNode)&&F!==G&&F!==N){K=O.getComputedStyle(F,null);
L-=F.scrollTop,H-=F.scrollLeft;
if(F===J){L+=F.offsetTop,H+=F.offsetLeft;
if(j.offset.doesNotAddBorder&&!(j.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(F.tagName))){L+=parseInt(K.borderTopWidth,10)||0,H+=parseInt(K.borderLeftWidth,10)||0
}E=J,J=F.offsetParent
}if(j.offset.subtractsBorderForOverflowNotVisible&&K.overflow!=="visible"){L+=parseInt(K.borderTopWidth,10)||0,H+=parseInt(K.borderLeftWidth,10)||0
}I=K
}if(I.position==="relative"||I.position==="static"){L+=G.offsetTop,H+=G.offsetLeft
}if(I.position==="fixed"){L+=Math.max(N.scrollTop,G.scrollTop),H+=Math.max(N.scrollLeft,G.scrollLeft)
}return{top:L,left:H}
}
}j.offset={initialize:function(){if(this.initialized){return
}var M=document.body,N=document.createElement("div"),F,L,H,G,K,I,J=M.style.marginTop,E='<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>';
K={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};
for(I in K){N.style[I]=K[I]
}N.innerHTML=E;
M.insertBefore(N,M.firstChild);
F=N.firstChild,L=F.firstChild,G=F.nextSibling.firstChild.firstChild;
this.doesNotAddBorder=(L.offsetTop!==5);
this.doesAddBorderForTableAndCells=(G.offsetTop===5);
F.style.overflow="hidden",F.style.position="relative";
this.subtractsBorderForOverflowNotVisible=(L.offsetTop===-5);
M.style.marginTop="1px";
this.doesNotIncludeMarginInBodyOffset=(M.offsetTop===0);
M.style.marginTop=J;
M.removeChild(N);
this.initialized=true
},bodyOffset:function(E){j.offset.initialized||j.offset.initialize();
var G=E.offsetTop,F=E.offsetLeft;
if(j.offset.doesNotIncludeMarginInBodyOffset){G+=parseInt(j.curCSS(E,"marginTop",true),10)||0,F+=parseInt(j.curCSS(E,"marginLeft",true),10)||0
}return{top:G,left:F}
}};
j.fn.extend({position:function(){var F=0,I=0,J;
if(this[0]){var G=this.offsetParent(),H=this.offset(),E=/^body|html$/i.test(G[0].tagName)?{top:0,left:0}:G.offset();
H.top-=h(this,"marginTop");
H.left-=h(this,"marginLeft");
E.top+=h(G,"borderTopWidth");
E.left+=h(G,"borderLeftWidth");
J={top:H.top-E.top,left:H.left-E.left}
}return J
},offsetParent:function(){var E=this[0].offsetParent||document.body;
while(E&&(!/^body|html$/i.test(E.tagName)&&j.css(E,"position")=="static")){E=E.offsetParent
}return j(E)
}});
j.each(["Left","Top"],function(E,G){var F="scroll"+G;
j.fn[F]=function(H){if(!this[0]){return null
}return H!==g?this.each(function(){this==D||this==document?D.scrollTo(!E?H:j(D).scrollLeft(),E?H:j(D).scrollTop()):this[F]=H
}):this[0]==D||this[0]==document?self[E?"pageYOffset":"pageXOffset"]||j.boxModel&&document.documentElement[F]||document.body[F]:this[0][F]
}
});
j.each(["Height","Width"],function(E,I){var H=E?"Left":"Top",J=E?"Right":"Bottom",F=I.toLowerCase();
j.fn["inner"+I]=function(){return this[0]?j.css(this[0],F,false,"padding"):null
};
j.fn["outer"+I]=function(K){return this[0]?j.css(this[0],F,false,K?"margin":"border"):null
};
var G=I.toLowerCase();
j.fn[G]=function(K){return this[0]==D?document.compatMode=="CSS1Compat"&&document.documentElement["client"+I]||document.body["client"+I]:this[0]==document?Math.max(document.documentElement["client"+I],document.body["scroll"+I],document.documentElement["scroll"+I],document.body["offset"+I],document.documentElement["offset"+I]):K===g?(this.length?j.css(this[0],G):null):this.css(G,typeof K==="string"?K:K+"px")
}
})
})();(function(e){var d=e.ajax;
var a={};
var c=[];
var b=[];
e.ajax=function(h){h=jQuery.extend(h,jQuery.extend({},jQuery.ajaxSettings,h));
var g=h.port;
switch(h.mode){case"abort":if(a[g]){a[g].abort()
}return a[g]=d.apply(this,arguments);
case"queue":var i=h.complete;
h.complete=function(){if(i){i.apply(this,arguments)
}jQuery([d]).dequeue("ajax"+g)
};
jQuery([d]).queue("ajax"+g,function(){d(h)
});
return;
case"sync":var f=c.length;
c[f]={error:h.error,success:h.success,complete:h.complete,done:false};
b[f]={error:[],success:[],complete:[]};
h.error=function(){b[f].error=arguments
};
h.success=function(){b[f].success=arguments
};
h.complete=function(){b[f].complete=arguments;
c[f].done=true;
if(f==0||!c[f-1]){for(var j=f;
j<c.length&&c[j].done;
j++){if(c[j].error){c[j].error.apply(jQuery,b[j].error)
}if(c[j].success){c[j].success.apply(jQuery,b[j].success)
}if(c[j].complete){c[j].complete.apply(jQuery,b[j].complete)
}c[j]=null;
b[j]=null
}}}
}return d.apply(this,arguments)
}
})(jQuery);(function(a){a.extend(a.fn,{validate:function(b){if(!this.length){b&&b.debug&&window.console&&console.warn("nothing selected, can't validate, returning nothing");
return
}var c=a.data(this[0],"validator");
if(c){return c
}c=new a.validator(b,this[0]);
a.data(this[0],"validator",c);
if(c.settings.onsubmit){this.find("input, button").filter(".cancel").click(function(){c.cancelSubmit=true
});
if(c.settings.submitHandler){this.find("input, button").filter(":submit").click(function(){c.submitButton=this
})
}this.submit(function(d){if(c.settings.debug){d.preventDefault()
}function e(){if(c.settings.submitHandler){if(c.submitButton){var f=a("<input type='hidden'/>").attr("name",c.submitButton.name).val(c.submitButton.value).appendTo(c.currentForm)
}c.settings.submitHandler.call(c,c.currentForm);
if(c.submitButton){f.remove()
}return false
}return true
}if(c.cancelSubmit){c.cancelSubmit=false;
return e()
}if(c.form()){if(c.pendingRequest){c.formSubmitted=true;
return false
}return e()
}else{c.focusInvalid();
return false
}})
}return c
},valid:function(){if(a(this[0]).is("form")){return this.validate().form()
}else{var c=true;
var b=a(this[0].form).validate();
this.each(function(){c&=b.element(this)
});
return c
}},removeAttrs:function(c){var b={},d=this;
a.each(c.split(/\s/),function(e,f){b[f]=d.attr(f);
d.removeAttr(f)
});
return b
},rules:function(i,g){var c=this[0];
if(i){var b=a.data(c.form,"validator").settings;
var d=b.rules;
var e=a.validator.staticRules(c);
switch(i){case"add":a.extend(e,a.validator.normalizeRule(g));
d[c.name]=e;
if(g.messages){b.messages[c.name]=a.extend(b.messages[c.name],g.messages)
}break;
case"remove":if(!g){delete d[c.name];
return e
}var h={};
a.each(g.split(/\s/),function(l,k){h[k]=e[k];
delete e[k]
});
return h
}}var f=a.validator.normalizeRules(a.extend({},a.validator.metadataRules(c),a.validator.classRules(c),a.validator.attributeRules(c),a.validator.staticRules(c)),c);
if(f.required){var j=f.required;
delete f.required;
f=a.extend({required:j},f)
}return f
}});
a.extend(a.expr[":"],{blank:function(b){return !a.trim(""+b.value)
},filled:function(b){return !!a.trim(""+b.value)
},unchecked:function(b){return !b.checked
}});
a.validator=function(b,c){this.settings=a.extend(true,{},a.validator.defaults,b);
this.currentForm=c;
this.init()
};
a.validator.format=function(b,c){if(arguments.length==1){return function(){var d=a.makeArray(arguments);
d.unshift(b);
return a.validator.format.apply(this,d)
}
}if(arguments.length>2&&c.constructor!=Array){c=a.makeArray(arguments).slice(1)
}if(c.constructor!=Array){c=[c]
}a.each(c,function(e,d){b=b.replace(new RegExp("\\{"+e+"\\}","g"),d)
});
return b
};
a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",validClass:"valid",errorElement:"label",focusInvalid:true,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:true,ignore:[],ignoreTitle:false,onfocusin:function(b){this.lastActive=b;
if(this.settings.focusCleanup&&!this.blockFocusCleanup){this.settings.unhighlight&&this.settings.unhighlight.call(this,b,this.settings.errorClass,this.settings.validClass);
this.errorsFor(b).hide()
}},onfocusout:function(b){if(!this.checkable(b)&&(b.name in this.submitted||!this.optional(b))){this.element(b)
}},onkeyup:function(b){if(b.name in this.submitted||b==this.lastElement){this.element(b)
}},onclick:function(b){if(b.name in this.submitted){this.element(b)
}else{if(b.parentNode.name in this.submitted){this.element(b.parentNode)
}}},highlight:function(b,c,d){a(b).addClass(c).removeClass(d)
},unhighlight:function(b,c,d){a(b).removeClass(c).addClass(d)
}},setDefaults:function(b){a.extend(a.validator.defaults,b)
},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",accept:"Please enter a value with a valid extension.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:false,prototype:{init:function(){this.labelContainer=a(this.settings.errorLabelContainer);
this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm);
this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer);
this.submitted={};
this.valueCache={};
this.pendingRequest=0;
this.pending={};
this.invalid={};
this.reset();
var d=(this.groups={});
a.each(this.settings.groups,function(e,f){a.each(f.split(/\s/),function(h,g){d[g]=e
})
});
var b=this.settings.rules;
a.each(b,function(e,f){b[e]=a.validator.normalizeRule(f)
});
function c(e){var g=a.data(this[0].form,"validator"),f="on"+e.type.replace(/^validate/,"");
g.settings[f]&&g.settings[f].call(g,this[0])
}a(this.currentForm).validateDelegate(":text, :password, :file, select, textarea","focusin focusout keyup",c).validateDelegate(":radio, :checkbox, select, option","click",c);
if(this.settings.invalidHandler){a(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler)
}},form:function(){this.checkForm();
a.extend(this.submitted,this.errorMap);
this.invalid=a.extend({},this.errorMap);
if(!this.valid()){a(this.currentForm).triggerHandler("invalid-form",[this])
}this.showErrors();
return this.valid()
},checkForm:function(){this.prepareForm();
for(var c=0,b=(this.currentElements=this.elements());
b[c];
c++){this.check(b[c])
}return this.valid()
},element:function(b){b=this.clean(b);
this.lastElement=b;
this.prepareElement(b);
this.currentElements=a(b);
var c=this.check(b);
if(c){delete this.invalid[b.name]
}else{this.invalid[b.name]=true
}if(!this.numberOfInvalids()){this.toHide=this.toHide.add(this.containers)
}this.showErrors();
return c
},showErrors:function(b){if(b){a.extend(this.errorMap,b);
this.errorList=[];
for(var c in b){this.errorList.push({message:b[c],element:this.findByName(c)[0]})
}this.successList=a.grep(this.successList,function(d){return !(d.name in b)
})
}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()
},resetForm:function(){if(a.fn.resetForm){a(this.currentForm).resetForm()
}this.submitted={};
this.prepareForm();
this.hideErrors();
this.elements().removeClass(this.settings.errorClass)
},numberOfInvalids:function(){return this.objectLength(this.invalid)
},objectLength:function(c){var b=0;
for(var d in c){b++
}return b
},hideErrors:function(){this.addWrapper(this.toHide).hide()
},valid:function(){return this.size()==0
},size:function(){return this.errorList.length
},focusInvalid:function(){if(this.settings.focusInvalid){try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")
}catch(b){}}},findLastActive:function(){var b=this.lastActive;
return b&&a.grep(this.errorList,function(c){return c.element.name==b.name
}).length==1&&b
},elements:function(){var c=this,b={};
return a([]).add(this.currentForm.elements).filter(":input").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function(){!this.name&&c.settings.debug&&window.console&&console.error("%o has no name assigned",this);
if(this.name in b||!c.objectLength(a(this).rules())){return false
}b[this.name]=true;
return true
})
},clean:function(b){return a(b)[0]
},errors:function(){return a(this.settings.errorElement+"."+this.settings.errorClass,this.errorContext)
},reset:function(){this.successList=[];
this.errorList=[];
this.errorMap={};
this.toShow=a([]);
this.toHide=a([]);
this.currentElements=a([])
},prepareForm:function(){this.reset();
this.toHide=this.errors().add(this.containers)
},prepareElement:function(b){this.reset();
this.toHide=this.errorsFor(b)
},check:function(c){c=this.clean(c);
if(this.checkable(c)){c=this.findByName(c.name)[0]
}var f=a(c).rules();
var b=false;
for(method in f){var d={method:method,parameters:f[method]};
try{var g=a.validator.methods[method].call(this,c.value.replace(/\r/g,""),c,d.parameters);
if(g=="dependency-mismatch"){b=true;
continue
}b=false;
if(g=="pending"){this.toHide=this.toHide.not(this.errorsFor(c));
return
}if(!g){this.formatAndAdd(c,d);
return false
}}catch(h){this.settings.debug&&window.console&&console.log("exception occured when checking element "+c.id+", check the '"+d.method+"' method",h);
throw h
}}if(b){return
}if(this.objectLength(f)){this.successList.push(c)
}return true
},customMetaMessage:function(b,d){if(!a.metadata){return
}var c=this.settings.meta?a(b).metadata()[this.settings.meta]:a(b).metadata();
return c&&c.messages&&c.messages[d]
},customMessage:function(d,b){var c=this.settings.messages[d];
return c&&(c.constructor==String?c:c[b])
},findDefined:function(){for(var b=0;
b<arguments.length;
b++){if(arguments[b]!==undefined){return arguments[b]
}}return undefined
},defaultMessage:function(b,c){return this.findDefined(this.customMessage(b.name,c),this.customMetaMessage(b,c),!this.settings.ignoreTitle&&b.title||undefined,a.validator.messages[c],"<strong>Warning: No message defined for "+b.name+"</strong>")
},formatAndAdd:function(e,d){var c=this.defaultMessage(e,d.method),b=/\$?\{(\d+)\}/g;
if(typeof c=="function"){c=c.call(this,d.parameters,e)
}else{if(b.test(c)){c=jQuery.format(c.replace(b,"{$1}"),d.parameters)
}}this.errorList.push({message:c,element:e});
this.errorMap[e.name]=c;
this.submitted[e.name]=c
},addWrapper:function(b){if(this.settings.wrapper){b=b.add(b.parent(this.settings.wrapper))
}return b
},defaultShowErrors:function(){for(var c=0;
this.errorList[c];
c++){var b=this.errorList[c];
this.settings.highlight&&this.settings.highlight.call(this,b.element,this.settings.errorClass,this.settings.validClass);
this.showLabel(b.element,b.message)
}if(this.errorList.length){this.toShow=this.toShow.add(this.containers)
}if(this.settings.success){for(var c=0;
this.successList[c];
c++){this.showLabel(this.successList[c])
}}if(this.settings.unhighlight){for(var c=0,d=this.validElements();
d[c];
c++){this.settings.unhighlight.call(this,d[c],this.settings.errorClass,this.settings.validClass)
}}this.toHide=this.toHide.not(this.toShow);
this.hideErrors();
this.addWrapper(this.toShow).show()
},validElements:function(){return this.currentElements.not(this.invalidElements())
},invalidElements:function(){return a(this.errorList).map(function(){return this.element
})
},showLabel:function(b,d){var c=this.errorsFor(b);
if(c.length){c.removeClass().addClass(this.settings.errorClass);
c.attr("generated")&&c.html(d)
}else{c=a("<"+this.settings.errorElement+"/>").attr({"for":this.idOrName(b),generated:true}).addClass(this.settings.errorClass).html(d||"");
if(this.settings.wrapper){c=c.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()
}if(!this.labelContainer.append(c).length){this.settings.errorPlacement?this.settings.errorPlacement(c,a(b)):c.insertAfter(b)
}}if(!d&&this.settings.success){c.text("");
typeof this.settings.success=="string"?c.addClass(this.settings.success):this.settings.success(c)
}this.toShow=this.toShow.add(c)
},errorsFor:function(b){var c=this.idOrName(b);
return this.errors().filter(function(){return a(this).attr("for")==c
})
},idOrName:function(b){return this.groups[b.name]||(this.checkable(b)?b.name:b.id||b.name)
},checkable:function(b){return/radio|checkbox/i.test(b.type)
},findByName:function(b){var c=this.currentForm;
return a(document.getElementsByName(b)).map(function(e,d){return d.form==c&&d.name==b&&d||null
})
},getLength:function(c,b){switch(b.nodeName.toLowerCase()){case"select":return a("option:selected",b).length;
case"input":if(this.checkable(b)){return this.findByName(b.name).filter(":checked").length
}}return c.length
},depend:function(c,b){return this.dependTypes[typeof c]?this.dependTypes[typeof c](c,b):true
},dependTypes:{"boolean":function(c,b){return c
},string:function(c,b){return !!a(c,b.form).length
},"function":function(c,b){return c(b)
}},optional:function(b){return !a.validator.methods.required.call(this,a.trim(b.value),b)&&"dependency-mismatch"
},startRequest:function(b){if(!this.pending[b.name]){this.pendingRequest++;
this.pending[b.name]=true
}},stopRequest:function(b,c){this.pendingRequest--;
if(this.pendingRequest<0){this.pendingRequest=0
}delete this.pending[b.name];
if(c&&this.pendingRequest==0&&this.formSubmitted&&this.form()){a(this.currentForm).submit();
this.formSubmitted=false
}else{if(!c&&this.pendingRequest==0&&this.formSubmitted){a(this.currentForm).triggerHandler("invalid-form",[this]);
this.formSubmitted=false
}}},previousValue:function(b){return a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:true,message:this.defaultMessage(b,"remote")})
}},classRuleSettings:{required:{required:true},email:{email:true},url:{url:true},date:{date:true},dateISO:{dateISO:true},dateDE:{dateDE:true},number:{number:true},numberDE:{numberDE:true},digits:{digits:true},creditcard:{creditcard:true}},addClassRules:function(b,c){b.constructor==String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)
},classRules:function(d){var b={};
var c=a(d).attr("class");
c&&a.each(c.split(" "),function(){if(this in a.validator.classRuleSettings){a.extend(b,a.validator.classRuleSettings[this])
}});
return b
},attributeRules:function(d){var b={};
var e=a(d);
for(method in a.validator.methods){var c=e.attr(method);
if(c){b[method]=c
}}if(b.maxlength&&/-1|2147483647|524288/.test(b.maxlength)){delete b.maxlength
}return b
},metadataRules:function(b){if(!a.metadata){return{}
}var c=a.data(b.form,"validator").settings.meta;
return c?a(b).metadata()[c]:a(b).metadata()
},staticRules:function(c){var b={};
var d=a.data(c.form,"validator");
if(d.settings.rules){b=a.validator.normalizeRule(d.settings.rules[c.name])||{}
}return b
},normalizeRules:function(c,b){a.each(c,function(e,f){if(f===false){delete c[e];
return
}if(f.param||f.depends){var d=true;
switch(typeof f.depends){case"string":d=!!a(f.depends,b.form).length;
break;
case"function":d=f.depends.call(b,b);
break
}if(d){c[e]=f.param!==undefined?f.param:true
}else{delete c[e]
}}});
a.each(c,function(d,e){c[d]=a.isFunction(e)?e(b):e
});
a.each(["minlength","maxlength","min","max"],function(){if(c[this]){c[this]=Number(c[this])
}});
a.each(["rangelength","range"],function(){if(c[this]){c[this]=[Number(c[this][0]),Number(c[this][1])]
}});
if(a.validator.autoCreateRanges){if(c.min&&c.max){c.range=[c.min,c.max];
delete c.min;
delete c.max
}if(c.minlength&&c.maxlength){c.rangelength=[c.minlength,c.maxlength];
delete c.minlength;
delete c.maxlength
}}if(c.messages){delete c.messages
}return c
},normalizeRule:function(b){if(typeof b=="string"){var c={};
a.each(b.split(/\s/),function(){c[this]=true
});
b=c
}return b
},addMethod:function(d,c,b){a.validator.methods[d]=c;
a.validator.messages[d]=b!=undefined?b:a.validator.messages[d];
if(c.length<3){a.validator.addClassRules(d,a.validator.normalizeRule(d))
}},methods:{required:function(b,d,c){if(!this.depend(c,d)){return"dependency-mismatch"
}switch(d.nodeName.toLowerCase()){case"select":var e=a(d).val();
return e&&e.length>0;
case"input":if(this.checkable(d)){return this.getLength(b,d)>0
}default:return a.trim(b).length>0
}},remote:function(b,c,g){if(this.optional(c)){return"dependency-mismatch"
}var e=this.previousValue(c);
if(!this.settings.messages[c.name]){this.settings.messages[c.name]={}
}e.originalMessage=this.settings.messages[c.name].remote;
this.settings.messages[c.name].remote=e.message;
g=typeof g=="string"&&{url:g}||g;
if(e.old!==b){e.old=b;
var d=this;
this.startRequest(c);
var f={};
f[c.name]=b;
a.ajax(a.extend(true,{url:g,mode:"abort",port:"validate"+c.name,dataType:"json",data:f,success:function(k){d.settings.messages[c.name].remote=e.originalMessage;
var j=k===true;
if(j){var l=d.formSubmitted;
d.prepareElement(c);
d.formSubmitted=l;
d.successList.push(c);
d.showErrors()
}else{var h={};
var i=(e.message=k||d.defaultMessage(c,"remote"));
h[c.name]=a.isFunction(i)?i(b):i;
d.showErrors(h)
}e.valid=j;
d.stopRequest(c,j)
}},g));
return"pending"
}else{if(this.pending[c.name]){return"pending"
}}return e.valid
},minlength:function(b,d,c){return this.optional(d)||this.getLength(a.trim(b),d)>=c
},maxlength:function(b,d,c){return this.optional(d)||this.getLength(a.trim(b),d)<=c
},rangelength:function(b,d,c){var e=this.getLength(a.trim(b),d);
return this.optional(d)||(e>=c[0]&&e<=c[1])
},min:function(b,d,c){return this.optional(d)||b>=c
},max:function(b,d,c){return this.optional(d)||b<=c
},range:function(b,d,c){return this.optional(d)||(b>=c[0]&&b<=c[1])
},email:function(c,b){return this.optional(b)||/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(c)
},url:function(c,b){return this.optional(b)||/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(c)
},date:function(c,b){return this.optional(b)||!/Invalid|NaN/.test(new Date(c))
},dateISO:function(c,b){return this.optional(b)||/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(c)
},number:function(c,b){return this.optional(b)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/.test(c)
},digits:function(c,b){return this.optional(b)||/^\d+$/.test(c)
},creditcard:function(b,c){if(this.optional(c)){return"dependency-mismatch"
}if(/[^0-9-]+/.test(b)){return false
}var g=0,d=0,f=false;
b=b.replace(/\D/g,"");
for(var e=b.length-1;
e>=0;
e--){var h=b.charAt(e);
var d=parseInt(h,10);
if(f){if((d*=2)>9){d-=9
}}g+=d;
f=!f
}return(g%10)==0
},accept:function(b,d,c){c=typeof c=="string"?c.replace(/,/g,"|"):"png|jpe?g|gif";
return this.optional(d)||b.match(new RegExp(".("+c+")$","i"))
},equalTo:function(b,d,c){var e=a(c).unbind(".validate-equalTo").bind("blur.validate-equalTo",function(){a(d).valid()
});
return b==e.val()
}}});
a.format=a.validator.format
})(jQuery);
(function(c){var b=c.ajax;
var a={};
c.ajax=function(d){d=c.extend(d,c.extend({},c.ajaxSettings,d));
var e=d.port;
if(d.mode=="abort"){if(a[e]){a[e].abort()
}return(a[e]=b.apply(this,arguments))
}return b.apply(this,arguments)
}
})(jQuery);
(function(a){if(!jQuery.event.special.focusin&&!jQuery.event.special.focusout&&document.addEventListener){a.each({focus:"focusin",blur:"focusout"},function(c,d){a.event.special[d]={setup:function(){this.addEventListener(c,b,true)
},teardown:function(){this.removeEventListener(c,b,true)
},handler:function(f){arguments[0]=a.event.fix(f);
arguments[0].type=d;
return a.event.handle.apply(this,arguments)
}};
function b(f){f=a.event.fix(f);
f.type=d;
return a.event.handle.call(this,f)
}})
}a.extend(a.fn,{validateDelegate:function(c,d,b){return this.bind(d,function(e){var f=a(e.target);
if(f.is(c)){return b.apply(f,arguments)
}})
}})
})(jQuery);var xVal=xVal||{};
xVal.Plugins=xVal.Plugins||{};
xVal.Messages=xVal.Messages||{};
xVal.AttachValidator=function(b,c,d,a){if(a!=null){this.Plugins[a].AttachValidator(b,c,d)
}else{for(var e in this.Plugins){this.Plugins[e].AttachValidator(b,c,d);
return
}}};
(function($){xVal.Plugins["jquery.validate"]={AttachValidator:function(elementPrefix,rulesConfig,options){var self=this;
self._ensureCustomFunctionsRegistered();
$(function(){self._ensureValidationSummaryContainerExistsIfRequired(options);
for(var i=0;
i<rulesConfig.Fields.length;
i++){var fieldName=rulesConfig.Fields[i].FieldName;
var fieldRules=rulesConfig.Fields[i].FieldRules;
var elemId=self._makeAspNetMvcHtmlHelperID((elementPrefix?elementPrefix+".":"")+fieldName);
var elem=document.getElementById(elemId);
if(elem){for(var j=0;
j<fieldRules.length;
j++){var rule=fieldRules[j];
if(rule!=null){var ruleName=rule.RuleName;
var ruleParams=rule.RuleParameters;
var errorText=(typeof(rule.Message)=="undefined"?null:rule.Message);
self._attachRuleToDOMElement(ruleName,ruleParams,errorText,$(elem),elementPrefix,options)
}}}}})
},_makeAspNetMvcHtmlHelperID:function(fullyQualifiedModelName){return fullyQualifiedModelName.replace(/\./g,"_")
},_attachRuleToDOMElement:function(ruleName,ruleParams,errorText,element,elementPrefix,options){var parentForm=element.parents("form");
if(parentForm.length!=1){alert("Error: Element "+element.attr("id")+" is not in a form")
}this._ensureFormIsMarkedForValidation($(parentForm[0]),options);
this._associateNearbyValidationMessageSpanWithElement(element);
var options={};
switch(ruleName){case"Required":options.required=true;
options.messages={required:errorText||xVal.Messages.Required};
break;
case"Range":if(ruleParams.Type=="string"){options.xVal_stringRange=[ruleParams.Min,ruleParams.Max];
if(errorText!=null){options.messages={xVal_stringRange:$.format(errorText)}
}}else{if(ruleParams.Type=="datetime"){var minDate,maxDate;
if(typeof(ruleParams.MinYear)!="undefined"){minDate=new Date(ruleParams.MinYear,ruleParams.MinMonth-1,ruleParams.MinDay,ruleParams.MinHour,ruleParams.MinMinute,ruleParams.MinSecond)
}if(typeof(ruleParams.MaxYear)!="undefined"){maxDate=new Date(ruleParams.MaxYear,ruleParams.MaxMonth-1,ruleParams.MaxDay,ruleParams.MaxHour,ruleParams.MaxMinute,ruleParams.MaxSecond)
}options.xVal_dateRange=[minDate,maxDate];
if(errorText!=null){options.messages={xVal_dateRange:$.format(errorText)}
}}else{if(typeof(ruleParams.Min)=="undefined"){options.max=ruleParams.Max;
errorText=errorText||xVal.Messages.Range_Numeric_Max;
if(errorText!=null){options.messages={max:$.format(errorText)}
}}else{if(typeof(ruleParams.Max)=="undefined"){options.min=ruleParams.Min;
errorText=errorText||xVal.Messages.Range_Numeric_Min;
if(errorText!=null){options.messages={min:$.format(errorText)}
}}else{options.range=[ruleParams.Min,ruleParams.Max];
errorText=errorText||xVal.Messages.Range_Numeric_MinMax;
if(errorText!=null){options.messages={range:$.format(errorText)}
}}}}}break;
case"StringLength":if(typeof(ruleParams.MinLength)=="undefined"){options.maxlength=ruleParams.MaxLength;
errorText=errorText||xVal.Messages.StringLength_Max;
if(errorText!=null){options.messages={maxlength:$.format(errorText)}
}}else{if(typeof(ruleParams.MaxLength)=="undefined"){options.minlength=ruleParams.MinLength;
errorText=errorText||xVal.Messages.StringLength_Min;
if(errorText!=null){options.messages={minlength:$.format(errorText)}
}}else{options.rangelength=[ruleParams.MinLength,ruleParams.MaxLength];
errorText=errorText||xVal.Messages.StringLength_MinMax;
if(errorText!=null){options.messages={rangelength:$.format(errorText)}
}}}break;
case"DataType":switch(ruleParams.Type){case"EmailAddress":options.email=true;
options.messages={email:errorText||xVal.Messages.DataType_EmailAddress};
break;
case"Integer":options.xVal_regex=["^\\-?\\d+$",""];
options.messages={xVal_regex:errorText||xVal.Messages.DataType_Integer||"Please enter a whole number."};
break;
case"Decimal":options.number=true;
options.messages={number:errorText||xVal.Messages.DataType_Decimal};
break;
case"Date":options.dateISO=true;
options.messages={dateISO:errorText||xVal.Messages.DataType_Date};
break;
case"DateTime":options.xVal_regex=["^\\d{1,2}/\\d{1,2}/(\\d{2}|\\d{4})\\s+\\d{1,2}\\:\\d{2}(\\:\\d{2})?$",""];
options.messages={xVal_regex:errorText||xVal.Messages.DataType_DateTime||"Please enter a valid date and time."};
break;
case"Currency":options.xVal_regex=["^\\D?\\s?([0-9]{1,3},([0-9]{3},)*[0-9]{3}|[0-9]+)(.[0-9][0-9])?$",""];
options.messages={xVal_regex:errorText||xVal.Messages.DataType_Currency||"Please enter a currency value."};
break;
case"CreditCardLuhn":options.xVal_creditCardLuhn=true;
if(errorText!=null){options.messages={xVal_creditCardLuhn:errorText}
}break
}break;
case"RegEx":options.xVal_regex=[ruleParams.Pattern,ruleParams.Options];
if(errorText!=null){options.messages={xVal_regex:errorText}
}break;
case"Comparison":var elemToCompareId=this._makeAspNetMvcHtmlHelperID((elementPrefix?elementPrefix+".":"")+ruleParams.PropertyToCompare);
var elemToCompare=document.getElementById(elemToCompareId);
if(elemToCompare!=null){options.xVal_comparison=[ruleParams.PropertyToCompare,elemToCompare,ruleParams.ComparisonOperator];
if(errorText!=null){options.messages={xVal_comparison:errorText}
}}break;
case"Remote":var dataAccessor={};
parentForm.find("input[name], textarea[name], select[name]").each(function(){var input=this;
dataAccessor[input.name]=function(){return $(input).val()
}
});
options.remote={url:ruleParams.url,data:dataAccessor,type:"post"};
break;
case"Custom":var ruleFunction=this._parseAsFunctionWithWarnings(ruleParams.Function);
if(ruleFunction!=null){var customFunctionName=this._registerCustomValidationFunction(ruleFunction);
var evaluatedParams=ruleParams.Parameters=="null"?null:eval("("+ruleParams.Parameters+")");
options[customFunctionName]=evaluatedParams||true;
options.messages=[];
options.messages[customFunctionName]=errorText
}break
}element.rules("add",options)
},_parseAsFunctionWithWarnings:function(functionString){var result;
try{result=eval("("+functionString+")")
}catch(ex){alert("Custom rule error: Could not find or could not parse the function '"+functionString+"'");
return null
}if(typeof(result)!="function"){alert("Custom rule error: The JavaScript object '"+functionString+"' is not a function.");
return null
}return result
},_associateNearbyValidationMessageSpanWithElement:function(element){var nearbyMessages=element.nextAll("span.field-validation-error");
if(nearbyMessages.length>0){$(nearbyMessages[0]).attr("generated","true").attr("htmlfor",element.attr("id"))
}},_ensureFormIsMarkedForValidation:function(formElement,options){if(!formElement.data("isMarkedForValidation")){formElement.data("isMarkedForValidation",true);
var validationOptions={errorClass:"field-validation-error",errorElement:"span",highlight:function(element){$(element).addClass("input-validation-error").addClass("ui-state-error")
},unhighlight:function(element){$(element).removeClass("input-validation-error").removeClass("ui-state-error")
}};
if(options&&options.ValidationSummary){validationOptions.wrapper="li";
validationOptions.errorLabelContainer="#"+options.ValidationSummary.ElementID+" ul:first"
}var validator=formElement.validate(validationOptions);
if(options&&options.ValidationSummary){this._modifyJQueryValidationElementHidingBehaviourToSupportValidationSummary(validator,options)
}}},_registerCustomValidationFunction:function(evalFn){jQuery.validator.xValCustomFunctionCount=(jQuery.validator.xValCustomFunctionCount||0)+1;
var functionName="xVal_customFunction_"+jQuery.validator.xValCustomFunctionCount;
jQuery.validator.addMethod(functionName,function(value,element,params){if(this.optional(element)){return true
}return evalFn(value,element,params)
});
return functionName
},_ensureCustomFunctionsRegistered:function(){if(!jQuery.validator.xValFunctionsRegistered){jQuery.validator.xValFunctionsRegistered=true;
jQuery.validator.addMethod("xVal_stringRange",function(value,element,params){if(this.optional(element)){return true
}if(params[0]!=null){if(value<params[0]){return false
}}if(params[1]!=null){if(value>params[1]){return false
}}return true
},function(params){if((params[0]!=null)&&(params[1]!=null)){return $.format(xVal.Messages.Range_String_MinMax||"Please enter a value alphabetically between '{0}' and '{1}'.",params[0],params[1])
}else{if(params[0]!=null){return $.format(xVal.Messages.Range_String_Min||"Please enter a value not alphabetically before '{0}'.",params[0])
}else{return $.format(xVal.Messages.Range_String_Max||"Please enter a value not alphabetically after '{0}'.",params[1])
}}});
jQuery.validator.addMethod("xVal_dateRange",function(value,element,params){if(this.optional(element)){return true
}var parsedValue=Date.parse(value);
if(isNaN(parsedValue)){return false
}else{parsedValue=new Date(parsedValue)
}if(params[0]!=null){if(parsedValue<params[0]){return false
}}if(params[1]!=null){if(parsedValue>params[1]){return false
}}return true
},function(params,elem){if(isNaN(Date.parse(elem.value))){return xVal.Messages.DataType_Date||"Please enter a valid date in yyyy/mm/dd format."
}var formatDate=function(date){var result=date.getFullYear()+"-"+(date.getMonth()+1)+"-"+date.getDate();
if(date.getHours()+date.getMinutes()+date.getSeconds()!=0){result+=" "+date.getHours()+":"+date.getMinutes()+":"+date.getSeconds()
}return result.replace(/\b(\d)\b/g,"0$1")
};
if((params[0]!=null)&&(params[1]!=null)){return $.format(xVal.Messages.Range_DateTime_MinMax||"Please enter a date between {0} and {1}.",formatDate(params[0]),formatDate(params[1]))
}else{if(params[0]!=null){return $.format(xVal.Messages.Range_DateTime_Min||"Please enter a date no earlier than {0}.",formatDate(params[0]))
}else{return $.format(xVal.Messages.Range_DateTime_Max||"Please enter a date no later than {0}.",formatDate(params[1]))
}}});
jQuery.validator.addMethod("xVal_regex",function(value,element,params){if(this.optional(element)){return true
}var pattern=params[0];
var options=params[1];
var regex=new RegExp(pattern,options);
return regex.test(value)
},function(params){return xVal.Messages.Regex||"This value is invalid."
});
jQuery.validator.addMethod("xVal_creditCardLuhn",function(value,element,params){if(this.optional(element)){return true
}value=value.replace(/\D/g,"");
if(value==""){return false
}var sum=0;
for(var i=value.length-2;
i>=0;
i-=2){sum+=Array(0,2,4,6,8,1,3,5,7,9)[parseInt(value.charAt(i),10)]
}for(var i=value.length-1;
i>=0;
i-=2){sum+=parseInt(value.charAt(i),10)
}return(sum%10)==0
},function(params){return xVal.Messages.DataType_CreditCardLuhn||"Please enter a valid credit card number."
});
jQuery.validator.addMethod("xVal_comparison",function(value,element,params){if(this.optional(element)){return true
}var elemToCompare=params[1];
var comparisonOperator=params[2];
switch(comparisonOperator){case"Equals":return value==elemToCompare.value;
case"DoesNotEqual":return value!=elemToCompare.value
}return true
},function(params){var propertyToCompareName=params[0];
var comparisonOperator=params[2];
switch(comparisonOperator){case"Equals":return $.format(xVal.Messages.Comparison_Equals||"This value must be the same as {0}.",propertyToCompareName);
case"DoesNotEqual":return $.format(xVal.Messages.Comparison_DoesNotEqual||"This value must be different from {0}.",propertyToCompareName)
}});
$.expr[":"].displayableValidationSummaryMessage=function(object){var span=$(object).find("span:first");
if(span.length==0){return true
}return !(span.css("display")==="none")&&!span.is(":empty")
}
}},_ensureValidationSummaryContainerExistsIfRequired:function(options){if(options&&options.ValidationSummary){var validationSummaryContainer=$("#"+options.ValidationSummary.ElementID);
if(validationSummaryContainer.length==0){alert('Cannot find validation summary element "'+options.ValidationSummary.ElementID+"\". Make sure you've put an element with this ID into your HTML document.")
}if(!validationSummaryContainer.is(":has(ul)")){validationSummaryContainer.append($("<span class='validation-summary-errors' />").text(options.ValidationSummary.HeaderMessage)).append($("<ul />")).hide()
}}},_modifyJQueryValidationElementHidingBehaviourToSupportValidationSummary:function(validator,options){var originalHideErrorsMethod=validator.hideErrors;
var originalShowErrorsMethod=validator.showErrors;
validator.hideErrors=function(){this.toHide=this.toHide.not("ul");
originalHideErrorsMethod.apply(this,arguments);
$("#"+options.ValidationSummary.ElementID+":not(:has(li:displayableValidationSummaryMessage))").hide()
};
validator.showErrors=function(){originalShowErrorsMethod.apply(this,arguments);
$("#"+options.ValidationSummary.ElementID+":has(li:displayableValidationSummaryMessage)").show()
}
}}
})(jQuery);var xVal=xVal||{};
xVal.Messages={Required:"Ta wartość nie może być pusta.",DataType_EmailAddress:"Proszę podać poprawny adres email.",DataType_Integer:"Proszę podać całą liczbę.",DataType_Decimal:"Proszę podać liczbę.",DataType_Date:"Proszę podać prawidłową datę.",DataType_DateTime:"Proszę podać datę i czas.",DataType_Currency:"Proszę podać wartość pieniężną.",DataType_CreditCardLuhn:"Proszę podać prawidłowy numer karty kredytowej.",Regex:"Ta wartość nie jest prawidłowa.",Range_Numeric_Min:"Proszę podać wartość o długości przynajmniej {0}.",Range_Numeric_Max:"Proszę podać wartość mniejszą lub równą {0}.",Range_Numeric_MinMax:"Prosze podać wartość z przedzialu {0} oraz {1}.",Range_String_Min:"Proszę podać wartość nie alfabetycznie przed '{0}'.",Range_String_Max:"Proszę podać wartość nie alfabetycznie za '{0}'.",Range_String_MinMax:"Proszę podać wartość alfabetycznie pomiędzy '{0}' oraz '{1}'.",Range_DateTime_Min:"Proszę podać datę nie wcześniejszą niż {0}.",Range_DateTime_Max:"Proszę podać datę nie późniejszą niż {0}.",Range_DateTime_MinMax:"Proszę podać datę z przedziału {0} oraz {1}.",StringLength_Min:"Proszę podać przynajmniej {0} znaków.",StringLength_Max:"Proszę podać nie więcej niż {0} znaków.",StringLength_MinMax:"Proszę podać pomiędzy {0} oraz {1} znaków.",Comparison_Equals:"Ta wartość musi być taka sama jak {0}.",Comparison_DoesNotEqual:"Ta wartość nie może być taka sama jak {0}."};jQuery.ui||(function(e){var a=e.fn.remove,g=e.browser.mozilla&&(parseFloat(e.browser.version)<1.9);
e.ui={version:"1.7.2",plugin:{add:function(l,k,m){var n=e.ui[l].prototype;
for(var j in m){n.plugins[j]=n.plugins[j]||[];
n.plugins[j].push([k,m[j]])
}},call:function(m,n,k){var l=m.plugins[n];
if(!l||!m.element[0].parentNode){return
}for(var j=0;
j<l.length;
j++){if(m.options[l[j][0]]){l[j][1].apply(m.element,k)
}}}},contains:function(j,k){return document.compareDocumentPosition?j.compareDocumentPosition(k)&16:j!==k&&j.contains(k)
},hasScroll:function(l,k){if(e(l).css("overflow")=="hidden"){return false
}var j=(k&&k=="left")?"scrollLeft":"scrollTop",m=false;
if(l[j]>0){return true
}l[j]=1;
m=(l[j]>0);
l[j]=0;
return m
},isOverAxis:function(l,j,k){return(l>j)&&(l<(j+k))
},isOver:function(k,j,n,m,l,o){return e.ui.isOverAxis(k,n,l)&&e.ui.isOverAxis(j,m,o)
},keyCode:{BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38}};
if(g){var d=e.attr,h=e.fn.removeAttr,b="http://www.w3.org/2005/07/aaa",f=/^aria-/,c=/^wairole:/;
e.attr=function(k,m,j){var l=j!==undefined;
return(m=="role"?(l?d.call(this,k,m,"wairole:"+j):(d.apply(this,arguments)||"").replace(c,"")):(f.test(m)?(l?k.setAttributeNS(b,m.replace(f,"aaa:"),j):d.call(this,k,m.replace(f,"aaa:"))):d.apply(this,arguments)))
};
e.fn.removeAttr=function(j){return(f.test(j)?this.each(function(){this.removeAttributeNS(b,j.replace(f,""))
}):h.call(this,j))
}
}e.fn.extend({remove:function(){e("*",this).add(this).each(function(){e(this).triggerHandler("remove")
});
return a.apply(this,arguments)
},enableSelection:function(){return this.attr("unselectable","off").css("MozUserSelect","").unbind("selectstart.ui")
},disableSelection:function(){return this.attr("unselectable","on").css("MozUserSelect","none").bind("selectstart.ui",function(){return false
})
},scrollParent:function(){var j;
if((e.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){j=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test(e.curCSS(this,"position",1))&&(/(auto|scroll)/).test(e.curCSS(this,"overflow",1)+e.curCSS(this,"overflow-y",1)+e.curCSS(this,"overflow-x",1))
}).eq(0)
}else{j=this.parents().filter(function(){return(/(auto|scroll)/).test(e.curCSS(this,"overflow",1)+e.curCSS(this,"overflow-y",1)+e.curCSS(this,"overflow-x",1))
}).eq(0)
}return(/fixed/).test(this.css("position"))||!j.length?e(document):j
}});
e.extend(e.expr[":"],{data:function(k,j,l){return !!e.data(k,l[3])
},focusable:function(k){var l=k.nodeName.toLowerCase(),j=e.attr(k,"tabindex");
return(/input|select|textarea|button|object/.test(l)?!k.disabled:"a"==l||"area"==l?k.href||!isNaN(j):!isNaN(j))&&!e(k)["area"==l?"parents":"closest"](":hidden").length
},tabbable:function(j){var k=e.attr(j,"tabindex");
return(isNaN(k)||k>=0)&&e(j).is(":focusable")
}});
function i(m,j,n,o){function l(q){var p=e[m][j][q]||[];
return(typeof p=="string"?p.split(/,?\s+/):p)
}var k=l("getter");
if(o.length==1&&typeof o[0]=="string"){k=k.concat(l("getterSetter"))
}return(e.inArray(n,k)!=-1)
}e.widget=function(l,j){var k=l.split(".")[0];
l=l.split(".")[1];
e.fn[l]=function(o){var n=(typeof o=="string"),m=Array.prototype.slice.call(arguments,1);
if(n&&o.substring(0,1)=="_"){return this
}if(n&&i(k,l,o,m)){var p=e.data(this[0],l);
return(p?p[o].apply(p,m):undefined)
}return this.each(function(){var q=e.data(this,l);
(!q&&!n&&e.data(this,l,new e[k][l](this,o))._init());
(q&&n&&e.isFunction(q[o])&&q[o].apply(q,m))
})
};
e[k]=e[k]||{};
e[k][l]=function(m,n){var o=this;
this.namespace=k;
this.widgetName=l;
this.widgetEventPrefix=e[k][l].eventPrefix||l;
this.widgetBaseClass=k+"-"+l;
this.options=e.extend({},e.widget.defaults,e[k][l].defaults,e.metadata&&e.metadata.get(m)[l],n);
this.element=e(m).bind("setData."+l,function(q,r,p){if(q.target==m){return o._setData(r,p)
}}).bind("getData."+l,function(q,p){if(q.target==m){return o._getData(p)
}}).bind("remove",function(){return o.destroy()
})
};
e[k][l].prototype=e.extend({},e.widget.prototype,j);
e[k][l].getterSetter="option"
};
e.widget.prototype={_init:function(){},destroy:function(){this.element.removeData(this.widgetName).removeClass(this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").removeAttr("aria-disabled")
},option:function(m,j){var l=m,k=this;
if(typeof m=="string"){if(j===undefined){return this._getData(m)
}l={};
l[m]=j
}e.each(l,function(n,o){k._setData(n,o)
})
},_getData:function(j){return this.options[j]
},_setData:function(j,k){this.options[j]=k;
if(j=="disabled"){this.element[k?"addClass":"removeClass"](this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").attr("aria-disabled",k)
}},enable:function(){this._setData("disabled",false)
},disable:function(){this._setData("disabled",true)
},_trigger:function(p,o,j){var l=this.options[p],n=(p==this.widgetEventPrefix?p:this.widgetEventPrefix+p);
o=e.Event(o);
o.type=n;
if(o.originalEvent){for(var k=e.event.props.length,m;
k;
){m=e.event.props[--k];
o[m]=o.originalEvent[m]
}}this.element.trigger(o,j);
return !(e.isFunction(l)&&l.call(this.element[0],o,j)===false||o.isDefaultPrevented())
}};
e.widget.defaults={disabled:false};
e.ui.mouse={_mouseInit:function(){var j=this;
this.element.bind("mousedown."+this.widgetName,function(k){return j._mouseDown(k)
}).bind("click."+this.widgetName,function(k){if(j._preventClickEvent){j._preventClickEvent=false;
k.stopImmediatePropagation();
return false
}});
if(e.browser.msie){this._mouseUnselectable=this.element.attr("unselectable");
this.element.attr("unselectable","on")
}this.started=false
},_mouseDestroy:function(){this.element.unbind("."+this.widgetName);
(e.browser.msie&&this.element.attr("unselectable",this._mouseUnselectable))
},_mouseDown:function(k){k.originalEvent=k.originalEvent||{};
if(k.originalEvent.mouseHandled){return
}(this._mouseStarted&&this._mouseUp(k));
this._mouseDownEvent=k;
var l=this,j=(k.which==1),m=(typeof this.options.cancel=="string"?e(k.target).parents().add(k.target).filter(this.options.cancel).length:false);
if(!j||m||!this._mouseCapture(k)){return true
}this.mouseDelayMet=!this.options.delay;
if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){l.mouseDelayMet=true
},this.options.delay)
}if(this._mouseDistanceMet(k)&&this._mouseDelayMet(k)){this._mouseStarted=(this._mouseStart(k)!==false);
if(!this._mouseStarted){k.preventDefault();
return true
}}this._mouseMoveDelegate=function(n){return l._mouseMove(n)
};
this._mouseUpDelegate=function(n){return l._mouseUp(n)
};
e(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);
(e.browser.safari||k.preventDefault());
k.originalEvent.mouseHandled=true;
return true
},_mouseMove:function(j){if(e.browser.msie&&!j.button){return this._mouseUp(j)
}if(this._mouseStarted){this._mouseDrag(j);
return j.preventDefault()
}if(this._mouseDistanceMet(j)&&this._mouseDelayMet(j)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,j)!==false);
(this._mouseStarted?this._mouseDrag(j):this._mouseUp(j))
}return !this._mouseStarted
},_mouseUp:function(j){e(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);
if(this._mouseStarted){this._mouseStarted=false;
this._preventClickEvent=(j.target==this._mouseDownEvent.target);
this._mouseStop(j)
}return false
},_mouseDistanceMet:function(j){return(Math.max(Math.abs(this._mouseDownEvent.pageX-j.pageX),Math.abs(this._mouseDownEvent.pageY-j.pageY))>=this.options.distance)
},_mouseDelayMet:function(j){return this.mouseDelayMet
},_mouseStart:function(j){},_mouseDrag:function(j){},_mouseStop:function(j){},_mouseCapture:function(j){return true
}};
e.ui.mouse.defaults={cancel:null,distance:1,delay:0}
})(jQuery);
(function(a){a.widget("ui.draggable",a.extend({},a.ui.mouse,{_init:function(){if(this.options.helper=="original"&&!(/^(?:r|a|f)/).test(this.element.css("position"))){this.element[0].style.position="relative"
}(this.options.addClasses&&this.element.addClass("ui-draggable"));
(this.options.disabled&&this.element.addClass("ui-draggable-disabled"));
this._mouseInit()
},destroy:function(){if(!this.element.data("draggable")){return
}this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");
this._mouseDestroy()
},_mouseCapture:function(b){var c=this.options;
if(this.helper||c.disabled||a(b.target).is(".ui-resizable-handle")){return false
}this.handle=this._getHandle(b);
if(!this.handle){return false
}return true
},_mouseStart:function(b){var c=this.options;
this.helper=this._createHelper(b);
this._cacheHelperProportions();
if(a.ui.ddmanager){a.ui.ddmanager.current=this
}this._cacheMargins();
this.cssPosition=this.helper.css("position");
this.scrollParent=this.helper.scrollParent();
this.offset=this.element.offset();
this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};
a.extend(this.offset,{click:{left:b.pageX-this.offset.left,top:b.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});
this.originalPosition=this._generatePosition(b);
this.originalPageX=b.pageX;
this.originalPageY=b.pageY;
if(c.cursorAt){this._adjustOffsetFromHelper(c.cursorAt)
}if(c.containment){this._setContainment()
}this._trigger("start",b);
this._cacheHelperProportions();
if(a.ui.ddmanager&&!c.dropBehaviour){a.ui.ddmanager.prepareOffsets(this,b)
}this.helper.addClass("ui-draggable-dragging");
this._mouseDrag(b,true);
return true
},_mouseDrag:function(c,d){this.position=this._generatePosition(c);
this.positionAbs=this._convertPositionTo("absolute");
if(!d){var b=this._uiHash();
this._trigger("drag",c,b);
this.position=b.position
}if(!this.options.axis||this.options.axis!="y"){this.helper[0].style.left=this.position.left+"px"
}if(!this.options.axis||this.options.axis!="x"){this.helper[0].style.top=this.position.top+"px"
}if(a.ui.ddmanager){a.ui.ddmanager.drag(this,c)
}return false
},_mouseStop:function(b){var c=false;
if(a.ui.ddmanager&&!this.options.dropBehaviour){c=a.ui.ddmanager.drop(this,b)
}if(this.dropped){c=this.dropped;
this.dropped=false
}if((this.options.revert=="invalid"&&!c)||(this.options.revert=="valid"&&c)||this.options.revert===true||(a.isFunction(this.options.revert)&&this.options.revert.call(this.element,c))){var d=this;
a(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){d._trigger("stop",b);
d._clear()
})
}else{this._trigger("stop",b);
this._clear()
}return false
},_getHandle:function(b){var c=!this.options.handle||!a(this.options.handle,this.element).length?true:false;
a(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==b.target){c=true
}});
return c
},_createHelper:function(c){var b=this.options;
var d=a.isFunction(b.helper)?a(b.helper.apply(this.element[0],[c])):(b.helper=="clone"?this.element.clone():this.element);
if(!d.parents("body").length){d.appendTo((b.appendTo=="parent"?this.element[0].parentNode:b.appendTo))
}if(d[0]!=this.element[0]&&!(/(fixed|absolute)/).test(d.css("position"))){d.css("position","absolute")
}return d
},_adjustOffsetFromHelper:function(b){if(b.left!=undefined){this.offset.click.left=b.left+this.margins.left
}if(b.right!=undefined){this.offset.click.left=this.helperProportions.width-b.right+this.margins.left
}if(b.top!=undefined){this.offset.click.top=b.top+this.margins.top
}if(b.bottom!=undefined){this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top
}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();
var b=this.offsetParent.offset();
if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0])){b.left+=this.scrollParent.scrollLeft();
b.top+=this.scrollParent.scrollTop()
}if((this.offsetParent[0]==document.body)||(this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&a.browser.msie)){b={top:0,left:0}
}return{top:b.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:b.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}
},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var b=this.element.position();
return{top:b.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:b.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}
}else{return{top:0,left:0}
}},_cacheMargins:function(){this.margins={left:(parseInt(this.element.css("marginLeft"),10)||0),top:(parseInt(this.element.css("marginTop"),10)||0)}
},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}
},_setContainment:function(){var b=this.options;
if(b.containment=="parent"){b.containment=this.helper[0].parentNode
}if(b.containment=="document"||b.containment=="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,a(b.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(a(b.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]
}if(!(/^(document|window|parent)$/).test(b.containment)&&b.containment.constructor!=Array){var e=a(b.containment)[0];
if(!e){return
}var c=a(b.containment).offset();
var d=(a(e).css("overflow")!="hidden");
this.containment=[c.left+(parseInt(a(e).css("borderLeftWidth"),10)||0)+(parseInt(a(e).css("paddingLeft"),10)||0)-this.margins.left,c.top+(parseInt(a(e).css("borderTopWidth"),10)||0)+(parseInt(a(e).css("paddingTop"),10)||0)-this.margins.top,c.left+(d?Math.max(e.scrollWidth,e.offsetWidth):e.offsetWidth)-(parseInt(a(e).css("borderLeftWidth"),10)||0)-(parseInt(a(e).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,c.top+(d?Math.max(e.scrollHeight,e.offsetHeight):e.offsetHeight)-(parseInt(a(e).css("borderTopWidth"),10)||0)-(parseInt(a(e).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]
}else{if(b.containment.constructor==Array){this.containment=b.containment
}}},_convertPositionTo:function(g,b){if(!b){b=this.position
}var f=g=="absolute"?1:-1;
var e=this.options,c=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,h=(/(html|body)/i).test(c[0].tagName);
return{top:(b.top+this.offset.relative.top*f+this.offset.parent.top*f-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(h?0:c.scrollTop()))*f)),left:(b.left+this.offset.relative.left*f+this.offset.parent.left*f-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():h?0:c.scrollLeft())*f))}
},_generatePosition:function(g){var d=this.options,c=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,i=(/(html|body)/i).test(c[0].tagName);
if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0])){this.offset.relative=this._getRelativeOffset()
}var b=g.pageX;
var e=g.pageY;
if(this.originalPosition){if(this.containment){if(g.pageX-this.offset.click.left<this.containment[0]){b=this.containment[0]+this.offset.click.left
}if(g.pageY-this.offset.click.top<this.containment[1]){e=this.containment[1]+this.offset.click.top
}if(g.pageX-this.offset.click.left>this.containment[2]){b=this.containment[2]+this.offset.click.left
}if(g.pageY-this.offset.click.top>this.containment[3]){e=this.containment[3]+this.offset.click.top
}}if(d.grid){var h=this.originalPageY+Math.round((e-this.originalPageY)/d.grid[1])*d.grid[1];
e=this.containment?(!(h-this.offset.click.top<this.containment[1]||h-this.offset.click.top>this.containment[3])?h:(!(h-this.offset.click.top<this.containment[1])?h-d.grid[1]:h+d.grid[1])):h;
var f=this.originalPageX+Math.round((b-this.originalPageX)/d.grid[0])*d.grid[0];
b=this.containment?(!(f-this.offset.click.left<this.containment[0]||f-this.offset.click.left>this.containment[2])?f:(!(f-this.offset.click.left<this.containment[0])?f-d.grid[0]:f+d.grid[0])):f
}}return{top:(e-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(i?0:c.scrollTop())))),left:(b-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():i?0:c.scrollLeft())))}
},_clear:function(){this.helper.removeClass("ui-draggable-dragging");
if(this.helper[0]!=this.element[0]&&!this.cancelHelperRemoval){this.helper.remove()
}this.helper=null;
this.cancelHelperRemoval=false
},_trigger:function(c,b,d){d=d||this._uiHash();
a.ui.plugin.call(this,c,[b,d]);
if(c=="drag"){this.positionAbs=this._convertPositionTo("absolute")
}return a.widget.prototype._trigger.call(this,c,b,d)
},plugins:{},_uiHash:function(b){return{helper:this.helper,position:this.position,absolutePosition:this.positionAbs,offset:this.positionAbs}
}}));
a.extend(a.ui.draggable,{version:"1.7.2",eventPrefix:"drag",defaults:{addClasses:true,appendTo:"parent",axis:false,cancel:":input,option",connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,delay:0,distance:1,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false}});
a.ui.plugin.add("draggable","connectToSortable",{start:function(d,c){var b=a(this).data("draggable"),f=b.options,e=a.extend({},c,{item:b.element});
b.sortables=[];
a(f.connectToSortable).each(function(){var g=a.data(this,"sortable");
if(g&&!g.options.disabled){b.sortables.push({instance:g,shouldRevert:g.options.revert});
g._refreshItems();
g._trigger("activate",d,e)
}})
},stop:function(d,c){var b=a(this).data("draggable"),e=a.extend({},c,{item:b.element});
a.each(b.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;
b.cancelHelperRemoval=true;
this.instance.cancelHelperRemoval=false;
if(this.shouldRevert){this.instance.options.revert=true
}this.instance._mouseStop(d);
this.instance.options.helper=this.instance.options._helper;
if(b.options.helper=="original"){this.instance.currentItem.css({top:"auto",left:"auto"})
}}else{this.instance.cancelHelperRemoval=false;
this.instance._trigger("deactivate",d,e)
}})
},drag:function(d,c){var b=a(this).data("draggable"),e=this;
var f=function(k){var j=this.offset.click.top,i=this.offset.click.left;
var l=this.positionAbs.top,p=this.positionAbs.left;
var m=k.height,g=k.width;
var n=k.top,h=k.left;
return a.ui.isOver(l+j,p+i,n,h,m,g)
};
a.each(b.sortables,function(g){this.instance.positionAbs=b.positionAbs;
this.instance.helperProportions=b.helperProportions;
this.instance.offset.click=b.offset.click;
if(this.instance._intersectsWith(this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=1;
this.instance.currentItem=a(e).clone().appendTo(this.instance.element).data("sortable-item",true);
this.instance.options._helper=this.instance.options.helper;
this.instance.options.helper=function(){return c.helper[0]
};
d.target=this.instance.currentItem[0];
this.instance._mouseCapture(d,true);
this.instance._mouseStart(d,true,true);
this.instance.offset.click.top=b.offset.click.top;
this.instance.offset.click.left=b.offset.click.left;
this.instance.offset.parent.left-=b.offset.parent.left-this.instance.offset.parent.left;
this.instance.offset.parent.top-=b.offset.parent.top-this.instance.offset.parent.top;
b._trigger("toSortable",d);
b.dropped=this.instance.element;
b.currentItem=b.element;
this.instance.fromOutside=b
}if(this.instance.currentItem){this.instance._mouseDrag(d)
}}else{if(this.instance.isOver){this.instance.isOver=0;
this.instance.cancelHelperRemoval=true;
this.instance.options.revert=false;
this.instance._trigger("out",d,this.instance._uiHash(this.instance));
this.instance._mouseStop(d,true);
this.instance.options.helper=this.instance.options._helper;
this.instance.currentItem.remove();
if(this.instance.placeholder){this.instance.placeholder.remove()
}b._trigger("fromSortable",d);
b.dropped=false
}}})
}});
a.ui.plugin.add("draggable","cursor",{start:function(d,c){var e=a("body"),b=a(this).data("draggable").options;
if(e.css("cursor")){b._cursor=e.css("cursor")
}e.css("cursor",b.cursor)
},stop:function(d,c){var b=a(this).data("draggable").options;
if(b._cursor){a("body").css("cursor",b._cursor)
}}});
a.ui.plugin.add("draggable","iframeFix",{start:function(d,c){var b=a(this).data("draggable").options;
a(b.iframeFix===true?"iframe":b.iframeFix).each(function(){a('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1000}).css(a(this).offset()).appendTo("body")
})
},stop:function(c,b){a("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)
})
}});
a.ui.plugin.add("draggable","opacity",{start:function(d,c){var e=a(c.helper),b=a(this).data("draggable").options;
if(e.css("opacity")){b._opacity=e.css("opacity")
}e.css("opacity",b.opacity)
},stop:function(d,c){var b=a(this).data("draggable").options;
if(b._opacity){a(c.helper).css("opacity",b._opacity)
}}});
a.ui.plugin.add("draggable","scroll",{start:function(c,b){var d=a(this).data("draggable");
if(d.scrollParent[0]!=document&&d.scrollParent[0].tagName!="HTML"){d.overflowOffset=d.scrollParent.offset()
}},drag:function(e,c){var f=a(this).data("draggable"),b=f.options,d=false;
if(f.scrollParent[0]!=document&&f.scrollParent[0].tagName!="HTML"){if(!b.axis||b.axis!="x"){if((f.overflowOffset.top+f.scrollParent[0].offsetHeight)-e.pageY<b.scrollSensitivity){f.scrollParent[0].scrollTop=d=f.scrollParent[0].scrollTop+b.scrollSpeed
}else{if(e.pageY-f.overflowOffset.top<b.scrollSensitivity){f.scrollParent[0].scrollTop=d=f.scrollParent[0].scrollTop-b.scrollSpeed
}}}if(!b.axis||b.axis!="y"){if((f.overflowOffset.left+f.scrollParent[0].offsetWidth)-e.pageX<b.scrollSensitivity){f.scrollParent[0].scrollLeft=d=f.scrollParent[0].scrollLeft+b.scrollSpeed
}else{if(e.pageX-f.overflowOffset.left<b.scrollSensitivity){f.scrollParent[0].scrollLeft=d=f.scrollParent[0].scrollLeft-b.scrollSpeed
}}}}else{if(!b.axis||b.axis!="x"){if(e.pageY-a(document).scrollTop()<b.scrollSensitivity){d=a(document).scrollTop(a(document).scrollTop()-b.scrollSpeed)
}else{if(a(window).height()-(e.pageY-a(document).scrollTop())<b.scrollSensitivity){d=a(document).scrollTop(a(document).scrollTop()+b.scrollSpeed)
}}}if(!b.axis||b.axis!="y"){if(e.pageX-a(document).scrollLeft()<b.scrollSensitivity){d=a(document).scrollLeft(a(document).scrollLeft()-b.scrollSpeed)
}else{if(a(window).width()-(e.pageX-a(document).scrollLeft())<b.scrollSensitivity){d=a(document).scrollLeft(a(document).scrollLeft()+b.scrollSpeed)
}}}}if(d!==false&&a.ui.ddmanager&&!b.dropBehaviour){a.ui.ddmanager.prepareOffsets(f,e)
}}});
a.ui.plugin.add("draggable","snap",{start:function(d,c){var e=a(this).data("draggable"),b=e.options;
e.snapElements=[];
a(b.snap.constructor!=String?(b.snap.items||":data(draggable)"):b.snap).each(function(){var g=a(this);
var f=g.offset();
if(this!=e.element[0]){e.snapElements.push({item:this,width:g.outerWidth(),height:g.outerHeight(),top:f.top,left:f.left})
}})
},drag:function(n,z){var y=a(this).data("draggable"),v=y.options;
var x=v.snapTolerance;
var f=z.offset.left,k=f+y.helperProportions.width,g=z.offset.top,m=g+y.helperProportions.height;
for(var p=y.snapElements.length-1;
p>=0;
p--){var q=y.snapElements[p].left,h=q+y.snapElements[p].width,j=y.snapElements[p].top,w=j+y.snapElements[p].height;
if(!((q-x<f&&f<h+x&&j-x<g&&g<w+x)||(q-x<f&&f<h+x&&j-x<m&&m<w+x)||(q-x<k&&k<h+x&&j-x<g&&g<w+x)||(q-x<k&&k<h+x&&j-x<m&&m<w+x))){if(y.snapElements[p].snapping){(y.options.snap.release&&y.options.snap.release.call(y.element,n,a.extend(y._uiHash(),{snapItem:y.snapElements[p].item})))
}y.snapElements[p].snapping=false;
continue
}if(v.snapMode!="inner"){var A=Math.abs(j-m)<=x;
var s=Math.abs(w-g)<=x;
var u=Math.abs(q-k)<=x;
var e=Math.abs(h-f)<=x;
if(A){z.position.top=y._convertPositionTo("relative",{top:j-y.helperProportions.height,left:0}).top-y.margins.top
}if(s){z.position.top=y._convertPositionTo("relative",{top:w,left:0}).top-y.margins.top
}if(u){z.position.left=y._convertPositionTo("relative",{top:0,left:q-y.helperProportions.width}).left-y.margins.left
}if(e){z.position.left=y._convertPositionTo("relative",{top:0,left:h}).left-y.margins.left
}}var c=(A||s||u||e);
if(v.snapMode!="outer"){var A=Math.abs(j-g)<=x;
var s=Math.abs(w-m)<=x;
var u=Math.abs(q-f)<=x;
var e=Math.abs(h-k)<=x;
if(A){z.position.top=y._convertPositionTo("relative",{top:j,left:0}).top-y.margins.top
}if(s){z.position.top=y._convertPositionTo("relative",{top:w-y.helperProportions.height,left:0}).top-y.margins.top
}if(u){z.position.left=y._convertPositionTo("relative",{top:0,left:q}).left-y.margins.left
}if(e){z.position.left=y._convertPositionTo("relative",{top:0,left:h-y.helperProportions.width}).left-y.margins.left
}}if(!y.snapElements[p].snapping&&(A||s||u||e||c)){(y.options.snap.snap&&y.options.snap.snap.call(y.element,n,a.extend(y._uiHash(),{snapItem:y.snapElements[p].item})))
}y.snapElements[p].snapping=(A||s||u||e||c)
}}});
a.ui.plugin.add("draggable","stack",{start:function(e,c){var b=a(this).data("draggable").options;
var d=a.makeArray(a(b.stack.group)).sort(function(f,g){return(parseInt(a(f).css("zIndex"),10)||b.stack.min)-(parseInt(a(g).css("zIndex"),10)||b.stack.min)
});
a(d).each(function(f){this.style.zIndex=b.stack.min+f
});
this[0].style.zIndex=b.stack.min+d.length
}});
a.ui.plugin.add("draggable","zIndex",{start:function(d,c){var e=a(c.helper),b=a(this).data("draggable").options;
if(e.css("zIndex")){b._zIndex=e.css("zIndex")
}e.css("zIndex",b.zIndex)
},stop:function(d,c){var b=a(this).data("draggable").options;
if(b._zIndex){a(c.helper).css("zIndex",b._zIndex)
}}})
})(jQuery);
(function(a){a.widget("ui.droppable",{_init:function(){var b=this.options,c=b.accept;
this.isover=0;
this.isout=1;
this.options.accept=this.options.accept&&a.isFunction(this.options.accept)?this.options.accept:function(e){return e.is(c)
};
this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};
a.ui.ddmanager.droppables[this.options.scope]=a.ui.ddmanager.droppables[this.options.scope]||[];
a.ui.ddmanager.droppables[this.options.scope].push(this);
(this.options.addClasses&&this.element.addClass("ui-droppable"))
},destroy:function(){var b=a.ui.ddmanager.droppables[this.options.scope];
for(var c=0;
c<b.length;
c++){if(b[c]==this){b.splice(c,1)
}}this.element.removeClass("ui-droppable ui-droppable-disabled").removeData("droppable").unbind(".droppable")
},_setData:function(b,c){if(b=="accept"){this.options.accept=c&&a.isFunction(c)?c:function(e){return e.is(c)
}
}else{a.widget.prototype._setData.apply(this,arguments)
}},_activate:function(b){var c=a.ui.ddmanager.current;
if(this.options.activeClass){this.element.addClass(this.options.activeClass)
}(c&&this._trigger("activate",b,this.ui(c)))
},_deactivate:function(b){var c=a.ui.ddmanager.current;
if(this.options.activeClass){this.element.removeClass(this.options.activeClass)
}(c&&this._trigger("deactivate",b,this.ui(c)))
},_over:function(b){var c=a.ui.ddmanager.current;
if(!c||(c.currentItem||c.element)[0]==this.element[0]){return
}if(this.options.accept.call(this.element[0],(c.currentItem||c.element))){if(this.options.hoverClass){this.element.addClass(this.options.hoverClass)
}this._trigger("over",b,this.ui(c))
}},_out:function(b){var c=a.ui.ddmanager.current;
if(!c||(c.currentItem||c.element)[0]==this.element[0]){return
}if(this.options.accept.call(this.element[0],(c.currentItem||c.element))){if(this.options.hoverClass){this.element.removeClass(this.options.hoverClass)
}this._trigger("out",b,this.ui(c))
}},_drop:function(e,c){var b=c||a.ui.ddmanager.current;
if(!b||(b.currentItem||b.element)[0]==this.element[0]){return false
}var d=false;
this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function(){var f=a.data(this,"droppable");
if(f.options.greedy&&a.ui.intersect(b,a.extend(f,{offset:f.element.offset()}),f.options.tolerance)){d=true;
return false
}});
if(d){return false
}if(this.options.accept.call(this.element[0],(b.currentItem||b.element))){if(this.options.activeClass){this.element.removeClass(this.options.activeClass)
}if(this.options.hoverClass){this.element.removeClass(this.options.hoverClass)
}this._trigger("drop",e,this.ui(b));
return this.element
}return false
},ui:function(b){return{draggable:(b.currentItem||b.element),helper:b.helper,position:b.position,absolutePosition:b.positionAbs,offset:b.positionAbs}
}});
a.extend(a.ui.droppable,{version:"1.7.2",eventPrefix:"drop",defaults:{accept:"*",activeClass:false,addClasses:true,greedy:false,hoverClass:false,scope:"default",tolerance:"intersect"}});
a.ui.intersect=function(g,q,n){if(!q.offset){return false
}var c=(g.positionAbs||g.position.absolute).left,j=c+g.helperProportions.width,f=(g.positionAbs||g.position.absolute).top,k=f+g.helperProportions.height;
var o=q.offset.left,h=o+q.proportions.width,i=q.offset.top,p=i+q.proportions.height;
switch(n){case"fit":return(o<c&&j<h&&i<f&&k<p);
break;
case"intersect":return(o<c+(g.helperProportions.width/2)&&j-(g.helperProportions.width/2)<h&&i<f+(g.helperProportions.height/2)&&k-(g.helperProportions.height/2)<p);
break;
case"pointer":var e=((g.positionAbs||g.position.absolute).left+(g.clickOffset||g.offset.click).left),d=((g.positionAbs||g.position.absolute).top+(g.clickOffset||g.offset.click).top),m=a.ui.isOver(d,e,i,o,q.proportions.height,q.proportions.width);
return m;
break;
case"touch":return((f>=i&&f<=p)||(k>=i&&k<=p)||(f<i&&k>p))&&((c>=o&&c<=h)||(j>=o&&j<=h)||(c<o&&j>h));
break;
default:return false;
break
}};
a.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(h,g){var d=a.ui.ddmanager.droppables[h.options.scope];
var f=g?g.type:null;
var e=(h.currentItem||h.element).find(":data(droppable)").andSelf();
droppablesLoop:for(var b=0;
b<d.length;
b++){if(d[b].options.disabled||(h&&!d[b].options.accept.call(d[b].element[0],(h.currentItem||h.element)))){continue
}for(var c=0;
c<e.length;
c++){if(e[c]==d[b].element[0]){d[b].proportions.height=0;
continue droppablesLoop
}}d[b].visible=d[b].element.css("display")!="none";
if(!d[b].visible){continue
}d[b].offset=d[b].element.offset();
d[b].proportions={width:d[b].element[0].offsetWidth,height:d[b].element[0].offsetHeight};
if(f=="mousedown"){d[b]._activate.call(d[b],g)
}}},drop:function(b,c){var d=false;
a.each(a.ui.ddmanager.droppables[b.options.scope],function(){if(!this.options){return
}if(!this.options.disabled&&this.visible&&a.ui.intersect(b,this,this.options.tolerance)){d=this._drop.call(this,c)
}if(!this.options.disabled&&this.visible&&this.options.accept.call(this.element[0],(b.currentItem||b.element))){this.isout=1;
this.isover=0;
this._deactivate.call(this,c)
}});
return d
},drag:function(c,b){if(c.options.refreshPositions){a.ui.ddmanager.prepareOffsets(c,b)
}a.each(a.ui.ddmanager.droppables[c.options.scope],function(){if(this.options.disabled||this.greedyChild||!this.visible){return
}var g=a.ui.intersect(c,this,this.options.tolerance);
var f=!g&&this.isover==1?"isout":(g&&this.isover==0?"isover":null);
if(!f){return
}var e;
if(this.options.greedy){var d=this.element.parents(":data(droppable):eq(0)");
if(d.length){e=a.data(d[0],"droppable");
e.greedyChild=(f=="isover"?1:0)
}}if(e&&f=="isover"){e.isover=0;
e.isout=1;
e._out.call(e,b)
}this[f]=1;
this[f=="isout"?"isover":"isout"]=0;
this[f=="isover"?"_over":"_out"].call(this,b);
if(e&&f=="isout"){e.isout=0;
e.isover=1;
e._over.call(e,b)
}})
}}
})(jQuery);
(function(c){c.widget("ui.resizable",c.extend({},c.ui.mouse,{_init:function(){var e=this,h=this.options;
this.element.addClass("ui-resizable");
c.extend(this,{_aspectRatio:!!(h.aspectRatio),aspectRatio:h.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:h.helper||h.ghost||h.animate?h.helper||"ui-resizable-helper":null});
if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)){if(/relative/.test(this.element.css("position"))&&c.browser.opera){this.element.css({position:"relative",top:"auto",left:"auto"})
}this.element.wrap(c('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")}));
this.element=this.element.parent().data("resizable",this.element.data("resizable"));
this.elementIsWrapper=true;
this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});
this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});
this.originalResizeStyle=this.originalElement.css("resize");
this.originalElement.css("resize","none");
this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));
this.originalElement.css({margin:this.originalElement.css("margin")});
this._proportionallyResize()
}this.handles=h.handles||(!c(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"});
if(this.handles.constructor==String){if(this.handles=="all"){this.handles="n,e,s,w,se,sw,ne,nw"
}var g=this.handles.split(",");
this.handles={};
for(var d=0;
d<g.length;
d++){var f=c.trim(g[d]),k="ui-resizable-"+f;
var j=c('<div class="ui-resizable-handle '+k+'"></div>');
if(/sw|se|ne|nw/.test(f)){j.css({zIndex:++h.zIndex})
}if("se"==f){j.addClass("ui-icon ui-icon-gripsmall-diagonal-se")
}this.handles[f]=".ui-resizable-"+f;
this.element.append(j)
}}this._renderAxis=function(l){l=l||this.element;
for(var m in this.handles){if(this.handles[m].constructor==String){this.handles[m]=c(this.handles[m],this.element).show()
}if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var o=c(this.handles[m],this.element),p=0;
p=/sw|ne|nw|se|n|s/.test(m)?o.outerHeight():o.outerWidth();
var n=["padding",/ne|nw|n/.test(m)?"Top":/se|sw|s/.test(m)?"Bottom":/^e$/.test(m)?"Right":"Left"].join("");
l.css(n,p);
this._proportionallyResize()
}if(!c(this.handles[m]).length){continue
}}};
this._renderAxis(this.element);
this._handles=c(".ui-resizable-handle",this.element).disableSelection();
this._handles.mouseover(function(){if(!e.resizing){if(this.className){var i=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)
}e.axis=i&&i[1]?i[1]:"se"
}});
if(h.autoHide){this._handles.hide();
c(this.element).addClass("ui-resizable-autohide").hover(function(){c(this).removeClass("ui-resizable-autohide");
e._handles.show()
},function(){if(!e.resizing){c(this).addClass("ui-resizable-autohide");
e._handles.hide()
}})
}this._mouseInit()
},destroy:function(){this._mouseDestroy();
var e=function(f){c(f).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()
};
if(this.elementIsWrapper){e(this.element);
var d=this.element;
d.parent().append(this.originalElement.css({position:d.css("position"),width:d.outerWidth(),height:d.outerHeight(),top:d.css("top"),left:d.css("left")})).end().remove()
}this.originalElement.css("resize",this.originalResizeStyle);
e(this.originalElement)
},_mouseCapture:function(f){var d=false;
for(var e in this.handles){if(c(this.handles[e])[0]==f.target){d=true
}}return this.options.disabled||!!d
},_mouseStart:function(d){var g=this.options,e=this.element.position(),i=this.element;
this.resizing=true;
this.documentScroll={top:c(document).scrollTop(),left:c(document).scrollLeft()};
if(i.is(".ui-draggable")||(/absolute/).test(i.css("position"))){i.css({position:"absolute",top:e.top,left:e.left})
}if(c.browser.opera&&(/relative/).test(i.css("position"))){i.css({position:"relative",top:"auto",left:"auto"})
}this._renderProxy();
var f=a(this.helper.css("left")),h=a(this.helper.css("top"));
if(g.containment){f+=c(g.containment).scrollLeft()||0;
h+=c(g.containment).scrollTop()||0
}this.offset=this.helper.offset();
this.position={left:f,top:h};
this.size=this._helper?{width:i.outerWidth(),height:i.outerHeight()}:{width:i.width(),height:i.height()};
this.originalSize=this._helper?{width:i.outerWidth(),height:i.outerHeight()}:{width:i.width(),height:i.height()};
this.originalPosition={left:f,top:h};
this.sizeDiff={width:i.outerWidth()-i.width(),height:i.outerHeight()-i.height()};
this.originalMousePosition={left:d.pageX,top:d.pageY};
this.aspectRatio=(typeof g.aspectRatio=="number")?g.aspectRatio:((this.originalSize.width/this.originalSize.height)||1);
var j=c(".ui-resizable-"+this.axis).css("cursor");
c("body").css("cursor",j=="auto"?this.axis+"-resize":j);
i.addClass("ui-resizable-resizing");
this._propagate("start",d);
return true
},_mouseDrag:function(j){var e=this.helper,m=this.options,q={},h=this,l=this.originalMousePosition,n=this.axis;
var f=(j.pageX-l.left)||0,g=(j.pageY-l.top)||0;
var p=this._change[n];
if(!p){return false
}var d=p.apply(this,[j,f,g]),i=c.browser.msie&&c.browser.version<7,k=this.sizeDiff;
if(this._aspectRatio||j.shiftKey){d=this._updateRatio(d,j)
}d=this._respectSize(d,j);
this._propagate("resize",j);
e.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});
if(!this._helper&&this._proportionallyResizeElements.length){this._proportionallyResize()
}this._updateCache(d);
this._trigger("resize",j,this.ui());
return false
},_mouseStop:function(i){this.resizing=false;
var f=this.options,d=this;
if(this._helper){var l=this._proportionallyResizeElements,h=l.length&&(/textarea/i).test(l[0].nodeName),j=h&&c.ui.hasScroll(l[0],"left")?0:d.sizeDiff.height,e=h?0:d.sizeDiff.width;
var k={width:(d.size.width-e),height:(d.size.height-j)},g=(parseInt(d.element.css("left"),10)+(d.position.left-d.originalPosition.left))||null,m=(parseInt(d.element.css("top"),10)+(d.position.top-d.originalPosition.top))||null;
if(!f.animate){this.element.css(c.extend(k,{top:m,left:g}))
}d.helper.height(d.size.height);
d.helper.width(d.size.width);
if(this._helper&&!f.animate){this._proportionallyResize()
}}c("body").css("cursor","auto");
this.element.removeClass("ui-resizable-resizing");
this._propagate("stop",i);
if(this._helper){this.helper.remove()
}return false
},_updateCache:function(d){var e=this.options;
this.offset=this.helper.offset();
if(b(d.left)){this.position.left=d.left
}if(b(d.top)){this.position.top=d.top
}if(b(d.height)){this.size.height=d.height
}if(b(d.width)){this.size.width=d.width
}},_updateRatio:function(e,h){var f=this.options,d=this.position,i=this.size,g=this.axis;
if(e.height){e.width=(i.height*this.aspectRatio)
}else{if(e.width){e.height=(i.width/this.aspectRatio)
}}if(g=="sw"){e.left=d.left+(i.width-e.width);
e.top=null
}if(g=="nw"){e.top=d.top+(i.height-e.height);
e.left=d.left+(i.width-e.width)
}return e
},_respectSize:function(d,l){var f=this.helper,n=this.options,e=this._aspectRatio||l.shiftKey,p=this.axis,m=b(d.width)&&n.maxWidth&&(n.maxWidth<d.width),k=b(d.height)&&n.maxHeight&&(n.maxHeight<d.height),g=b(d.width)&&n.minWidth&&(n.minWidth>d.width),h=b(d.height)&&n.minHeight&&(n.minHeight>d.height);
if(g){d.width=n.minWidth
}if(h){d.height=n.minHeight
}if(m){d.width=n.maxWidth
}if(k){d.height=n.maxHeight
}var r=this.originalPosition.left+this.originalSize.width,j=this.position.top+this.size.height;
var q=/sw|nw|w/.test(p),i=/nw|ne|n/.test(p);
if(g&&q){d.left=r-n.minWidth
}if(m&&q){d.left=r-n.maxWidth
}if(h&&i){d.top=j-n.minHeight
}if(k&&i){d.top=j-n.maxHeight
}var s=!d.width&&!d.height;
if(s&&!d.left&&d.top){d.top=null
}else{if(s&&!d.top&&d.left){d.left=null
}}return d
},_proportionallyResize:function(){var f=this.options;
if(!this._proportionallyResizeElements.length){return
}var d=this.helper||this.element;
for(var e=0;
e<this._proportionallyResizeElements.length;
e++){var j=this._proportionallyResizeElements[e];
if(!this.borderDif){var h=[j.css("borderTopWidth"),j.css("borderRightWidth"),j.css("borderBottomWidth"),j.css("borderLeftWidth")],g=[j.css("paddingTop"),j.css("paddingRight"),j.css("paddingBottom"),j.css("paddingLeft")];
this.borderDif=c.map(h,function(n,l){var k=parseInt(n,10)||0,m=parseInt(g[l],10)||0;
return k+m
})
}if(c.browser.msie&&!(!(c(d).is(":hidden")||c(d).parents(":hidden").length))){continue
}j.css({height:(d.height()-this.borderDif[0]-this.borderDif[2])||0,width:(d.width()-this.borderDif[1]-this.borderDif[3])||0})
}},_renderProxy:function(){var g=this.element,d=this.options;
this.elementOffset=g.offset();
if(this._helper){this.helper=this.helper||c('<div style="overflow:hidden;"></div>');
var f=c.browser.msie&&c.browser.version<7,h=(f?1:0),e=(f?2:-1);
this.helper.addClass(this._helper).css({width:this.element.outerWidth()+e,height:this.element.outerHeight()+e,position:"absolute",left:this.elementOffset.left-h+"px",top:this.elementOffset.top-h+"px",zIndex:++d.zIndex});
this.helper.appendTo("body").disableSelection()
}else{this.helper=this.element
}},_change:{e:function(e,f,d){return{width:this.originalSize.width+f}
},w:function(h,e,g){var f=this.options,d=this.originalSize,i=this.originalPosition;
return{left:i.left+e,width:d.width-e}
},n:function(h,e,g){var f=this.options,d=this.originalSize,i=this.originalPosition;
return{top:i.top+g,height:d.height-g}
},s:function(e,f,d){return{height:this.originalSize.height+d}
},se:function(e,f,d){return c.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,f,d]))
},sw:function(e,f,d){return c.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,f,d]))
},ne:function(e,f,d){return c.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,f,d]))
},nw:function(e,f,d){return c.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,f,d]))
}},_propagate:function(d,e){c.ui.plugin.call(this,d,[e,this.ui()]);
(d!="resize"&&this._trigger(d,e,this.ui()))
},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}
}}));
c.extend(c.ui.resizable,{version:"1.7.2",eventPrefix:"resize",defaults:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,cancel:":input,option",containment:false,delay:0,distance:1,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1000}});
c.ui.plugin.add("resizable","alsoResize",{start:function(f,e){var g=c(this).data("resizable"),d=g.options;
_store=function(h){c(h).each(function(){c(this).data("resizable-alsoresize",{width:parseInt(c(this).width(),10),height:parseInt(c(this).height(),10),left:parseInt(c(this).css("left"),10),top:parseInt(c(this).css("top"),10)})
})
};
if(typeof(d.alsoResize)=="object"&&!d.alsoResize.parentNode){if(d.alsoResize.length){d.alsoResize=d.alsoResize[0];
_store(d.alsoResize)
}else{c.each(d.alsoResize,function(i,h){_store(i)
})
}}else{_store(d.alsoResize)
}},resize:function(i,g){var e=c(this).data("resizable"),f=e.options,j=e.originalSize,h=e.originalPosition;
var k={height:(e.size.height-j.height)||0,width:(e.size.width-j.width)||0,top:(e.position.top-h.top)||0,left:(e.position.left-h.left)||0},d=function(m,l){c(m).each(function(){var p=c(this),q=c(this).data("resizable-alsoresize"),n={},o=l&&l.length?l:["width","height","top","left"];
c.each(o||["width","height","top","left"],function(r,s){var u=(q[s]||0)+(k[s]||0);
if(u&&u>=0){n[s]=u||null
}});
if(/relative/.test(p.css("position"))&&c.browser.opera){e._revertToRelativePosition=true;
p.css({position:"absolute",top:"auto",left:"auto"})
}p.css(n)
})
};
if(typeof(f.alsoResize)=="object"&&!f.alsoResize.nodeType){c.each(f.alsoResize,function(m,l){d(m,l)
})
}else{d(f.alsoResize)
}},stop:function(e,d){var f=c(this).data("resizable");
if(f._revertToRelativePosition&&c.browser.opera){f._revertToRelativePosition=false;
el.css({position:"relative"})
}c(this).removeData("resizable-alsoresize-start")
}});
c.ui.plugin.add("resizable","animate",{stop:function(k,i){var e=c(this).data("resizable"),g=e.options;
var m=e._proportionallyResizeElements,j=m.length&&(/textarea/i).test(m[0].nodeName),l=j&&c.ui.hasScroll(m[0],"left")?0:e.sizeDiff.height,f=j?0:e.sizeDiff.width;
var d={width:(e.size.width-f),height:(e.size.height-l)},h=(parseInt(e.element.css("left"),10)+(e.position.left-e.originalPosition.left))||null,n=(parseInt(e.element.css("top"),10)+(e.position.top-e.originalPosition.top))||null;
e.element.animate(c.extend(d,n&&h?{top:n,left:h}:{}),{duration:g.animateDuration,easing:g.animateEasing,step:function(){var o={width:parseInt(e.element.css("width"),10),height:parseInt(e.element.css("height"),10),top:parseInt(e.element.css("top"),10),left:parseInt(e.element.css("left"),10)};
if(m&&m.length){c(m[0]).css({width:o.width,height:o.height})
}e._updateCache(o);
e._propagate("resize",k)
}})
}});
c.ui.plugin.add("resizable","containment",{start:function(k,r){var j=c(this).data("resizable"),m=j.options,f=j.element;
var l=m.containment,d=(l instanceof c)?l.get(0):(/parent/.test(l))?f.parent().get(0):l;
if(!d){return
}j.containerElement=c(d);
if(/document/.test(l)||l==document){j.containerOffset={left:0,top:0};
j.containerPosition={left:0,top:0};
j.parentData={element:c(document),left:0,top:0,width:c(document).width(),height:c(document).height()||document.body.parentNode.scrollHeight}
}else{var h=c(d),i=[];
c(["Top","Right","Left","Bottom"]).each(function(p,o){i[p]=a(h.css("padding"+o))
});
j.containerOffset=h.offset();
j.containerPosition=h.position();
j.containerSize={height:(h.innerHeight()-i[3]),width:(h.innerWidth()-i[1])};
var n=j.containerOffset,e=j.containerSize.height,q=j.containerSize.width,s=(c.ui.hasScroll(d,"left")?d.scrollWidth:q),g=(c.ui.hasScroll(d)?d.scrollHeight:e);
j.parentData={element:d,left:n.left,top:n.top,width:s,height:g}
}},resize:function(h,r){var g=c(this).data("resizable"),l=g.options,f=g.containerSize,n=g.containerOffset,q=g.size,d=g.position,k=g._aspectRatio||h.shiftKey,j={top:0,left:0},e=g.containerElement;
if(e[0]!=document&&(/static/).test(e.css("position"))){j=n
}if(d.left<(g._helper?n.left:0)){g.size.width=g.size.width+(g._helper?(g.position.left-n.left):(g.position.left-j.left));
if(k){g.size.height=g.size.width/l.aspectRatio
}g.position.left=l.helper?n.left:0
}if(d.top<(g._helper?n.top:0)){g.size.height=g.size.height+(g._helper?(g.position.top-n.top):g.position.top);
if(k){g.size.width=g.size.height*l.aspectRatio
}g.position.top=g._helper?n.top:0
}g.offset.left=g.parentData.left+g.position.left;
g.offset.top=g.parentData.top+g.position.top;
var p=Math.abs((g._helper?g.offset.left-j.left:(g.offset.left-j.left))+g.sizeDiff.width),s=Math.abs((g._helper?g.offset.top-j.top:(g.offset.top-n.top))+g.sizeDiff.height);
var i=g.containerElement.get(0)==g.element.parent().get(0),m=/relative|absolute/.test(g.containerElement.css("position"));
if(i&&m){p-=g.parentData.left
}if(p+g.size.width>=g.parentData.width){g.size.width=g.parentData.width-p;
if(k){g.size.height=g.size.width/g.aspectRatio
}}if(s+g.size.height>=g.parentData.height){g.size.height=g.parentData.height-s;
if(k){g.size.width=g.size.height*g.aspectRatio
}}},stop:function(l,j){var g=c(this).data("resizable"),i=g.options,n=g.position,m=g.containerOffset,k=g.containerPosition,e=g.containerElement;
var p=c(g.helper),f=p.offset(),q=p.outerWidth()-g.sizeDiff.width,d=p.outerHeight()-g.sizeDiff.height;
if(g._helper&&!i.animate&&(/relative/).test(e.css("position"))){c(this).css({left:f.left-k.left-m.left,width:q,height:d})
}if(g._helper&&!i.animate&&(/static/).test(e.css("position"))){c(this).css({left:f.left-k.left-m.left,width:q,height:d})
}}});
c.ui.plugin.add("resizable","ghost",{start:function(f,e){var g=c(this).data("resizable"),d=g.options,h=g.size;
g.ghost=g.originalElement.clone();
g.ghost.css({opacity:0.25,display:"block",position:"relative",height:h.height,width:h.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof d.ghost=="string"?d.ghost:"");
g.ghost.appendTo(g.helper)
},resize:function(f,e){var g=c(this).data("resizable"),d=g.options;
if(g.ghost){g.ghost.css({position:"relative",height:g.size.height,width:g.size.width})
}},stop:function(f,e){var g=c(this).data("resizable"),d=g.options;
if(g.ghost&&g.helper){g.helper.get(0).removeChild(g.ghost.get(0))
}}});
c.ui.plugin.add("resizable","grid",{resize:function(l,j){var g=c(this).data("resizable"),i=g.options,d=g.size,m=g.originalSize,k=g.originalPosition,n=g.axis,e=i._aspectRatio||l.shiftKey;
i.grid=typeof i.grid=="number"?[i.grid,i.grid]:i.grid;
var f=Math.round((d.width-m.width)/(i.grid[0]||1))*(i.grid[0]||1),h=Math.round((d.height-m.height)/(i.grid[1]||1))*(i.grid[1]||1);
if(/^(se|s|e)$/.test(n)){g.size.width=m.width+f;
g.size.height=m.height+h
}else{if(/^(ne)$/.test(n)){g.size.width=m.width+f;
g.size.height=m.height+h;
g.position.top=k.top-h
}else{if(/^(sw)$/.test(n)){g.size.width=m.width+f;
g.size.height=m.height+h;
g.position.left=k.left-f
}else{g.size.width=m.width+f;
g.size.height=m.height+h;
g.position.top=k.top-h;
g.position.left=k.left-f
}}}}});
var a=function(d){return parseInt(d,10)||0
};
var b=function(d){return !isNaN(parseInt(d,10))
}
})(jQuery);
(function(a){a.widget("ui.selectable",a.extend({},a.ui.mouse,{_init:function(){var b=this;
this.element.addClass("ui-selectable");
this.dragged=false;
var c;
this.refresh=function(){c=a(b.options.filter,b.element[0]);
c.each(function(){var e=a(this);
var d=e.offset();
a.data(this,"selectable-item",{element:this,$element:e,left:d.left,top:d.top,right:d.left+e.outerWidth(),bottom:d.top+e.outerHeight(),startselected:false,selected:e.hasClass("ui-selected"),selecting:e.hasClass("ui-selecting"),unselecting:e.hasClass("ui-unselecting")})
})
};
this.refresh();
this.selectees=c.addClass("ui-selectee");
this._mouseInit();
this.helper=a(document.createElement("div")).css({border:"1px dotted black"}).addClass("ui-selectable-helper")
},destroy:function(){this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable");
this._mouseDestroy()
},_mouseStart:function(b){var c=this;
this.opos=[b.pageX,b.pageY];
if(this.options.disabled){return
}var d=this.options;
this.selectees=a(d.filter,this.element[0]);
this._trigger("start",b);
a(d.appendTo).append(this.helper);
this.helper.css({"z-index":100,position:"absolute",left:b.clientX,top:b.clientY,width:0,height:0});
if(d.autoRefresh){this.refresh()
}this.selectees.filter(".ui-selected").each(function(){var e=a.data(this,"selectable-item");
e.startselected=true;
if(!b.metaKey){e.$element.removeClass("ui-selected");
e.selected=false;
e.$element.addClass("ui-unselecting");
e.unselecting=true;
c._trigger("unselecting",b,{unselecting:e.element})
}});
a(b.target).parents().andSelf().each(function(){var e=a.data(this,"selectable-item");
if(e){e.$element.removeClass("ui-unselecting").addClass("ui-selecting");
e.unselecting=false;
e.selecting=true;
e.selected=true;
c._trigger("selecting",b,{selecting:e.element});
return false
}})
},_mouseDrag:function(i){var d=this;
this.dragged=true;
if(this.options.disabled){return
}var c=this.options;
var b=this.opos[0],e=this.opos[1],f=i.pageX,g=i.pageY;
if(b>f){var h=f;
f=b;
b=h
}if(e>g){var h=g;
g=e;
e=h
}this.helper.css({left:b,top:e,width:f-b,height:g-e});
this.selectees.each(function(){var j=a.data(this,"selectable-item");
if(!j||j.element==d.element[0]){return
}var k=false;
if(c.tolerance=="touch"){k=(!(j.left>f||j.right<b||j.top>g||j.bottom<e))
}else{if(c.tolerance=="fit"){k=(j.left>b&&j.right<f&&j.top>e&&j.bottom<g)
}}if(k){if(j.selected){j.$element.removeClass("ui-selected");
j.selected=false
}if(j.unselecting){j.$element.removeClass("ui-unselecting");
j.unselecting=false
}if(!j.selecting){j.$element.addClass("ui-selecting");
j.selecting=true;
d._trigger("selecting",i,{selecting:j.element})
}}else{if(j.selecting){if(i.metaKey&&j.startselected){j.$element.removeClass("ui-selecting");
j.selecting=false;
j.$element.addClass("ui-selected");
j.selected=true
}else{j.$element.removeClass("ui-selecting");
j.selecting=false;
if(j.startselected){j.$element.addClass("ui-unselecting");
j.unselecting=true
}d._trigger("unselecting",i,{unselecting:j.element})
}}if(j.selected){if(!i.metaKey&&!j.startselected){j.$element.removeClass("ui-selected");
j.selected=false;
j.$element.addClass("ui-unselecting");
j.unselecting=true;
d._trigger("unselecting",i,{unselecting:j.element})
}}}});
return false
},_mouseStop:function(b){var c=this;
this.dragged=false;
var d=this.options;
a(".ui-unselecting",this.element[0]).each(function(){var e=a.data(this,"selectable-item");
e.$element.removeClass("ui-unselecting");
e.unselecting=false;
e.startselected=false;
c._trigger("unselected",b,{unselected:e.element})
});
a(".ui-selecting",this.element[0]).each(function(){var e=a.data(this,"selectable-item");
e.$element.removeClass("ui-selecting").addClass("ui-selected");
e.selecting=false;
e.selected=true;
e.startselected=true;
c._trigger("selected",b,{selected:e.element})
});
this._trigger("stop",b);
this.helper.remove();
return false
}}));
a.extend(a.ui.selectable,{version:"1.7.2",defaults:{appendTo:"body",autoRefresh:true,cancel:":input,option",delay:0,distance:0,filter:"*",tolerance:"touch"}})
})(jQuery);
(function(a){a.widget("ui.sortable",a.extend({},a.ui.mouse,{_init:function(){var b=this.options;
this.containerCache={};
this.element.addClass("ui-sortable");
this.refresh();
this.floating=this.items.length?(/left|right/).test(this.items[0].item.css("float")):false;
this.offset=this.element.offset();
this._mouseInit()
},destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").removeData("sortable").unbind(".sortable");
this._mouseDestroy();
for(var b=this.items.length-1;
b>=0;
b--){this.items[b].item.removeData("sortable-item")
}},_mouseCapture:function(b,f){if(this.reverting){return false
}if(this.options.disabled||this.options.type=="static"){return false
}this._refreshItems(b);
var e=null,c=this,g=a(b.target).parents().each(function(){if(a.data(this,"sortable-item")==c){e=a(this);
return false
}});
if(a.data(b.target,"sortable-item")==c){e=a(b.target)
}if(!e){return false
}if(this.options.handle&&!f){var d=false;
a(this.options.handle,e).find("*").andSelf().each(function(){if(this==b.target){d=true
}});
if(!d){return false
}}this.currentItem=e;
this._removeCurrentsFromItems();
return true
},_mouseStart:function(b,f,g){var e=this.options,d=this;
this.currentContainer=this;
this.refreshPositions();
this.helper=this._createHelper(b);
this._cacheHelperProportions();
this._cacheMargins();
this.scrollParent=this.helper.scrollParent();
this.offset=this.currentItem.offset();
this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};
this.helper.css("position","absolute");
this.cssPosition=this.helper.css("position");
a.extend(this.offset,{click:{left:b.pageX-this.offset.left,top:b.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});
this.originalPosition=this._generatePosition(b);
this.originalPageX=b.pageX;
this.originalPageY=b.pageY;
if(e.cursorAt){this._adjustOffsetFromHelper(e.cursorAt)
}this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};
if(this.helper[0]!=this.currentItem[0]){this.currentItem.hide()
}this._createPlaceholder();
if(e.containment){this._setContainment()
}if(e.cursor){if(a("body").css("cursor")){this._storedCursor=a("body").css("cursor")
}a("body").css("cursor",e.cursor)
}if(e.opacity){if(this.helper.css("opacity")){this._storedOpacity=this.helper.css("opacity")
}this.helper.css("opacity",e.opacity)
}if(e.zIndex){if(this.helper.css("zIndex")){this._storedZIndex=this.helper.css("zIndex")
}this.helper.css("zIndex",e.zIndex)
}if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){this.overflowOffset=this.scrollParent.offset()
}this._trigger("start",b,this._uiHash());
if(!this._preserveHelperProportions){this._cacheHelperProportions()
}if(!g){for(var c=this.containers.length-1;
c>=0;
c--){this.containers[c]._trigger("activate",b,d._uiHash(this))
}}if(a.ui.ddmanager){a.ui.ddmanager.current=this
}if(a.ui.ddmanager&&!e.dropBehaviour){a.ui.ddmanager.prepareOffsets(this,b)
}this.dragging=true;
this.helper.addClass("ui-sortable-helper");
this._mouseDrag(b);
return true
},_mouseDrag:function(f){this.position=this._generatePosition(f);
this.positionAbs=this._convertPositionTo("absolute");
if(!this.lastPositionAbs){this.lastPositionAbs=this.positionAbs
}if(this.options.scroll){var e=this.options,d=false;
if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){if((this.overflowOffset.top+this.scrollParent[0].offsetHeight)-f.pageY<e.scrollSensitivity){this.scrollParent[0].scrollTop=d=this.scrollParent[0].scrollTop+e.scrollSpeed
}else{if(f.pageY-this.overflowOffset.top<e.scrollSensitivity){this.scrollParent[0].scrollTop=d=this.scrollParent[0].scrollTop-e.scrollSpeed
}}if((this.overflowOffset.left+this.scrollParent[0].offsetWidth)-f.pageX<e.scrollSensitivity){this.scrollParent[0].scrollLeft=d=this.scrollParent[0].scrollLeft+e.scrollSpeed
}else{if(f.pageX-this.overflowOffset.left<e.scrollSensitivity){this.scrollParent[0].scrollLeft=d=this.scrollParent[0].scrollLeft-e.scrollSpeed
}}}else{if(f.pageY-a(document).scrollTop()<e.scrollSensitivity){d=a(document).scrollTop(a(document).scrollTop()-e.scrollSpeed)
}else{if(a(window).height()-(f.pageY-a(document).scrollTop())<e.scrollSensitivity){d=a(document).scrollTop(a(document).scrollTop()+e.scrollSpeed)
}}if(f.pageX-a(document).scrollLeft()<e.scrollSensitivity){d=a(document).scrollLeft(a(document).scrollLeft()-e.scrollSpeed)
}else{if(a(window).width()-(f.pageX-a(document).scrollLeft())<e.scrollSensitivity){d=a(document).scrollLeft(a(document).scrollLeft()+e.scrollSpeed)
}}}if(d!==false&&a.ui.ddmanager&&!e.dropBehaviour){a.ui.ddmanager.prepareOffsets(this,f)
}}this.positionAbs=this._convertPositionTo("absolute");
if(!this.options.axis||this.options.axis!="y"){this.helper[0].style.left=this.position.left+"px"
}if(!this.options.axis||this.options.axis!="x"){this.helper[0].style.top=this.position.top+"px"
}for(var c=this.items.length-1;
c>=0;
c--){var h=this.items[c],g=h.item[0],b=this._intersectsWithPointer(h);
if(!b){continue
}if(g!=this.currentItem[0]&&this.placeholder[b==1?"next":"prev"]()[0]!=g&&!a.ui.contains(this.placeholder[0],g)&&(this.options.type=="semi-dynamic"?!a.ui.contains(this.element[0],g):true)){this.direction=b==1?"down":"up";
if(this.options.tolerance=="pointer"||this._intersectsWithSides(h)){this._rearrange(f,h)
}else{break
}this._trigger("change",f,this._uiHash());
break
}}this._contactContainers(f);
if(a.ui.ddmanager){a.ui.ddmanager.drag(this,f)
}this._trigger("sort",f,this._uiHash());
this.lastPositionAbs=this.positionAbs;
return false
},_mouseStop:function(c,e){if(!c){return
}if(a.ui.ddmanager&&!this.options.dropBehaviour){a.ui.ddmanager.drop(this,c)
}if(this.options.revert){var d=this;
var b=d.placeholder.offset();
d.reverting=true;
a(this.helper).animate({left:b.left-this.offset.parent.left-d.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:b.top-this.offset.parent.top-d.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){d._clear(c)
})
}else{this._clear(c,e)
}return false
},cancel:function(){var b=this;
if(this.dragging){this._mouseUp();
if(this.options.helper=="original"){this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")
}else{this.currentItem.show()
}for(var c=this.containers.length-1;
c>=0;
c--){this.containers[c]._trigger("deactivate",null,b._uiHash(this));
if(this.containers[c].containerCache.over){this.containers[c]._trigger("out",null,b._uiHash(this));
this.containers[c].containerCache.over=0
}}}if(this.placeholder[0].parentNode){this.placeholder[0].parentNode.removeChild(this.placeholder[0])
}if(this.options.helper!="original"&&this.helper&&this.helper[0].parentNode){this.helper.remove()
}a.extend(this,{helper:null,dragging:false,reverting:false,_noFinalSort:null});
if(this.domPosition.prev){a(this.domPosition.prev).after(this.currentItem)
}else{a(this.domPosition.parent).prepend(this.currentItem)
}return true
},serialize:function(b){var d=this._getItemsAsjQuery(b&&b.connected);
var c=[];
b=b||{};
a(d).each(function(){var e=(a(b.item||this).attr(b.attribute||"id")||"").match(b.expression||(/(.+)[-=_](.+)/));
if(e){c.push((b.key||e[1]+"[]")+"="+(b.key&&b.expression?e[1]:e[2]))
}});
return c.join("&")
},toArray:function(b){var d=this._getItemsAsjQuery(b&&b.connected);
var c=[];
b=b||{};
d.each(function(){c.push(a(b.item||this).attr(b.attribute||"id")||"")
});
return c
},_intersectsWith:function(o){var c=this.positionAbs.left,d=c+this.helperProportions.width,e=this.positionAbs.top,f=e+this.helperProportions.height;
var g=o.left,k=g+o.width,m=o.top,j=m+o.height;
var i=this.offset.click.top,h=this.offset.click.left;
var n=(e+i)>m&&(e+i)<j&&(c+h)>g&&(c+h)<k;
if(this.options.tolerance=="pointer"||this.options.forcePointerForContainers||(this.options.tolerance!="pointer"&&this.helperProportions[this.floating?"width":"height"]>o[this.floating?"width":"height"])){return n
}else{return(g<c+(this.helperProportions.width/2)&&d-(this.helperProportions.width/2)<k&&m<e+(this.helperProportions.height/2)&&f-(this.helperProportions.height/2)<j)
}},_intersectsWithPointer:function(b){var f=a.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,b.top,b.height),c=a.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,b.left,b.width),d=f&&c,g=this._getDragVerticalDirection(),e=this._getDragHorizontalDirection();
if(!d){return false
}return this.floating?(((e&&e=="right")||g=="down")?2:1):(g&&(g=="down"?2:1))
},_intersectsWithSides:function(e){var b=a.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,e.top+(e.height/2),e.height),c=a.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,e.left+(e.width/2),e.width),d=this._getDragVerticalDirection(),f=this._getDragHorizontalDirection();
if(this.floating&&f){return((f=="right"&&c)||(f=="left"&&!c))
}else{return d&&((d=="down"&&b)||(d=="up"&&!b))
}},_getDragVerticalDirection:function(){var b=this.positionAbs.top-this.lastPositionAbs.top;
return b!=0&&(b>0?"down":"up")
},_getDragHorizontalDirection:function(){var b=this.positionAbs.left-this.lastPositionAbs.left;
return b!=0&&(b>0?"right":"left")
},refresh:function(b){this._refreshItems(b);
this.refreshPositions()
},_connectWith:function(){var b=this.options;
return b.connectWith.constructor==String?[b.connectWith]:b.connectWith
},_getItemsAsjQuery:function(l){var d=this;
var h=[];
var k=[];
var g=this._connectWith();
if(g&&l){for(var b=g.length-1;
b>=0;
b--){var e=a(g[b]);
for(var c=e.length-1;
c>=0;
c--){var f=a.data(e[c],"sortable");
if(f&&f!=this&&!f.options.disabled){k.push([a.isFunction(f.options.items)?f.options.items.call(f.element):a(f.options.items,f.element).not(".ui-sortable-helper"),f])
}}}}k.push([a.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):a(this.options.items,this.element).not(".ui-sortable-helper"),this]);
for(var b=k.length-1;
b>=0;
b--){k[b][0].each(function(){h.push(this)
})
}return a(h)
},_removeCurrentsFromItems:function(){var d=this.currentItem.find(":data(sortable-item)");
for(var b=0;
b<this.items.length;
b++){for(var c=0;
c<d.length;
c++){if(d[c]==this.items[b].item[0]){this.items.splice(b,1)
}}}},_refreshItems:function(g){this.items=[];
this.containers=[this];
var b=this.items;
var n=this;
var c=[[a.isFunction(this.options.items)?this.options.items.call(this.element[0],g,{item:this.currentItem}):a(this.options.items,this.element),this]];
var l=this._connectWith();
if(l){for(var h=l.length-1;
h>=0;
h--){var d=a(l[h]);
for(var k=d.length-1;
k>=0;
k--){var m=a.data(d[k],"sortable");
if(m&&m!=this&&!m.options.disabled){c.push([a.isFunction(m.options.items)?m.options.items.call(m.element[0],g,{item:this.currentItem}):a(m.options.items,m.element),m]);
this.containers.push(m)
}}}}for(var h=c.length-1;
h>=0;
h--){var f=c[h][1];
var e=c[h][0];
for(var k=0,o=e.length;
k<o;
k++){var p=a(e[k]);
p.data("sortable-item",f);
b.push({item:p,instance:f,width:0,height:0,left:0,top:0})
}}},refreshPositions:function(e){if(this.offsetParent&&this.helper){this.offset.parent=this._getParentOffset()
}for(var b=this.items.length-1;
b>=0;
b--){var d=this.items[b];
if(d.instance!=this.currentContainer&&this.currentContainer&&d.item[0]!=this.currentItem[0]){continue
}var c=this.options.toleranceElement?a(this.options.toleranceElement,d.item):d.item;
if(!e){d.width=c.outerWidth();
d.height=c.outerHeight()
}var f=c.offset();
d.left=f.left;
d.top=f.top
}if(this.options.custom&&this.options.custom.refreshContainers){this.options.custom.refreshContainers.call(this)
}else{for(var b=this.containers.length-1;
b>=0;
b--){var f=this.containers[b].element.offset();
this.containers[b].containerCache.left=f.left;
this.containers[b].containerCache.top=f.top;
this.containers[b].containerCache.width=this.containers[b].element.outerWidth();
this.containers[b].containerCache.height=this.containers[b].element.outerHeight()
}}},_createPlaceholder:function(c){var e=c||this,b=e.options;
if(!b.placeholder||b.placeholder.constructor==String){var d=b.placeholder;
b.placeholder={element:function(){var f=a(document.createElement(e.currentItem[0].nodeName)).addClass(d||e.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];
if(!d){f.style.visibility="hidden"
}return f
},update:function(f,g){if(d&&!b.forcePlaceholderSize){return
}if(!g.height()){g.height(e.currentItem.innerHeight()-parseInt(e.currentItem.css("paddingTop")||0,10)-parseInt(e.currentItem.css("paddingBottom")||0,10))
}if(!g.width()){g.width(e.currentItem.innerWidth()-parseInt(e.currentItem.css("paddingLeft")||0,10)-parseInt(e.currentItem.css("paddingRight")||0,10))
}}}
}e.placeholder=a(b.placeholder.element.call(e.element,e.currentItem));
e.currentItem.after(e.placeholder);
b.placeholder.update(e,e.placeholder)
},_contactContainers:function(h){for(var c=this.containers.length-1;
c>=0;
c--){if(this._intersectsWith(this.containers[c].containerCache)){if(!this.containers[c].containerCache.over){if(this.currentContainer!=this.containers[c]){var e=10000;
var d=null;
var b=this.positionAbs[this.containers[c].floating?"left":"top"];
for(var f=this.items.length-1;
f>=0;
f--){if(!a.ui.contains(this.containers[c].element[0],this.items[f].item[0])){continue
}var g=this.items[f][this.containers[c].floating?"left":"top"];
if(Math.abs(g-b)<e){e=Math.abs(g-b);
d=this.items[f]
}}if(!d&&!this.options.dropOnEmpty){continue
}this.currentContainer=this.containers[c];
d?this._rearrange(h,d,null,true):this._rearrange(h,null,this.containers[c].element,true);
this._trigger("change",h,this._uiHash());
this.containers[c]._trigger("change",h,this._uiHash(this));
this.options.placeholder.update(this.currentContainer,this.placeholder)
}this.containers[c]._trigger("over",h,this._uiHash(this));
this.containers[c].containerCache.over=1
}}else{if(this.containers[c].containerCache.over){this.containers[c]._trigger("out",h,this._uiHash(this));
this.containers[c].containerCache.over=0
}}}},_createHelper:function(c){var b=this.options;
var d=a.isFunction(b.helper)?a(b.helper.apply(this.element[0],[c,this.currentItem])):(b.helper=="clone"?this.currentItem.clone():this.currentItem);
if(!d.parents("body").length){a(b.appendTo!="parent"?b.appendTo:this.currentItem[0].parentNode)[0].appendChild(d[0])
}if(d[0]==this.currentItem[0]){this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}
}if(d[0].style.width==""||b.forceHelperSize){d.width(this.currentItem.width())
}if(d[0].style.height==""||b.forceHelperSize){d.height(this.currentItem.height())
}return d
},_adjustOffsetFromHelper:function(b){if(b.left!=undefined){this.offset.click.left=b.left+this.margins.left
}if(b.right!=undefined){this.offset.click.left=this.helperProportions.width-b.right+this.margins.left
}if(b.top!=undefined){this.offset.click.top=b.top+this.margins.top
}if(b.bottom!=undefined){this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top
}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();
var b=this.offsetParent.offset();
if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0])){b.left+=this.scrollParent.scrollLeft();
b.top+=this.scrollParent.scrollTop()
}if((this.offsetParent[0]==document.body)||(this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&a.browser.msie)){b={top:0,left:0}
}return{top:b.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:b.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}
},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var b=this.currentItem.position();
return{top:b.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:b.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}
}else{return{top:0,left:0}
}},_cacheMargins:function(){this.margins={left:(parseInt(this.currentItem.css("marginLeft"),10)||0),top:(parseInt(this.currentItem.css("marginTop"),10)||0)}
},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}
},_setContainment:function(){var b=this.options;
if(b.containment=="parent"){b.containment=this.helper[0].parentNode
}if(b.containment=="document"||b.containment=="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,a(b.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(a(b.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]
}if(!(/^(document|window|parent)$/).test(b.containment)){var e=a(b.containment)[0];
var c=a(b.containment).offset();
var d=(a(e).css("overflow")!="hidden");
this.containment=[c.left+(parseInt(a(e).css("borderLeftWidth"),10)||0)+(parseInt(a(e).css("paddingLeft"),10)||0)-this.margins.left,c.top+(parseInt(a(e).css("borderTopWidth"),10)||0)+(parseInt(a(e).css("paddingTop"),10)||0)-this.margins.top,c.left+(d?Math.max(e.scrollWidth,e.offsetWidth):e.offsetWidth)-(parseInt(a(e).css("borderLeftWidth"),10)||0)-(parseInt(a(e).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,c.top+(d?Math.max(e.scrollHeight,e.offsetHeight):e.offsetHeight)-(parseInt(a(e).css("borderTopWidth"),10)||0)-(parseInt(a(e).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]
}},_convertPositionTo:function(g,b){if(!b){b=this.position
}var f=g=="absolute"?1:-1;
var e=this.options,c=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,h=(/(html|body)/i).test(c[0].tagName);
return{top:(b.top+this.offset.relative.top*f+this.offset.parent.top*f-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(h?0:c.scrollTop()))*f)),left:(b.left+this.offset.relative.left*f+this.offset.parent.left*f-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():h?0:c.scrollLeft())*f))}
},_generatePosition:function(g){var d=this.options,c=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,i=(/(html|body)/i).test(c[0].tagName);
if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0])){this.offset.relative=this._getRelativeOffset()
}var b=g.pageX;
var e=g.pageY;
if(this.originalPosition){if(this.containment){if(g.pageX-this.offset.click.left<this.containment[0]){b=this.containment[0]+this.offset.click.left
}if(g.pageY-this.offset.click.top<this.containment[1]){e=this.containment[1]+this.offset.click.top
}if(g.pageX-this.offset.click.left>this.containment[2]){b=this.containment[2]+this.offset.click.left
}if(g.pageY-this.offset.click.top>this.containment[3]){e=this.containment[3]+this.offset.click.top
}}if(d.grid){var h=this.originalPageY+Math.round((e-this.originalPageY)/d.grid[1])*d.grid[1];
e=this.containment?(!(h-this.offset.click.top<this.containment[1]||h-this.offset.click.top>this.containment[3])?h:(!(h-this.offset.click.top<this.containment[1])?h-d.grid[1]:h+d.grid[1])):h;
var f=this.originalPageX+Math.round((b-this.originalPageX)/d.grid[0])*d.grid[0];
b=this.containment?(!(f-this.offset.click.left<this.containment[0]||f-this.offset.click.left>this.containment[2])?f:(!(f-this.offset.click.left<this.containment[0])?f-d.grid[0]:f+d.grid[0])):f
}}return{top:(e-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(i?0:c.scrollTop())))),left:(b-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():i?0:c.scrollLeft())))}
},_rearrange:function(f,b,g,e){g?g[0].appendChild(this.placeholder[0]):b.item[0].parentNode.insertBefore(this.placeholder[0],(this.direction=="down"?b.item[0]:b.item[0].nextSibling));
this.counter=this.counter?++this.counter:1;
var c=this,d=this.counter;
window.setTimeout(function(){if(d==c.counter){c.refreshPositions(!e)
}},0)
},_clear:function(d,f){this.reverting=false;
var b=[],e=this;
if(!this._noFinalSort&&this.currentItem[0].parentNode){this.placeholder.before(this.currentItem)
}this._noFinalSort=null;
if(this.helper[0]==this.currentItem[0]){for(var c in this._storedCSS){if(this._storedCSS[c]=="auto"||this._storedCSS[c]=="static"){this._storedCSS[c]=""
}}this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")
}else{this.currentItem.show()
}if(this.fromOutside&&!f){b.push(function(g){this._trigger("receive",g,this._uiHash(this.fromOutside))
})
}if((this.fromOutside||this.domPosition.prev!=this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!=this.currentItem.parent()[0])&&!f){b.push(function(g){this._trigger("update",g,this._uiHash())
})
}if(!a.ui.contains(this.element[0],this.currentItem[0])){if(!f){b.push(function(g){this._trigger("remove",g,this._uiHash())
})
}for(var c=this.containers.length-1;
c>=0;
c--){if(a.ui.contains(this.containers[c].element[0],this.currentItem[0])&&!f){b.push((function(g){return function(h){g._trigger("receive",h,this._uiHash(this))
}
}).call(this,this.containers[c]));
b.push((function(g){return function(h){g._trigger("update",h,this._uiHash(this))
}
}).call(this,this.containers[c]))
}}}for(var c=this.containers.length-1;
c>=0;
c--){if(!f){b.push((function(g){return function(h){g._trigger("deactivate",h,this._uiHash(this))
}
}).call(this,this.containers[c]))
}if(this.containers[c].containerCache.over){b.push((function(g){return function(h){g._trigger("out",h,this._uiHash(this))
}
}).call(this,this.containers[c]));
this.containers[c].containerCache.over=0
}}if(this._storedCursor){a("body").css("cursor",this._storedCursor)
}if(this._storedOpacity){this.helper.css("opacity",this._storedOpacity)
}if(this._storedZIndex){this.helper.css("zIndex",this._storedZIndex=="auto"?"":this._storedZIndex)
}this.dragging=false;
if(this.cancelHelperRemoval){if(!f){this._trigger("beforeStop",d,this._uiHash());
for(var c=0;
c<b.length;
c++){b[c].call(this,d)
}this._trigger("stop",d,this._uiHash())
}return false
}if(!f){this._trigger("beforeStop",d,this._uiHash())
}this.placeholder[0].parentNode.removeChild(this.placeholder[0]);
if(this.helper[0]!=this.currentItem[0]){this.helper.remove()
}this.helper=null;
if(!f){for(var c=0;
c<b.length;
c++){b[c].call(this,d)
}this._trigger("stop",d,this._uiHash())
}this.fromOutside=false;
return true
},_trigger:function(){if(a.widget.prototype._trigger.apply(this,arguments)===false){this.cancel()
}},_uiHash:function(b){var c=b||this;
return{helper:c.helper,placeholder:c.placeholder||a([]),position:c.position,absolutePosition:c.positionAbs,offset:c.positionAbs,item:c.currentItem,sender:b?b.element:null}
}}));
a.extend(a.ui.sortable,{getter:"serialize toArray",version:"1.7.2",eventPrefix:"sort",defaults:{appendTo:"parent",axis:false,cancel:":input,option",connectWith:false,containment:false,cursor:"auto",cursorAt:false,delay:0,distance:1,dropOnEmpty:true,forcePlaceholderSize:false,forceHelperSize:false,grid:false,handle:false,helper:"original",items:"> *",opacity:false,placeholder:false,revert:false,scroll:true,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1000}})
})(jQuery);
jQuery.effects||(function(e){e.effects={version:"1.7.2",save:function(f,h){for(var g=0;
g<h.length;
g++){if(h[g]!==null){f.data("ec.storage."+h[g],f[0].style[h[g]])
}}},restore:function(f,h){for(var g=0;
g<h.length;
g++){if(h[g]!==null){f.css(h[g],f.data("ec.storage."+h[g]))
}}},setMode:function(f,g){if(g=="toggle"){g=f.is(":hidden")?"show":"hide"
}return g
},getBaseline:function(g,f){var i,h;
switch(g[0]){case"top":i=0;
break;
case"middle":i=0.5;
break;
case"bottom":i=1;
break;
default:i=g[0]/f.height
}switch(g[1]){case"left":h=0;
break;
case"center":h=0.5;
break;
case"right":h=1;
break;
default:h=g[1]/f.width
}return{x:h,y:i}
},createWrapper:function(h){if(h.parent().is(".ui-effects-wrapper")){return h.parent()
}var f={width:h.outerWidth(true),height:h.outerHeight(true),"float":h.css("float")};
h.wrap('<div class="ui-effects-wrapper" style="font-size:100%;background:transparent;border:none;margin:0;padding:0"></div>');
var i=h.parent();
if(h.css("position")=="static"){i.css({position:"relative"});
h.css({position:"relative"})
}else{var g=h.css("top");
if(isNaN(parseInt(g,10))){g="auto"
}var j=h.css("left");
if(isNaN(parseInt(j,10))){j="auto"
}i.css({position:h.css("position"),top:g,left:j,zIndex:h.css("z-index")}).show();
h.css({position:"relative",top:0,left:0})
}i.css(f);
return i
},removeWrapper:function(f){if(f.parent().is(".ui-effects-wrapper")){return f.parent().replaceWith(f)
}return f
},setTransition:function(i,h,g,f){f=f||{};
e.each(h,function(j,k){unit=i.cssUnit(k);
if(unit[0]>0){f[k]=unit[0]*g+unit[1]
}});
return f
},animateClass:function(f,i,g,h){var j=(typeof g=="function"?g:(h?h:null));
var k=(typeof g=="string"?g:null);
return this.each(function(){var q={};
var m=e(this);
var l=m.attr("style")||"";
if(typeof l=="object"){l=l.cssText
}if(f.toggle){m.hasClass(f.toggle)?f.remove=f.toggle:f.add=f.toggle
}var o=e.extend({},(document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle));
if(f.add){m.addClass(f.add)
}if(f.remove){m.removeClass(f.remove)
}var r=e.extend({},(document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle));
if(f.add){m.removeClass(f.add)
}if(f.remove){m.addClass(f.remove)
}for(var p in r){if(typeof r[p]!="function"&&r[p]&&p.indexOf("Moz")==-1&&p.indexOf("length")==-1&&r[p]!=o[p]&&(p.match(/color/i)||(!p.match(/color/i)&&!isNaN(parseInt(r[p],10))))&&(o.position!="static"||(o.position=="static"&&!p.match(/left|top|bottom|right/)))){q[p]=r[p]
}}m.animate(q,i,k,function(){if(typeof e(this).attr("style")=="object"){e(this).attr("style")["cssText"]="";
e(this).attr("style")["cssText"]=l
}else{e(this).attr("style",l)
}if(f.add){e(this).addClass(f.add)
}if(f.remove){e(this).removeClass(f.remove)
}if(j){j.apply(this,arguments)
}})
})
}};
function d(h,j){var f=h[1]&&h[1].constructor==Object?h[1]:{};
if(j){f.mode=j
}var g=h[1]&&h[1].constructor!=Object?h[1]:(f.duration?f.duration:h[2]);
g=e.fx.off?0:typeof g==="number"?g:e.fx.speeds[g]||e.fx.speeds._default;
var i=f.callback||(e.isFunction(h[1])&&h[1])||(e.isFunction(h[2])&&h[2])||(e.isFunction(h[3])&&h[3]);
return[h[0],f,g,i]
}e.fn.extend({_show:e.fn.show,_hide:e.fn.hide,__toggle:e.fn.toggle,_addClass:e.fn.addClass,_removeClass:e.fn.removeClass,_toggleClass:e.fn.toggleClass,effect:function(f,i,g,h){return e.effects[f]?e.effects[f].call(this,{method:f,options:i||{},duration:g,callback:h}):null
},show:function(){if(!arguments[0]||(arguments[0].constructor==Number||(/(slow|normal|fast)/).test(arguments[0]))){return this._show.apply(this,arguments)
}else{return this.effect.apply(this,d(arguments,"show"))
}},hide:function(){if(!arguments[0]||(arguments[0].constructor==Number||(/(slow|normal|fast)/).test(arguments[0]))){return this._hide.apply(this,arguments)
}else{return this.effect.apply(this,d(arguments,"hide"))
}},toggle:function(){if(!arguments[0]||(arguments[0].constructor==Number||(/(slow|normal|fast)/).test(arguments[0]))||(e.isFunction(arguments[0])||typeof arguments[0]=="boolean")){return this.__toggle.apply(this,arguments)
}else{return this.effect.apply(this,d(arguments,"toggle"))
}},addClass:function(f,g,h,i){return g?e.effects.animateClass.apply(this,[{add:f},g,h,i]):this._addClass(f)
},removeClass:function(f,g,h,i){return g?e.effects.animateClass.apply(this,[{remove:f},g,h,i]):this._removeClass(f)
},toggleClass:function(f,g,h,i){return((typeof g!=="boolean")&&g)?e.effects.animateClass.apply(this,[{toggle:f},g,h,i]):this._toggleClass(f,g)
},morph:function(h,g,f,j,i){return e.effects.animateClass.apply(this,[{add:g,remove:h},f,j,i])
},switchClass:function(){return this.morph.apply(this,arguments)
},cssUnit:function(h){var f=this.css(h),g=[];
e.each(["em","px","%","pt"],function(k,j){if(f.indexOf(j)>0){g=[parseFloat(f),j]
}});
return g
}});
e.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","color","outlineColor"],function(g,f){e.fx.step[f]=function(h){if(h.state==0){h.start=b(h.elem,f);
h.end=c(h.end)
}h.elem.style[f]="rgb("+[Math.max(Math.min(parseInt((h.pos*(h.end[0]-h.start[0]))+h.start[0],10),255),0),Math.max(Math.min(parseInt((h.pos*(h.end[1]-h.start[1]))+h.start[1],10),255),0),Math.max(Math.min(parseInt((h.pos*(h.end[2]-h.start[2]))+h.start[2],10),255),0)].join(",")+")"
}
});
function c(f){var g;
if(f&&f.constructor==Array&&f.length==3){return f
}if(g=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(f)){return[parseInt(g[1],10),parseInt(g[2],10),parseInt(g[3],10)]
}if(g=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(f)){return[parseFloat(g[1])*2.55,parseFloat(g[2])*2.55,parseFloat(g[3])*2.55]
}if(g=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(f)){return[parseInt(g[1],16),parseInt(g[2],16),parseInt(g[3],16)]
}if(g=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(f)){return[parseInt(g[1]+g[1],16),parseInt(g[2]+g[2],16),parseInt(g[3]+g[3],16)]
}if(g=/rgba\(0, 0, 0, 0\)/.exec(f)){return a.transparent
}return a[e.trim(f).toLowerCase()]
}function b(h,g){var f;
do{f=e.curCSS(h,g);
if(f!=""&&f!="transparent"||e.nodeName(h,"body")){break
}g="backgroundColor"
}while(h=h.parentNode);
return c(f)
}var a={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]};
e.easing.jswing=e.easing.swing;
e.extend(e.easing,{def:"easeOutQuad",swing:function(j,h,g,i,f){return e.easing[e.easing.def](j,h,g,i,f)
},easeInQuad:function(j,h,g,i,f){return i*(h/=f)*h+g
},easeOutQuad:function(j,h,g,i,f){return -i*(h/=f)*(h-2)+g
},easeInOutQuad:function(j,h,g,i,f){if((h/=f/2)<1){return i/2*h*h+g
}return -i/2*((--h)*(h-2)-1)+g
},easeInCubic:function(j,h,g,i,f){return i*(h/=f)*h*h+g
},easeOutCubic:function(j,h,g,i,f){return i*((h=h/f-1)*h*h+1)+g
},easeInOutCubic:function(j,h,g,i,f){if((h/=f/2)<1){return i/2*h*h*h+g
}return i/2*((h-=2)*h*h+2)+g
},easeInQuart:function(j,h,g,i,f){return i*(h/=f)*h*h*h+g
},easeOutQuart:function(j,h,g,i,f){return -i*((h=h/f-1)*h*h*h-1)+g
},easeInOutQuart:function(j,h,g,i,f){if((h/=f/2)<1){return i/2*h*h*h*h+g
}return -i/2*((h-=2)*h*h*h-2)+g
},easeInQuint:function(j,h,g,i,f){return i*(h/=f)*h*h*h*h+g
},easeOutQuint:function(j,h,g,i,f){return i*((h=h/f-1)*h*h*h*h+1)+g
},easeInOutQuint:function(j,h,g,i,f){if((h/=f/2)<1){return i/2*h*h*h*h*h+g
}return i/2*((h-=2)*h*h*h*h+2)+g
},easeInSine:function(j,h,g,i,f){return -i*Math.cos(h/f*(Math.PI/2))+i+g
},easeOutSine:function(j,h,g,i,f){return i*Math.sin(h/f*(Math.PI/2))+g
},easeInOutSine:function(j,h,g,i,f){return -i/2*(Math.cos(Math.PI*h/f)-1)+g
},easeInExpo:function(j,h,g,i,f){return(h==0)?g:i*Math.pow(2,10*(h/f-1))+g
},easeOutExpo:function(j,h,g,i,f){return(h==f)?g+i:i*(-Math.pow(2,-10*h/f)+1)+g
},easeInOutExpo:function(j,h,g,i,f){if(h==0){return g
}if(h==f){return g+i
}if((h/=f/2)<1){return i/2*Math.pow(2,10*(h-1))+g
}return i/2*(-Math.pow(2,-10*--h)+2)+g
},easeInCirc:function(j,h,g,i,f){return -i*(Math.sqrt(1-(h/=f)*h)-1)+g
},easeOutCirc:function(j,h,g,i,f){return i*Math.sqrt(1-(h=h/f-1)*h)+g
},easeInOutCirc:function(j,h,g,i,f){if((h/=f/2)<1){return -i/2*(Math.sqrt(1-h*h)-1)+g
}return i/2*(Math.sqrt(1-(h-=2)*h)+1)+g
},easeInElastic:function(f,k,h,i,j){var l=1.70158;
var g=0;
var m=i;
if(k==0){return h
}if((k/=j)==1){return h+i
}if(!g){g=j*0.3
}if(m<Math.abs(i)){m=i;
var l=g/4
}else{var l=g/(2*Math.PI)*Math.asin(i/m)
}return -(m*Math.pow(2,10*(k-=1))*Math.sin((k*j-l)*(2*Math.PI)/g))+h
},easeOutElastic:function(f,k,h,i,j){var l=1.70158;
var g=0;
var m=i;
if(k==0){return h
}if((k/=j)==1){return h+i
}if(!g){g=j*0.3
}if(m<Math.abs(i)){m=i;
var l=g/4
}else{var l=g/(2*Math.PI)*Math.asin(i/m)
}return m*Math.pow(2,-10*k)*Math.sin((k*j-l)*(2*Math.PI)/g)+i+h
},easeInOutElastic:function(f,k,h,i,j){var l=1.70158;
var g=0;
var m=i;
if(k==0){return h
}if((k/=j/2)==2){return h+i
}if(!g){g=j*(0.3*1.5)
}if(m<Math.abs(i)){m=i;
var l=g/4
}else{var l=g/(2*Math.PI)*Math.asin(i/m)
}if(k<1){return -0.5*(m*Math.pow(2,10*(k-=1))*Math.sin((k*j-l)*(2*Math.PI)/g))+h
}return m*Math.pow(2,-10*(k-=1))*Math.sin((k*j-l)*(2*Math.PI)/g)*0.5+i+h
},easeInBack:function(f,j,g,h,i,k){if(k==undefined){k=1.70158
}return h*(j/=i)*j*((k+1)*j-k)+g
},easeOutBack:function(f,j,g,h,i,k){if(k==undefined){k=1.70158
}return h*((j=j/i-1)*j*((k+1)*j+k)+1)+g
},easeInOutBack:function(f,j,g,h,i,k){if(k==undefined){k=1.70158
}if((j/=i/2)<1){return h/2*(j*j*(((k*=(1.525))+1)*j-k))+g
}return h/2*((j-=2)*j*(((k*=(1.525))+1)*j+k)+2)+g
},easeInBounce:function(j,h,g,i,f){return i-e.easing.easeOutBounce(j,f-h,0,i,f)+g
},easeOutBounce:function(j,h,g,i,f){if((h/=f)<(1/2.75)){return i*(7.5625*h*h)+g
}else{if(h<(2/2.75)){return i*(7.5625*(h-=(1.5/2.75))*h+0.75)+g
}else{if(h<(2.5/2.75)){return i*(7.5625*(h-=(2.25/2.75))*h+0.9375)+g
}else{return i*(7.5625*(h-=(2.625/2.75))*h+0.984375)+g
}}}},easeInOutBounce:function(j,h,g,i,f){if(h<f/2){return e.easing.easeInBounce(j,h*2,0,i,f)*0.5+g
}return e.easing.easeOutBounce(j,h*2-f,0,i,f)*0.5+i*0.5+g
}})
})(jQuery);
(function(a){a.effects.blind=function(b){return this.queue(function(){var g=a(this),h=["position","top","left"];
var i=a.effects.setMode(g,b.options.mode||"hide");
var f=b.options.direction||"vertical";
a.effects.save(g,h);
g.show();
var j=a.effects.createWrapper(g).css({overflow:"hidden"});
var d=(f=="vertical")?"height":"width";
var e=(f=="vertical")?j.height():j.width();
if(i=="show"){j.css(d,0)
}var c={};
c[d]=i=="show"?e:0;
j.animate(c,b.duration,b.options.easing,function(){if(i=="hide"){g.hide()
}a.effects.restore(g,h);
a.effects.removeWrapper(g);
if(b.callback){b.callback.apply(g[0],arguments)
}g.dequeue()
})
})
}
})(jQuery);
(function(a){a.effects.bounce=function(b){return this.queue(function(){var n=a(this),l=["position","top","left"];
var e=a.effects.setMode(n,b.options.mode||"effect");
var j=b.options.direction||"up";
var f=b.options.distance||20;
var o=b.options.times||5;
var h=b.duration||250;
if(/show|hide/.test(e)){l.push("opacity")
}a.effects.save(n,l);
n.show();
a.effects.createWrapper(n);
var d=(j=="up"||j=="down")?"top":"left";
var p=(j=="up"||j=="left")?"pos":"neg";
var f=b.options.distance||(d=="top"?n.outerHeight({margin:true})/3:n.outerWidth({margin:true})/3);
if(e=="show"){n.css("opacity",0).css(d,p=="pos"?-f:f)
}if(e=="hide"){f=f/(o*2)
}if(e!="hide"){o--
}if(e=="show"){var c={opacity:1};
c[d]=(p=="pos"?"+=":"-=")+f;
n.animate(c,h/2,b.options.easing);
f=f/2;
o--
}for(var k=0;
k<o;
k++){var g={},m={};
g[d]=(p=="pos"?"-=":"+=")+f;
m[d]=(p=="pos"?"+=":"-=")+f;
n.animate(g,h/2,b.options.easing).animate(m,h/2,b.options.easing);
f=(e=="hide")?f*2:f/2
}if(e=="hide"){var c={opacity:0};
c[d]=(p=="pos"?"-=":"+=")+f;
n.animate(c,h/2,b.options.easing,function(){n.hide();
a.effects.restore(n,l);
a.effects.removeWrapper(n);
if(b.callback){b.callback.apply(this,arguments)
}})
}else{var g={},m={};
g[d]=(p=="pos"?"-=":"+=")+f;
m[d]=(p=="pos"?"+=":"-=")+f;
n.animate(g,h/2,b.options.easing).animate(m,h/2,b.options.easing,function(){a.effects.restore(n,l);
a.effects.removeWrapper(n);
if(b.callback){b.callback.apply(this,arguments)
}})
}n.queue("fx",function(){n.dequeue()
});
n.dequeue()
})
}
})(jQuery);
(function(a){a.effects.clip=function(b){return this.queue(function(){var h=a(this),i=["position","top","left","height","width"];
var j=a.effects.setMode(h,b.options.mode||"hide");
var f=b.options.direction||"vertical";
a.effects.save(h,i);
h.show();
var k=a.effects.createWrapper(h).css({overflow:"hidden"});
var g=h[0].tagName=="IMG"?k:h;
var d={size:(f=="vertical")?"height":"width",position:(f=="vertical")?"top":"left"};
var e=(f=="vertical")?g.height():g.width();
if(j=="show"){g.css(d.size,0);
g.css(d.position,e/2)
}var c={};
c[d.size]=j=="show"?e:0;
c[d.position]=j=="show"?0:e/2;
g.animate(c,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){if(j=="hide"){h.hide()
}a.effects.restore(h,i);
a.effects.removeWrapper(h);
if(b.callback){b.callback.apply(h[0],arguments)
}h.dequeue()
}})
})
}
})(jQuery);
(function(a){a.effects.drop=function(b){return this.queue(function(){var h=a(this),i=["position","top","left","opacity"];
var j=a.effects.setMode(h,b.options.mode||"hide");
var g=b.options.direction||"left";
a.effects.save(h,i);
h.show();
a.effects.createWrapper(h);
var d=(g=="up"||g=="down")?"top":"left";
var e=(g=="up"||g=="left")?"pos":"neg";
var f=b.options.distance||(d=="top"?h.outerHeight({margin:true})/2:h.outerWidth({margin:true})/2);
if(j=="show"){h.css("opacity",0).css(d,e=="pos"?-f:f)
}var c={opacity:j=="show"?1:0};
c[d]=(j=="show"?(e=="pos"?"+=":"-="):(e=="pos"?"-=":"+="))+f;
h.animate(c,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){if(j=="hide"){h.hide()
}a.effects.restore(h,i);
a.effects.removeWrapper(h);
if(b.callback){b.callback.apply(this,arguments)
}h.dequeue()
}})
})
}
})(jQuery);
(function(a){a.effects.explode=function(b){return this.queue(function(){var l=b.options.pieces?Math.round(Math.sqrt(b.options.pieces)):3;
var k=b.options.pieces?Math.round(Math.sqrt(b.options.pieces)):3;
b.options.mode=b.options.mode=="toggle"?(a(this).is(":visible")?"hide":"show"):b.options.mode;
var h=a(this).show().css("visibility","hidden");
var c=h.offset();
c.top-=parseInt(h.css("marginTop"),10)||0;
c.left-=parseInt(h.css("marginLeft"),10)||0;
var f=h.outerWidth(true);
var d=h.outerHeight(true);
for(var e=0;
e<l;
e++){for(var g=0;
g<k;
g++){h.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-g*(f/k),top:-e*(d/l)}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:f/k,height:d/l,left:c.left+g*(f/k)+(b.options.mode=="show"?(g-Math.floor(k/2))*(f/k):0),top:c.top+e*(d/l)+(b.options.mode=="show"?(e-Math.floor(l/2))*(d/l):0),opacity:b.options.mode=="show"?0:1}).animate({left:c.left+g*(f/k)+(b.options.mode=="show"?0:(g-Math.floor(k/2))*(f/k)),top:c.top+e*(d/l)+(b.options.mode=="show"?0:(e-Math.floor(l/2))*(d/l)),opacity:b.options.mode=="show"?1:0},b.duration||500)
}}setTimeout(function(){b.options.mode=="show"?h.css({visibility:"visible"}):h.css({visibility:"visible"}).hide();
if(b.callback){b.callback.apply(h[0])
}h.dequeue();
a("div.ui-effects-explode").remove()
},b.duration||500)
})
}
})(jQuery);
(function(a){a.effects.fold=function(b){return this.queue(function(){var o=a(this),l=["position","top","left"];
var d=a.effects.setMode(o,b.options.mode||"hide");
var h=b.options.size||15;
var i=!(!b.options.horizFirst);
var c=b.duration?b.duration/2:a.fx.speeds._default/2;
a.effects.save(o,l);
o.show();
var j=a.effects.createWrapper(o).css({overflow:"hidden"});
var n=((d=="show")!=i);
var k=n?["width","height"]:["height","width"];
var f=n?[j.width(),j.height()]:[j.height(),j.width()];
var m=/([0-9]+)%/.exec(h);
if(m){h=parseInt(m[1],10)/100*f[d=="hide"?0:1]
}if(d=="show"){j.css(i?{height:0,width:h}:{height:h,width:0})
}var e={},g={};
e[k[0]]=d=="show"?f[0]:h;
g[k[1]]=d=="show"?f[1]:0;
j.animate(e,c,b.options.easing).animate(g,c,b.options.easing,function(){if(d=="hide"){o.hide()
}a.effects.restore(o,l);
a.effects.removeWrapper(o);
if(b.callback){b.callback.apply(o[0],arguments)
}o.dequeue()
})
})
}
})(jQuery);
(function(a){a.effects.highlight=function(b){return this.queue(function(){var e=a(this),d=["backgroundImage","backgroundColor","opacity"];
var g=a.effects.setMode(e,b.options.mode||"show");
var h=b.options.color||"#ffff99";
var f=e.css("backgroundColor");
a.effects.save(e,d);
e.show();
e.css({backgroundImage:"none",backgroundColor:h});
var c={backgroundColor:f};
if(g=="hide"){c.opacity=0
}e.animate(c,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){if(g=="hide"){e.hide()
}a.effects.restore(e,d);
if(g=="show"&&a.browser.msie){this.style.removeAttribute("filter")
}if(b.callback){b.callback.apply(this,arguments)
}e.dequeue()
}})
})
}
})(jQuery);
(function(a){a.effects.pulsate=function(b){return this.queue(function(){var f=a(this);
var e=a.effects.setMode(f,b.options.mode||"show");
var d=b.options.times||5;
var g=b.duration?b.duration/2:a.fx.speeds._default/2;
if(e=="hide"){d--
}if(f.is(":hidden")){f.css("opacity",0);
f.show();
f.animate({opacity:1},g,b.options.easing);
d=d-2
}for(var c=0;
c<d;
c++){f.animate({opacity:0},g,b.options.easing).animate({opacity:1},g,b.options.easing)
}if(e=="hide"){f.animate({opacity:0},g,b.options.easing,function(){f.hide();
if(b.callback){b.callback.apply(this,arguments)
}})
}else{f.animate({opacity:0},g,b.options.easing).animate({opacity:1},g,b.options.easing,function(){if(b.callback){b.callback.apply(this,arguments)
}})
}f.queue("fx",function(){f.dequeue()
});
f.dequeue()
})
}
})(jQuery);
(function(a){a.effects.puff=function(b){return this.queue(function(){var g=a(this);
var c=a.extend(true,{},b.options);
var h=a.effects.setMode(g,b.options.mode||"hide");
var f=parseInt(b.options.percent,10)||150;
c.fade=true;
var e={height:g.height(),width:g.width()};
var d=f/100;
g.from=(h=="hide")?e:{height:e.height*d,width:e.width*d};
c.from=g.from;
c.percent=(h=="hide")?f:100;
c.mode=h;
g.effect("scale",c,b.duration,b.callback);
g.dequeue()
})
};
a.effects.scale=function(b){return this.queue(function(){var h=a(this);
var c=a.extend(true,{},b.options);
var j=a.effects.setMode(h,b.options.mode||"effect");
var f=parseInt(b.options.percent,10)||(parseInt(b.options.percent,10)==0?0:(j=="hide"?0:100));
var g=b.options.direction||"both";
var i=b.options.origin;
if(j!="effect"){c.origin=i||["middle","center"];
c.restore=true
}var e={height:h.height(),width:h.width()};
h.from=b.options.from||(j=="show"?{height:0,width:0}:e);
var d={y:g!="horizontal"?(f/100):1,x:g!="vertical"?(f/100):1};
h.to={height:e.height*d.y,width:e.width*d.x};
if(b.options.fade){if(j=="show"){h.from.opacity=0;
h.to.opacity=1
}if(j=="hide"){h.from.opacity=1;
h.to.opacity=0
}}c.from=h.from;
c.to=h.to;
c.mode=j;
h.effect("size",c,b.duration,b.callback);
h.dequeue()
})
};
a.effects.size=function(b){return this.queue(function(){var d=a(this),o=["position","top","left","width","height","overflow","opacity"];
var j=["position","top","left","overflow","opacity"];
var l=["width","height","overflow"];
var p=["fontSize"];
var c=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"];
var f=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"];
var m=a.effects.setMode(d,b.options.mode||"effect");
var k=b.options.restore||false;
var g=b.options.scale||"both";
var e=b.options.origin;
var n={height:d.height(),width:d.width()};
d.from=b.options.from||n;
d.to=b.options.to||n;
if(e){var h=a.effects.getBaseline(e,n);
d.from.top=(n.height-d.from.height)*h.y;
d.from.left=(n.width-d.from.width)*h.x;
d.to.top=(n.height-d.to.height)*h.y;
d.to.left=(n.width-d.to.width)*h.x
}var i={from:{y:d.from.height/n.height,x:d.from.width/n.width},to:{y:d.to.height/n.height,x:d.to.width/n.width}};
if(g=="box"||g=="both"){if(i.from.y!=i.to.y){o=o.concat(c);
d.from=a.effects.setTransition(d,c,i.from.y,d.from);
d.to=a.effects.setTransition(d,c,i.to.y,d.to)
}if(i.from.x!=i.to.x){o=o.concat(f);
d.from=a.effects.setTransition(d,f,i.from.x,d.from);
d.to=a.effects.setTransition(d,f,i.to.x,d.to)
}}if(g=="content"||g=="both"){if(i.from.y!=i.to.y){o=o.concat(p);
d.from=a.effects.setTransition(d,p,i.from.y,d.from);
d.to=a.effects.setTransition(d,p,i.to.y,d.to)
}}a.effects.save(d,k?o:j);
d.show();
a.effects.createWrapper(d);
d.css("overflow","hidden").css(d.from);
if(g=="content"||g=="both"){c=c.concat(["marginTop","marginBottom"]).concat(p);
f=f.concat(["marginLeft","marginRight"]);
l=o.concat(c).concat(f);
d.find("*[width]").each(function(){child=a(this);
if(k){a.effects.save(child,l)
}var q={height:child.height(),width:child.width()};
child.from={height:q.height*i.from.y,width:q.width*i.from.x};
child.to={height:q.height*i.to.y,width:q.width*i.to.x};
if(i.from.y!=i.to.y){child.from=a.effects.setTransition(child,c,i.from.y,child.from);
child.to=a.effects.setTransition(child,c,i.to.y,child.to)
}if(i.from.x!=i.to.x){child.from=a.effects.setTransition(child,f,i.from.x,child.from);
child.to=a.effects.setTransition(child,f,i.to.x,child.to)
}child.css(child.from);
child.animate(child.to,b.duration,b.options.easing,function(){if(k){a.effects.restore(child,l)
}})
})
}d.animate(d.to,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){if(m=="hide"){d.hide()
}a.effects.restore(d,k?o:j);
a.effects.removeWrapper(d);
if(b.callback){b.callback.apply(this,arguments)
}d.dequeue()
}})
})
}
})(jQuery);
(function(a){a.effects.shake=function(b){return this.queue(function(){var n=a(this),l=["position","top","left"];
var e=a.effects.setMode(n,b.options.mode||"effect");
var j=b.options.direction||"left";
var f=b.options.distance||20;
var o=b.options.times||3;
var h=b.duration||b.options.duration||140;
a.effects.save(n,l);
n.show();
a.effects.createWrapper(n);
var d=(j=="up"||j=="down")?"top":"left";
var p=(j=="up"||j=="left")?"pos":"neg";
var c={},g={},m={};
c[d]=(p=="pos"?"-=":"+=")+f;
g[d]=(p=="pos"?"+=":"-=")+f*2;
m[d]=(p=="pos"?"-=":"+=")+f*2;
n.animate(c,h,b.options.easing);
for(var k=1;
k<o;
k++){n.animate(g,h,b.options.easing).animate(m,h,b.options.easing)
}n.animate(g,h,b.options.easing).animate(c,h/2,b.options.easing,function(){a.effects.restore(n,l);
a.effects.removeWrapper(n);
if(b.callback){b.callback.apply(this,arguments)
}});
n.queue("fx",function(){n.dequeue()
});
n.dequeue()
})
}
})(jQuery);
(function(a){a.effects.slide=function(b){return this.queue(function(){var h=a(this),i=["position","top","left"];
var j=a.effects.setMode(h,b.options.mode||"show");
var g=b.options.direction||"left";
a.effects.save(h,i);
h.show();
a.effects.createWrapper(h).css({overflow:"hidden"});
var d=(g=="up"||g=="down")?"top":"left";
var e=(g=="up"||g=="left")?"pos":"neg";
var f=b.options.distance||(d=="top"?h.outerHeight({margin:true}):h.outerWidth({margin:true}));
if(j=="show"){h.css(d,e=="pos"?-f:f)
}var c={};
c[d]=(j=="show"?(e=="pos"?"+=":"-="):(e=="pos"?"-=":"+="))+f;
h.animate(c,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){if(j=="hide"){h.hide()
}a.effects.restore(h,i);
a.effects.removeWrapper(h);
if(b.callback){b.callback.apply(this,arguments)
}h.dequeue()
}})
})
}
})(jQuery);
(function(a){a.effects.transfer=function(b){return this.queue(function(){var c=a(this),e=a(b.options.to),g=e.offset(),f={top:g.top,left:g.left,height:e.innerHeight(),width:e.innerWidth()},h=c.offset(),d=a('<div class="ui-effects-transfer"></div>').appendTo(document.body).addClass(b.options.className).css({top:h.top,left:h.left,height:c.innerHeight(),width:c.innerWidth(),position:"absolute"}).animate(f,b.duration,b.options.easing,function(){d.remove();
(b.callback&&b.callback.apply(c[0],arguments));
c.dequeue()
})
})
}
})(jQuery);
(function(a){a.widget("ui.accordion",{_init:function(){var b=this.options,c=this;
this.running=0;
if(b.collapsible==a.ui.accordion.defaults.collapsible&&b.alwaysOpen!=a.ui.accordion.defaults.alwaysOpen){b.collapsible=!b.alwaysOpen
}if(b.navigation){var d=this.element.find("a").filter(b.navigationFilter);
if(d.length){if(d.filter(b.header).length){this.active=d
}else{this.active=d.parent().parent().prev();
d.addClass("ui-accordion-content-active")
}}}this.element.addClass("ui-accordion ui-widget ui-helper-reset");
if(this.element[0].nodeName=="UL"){this.element.children("li").addClass("ui-accordion-li-fix")
}this.headers=this.element.find(b.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion",function(){a(this).addClass("ui-state-hover")
}).bind("mouseleave.accordion",function(){a(this).removeClass("ui-state-hover")
}).bind("focus.accordion",function(){a(this).addClass("ui-state-focus")
}).bind("blur.accordion",function(){a(this).removeClass("ui-state-focus")
});
this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom");
this.active=this._findActive(this.active||b.active).toggleClass("ui-state-default").toggleClass("ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top");
this.active.next().addClass("ui-accordion-content-active");
a("<span/>").addClass("ui-icon "+b.icons.header).prependTo(this.headers);
this.active.find(".ui-icon").toggleClass(b.icons.header).toggleClass(b.icons.headerSelected);
if(a.browser.msie){this.element.find("a").css("zoom","1")
}this.resize();
this.element.attr("role","tablist");
this.headers.attr("role","tab").bind("keydown",function(e){return c._keydown(e)
}).next().attr("role","tabpanel");
this.headers.not(this.active||"").attr("aria-expanded","false").attr("tabIndex","-1").next().hide();
if(!this.active.length){this.headers.eq(0).attr("tabIndex","0")
}else{this.active.attr("aria-expanded","true").attr("tabIndex","0")
}if(!a.browser.safari){this.headers.find("a").attr("tabIndex","-1")
}if(b.event){this.headers.bind((b.event)+".accordion",function(e){return c._clickHandler.call(c,e,this)
})
}},destroy:function(){var c=this.options;
this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role").unbind(".accordion").removeData("accordion");
this.headers.unbind(".accordion").removeClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("tabindex");
this.headers.find("a").removeAttr("tabindex");
this.headers.children(".ui-icon").remove();
var b=this.headers.next().css("display","").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active");
if(c.autoHeight||c.fillHeight){b.css("height","")
}},_setData:function(b,c){if(b=="alwaysOpen"){b="collapsible";
c=!c
}a.widget.prototype._setData.apply(this,arguments)
},_keydown:function(e){var d=this.options,f=a.ui.keyCode;
if(d.disabled||e.altKey||e.ctrlKey){return
}var g=this.headers.length;
var c=this.headers.index(e.target);
var b=false;
switch(e.keyCode){case f.RIGHT:case f.DOWN:b=this.headers[(c+1)%g];
break;
case f.LEFT:case f.UP:b=this.headers[(c-1+g)%g];
break;
case f.SPACE:case f.ENTER:return this._clickHandler({target:e.target},e.target)
}if(b){a(e.target).attr("tabIndex","-1");
a(b).attr("tabIndex","0");
b.focus();
return false
}return true
},resize:function(){var b=this.options,c;
if(b.fillSpace){if(a.browser.msie){var e=this.element.parent().css("overflow");
this.element.parent().css("overflow","hidden")
}c=this.element.parent().height();
if(a.browser.msie){this.element.parent().css("overflow",e)
}this.headers.each(function(){c-=a(this).outerHeight()
});
var d=0;
this.headers.next().each(function(){d=Math.max(d,a(this).innerHeight()-a(this).height())
}).height(Math.max(0,c-d)).css("overflow","auto")
}else{if(b.autoHeight){c=0;
this.headers.next().each(function(){c=Math.max(c,a(this).outerHeight())
}).height(c)
}}},activate:function(b){var c=this._findActive(b)[0];
this._clickHandler({target:c},c)
},_findActive:function(b){return b?typeof b=="number"?this.headers.filter(":eq("+b+")"):this.headers.not(this.headers.not(b)):b===false?a([]):this.headers.filter(":eq(0)")
},_clickHandler:function(h,i){var e=this.options;
if(e.disabled){return false
}if(!h.target&&e.collapsible){this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").find(".ui-icon").removeClass(e.icons.headerSelected).addClass(e.icons.header);
this.active.next().addClass("ui-accordion-content-active");
var j=this.active.next(),b={options:e,newHeader:a([]),oldHeader:e.active,newContent:a([]),oldContent:j},c=(this.active=a([]));
this._toggle(c,j,b);
return false
}var d=a(h.currentTarget||i);
var g=d[0]==this.active[0];
if(this.running||(!e.collapsible&&g)){return false
}this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").find(".ui-icon").removeClass(e.icons.headerSelected).addClass(e.icons.header);
this.active.next().addClass("ui-accordion-content-active");
if(!g){d.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").find(".ui-icon").removeClass(e.icons.header).addClass(e.icons.headerSelected);
d.next().addClass("ui-accordion-content-active")
}var c=d.next(),j=this.active.next(),b={options:e,newHeader:g&&e.collapsible?a([]):d,oldHeader:this.active,newContent:g&&e.collapsible?a([]):c.find("> *"),oldContent:j.find("> *")},f=this.headers.index(this.active[0])>this.headers.index(d[0]);
this.active=g?a([]):d;
this._toggle(c,j,b,g,f);
return false
},_toggle:function(c,j,b,e,m){var h=this.options,d=this;
this.toShow=c;
this.toHide=j;
this.data=b;
var g=function(){if(!d){return
}return d._completed.apply(d,arguments)
};
this._trigger("changestart",null,this.data);
this.running=j.size()===0?c.size():j.size();
if(h.animated){var k={};
if(h.collapsible&&e){k={toShow:a([]),toHide:j,complete:g,down:m,autoHeight:h.autoHeight||h.fillSpace}
}else{k={toShow:c,toHide:j,complete:g,down:m,autoHeight:h.autoHeight||h.fillSpace}
}if(!h.proxied){h.proxied=h.animated
}if(!h.proxiedDuration){h.proxiedDuration=h.duration
}h.animated=a.isFunction(h.proxied)?h.proxied(k):h.proxied;
h.duration=a.isFunction(h.proxiedDuration)?h.proxiedDuration(k):h.proxiedDuration;
var i=a.ui.accordion.animations,f=h.duration,l=h.animated;
if(!i[l]){i[l]=function(n){this.slide(n,{easing:l,duration:f||700})
}
}i[l](k)
}else{if(h.collapsible&&e){c.toggle()
}else{j.hide();
c.show()
}g(true)
}j.prev().attr("aria-expanded","false").attr("tabIndex","-1").blur();
c.prev().attr("aria-expanded","true").attr("tabIndex","0").focus()
},_completed:function(b){var c=this.options;
this.running=b?0:--this.running;
if(this.running){return
}if(c.clearStyle){this.toShow.add(this.toHide).css({height:"",overflow:""})
}this._trigger("change",null,this.data)
}});
a.extend(a.ui.accordion,{version:"1.7.2",defaults:{active:null,alwaysOpen:true,animated:"slide",autoHeight:true,clearStyle:false,collapsible:false,event:"click",fillSpace:false,header:"> li > :first-child,> :not(li):even",icons:{header:"ui-icon-triangle-1-e",headerSelected:"ui-icon-triangle-1-s"},navigation:false,navigationFilter:function(){return this.href.toLowerCase()==location.href.toLowerCase()
}},animations:{slide:function(b,j){b=a.extend({easing:"swing",duration:300},b,j);
if(!b.toHide.size()){b.toShow.animate({height:"show"},b);
return
}if(!b.toShow.size()){b.toHide.animate({height:"hide"},b);
return
}var g=b.toShow.css("overflow"),i,d={},f={},c=["height","paddingTop","paddingBottom"],e;
var h=b.toShow;
e=h[0].style.width;
h.width(parseInt(h.parent().width(),10)-parseInt(h.css("paddingLeft"),10)-parseInt(h.css("paddingRight"),10)-(parseInt(h.css("borderLeftWidth"),10)||0)-(parseInt(h.css("borderRightWidth"),10)||0));
a.each(c,function(k,m){f[m]="hide";
var l=(""+a.css(b.toShow[0],m)).match(/^([\d+-.]+)(.*)$/);
d[m]={value:l[1],unit:l[2]||"px"}
});
b.toShow.css({height:0,overflow:"hidden"}).show();
b.toHide.filter(":hidden").each(b.complete).end().filter(":visible").animate(f,{step:function(k,l){if(l.prop=="height"){i=(l.now-l.start)/(l.end-l.start)
}b.toShow[0].style[l.prop]=(i*d[l.prop].value)+d[l.prop].unit
},duration:b.duration,easing:b.easing,complete:function(){if(!b.autoHeight){b.toShow.css("height","")
}b.toShow.css("width",e);
b.toShow.css({overflow:g});
b.complete()
}})
},bounceslide:function(b){this.slide(b,{easing:b.down?"easeOutBounce":"swing",duration:b.down?1000:200})
},easeslide:function(b){this.slide(b,{easing:"easeinout",duration:700})
}}})
})(jQuery);
(function($){$.extend($.ui,{datepicker:{version:"1.7.2"}});
var PROP_NAME="datepicker";
function Datepicker(){this.debug=false;
this._curInst=null;
this._keyEvent=false;
this._disabledInputs=[];
this._datepickerShowing=false;
this._inDialog=false;
this._mainDivId="ui-datepicker-div";
this._inlineClass="ui-datepicker-inline";
this._appendClass="ui-datepicker-append";
this._triggerClass="ui-datepicker-trigger";
this._dialogClass="ui-datepicker-dialog";
this._disableClass="ui-datepicker-disabled";
this._unselectableClass="ui-datepicker-unselectable";
this._currentClass="ui-datepicker-current-day";
this._dayOverClass="ui-datepicker-days-cell-over";
this.regional=[];
this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],dateFormat:"mm/dd/yy",firstDay:0,isRTL:false};
this._defaults={showOn:"focus",showAnim:"show",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:false,hideIfNoPrevNext:false,navigationAsDateFormat:false,gotoCurrent:false,changeMonth:false,changeYear:false,showMonthAfterYear:false,yearRange:"-10:+10",showOtherMonths:false,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"normal",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:true,showButtonPanel:false};
$.extend(this._defaults,this.regional[""]);
this.dpDiv=$('<div id="'+this._mainDivId+'" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all ui-helper-hidden-accessible"></div>')
}$.extend(Datepicker.prototype,{markerClassName:"hasDatepicker",log:function(){if(this.debug){console.log.apply("",arguments)
}},setDefaults:function(settings){extendRemove(this._defaults,settings||{});
return this
},_attachDatepicker:function(target,settings){var inlineSettings=null;
for(var attrName in this._defaults){var attrValue=target.getAttribute("date:"+attrName);
if(attrValue){inlineSettings=inlineSettings||{};
try{inlineSettings[attrName]=eval(attrValue)
}catch(err){inlineSettings[attrName]=attrValue
}}}var nodeName=target.nodeName.toLowerCase();
var inline=(nodeName=="div"||nodeName=="span");
if(!target.id){target.id="dp"+(++this.uuid)
}var inst=this._newInst($(target),inline);
inst.settings=$.extend({},settings||{},inlineSettings||{});
if(nodeName=="input"){this._connectDatepicker(target,inst)
}else{if(inline){this._inlineDatepicker(target,inst)
}}},_newInst:function(target,inline){var id=target[0].id.replace(/([:\[\]\.])/g,"\\\\$1");
return{id:id,input:target,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:inline,dpDiv:(!inline?this.dpDiv:$('<div class="'+this._inlineClass+' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))}
},_connectDatepicker:function(target,inst){var input=$(target);
inst.append=$([]);
inst.trigger=$([]);
if(input.hasClass(this.markerClassName)){return
}var appendText=this._get(inst,"appendText");
var isRTL=this._get(inst,"isRTL");
if(appendText){inst.append=$('<span class="'+this._appendClass+'">'+appendText+"</span>");
input[isRTL?"before":"after"](inst.append)
}var showOn=this._get(inst,"showOn");
if(showOn=="focus"||showOn=="both"){input.focus(this._showDatepicker)
}if(showOn=="button"||showOn=="both"){var buttonText=this._get(inst,"buttonText");
var buttonImage=this._get(inst,"buttonImage");
inst.trigger=$(this._get(inst,"buttonImageOnly")?$("<img/>").addClass(this._triggerClass).attr({src:buttonImage,alt:buttonText,title:buttonText}):$('<button type="button"></button>').addClass(this._triggerClass).html(buttonImage==""?buttonText:$("<img/>").attr({src:buttonImage,alt:buttonText,title:buttonText})));
input[isRTL?"before":"after"](inst.trigger);
inst.trigger.click(function(){if($.datepicker._datepickerShowing&&$.datepicker._lastInput==target){$.datepicker._hideDatepicker()
}else{$.datepicker._showDatepicker(target)
}return false
})
}input.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).bind("setData.datepicker",function(event,key,value){inst.settings[key]=value
}).bind("getData.datepicker",function(event,key){return this._get(inst,key)
});
$.data(target,PROP_NAME,inst)
},_inlineDatepicker:function(target,inst){var divSpan=$(target);
if(divSpan.hasClass(this.markerClassName)){return
}divSpan.addClass(this.markerClassName).append(inst.dpDiv).bind("setData.datepicker",function(event,key,value){inst.settings[key]=value
}).bind("getData.datepicker",function(event,key){return this._get(inst,key)
});
$.data(target,PROP_NAME,inst);
this._setDate(inst,this._getDefaultDate(inst));
this._updateDatepicker(inst);
this._updateAlternate(inst)
},_dialogDatepicker:function(input,dateText,onSelect,settings,pos){var inst=this._dialogInst;
if(!inst){var id="dp"+(++this.uuid);
this._dialogInput=$('<input type="text" id="'+id+'" size="1" style="position: absolute; top: -100px;"/>');
this._dialogInput.keydown(this._doKeyDown);
$("body").append(this._dialogInput);
inst=this._dialogInst=this._newInst(this._dialogInput,false);
inst.settings={};
$.data(this._dialogInput[0],PROP_NAME,inst)
}extendRemove(inst.settings,settings||{});
this._dialogInput.val(dateText);
this._pos=(pos?(pos.length?pos:[pos.pageX,pos.pageY]):null);
if(!this._pos){var browserWidth=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;
var browserHeight=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;
var scrollX=document.documentElement.scrollLeft||document.body.scrollLeft;
var scrollY=document.documentElement.scrollTop||document.body.scrollTop;
this._pos=[(browserWidth/2)-100+scrollX,(browserHeight/2)-150+scrollY]
}this._dialogInput.css("left",this._pos[0]+"px").css("top",this._pos[1]+"px");
inst.settings.onSelect=onSelect;
this._inDialog=true;
this.dpDiv.addClass(this._dialogClass);
this._showDatepicker(this._dialogInput[0]);
if($.blockUI){$.blockUI(this.dpDiv)
}$.data(this._dialogInput[0],PROP_NAME,inst);
return this
},_destroyDatepicker:function(target){var $target=$(target);
var inst=$.data(target,PROP_NAME);
if(!$target.hasClass(this.markerClassName)){return
}var nodeName=target.nodeName.toLowerCase();
$.removeData(target,PROP_NAME);
if(nodeName=="input"){inst.append.remove();
inst.trigger.remove();
$target.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress)
}else{if(nodeName=="div"||nodeName=="span"){$target.removeClass(this.markerClassName).empty()
}}},_enableDatepicker:function(target){var $target=$(target);
var inst=$.data(target,PROP_NAME);
if(!$target.hasClass(this.markerClassName)){return
}var nodeName=target.nodeName.toLowerCase();
if(nodeName=="input"){target.disabled=false;
inst.trigger.filter("button").each(function(){this.disabled=false
}).end().filter("img").css({opacity:"1.0",cursor:""})
}else{if(nodeName=="div"||nodeName=="span"){var inline=$target.children("."+this._inlineClass);
inline.children().removeClass("ui-state-disabled")
}}this._disabledInputs=$.map(this._disabledInputs,function(value){return(value==target?null:value)
})
},_disableDatepicker:function(target){var $target=$(target);
var inst=$.data(target,PROP_NAME);
if(!$target.hasClass(this.markerClassName)){return
}var nodeName=target.nodeName.toLowerCase();
if(nodeName=="input"){target.disabled=true;
inst.trigger.filter("button").each(function(){this.disabled=true
}).end().filter("img").css({opacity:"0.5",cursor:"default"})
}else{if(nodeName=="div"||nodeName=="span"){var inline=$target.children("."+this._inlineClass);
inline.children().addClass("ui-state-disabled")
}}this._disabledInputs=$.map(this._disabledInputs,function(value){return(value==target?null:value)
});
this._disabledInputs[this._disabledInputs.length]=target
},_isDisabledDatepicker:function(target){if(!target){return false
}for(var i=0;
i<this._disabledInputs.length;
i++){if(this._disabledInputs[i]==target){return true
}}return false
},_getInst:function(target){try{return $.data(target,PROP_NAME)
}catch(err){throw"Missing instance data for this datepicker"
}},_optionDatepicker:function(target,name,value){var inst=this._getInst(target);
if(arguments.length==2&&typeof name=="string"){return(name=="defaults"?$.extend({},$.datepicker._defaults):(inst?(name=="all"?$.extend({},inst.settings):this._get(inst,name)):null))
}var settings=name||{};
if(typeof name=="string"){settings={};
settings[name]=value
}if(inst){if(this._curInst==inst){this._hideDatepicker(null)
}var date=this._getDateDatepicker(target);
extendRemove(inst.settings,settings);
this._setDateDatepicker(target,date);
this._updateDatepicker(inst)
}},_changeDatepicker:function(target,name,value){this._optionDatepicker(target,name,value)
},_refreshDatepicker:function(target){var inst=this._getInst(target);
if(inst){this._updateDatepicker(inst)
}},_setDateDatepicker:function(target,date,endDate){var inst=this._getInst(target);
if(inst){this._setDate(inst,date,endDate);
this._updateDatepicker(inst);
this._updateAlternate(inst)
}},_getDateDatepicker:function(target){var inst=this._getInst(target);
if(inst&&!inst.inline){this._setDateFromField(inst)
}return(inst?this._getDate(inst):null)
},_doKeyDown:function(event){var inst=$.datepicker._getInst(event.target);
var handled=true;
var isRTL=inst.dpDiv.is(".ui-datepicker-rtl");
inst._keyEvent=true;
if($.datepicker._datepickerShowing){switch(event.keyCode){case 9:$.datepicker._hideDatepicker(null,"");
break;
case 13:var sel=$("td."+$.datepicker._dayOverClass+", td."+$.datepicker._currentClass,inst.dpDiv);
if(sel[0]){$.datepicker._selectDay(event.target,inst.selectedMonth,inst.selectedYear,sel[0])
}else{$.datepicker._hideDatepicker(null,$.datepicker._get(inst,"duration"))
}return false;
break;
case 27:$.datepicker._hideDatepicker(null,$.datepicker._get(inst,"duration"));
break;
case 33:$.datepicker._adjustDate(event.target,(event.ctrlKey?-$.datepicker._get(inst,"stepBigMonths"):-$.datepicker._get(inst,"stepMonths")),"M");
break;
case 34:$.datepicker._adjustDate(event.target,(event.ctrlKey?+$.datepicker._get(inst,"stepBigMonths"):+$.datepicker._get(inst,"stepMonths")),"M");
break;
case 35:if(event.ctrlKey||event.metaKey){$.datepicker._clearDate(event.target)
}handled=event.ctrlKey||event.metaKey;
break;
case 36:if(event.ctrlKey||event.metaKey){$.datepicker._gotoToday(event.target)
}handled=event.ctrlKey||event.metaKey;
break;
case 37:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,(isRTL?+1:-1),"D")
}handled=event.ctrlKey||event.metaKey;
if(event.originalEvent.altKey){$.datepicker._adjustDate(event.target,(event.ctrlKey?-$.datepicker._get(inst,"stepBigMonths"):-$.datepicker._get(inst,"stepMonths")),"M")
}break;
case 38:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,-7,"D")
}handled=event.ctrlKey||event.metaKey;
break;
case 39:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,(isRTL?-1:+1),"D")
}handled=event.ctrlKey||event.metaKey;
if(event.originalEvent.altKey){$.datepicker._adjustDate(event.target,(event.ctrlKey?+$.datepicker._get(inst,"stepBigMonths"):+$.datepicker._get(inst,"stepMonths")),"M")
}break;
case 40:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,+7,"D")
}handled=event.ctrlKey||event.metaKey;
break;
default:handled=false
}}else{if(event.keyCode==36&&event.ctrlKey){$.datepicker._showDatepicker(this)
}else{handled=false
}}if(handled){event.preventDefault();
event.stopPropagation()
}},_doKeyPress:function(event){var inst=$.datepicker._getInst(event.target);
if($.datepicker._get(inst,"constrainInput")){var chars=$.datepicker._possibleChars($.datepicker._get(inst,"dateFormat"));
var chr=String.fromCharCode(event.charCode==undefined?event.keyCode:event.charCode);
return event.ctrlKey||(chr<" "||!chars||chars.indexOf(chr)>-1)
}},_showDatepicker:function(input){input=input.target||input;
if(input.nodeName.toLowerCase()!="input"){input=$("input",input.parentNode)[0]
}if($.datepicker._isDisabledDatepicker(input)||$.datepicker._lastInput==input){return
}var inst=$.datepicker._getInst(input);
var beforeShow=$.datepicker._get(inst,"beforeShow");
extendRemove(inst.settings,(beforeShow?beforeShow.apply(input,[input,inst]):{}));
$.datepicker._hideDatepicker(null,"");
$.datepicker._lastInput=input;
$.datepicker._setDateFromField(inst);
if($.datepicker._inDialog){input.value=""
}if(!$.datepicker._pos){$.datepicker._pos=$.datepicker._findPos(input);
$.datepicker._pos[1]+=input.offsetHeight
}var isFixed=false;
$(input).parents().each(function(){isFixed|=$(this).css("position")=="fixed";
return !isFixed
});
if(isFixed&&$.browser.opera){$.datepicker._pos[0]-=document.documentElement.scrollLeft;
$.datepicker._pos[1]-=document.documentElement.scrollTop
}var offset={left:$.datepicker._pos[0],top:$.datepicker._pos[1]};
$.datepicker._pos=null;
inst.rangeStart=null;
inst.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});
$.datepicker._updateDatepicker(inst);
offset=$.datepicker._checkOffset(inst,offset,isFixed);
inst.dpDiv.css({position:($.datepicker._inDialog&&$.blockUI?"static":(isFixed?"fixed":"absolute")),display:"none",left:offset.left+"px",top:offset.top+"px"});
if(!inst.inline){var showAnim=$.datepicker._get(inst,"showAnim")||"show";
var duration=$.datepicker._get(inst,"duration");
var postProcess=function(){$.datepicker._datepickerShowing=true;
if($.browser.msie&&parseInt($.browser.version,10)<7){$("iframe.ui-datepicker-cover").css({width:inst.dpDiv.width()+4,height:inst.dpDiv.height()+4})
}};
if($.effects&&$.effects[showAnim]){inst.dpDiv.show(showAnim,$.datepicker._get(inst,"showOptions"),duration,postProcess)
}else{inst.dpDiv[showAnim](duration,postProcess)
}if(duration==""){postProcess()
}if(inst.input[0].type!="hidden"){inst.input[0].focus()
}$.datepicker._curInst=inst
}},_updateDatepicker:function(inst){var dims={width:inst.dpDiv.width()+4,height:inst.dpDiv.height()+4};
var self=this;
inst.dpDiv.empty().append(this._generateHTML(inst)).find("iframe.ui-datepicker-cover").css({width:dims.width,height:dims.height}).end().find("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a").bind("mouseout",function(){$(this).removeClass("ui-state-hover");
if(this.className.indexOf("ui-datepicker-prev")!=-1){$(this).removeClass("ui-datepicker-prev-hover")
}if(this.className.indexOf("ui-datepicker-next")!=-1){$(this).removeClass("ui-datepicker-next-hover")
}}).bind("mouseover",function(){if(!self._isDisabledDatepicker(inst.inline?inst.dpDiv.parent()[0]:inst.input[0])){$(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");
$(this).addClass("ui-state-hover");
if(this.className.indexOf("ui-datepicker-prev")!=-1){$(this).addClass("ui-datepicker-prev-hover")
}if(this.className.indexOf("ui-datepicker-next")!=-1){$(this).addClass("ui-datepicker-next-hover")
}}}).end().find("."+this._dayOverClass+" a").trigger("mouseover").end();
var numMonths=this._getNumberOfMonths(inst);
var cols=numMonths[1];
var width=17;
if(cols>1){inst.dpDiv.addClass("ui-datepicker-multi-"+cols).css("width",(width*cols)+"em")
}else{inst.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("")
}inst.dpDiv[(numMonths[0]!=1||numMonths[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi");
inst.dpDiv[(this._get(inst,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");
if(inst.input&&inst.input[0].type!="hidden"&&inst==$.datepicker._curInst){$(inst.input[0]).focus()
}},_checkOffset:function(inst,offset,isFixed){var dpWidth=inst.dpDiv.outerWidth();
var dpHeight=inst.dpDiv.outerHeight();
var inputWidth=inst.input?inst.input.outerWidth():0;
var inputHeight=inst.input?inst.input.outerHeight():0;
var viewWidth=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)+$(document).scrollLeft();
var viewHeight=(window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)+$(document).scrollTop();
offset.left-=(this._get(inst,"isRTL")?(dpWidth-inputWidth):0);
offset.left-=(isFixed&&offset.left==inst.input.offset().left)?$(document).scrollLeft():0;
offset.top-=(isFixed&&offset.top==(inst.input.offset().top+inputHeight))?$(document).scrollTop():0;
offset.left-=(offset.left+dpWidth>viewWidth&&viewWidth>dpWidth)?Math.abs(offset.left+dpWidth-viewWidth):0;
offset.top-=(offset.top+dpHeight>viewHeight&&viewHeight>dpHeight)?Math.abs(offset.top+dpHeight+inputHeight*2-viewHeight):0;
return offset
},_findPos:function(obj){while(obj&&(obj.type=="hidden"||obj.nodeType!=1)){obj=obj.nextSibling
}var position=$(obj).offset();
return[position.left,position.top]
},_hideDatepicker:function(input,duration){var inst=this._curInst;
if(!inst||(input&&inst!=$.data(input,PROP_NAME))){return
}if(inst.stayOpen){this._selectDate("#"+inst.id,this._formatDate(inst,inst.currentDay,inst.currentMonth,inst.currentYear))
}inst.stayOpen=false;
if(this._datepickerShowing){duration=(duration!=null?duration:this._get(inst,"duration"));
var showAnim=this._get(inst,"showAnim");
var postProcess=function(){$.datepicker._tidyDialog(inst)
};
if(duration!=""&&$.effects&&$.effects[showAnim]){inst.dpDiv.hide(showAnim,$.datepicker._get(inst,"showOptions"),duration,postProcess)
}else{inst.dpDiv[(duration==""?"hide":(showAnim=="slideDown"?"slideUp":(showAnim=="fadeIn"?"fadeOut":"hide")))](duration,postProcess)
}if(duration==""){this._tidyDialog(inst)
}var onClose=this._get(inst,"onClose");
if(onClose){onClose.apply((inst.input?inst.input[0]:null),[(inst.input?inst.input.val():""),inst])
}this._datepickerShowing=false;
this._lastInput=null;
if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});
if($.blockUI){$.unblockUI();
$("body").append(this.dpDiv)
}}this._inDialog=false
}this._curInst=null
},_tidyDialog:function(inst){inst.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")
},_checkExternalClick:function(event){if(!$.datepicker._curInst){return
}var $target=$(event.target);
if(($target.parents("#"+$.datepicker._mainDivId).length==0)&&!$target.hasClass($.datepicker.markerClassName)&&!$target.hasClass($.datepicker._triggerClass)&&$.datepicker._datepickerShowing&&!($.datepicker._inDialog&&$.blockUI)){$.datepicker._hideDatepicker(null,"")
}},_adjustDate:function(id,offset,period){var target=$(id);
var inst=this._getInst(target[0]);
if(this._isDisabledDatepicker(target[0])){return
}this._adjustInstDate(inst,offset+(period=="M"?this._get(inst,"showCurrentAtPos"):0),period);
this._updateDatepicker(inst)
},_gotoToday:function(id){var target=$(id);
var inst=this._getInst(target[0]);
if(this._get(inst,"gotoCurrent")&&inst.currentDay){inst.selectedDay=inst.currentDay;
inst.drawMonth=inst.selectedMonth=inst.currentMonth;
inst.drawYear=inst.selectedYear=inst.currentYear
}else{var date=new Date();
inst.selectedDay=date.getDate();
inst.drawMonth=inst.selectedMonth=date.getMonth();
inst.drawYear=inst.selectedYear=date.getFullYear()
}this._notifyChange(inst);
this._adjustDate(target)
},_selectMonthYear:function(id,select,period){var target=$(id);
var inst=this._getInst(target[0]);
inst._selectingMonthYear=false;
inst["selected"+(period=="M"?"Month":"Year")]=inst["draw"+(period=="M"?"Month":"Year")]=parseInt(select.options[select.selectedIndex].value,10);
this._notifyChange(inst);
this._adjustDate(target)
},_clickMonthYear:function(id){var target=$(id);
var inst=this._getInst(target[0]);
if(inst.input&&inst._selectingMonthYear&&!$.browser.msie){inst.input[0].focus()
}inst._selectingMonthYear=!inst._selectingMonthYear
},_selectDay:function(id,month,year,td){var target=$(id);
if($(td).hasClass(this._unselectableClass)||this._isDisabledDatepicker(target[0])){return
}var inst=this._getInst(target[0]);
inst.selectedDay=inst.currentDay=$("a",td).html();
inst.selectedMonth=inst.currentMonth=month;
inst.selectedYear=inst.currentYear=year;
if(inst.stayOpen){inst.endDay=inst.endMonth=inst.endYear=null
}this._selectDate(id,this._formatDate(inst,inst.currentDay,inst.currentMonth,inst.currentYear));
if(inst.stayOpen){inst.rangeStart=this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay));
this._updateDatepicker(inst)
}},_clearDate:function(id){var target=$(id);
var inst=this._getInst(target[0]);
inst.stayOpen=false;
inst.endDay=inst.endMonth=inst.endYear=inst.rangeStart=null;
this._selectDate(target,"")
},_selectDate:function(id,dateStr){var target=$(id);
var inst=this._getInst(target[0]);
dateStr=(dateStr!=null?dateStr:this._formatDate(inst));
if(inst.input){inst.input.val(dateStr)
}this._updateAlternate(inst);
var onSelect=this._get(inst,"onSelect");
if(onSelect){onSelect.apply((inst.input?inst.input[0]:null),[dateStr,inst])
}else{if(inst.input){inst.input.trigger("change")
}}if(inst.inline){this._updateDatepicker(inst)
}else{if(!inst.stayOpen){this._hideDatepicker(null,this._get(inst,"duration"));
this._lastInput=inst.input[0];
if(typeof(inst.input[0])!="object"){inst.input[0].focus()
}this._lastInput=null
}}},_updateAlternate:function(inst){var altField=this._get(inst,"altField");
if(altField){var altFormat=this._get(inst,"altFormat")||this._get(inst,"dateFormat");
var date=this._getDate(inst);
dateStr=this.formatDate(altFormat,date,this._getFormatConfig(inst));
$(altField).each(function(){$(this).val(dateStr)
})
}},noWeekends:function(date){var day=date.getDay();
return[(day>0&&day<6),""]
},iso8601Week:function(date){var checkDate=new Date(date.getFullYear(),date.getMonth(),date.getDate());
var firstMon=new Date(checkDate.getFullYear(),1-1,4);
var firstDay=firstMon.getDay()||7;
firstMon.setDate(firstMon.getDate()+1-firstDay);
if(firstDay<4&&checkDate<firstMon){checkDate.setDate(checkDate.getDate()-3);
return $.datepicker.iso8601Week(checkDate)
}else{if(checkDate>new Date(checkDate.getFullYear(),12-1,28)){firstDay=new Date(checkDate.getFullYear()+1,1-1,4).getDay()||7;
if(firstDay>4&&(checkDate.getDay()||7)<firstDay-3){return 1
}}}return Math.floor(((checkDate-firstMon)/86400000)/7)+1
},parseDate:function(format,value,settings){if(format==null||value==null){throw"Invalid arguments"
}value=(typeof value=="object"?value.toString():value+"");
if(value==""){return null
}var shortYearCutoff=(settings?settings.shortYearCutoff:null)||this._defaults.shortYearCutoff;
var dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort;
var dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames;
var monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort;
var monthNames=(settings?settings.monthNames:null)||this._defaults.monthNames;
var year=-1;
var month=-1;
var day=-1;
var doy=-1;
var literal=false;
var lookAhead=function(match){var matches=(iFormat+1<format.length&&format.charAt(iFormat+1)==match);
if(matches){iFormat++
}return matches
};
var getNumber=function(match){lookAhead(match);
var origSize=(match=="@"?14:(match=="y"?4:(match=="o"?3:2)));
var size=origSize;
var num=0;
while(size>0&&iValue<value.length&&value.charAt(iValue)>="0"&&value.charAt(iValue)<="9"){num=num*10+parseInt(value.charAt(iValue++),10);
size--
}if(size==origSize){throw"Missing number at position "+iValue
}return num
};
var getName=function(match,shortNames,longNames){var names=(lookAhead(match)?longNames:shortNames);
var size=0;
for(var j=0;
j<names.length;
j++){size=Math.max(size,names[j].length)
}var name="";
var iInit=iValue;
while(size>0&&iValue<value.length){name+=value.charAt(iValue++);
for(var i=0;
i<names.length;
i++){if(name==names[i]){return i+1
}}size--
}throw"Unknown name at position "+iInit
};
var checkLiteral=function(){if(value.charAt(iValue)!=format.charAt(iFormat)){throw"Unexpected literal at position "+iValue
}iValue++
};
var iValue=0;
for(var iFormat=0;
iFormat<format.length;
iFormat++){if(literal){if(format.charAt(iFormat)=="'"&&!lookAhead("'")){literal=false
}else{checkLiteral()
}}else{switch(format.charAt(iFormat)){case"d":day=getNumber("d");
break;
case"D":getName("D",dayNamesShort,dayNames);
break;
case"o":doy=getNumber("o");
break;
case"m":month=getNumber("m");
break;
case"M":month=getName("M",monthNamesShort,monthNames);
break;
case"y":year=getNumber("y");
break;
case"@":var date=new Date(getNumber("@"));
year=date.getFullYear();
month=date.getMonth()+1;
day=date.getDate();
break;
case"'":if(lookAhead("'")){checkLiteral()
}else{literal=true
}break;
default:checkLiteral()
}}}if(year==-1){year=new Date().getFullYear()
}else{if(year<100){year+=new Date().getFullYear()-new Date().getFullYear()%100+(year<=shortYearCutoff?0:-100)
}}if(doy>-1){month=1;
day=doy;
do{var dim=this._getDaysInMonth(year,month-1);
if(day<=dim){break
}month++;
day-=dim
}while(true)
}var date=this._daylightSavingAdjust(new Date(year,month-1,day));
if(date.getFullYear()!=year||date.getMonth()+1!=month||date.getDate()!=day){throw"Invalid date"
}return date
},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TIMESTAMP:"@",W3C:"yy-mm-dd",formatDate:function(format,date,settings){if(!date){return""
}var dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort;
var dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames;
var monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort;
var monthNames=(settings?settings.monthNames:null)||this._defaults.monthNames;
var lookAhead=function(match){var matches=(iFormat+1<format.length&&format.charAt(iFormat+1)==match);
if(matches){iFormat++
}return matches
};
var formatNumber=function(match,value,len){var num=""+value;
if(lookAhead(match)){while(num.length<len){num="0"+num
}}return num
};
var formatName=function(match,value,shortNames,longNames){return(lookAhead(match)?longNames[value]:shortNames[value])
};
var output="";
var literal=false;
if(date){for(var iFormat=0;
iFormat<format.length;
iFormat++){if(literal){if(format.charAt(iFormat)=="'"&&!lookAhead("'")){literal=false
}else{output+=format.charAt(iFormat)
}}else{switch(format.charAt(iFormat)){case"d":output+=formatNumber("d",date.getDate(),2);
break;
case"D":output+=formatName("D",date.getDay(),dayNamesShort,dayNames);
break;
case"o":var doy=date.getDate();
for(var m=date.getMonth()-1;
m>=0;
m--){doy+=this._getDaysInMonth(date.getFullYear(),m)
}output+=formatNumber("o",doy,3);
break;
case"m":output+=formatNumber("m",date.getMonth()+1,2);
break;
case"M":output+=formatName("M",date.getMonth(),monthNamesShort,monthNames);
break;
case"y":output+=(lookAhead("y")?date.getFullYear():(date.getYear()%100<10?"0":"")+date.getYear()%100);
break;
case"@":output+=date.getTime();
break;
case"'":if(lookAhead("'")){output+="'"
}else{literal=true
}break;
default:output+=format.charAt(iFormat)
}}}}return output
},_possibleChars:function(format){var chars="";
var literal=false;
for(var iFormat=0;
iFormat<format.length;
iFormat++){if(literal){if(format.charAt(iFormat)=="'"&&!lookAhead("'")){literal=false
}else{chars+=format.charAt(iFormat)
}}else{switch(format.charAt(iFormat)){case"d":case"m":case"y":case"@":chars+="0123456789";
break;
case"D":case"M":return null;
case"'":if(lookAhead("'")){chars+="'"
}else{literal=true
}break;
default:chars+=format.charAt(iFormat)
}}}return chars
},_get:function(inst,name){return inst.settings[name]!==undefined?inst.settings[name]:this._defaults[name]
},_setDateFromField:function(inst){var dateFormat=this._get(inst,"dateFormat");
var dates=inst.input?inst.input.val():null;
inst.endDay=inst.endMonth=inst.endYear=null;
var date=defaultDate=this._getDefaultDate(inst);
var settings=this._getFormatConfig(inst);
try{date=this.parseDate(dateFormat,dates,settings)||defaultDate
}catch(event){this.log(event);
date=defaultDate
}inst.selectedDay=date.getDate();
inst.drawMonth=inst.selectedMonth=date.getMonth();
inst.drawYear=inst.selectedYear=date.getFullYear();
inst.currentDay=(dates?date.getDate():0);
inst.currentMonth=(dates?date.getMonth():0);
inst.currentYear=(dates?date.getFullYear():0);
this._adjustInstDate(inst)
},_getDefaultDate:function(inst){var date=this._determineDate(this._get(inst,"defaultDate"),new Date());
var minDate=this._getMinMaxDate(inst,"min",true);
var maxDate=this._getMinMaxDate(inst,"max");
date=(minDate&&date<minDate?minDate:date);
date=(maxDate&&date>maxDate?maxDate:date);
return date
},_determineDate:function(date,defaultDate){var offsetNumeric=function(offset){var date=new Date();
date.setDate(date.getDate()+offset);
return date
};
var offsetString=function(offset,getDaysInMonth){var date=new Date();
var year=date.getFullYear();
var month=date.getMonth();
var day=date.getDate();
var pattern=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g;
var matches=pattern.exec(offset);
while(matches){switch(matches[2]||"d"){case"d":case"D":day+=parseInt(matches[1],10);
break;
case"w":case"W":day+=parseInt(matches[1],10)*7;
break;
case"m":case"M":month+=parseInt(matches[1],10);
day=Math.min(day,getDaysInMonth(year,month));
break;
case"y":case"Y":year+=parseInt(matches[1],10);
day=Math.min(day,getDaysInMonth(year,month));
break
}matches=pattern.exec(offset)
}return new Date(year,month,day)
};
date=(date==null?defaultDate:(typeof date=="string"?offsetString(date,this._getDaysInMonth):(typeof date=="number"?(isNaN(date)?defaultDate:offsetNumeric(date)):date)));
date=(date&&date.toString()=="Invalid Date"?defaultDate:date);
if(date){date.setHours(0);
date.setMinutes(0);
date.setSeconds(0);
date.setMilliseconds(0)
}return this._daylightSavingAdjust(date)
},_daylightSavingAdjust:function(date){if(!date){return null
}date.setHours(date.getHours()>12?date.getHours()+2:0);
return date
},_setDate:function(inst,date,endDate){var clear=!(date);
var origMonth=inst.selectedMonth;
var origYear=inst.selectedYear;
date=this._determineDate(date,new Date());
inst.selectedDay=inst.currentDay=date.getDate();
inst.drawMonth=inst.selectedMonth=inst.currentMonth=date.getMonth();
inst.drawYear=inst.selectedYear=inst.currentYear=date.getFullYear();
if(origMonth!=inst.selectedMonth||origYear!=inst.selectedYear){this._notifyChange(inst)
}this._adjustInstDate(inst);
if(inst.input){inst.input.val(clear?"":this._formatDate(inst))
}},_getDate:function(inst){var startDate=(!inst.currentYear||(inst.input&&inst.input.val()=="")?null:this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));
return startDate
},_generateHTML:function(inst){var today=new Date();
today=this._daylightSavingAdjust(new Date(today.getFullYear(),today.getMonth(),today.getDate()));
var isRTL=this._get(inst,"isRTL");
var showButtonPanel=this._get(inst,"showButtonPanel");
var hideIfNoPrevNext=this._get(inst,"hideIfNoPrevNext");
var navigationAsDateFormat=this._get(inst,"navigationAsDateFormat");
var numMonths=this._getNumberOfMonths(inst);
var showCurrentAtPos=this._get(inst,"showCurrentAtPos");
var stepMonths=this._get(inst,"stepMonths");
var stepBigMonths=this._get(inst,"stepBigMonths");
var isMultiMonth=(numMonths[0]!=1||numMonths[1]!=1);
var currentDate=this._daylightSavingAdjust((!inst.currentDay?new Date(9999,9,9):new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));
var minDate=this._getMinMaxDate(inst,"min",true);
var maxDate=this._getMinMaxDate(inst,"max");
var drawMonth=inst.drawMonth-showCurrentAtPos;
var drawYear=inst.drawYear;
if(drawMonth<0){drawMonth+=12;
drawYear--
}if(maxDate){var maxDraw=this._daylightSavingAdjust(new Date(maxDate.getFullYear(),maxDate.getMonth()-numMonths[1]+1,maxDate.getDate()));
maxDraw=(minDate&&maxDraw<minDate?minDate:maxDraw);
while(this._daylightSavingAdjust(new Date(drawYear,drawMonth,1))>maxDraw){drawMonth--;
if(drawMonth<0){drawMonth=11;
drawYear--
}}}inst.drawMonth=drawMonth;
inst.drawYear=drawYear;
var prevText=this._get(inst,"prevText");
prevText=(!navigationAsDateFormat?prevText:this.formatDate(prevText,this._daylightSavingAdjust(new Date(drawYear,drawMonth-stepMonths,1)),this._getFormatConfig(inst)));
var prev=(this._canAdjustMonth(inst,-1,drawYear,drawMonth)?'<a class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery.datepicker._adjustDate(\'#'+inst.id+"', -"+stepMonths+", 'M');\" title=\""+prevText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"e":"w")+'">'+prevText+"</span></a>":(hideIfNoPrevNext?"":'<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+prevText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"e":"w")+'">'+prevText+"</span></a>"));
var nextText=this._get(inst,"nextText");
nextText=(!navigationAsDateFormat?nextText:this.formatDate(nextText,this._daylightSavingAdjust(new Date(drawYear,drawMonth+stepMonths,1)),this._getFormatConfig(inst)));
var next=(this._canAdjustMonth(inst,+1,drawYear,drawMonth)?'<a class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery.datepicker._adjustDate(\'#'+inst.id+"', +"+stepMonths+", 'M');\" title=\""+nextText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"w":"e")+'">'+nextText+"</span></a>":(hideIfNoPrevNext?"":'<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+nextText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"w":"e")+'">'+nextText+"</span></a>"));
var currentText=this._get(inst,"currentText");
var gotoDate=(this._get(inst,"gotoCurrent")&&inst.currentDay?currentDate:today);
currentText=(!navigationAsDateFormat?currentText:this.formatDate(currentText,gotoDate,this._getFormatConfig(inst)));
var controls=(!inst.inline?'<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="DP_jQuery.datepicker._hideDatepicker();">'+this._get(inst,"closeText")+"</button>":"");
var buttonPanel=(showButtonPanel)?'<div class="ui-datepicker-buttonpane ui-widget-content">'+(isRTL?controls:"")+(this._isInRange(inst,gotoDate)?'<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_jQuery.datepicker._gotoToday(\'#'+inst.id+"');\">"+currentText+"</button>":"")+(isRTL?"":controls)+"</div>":"";
var firstDay=parseInt(this._get(inst,"firstDay"),10);
firstDay=(isNaN(firstDay)?0:firstDay);
var dayNames=this._get(inst,"dayNames");
var dayNamesShort=this._get(inst,"dayNamesShort");
var dayNamesMin=this._get(inst,"dayNamesMin");
var monthNames=this._get(inst,"monthNames");
var monthNamesShort=this._get(inst,"monthNamesShort");
var beforeShowDay=this._get(inst,"beforeShowDay");
var showOtherMonths=this._get(inst,"showOtherMonths");
var calculateWeek=this._get(inst,"calculateWeek")||this.iso8601Week;
var endDate=inst.endDay?this._daylightSavingAdjust(new Date(inst.endYear,inst.endMonth,inst.endDay)):currentDate;
var defaultDate=this._getDefaultDate(inst);
var html="";
for(var row=0;
row<numMonths[0];
row++){var group="";
for(var col=0;
col<numMonths[1];
col++){var selectedDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,inst.selectedDay));
var cornerClass=" ui-corner-all";
var calender="";
if(isMultiMonth){calender+='<div class="ui-datepicker-group ui-datepicker-group-';
switch(col){case 0:calender+="first";
cornerClass=" ui-corner-"+(isRTL?"right":"left");
break;
case numMonths[1]-1:calender+="last";
cornerClass=" ui-corner-"+(isRTL?"left":"right");
break;
default:calender+="middle";
cornerClass="";
break
}calender+='">'
}calender+='<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix'+cornerClass+'">'+(/all|left/.test(cornerClass)&&row==0?(isRTL?next:prev):"")+(/all|right/.test(cornerClass)&&row==0?(isRTL?prev:next):"")+this._generateMonthYearHeader(inst,drawMonth,drawYear,minDate,maxDate,selectedDate,row>0||col>0,monthNames,monthNamesShort)+'</div><table class="ui-datepicker-calendar"><thead><tr>';
var thead="";
for(var dow=0;
dow<7;
dow++){var day=(dow+firstDay)%7;
thead+="<th"+((dow+firstDay+6)%7>=5?' class="ui-datepicker-week-end"':"")+'><span title="'+dayNames[day]+'">'+dayNamesMin[day]+"</span></th>"
}calender+=thead+"</tr></thead><tbody>";
var daysInMonth=this._getDaysInMonth(drawYear,drawMonth);
if(drawYear==inst.selectedYear&&drawMonth==inst.selectedMonth){inst.selectedDay=Math.min(inst.selectedDay,daysInMonth)
}var leadDays=(this._getFirstDayOfMonth(drawYear,drawMonth)-firstDay+7)%7;
var numRows=(isMultiMonth?6:Math.ceil((leadDays+daysInMonth)/7));
var printDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,1-leadDays));
for(var dRow=0;
dRow<numRows;
dRow++){calender+="<tr>";
var tbody="";
for(var dow=0;
dow<7;
dow++){var daySettings=(beforeShowDay?beforeShowDay.apply((inst.input?inst.input[0]:null),[printDate]):[true,""]);
var otherMonth=(printDate.getMonth()!=drawMonth);
var unselectable=otherMonth||!daySettings[0]||(minDate&&printDate<minDate)||(maxDate&&printDate>maxDate);
tbody+='<td class="'+((dow+firstDay+6)%7>=5?" ui-datepicker-week-end":"")+(otherMonth?" ui-datepicker-other-month":"")+((printDate.getTime()==selectedDate.getTime()&&drawMonth==inst.selectedMonth&&inst._keyEvent)||(defaultDate.getTime()==printDate.getTime()&&defaultDate.getTime()==selectedDate.getTime())?" "+this._dayOverClass:"")+(unselectable?" "+this._unselectableClass+" ui-state-disabled":"")+(otherMonth&&!showOtherMonths?"":" "+daySettings[1]+(printDate.getTime()>=currentDate.getTime()&&printDate.getTime()<=endDate.getTime()?" "+this._currentClass:"")+(printDate.getTime()==today.getTime()?" ui-datepicker-today":""))+'"'+((!otherMonth||showOtherMonths)&&daySettings[2]?' title="'+daySettings[2]+'"':"")+(unselectable?"":" onclick=\"DP_jQuery.datepicker._selectDay('#"+inst.id+"',"+drawMonth+","+drawYear+', this);return false;"')+">"+(otherMonth?(showOtherMonths?printDate.getDate():"&#xa0;"):(unselectable?'<span class="ui-state-default">'+printDate.getDate()+"</span>":'<a class="ui-state-default'+(printDate.getTime()==today.getTime()?" ui-state-highlight":"")+(printDate.getTime()>=currentDate.getTime()&&printDate.getTime()<=endDate.getTime()?" ui-state-active":"")+'" href="#">'+printDate.getDate()+"</a>"))+"</td>";
printDate.setDate(printDate.getDate()+1);
printDate=this._daylightSavingAdjust(printDate)
}calender+=tbody+"</tr>"
}drawMonth++;
if(drawMonth>11){drawMonth=0;
drawYear++
}calender+="</tbody></table>"+(isMultiMonth?"</div>"+((numMonths[0]>0&&col==numMonths[1]-1)?'<div class="ui-datepicker-row-break"></div>':""):"");
group+=calender
}html+=group
}html+=buttonPanel+($.browser.msie&&parseInt($.browser.version,10)<7&&!inst.inline?'<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>':"");
inst._keyEvent=false;
return html
},_generateMonthYearHeader:function(inst,drawMonth,drawYear,minDate,maxDate,selectedDate,secondary,monthNames,monthNamesShort){minDate=(inst.rangeStart&&minDate&&selectedDate<minDate?selectedDate:minDate);
var changeMonth=this._get(inst,"changeMonth");
var changeYear=this._get(inst,"changeYear");
var showMonthAfterYear=this._get(inst,"showMonthAfterYear");
var html='<div class="ui-datepicker-title">';
var monthHtml="";
if(secondary||!changeMonth){monthHtml+='<span class="ui-datepicker-month">'+monthNames[drawMonth]+"</span> "
}else{var inMinYear=(minDate&&minDate.getFullYear()==drawYear);
var inMaxYear=(maxDate&&maxDate.getFullYear()==drawYear);
monthHtml+='<select class="ui-datepicker-month" onchange="DP_jQuery.datepicker._selectMonthYear(\'#'+inst.id+"', this, 'M');\" onclick=\"DP_jQuery.datepicker._clickMonthYear('#"+inst.id+"');\">";
for(var month=0;
month<12;
month++){if((!inMinYear||month>=minDate.getMonth())&&(!inMaxYear||month<=maxDate.getMonth())){monthHtml+='<option value="'+month+'"'+(month==drawMonth?' selected="selected"':"")+">"+monthNamesShort[month]+"</option>"
}}monthHtml+="</select>"
}if(!showMonthAfterYear){html+=monthHtml+((secondary||changeMonth||changeYear)&&(!(changeMonth&&changeYear))?"&#xa0;":"")
}if(secondary||!changeYear){html+='<span class="ui-datepicker-year">'+drawYear+"</span>"
}else{var years=this._get(inst,"yearRange").split(":");
var year=0;
var endYear=0;
if(years.length!=2){year=drawYear-10;
endYear=drawYear+10
}else{if(years[0].charAt(0)=="+"||years[0].charAt(0)=="-"){year=drawYear+parseInt(years[0],10);
endYear=drawYear+parseInt(years[1],10)
}else{year=parseInt(years[0],10);
endYear=parseInt(years[1],10)
}}year=(minDate?Math.max(year,minDate.getFullYear()):year);
endYear=(maxDate?Math.min(endYear,maxDate.getFullYear()):endYear);
html+='<select class="ui-datepicker-year" onchange="DP_jQuery.datepicker._selectMonthYear(\'#'+inst.id+"', this, 'Y');\" onclick=\"DP_jQuery.datepicker._clickMonthYear('#"+inst.id+"');\">";
for(;
year<=endYear;
year++){html+='<option value="'+year+'"'+(year==drawYear?' selected="selected"':"")+">"+year+"</option>"
}html+="</select>"
}if(showMonthAfterYear){html+=(secondary||changeMonth||changeYear?"&#xa0;":"")+monthHtml
}html+="</div>";
return html
},_adjustInstDate:function(inst,offset,period){var year=inst.drawYear+(period=="Y"?offset:0);
var month=inst.drawMonth+(period=="M"?offset:0);
var day=Math.min(inst.selectedDay,this._getDaysInMonth(year,month))+(period=="D"?offset:0);
var date=this._daylightSavingAdjust(new Date(year,month,day));
var minDate=this._getMinMaxDate(inst,"min",true);
var maxDate=this._getMinMaxDate(inst,"max");
date=(minDate&&date<minDate?minDate:date);
date=(maxDate&&date>maxDate?maxDate:date);
inst.selectedDay=date.getDate();
inst.drawMonth=inst.selectedMonth=date.getMonth();
inst.drawYear=inst.selectedYear=date.getFullYear();
if(period=="M"||period=="Y"){this._notifyChange(inst)
}},_notifyChange:function(inst){var onChange=this._get(inst,"onChangeMonthYear");
if(onChange){onChange.apply((inst.input?inst.input[0]:null),[inst.selectedYear,inst.selectedMonth+1,inst])
}},_getNumberOfMonths:function(inst){var numMonths=this._get(inst,"numberOfMonths");
return(numMonths==null?[1,1]:(typeof numMonths=="number"?[1,numMonths]:numMonths))
},_getMinMaxDate:function(inst,minMax,checkRange){var date=this._determineDate(this._get(inst,minMax+"Date"),null);
return(!checkRange||!inst.rangeStart?date:(!date||inst.rangeStart>date?inst.rangeStart:date))
},_getDaysInMonth:function(year,month){return 32-new Date(year,month,32).getDate()
},_getFirstDayOfMonth:function(year,month){return new Date(year,month,1).getDay()
},_canAdjustMonth:function(inst,offset,curYear,curMonth){var numMonths=this._getNumberOfMonths(inst);
var date=this._daylightSavingAdjust(new Date(curYear,curMonth+(offset<0?offset:numMonths[1]),1));
if(offset<0){date.setDate(this._getDaysInMonth(date.getFullYear(),date.getMonth()))
}return this._isInRange(inst,date)
},_isInRange:function(inst,date){var newMinDate=(!inst.rangeStart?null:this._daylightSavingAdjust(new Date(inst.selectedYear,inst.selectedMonth,inst.selectedDay)));
newMinDate=(newMinDate&&inst.rangeStart<newMinDate?inst.rangeStart:newMinDate);
var minDate=newMinDate||this._getMinMaxDate(inst,"min");
var maxDate=this._getMinMaxDate(inst,"max");
return((!minDate||date>=minDate)&&(!maxDate||date<=maxDate))
},_getFormatConfig:function(inst){var shortYearCutoff=this._get(inst,"shortYearCutoff");
shortYearCutoff=(typeof shortYearCutoff!="string"?shortYearCutoff:new Date().getFullYear()%100+parseInt(shortYearCutoff,10));
return{shortYearCutoff:shortYearCutoff,dayNamesShort:this._get(inst,"dayNamesShort"),dayNames:this._get(inst,"dayNames"),monthNamesShort:this._get(inst,"monthNamesShort"),monthNames:this._get(inst,"monthNames")}
},_formatDate:function(inst,day,month,year){if(!day){inst.currentDay=inst.selectedDay;
inst.currentMonth=inst.selectedMonth;
inst.currentYear=inst.selectedYear
}var date=(day?(typeof day=="object"?day:this._daylightSavingAdjust(new Date(year,month,day))):this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));
return this.formatDate(this._get(inst,"dateFormat"),date,this._getFormatConfig(inst))
}});
function extendRemove(target,props){$.extend(target,props);
for(var name in props){if(props[name]==null||props[name]==undefined){target[name]=props[name]
}}return target
}function isArray(a){return(a&&(($.browser.safari&&typeof a=="object"&&a.length)||(a.constructor&&a.constructor.toString().match(/\Array\(\)/))))
}$.fn.datepicker=function(options){if(!$.datepicker.initialized){$(document).mousedown($.datepicker._checkExternalClick).find("body").append($.datepicker.dpDiv);
$.datepicker.initialized=true
}var otherArgs=Array.prototype.slice.call(arguments,1);
if(typeof options=="string"&&(options=="isDisabled"||options=="getDate")){return $.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this[0]].concat(otherArgs))
}if(options=="option"&&arguments.length==2&&typeof arguments[1]=="string"){return $.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this[0]].concat(otherArgs))
}return this.each(function(){typeof options=="string"?$.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this].concat(otherArgs)):$.datepicker._attachDatepicker(this,options)
})
};
$.datepicker=new Datepicker();
$.datepicker.initialized=false;
$.datepicker.uuid=new Date().getTime();
$.datepicker.version="1.7.2";
window.DP_jQuery=$
})(jQuery);
(function(b){var c={dragStart:"start.draggable",drag:"drag.draggable",dragStop:"stop.draggable",maxHeight:"maxHeight.resizable",minHeight:"minHeight.resizable",maxWidth:"maxWidth.resizable",minWidth:"minWidth.resizable",resizeStart:"start.resizable",resize:"drag.resizable",resizeStop:"stop.resizable"},a="ui-dialog ui-widget ui-widget-content ui-corner-all ";
b.widget("ui.dialog",{_init:function(){this.originalTitle=this.element.attr("title");
var g=this,f=this.options,h=f.title||this.originalTitle||"&nbsp;",j=b.ui.dialog.getTitleId(this.element),l=(this.uiDialog=b("<div/>")).appendTo(document.body).hide().addClass(a+f.dialogClass).css({position:"absolute",overflow:"hidden",zIndex:f.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(n){(f.closeOnEscape&&n.keyCode&&n.keyCode==b.ui.keyCode.ESCAPE&&g.close(n))
}).attr({role:"dialog","aria-labelledby":j}).mousedown(function(n){g.moveToTop(false,n)
}),k=this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(l),e=(this.uiDialogTitlebar=b("<div></div>")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(l),d=b('<a href="#"/>').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){d.addClass("ui-state-hover")
},function(){d.removeClass("ui-state-hover")
}).mousedown(function(n){n.stopPropagation()
}).click(function(n){g.close(n);
return false
}).appendTo(e),m=(this.uiDialogTitlebarCloseText=b("<span/>")).addClass("ui-dialog-close").text(f.closeText).appendTo(d),i=b("<span/>").addClass("ui-dialog-title").attr("id",j).html(h).prependTo(e);
e.find("*").add(e).disableSelection();
(f.draggable&&b.fn.draggable&&this._makeDraggable());
(f.resizable&&b.fn.resizable&&this._makeResizable());
this._createButtons(f.buttons);
this._isOpen=false;
(f.bgiframe&&b.fn.bgiframe&&l.bgiframe());
(f.autoOpen&&this.open())
},destroy:function(){(this.overlay&&this.overlay.destroy());
this.uiDialog.hide();
this.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body");
this.uiDialog.remove();
(this.originalTitle&&this.element.attr("title",this.originalTitle))
},close:function(e){var f=this;
if(false===f._trigger("beforeclose",e)){return
}(f.overlay&&f.overlay.destroy());
f.uiDialog.unbind("keypress.ui-dialog");
(f.options.hide?f.uiDialog.hide(f.options.hide,function(){f._trigger("close",e)
}):f.uiDialog.hide()&&f._trigger("close",e));
b.ui.dialog.overlay.resize();
f._isOpen=false;
if(f.options.modal){var d=0;
b(".ui-dialog").each(function(){if(this!=f.uiDialog[0]){d=Math.max(d,b(this).css("z-index"))
}});
b.ui.dialog.maxZ=d
}},isOpen:function(){return this._isOpen
},moveToTop:function(d,e){if((this.options.modal&&!d)||(!this.options.stack&&!this.options.modal)){return this._trigger("focus",e)
}if(this.options.zIndex>b.ui.dialog.maxZ){b.ui.dialog.maxZ=this.options.zIndex
}(this.overlay&&this.overlay.$el.css("z-index",b.ui.dialog.overlay.maxZ=++b.ui.dialog.maxZ));
var f={scrollTop:this.element.attr("scrollTop"),scrollLeft:this.element.attr("scrollLeft")};
this.uiDialog.css("z-index",++b.ui.dialog.maxZ);
this.element.attr(f);
this._trigger("focus",e)
},open:function(){if(this._isOpen){return
}var d=this.options,e=this.uiDialog;
this.overlay=d.modal?new b.ui.dialog.overlay(this):null;
(e.next().length&&e.appendTo("body"));
this._size();
this._position(d.position);
e.show(d.show);
this.moveToTop(true);
(d.modal&&e.bind("keypress.ui-dialog",function(f){if(f.keyCode!=b.ui.keyCode.TAB){return
}var g=b(":tabbable",this),h=g.filter(":first")[0],i=g.filter(":last")[0];
if(f.target==i&&!f.shiftKey){setTimeout(function(){h.focus()
},1)
}else{if(f.target==h&&f.shiftKey){setTimeout(function(){i.focus()
},1)
}}}));
b([]).add(e.find(".ui-dialog-content :tabbable:first")).add(e.find(".ui-dialog-buttonpane :tabbable:first")).add(e).filter(":first").focus();
this._trigger("open");
this._isOpen=true
},_createButtons:function(g){var e=this,d=false,f=b("<div></div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix");
this.uiDialog.find(".ui-dialog-buttonpane").remove();
(typeof g=="object"&&g!==null&&b.each(g,function(){return !(d=true)
}));
if(d){b.each(g,function(i,h){b('<button type="button"></button>').addClass("ui-state-default ui-corner-all").text(i).click(function(){h.apply(e.element[0],arguments)
}).hover(function(){b(this).addClass("ui-state-hover")
},function(){b(this).removeClass("ui-state-hover")
}).focus(function(){b(this).addClass("ui-state-focus")
}).blur(function(){b(this).removeClass("ui-state-focus")
}).appendTo(f)
});
f.appendTo(this.uiDialog)
}},_makeDraggable:function(){var d=this,e=this.options,f;
this.uiDialog.draggable({cancel:".ui-dialog-content",handle:".ui-dialog-titlebar",containment:"document",start:function(){f=e.height;
b(this).height(b(this).height()).addClass("ui-dialog-dragging");
(e.dragStart&&e.dragStart.apply(d.element[0],arguments))
},drag:function(){(e.drag&&e.drag.apply(d.element[0],arguments))
},stop:function(){b(this).removeClass("ui-dialog-dragging").height(f);
(e.dragStop&&e.dragStop.apply(d.element[0],arguments));
b.ui.dialog.overlay.resize()
}})
},_makeResizable:function(d){d=(d===undefined?this.options.resizable:d);
var f=this,g=this.options,e=typeof d=="string"?d:"n,e,s,w,se,sw,ne,nw";
this.uiDialog.resizable({cancel:".ui-dialog-content",alsoResize:this.element,maxWidth:g.maxWidth,maxHeight:g.maxHeight,minWidth:g.minWidth,minHeight:g.minHeight,start:function(){b(this).addClass("ui-dialog-resizing");
(g.resizeStart&&g.resizeStart.apply(f.element[0],arguments))
},resize:function(){(g.resize&&g.resize.apply(f.element[0],arguments))
},handles:e,stop:function(){b(this).removeClass("ui-dialog-resizing");
g.height=b(this).height();
g.width=b(this).width();
(g.resizeStop&&g.resizeStop.apply(f.element[0],arguments));
b.ui.dialog.overlay.resize()
}}).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")
},_position:function(h){var d=b(window),g=b(document),e=g.scrollTop(),f=g.scrollLeft(),i=e;
if(b.inArray(h,["center","top","right","bottom","left"])>=0){h=[h=="right"||h=="left"?h:"center",h=="top"||h=="bottom"?h:"middle"]
}if(h.constructor!=Array){h=["center","middle"]
}if(h[0].constructor==Number){f+=h[0]
}else{switch(h[0]){case"left":f+=0;
break;
case"right":f+=d.width()-this.uiDialog.outerWidth();
break;
default:case"center":f+=(d.width()-this.uiDialog.outerWidth())/2
}}if(h[1].constructor==Number){e+=h[1]
}else{switch(h[1]){case"top":e+=0;
break;
case"bottom":e+=d.height()-this.uiDialog.outerHeight();
break;
default:case"middle":e+=(d.height()-this.uiDialog.outerHeight())/2
}}e=Math.max(e,i);
this.uiDialog.css({top:e,left:f})
},_setData:function(g,d){(c[g]&&this.uiDialog.data(c[g],d));
switch(g){case"buttons":this._createButtons(d);
break;
case"closeText":this.uiDialogTitlebarCloseText.text(d);
break;
case"dialogClass":this.uiDialog.removeClass(this.options.dialogClass).addClass(a+d);
break;
case"draggable":(d?this._makeDraggable():this.uiDialog.draggable("destroy"));
break;
case"height":this.uiDialog.height(d);
break;
case"position":this._position(d);
break;
case"resizable":var f=this.uiDialog,e=this.uiDialog.is(":data(resizable)");
(e&&!d&&f.resizable("destroy"));
(e&&typeof d=="string"&&f.resizable("option","handles",d));
(e||this._makeResizable(d));
break;
case"title":b(".ui-dialog-title",this.uiDialogTitlebar).html(d||"&nbsp;");
break;
case"width":this.uiDialog.width(d);
break
}b.widget.prototype._setData.apply(this,arguments)
},_size:function(){var e=this.options;
this.element.css({height:0,minHeight:0,width:"auto"});
var d=this.uiDialog.css({height:"auto",width:e.width}).height();
this.element.css({minHeight:Math.max(e.minHeight-d,0),height:e.height=="auto"?"auto":Math.max(e.height-d,0)})
}});
b.extend(b.ui.dialog,{version:"1.7.2",defaults:{autoOpen:true,bgiframe:false,buttons:{},closeOnEscape:true,closeText:"close",dialogClass:"",draggable:true,hide:null,height:"auto",maxHeight:false,maxWidth:false,minHeight:150,minWidth:150,modal:false,position:"center",resizable:true,show:null,stack:true,title:"",width:300,zIndex:1000},getter:"isOpen",uuid:0,maxZ:0,getTitleId:function(d){return"ui-dialog-title-"+(d.attr("id")||++this.uuid)
},overlay:function(d){this.$el=b.ui.dialog.overlay.create(d)
}});
b.extend(b.ui.dialog.overlay,{instances:[],maxZ:0,events:b.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(d){return d+".dialog-overlay"
}).join(" "),create:function(e){if(this.instances.length===0){setTimeout(function(){if(b.ui.dialog.overlay.instances.length){b(document).bind(b.ui.dialog.overlay.events,function(f){var g=b(f.target).parents(".ui-dialog").css("zIndex")||0;
return(g>b.ui.dialog.overlay.maxZ)
})
}},1);
b(document).bind("keydown.dialog-overlay",function(f){(e.options.closeOnEscape&&f.keyCode&&f.keyCode==b.ui.keyCode.ESCAPE&&e.close(f))
});
b(window).bind("resize.dialog-overlay",b.ui.dialog.overlay.resize)
}var d=b("<div></div>").appendTo(document.body).addClass("ui-widget-overlay").css({width:this.width(),height:this.height()});
(e.options.bgiframe&&b.fn.bgiframe&&d.bgiframe());
this.instances.push(d);
return d
},destroy:function(d){this.instances.splice(b.inArray(this.instances,d),1);
if(this.instances.length===0){b([document,window]).unbind(".dialog-overlay")
}d.remove();
var e=0;
b.each(this.instances,function(){e=Math.max(e,this.css("z-index"))
});
this.maxZ=e
},height:function(){if(b.browser.msie&&b.browser.version<7){var e=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);
var d=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);
if(e<d){return b(window).height()+"px"
}else{return e+"px"
}}else{return b(document).height()+"px"
}},width:function(){if(b.browser.msie&&b.browser.version<7){var d=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth);
var e=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth);
if(d<e){return b(window).width()+"px"
}else{return d+"px"
}}else{return b(document).width()+"px"
}},resize:function(){var d=b([]);
b.each(b.ui.dialog.overlay.instances,function(){d=d.add(this)
});
d.css({width:0,height:0}).css({width:b.ui.dialog.overlay.width(),height:b.ui.dialog.overlay.height()})
}});
b.extend(b.ui.dialog.overlay.prototype,{destroy:function(){b.ui.dialog.overlay.destroy(this.$el)
}})
})(jQuery);
(function(a){a.widget("ui.progressbar",{_init:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this._valueMin(),"aria-valuemax":this._valueMax(),"aria-valuenow":this._value()});
this.valueDiv=a('<div class="ui-progressbar-value ui-widget-header ui-corner-left"></div>').appendTo(this.element);
this._refreshValue()
},destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow").removeData("progressbar").unbind(".progressbar");
this.valueDiv.remove();
a.widget.prototype.destroy.apply(this,arguments)
},value:function(b){if(typeof b==="undefined"){return this._value()
}this._setData("value",b);
return this
},_setData:function(b,c){switch(b){case"value":this.options.value=c;
this._refreshValue();
this._trigger("change",null,{});
break
}a.widget.prototype._setData.apply(this,arguments)
},_value:function(){var b=this.options.value;
if(b<this._valueMin()){b=this._valueMin()
}if(b>this._valueMax()){b=this._valueMax()
}return b
},_valueMin:function(){var b=0;
return b
},_valueMax:function(){var b=100;
return b
},_refreshValue:function(){var b=this.value();
this.valueDiv[b==this._valueMax()?"addClass":"removeClass"]("ui-corner-right");
this.valueDiv.width(b+"%");
this.element.attr("aria-valuenow",b)
}});
a.extend(a.ui.progressbar,{version:"1.7.2",defaults:{value:0}})
})(jQuery);
(function(a){a.widget("ui.slider",a.extend({},a.ui.mouse,{_init:function(){var b=this,c=this.options;
this._keySliding=false;
this._handleIndex=null;
this._detectOrientation();
this._mouseInit();
this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all");
this.range=a([]);
if(c.range){if(c.range===true){this.range=a("<div></div>");
if(!c.values){c.values=[this._valueMin(),this._valueMin()]
}if(c.values.length&&c.values.length!=2){c.values=[c.values[0],c.values[0]]
}}else{this.range=a("<div></div>")
}this.range.appendTo(this.element).addClass("ui-slider-range");
if(c.range=="min"||c.range=="max"){this.range.addClass("ui-slider-range-"+c.range)
}this.range.addClass("ui-widget-header")
}if(a(".ui-slider-handle",this.element).length==0){a('<a href="#"></a>').appendTo(this.element).addClass("ui-slider-handle")
}if(c.values&&c.values.length){while(a(".ui-slider-handle",this.element).length<c.values.length){a('<a href="#"></a>').appendTo(this.element).addClass("ui-slider-handle")
}}this.handles=a(".ui-slider-handle",this.element).addClass("ui-state-default ui-corner-all");
this.handle=this.handles.eq(0);
this.handles.add(this.range).filter("a").click(function(d){d.preventDefault()
}).hover(function(){if(!c.disabled){a(this).addClass("ui-state-hover")
}},function(){a(this).removeClass("ui-state-hover")
}).focus(function(){if(!c.disabled){a(".ui-slider .ui-state-focus").removeClass("ui-state-focus");
a(this).addClass("ui-state-focus")
}else{a(this).blur()
}}).blur(function(){a(this).removeClass("ui-state-focus")
});
this.handles.each(function(d){a(this).data("index.ui-slider-handle",d)
});
this.handles.keydown(function(h){var f=true;
var e=a(this).data("index.ui-slider-handle");
if(b.options.disabled){return
}switch(h.keyCode){case a.ui.keyCode.HOME:case a.ui.keyCode.END:case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:f=false;
if(!b._keySliding){b._keySliding=true;
a(this).addClass("ui-state-active");
b._start(h,e)
}break
}var i,g,d=b._step();
if(b.options.values&&b.options.values.length){i=g=b.values(e)
}else{i=g=b.value()
}switch(h.keyCode){case a.ui.keyCode.HOME:g=b._valueMin();
break;
case a.ui.keyCode.END:g=b._valueMax();
break;
case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:if(i==b._valueMax()){return
}g=i+d;
break;
case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:if(i==b._valueMin()){return
}g=i-d;
break
}b._slide(h,e,g);
return f
}).keyup(function(e){var d=a(this).data("index.ui-slider-handle");
if(b._keySliding){b._stop(e,d);
b._change(e,d);
b._keySliding=false;
a(this).removeClass("ui-state-active")
}});
this._refreshValue()
},destroy:function(){this.handles.remove();
this.range.remove();
this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider");
this._mouseDestroy()
},_mouseCapture:function(i){var e=this.options;
if(e.disabled){return false
}this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};
this.elementOffset=this.element.offset();
var f={x:i.pageX,y:i.pageY};
var g=this._normValueFromMouse(f);
var h=this._valueMax()-this._valueMin()+1,d;
var c=this,j;
this.handles.each(function(m){var l=Math.abs(g-c.values(m));
if(h>l){h=l;
d=a(this);
j=m
}});
if(e.range==true&&this.values(1)==e.min){d=a(this.handles[++j])
}this._start(i,j);
c._handleIndex=j;
d.addClass("ui-state-active").focus();
var b=d.offset();
var k=!a(i.target).parents().andSelf().is(".ui-slider-handle");
this._clickOffset=k?{left:0,top:0}:{left:i.pageX-b.left-(d.width()/2),top:i.pageY-b.top-(d.height()/2)-(parseInt(d.css("borderTopWidth"),10)||0)-(parseInt(d.css("borderBottomWidth"),10)||0)+(parseInt(d.css("marginTop"),10)||0)};
g=this._normValueFromMouse(f);
this._slide(i,j,g);
return true
},_mouseStart:function(b){return true
},_mouseDrag:function(c){var b={x:c.pageX,y:c.pageY};
var d=this._normValueFromMouse(b);
this._slide(c,this._handleIndex,d);
return false
},_mouseStop:function(b){this.handles.removeClass("ui-state-active");
this._stop(b,this._handleIndex);
this._change(b,this._handleIndex);
this._handleIndex=null;
this._clickOffset=null;
return false
},_detectOrientation:function(){this.orientation=this.options.orientation=="vertical"?"vertical":"horizontal"
},_normValueFromMouse:function(e){var h,f;
if("horizontal"==this.orientation){h=this.elementSize.width;
f=e.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)
}else{h=this.elementSize.height;
f=e.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)
}var g=(f/h);
if(g>1){g=1
}if(g<0){g=0
}if("vertical"==this.orientation){g=1-g
}var c=this._valueMax()-this._valueMin(),b=g*c,d=b%this.options.step,i=this._valueMin()+b-d;
if(d>(this.options.step/2)){i+=this.options.step
}return parseFloat(i.toFixed(5))
},_start:function(c,b){var d={handle:this.handles[b],value:this.value()};
if(this.options.values&&this.options.values.length){d.value=this.values(b);
d.values=this.values()
}this._trigger("start",c,d)
},_slide:function(f,h,d){var c=this.handles[h];
if(this.options.values&&this.options.values.length){var b=this.values(h?0:1);
if((this.options.values.length==2&&this.options.range===true)&&((h==0&&d>b)||(h==1&&d<b))){d=b
}if(d!=this.values(h)){var e=this.values();
e[h]=d;
var g=this._trigger("slide",f,{handle:this.handles[h],value:d,values:e});
var b=this.values(h?0:1);
if(g!==false){this.values(h,d,(f.type=="mousedown"&&this.options.animate),true)
}}}else{if(d!=this.value()){var g=this._trigger("slide",f,{handle:this.handles[h],value:d});
if(g!==false){this._setData("value",d,(f.type=="mousedown"&&this.options.animate))
}}}},_stop:function(c,b){var d={handle:this.handles[b],value:this.value()};
if(this.options.values&&this.options.values.length){d.value=this.values(b);
d.values=this.values()
}this._trigger("stop",c,d)
},_change:function(c,b){var d={handle:this.handles[b],value:this.value()};
if(this.options.values&&this.options.values.length){d.value=this.values(b);
d.values=this.values()
}this._trigger("change",c,d)
},value:function(b){if(arguments.length){this._setData("value",b);
this._change(null,0)
}return this._value()
},values:function(d,c,b,e){if(arguments.length>1){this.options.values[d]=c;
this._refreshValue(b);
if(!e){this._change(null,d)
}}if(arguments.length){if(this.options.values&&this.options.values.length){return this._values(d)
}else{return this.value()
}}else{return this._values()
}},_setData:function(d,b,c){a.widget.prototype._setData.apply(this,arguments);
switch(d){case"disabled":if(b){this.handles.filter(".ui-state-focus").blur();
this.handles.removeClass("ui-state-hover");
this.handles.attr("disabled","disabled")
}else{this.handles.removeAttr("disabled")
}case"orientation":this._detectOrientation();
this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation);
this._refreshValue(c);
break;
case"value":this._refreshValue(c);
break
}},_step:function(){var b=this.options.step;
return b
},_value:function(){var b=this.options.value;
if(b<this._valueMin()){b=this._valueMin()
}if(b>this._valueMax()){b=this._valueMax()
}return b
},_values:function(c){if(arguments.length){var b=this.options.values[c];
if(b<this._valueMin()){b=this._valueMin()
}if(b>this._valueMax()){b=this._valueMax()
}return b
}else{return this.options.values
}},_valueMin:function(){var b=this.options.min;
return b
},_valueMax:function(){var b=this.options.max;
return b
},_refreshValue:function(i){var b=this.options.range,g=this.options,d=this;
if(this.options.values&&this.options.values.length){var e,c;
this.handles.each(function(m,n){var p=(d.values(m)-d._valueMin())/(d._valueMax()-d._valueMin())*100;
var o={};
o[d.orientation=="horizontal"?"left":"bottom"]=p+"%";
a(this).stop(1,1)[i?"animate":"css"](o,g.animate);
if(d.options.range===true){if(d.orientation=="horizontal"){(m==0)&&d.range.stop(1,1)[i?"animate":"css"]({left:p+"%"},g.animate);
(m==1)&&d.range[i?"animate":"css"]({width:(p-lastValPercent)+"%"},{queue:false,duration:g.animate})
}else{(m==0)&&d.range.stop(1,1)[i?"animate":"css"]({bottom:(p)+"%"},g.animate);
(m==1)&&d.range[i?"animate":"css"]({height:(p-lastValPercent)+"%"},{queue:false,duration:g.animate})
}}lastValPercent=p
})
}else{var f=this.value(),k=this._valueMin(),h=this._valueMax(),j=h!=k?(f-k)/(h-k)*100:0;
var l={};
l[d.orientation=="horizontal"?"left":"bottom"]=j+"%";
this.handle.stop(1,1)[i?"animate":"css"](l,g.animate);
(b=="min")&&(this.orientation=="horizontal")&&this.range.stop(1,1)[i?"animate":"css"]({width:j+"%"},g.animate);
(b=="max")&&(this.orientation=="horizontal")&&this.range[i?"animate":"css"]({width:(100-j)+"%"},{queue:false,duration:g.animate});
(b=="min")&&(this.orientation=="vertical")&&this.range.stop(1,1)[i?"animate":"css"]({height:j+"%"},g.animate);
(b=="max")&&(this.orientation=="vertical")&&this.range[i?"animate":"css"]({height:(100-j)+"%"},{queue:false,duration:g.animate})
}}}));
a.extend(a.ui.slider,{getter:"value values",version:"1.7.2",eventPrefix:"slide",defaults:{animate:false,delay:0,distance:0,max:100,min:0,orientation:"horizontal",range:false,step:1,value:0,values:null}})
})(jQuery);
(function(a){a.widget("ui.tabs",{_init:function(){if(this.options.deselectable!==undefined){this.options.collapsible=this.options.deselectable
}this._tabify(true)
},_setData:function(b,c){if(b=="selected"){if(this.options.collapsible&&c==this.options.selected){return
}this.select(c)
}else{this.options[b]=c;
if(b=="deselectable"){this.options.collapsible=c
}this._tabify()
}},_tabId:function(b){return b.title&&b.title.replace(/\s/g,"_").replace(/[^A-Za-z0-9\-_:\.]/g,"")||this.options.idPrefix+a.data(b)
},_sanitizeSelector:function(b){return b.replace(/:/g,"\\:")
},_cookie:function(){var b=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+a.data(this.list[0]));
return a.cookie.apply(null,[b].concat(a.makeArray(arguments)))
},_ui:function(b,c){return{tab:b,panel:c,index:this.anchors.index(b)}
},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var b=a(this);
b.html(b.data("label.tabs")).removeData("label.tabs")
})
},_tabify:function(g){this.list=this.element.children("ul:first");
this.lis=a("li:has(a[href])",this.list);
this.anchors=this.lis.map(function(){return a("a",this)[0]
});
this.panels=a([]);
var n=this,l=this.options;
var m=/^#.+/;
this.anchors.each(function(q,u){var o=a(u).attr("href");
var v=o.split("#")[0],r;
if(v&&(v===location.toString().split("#")[0]||(r=a("base")[0])&&v===r.href)){o=u.hash;
u.href=o
}if(m.test(o)){n.panels=n.panels.add(n._sanitizeSelector(o))
}else{if(o!="#"){a.data(u,"href.tabs",o);
a.data(u,"load.tabs",o.replace(/#.*$/,""));
var s=n._tabId(u);
u.href="#"+s;
var w=a("#"+s);
if(!w.length){w=a(l.panelTemplate).attr("id",s).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(n.panels[q-1]||n.list);
w.data("destroy.tabs",true)
}n.panels=n.panels.add(w)
}else{l.disabled.push(q)
}}});
if(g){this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all");
this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");
this.lis.addClass("ui-state-default ui-corner-top");
this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom");
if(l.selected===undefined){if(location.hash){this.anchors.each(function(q,o){if(o.hash==location.hash){l.selected=q;
return false
}})
}if(typeof l.selected!="number"&&l.cookie){l.selected=parseInt(n._cookie(),10)
}if(typeof l.selected!="number"&&this.lis.filter(".ui-tabs-selected").length){l.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))
}l.selected=l.selected||0
}else{if(l.selected===null){l.selected=-1
}}l.selected=((l.selected>=0&&this.anchors[l.selected])||l.selected<0)?l.selected:0;
l.disabled=a.unique(l.disabled.concat(a.map(this.lis.filter(".ui-state-disabled"),function(o,q){return n.lis.index(o)
}))).sort();
if(a.inArray(l.selected,l.disabled)!=-1){l.disabled.splice(a.inArray(l.selected,l.disabled),1)
}this.panels.addClass("ui-tabs-hide");
this.lis.removeClass("ui-tabs-selected ui-state-active");
if(l.selected>=0&&this.anchors.length){this.panels.eq(l.selected).removeClass("ui-tabs-hide");
this.lis.eq(l.selected).addClass("ui-tabs-selected ui-state-active");
n.element.queue("tabs",function(){n._trigger("show",null,n._ui(n.anchors[l.selected],n.panels[l.selected]))
});
this.load(l.selected)
}a(window).bind("unload",function(){n.lis.add(n.anchors).unbind(".tabs");
n.lis=n.anchors=n.panels=null
})
}else{l.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))
}this.element[l.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");
if(l.cookie){this._cookie(l.selected,l.cookie)
}for(var h=0,d;
(d=this.lis[h]);
h++){a(d)[a.inArray(h,l.disabled)!=-1&&!a(d).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled")
}if(l.cache===false){this.anchors.removeData("cache.tabs")
}this.lis.add(this.anchors).unbind(".tabs");
if(l.event!="mouseover"){var c=function(o,i){if(i.is(":not(.ui-state-disabled)")){i.addClass("ui-state-"+o)
}};
var p=function(o,i){i.removeClass("ui-state-"+o)
};
this.lis.bind("mouseover.tabs",function(){c("hover",a(this))
});
this.lis.bind("mouseout.tabs",function(){p("hover",a(this))
});
this.anchors.bind("focus.tabs",function(){c("focus",a(this).closest("li"))
});
this.anchors.bind("blur.tabs",function(){p("focus",a(this).closest("li"))
})
}var j,f;
if(l.fx){if(a.isArray(l.fx)){j=l.fx[0];
f=l.fx[1]
}else{j=f=l.fx
}}function b(o,i){o.css({display:""});
if(a.browser.msie&&i.opacity){o[0].style.removeAttribute("filter")
}}var e=f?function(i,o){a(i).closest("li").removeClass("ui-state-default").addClass("ui-tabs-selected ui-state-active");
o.hide().removeClass("ui-tabs-hide").animate(f,f.duration||"normal",function(){b(o,f);
n._trigger("show",null,n._ui(i,o[0]))
})
}:function(i,o){a(i).closest("li").removeClass("ui-state-default").addClass("ui-tabs-selected ui-state-active");
o.removeClass("ui-tabs-hide");
n._trigger("show",null,n._ui(i,o[0]))
};
var k=j?function(i,o){o.animate(j,j.duration||"normal",function(){n.lis.removeClass("ui-tabs-selected ui-state-active").addClass("ui-state-default");
o.addClass("ui-tabs-hide");
b(o,j);
n.element.dequeue("tabs")
})
}:function(i,q,o){n.lis.removeClass("ui-tabs-selected ui-state-active").addClass("ui-state-default");
q.addClass("ui-tabs-hide");
n.element.dequeue("tabs")
};
this.anchors.bind(l.event+".tabs",function(){var q=this,r=a(this).closest("li"),o=n.panels.filter(":not(.ui-tabs-hide)"),i=a(n._sanitizeSelector(this.hash));
if((r.hasClass("ui-tabs-selected")&&!l.collapsible)||r.hasClass("ui-state-disabled")||r.hasClass("ui-state-processing")||n._trigger("select",null,n._ui(this,i[0]))===false){this.blur();
return false
}l.selected=n.anchors.index(this);
n.abort();
if(l.collapsible){if(r.hasClass("ui-tabs-selected")){l.selected=-1;
if(l.cookie){n._cookie(l.selected,l.cookie)
}n.element.queue("tabs",function(){k(q,o)
}).dequeue("tabs");
this.blur();
return false
}else{if(!o.length){if(l.cookie){n._cookie(l.selected,l.cookie)
}n.element.queue("tabs",function(){e(q,i)
});
n.load(n.anchors.index(this));
this.blur();
return false
}}}if(l.cookie){n._cookie(l.selected,l.cookie)
}if(i.length){if(o.length){n.element.queue("tabs",function(){k(q,o)
})
}n.element.queue("tabs",function(){e(q,i)
});
n.load(n.anchors.index(this))
}else{throw"jQuery UI Tabs: Mismatching fragment identifier."
}if(a.browser.msie){this.blur()
}});
this.anchors.bind("click.tabs",function(){return false
})
},destroy:function(){var b=this.options;
this.abort();
this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs");
this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");
this.anchors.each(function(){var c=a.data(this,"href.tabs");
if(c){this.href=c
}var d=a(this).unbind(".tabs");
a.each(["href","load","cache"],function(f,e){d.removeData(e+".tabs")
})
});
this.lis.unbind(".tabs").add(this.panels).each(function(){if(a.data(this,"destroy.tabs")){a(this).remove()
}else{a(this).removeClass(["ui-state-default","ui-corner-top","ui-tabs-selected","ui-state-active","ui-state-hover","ui-state-focus","ui-state-disabled","ui-tabs-panel","ui-widget-content","ui-corner-bottom","ui-tabs-hide"].join(" "))
}});
if(b.cookie){this._cookie(null,b.cookie)
}},add:function(c,i,h){if(h===undefined){h=this.anchors.length
}var b=this,d=this.options,e=a(d.tabTemplate.replace(/#\{href\}/g,c).replace(/#\{label\}/g,i)),f=!c.indexOf("#")?c.replace("#",""):this._tabId(a("a",e)[0]);
e.addClass("ui-state-default ui-corner-top").data("destroy.tabs",true);
var g=a("#"+f);
if(!g.length){g=a(d.panelTemplate).attr("id",f).data("destroy.tabs",true)
}g.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");
if(h>=this.lis.length){e.appendTo(this.list);
g.appendTo(this.list[0].parentNode)
}else{e.insertBefore(this.lis[h]);
g.insertBefore(this.panels[h])
}d.disabled=a.map(d.disabled,function(j,k){return j>=h?++j:j
});
this._tabify();
if(this.anchors.length==1){e.addClass("ui-tabs-selected ui-state-active");
g.removeClass("ui-tabs-hide");
this.element.queue("tabs",function(){b._trigger("show",null,b._ui(b.anchors[0],b.panels[0]))
});
this.load(0)
}this._trigger("add",null,this._ui(this.anchors[h],this.panels[h]))
},remove:function(d){var b=this.options,e=this.lis.eq(d).remove(),c=this.panels.eq(d).remove();
if(e.hasClass("ui-tabs-selected")&&this.anchors.length>1){this.select(d+(d+1<this.anchors.length?1:-1))
}b.disabled=a.map(a.grep(b.disabled,function(f,g){return f!=d
}),function(f,g){return f>=d?--f:f
});
this._tabify();
this._trigger("remove",null,this._ui(e.find("a")[0],c[0]))
},enable:function(b){var c=this.options;
if(a.inArray(b,c.disabled)==-1){return
}this.lis.eq(b).removeClass("ui-state-disabled");
c.disabled=a.grep(c.disabled,function(d,e){return d!=b
});
this._trigger("enable",null,this._ui(this.anchors[b],this.panels[b]))
},disable:function(c){var d=this,b=this.options;
if(c!=b.selected){this.lis.eq(c).addClass("ui-state-disabled");
b.disabled.push(c);
b.disabled.sort();
this._trigger("disable",null,this._ui(this.anchors[c],this.panels[c]))
}},select:function(b){if(typeof b=="string"){b=this.anchors.index(this.anchors.filter("[href$="+b+"]"))
}else{if(b===null){b=-1
}}if(b==-1&&this.options.collapsible){b=this.options.selected
}this.anchors.eq(b).trigger(this.options.event+".tabs")
},load:function(f){var b=this,d=this.options,e=this.anchors.eq(f)[0],c=a.data(e,"load.tabs");
this.abort();
if(!c||this.element.queue("tabs").length!==0&&a.data(e,"cache.tabs")){this.element.dequeue("tabs");
return
}this.lis.eq(f).addClass("ui-state-processing");
if(d.spinner){var g=a("span",e);
g.data("label.tabs",g.html()).html(d.spinner)
}this.xhr=a.ajax(a.extend({},d.ajaxOptions,{url:c,success:function(h,i){a(b._sanitizeSelector(e.hash)).html(h);
b._cleanup();
if(d.cache){a.data(e,"cache.tabs",true)
}b._trigger("load",null,b._ui(b.anchors[f],b.panels[f]));
try{d.ajaxOptions.success(h,i)
}catch(j){}b.element.dequeue("tabs")
}}))
},abort:function(){this.element.queue([]);
this.panels.stop(false,true);
if(this.xhr){this.xhr.abort();
delete this.xhr
}this._cleanup()
},url:function(b,c){this.anchors.eq(b).removeData("cache.tabs").data("load.tabs",c)
},length:function(){return this.anchors.length
}});
a.extend(a.ui.tabs,{version:"1.7.2",getter:"length",defaults:{ajaxOptions:null,cache:false,cookie:null,collapsible:false,disabled:[],event:"click",fx:null,idPrefix:"ui-tabs-",panelTemplate:"<div></div>",spinner:"<em>Loading&#8230;</em>",tabTemplate:'<li><a href="#{href}"><span>#{label}</span></a></li>'}});
a.extend(a.ui.tabs.prototype,{rotation:null,rotate:function(e,f){var b=this,c=this.options;
var g=b._rotate||(b._rotate=function(h){clearTimeout(b.rotation);
b.rotation=setTimeout(function(){var i=c.selected;
b.select(++i<b.anchors.length?i:0)
},e);
if(h){h.stopPropagation()
}});
var d=b._unrotate||(b._unrotate=!f?function(h){if(h.clientX){b.rotate(null)
}}:function(h){t=c.selected;
g()
});
if(e){this.element.bind("tabsshow",g);
this.anchors.bind(c.event+".tabs",d);
g()
}else{clearTimeout(b.rotation);
this.element.unbind("tabsshow",g);
this.anchors.unbind(c.event+".tabs",d);
delete this._rotate;
delete this._unrotate
}}})
})(jQuery);(function(a){a.widget("ui.selectmenu",{_init:function(){var k=this,m=this.options;
if(typeof k.options.href=="undefined"){if(typeof this.element.attr("data-selectmenu-href")!="undefined"){k.options.href=true
}}if(typeof this.element.attr("data-maxheight")!="undefined"){k.options.maxHeight=parseInt(this.element.attr("data-maxheight"))
}var d=Math.round(Math.random()*1000);
this.ids=[this.element.attr("id")+"_button_"+d,this.element.attr("id")+"_menu_"+d];
this._safemouseup=true;
this.newelement=a('<a class="'+this.widgetBaseClass+' ui-widget ui-state-default ui-corner-all" id="'+this.ids[0]+'" role="button" href="#" aria-haspopup="true" aria-owns="'+this.ids[1]+'" aria-expanded="false"></a>').insertAfter(this.element);
var t=this.element.attr("tabindex")||"0";
this.newelement.attr("tabindex",t);
this.newelement.data("selectelement",this.element);
this.selectmenuIcon=a('<span class="'+this.widgetBaseClass+'-icon ui-icon"></span>').prependTo(this.newelement).addClass((m.style=="popup")?"ui-icon-carat-2-n-s":"ui-icon-carat-1-s");
a("label[for="+this.element.attr("id")+"]").attr("for",this.ids[0]).bind("click",function(){k.newelement.focus();
return false
});
if(this.element.attr("disabled")!=true){this.newelement.bind("mousedown",function(i){k._toggle(i);
if(m.style=="popup"){k._safemouseup=false;
setTimeout(function(){k._safemouseup=true
},300)
}return false
}).bind("click",function(){return false
}).keydown(function(i){var j=true;
switch(i.keyCode){case a.ui.keyCode.ENTER:j=true;
break;
case a.ui.keyCode.SPACE:j=false;
k._toggle(i);
break;
case a.ui.keyCode.UP:case a.ui.keyCode.LEFT:j=false;
k._moveSelection(-1);
break;
case a.ui.keyCode.DOWN:case a.ui.keyCode.RIGHT:j=false;
k._moveSelection(1);
break;
case a.ui.keyCode.TAB:j=true;
break;
default:j=false;
k._typeAhead(i.keyCode,"mouseup");
break
}return j
}).bind("mouseover focus",function(){a(this).addClass(k.widgetBaseClass+"-focus ui-state-hover")
}).bind("mouseout blur",function(){a(this).removeClass(k.widgetBaseClass+"-focus ui-state-hover")
})
}a(document).mousedown(function(i){k.close(i)
});
this.element.click(function(){this._refreshValue()
}).focus(function(){this.newelement.focus()
});
var g=(m.style=="dropdown")?" ui-corner-bottom":" ui-corner-all";
this.list=a('<ul class="'+k.widgetBaseClass+"-menu ui-widget ui-widget-content"+g+'" aria-hidden="true" role="listbox" aria-multiselectable="false" aria-labelledby="'+this.ids[0]+'" id="'+this.ids[1]+'"></ul>').appendTo("body");
var q=[];
this.element.find("option").each(function(){q.push({value:a(this).attr("value"),text:k._formatText(jQuery(this).text()),selected:a(this).attr("selected"),classes:a(this).attr("class"),parentOptGroup:a(this).parent("optgroup").attr("label"),href:a(this).attr("data-option-href")})
});
var s=(k.options.style=="popup")?" ui-state-active":"";
for(var n in q){var l=a('<li><a href="#" tabindex="-1" role="option" aria-selected="false">'+q[n].text+"</a></li>").data("index",n).addClass(q[n].classes).data("optionClasses",q[n].classes).children().attr("href",(m.href==true&&q[n].href!=null)?q[n].href:"#").end().mouseup(function(i){if(k._safemouseup){var j=a(this).data("index")!=k._selectedIndex();
k.value(a(this).data("index"));
k.select(i);
if(j){k.change(i)
}k.close(i,true)
}return false
}).click(function(){if(m.href){return true
}else{return false
}}).bind("mouseover focus",function(){k._selectedOptionLi().addClass(s);
k._focusedOptionLi().removeClass(k.widgetBaseClass+"-item-focus ui-state-hover");
a(this).removeClass("ui-state-active").addClass(k.widgetBaseClass+"-item-focus ui-state-hover")
}).bind("mouseout blur",function(){if(a(this).is(k._selectedOptionLi())){a(this).addClass(s)
}a(this).removeClass(k.widgetBaseClass+"-item-focus ui-state-hover")
});
if(q[n].parentOptGroup){var r=k.widgetBaseClass+"-group-"+q[n].parentOptGroup;
if(this.list.find("li."+r).size()){this.list.find("li."+r+":last ul").append(l)
}else{a('<li class="'+k.widgetBaseClass+"-group "+r+'"><span class="'+k.widgetBaseClass+'-group-label">'+q[n].parentOptGroup+"</span><ul></ul></li>").appendTo(this.list).find("ul").append(l)
}}else{l.appendTo(this.list)
}this.list.bind("mousedown mouseup",function(){return false
});
if(m.icons){for(var p in m.icons){if(l.is(m.icons[p].find)){l.data("optionClasses",q[n].classes+" "+k.widgetBaseClass+"-hasIcon").addClass(k.widgetBaseClass+"-hasIcon");
var f=m.icons[p].icon||"";
l.find("a:eq(0)").prepend('<span class="'+k.widgetBaseClass+"-item-icon ui-icon "+f+'"></span>')
}}}}this.list.find("li:last").addClass("ui-corner-bottom");
if(m.style=="popup"){this.list.find("li:first").addClass("ui-corner-top")
}if(m.transferClasses){var h=this.element.attr("class")||"";
this.newelement.add(this.list).addClass(h)
}if(m.transferStyle){var e=this.element.attr("style")||"";
this.newelement.attr("style",e)
}var b=this.element.width();
this.newelement.width((m.width)?m.width:b);
if(m.style=="dropdown"){this.list.width((m.menuWidth)?m.menuWidth:((m.width)?m.width:b))
}else{this.list.width((m.menuWidth)?m.menuWidth:((m.width)?m.width-m.handleWidth:b-m.handleWidth))
}if(m.maxHeight&&m.maxHeight<this.list.height()){this.list.height(m.maxHeight)
}this._optionLis=this.list.find("li:not(."+k.widgetBaseClass+"-group)");
this.list.keydown(function(i){var j=true;
switch(i.keyCode){case a.ui.keyCode.UP:case a.ui.keyCode.LEFT:j=false;
k._moveFocus(-1);
break;
case a.ui.keyCode.DOWN:case a.ui.keyCode.RIGHT:j=false;
k._moveFocus(1);
break;
case a.ui.keyCode.HOME:j=false;
k._moveFocus(":first");
break;
case a.ui.keyCode.PAGE_UP:j=false;
k._scrollPage("up");
break;
case a.ui.keyCode.PAGE_DOWN:j=false;
k._scrollPage("down");
break;
case a.ui.keyCode.END:j=false;
k._moveFocus(":last");
break;
case a.ui.keyCode.ENTER:case a.ui.keyCode.SPACE:j=false;
k.close(i,true);
a(i.target).parents("li:eq(0)").trigger("mouseup");
break;
case a.ui.keyCode.TAB:j=true;
k.close(i);
break;
case a.ui.keyCode.ESCAPE:j=false;
k.close(i,true);
break;
default:j=false;
k._typeAhead(i.keyCode,"focus");
break
}return j
});
if(m.style=="dropdown"){this.newelement.addClass(k.widgetBaseClass+"-dropdown");
this.list.addClass(k.widgetBaseClass+"-menu-dropdown")
}else{this.newelement.addClass(k.widgetBaseClass+"-popup");
this.list.addClass(k.widgetBaseClass+"-menu-popup")
}this.newelement.prepend('<span class="'+k.widgetBaseClass+'-status">'+q[this._selectedIndex()].text+"</span>");
this.element.hide();
if(this.element.attr("disabled")==true){this.disable()
}this.value(this._selectedIndex())
},destroy:function(){this.element.removeData(this.widgetName).removeClass(this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").removeAttr("aria-disabled");
a("label[for="+this.newelement.attr("id")+"]").attr("for",this.element.attr("id")).unbind("click");
this.newelement.remove();
this.list.remove();
this.element.show()
},_typeAhead:function(d,f){var e=this;
if(!e._prevChar){e._prevChar=["",0]
}var g=String.fromCharCode(d);
c=g.toLowerCase();
var h=false;
function b(i,j){h=true;
a(i).trigger(f);
e._prevChar[1]=j
}this.list.find("li a").each(function(k){if(!h){var j=a(this).text();
if(j.indexOf(g)==0||j.indexOf(c)==0){if(e._prevChar[0]==g){if(e._prevChar[1]<k){b(this,k)
}}else{b(this,k)
}}}});
this._prevChar[0]=g
},_uiHash:function(){return{value:this.value()}
},open:function(d){var b=this;
this._refreshPosition();
this._closeOthers(d);
this.newelement.attr("aria-expanded",true).addClass("ui-state-active");
this.list.appendTo("body").addClass(b.widgetBaseClass+"-open").attr("aria-hidden",false).find("li:not(."+b.widgetBaseClass+"-group):eq("+this._selectedIndex()+") a").focus();
if(this.options.style=="dropdown"){this.newelement.removeClass("ui-corner-all").addClass("ui-corner-top")
}this._refreshPosition();
this._trigger("open",d,this._uiHash())
},close:function(d,b){if(this.newelement.is(".ui-state-active")){this.newelement.attr("aria-expanded",false).removeClass("ui-state-active");
this.list.attr("aria-hidden",true).removeClass(this.widgetBaseClass+"-open");
if(this.options.style=="dropdown"){this.newelement.removeClass("ui-corner-top").addClass("ui-corner-all")
}if(b){this.newelement.focus()
}this._trigger("close",d,this._uiHash())
}},change:function(b){this.element.trigger("change");
this._trigger("change",b,this._uiHash())
},select:function(b){this._trigger("select",b,this._uiHash())
},_closeOthers:function(b){a("."+this.widgetBaseClass+".ui-state-active").not(this.newelement).each(function(){a(this).data("selectelement").selectmenu("close",b)
});
a("."+this.widgetBaseClass+".ui-state-hover").trigger("mouseout")
},_toggle:function(d,b){if(this.list.is("."+this.widgetBaseClass+"-open")){this.close(d,b)
}else{this.open(d)
}},_formatText:function(b){return this.options.format?this.options.format(b):b
},_selectedIndex:function(){return this.element[0].selectedIndex
},_selectedOptionLi:function(){return this._optionLis.eq(this._selectedIndex())
},_focusedOptionLi:function(){return this.list.find("."+this.widgetBaseClass+"-item-focus")
},_moveSelection:function(d){var e=parseInt(this._selectedOptionLi().data("index"),10);
var b=e+d;
return this._optionLis.eq(b).trigger("mouseup")
},_moveFocus:function(d){if(!isNaN(d)){var e=parseInt(this._focusedOptionLi().data("index"),10);
var b=e+d
}else{var b=parseInt(this._optionLis.filter(d).data("index"),10)
}if(b<0){b=0
}if(b>this._optionLis.size()-1){b=this._optionLis.size()-1
}this._focusedOptionLi().find("a:eq(0)").blur();
this._optionLis.eq(b).find("a:eq(0)").focus()
},_scrollPage:function(d){var b=Math.floor(this.list.outerHeight()/this.list.find("li:first").outerHeight());
b=(d=="up")?-b:b;
this._moveFocus(b)
},_setData:function(b,d){this.options[b]=d;
if(b=="disabled"){this.element.add(this.newelement).add(this.list)[d?"addClass":"removeClass"](this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").attr("aria-disabled",d)
}},value:function(b){if(arguments.length){this.element[0].selectedIndex=b;
this._refreshValue();
this._refreshPosition()
}return this.element[0].selectedIndex
},_refreshValue:function(){var b=(this.options.style=="popup")?" ui-state-active":"";
this.list.find("."+this.widgetBaseClass+"-item-selected").removeClass(this.widgetBaseClass+"-item-selected"+b).find("a").attr("aria-selected","false");
this._selectedOptionLi().addClass(this.widgetBaseClass+"-item-selected"+b).find("a").attr("aria-selected","true");
var e=this.newelement.data("optionClasses")?this.newelement.data("optionClasses"):"";
var d=this._selectedOptionLi().data("optionClasses")?this._selectedOptionLi().data("optionClasses"):"";
this.newelement.removeClass(e).data("optionClasses",d).addClass(d).find("."+this.widgetBaseClass+"-status").html(this._selectedOptionLi().find("a:eq(0)").html())
},_refreshPosition:function(){this.list.css("left",this.newelement.offset().left);
var d=this.newelement.offset().top;
var b=this.list[0].scrollTop;
this.list.find("li:lt("+this._selectedIndex()+")").each(function(){b-=a(this).outerHeight()
});
if(this.newelement.is("."+this.widgetBaseClass+"-popup")){d+=b;
this.list.css("top",d)
}else{d+=this.newelement.height();
this.list.css("top",d)
}}});
a.extend(a.ui.selectmenu,{getter:"value",version:"@VERSION",eventPrefix:"selectmenu",defaults:{transferClasses:true,transferStyle:true,style:"dropdown",width:null,menuWidth:null,handleWidth:26,maxHeight:null,icons:null,format:null}})
})(jQuery);/*
 * jQuery blockUI plugin
 * Version 2.25 (29-AUG-2009)
 * @requires jQuery v1.2.3 or later
 *
 * Examples at: http://malsup.com/jquery/block/
 * Copyright (c) 2007-2008 M. Alsup
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 *
 * Thanks to Amir-Hossein Sobhi for some excellent contributions!
 */
(function(k){if(/1\.(0|1|2)\.(0|1|2)/.test(k.fn.jquery)||/^1.1/.test(k.fn.jquery)){alert("blockUI requires jQuery v1.2.3 or later!  You are using v"+k.fn.jquery);
return
}k.fn._fadeIn=k.fn.fadeIn;
var a=document.documentMode||0;
var j=k.browser.msie&&((k.browser.version<8&&!a)||a<8);
var i=k.browser.msie&&/MSIE 6.0/.test(navigator.userAgent)&&!a;
k.blockUI=function(o){g(window,o)
};
k.unblockUI=function(o){b(window,o)
};
k.growlUI=function(s,r,p,o){var q=k('<div class="growlUI"></div>');
if(s){q.append("<h1>"+s+"</h1>")
}if(r){q.append("<h2>"+r+"</h2>")
}if(p==undefined){p=3000
}k.blockUI({message:q,fadeIn:700,fadeOut:1000,centerY:false,timeout:p,showOverlay:false,onUnblock:o,css:k.blockUI.defaults.growlCSS})
};
k.fn.block=function(o){return this.unblock({fadeOut:0}).each(function(){if(k.css(this,"position")=="static"){this.style.position="relative"
}if(k.browser.msie){this.style.zoom=1
}g(this,o)
})
};
k.fn.unblock=function(o){return this.each(function(){b(this,o)
})
};
k.blockUI.version=2.25;
k.blockUI.defaults={message:"<h1>Please wait...</h1>",title:null,draggable:true,theme:false,css:{padding:0,margin:0,width:"30%",top:"40%",left:"35%",textAlign:"center",color:"#000",border:"3px solid #aaa",backgroundColor:"#fff",cursor:"wait"},themedCSS:{width:"30%",top:"40%",left:"35%"},overlayCSS:{backgroundColor:"#000",opacity:0.6,cursor:"wait"},growlCSS:{width:"350px",top:"10px",left:"",right:"10px",border:"none",padding:"5px",opacity:0.6,cursor:null,color:"#fff",backgroundColor:"#000","-webkit-border-radius":"10px","-moz-border-radius":"10px"},iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank",forceIframe:false,baseZ:1000,centerX:true,centerY:true,allowBodyStretch:true,bindEvents:true,constrainTabKey:true,fadeIn:200,fadeOut:400,timeout:0,showOverlay:true,focusInput:true,applyPlatformOpacityRules:true,onUnblock:null,quirksmodeOffsetHack:4};
var c=null;
var l=[];
function g(p,o){var u=(p==window);
var x=o&&o.message!==undefined?o.message:undefined;
o=k.extend({},k.blockUI.defaults,o||{});
o.overlayCSS=k.extend({},k.blockUI.defaults.overlayCSS,o.overlayCSS||{});
var G=k.extend({},k.blockUI.defaults.css,o.css||{});
var A=k.extend({},k.blockUI.defaults.themedCSS,o.themedCSS||{});
x=x===undefined?o.message:x;
if(u&&c){b(window,{fadeOut:0})
}if(x&&typeof x!="string"&&(x.parentNode||x.jquery)){var q=x.jquery?x[0]:x;
var E={};
k(p).data("blockUI.history",E);
E.el=q;
E.parent=q.parentNode;
E.display=q.style.display;
E.position=q.style.position;
if(E.parent){E.parent.removeChild(q)
}}var H=o.baseZ;
var y=(k.browser.msie||o.forceIframe)?k('<iframe class="blockUI" style="z-index:'+(H++)+';display:none;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0" src="'+o.iframeSrc+'"></iframe>'):k('<div class="blockUI" style="display:none"></div>');
var J=k('<div class="blockUI blockOverlay" style="z-index:'+(H++)+';display:none;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0"></div>');
var I;
if(o.theme&&u){var w='<div class="blockUI blockMsg blockPage ui-dialog ui-widget ui-corner-all" style="z-index:'+H+';display:none;position:fixed"><div class="ui-widget-header ui-dialog-titlebar blockTitle">'+(o.title||"&nbsp;")+'</div><div class="ui-widget-content ui-dialog-content"></div></div>';
I=k(w)
}else{I=u?k('<div class="blockUI blockMsg blockPage" style="z-index:'+H+';display:none;position:fixed"></div>'):k('<div class="blockUI blockMsg blockElement" style="z-index:'+H+';display:none;position:absolute"></div>')
}if(x){if(o.theme){I.css(A);
I.addClass("ui-widget-content")
}else{I.css(G)
}}if(!o.applyPlatformOpacityRules||!(k.browser.mozilla&&/Linux/.test(navigator.platform))){J.css(o.overlayCSS)
}J.css("position",u?"fixed":"absolute");
if(k.browser.msie||o.forceIframe){y.css("opacity",0)
}k([y[0],J[0],I[0]]).appendTo(u?"body":p);
if(o.theme&&o.draggable&&k.fn.draggable){I.draggable({handle:".ui-dialog-titlebar",cancel:"li"})
}var C=j&&(!k.boxModel||k("object,embed",u?null:p).length>0);
if(i||C){if(u&&o.allowBodyStretch&&k.boxModel){k("html,body").css("height","100%")
}if((i||!k.boxModel)&&!u){var r=d(p,"borderTopWidth"),D=d(p,"borderLeftWidth");
var v=r?"(0 - "+r+")":0;
var B=D?"(0 - "+D+")":0
}k.each([y,J,I],function(z,t){var K=t[0].style;
K.position="absolute";
if(z<2){u?K.setExpression("height","Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.boxModel?0:"+o.quirksmodeOffsetHack+') + "px"'):K.setExpression("height",'this.parentNode.offsetHeight + "px"');
u?K.setExpression("width",'jQuery.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"'):K.setExpression("width",'this.parentNode.offsetWidth + "px"');
if(B){K.setExpression("left",B)
}if(v){K.setExpression("top",v)
}}else{if(o.centerY){if(u){K.setExpression("top",'(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"')
}K.marginTop=0
}else{if(!o.centerY&&u){var L=(o.css&&o.css.top)?parseInt(o.css.top):0;
var M="((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "+L+') + "px"';
K.setExpression("top",M)
}}}})
}if(x){if(o.theme){I.find(".ui-widget-content").append(x)
}else{I.append(x)
}if(x.jquery||x.nodeType){k(x).show()
}}if((k.browser.msie||o.forceIframe)&&o.showOverlay){y.show()
}if(o.fadeIn){if(o.showOverlay){J._fadeIn(o.fadeIn)
}if(x){I.fadeIn(o.fadeIn)
}}else{if(o.showOverlay){J.show()
}if(x){I.show()
}}m(1,p,o);
if(u){c=I[0];
l=k(":input:enabled:visible",c);
if(o.focusInput){setTimeout(h,20)
}}else{f(I[0],o.centerX,o.centerY)
}if(o.timeout){var F=setTimeout(function(){u?k.unblockUI(o):k(p).unblock(o)
},o.timeout);
k(p).data("blockUI.timeout",F)
}}function b(t,s){var o=(t==window);
var q=k(t);
var p=q.data("blockUI.history");
var u=q.data("blockUI.timeout");
if(u){clearTimeout(u);
q.removeData("blockUI.timeout")
}s=k.extend({},k.blockUI.defaults,s||{});
m(0,t,s);
var r;
if(o){r=k("body").children().filter(".blockUI").add("body > .blockUI")
}else{r=k(".blockUI",t)
}if(o){c=l=null
}if(s.fadeOut){r.fadeOut(s.fadeOut);
setTimeout(function(){n(r,p,s,t)
},s.fadeOut)
}else{n(r,p,s,t)
}}function n(p,o,r,q){p.each(function(s,t){if(this.parentNode){this.parentNode.removeChild(this)
}});
if(o&&o.el){o.el.style.display=o.display;
o.el.style.position=o.position;
if(o.parent){o.parent.appendChild(o.el)
}k(o.el).removeData("blockUI.history")
}if(typeof r.onUnblock=="function"){r.onUnblock(q,r)
}}function m(r,s,q){var o=s==window,p=k(s);
if(!r&&(o&&!c||!o&&!p.data("blockUI.isBlocked"))){return
}if(!o){p.data("blockUI.isBlocked",r)
}if(!q.bindEvents||(r&&!q.showOverlay)){return
}var t="mousedown mouseup keydown keypress";
r?k(document).bind(t,q,e):k(document).unbind(t,e)
}function e(r){if(r.keyCode&&r.keyCode==9){if(c&&r.data.constrainTabKey){var o=l;
var p=!r.shiftKey&&r.target==o[o.length-1];
var q=r.shiftKey&&r.target==o[0];
if(p||q){setTimeout(function(){h(q)
},10);
return false
}}}if(k(r.target).parents("div.blockMsg").length>0){return true
}return k(r.target).parents().children().filter("div.blockUI").length==0
}function h(p){if(!l){return
}var o=l[p===true?l.length-1:0];
if(o){o.focus()
}}function f(v,o,q){var u=v.parentNode,w=v.style;
var r=((u.offsetWidth-v.offsetWidth)/2)-d(u,"borderLeftWidth");
var z=((u.offsetHeight-v.offsetHeight)/2)-d(u,"borderTopWidth");
if(o){w.left=r>0?(r+"px"):"0"
}if(q){w.top=z>0?(z+"px"):"0"
}}function d(o,q){return parseInt(k.css(o,q))||0
}})(jQuery);(function(a){a.widget("ui.watermark",{_init:function(){var b=this.options,e=this;
var c=this.element;
var d=a.isFunction(b.placeholder)?b.placeholder.apply(this.element[0]):b.placeholder;
if(c[0].tagName.toLowerCase()=="textarea"){this.element.wrap("<div/>").parent().addClass("ui-watermark-container ui-watermark-"+c[0].tagName.toLowerCase())
}else{this.element.wrap("<span/>").parent().addClass("ui-watermark-container ui-watermark-"+c[0].tagName.toLowerCase())
}var f=(this.label=a('<label for="'+c.attr("id")+'">'+d+"</label>").insertBefore(c));
f.addClass("ui-watermark-label");
if(c[0].tagName.toLowerCase()=="textarea"){f.css({top:parseInt(c.css("borderTopWidth"))+parseInt(c.css("paddingTop"))})
}else{f.css({left:parseInt(c.css("borderLeftWidth"))+parseInt(c.css("paddingLeft")),top:parseInt(c.css("borderTopWidth"))+parseInt(c.css("paddingTop"))})
}if(c.val()){f.hide()
}c.bind("focus."+this.widgetName,function(){if(!b.disabled&&!this.value){b.animate?f.fadeOut("fast"):f.hide()
}}).bind("blur."+this.widgetName,function(){if(!b.disabled&&!this.value){b.animate?f.fadeIn("fast"):f.show()
}})
},destroy:function(){if(this.element.data("placeholder")){this.element.attr("placeholder",this.element.data("placeholder"))
}if(this.element.parent().parent().length){this.element.parent().replaceWith(this.element)
}this.label.remove();
a.widget.prototype.destroy.apply(this,arguments)
}});
a.extend(a.ui.watermark,{version:"@VERSION",defaults:{placeholder:function(){var b=a(this).attr("placeholder");
a(this).data("placeholder",b);
a(this).removeAttr("placeholder");
return b
},animate:true}})
})(jQuery);$.fn.toEm=function(d){d=jQuery.extend({scope:"body"},d);
var a=parseInt(this[0],10);
var c=jQuery('<div style="display: none; font-size: 1em; margin: 0; padding:0; height: auto; line-height: 1; border:0;">&nbsp;</div>').appendTo(d.scope);
var b=c.height();
c.remove();
return(a/b).toFixed(8)+"em"
};
$.fn.toPx=function(d){d=jQuery.extend({scope:"body"},d);
var a=parseFloat(this[0]);
var c=jQuery('<div style="display: none; font-size: 1em; margin: 0; padding:0; height: auto; line-height: 1; border:0;">&nbsp;</div>').appendTo(d.scope);
var b=c.height();
c.remove();
return Math.round(a*b)+"px"
};(function(e){e.tools=e.tools||{version:"1.2.5"};
e.tools.scrollable={conf:{activeClass:"active",circular:false,clonedClass:"cloned",disabledClass:"disabled",easing:"swing",initialIndex:0,item:null,items:".items",keyboard:true,mousewheel:false,next:".next",prev:".prev",speed:400,vertical:false,touch:true,wheelSpeed:0}};
function b(g,i){var h=parseInt(g.css(i),10);
if(h){return h
}var f=g[0].currentStyle;
return f&&f.width&&parseInt(f.width,10)
}function c(h,f){var g=e(f);
return g.length<2?g:h.parent().find(f)
}var d;
function a(j,n){var g=this,k=j.add(g),h=j.children(),o=0,q=n.vertical;
if(!d){d=g
}if(h.length>1){h=e(n.items,j)
}e.extend(g,{getConf:function(){return n
},getIndex:function(){return o
},getSize:function(){return g.getItems().size()
},getNaviButtons:function(){return m.add(i)
},getRoot:function(){return j
},getItemWrap:function(){return h
},getItems:function(){return h.children(n.item).not("."+n.clonedClass)
},move:function(r,s){return g.seekTo(o+r,s)
},next:function(r){return g.move(1,r)
},prev:function(r){return g.move(-1,r)
},begin:function(r){return g.seekTo(0,r)
},end:function(r){return g.seekTo(g.getSize()-1,r)
},focus:function(){d=g;
return g
},addItem:function(r){r=e(r);
if(!n.circular){h.append(r)
}else{h.children("."+n.clonedClass+":last").before(r);
h.children("."+n.clonedClass+":first").replaceWith(r.clone().addClass(n.clonedClass))
}k.trigger("onAddItem",[r]);
return g
},seekTo:function(r,t,v){if(!r.jquery){r*=1
}if(n.circular&&r===0&&o==-1&&t!==0){return g
}if(!n.circular&&r<0||r>g.getSize()||r<-1){return g
}var w=r;
if(r.jquery){r=g.getItems().index(r)
}else{w=g.getItems().eq(r)
}var u=e.Event("onBeforeSeek");
if(!v){k.trigger(u,[r,t]);
if(u.isDefaultPrevented()||!w.length){return g
}}var s=q?{top:-w.position().top}:{left:-w.position().left};
o=r;
d=g;
if(t===undefined){t=n.speed
}h.animate(s,t,n.easing,v||function(){k.trigger("onSeek",[r])
});
return g
}});
e.each(["onBeforeSeek","onSeek","onAddItem"],function(s,r){if(e.isFunction(n[r])){e(g).bind(r,n[r])
}g[r]=function(t){if(t){e(g).bind(r,t)
}return g
}
});
if(n.circular){var p=g.getItems().slice(-1).clone().prependTo(h),f=g.getItems().eq(1).clone().appendTo(h);
p.add(f).addClass(n.clonedClass);
g.onBeforeSeek(function(t,r,s){if(t.isDefaultPrevented()){return
}if(r==-1){g.seekTo(p,s,function(){g.end(0)
});
return t.preventDefault()
}else{if(r==g.getSize()){g.seekTo(f,s,function(){g.begin(0)
})
}}});
g.seekTo(0,0,function(){})
}var m=c(j,n.prev).click(function(){g.prev()
}),i=c(j,n.next).click(function(){g.next()
});
if(!n.circular&&g.getSize()>1){g.onBeforeSeek(function(r,s){setTimeout(function(){if(!r.isDefaultPrevented()){m.toggleClass(n.disabledClass,s<=0);
i.toggleClass(n.disabledClass,s>=g.getSize()-1)
}},1)
});
if(!n.initialIndex){m.addClass(n.disabledClass)
}}if(n.mousewheel&&e.fn.mousewheel){j.mousewheel(function(s,r){if(n.mousewheel){g.move(r<0?1:-1,n.wheelSpeed||50);
return false
}})
}if(n.touch){var l={};
h[0].ontouchstart=function(r){var s=r.touches[0];
l.x=s.clientX;
l.y=s.clientY
};
h[0].ontouchmove=function(v){if(v.touches.length==1&&!h.is(":animated")){var s=v.touches[0],u=l.x-s.clientX,r=l.y-s.clientY;
g[q&&r>0||!q&&u>0?"next":"prev"]();
v.preventDefault()
}}
}if(n.keyboard){e(document).bind("keydown.scrollable",function(s){if(!n.keyboard||s.altKey||s.ctrlKey||e(s.target).is(":input")){return
}if(n.keyboard!="static"&&d!=g){return
}var r=s.keyCode;
if(q&&(r==38||r==40)){g.move(r==38?-1:1);
return s.preventDefault()
}if(!q&&(r==37||r==39)){g.move(r==37?-1:1);
return s.preventDefault()
}})
}if(n.initialIndex){g.seekTo(n.initialIndex,0,function(){})
}}e.fn.scrollable=function(g){var f=this.data("scrollable");
if(f){return f
}g=e.extend({},e.tools.scrollable.conf,g);
this.each(function(){f=new a(e(this),g);
e(this).data("scrollable",f)
});
return g.api?f:this
}
})(jQuery);
(function(c){var b=c.tools.scrollable;
b.navigator={conf:{navi:".navi",naviItem:null,activeClass:"active",indexed:false,idPrefix:null,history:false}};
function a(f,d){var e=c(d);
return e.length<2?e:f.parent().find(d)
}c.fn.navigator=function(d){if(typeof d=="string"){d={navi:d}
}d=c.extend({},b.navigator.conf,d);
var e;
this.each(function(){var m=c(this).data("scrollable"),k=d.navi.jquery?d.navi:a(m.getRoot(),d.navi),n=m.getNaviButtons(),g=d.activeClass,l=d.history&&c.fn.history;
if(m){e=m
}m.getNaviButtons=function(){return n.add(k)
};
function h(p,o,q){m.seekTo(o);
if(l){if(location.hash){location.hash=p.attr("href").replace("#","")
}}else{return q.preventDefault()
}}function i(){return k.find(d.naviItem||"> *")
}function j(o){var p=c("<"+(d.naviItem||"a")+"/>").click(function(q){h(c(this),o,q)
}).attr("href","#"+o);
if(o===0){p.addClass(g)
}if(d.indexed){p.text(o+1)
}if(d.idPrefix){p.attr("id",d.idPrefix+o)
}return p.appendTo(k)
}if(i().length){i().each(function(o){c(this).click(function(p){h(c(this),o,p)
})
})
}else{c.each(m.getItems(),function(o){j(o)
})
}m.onBeforeSeek(function(p,o){setTimeout(function(){if(!p.isDefaultPrevented()){var q=i().eq(o);
if(!p.isDefaultPrevented()&&q.length){i().removeClass(g).eq(o).addClass(g)
}}},1)
});
function f(q,p){var o=i().eq(p.replace("#",""));
if(!o.length){o=i().filter("[href="+p+"]")
}o.click()
}m.onAddItem(function(o,p){p=j(m.getItems().index(p));
if(l){p.history(f)
}});
if(l){i().history(f)
}});
return d.api?e:this
}
})(jQuery);
(function(){var i=document.all,e="http://www.adobe.com/go/getflashplayer",k=typeof jQuery=="function",d=/(\d+)[^\d]+(\d+)[^\d]*(\d*)/,b={width:"100%",height:"100%",id:"_"+(""+Math.random()).slice(9),allowfullscreen:true,allowscriptaccess:"always",quality:"high",version:[3,0],onFail:null,expressInstall:null,w3c:false,cachebusting:false};
if(window.attachEvent){window.attachEvent("onbeforeunload",function(){__flash_unloadHandler=function(){};
__flash_savedUnloadHandler=function(){}
})
}function g(f,l){if(l){for(var m in l){if(l.hasOwnProperty(m)){f[m]=l[m]
}}}return f
}function a(n,m){var l=[];
for(var f in n){if(n.hasOwnProperty(f)){l[f]=m(n[f])
}}return l
}window.flashembed=function(m,f,l){if(typeof m=="string"){m=document.getElementById(m.replace("#",""))
}if(!m){return
}if(typeof f=="string"){f={src:f}
}return new h(m,g(g({},b),f),l)
};
var j=g(window.flashembed,{conf:b,getVersion:function(){var m,n;
try{n=navigator.plugins["Shockwave Flash"].description.slice(16)
}catch(o){try{m=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
n=m&&m.GetVariable("$version")
}catch(l){try{m=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
n=m&&m.GetVariable("$version")
}catch(f){}}}n=d.exec(n);
return n?[n[1],n[3]]:[0,0]
},asString:function(n){if(n===null||n===undefined){return null
}var m=typeof n;
if(m=="object"&&n.push){m="array"
}switch(m){case"string":n=n.replace(new RegExp('(["\\\\])',"g"),"\\$1");
n=n.replace(/^\s?(\d+\.?\d+)%/,"$1pct");
return'"'+n+'"';
case"array":return"["+a(n,function(o){return j.asString(o)
}).join(",")+"]";
case"function":return'"function()"';
case"object":var l=[];
for(var f in n){if(n.hasOwnProperty(f)){l.push('"'+f+'":'+j.asString(n[f]))
}}return"{"+l.join(",")+"}"
}return String(n).replace(/\s/g," ").replace(/\'/g,'"')
},getHTML:function(p,l){p=g({},p);
var o='<object width="'+p.width+'" height="'+p.height+'" id="'+p.id+'" name="'+p.id+'"';
if(p.cachebusting){p.src+=((p.src.indexOf("?")!=-1?"&":"?")+Math.random())
}if(p.w3c||!i){o+=' data="'+p.src+'" type="application/x-shockwave-flash"'
}else{o+=' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'
}o+=">";
if(p.w3c||i){o+='<param name="movie" value="'+p.src+'" />'
}p.width=p.height=p.id=p.w3c=p.src=null;
p.onFail=p.version=p.expressInstall=null;
for(var q in p){if(p[q]){o+='<param name="'+q+'" value="'+p[q]+'" />'
}}var f="";
if(l){for(var m in l){if(l[m]){var n=l[m];
f+=m+"="+(/function|object/.test(typeof n)?j.asString(n):n)+"&"
}}f=f.slice(0,-1);
o+='<param name="flashvars" value=\''+f+"' />"
}o+="</object>";
return o
},isSupported:function(f){return c[0]>f[0]||c[0]==f[0]&&c[1]>=f[1]
}});
var c=j.getVersion();
function h(n,f,l){g(this,{getRoot:function(){return n
},getOptions:function(){return f
},getConf:function(){return l
},getApi:function(){return n.firstChild
}});
if(j.isSupported(f.version)){n.innerHTML=j.getHTML(f,l)
}else{if(f.expressInstall&&j.isSupported([6,65])){n.innerHTML=j.getHTML(g(f,{src:f.expressInstall}),{MMredirectURL:location.href,MMplayerType:"PlugIn",MMdoctitle:document.title})
}else{if(!n.innerHTML.replace(/\s/g,"")){n.innerHTML="<h2>Flash version "+f.version+" or greater is required</h2><h3>"+(c[0]>0?"Your version is "+c:"You have no flash plugin installed")+"</h3>"+(n.tagName=="A"?"<p>Click here to download latest version</p>":"<p>Download latest version from <a href='"+e+"'>here</a></p>");
if(n.tagName=="A"){n.onclick=function(){location.href=e
}
}}if(f.onFail){var m=f.onFail.call(this);
if(typeof m=="string"){n.innerHTML=m
}}}}if(i){window[f.id]=document.getElementById(f.id)
}}if(k){jQuery.tools=jQuery.tools||{version:"1.2.5"};
jQuery.tools.flashembed={conf:b};
jQuery.fn.flashembed=function(f,l){return this.each(function(){$(this).data("flashembed",flashembed(this,f,l))
})
}
}})();(function(a){a.fn.extend({elastic:function(){var b=["paddingTop","paddingRight","paddingBottom","paddingLeft","fontSize","lineHeight","fontFamily","width","fontWeight"];
return this.each(function(){if(this.type!="textarea"){return false
}var d=a(this),e=a("<div />").css({position:"absolute",display:"none","word-wrap":"break-word"}),l=parseInt(d.css("line-height"),10)||parseInt(d.css("font-size"),"10"),f=parseInt(d.css("height"),10)||l*3,g=parseInt(d.css("max-height"),10)||Number.MAX_VALUE,h=0,c=0;
if(g<0){g=Number.MAX_VALUE
}e.appendTo(d.parent());
var c=b.length;
while(c--){e.css(b[c].toString(),d.css(b[c].toString()))
}function k(m,i){curratedHeight=Math.floor(parseInt(m,10));
if(d.height()!=curratedHeight){d.css({height:curratedHeight+"px",overflow:i})
}}function j(){var m=d.val().replace(/&/g,"&amp;").replace(/  /g,"&nbsp;").replace(/<|>/g,"&gt;").replace(/\n/g,"<br />");
var i=e.html();
if(m+"&nbsp;"!=i){e.html(m+"&nbsp;");
if(Math.abs(e.height()+l-d.height())>3){var n=e.height()+l;
if(n>=g){k(g,"auto")
}else{if(n<=f){k(f,"hidden")
}else{k(n,"hidden")
}}}}}d.css({overflow:"hidden"});
d.keyup(function(){j()
});
d.live("input paste",function(i){setTimeout(j,250)
});
j()
})
}})
})(jQuery);(function($){$.fn.extend({limit:function(limit,element){var interval,f;
var self=$(this);
$(this).focus(function(){interval=window.setInterval(substring,100)
});
$(this).blur(function(){clearInterval(interval);
substring()
});
substringFunction="function substring(){ var val = $(self).val();var length = val.length;if(length > limit){$(self).val($(self).val().substring(0,limit));}";
if(typeof element!="undefined"){substringFunction+="if($(element).html() != limit-length){$(element).html((limit-length<=0)?'0':limit-length);}"
}substringFunction+="}";
eval(substringFunction);
substring()
}})
})(jQuery);(function(a){a.fn.extend({autocomplete:function(b,d){var c=typeof b=="string";
d=a.extend({},a.Autocompleter.defaults,{url:c?b:null,data:c?null:b,delay:c?a.Autocompleter.defaults.delay:10,max:d&&!d.scroll?10:150},d);
d.highlight=d.highlight||function(e){return e
};
d.formatMatch=d.formatMatch||d.formatItem;
return this.each(function(){new a.Autocompleter(this,d)
})
},result:function(b){return this.bind("result",b)
},search:function(b){return this.trigger("search",[b])
},flushCache:function(){return this.trigger("flushCache")
},setOptions:function(b){return this.trigger("setOptions",[b])
},unautocomplete:function(){return this.trigger("unautocomplete")
}});
a.Autocompleter=function(v,t){var u={UP:38,DOWN:40,DEL:46,TAB:9,RETURN:13,ESC:27,COMMA:188,PAGEUP:33,PAGEDOWN:34,BACKSPACE:8};
var n=a(v).attr("autocomplete","off").addClass(t.inputClass);
var q;
var k="";
var b=a.Autocompleter.Cache(t);
var o=0;
var g;
var p={mouseDownOnSelect:false};
var s=a.Autocompleter.Select(t,v,m,p);
var l;
a.browser.opera&&a(v.form).bind("submit.autocomplete",function(){if(l){l=false;
return false
}});
n.bind((a.browser.opera?"keypress":"keydown")+".autocomplete",function(y){o=1;
g=y.keyCode;
switch(y.keyCode){case u.UP:y.preventDefault();
if(s.visible()){s.prev()
}else{f(0,true)
}break;
case u.DOWN:y.preventDefault();
if(s.visible()){s.next()
}else{f(0,true)
}break;
case u.PAGEUP:y.preventDefault();
if(s.visible()){s.pageUp()
}else{f(0,true)
}break;
case u.PAGEDOWN:y.preventDefault();
if(s.visible()){s.pageDown()
}else{f(0,true)
}break;
case t.multiple&&a.trim(t.multipleSeparator)==","&&u.COMMA:case u.TAB:case u.RETURN:if(m()){y.preventDefault();
l=true;
return false
}break;
case u.ESC:s.hide();
break;
default:clearTimeout(q);
q=setTimeout(f,t.delay);
break
}}).focus(function(){o++
}).blur(function(){o=0;
if(!p.mouseDownOnSelect){e()
}}).click(function(){if(o++>1&&!s.visible()){f(0,true)
}}).bind("search",function(){var y=(arguments.length>1)?arguments[1]:null;
function z(A,B){var C;
if(B&&B.length){for(var D=0;
D<B.length;
D++){if(B[D].result.toLowerCase()==A.toLowerCase()){C=B[D];
break
}}}if(typeof y=="function"){y(C)
}else{n.trigger("result",C&&[C.data,C.value])
}}a.each(i(n.val()),function(A,B){r(B,z,z)
})
}).bind("flushCache",function(){b.flush()
}).bind("setOptions",function(){a.extend(t,arguments[1]);
if("data" in arguments[1]){b.populate()
}}).bind("unautocomplete",function(){s.unbind();
n.unbind();
a(v.form).unbind(".autocomplete")
});
function m(){var B=s.selected();
if(!B){return false
}if(t.href!=null){var y=t.href;
y+=(y.match(/\?/)?"&":"?");
y+=a.param({IdObject:B.data.IdObject,Name:B.data.UrlName});
y+=(y.match(/\?/)?"&":"?");
y+=a.param({Query:n.val()});
y+=(y.match(/\?/)?"&":"?");
y+=a.param(t.extraParams);
window.location.href=y
}var F=B.result;
k=F;
if(t.multiple){var C=i(n.val());
if(C.length>1){var E=t.multipleSeparator.length;
var D=a(v).selection().start;
var z,A=0;
a.each(C,function(G,H){A+=H.length;
if(D<=A){z=G;
return false
}A+=E
});
C[z]=F;
F=C.join(t.multipleSeparator)
}F+=t.multipleSeparator
}n.val(F);
w();
n.trigger("result",[B.data,B.value]);
return true
}function f(y,A){if(g==u.DEL){s.hide();
return
}var z=n.val();
if(!A&&z==k){return
}k=z;
z=d(z);
if(z.length>=t.minChars){n.addClass(t.loadingClass);
if(!t.matchCase){z=z.toLowerCase()
}r(z,j,w)
}else{h();
s.hide()
}}function i(y){if(!y){return[""]
}if(!t.multiple){return[a.trim(y)]
}return a.map(y.split(t.multipleSeparator),function(z){return a.trim(y).length?a.trim(z):null
})
}function d(y){if(!t.multiple){return y
}var z=i(y);
if(z.length==1){return z[0]
}var A=a(v).selection().start;
if(A==y.length){z=i(y)
}else{z=i(y.replace(y.substring(A),""))
}return z[z.length-1]
}function x(z,y){if(t.autoFill&&(d(n.val()).toLowerCase()==z.toLowerCase())&&g!=u.BACKSPACE){n.val(n.val()+y.substring(d(k).length));
a(v).selection(k.length,k.length+y.length)
}}function e(){clearTimeout(q);
q=setTimeout(w,200)
}function w(){var y=s.visible();
s.hide();
clearTimeout(q);
h();
n.removeClass(t.inputClassWhenResult);
n.addClass(t.inputClass);
if(t.mustMatch){n.search(function(z){if(!z){if(t.multiple){var A=i(n.val()).slice(0,-1);
n.val(A.join(t.multipleSeparator)+(A.length?t.multipleSeparator:""))
}else{n.val("");
n.trigger("result",null)
}}})
}}function j(z,y){if(y&&y.length&&o){h();
s.display(y,z);
x(z,y[0].value);
s.show()
}else{w()
}}function r(A,B,y){if(!t.matchCase){A=A.toLowerCase()
}var z=b.load(A);
if(z&&z.length){B(A,z)
}else{if((typeof t.url=="string")&&(t.url.length>0)){var C={timestamp:+new Date()};
a.each(t.extraParams,function(D,E){C[D]=typeof E=="function"?E():E
});
a.ajax({type:"POST",mode:"abort",port:"autocomplete"+v.name,dataType:t.dataType,url:t.url,data:a.extend({Query:d(A)},C),success:function(D){var E=t.parse&&t.parse(D)||c(D);
b.add(A,E);
B(A,E)
}})
}else{s.emptyList();
y(A)
}}}function c(z){var A=[];
for(var B=0;
B<z.SearchAutoCompleteItemList.length;
B++){var y=z.SearchAutoCompleteItemList[B];
if(y){A[A.length]={data:y,value:y.Name,result:y.Name,result:t.formatResult&&t.formatResult(y,y.Name)||y.Name,href:t.href}
}}return A
}function h(){n.removeClass(t.loadingClass)
}};
a.Autocompleter.defaults={inputClass:"ac_input",inputClassWhenResult:"ac-input_result",resultsClass:"ac_results",loadingClass:"ac_loading",hoverClass:"ac_over",minChars:1,delay:750,href:null,matchCase:false,matchSubset:true,matchContains:false,cacheLength:0,max:100,mustMatch:false,extraParams:{},selectFirst:false,formatItem:function(b){return b[0]
},formatMatch:null,autoFill:false,width:0,multiple:false,multipleSeparator:", ",highlight:function(c,b){return c.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)("+b.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi,"\\$1")+")(?![^<>]*>)(?![^&;]+;)","gi"),"<strong>$1</strong>")
},scroll:true,scrollHeight:180};
a.Autocompleter.Cache=function(c){var b={};
var g=0;
function d(k,l){if(!c.matchCase){k=k.toLowerCase()
}var j=k.indexOf(l);
if(c.matchContains=="word"){j=k.toLowerCase().search("\\b"+l.toLowerCase())
}if(j==-1){return false
}return j==0||c.matchContains
}function f(j,i){if(g>c.cacheLength){h()
}if(!b[j]){g++
}b[j]=i
}function e(){if(!c.data){return false
}var o={},p=0;
if(!c.url){c.cacheLength=1
}o[""]=[];
for(var k=0,n=c.data.length;
k<n;
k++){var l=c.data[k];
l=(typeof l=="string")?[l]:l;
var j=c.formatMatch(l,k+1,c.data.length);
if(j===false){continue
}var m=j.charAt(0).toLowerCase();
if(!o[m]){o[m]=[]
}var q={value:j,data:l,result:c.formatResult&&c.formatResult(l)||j};
o[m].push(q);
if(p++<c.max){o[""].push(q)
}}a.each(o,function(r,s){c.cacheLength++;
f(r,s)
})
}setTimeout(e,25);
function h(){b={};
g=0
}return{flush:h,add:f,populate:e,load:function(j){if(!c.cacheLength||!g){return null
}if(!c.url&&c.matchContains){var o=[];
for(var m in b){if(m.length>0){var n=b[m];
a.each(n,function(k,p){if(d(p.value,j)){o.push(p)
}})
}}return o
}else{if(b[j]){return b[j]
}else{if(c.matchSubset){for(var l=j.length-1;
l>=c.minChars;
l--){var n=b[j.substr(0,l)];
if(n){var o=[];
a.each(n,function(k,p){if(d(p.value,j)){o[o.length]=p
}});
return o
}}}}}return null
}}
};
a.Autocompleter.Select=function(o,p,n,k){var h,j=-1,b,f="",l=true,e,m;
function i(){if(!l){return
}e=a("<div/>").hide().addClass(o.resultsClass).css("position","absolute").appendTo(document.body);
m=a("<ul/>").appendTo(e).mouseover(function(s){if(q(s).nodeName&&q(s).nodeName.toUpperCase()=="LI"){j=a("li",m).removeClass(o.hoverClass).index(q(s));
a(q(s)).addClass(o.hoverClass)
}}).click(function(s){a(q(s)).addClass(o.hoverClass);
n();
p.focus();
return false
}).mousedown(function(){k.mouseDownOnSelect=true
}).mouseup(function(){k.mouseDownOnSelect=false
});
if(o.width>0){e.css("width",o.width)
}l=false
}function q(t){var s=t.target;
while(s&&s.tagName!="LI"){s=s.parentNode
}if(!s){return[]
}return s
}function d(t){h.slice(j,j+1).removeClass(o.hoverClass);
c(t);
var s=h.slice(j,j+1).addClass(o.hoverClass);
if(o.scroll){var u=0;
h.slice(0,j).each(function(){u+=this.offsetHeight
});
if((u+s[0].offsetHeight-m.scrollTop())>m[0].clientHeight){m.scrollTop(u+s[0].offsetHeight-m.innerHeight())
}else{if(u<m.scrollTop()){m.scrollTop(u)
}}}}function c(s){j+=s;
if(j<0){j=h.size()-1
}else{if(j>=h.size()){j=0
}}}function r(s){return o.max&&o.max<s?o.max:s
}function g(){m.empty();
var v=r(b.length);
for(var s=0;
s<v;
s++){if(!b[s]){continue
}var t=o.formatItem(b[s].data,s+1,v,b[s].value,f);
if(t===false){continue
}var u=a("<li/>").html(o.highlight(t,f)).addClass(s%2==0?"ac_even":"ac_odd").appendTo(m)[0];
a.data(u,"ac_data",b[s])
}h=m.find("li");
if(o.selectFirst){h.slice(0,1).addClass(o.hoverClass);
j=0
}if(a.fn.bgiframe){m.bgiframe()
}a(p).removeClass(o.inputClass);
a(p).addClass(o.inputClassWhenResult)
}return{display:function(s,t){i();
b=s;
f=t;
g()
},next:function(){d(1)
},prev:function(){d(-1)
},pageUp:function(){if(j!=0&&j-8<0){d(-j)
}else{d(-8)
}},pageDown:function(){if(j!=h.size()-1&&j+8>h.size()){d(h.size()-1-j)
}else{d(8)
}},hide:function(){e&&e.hide();
h&&h.removeClass(o.hoverClass);
j=-1
},visible:function(){return e&&e.is(":visible")
},current:function(){return this.visible()&&(h.filter("."+o.hoverClass)[0]||o.selectFirst&&h[0])
},show:function(){var u=a(p).offset();
e.css({width:typeof o.width=="string"||o.width>0?o.width:a(p).width(),top:u.top+p.offsetHeight,left:u.left}).show();
if(o.scroll){m.scrollTop(0);
m.css({maxHeight:o.scrollHeight,overflow:"auto"});
if(a.browser.msie&&typeof document.body.style.maxHeight==="undefined"){var s=0;
h.each(function(){s+=this.offsetHeight
});
var t=s>o.scrollHeight;
m.css("height",t?o.scrollHeight:s);
if(!t){h.width(m.width()-parseInt(h.css("padding-left"))-parseInt(h.css("padding-right")))
}}}},selected:function(){var s=h&&h.filter("."+o.hoverClass).removeClass(o.hoverClass);
return s&&s.length&&a.data(s[0],"ac_data")
},emptyList:function(){m&&m.empty()
},unbind:function(){e&&e.remove()
}}
};
a.fn.selection=function(d,b){if(d!==undefined){return this.each(function(){if(this.createTextRange){var j=this.createTextRange();
if(b===undefined||d==b){j.move("character",d);
j.select()
}else{j.collapse(true);
j.moveStart("character",d);
j.moveEnd("character",b);
j.select()
}}else{if(this.setSelectionRange){this.setSelectionRange(d,b)
}else{if(this.selectionStart){this.selectionStart=d;
this.selectionEnd=b
}}}})
}var f=this[0];
if(f.createTextRange){var e=document.selection.createRange(),c=f.value,h="<->",g=e.text.length;
e.text=h;
var i=f.value.indexOf(h);
f.value=c;
this.selection(i,i+g);
return{start:i,end:i+g}
}else{if(f.selectionStart!==undefined){return{start:f.selectionStart,end:f.selectionEnd}
}}}
})(jQuery);(function(a){a.fn.collapsibleCheckboxTree=function(c){var b={checkParents:false,checkChildren:false,uncheckChildren:false,initialState:"default"};
var c=a.extend(b,c);
this.each(function(){var d=this;
a("ul",a(this)).addClass("collapsible-checkbox-tree-hide");
if(b.checkParents){a("input:checked").parents("li").find("input[type='checkbox']:first").attr("checked",true)
}if(b.checkChildren){a("input:checked").parent("li").find("input[type='checkbox']").attr("checked",true)
}a("li:has(input:checked) > ul",a(this)).removeClass("collapsible-checkbox-tree-hide");
a("li",a(this)).prepend("<span>&nbsp;</span>");
a("li:has(> ul:not(.collapsible-checkbox-tree-hide)) > span",a(this)).addClass("collapsible-checkbox-tree-expanded").html("-");
a("li:has(> ul.collapsible-checkbox-tree-hide) > span",a(this)).addClass("collapsible-checkbox-tree-collapsed").html("+");
a("li > input:checked",a(this)).parent("li").find("> label").addClass("collapsible-checkbox-tree-selected");
a("input[type='checkbox']",a(this)).click(function(){if(a(this).is(":checked")){a("> ul",a(this).parent("li")).removeClass("collapsible-checkbox-tree-hide");
a("> span.collapsible-checkbox-tree-collapsed",a(this).parent("li")).removeClass("collapsible-checkbox-tree-collapsed").addClass("collapsible-checkbox-tree-expanded").html("-");
a("> label",a(this).parent("li")).addClass("collapsible-checkbox-tree-selected");
if(b.checkParents){a(this).parents("li").find("input[type='checkbox']:first").attr("checked",true);
a(this).parents("li").find("> label").addClass("collapsible-checkbox-tree-selected")
}if(b.checkChildren){a(this).parent("li").find("input[type='checkbox']").attr("checked",true);
a("ul",a(this).parent("li")).removeClass("collapsible-checkbox-tree-hide");
a("span.collapsible-checkbox-tree-collapsed",a(this).parent("li")).removeClass("collapsible-checkbox-tree-collapsed").addClass("collapsible-checkbox-tree-expanded").html("-");
a(this).parent("li").find("> label").removeClass("collapsible-checkbox-tree-selected")
}}else{if(b.uncheckChildren){a(this).parent("li").find("input[type='checkbox']").attr("checked",false);
a("ul",a(this).parent("li")).addClass("collapsible-checkbox-tree-hide");
a("span.collapsible-checkbox-tree-expanded",a(this).parent("li")).removeClass("collapsible-checkbox-tree-expanded").addClass("collapsible-checkbox-tree-collapsed").html("+")
}a(this).parent("li").find("> label").removeClass("collapsible-checkbox-tree-selected")
}});
a("li:has(> ul) span",a(this)).click(function(){if(a(this).is(".collapsible-checkbox-tree-collapsed")){a("> ul",a(this).parent("li")).removeClass("collapsible-checkbox-tree-hide");
a(this).removeClass("collapsible-checkbox-tree-collapsed").addClass("collapsible-checkbox-tree-expanded").html("-")
}else{if(a(this).is(".collapsible-checkbox-tree-expanded")){a("> ul",a(this).parent("li")).addClass("collapsible-checkbox-tree-hide");
a(this).removeClass("collapsible-checkbox-tree-expanded").addClass("collapsible-checkbox-tree-collapsed").html("+")
}}})
});
return this
}
})(jQuery);(function(a){a.fn.hoverIntent=function(m,n){var l={sensitivity:7,interval:100,timeout:0};
l=a.extend(l,n?{over:m,out:n}:m);
var j,k,h,i;
var b=function(f){j=f.pageX;
k=f.pageY
};
var e=function(f,g){g.hoverIntent_t=clearTimeout(g.hoverIntent_t);
if((Math.abs(h-j)+Math.abs(i-k))<l.sensitivity){a(g).unbind("mousemove",b);
g.hoverIntent_s=1;
return l.over.apply(g,[f])
}else{h=j;
i=k;
g.hoverIntent_t=setTimeout(function(){e(f,g)
},l.interval)
}};
var c=function(f,g){g.hoverIntent_t=clearTimeout(g.hoverIntent_t);
g.hoverIntent_s=0;
return l.out.apply(g,[f])
};
var d=function(o){var q=(o.type=="mouseover"?o.fromElement:o.toElement)||o.relatedTarget;
while(q&&q!=this){try{q=q.parentNode
}catch(o){q=this
}}if(q==this){return false
}var g=jQuery.extend({},o);
var f=this;
if(f.hoverIntent_t){f.hoverIntent_t=clearTimeout(f.hoverIntent_t)
}if(o.type=="mouseover"){h=g.pageX;
i=g.pageY;
a(f).bind("mousemove",b);
if(f.hoverIntent_s!=1){f.hoverIntent_t=setTimeout(function(){e(g,f)
},l.interval)
}}else{a(f).unbind("mousemove",b);
if(f.hoverIntent_s==1){f.hoverIntent_t=setTimeout(function(){c(g,f)
},l.timeout)
}}};
return this.mouseover(d).mouseout(d)
}
})(jQuery);(function(e){e.cluetip={version:"1.0.4"};
var j,a,i,f,h,d,g,c;
e.fn.cluetip=function(m,l){if(typeof m=="object"){l=m;
m=null
}if(m=="destroy"){return this.unbind(".cluetip")
}return this.each(function(n){var T=this,L=e(this);
var E=e.extend(true,{},e.fn.cluetip.defaults,l||{},e.metadata?L.metadata():e.meta?L.data():{});
var s=false;
var V=false;
var O=+E.cluezIndex;
L.data("thisInfo",{title:T.title,zIndex:O});
var w=false,Z=0;
if(!e("#cluetip").length){e(['<div id="cluetip">','<div id="cluetip-outer">','<h3 id="cluetip-title"></h3>','<div id="cluetip-inner"></div>',"</div>",'<div id="cluetip-extra"></div>','<div id="cluetip-arrows" class="cluetip-arrows"></div>',"</div>"].join(""))[k](b).hide();
j=e("#cluetip").css({position:"absolute"});
i=e("#cluetip-outer").css({position:"relative",zIndex:O});
a=e("#cluetip-inner");
f=e("#cluetip-title");
h=e("#cluetip-arrows");
d=e('<div id="cluetip-waitimage"></div>').css({position:"absolute"}).insertBefore(j).hide()
}var H=(E.dropShadow)?+E.dropShadowSteps:0;
if(!g){g=e([]);
for(var B=0;
B<H;
B++){g=g.add(e("<div></div>").css({zIndex:O-1,opacity:0.1,top:1+B,left:1+B}))
}g.css({position:"absolute",backgroundColor:"#000"}).prependTo(j)
}var D=L.attr(E.attribute),M=E.cluetipClass;
if(!D&&!E.splitTitle&&!m){return true
}if(E.local&&E.localPrefix){D=E.localPrefix+D
}if(E.local&&E.hideLocal){e(D+":first").hide()
}var R=parseInt(E.topOffset,10),Q=parseInt(E.leftOffset,10);
var r,N,o=isNaN(parseInt(E.height,10))?"auto":(/\D/g).test(E.height)?E.height:E.height+"px";
var z,K,X,ab,F,I;
var aa=parseInt(E.width,10)||275,A=aa+(parseInt(j.css("paddingLeft"),10)||0)+(parseInt(j.css("paddingRight"),10)||0)+H,J=this.offsetWidth,ac=this.offsetHeight,S,p,u,q,t;
var Y;
var G=(E.attribute!="title")?L.attr(E.titleAttribute):"";
if(E.splitTitle){if(G==undefined){G=""
}Y=G.split(E.splitTitle);
G=Y.shift()
}if(E.escapeTitle){G=G.replace(/&/g,"&amp;").replace(/>/g,"&gt;").replace(/</g,"&lt;")
}var C;
function P(){return false
}var x=function(ak){if(!E.onActivate(L)){return false
}w=true;
j.removeClass().css({width:aa});
if(D==L.attr("href")){L.css("cursor",E.cursor)
}if(E.hoverClass){L.addClass(E.hoverClass)
}K=X=L.offset().top;
S=L.offset().left;
linkBottom=L.offset().top+ac;
linkRight=L.offset().left+J;
q=ak.pageX;
F=ak.pageY;
if(T.tagName.toLowerCase()!="area"){z=e(document).scrollTop();
t=e(window).width()
}if(E.positionBy=="fixed"){p=J+S+Q;
j.css({left:p})
}else{p=(J>S&&S>A)||S+J+A+Q>t?S-A-Q:J+S+Q;
if(T.tagName.toLowerCase()=="area"||E.positionBy=="mouse"||J+A>t){if(q+20+A>t){j.addClass(" cluetip-"+M);
p=(q-A-Q)>=0?q-A-Q-parseInt(j.css("marginLeft"),10)+parseInt(a.css("marginRight"),10):q-(A/2)
}else{p=q+Q
}}var ai=p<0?ak.pageY+R:ak.pageY;
j.css({left:(p>0&&E.positionBy!="bottomTop")?p:(q+(A/2)>t)?t/2-A/2:Math.max(q-(A/2),0),zIndex:L.data("thisInfo").zIndex});
h.css({zIndex:L.data("thisInfo").zIndex+1})
}N=e(window).height();
if(m){if(typeof m=="function"){m=m(T)
}a.html(m);
U(ai)
}else{if(Y){var af=Y.length;
a.html(Y[0]);
if(af>1){for(var ad=1;
ad<af;
ad++){a.append('<div class="split-body">'+Y[ad]+"</div>")
}}U(ai)
}else{if(!E.local&&D.indexOf("#")!=0){if(/\.(jpe?g|tiff?|gif|png)$/i.test(D)){a.html('<img src="'+D+'" alt="'+G+'" />');
U(ai)
}else{if(V&&E.ajaxCache){a.html(V);
U(ai)
}else{var ah=E.ajaxSettings.beforeSend,ae=E.ajaxSettings.error,al=E.ajaxSettings.success,an=E.ajaxSettings.complete;
var am={cache:false,url:D,beforeSend:function(ao){if(ah){ah.call(T,ao,j,a)
}i.children().empty();
if(E.waitImage){d.css({top:linkBottom-d.outerHeight(),left:linkRight-d.outerWidth(),zIndex:L.data("thisInfo").zIndex-1}).show()
}},error:function(ap,ao){if(w){if(ae){ae.call(T,ap,ao,j,a)
}else{a.html("<i>sorry, the contents could not be loaded</i>")
}}},success:function(ao,ap){V=E.ajaxProcess.call(T,ao);
if(w){if(al){al.call(T,ao,ap,j,a)
}a.html(V)
}},complete:function(ap,ao){if(an){an.call(T,ap,ao,j,a)
}c=e("#cluetip-inner img").length;
if(c&&!e.browser.opera){e("#cluetip-inner img").bind("load error",function(){c--;
if(c<1){d.hide();
if(w){U(ai)
}}})
}else{d.hide();
if(w){U(ai)
}}}};
var aj=e.extend(true,{},E.ajaxSettings,am);
e.ajax(aj)
}}}else{if(E.local){var ag=e(D+(/#\S+$/.test(D)?"":":eq("+n+")")).clone(true).show();
a.html(ag);
U(ai)
}}}}};
var U=function(ai){j.addClass("cluetip-"+M);
if(E.truncate){var ah=a.text().slice(0,E.truncate)+"...";
a.html(ah)
}function af(){}G?f.show().html(G):(E.showTitle)?f.show().html("&nbsp;"):f.hide();
if(E.sticky){var ae=e('<div id="cluetip-close"><a href="#">'+E.closeText+"</a></div>");
(E.closePosition=="bottom")?ae.appendTo(a):(E.closePosition=="title")?ae.prependTo(f):ae.prependTo(a);
ae.bind("click.cluetip",function(){v();
return false
});
if(E.mouseOutClose){j.bind("mouseleave.cluetip",function(){v()
})
}else{j.unbind("mouseleave.cluetip")
}}if(E.stickyIntent){j.bind("mouseenter.cluetip",function(){s=true
});
if(E.mouseOutClose){j.bind("mouseleave.cluetip",function(){v()
})
}else{j.unbind("mouseleave.cluetip")
}}var ag="";
i.css({zIndex:L.data("thisInfo").zIndex,overflow:o=="auto"?"visible":"auto",height:o});
r=o=="auto"?Math.max(j.outerHeight(),j.height()):parseInt(o,10);
ab=X;
I=z+N;
if(E.positionBy=="fixed"){ab=X-E.dropShadowSteps+R
}else{if(E.positionBy=="centerVertical"){ab=X+(ac/2)-(r/2)+R
}else{if((p<q&&Math.max(p,0)+A>q)||E.positionBy=="bottomTop"){if(X+r+R>I&&F-z>r+R){ab=F-r-R;
ag="top"
}else{ab=F+R;
ag="bottom"
}}else{if(X+r+R>I){ab=(r>=N)?z:I-r-R
}else{if(L.css("display")=="block"||T.tagName.toLowerCase()=="area"||E.positionBy=="mouse"){ab=ai-R
}}}}}if(ag==""){p<S?ag="left":ag="right"
}j.css({top:ab+"px"}).removeClass().addClass("clue-"+ag+"-"+M).addClass(" cluetip-"+M);
if(E.arrows){var ad=(X-ab-E.dropShadowSteps+(ac/2)-(ac/4));
h.css({top:(/(left|right)/.test(ag)&&p>=0&&ad>0)?ad+"px":/(left|right)/.test(ag)?0:""}).show()
}else{h.hide()
}g.hide();
j.hide()[E.fx.open](E.fx.open!="show"&&E.fx.openSpeed);
if(E.dropShadow){g.css({height:r,width:aa,zIndex:L.data("thisInfo").zIndex-1}).show()
}if(e.fn.bgiframe){j.bgiframe()
}if(E.delayedClose>0){Z=setTimeout(v,E.delayedClose)
}E.onShow.call(T,j,a)
};
var W=function(ad){w=false;
d.hide();
if(!E.sticky||(/click|toggle/).test(E.activation)){v();
clearTimeout(Z)
}if(E.hoverClass){L.removeClass(E.hoverClass)
}};
var v=function(){i.parent().hide().removeClass();
E.onHide.call(T,j,a);
L.removeClass("cluetip-clicked");
if(G){L.attr(E.titleAttribute,G)
}L.css("cursor","");
if(E.arrows){h.css({top:""})
}s=false
};
e(document).bind("hideCluetip",function(ad){v()
});
if((/click|toggle/).test(E.activation)){L.bind("click.cluetip",function(ad){if(j.is(":hidden")||!L.is(".cluetip-clicked")){x(ad);
e(".cluetip-clicked").removeClass("cluetip-clicked");
L.addClass("cluetip-clicked")
}else{W(ad)
}this.blur();
return false
})
}else{if(E.activation=="focus"){L.bind("focus.cluetip",function(ad){x(ad)
});
L.bind("blur.cluetip",function(ad){W(ad)
})
}else{L[E.clickThrough?"unbind":"bind"]("click",P);
var y=function(af){if(E.tracking==true){var ae=p-af.pageX;
var ad=ab?ab-af.pageY:X-af.pageY;
L.bind("mousemove.cluetip",function(ag){j.css({left:ag.pageX+ae,top:ag.pageY+ad})
})
}};
if(e.fn.hoverIntent&&E.hoverIntent){L.hoverIntent({sensitivity:E.hoverIntent.sensitivity,interval:E.hoverIntent.interval,over:function(ad){x(ad);
y(ad)
},timeout:E.hoverIntent.timeout,out:function(ad){if(!s){W(ad);
L.unbind("mousemove.cluetip")
}}})
}else{L.bind("mouseenter.cluetip",function(ad){x(ad);
y(ad)
}).bind("mouseleave.cluetip",function(ad){W(ad);
L.unbind("mousemove.cluetip")
})
}L.bind("mouseenter.cluetip",function(ad){L.attr("title","")
}).bind("mouseleave.cluetip",function(ad){L.attr("title",L.data("thisInfo").title)
})
}}})
};
e.fn.cluetip.defaults={width:274,height:"auto",cluezIndex:97,positionBy:"centerVertical",topOffset:0,leftOffset:0,local:false,localPrefix:null,hideLocal:true,attribute:"rel",titleAttribute:"null",splitTitle:"",escapeTitle:false,showTitle:false,cluetipClass:"tooltip",hoverClass:"",waitImage:true,cursor:"help",arrows:true,dropShadow:false,dropShadowSteps:6,sticky:false,stickyIntent:true,mouseOutClose:true,activation:"hover",clickThrough:true,tracking:false,delayedClose:0,closePosition:"top",closeText:"",truncate:0,fx:{open:"fadeIn",openSpeed:""},hoverIntent:{sensitivity:3,interval:500,timeout:1000},onActivate:function(l){return true
},onShow:function(l,m){e(".ui-rating:first",m).rating();
e(".js-add",m).ajaxAdd()
},onHide:function(l,m){},ajaxCache:true,ajaxProcess:function(l){l=l.replace(/<(script|style|title)[^<]+<\/(script|style|title)>/gm,"").replace(/<(link|meta)[^>]+>/g,"");
return l
},ajaxSettings:{dataType:"html"},debug:false};
var k="appendTo",b="body";
e.cluetip.setup=function(l){if(l&&l.insertionType&&(l.insertionType).match(/appendTo|prependTo|insertBefore|insertAfter/)){k=l.insertionType
}if(l&&l.insertionElement){b=l.insertionElement
}}
})(jQuery);jQuery.cookie=function(k,a,c){if(typeof a!="undefined"){c=c||{};
if(a===null){a="";
c.expires=-1
}var b="";
if(c.expires&&(typeof c.expires=="number"||c.expires.toUTCString)){var f;
if(typeof c.expires=="number"){f=new Date();
f.setTime(f.getTime()+(c.expires*24*60*60*1000))
}else{f=c.expires
}b="; expires="+f.toUTCString()
}var g=c.path?"; path="+(c.path):"";
var j=c.domain?"; domain="+(c.domain):"";
var m=c.secure?"; secure":"";
document.cookie=[k,"=",encodeURIComponent(a),b,g,j,m].join("")
}else{var l=null;
if(document.cookie&&document.cookie!=""){var h=document.cookie.split(";");
for(var d=0;
d<h.length;
d++){var e=jQuery.trim(h[d]);
if(e.substring(0,k.length+1)==(k+"=")){l=decodeURIComponent(e.substring(k.length+1));
break
}}}return l
}};var test;
var enableDebug=false;
var dialogDOM;
var dialogErrorDOM;
var dialogQuestionDOM;
var pendingAJAX;
$(document).ready(function(){dialogDOM=$("<div></div>").appendTo("body").dialog({close:function(c,b){dialogDOM.empty().hide().dialog("option",{buttons:{}});
if(pendingAJAX){pendingAJAX.abort()
}}}).empty().hide();
dialogErrorDOM=$("<div></div>").appendTo("body").dialog({buttons:{Ok:function(){$(this).dialog("close")
}},close:function(c,b){dialogErrorDOM.empty().hide().dialog("option",{})
}}).empty().hide();
dialogQuestionDOM=$("<div></div>").appendTo("body").dialog().empty().hide();
$("img[data-tooltip]").cluetip();
$("[data-maxlines]").fitMaxLines();
$("select").selectmenu();
var a=document.createElement("input");
if("placeholder" in a){}else{if(($.browser.msie)&&(parseInt($.browser.version,10)==6|7)){}else{$("input:text[placeholder], input:password[placeholder]").watermark();
$("textarea[placeholder]").watermark()
}}$("textarea").elastic();
$(".ui-rating, .ui-rating_avarage").rating();
$("form").submit(CKupdate)
});
$(window).load(function(){$(".mainContent-left, .mainContent-right").equalHeights(true,false,false)
});
$.blockUI.defaults.message='<h1 class="ui-ajax">Proszę czekać...</h1>';
$.blockUI.defaults.css={};
$.blockUI.defaults.overlayCSS={backgroundColor:"#fff",opacity:0.7};
jQuery(function(a){a.datepicker.regional.pl={closeText:"Zamknij",prevText:"Poprzedni",nextText:"Następny",currentText:"Dziś",monthNames:["Styczeń","Luty","Marzec","Kwiecieć","Maj","Czerwiec","Lipiec","Sierpień","Wrzesieś","Październik","Listopad","Grudzień"],monthNamesShort:["Sty","Lu","Mar","Kw","Maj","Cze","Lip","Sie","Wrz","Paź","Lis","Gru"],dayNames:["Niedziela","Poniedzialek","Wtorek","Środa","Czwartek","Piątek","Sobota"],dayNamesShort:["Nie","Pn","Wt","Śr","Czw","Pt","So"],dayNamesMin:["N","Pn","Wt","Śr","Cz","Pt","So"],dateFormat:"yy-mm-dd",firstDay:1,isRTL:false};
a.datepicker.setDefaults(a.datepicker.regional.pl)
});
$.datepicker.setDefaults({changeMonth:true,changeYear:true,duration:"",onSelect:function(){this.blur()
}});
$.extend($.ui.dialog,{defaults:{autoOpen:false,stackfix:false,buttons:{},closeOnEscape:true,closeText:"Zamknij",dialogClass:"",draggable:true,hide:"blind",height:"auto",maxHeight:false,maxWidth:false,minHeight:false,minWidth:150,modal:true,position:["center",25],resizable:false,show:"blind",stack:true,title:null,width:600,zIndex:1000}});
function CKupdate(){for(instance in CKEDITOR.instances){CKEDITOR.instances[instance].updateElement()
}return true
}jQuery.ajaxHelper=function(f,d,c,b){if(f!=null){if(typeof f=="object"||typeof f=="string"){f=$(f)
}}if(d!=null){if(typeof d=="object"||typeof d=="string"){d=$(d)
}}if(c!=null){if(typeof c=="object"||typeof c=="string"){c=$(c)
}}var a={url:null,data:null,type:null,reload:null,question:null,questionText:null,questionTextConfirm:null,questionTextCancel:null,showResponseTranstalion:false,closeWindow:null,click:true,callback:{beforeSend:null,success:null,complete:null}};
if(b){jQuery.extend(a,b)
}var e={_init:function(){if((f!=null)&&(f.is("form"))){f.submit(function(g){g.preventDefault();
if(f.valid()){if(a.question){e._question()
}else{if((f!=null)&&(f.attr("data-question"))){e._question()
}else{if((d!=null)&&(d.attr("data-question"))){e._question()
}else{e._ajax()
}}}}})
}if((d!=null)&&(a.click==true)){d.click(function(g){g.preventDefault();
if((f!=null)&&(f.is("form"))){f.submit()
}else{if(a.question){e._question()
}else{if((f!=null)&&(f.attr("data-question"))){e._question()
}else{if((d!=null)&&(d.attr("data-question"))){e._question()
}else{e._ajax()
}}}}})
}else{if((f!=null)&&(f.is("form"))){f.submit()
}else{if(a.question){e._question()
}else{if((f!=null)&&(f.attr("data-question"))){e._question()
}else{if((d!=null)&&(d.attr("data-question"))){e._question()
}else{e._ajax()
}}}}}},_question:function(){var i,g;
if(a.questionText!=null){dialogQuestionDOM.text(a.questionText)
}else{if(f!=null){dialogQuestionDOM.text(f.attr("data-question"))
}else{if(d!=null){dialogQuestionDOM.text(d.attr("data-question"))
}}}if(a.questionTextConfirm!=null){i=a.questionTextConfirm
}else{if(f!=null){i=f.attr("data-questionTextConfirm")
}else{if(d!=null){i=d.attr("data-questionTextConfirm")
}else{i="Accept"
}}}if(a.questionTextCancel!=null){_questionTextCancel=a.questionTextCancel
}else{if(f!=null){_questionTextCancel=f.attr("data-questionTextCancel")
}else{if(d!=null){_questionTextCancel=d.attr("data-questionTextCancel")
}else{_questionTextCancel="Cancel"
}}}var h={};
h[i]=function(){$(this).dialog("close");
e._ajax()
};
h[_questionTextCancel]=function(){$(this).dialog("close")
};
dialogQuestionDOM.dialog("option",{buttons:h}).dialog("open").show("blind")
},_ajax:function(){var g,h;
if(a.url!=null){g=a.url
}else{if(f!=null){g=f.attr("data-href")||f.attr("action")
}else{if(d!=null){g=d.attr("data-href")||d.attr("href")
}}}if(g){pendingAJAX=$.ajax({url:g,data:a.data?a.data:(f?f.serialize():null),type:a.type||"POST",beforeSend:function(){if(c){c.block({message:'<span class="ui-font-tiny">Proszę czekać...</span>'})
}if(f){e._run(f.attr("data-callback-beforeSend"))
}if(d){e._run(d.attr("data-callback-beforeSend"))
}if(a.callback.beforeSend){e._run(a.callback.beforeSend,h)
}},success:function(k,j){if($.isJson(k)){h=window["eval"]("("+k+")");
if(h.IsValid==true){if(f){e._run(f.attr("data-callback-success"),h)
}if(d){e._run(d.attr("data-callback-success"),h)
}if(a.callback.success){e._run(a.callback.success,h)
}if((a.showResponseTranstalion==true)&&(h.LangKeyword)){e._message(h.LangKeyword,false)
}if((a.showResponseTranstalion==true)&&(h.ResponseTranslation)){e._message(h.ResponseTranslation,false)
}if(a.closeWindow){dialogDOM.dialog("close")
}if(a.reload){window.location.reload()
}}else{e._message(h.ResponseTranslation||"Wystąpił błąd. Skontaktuj się z twórcami strony.",true)
}}else{var i=$(k);
if($("html",i).length>0){e._message("Sprawdz czy jesteś zalogowany. Jeśli jesteś i błąd się powtarza skontaktuj się z twórcami strony.",true)
}else{dialogDOM.html(k).show("blind");
if(a.reload){window.location.reload()
}}}},error:function(){e._message("Wystąpił nieoczekiwany błąd połączenia, spróbuj ponownie za chwilę.",true)
},complete:function(){if(c){c.unblock()
}if(f){e._run(f.attr("data-callback-complete"))
}if(d){e._run(d.attr("data-callback-complete"))
}if(a.callback.complete){e._run(a.callback.complete,h)
}}})
}else{alert("Nie podano adresu zapytania!")
}},_run:function(g,i){if(g){if(typeof g=="function"){if(i){g.call(this,i.Object||i||null,f,d,c)
}else{g.call(this,null,f,d,c)
}}else{var h=window[g];
if(typeof h=="function"){if(i){h.call(this,i.Object||i||null,f,d,c)
}else{h.call(this,null,f,d,c)
}}else{e._message("Function "+g+" does not exist")
}}}},_message:function(g,h){if(h==false){dialogDOM.text(g).dialog("option",{buttons:{Ok:function(){$(this).dialog("close")
}}}).dialog("open").show("blind")
}else{dialogErrorDOM.text(g).dialog("open").show("blind")
}}};
e._init()
};
jQuery.fn.liveFilter=function(a,c,b){$(this).bind(($.browser.opera?"keypress":"keydown"),function(e){var d=$(this).val();
d=d.split(" ");
if(b){$(d).each(function(f){if(d[f]!=""||f==0){$(a+" "+c+" "+b+':not(:Contains("'+d[f]+'"))').closest(c).hide();
if(f==0){$(a+" "+c+" "+b+':Contains("'+d[f]+'")').closest(c).show()
}}})
}else{$(d).each(function(f){if(d[f]!=""||f==0){$(a+" "+c+':not(:Contains("'+d[f]+'"))').hide();
if(f==0){$(a+" "+c+':Contains("'+d[f]+'")').show()
}}})
}});
jQuery.expr[":"].Contains=function(e,d,f){return jQuery(e).text().toUpperCase().indexOf(f[3].toUpperCase())>=0
}
};
jQuery.isJson=function(a){if(jQuery.trim(a)==""){return false
}a=a.replace(/\\./g,"@").replace(/"[^"\\\n\r]*"/g,"");
return(/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(a)
};
jQuery.fn.equalHeights=function(d,a,b){var c=0;
$(this).each(function(e){if($(this).height()>c){c=$(this).height()
}});
if($.browser.msie&&$.browser.version==6){$(this).css({height:c,"line-height":b?c+"px":""})
}$(this).css({"min-height":c,height:a?c+"px":"","line-height":b?c+"px":""});
return this
};
jQuery.fn.sortHelper=function(b,a){$(this).toggle(function(){$(b+" > *").sort(function(c,d){return $.trim($(c).find(a).text())>$.trim($(d).find(a).text())?1:-1
}).remove().appendTo(b)
},function(){$(b+" > *").sort(function(c,d){return $.trim($(c).find(a).text())<$.trim($(d).find(a).text())?1:-1
}).remove().appendTo(b)
})
};
jQuery.fn.centerInWindow=function(){var b,a;
b=$(document).scrollTop();
b+=($(window).height()-$(this).outerHeight())/2;
if(b<$(document).scrollTop()){b=$(document).scrollTop()
}a=$(document).scrollLeft();
a+=($(window).width()-$(this).outerWidth())/2;
if(a<$(document).scrollLeft()){a=$(document).scrollLeft()
}$(this).css({top:b,left:a});
return this
};
jQuery.fn.getTallest=function(){var a=0;
$(this).each(function(b){if($(this).height()>a){a=$(this).height()
}});
return a
};
jQuery.fn.fitMaxLines=function(){$(this).each(function(b){var c=$(this).attr("data-maxlines")?parseInt($(this).attr("data-maxlines")):1;
var g=parseInt($(this).css("line-height").replace("px",""));
if(g<=1){g=18
}var d=g/6;
var j,m;
var h="";
var a=0,e=0;
var k=$(this);
var l=$(this).attr("data-maxlines_showmore");
a=k.height()+d;
if(c>=Math.round(a/g)){return
}else{a=0
}if(l){j=$("<span></span>").addClass("ic ui-href").text("... czytaj więcej");
m=$("<span></span>").addClass("ic ui-href").text("zwiń").hide()
}else{j=$("<span></span>").text("...")
}if($(this).children().length==0){var f=$("<span></span>").css("display","none");
f.text($.trim(k.text()));
k.text("");
while(c>=(a/g)){e=f.text().indexOf(" ");
if(e==-1){break
}e++;
h=f.text().substr(0,e);
f.text(f.text().substr(e));
k.text(k.text()+h);
a=k.height()+d
}while(c<(a/g)){e=k.text().lastIndexOf(" ");
if(e==-1){break
}h=k.text().substr(e);
k.text(k.text().substr(0,e));
f.text(h+f.text());
k.append(j);
a=k.height()+d;
j.remove()
}k.append(j);
a=k.height()+d;
k.append(f);
k.append(" ");
k.append(m);
if(l){j.click(function(){j.hide();
m.show();
f.show()
});
m.click(function(){j.show();
m.hide();
f.hide()
})
}}else{j.addClass("ui-maxLines-overlay").css({bottom:d});
if(l){m.addClass("ui-maxLines-overlay")
}k.append(j).addClass("ui-maxLines").css({height:g*c+d});
a=g*c+d;
k.append(m);
if(l){j.click(function(){j.hide();
m.show();
k.css({height:"auto"})
});
m.click(function(){j.show();
m.hide();
k.css({height:g*c+d})
})
}}})
};
jQuery.fn.extend({rating:function(){return this.each(function(){var a=$(this);
var c=a.children("span");
if(a.attr("data-rate")){a.data("rate",Math.max(parseInt(a.attr("data-rate")),0))
}if(a.attr("data-avarage_rate")){a.data("avarage_rate",Math.round(Math.max(parseFloat(a.attr("data-avarage_rate")),0)))
}if(a.attr("data-href")){a.data("href",a.attr("data-href"))
}if(a.data("href")){c.bind("mouseover focus",function(){b.drain();
b.fill(this)
}).bind("mouseout blur",function(){b.drain();
b.reset()
}).bind("click",function(d){d.preventDefault();
b.rate($(this))
}).keydown(function(d){if(d.keyCode==$.ui.keyCode.ENTER){d.preventDefault();
b.rate($(this))
}})
}a.bind("setRating",function(d,e){a.data("rate",parseInt(e)).attr("data-rate",parseInt(e));
b.drain();
b.reset()
});
var b={fill:function(d){c.slice(0,c.index(d)+1).addClass("star-state-hover").removeClass("star-state-selected").removeClass("star-state-selected_avarage").removeClass("star-state-unselected").end()
},drain:function(){c.addClass("star-state-unselected").removeClass("star-state-hover").removeClass("star-state-selected").removeClass("star-state-selected_avarage").end()
},reset:function(){if(typeof(a.data("rate"))=="number"){c.slice(0,a.data("rate")?a.data("rate"):0).removeClass("star-state-unselected").addClass("star-state-selected").end()
}else{if(typeof(a.data("avarage_rate"))=="number"){c.slice(0,a.data("avarage_rate")?a.data("avarage_rate"):0).removeClass("star-state-unselected").addClass("star-state-selected_avarage").end()
}}if(!a.data("href")){if(typeof(a.data("rate"))=="number"){c.slice(a.data("rate")?a.data("rate"):0).removeClass("star-state-unselected").addClass("star-state-none").end()
}else{if(typeof(a.data("avarage_rate"))=="number"){c.slice(a.data("avarage_rate")?a.data("avarage_rate"):0).removeClass("star-state-unselected").addClass("star-state-none").end()
}else{c.removeClass("star-state-unselected").addClass("star-state-none").end()
}}}},rate:function(d){a.data("rate",parseInt(d.attr("data-rate")));
if(a.attr("data-href")){$.ajaxHelper(a,null,a,{type:"PUT",url:a.attr("data-href"),data:{rate:d.attr("data-rate")},callback:{success:function(i,e,f,h){var g=$("[data-rating-id="+a.attr("data-rating-id")+"]");
$(g).not(a).filter('[data-rating-type="stars"]').each(function(){$(this).setRating(parseInt(d.attr("data-rate")))
});
$(g).filter('[data-rating-type="avarage"]').text(i.AvarageRate+"/5");
$(g).filter('[data-rating-type="count"]').text(i.RateCount);
a.attr("data-rate",d.attr("data-rate"))
}}});
b.drain();
b.reset()
}}};
b.reset()
})
},setRating:function(a){return this.trigger("setRating",a)
}});
jQuery.fn.ajaxForm=function(c){var a=jQuery(this);
var b={ajax_type:null,container:null,data:null,url:null};
if(c){jQuery.extend(b,c)
}a.submit(function(d){d.preventDefault();
if(a.valid()){b.container?b.container.block({message:'<span class="ui-font-tiny">Proszę czekać...</span>'}):a.block({message:'<span class="ui-font-tiny">Proszę czekać...</span>'});
ajax=$.ajax({type:b.ajax_type||"PUT",url:b.url||a.attr("data-href")||a.attr("action"),data:b.data||a.serialize(),success:function(f,h){if($.isJson(f)){var g=window["eval"]("("+f+")");
if(g.IsValid==true){if(a.attr("data-callback-success")){var e=window[a.attr("data-callback-success")];
if(typeof e=="function"){e.call(this,g.Object)
}else{alert("Function "+a.attr("data-callback-success")+" does not exist")
}}}else{alert(g.ResponseTranslation)
}}else{if($("head",f).length>0){alert("Przyszła strona w odpowiedzi!")
}else{alert("Przyszedł czysty html w odpowiedzi")
}alert("Wystąpił nieoczekiwany błąd. Skontaktuj się z twórcami strony.")
}},error:function(){alert("Wystąpił nieoczekiwany błąd połączenia, spróbuj ponownie za chwilę.")
},complete:function(){a.unblock();
if(a.attr("data-callback-complete")){var e=window[a.attr("data-callback-complete")];
if(typeof e=="function"){e.call(this,responseObj.Object)
}else{alert("Function "+a.attr("data-callback-complete")+" does not exist")
}}}})
}})
};
jQuery.fn.ajaxAddHelper=function(b){$(this).each(function(){var c=$(this);
var d={data:null};
if(b){jQuery.extend(d,b)
}if(!c.attr("data-dialog-href")){alert("Nie podałeś adresu pod którym ma być treść dla okienka dialog!")
}if(enableDebug){c.text(c.text()+" ajax");
if(c.is("a")){c.text(c.text()+" href")
}if(c.css("display")!="none"){c.text(c.text()+" visible")
}}$(c).show().click(function(e){e.preventDefault();
dialogDOM.dialog("open").block().load(c.attr("data-dialog-href"),d.data,function(){a._response(c);
dialogDOM.unblock().show("blind")
})
})
});
var a={_request:function(){},_response:function(c){var d=$("form",dialogDOM);
$(d).submit(function(e){e.preventDefault();
dialogDOM.block().load(c.attr("data-dialog-href"),d.serialize(),function(){a._response(c);
dialogDOM.unblock().show("blind")
})
});
$(".js-ajax-add-helper-add",dialogDOM).each(function(){var f=$(this);
var e=f.closest(".js-item");
f.show();
if(c.attr("data-href")){$.ajaxHelper(c,f,e,{data:{IdObject:e.find('input[name="IdObject"]').val()},type:"PUT",closeWindow:true})
}else{$(f).click(function(g){g.preventDefault();
dialogDOM.dialog("close");
if(c){a._run(c.attr("data-callback-success"),e)
}})
}});
$(".ui-pager-item",dialogDOM).each(function(e){$(this).click(function(f){f.preventDefault();
dialogDOM.block().load($(this).attr("href"),function(){a._response(c);
dialogDOM.unblock().show("blind")
})
})
})
},_run:function(c,e){if(c){if(typeof c=="function"){if(e){c.call(this,e.Object||e||null,null,null,null)
}else{c.call(this,null,null,null,null)
}}else{var d=window[c];
if(typeof d=="function"){if(e){d.call(this,e.Object||e||null,null,null,null)
}else{d.call(this,null,null,null,null)
}}else{a._message("Function "+c+" does not exist")
}}}},_message:function(c,d){if(d==false){dialogDOM.text(c).dialog("option",{buttons:{Ok:function(){$(this).dialog("close")
}}}).dialog("open").show("blind")
}else{dialogErrorDOM.text(c).dialog("option",{buttons:{Ok:function(){$(this).dialog("close")
}}}).dialog("open").show("blind")
}}};
return(this)
};
jQuery.fn.ajaxAdd=function(){var a=jQuery(this);
a.each(function(){if(enableDebug){$(this).text($(this).text()+" ajax");
if($(this).is("a")){$(this).text($(this).text()+" href")
}if($(this).css("display")!="none"){$(this).text($(this).text()+" visible")
}}$(this).fadeIn().click(function(b){b.preventDefault();
dialogDOM.dialog("open").load($(this).attr("href"),function(){dialogDOM.show("blind")
})
})
});
return this
};
jQuery.extend({getUrlVars:function(){var c=[],d;
var b=window.location.href.slice(window.location.href.indexOf("?")+1).split("&");
for(var a=0;
a<b.length;
a++){d=b[a].split("=");
c.push(d[0]);
c[d[0]]=d[1]
}return c
},getUrlVar:function(a){return $.getUrlVars()[a]
}});
jQuery.fn.hoverHide=function(b){var g=jQuery(this);
var d;
var e=g.offset().left;
var f=e+g.outerWidth();
var a=g.outerWidth();
var i={hoverTriggerSelector:"li",hoverContentSelector:"ul",hoverContentCornerSelector:"",addHoverCssClass:"",removeHoverCssClass:""};
if(b){jQuery.extend(i,b)
}var h=$("> "+i.hoverTriggerSelector,g);
var c={_init:function(){h.each(function(){var j=$(this);
var k=$(i.hoverContentSelector,$(this));
k.hide();
c._position(j,k);
$(this).bind("mouseenter",function(){j.removeClass(i.removeHoverCssClass).addClass(i.addHoverCssClass);
c._position(j,k);
k.show()
}).bind("mouseleave",function(){j.addClass(i.removeHoverCssClass).removeClass(i.addHoverCssClass);
k.hide()
})
})
},_position:function(p,o){if(p.css("width")!=="auto"){p.css("width",Math.ceil(p.css("width").replace("px","")))
}var j=p.attr("data-flow")==="right";
var m=$(i.hoverContentCornerSelector,o);
var k=Math.round(o.outerWidth());
var n=Math.round(p.outerWidth());
var q=Math.round(p.offset().left);
var l=q+n;
o.css({position:"absolute",top:$(p).offset().top+$(p).outerHeight(),"min-width":$(p).outerWidth()+20});
if(j===false){o.css("left",q+1)
}else{o.css("left",l-k-1)
}if(j===false){m.css("left",$(p).innerWidth()-2)
}else{m.css("right",$(p).innerWidth()-2-6)
}}};
c._init()
};
