(function(){var l=this,g,z=l.jQuery,p=l.$,o=l.jQuery=l.$=function(F,G){return new o.fn.init(F,G)},E=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;o.fn=o.prototype={init:function(F,I){F=F||document;if(F.nodeType){this[0]=F;this.length=1;this.context=F;return this}if(typeof F==="string"){var H=E.exec(F);if(H&&(H[1]||!I)){if(H[1]){F=o.clean([H[1]],I)}else{var J=document.getElementById(H[3]);if(J&&J.id!=H[3]){return o().find(F)}var G=o(J||[]);G.context=document;G.selector=F;return G}}else{return o(I).find(F)}}else{if(o.isFunction(F)){return o(document).ready(F)}}if(F.selector&&F.context){this.selector=F.selector;this.context=F.context}return this.setArray(o.isArray(F)?F:o.makeArray(F))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(F){return F===g?Array.prototype.slice.call(this):this[F]},pushStack:function(G,I,F){var H=o(G);H.prevObject=this;H.context=this.context;if(I==="find"){H.selector=this.selector+(this.selector?" ":"")+F}else{if(I){H.selector=this.selector+"."+I+"("+F+")"}}return H},setArray:function(F){this.length=0;Array.prototype.push.apply(this,F);return this},each:function(G,F){return o.each(this,G,F)},index:function(F){return o.inArray(F&&F.jquery?F[0]:F,this)},attr:function(G,I,H){var F=G;if(typeof G==="string"){if(I===g){return this[0]&&o[H||"attr"](this[0],G)}else{F={};F[G]=I}}return this.each(function(J){for(G in F){o.attr(H?this.style:this,G,o.prop(this,F[G],H,J,G))}})},css:function(F,G){if((F=="width"||F=="height")&&parseFloat(G)<0){G=g}return this.attr(F,G,"curCSS")},text:function(G){if(typeof G!=="object"&&G!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(G))}var F="";o.each(G||this,function(){o.each(this.childNodes,function(){if(this.nodeType!=8){F+=this.nodeType!=1?this.nodeValue:o.fn.text([this])}})});return F},wrapAll:function(F){if(this[0]){var G=o(F,this[0].ownerDocument).clone();if(this[0].parentNode){G.insertBefore(this[0])}G.map(function(){var H=this;while(H.firstChild){H=H.firstChild}return H}).append(this)}return this},wrapInner:function(F){return this.each(function(){o(this).contents().wrapAll(F)})},wrap:function(F){return this.each(function(){o(this).wrapAll(F)})},append:function(){return this.domManip(arguments,true,function(F){if(this.nodeType==1){this.appendChild(F)}})},prepend:function(){return this.domManip(arguments,true,function(F){if(this.nodeType==1){this.insertBefore(F,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(F){this.parentNode.insertBefore(F,this)})},after:function(){return this.domManip(arguments,false,function(F){this.parentNode.insertBefore(F,this.nextSibling)})},end:function(){return this.prevObject||o([])},push:[].push,sort:[].sort,splice:[].splice,find:function(F){if(this.length===1){var G=this.pushStack([],"find",F);G.length=0;o.find(F,this[0],G);return G}else{return this.pushStack(o.unique(o.map(this,function(H){return o.find(F,H)})),"find",F)}},clone:function(H){var F=this.map(function(){if(!o.support.noCloneEvent&&!o.isXMLDoc(this)){var J=this.outerHTML;if(!J){var K=this.ownerDocument.createElement("div");K.appendChild(this.cloneNode(true));J=K.innerHTML}return o.clean([J.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]}else{return this.cloneNode(true)}});if(H===true){var I=this.find("*").andSelf(),G=0;F.find("*").andSelf().each(function(){if(this.nodeName!==I[G].nodeName){return}var J=o.data(I[G],"events");for(var L in J){for(var K in J[L]){o.event.add(this,L,J[L][K],J[L][K].data)}}G++})}return F},filter:function(F){return this.pushStack(o.isFunction(F)&&o.grep(this,function(H,G){return F.call(H,G)})||o.multiFilter(F,o.grep(this,function(G){return G.nodeType===1})),"filter",F)},closest:function(F){var H=o.expr.match.POS.test(F)?o(F):null,G=0;return this.map(function(){var I=this;while(I&&I.ownerDocument){if(H?H.index(I)>-1:o(I).is(F)){o.data(I,"closest",G);return I}I=I.parentNode;G++}})},not:function(F){if(typeof F==="string"){if(f.test(F)){return this.pushStack(o.multiFilter(F,this,true),"not",F)}else{F=o.multiFilter(F,this)}}var G=F.length&&F[F.length-1]!==g&&!F.nodeType;return this.filter(function(){return G?o.inArray(this,F)<0:this!=F})},add:function(F){return this.pushStack(o.unique(o.merge(this.get(),typeof F==="string"?o(F):o.makeArray(F))))},is:function(F){return !!F&&o.multiFilter(F,this).length>0},hasClass:function(F){return !!F&&this.is("."+F)},val:function(L){if(L===g){var F=this[0];if(F){if(o.nodeName(F,"option")){return(F.attributes.value||{}).specified?F.value:F.text}if(o.nodeName(F,"select")){var J=F.selectedIndex,M=[],N=F.options,I=F.type=="select-one";if(J<0){return null}for(var G=I?J:0,K=I?J+1:N.length;G<K;G++){var H=N[G];if(H.selected){L=o(H).val();if(I){return L}M.push(L)}}return M}return(F.value||"").replace(/\r/g,"")}return g}if(typeof L==="number"){L+=""}return this.each(function(){if(this.nodeType!=1){return}if(o.isArray(L)&&/radio|checkbox/.test(this.type)){this.checked=(o.inArray(this.value,L)>=0||o.inArray(this.name,L)>=0)}else{if(o.nodeName(this,"select")){var O=o.makeArray(L);o("option",this).each(function(){this.selected=(o.inArray(this.value,O)>=0||o.inArray(this.text,O)>=0)});if(!O.length){this.selectedIndex=-1}}else{this.value=L}}})},html:function(F){return F===g?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(F)},replaceWith:function(F){return this.after(F).remove()},eq:function(F){return this.slice(F,+F+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(F){return this.pushStack(o.map(this,function(H,G){return F.call(H,G,H)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(K,N,M){if(this[0]){var J=(this[0].ownerDocument||this[0]).createDocumentFragment(),G=o.clean(K,(this[0].ownerDocument||this[0]),J),I=J.firstChild;if(I){for(var H=0,F=this.length;H<F;H++){M.call(L(this[H],I),this.length>1||H>0?J.cloneNode(true):J)}}if(G){o.each(G,A)}}return this;function L(O,P){return N&&o.nodeName(O,"table")&&o.nodeName(P,"tr")?(O.getElementsByTagName("tbody")[0]||O.appendChild(O.ownerDocument.createElement("tbody"))):O}}};o.fn.init.prototype=o.fn;function A(F,G){if(G.src){o.ajax({url:G.src,async:false,dataType:"script"})}else{o.globalEval(G.text||G.textContent||G.innerHTML||"")}if(G.parentNode){G.parentNode.removeChild(G)}}function e(){return +new Date}o.extend=o.fn.extend=function(){var K=arguments[0]||{},I=1,J=arguments.length,F=false,H;if(typeof K==="boolean"){F=K;K=arguments[1]||{};I=2}if(typeof K!=="object"&&!o.isFunction(K)){K={}}if(J==I){K=this;--I}for(;I<J;I++){if((H=arguments[I])!=null){for(var G in H){var L=K[G],M=H[G];if(K===M){continue}if(F&&M&&typeof M==="object"&&!M.nodeType){K[G]=o.extend(F,L||(M.length!=null?[]:{}),M)}else{if(M!==g){K[G]=M}}}}}return K};var b=/z-?index|font-?weight|opacity|zoom|line-?height/i,q=document.defaultView||{},s=Object.prototype.toString;o.extend({noConflict:function(F){l.$=p;if(F){l.jQuery=z}return o},isFunction:function(F){return s.call(F)==="[object Function]"},isArray:function(F){return s.call(F)==="[object Array]"},isXMLDoc:function(F){return F.nodeType===9&&F.documentElement.nodeName!=="HTML"||!!F.ownerDocument&&o.isXMLDoc(F.ownerDocument)},globalEval:function(H){if(H&&/\S/.test(H)){var G=document.getElementsByTagName("head")[0]||document.documentElement,F=document.createElement("script");F.type="text/javascript";if(o.support.scriptEval){F.appendChild(document.createTextNode(H))}else{F.text=H}G.insertBefore(F,G.firstChild);G.removeChild(F)}},nodeName:function(G,F){return G.nodeName&&G.nodeName.toUpperCase()==F.toUpperCase()},each:function(H,L,G){var F,I=0,J=H.length;if(G){if(J===g){for(F in H){if(L.apply(H[F],G)===false){break}}}else{for(;I<J;){if(L.apply(H[I++],G)===false){break}}}}else{if(J===g){for(F in H){if(L.call(H[F],F,H[F])===false){break}}}else{for(var K=H[0];I<J&&L.call(K,I,K)!==false;K=H[++I]){}}}return H},prop:function(I,J,H,G,F){if(o.isFunction(J)){J=J.call(I,G)}return typeof J==="number"&&H=="curCSS"&&!b.test(F)?J+"px":J},className:{add:function(F,G){o.each((G||"").split(/\s+/),function(H,I){if(F.nodeType==1&&!o.className.has(F.className,I)){F.className+=(F.className?" ":"")+I}})},remove:function(F,G){if(F.nodeType==1){F.className=G!==g?o.grep(F.className.split(/\s+/),function(H){return !o.className.has(G,H)}).join(" "):""}},has:function(G,F){return G&&o.inArray(F,(G.className||G).toString().split(/\s+/))>-1}},swap:function(I,H,J){var F={};for(var G in H){F[G]=I.style[G];I.style[G]=H[G]}J.call(I);for(var G in H){I.style[G]=F[G]}},css:function(I,G,K,F){if(G=="width"||G=="height"){var M,H={position:"absolute",visibility:"hidden",display:"block"},L=G=="width"?["Left","Right"]:["Top","Bottom"];function J(){M=G=="width"?I.offsetWidth:I.offsetHeight;if(F==="border"){return}o.each(L,function(){if(!F){M-=parseFloat(o.curCSS(I,"padding"+this,true))||0}if(F==="margin"){M+=parseFloat(o.curCSS(I,"margin"+this,true))||0}else{M-=parseFloat(o.curCSS(I,"border"+this+"Width",true))||0}})}if(I.offsetWidth!==0){J()}else{o.swap(I,H,J)}return Math.max(0,Math.round(M))}return o.curCSS(I,G,K)},curCSS:function(J,G,H){var M,F=J.style;if(G=="opacity"&&!o.support.opacity){M=o.attr(F,"opacity");return M==""?"1":M}if(G.match(/float/i)){G=x}if(!H&&F&&F[G]){M=F[G]}else{if(q.getComputedStyle){if(G.match(/float/i)){G="float"}G=G.replace(/([A-Z])/g,"-$1").toLowerCase();var N=q.getComputedStyle(J,null);if(N){M=N.getPropertyValue(G)}if(G=="opacity"&&M==""){M="1"}}else{if(J.currentStyle){var K=G.replace(/\-(\w)/g,function(O,P){return P.toUpperCase()});M=J.currentStyle[G]||J.currentStyle[K];if(!/^\d+(px)?$/i.test(M)&&/^\d/.test(M)){var I=F.left,L=J.runtimeStyle.left;J.runtimeStyle.left=J.currentStyle.left;F.left=M||0;M=F.pixelLeft+"px";F.left=I;J.runtimeStyle.left=L}}}}return M},clean:function(G,L,J){L=L||document;if(typeof L.createElement==="undefined"){L=L.ownerDocument||L[0]&&L[0].ownerDocument||document}if(!J&&G.length===1&&typeof G[0]==="string"){var I=/^<(\w+)\s*\/?>$/.exec(G[0]);if(I){return[L.createElement(I[1])]}}var H=[],F=[],M=L.createElement("div");o.each(G,function(Q,T){if(typeof T==="number"){T+=""}if(!T){return}if(typeof T==="string"){T=T.replace(/(<(\w+)[^>]*?)\/>/g,function(V,W,U){return U.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?V:W+"></"+U+">"});var P=T.replace(/^\s+/,"").substring(0,10).toLowerCase();var R=!P.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!P.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||P.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!P.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!P.indexOf("<td")||!P.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!P.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!o.support.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];M.innerHTML=R[1]+T+R[2];while(R[0]--){M=M.lastChild}if(!o.support.tbody){var S=/<tbody/i.test(T),O=!P.indexOf("<table")&&!S?M.firstChild&&M.firstChild.childNodes:R[1]=="<table>"&&!S?M.childNodes:[];for(var N=O.length-1;N>=0;--N){if(o.nodeName(O[N],"tbody")&&!O[N].childNodes.length){O[N].parentNode.removeChild(O[N])}}}if(!o.support.leadingWhitespace&&/^\s/.test(T)){M.insertBefore(L.createTextNode(T.match(/^\s*/)[0]),M.firstChild)}T=o.makeArray(M.childNodes)}if(T.nodeType){H.push(T)}else{H=o.merge(H,T)}});if(J){for(var K=0;H[K];K++){if(o.nodeName(H[K],"script")&&(!H[K].type||H[K].type.toLowerCase()==="text/javascript")){F.push(H[K].parentNode?H[K].parentNode.removeChild(H[K]):H[K])}else{if(H[K].nodeType===1){H.splice.apply(H,[K+1,0].concat(o.makeArray(H[K].getElementsByTagName("script"))))}J.appendChild(H[K])}}return F}return H},attr:function(K,H,L){if(!K||K.nodeType==3||K.nodeType==8){return g}var I=!o.isXMLDoc(K),M=L!==g;H=I&&o.props[H]||H;if(K.tagName){var G=/href|src|style/.test(H);if(H=="selected"&&K.parentNode){K.parentNode.selectedIndex}if(H in K&&I&&!G){if(M){if(H=="type"&&o.nodeName(K,"input")&&K.parentNode){throw"type property can't be changed"}K[H]=L}if(o.nodeName(K,"form")&&K.getAttributeNode(H)){return K.getAttributeNode(H).nodeValue}if(H=="tabIndex"){var J=K.getAttributeNode("tabIndex");return J&&J.specified?J.value:K.nodeName.match(/(button|input|object|select|textarea)/i)?0:K.nodeName.match(/^(a|area)$/i)&&K.href?0:g}return K[H]}if(!o.support.style&&I&&H=="style"){return o.attr(K.style,"cssText",L)}if(M){K.setAttribute(H,""+L)}var F=!o.support.hrefNormalized&&I&&G?K.getAttribute(H,2):K.getAttribute(H);return F===null?g:F}if(!o.support.opacity&&H=="opacity"){if(M){K.zoom=1;K.filter=(K.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(L)+""=="NaN"?"":"alpha(opacity="+L*100+")")}return K.filter&&K.filter.indexOf("opacity=")>=0?(parseFloat(K.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}H=H.replace(/-([a-z])/ig,function(N,O){return O.toUpperCase()});if(M){K[H]=L}return K[H]},trim:function(F){return(F||"").replace(/^\s+|\s+$/g,"")},makeArray:function(H){var F=[];if(H!=null){var G=H.length;if(G==null||typeof H==="string"||o.isFunction(H)||H.setInterval){F[0]=H}else{while(G){F[--G]=H[G]}}}return F},inArray:function(H,I){for(var F=0,G=I.length;F<G;F++){if(I[F]===H){return F}}return -1},merge:function(I,F){var G=0,H,J=I.length;if(!o.support.getAll){while((H=F[G++])!=null){if(H.nodeType!=8){I[J++]=H}}}else{while((H=F[G++])!=null){I[J++]=H}}return I},unique:function(L){var G=[],F={};try{for(var H=0,I=L.length;H<I;H++){var K=o.data(L[H]);if(!F[K]){F[K]=true;G.push(L[H])}}}catch(J){G=L}return G},grep:function(G,K,F){var H=[];for(var I=0,J=G.length;I<J;I++){if(!F!=!K(G[I],I)){H.push(G[I])}}return H},map:function(F,K){var G=[];for(var H=0,I=F.length;H<I;H++){var J=K(F[H],H);if(J!=null){G[G.length]=J}}return G.concat.apply([],G)}});var D=navigator.userAgent.toLowerCase();o.browser={version:(D.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],safari:/webkit/.test(D),opera:/opera/.test(D),msie:/msie/.test(D)&&!/opera/.test(D),mozilla:/mozilla/.test(D)&&!/(compatible|webkit)/.test(D)};o.each({parent:function(F){return F.parentNode},parents:function(F){return o.dir(F,"parentNode")},next:function(F){return o.nth(F,2,"nextSibling")},prev:function(F){return o.nth(F,2,"previousSibling")},nextAll:function(F){return o.dir(F,"nextSibling")},prevAll:function(F){return o.dir(F,"previousSibling")},siblings:function(F){return o.sibling(F.parentNode.firstChild,F)},children:function(F){return o.sibling(F.firstChild)},contents:function(F){return o.nodeName(F,"iframe")?F.contentDocument||F.contentWindow.document:o.makeArray(F.childNodes)}},function(F,G){o.fn[F]=function(H){var I=o.map(this,G);if(H&&typeof H=="string"){I=o.multiFilter(H,I)}return this.pushStack(o.unique(I),F,H)}});o.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(F,G){o.fn[F]=function(H){var K=[],M=o(H);for(var L=0,I=M.length;L<I;L++){var J=(L>0?this.clone(true):this).get();o.fn[G].apply(o(M[L]),J);K=K.concat(J)}return this.pushStack(K,F,H)}});o.each({removeAttr:function(F){o.attr(this,F,"");if(this.nodeType==1){this.removeAttribute(F)}},addClass:function(F){o.className.add(this,F)},removeClass:function(F){o.className.remove(this,F)},toggleClass:function(G,F){if(typeof F!=="boolean"){F=!o.className.has(this,G)}o.className[F?"add":"remove"](this,G)},remove:function(F){if(!F||o.filter(F,[this]).length){o("*",this).add([this]).each(function(){o.event.remove(this);o.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){o(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(F,G){o.fn[F]=function(){return this.each(G,arguments)}});function j(F,G){return F[0]&&parseInt(o.curCSS(F[0],G,true),10)||0}var h="jQuery"+e(),w=0,B={};o.extend({cache:{},data:function(G,F,H){G=G==l?B:G;var I=G[h];if(!I){I=G[h]=++w}if(F&&!o.cache[I]){o.cache[I]={}}if(H!==g){o.cache[I][F]=H}return F?o.cache[I][F]:I},removeData:function(G,F){G=G==l?B:G;var I=G[h];if(F){if(o.cache[I]){delete o.cache[I][F];F="";for(F in o.cache[I]){break}if(!F){o.removeData(G)}}}else{try{delete G[h]}catch(H){if(G.removeAttribute){G.removeAttribute(h)}}delete o.cache[I]}},queue:function(G,F,I){if(G){F=(F||"fx")+"queue";var H=o.data(G,F);if(!H||o.isArray(I)){H=o.data(G,F,o.makeArray(I))}else{if(I){H.push(I)}}}return H},dequeue:function(I,H){var F=o.queue(I,H),G=F.shift();if(!H||H==="fx"){G=F[0]}if(G!==g){G.call(I)}}});o.fn.extend({data:function(F,H){var I=F.split(".");I[1]=I[1]?"."+I[1]:"";if(H===g){var G=this.triggerHandler("getData"+I[1]+"!",[I[0]]);if(G===g&&this.length){G=o.data(this[0],F)}return G===g&&I[1]?this.data(I[0]):G}else{return this.trigger("setData"+I[1]+"!",[I[0],H]).each(function(){o.data(this,F,H)})}},removeData:function(F){return this.each(function(){o.removeData(this,F)})},queue:function(F,G){if(typeof F!=="string"){G=F;F="fx"}if(G===g){return o.queue(this[0],F)}return this.each(function(){var H=o.queue(this,F,G);if(F=="fx"&&H.length==1){H[0].call(this)}})},dequeue:function(F){return this.each(function(){o.dequeue(this,F)})}});(function(){var S=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,M=0,I=Object.prototype.toString;var G=function(Z,V,ac,ad){ac=ac||[];V=V||document;if(V.nodeType!==1&&V.nodeType!==9){return[]}if(!Z||typeof Z!=="string"){return ac}var aa=[],X,ag,aj,U,ae,W,Y=true;S.lastIndex=0;while((X=S.exec(Z))!==null){aa.push(X[1]);if(X[2]){W=RegExp.rightContext;break}}if(aa.length>1&&N.exec(Z)){if(aa.length===2&&J.relative[aa[0]]){ag=K(aa[0]+aa[1],V)}else{ag=J.relative[aa[0]]?[V]:G(aa.shift(),V);while(aa.length){Z=aa.shift();if(J.relative[Z]){Z+=aa.shift()}ag=K(Z,ag)}}}else{var af=ad?{expr:aa.pop(),set:F(ad)}:G.find(aa.pop(),aa.length===1&&V.parentNode?V.parentNode:V,R(V));ag=G.filter(af.expr,af.set);if(aa.length>0){aj=F(ag)}else{Y=false}while(aa.length){var ai=aa.pop(),ah=ai;if(!J.relative[ai]){ai=""}else{ah=aa.pop()}if(ah==null){ah=V}J.relative[ai](aj,ah,R(V))}}if(!aj){aj=ag}if(!aj){throw"Syntax error, unrecognized expression: "+(ai||Z)}if(I.call(aj)==="[object Array]"){if(!Y){ac.push.apply(ac,aj)}else{if(V.nodeType===1){for(var ab=0;aj[ab]!=null;ab++){if(aj[ab]&&(aj[ab]===true||aj[ab].nodeType===1&&L(V,aj[ab]))){ac.push(ag[ab])}}}else{for(var ab=0;aj[ab]!=null;ab++){if(aj[ab]&&aj[ab].nodeType===1){ac.push(ag[ab])}}}}}else{F(aj,ac)}if(W){G(W,V,ac,ad);if(H){hasDuplicate=false;ac.sort(H);if(hasDuplicate){for(var ab=1;ab<ac.length;ab++){if(ac[ab]===ac[ab-1]){ac.splice(ab--,1)}}}}}return ac};G.matches=function(U,V){return G(U,null,null,V)};G.find=function(ab,U,ac){var aa,Y;if(!ab){return[]}for(var X=0,W=J.order.length;X<W;X++){var Z=J.order[X],Y;if((Y=J.match[Z].exec(ab))){var V=RegExp.leftContext;if(V.substr(V.length-1)!=="\\"){Y[1]=(Y[1]||"").replace(/\\/g,"");aa=J.find[Z](Y,U,ac);if(aa!=null){ab=ab.replace(J.match[Z],"");break}}}}if(!aa){aa=U.getElementsByTagName("*")}return{set:aa,expr:ab}};G.filter=function(ae,ad,ah,X){var W=ae,aj=[],ab=ad,Z,U,aa=ad&&ad[0]&&R(ad[0]);while(ae&&ad.length){for(var ac in J.filter){if((Z=J.match[ac].exec(ae))!=null){var V=J.filter[ac],ai,ag;U=false;if(ab==aj){aj=[]}if(J.preFilter[ac]){Z=J.preFilter[ac](Z,ab,ah,aj,X,aa);if(!Z){U=ai=true}else{if(Z===true){continue}}}if(Z){for(var Y=0;(ag=ab[Y])!=null;Y++){if(ag){ai=V(ag,Z,Y,ab);var af=X^!!ai;if(ah&&ai!=null){if(af){U=true}else{ab[Y]=false}}else{if(af){aj.push(ag);U=true}}}}}if(ai!==g){if(!ah){ab=aj}ae=ae.replace(J.match[ac],"");if(!U){return[]}break}}}if(ae==W){if(U==null){throw"Syntax error, unrecognized expression: "+ae}else{break}}W=ae}return ab};var J=G.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(U){return U.getAttribute("href")}},relative:{"+":function(ab,U,aa){var Y=typeof U==="string",ac=Y&&!/\W/.test(U),Z=Y&&!ac;if(ac&&!aa){U=U.toUpperCase()}for(var X=0,W=ab.length,V;X<W;X++){if((V=ab[X])){while((V=V.previousSibling)&&V.nodeType!==1){}ab[X]=Z||V&&V.nodeName===U?V||false:V===U}}if(Z){G.filter(U,ab,true)}},">":function(aa,V,ab){var Y=typeof V==="string";if(Y&&!/\W/.test(V)){V=ab?V:V.toUpperCase();for(var W=0,U=aa.length;W<U;W++){var Z=aa[W];if(Z){var X=Z.parentNode;aa[W]=X.nodeName===V?X:false}}}else{for(var W=0,U=aa.length;W<U;W++){var Z=aa[W];if(Z){aa[W]=Y?Z.parentNode:Z.parentNode===V}}if(Y){G.filter(V,aa,true)}}},"":function(X,V,Z){var W=M++,U=T;if(!V.match(/\W/)){var Y=V=Z?V:V.toUpperCase();U=Q}U("parentNode",V,W,X,Y,Z)},"~":function(X,V,Z){var W=M++,U=T;if(typeof V==="string"&&!V.match(/\W/)){var Y=V=Z?V:V.toUpperCase();U=Q}U("previousSibling",V,W,X,Y,Z)}},find:{ID:function(V,W,X){if(typeof W.getElementById!=="undefined"&&!X){var U=W.getElementById(V[1]);return U?[U]:[]}},NAME:function(W,Z,aa){if(typeof Z.getElementsByName!=="undefined"){var V=[],Y=Z.getElementsByName(W[1]);for(var X=0,U=Y.length;X<U;X++){if(Y[X].getAttribute("name")===W[1]){V.push(Y[X])}}return V.length===0?null:V}},TAG:function(U,V){return V.getElementsByTagName(U[1])}},preFilter:{CLASS:function(X,V,W,U,aa,ab){X=" "+X[1].replace(/\\/g,"")+" ";if(ab){return X}for(var Y=0,Z;(Z=V[Y])!=null;Y++){if(Z){if(aa^(Z.className&&(" "+Z.className+" ").indexOf(X)>=0)){if(!W){U.push(Z)}}else{if(W){V[Y]=false}}}}return false},ID:function(U){return U[1].replace(/\\/g,"")},TAG:function(V,U){for(var W=0;U[W]===false;W++){}return U[W]&&R(U[W])?V[1]:V[1].toUpperCase()},CHILD:function(U){if(U[1]=="nth"){var V=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(U[2]=="even"&&"2n"||U[2]=="odd"&&"2n+1"||!/\D/.test(U[2])&&"0n+"+U[2]||U[2]);U[2]=(V[1]+(V[2]||1))-0;U[3]=V[3]-0}U[0]=M++;return U},ATTR:function(Y,V,W,U,Z,aa){var X=Y[1].replace(/\\/g,"");if(!aa&&J.attrMap[X]){Y[1]=J.attrMap[X]}if(Y[2]==="~="){Y[4]=" "+Y[4]+" "}return Y},PSEUDO:function(Y,V,W,U,Z){if(Y[1]==="not"){if(Y[3].match(S).length>1||/^\w/.test(Y[3])){Y[3]=G(Y[3],null,null,V)}else{var X=G.filter(Y[3],V,W,true^Z);if(!W){U.push.apply(U,X)}return false}}else{if(J.match.POS.test(Y[0])||J.match.CHILD.test(Y[0])){return true}}return Y},POS:function(U){U.unshift(true);return U}},filters:{enabled:function(U){return U.disabled===false&&U.type!=="hidden"},disabled:function(U){return U.disabled===true},checked:function(U){return U.checked===true},selected:function(U){U.parentNode.selectedIndex;return U.selected===true},parent:function(U){return !!U.firstChild},empty:function(U){return !U.firstChild},has:function(W,V,U){return !!G(U[3],W).length},header:function(U){return/h\d/i.test(U.nodeName)},text:function(U){return"text"===U.type},radio:function(U){return"radio"===U.type},checkbox:function(U){return"checkbox"===U.type},file:function(U){return"file"===U.type},password:function(U){return"password"===U.type},submit:function(U){return"submit"===U.type},image:function(U){return"image"===U.type},reset:function(U){return"reset"===U.type},button:function(U){return"button"===U.type||U.nodeName.toUpperCase()==="BUTTON"},input:function(U){return/input|select|textarea|button/i.test(U.nodeName)}},setFilters:{first:function(V,U){return U===0},last:function(W,V,U,X){return V===X.length-1},even:function(V,U){return U%2===0},odd:function(V,U){return U%2===1},lt:function(W,V,U){return V<U[3]-0},gt:function(W,V,U){return V>U[3]-0},nth:function(W,V,U){return U[3]-0==V},eq:function(W,V,U){return U[3]-0==V}},filter:{PSEUDO:function(aa,W,X,ab){var V=W[1],Y=J.filters[V];if(Y){return Y(aa,X,W,ab)}else{if(V==="contains"){return(aa.textContent||aa.innerText||"").indexOf(W[3])>=0}else{if(V==="not"){var Z=W[3];for(var X=0,U=Z.length;X<U;X++){if(Z[X]===aa){return false}}return true}}}},CHILD:function(U,X){var aa=X[1],V=U;switch(aa){case"only":case"first":while(V=V.previousSibling){if(V.nodeType===1){return false}}if(aa=="first"){return true}V=U;case"last":while(V=V.nextSibling){if(V.nodeType===1){return false}}return true;case"nth":var W=X[2],ad=X[3];if(W==1&&ad==0){return true}var Z=X[0],ac=U.parentNode;if(ac&&(ac.sizcache!==Z||!U.nodeIndex)){var Y=0;for(V=ac.firstChild;V;V=V.nextSibling){if(V.nodeType===1){V.nodeIndex=++Y}}ac.sizcache=Z}var ab=U.nodeIndex-ad;if(W==0){return ab==0}else{return(ab%W==0&&ab/W>=0)}}},ID:function(V,U){return V.nodeType===1&&V.getAttribute("id")===U},TAG:function(V,U){return(U==="*"&&V.nodeType===1)||V.nodeName===U},CLASS:function(V,U){return(" "+(V.className||V.getAttribute("class"))+" ").indexOf(U)>-1},ATTR:function(Z,X){var W=X[1],U=J.attrHandle[W]?J.attrHandle[W](Z):Z[W]!=null?Z[W]:Z.getAttribute(W),aa=U+"",Y=X[2],V=X[4];return U==null?Y==="!=":Y==="="?aa===V:Y==="*="?aa.indexOf(V)>=0:Y==="~="?(" "+aa+" ").indexOf(V)>=0:!V?aa&&U!==false:Y==="!="?aa!=V:Y==="^="?aa.indexOf(V)===0:Y==="$="?aa.substr(aa.length-V.length)===V:Y==="|="?aa===V||aa.substr(0,V.length+1)===V+"-":false},POS:function(Y,V,W,Z){var U=V[2],X=J.setFilters[U];if(X){return X(Y,W,V,Z)}}}};var N=J.match.POS;for(var P in J.match){J.match[P]=RegExp(J.match[P].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var F=function(V,U){V=Array.prototype.slice.call(V);if(U){U.push.apply(U,V);return U}return V};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(O){F=function(Y,X){var V=X||[];if(I.call(Y)==="[object Array]"){Array.prototype.push.apply(V,Y)}else{if(typeof Y.length==="number"){for(var W=0,U=Y.length;W<U;W++){V.push(Y[W])}}else{for(var W=0;Y[W];W++){V.push(Y[W])}}}return V}}var H;if(document.documentElement.compareDocumentPosition){H=function(V,U){var W=V.compareDocumentPosition(U)&4?-1:V===U?0:1;if(W===0){hasDuplicate=true}return W}}else{if("sourceIndex" in document.documentElement){H=function(V,U){var W=V.sourceIndex-U.sourceIndex;if(W===0){hasDuplicate=true}return W}}else{if(document.createRange){H=function(X,V){var W=X.ownerDocument.createRange(),U=V.ownerDocument.createRange();W.selectNode(X);W.collapse(true);U.selectNode(V);U.collapse(true);var Y=W.compareBoundaryPoints(Range.START_TO_END,U);if(Y===0){hasDuplicate=true}return Y}}}}(function(){var V=document.createElement("form"),W="script"+(new Date).getTime();V.innerHTML="<input name='"+W+"'/>";var U=document.documentElement;U.insertBefore(V,U.firstChild);if(!!document.getElementById(W)){J.find.ID=function(Y,Z,aa){if(typeof Z.getElementById!=="undefined"&&!aa){var X=Z.getElementById(Y[1]);return X?X.id===Y[1]||typeof X.getAttributeNode!=="undefined"&&X.getAttributeNode("id").nodeValue===Y[1]?[X]:g:[]}};J.filter.ID=function(Z,X){var Y=typeof Z.getAttributeNode!=="undefined"&&Z.getAttributeNode("id");return Z.nodeType===1&&Y&&Y.nodeValue===X}}U.removeChild(V)})();(function(){var U=document.createElement("div");U.appendChild(document.createComment(""));if(U.getElementsByTagName("*").length>0){J.find.TAG=function(V,Z){var Y=Z.getElementsByTagName(V[1]);if(V[1]==="*"){var X=[];for(var W=0;Y[W];W++){if(Y[W].nodeType===1){X.push(Y[W])}}Y=X}return Y}}U.innerHTML="<a href='#'></a>";if(U.firstChild&&typeof U.firstChild.getAttribute!=="undefined"&&U.firstChild.getAttribute("href")!=="#"){J.attrHandle.href=function(V){return V.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var U=G,V=document.createElement("div");V.innerHTML="<p class='TEST'></p>";if(V.querySelectorAll&&V.querySelectorAll(".TEST").length===0){return}G=function(Z,Y,W,X){Y=Y||document;if(!X&&Y.nodeType===9&&!R(Y)){try{return F(Y.querySelectorAll(Z),W)}catch(aa){}}return U(Z,Y,W,X)};G.find=U.find;G.filter=U.filter;G.selectors=U.selectors;G.matches=U.matches})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var U=document.createElement("div");U.innerHTML="<div class='test e'></div><div class='test'></div>";if(U.getElementsByClassName("e").length===0){return}U.lastChild.className="e";if(U.getElementsByClassName("e").length===1){return}J.order.splice(1,0,"CLASS");J.find.CLASS=function(V,W,X){if(typeof W.getElementsByClassName!=="undefined"&&!X){return W.getElementsByClassName(V[1])}}})()}function Q(V,aa,Z,ae,ab,ad){var ac=V=="previousSibling"&&!ad;for(var X=0,W=ae.length;X<W;X++){var U=ae[X];if(U){if(ac&&U.nodeType===1){U.sizcache=Z;U.sizset=X}U=U[V];var Y=false;while(U){if(U.sizcache===Z){Y=ae[U.sizset];break}if(U.nodeType===1&&!ad){U.sizcache=Z;U.sizset=X}if(U.nodeName===aa){Y=U;break}U=U[V]}ae[X]=Y}}}function T(V,aa,Z,ae,ab,ad){var ac=V=="previousSibling"&&!ad;for(var X=0,W=ae.length;X<W;X++){var U=ae[X];if(U){if(ac&&U.nodeType===1){U.sizcache=Z;U.sizset=X}U=U[V];var Y=false;while(U){if(U.sizcache===Z){Y=ae[U.sizset];break}if(U.nodeType===1){if(!ad){U.sizcache=Z;U.sizset=X}if(typeof aa!=="string"){if(U===aa){Y=true;break}}else{if(G.filter(aa,[U]).length>0){Y=U;break}}}U=U[V]}ae[X]=Y}}}var L=document.compareDocumentPosition?function(V,U){return V.compareDocumentPosition(U)&16}:function(V,U){return V!==U&&(V.contains?V.contains(U):true)};var R=function(U){return U.nodeType===9&&U.documentElement.nodeName!=="HTML"||!!U.ownerDocument&&R(U.ownerDocument)};var K=function(U,ab){var X=[],Y="",Z,W=ab.nodeType?[ab]:ab;while((Z=J.match.PSEUDO.exec(U))){Y+=Z[0];U=U.replace(J.match.PSEUDO,"")}U=J.relative[U]?U+"*":U;for(var aa=0,V=W.length;aa<V;aa++){G(U,W[aa],X)}return G.filter(Y,X)};o.find=G;o.filter=G.filter;o.expr=G.selectors;o.expr[":"]=o.expr.filters;G.selectors.filters.hidden=function(U){return U.offsetWidth===0||U.offsetHeight===0};G.selectors.filters.visible=function(U){return U.offsetWidth>0||U.offsetHeight>0};G.selectors.filters.animated=function(U){return o.grep(o.timers,function(V){return U===V.elem}).length};o.multiFilter=function(W,U,V){if(V){W=":not("+W+")"}return G.matches(W,U)};o.dir=function(W,V){var U=[],X=W[V];while(X&&X!=document){if(X.nodeType==1){U.push(X)}X=X[V]}return U};o.nth=function(Y,U,W,X){U=U||1;var V=0;for(;Y;Y=Y[W]){if(Y.nodeType==1&&++V==U){break}}return Y};o.sibling=function(W,V){var U=[];for(;W;W=W.nextSibling){if(W.nodeType==1&&W!=V){U.push(W)}}return U};return;l.Sizzle=G})();o.event={add:function(J,G,I,L){if(J.nodeType==3||J.nodeType==8){return}if(J.setInterval&&J!=l){J=l}if(!I.guid){I.guid=this.guid++}if(L!==g){var H=I;I=this.proxy(H);I.data=L}var F=o.data(J,"events")||o.data(J,"events",{}),K=o.data(J,"handle")||o.data(J,"handle",function(){return typeof o!=="undefined"&&!o.event.triggered?o.event.handle.apply(arguments.callee.elem,arguments):g});K.elem=J;o.each(G.split(/\s+/),function(N,O){var P=O.split(".");O=P.shift();I.type=P.slice().sort().join(".");var M=F[O];if(o.event.specialAll[O]){o.event.specialAll[O].setup.call(J,L,P)}if(!M){M=F[O]={};if(!o.event.special[O]||o.event.special[O].setup.call(J,L,P)===false){if(J.addEventListener){J.addEventListener(O,K,false)}else{if(J.attachEvent){J.attachEvent("on"+O,K)}}}}M[I.guid]=I;o.event.global[O]=true});J=null},guid:1,global:{},remove:function(L,I,K){if(L.nodeType==3||L.nodeType==8){return}var H=o.data(L,"events"),G,F;if(H){if(I===g||(typeof I==="string"&&I.charAt(0)==".")){for(var J in H){this.remove(L,J+(I||""))}}else{if(I.type){K=I.handler;I=I.type}o.each(I.split(/\s+/),function(N,P){var R=P.split(".");P=R.shift();var O=RegExp("(^|\\.)"+R.slice().sort().join(".*\\.")+"(\\.|$)");if(H[P]){if(K){delete H[P][K.guid]}else{for(var Q in H[P]){if(O.test(H[P][Q].type)){delete H[P][Q]}}}if(o.event.specialAll[P]){o.event.specialAll[P].teardown.call(L,R)}for(G in H[P]){break}if(!G){if(!o.event.special[P]||o.event.special[P].teardown.call(L,R)===false){if(L.removeEventListener){L.removeEventListener(P,o.data(L,"handle"),false)}else{if(L.detachEvent){L.detachEvent("on"+P,o.data(L,"handle"))}}}G=null;delete H[P]}}})}for(G in H){break}if(!G){var M=o.data(L,"handle");if(M){M.elem=null}o.removeData(L,"events");o.removeData(L,"handle")}}},trigger:function(J,L,I,F){var H=J.type||J;if(!F){J=typeof J==="object"?J[h]?J:o.extend(o.Event(H),J):o.Event(H);if(H.indexOf("!")>=0){J.type=H=H.slice(0,-1);J.exclusive=true}if(!I){J.stopPropagation();if(this.global[H]){o.each(o.cache,function(){if(this.events&&this.events[H]){o.event.trigger(J,L,this.handle.elem)}})}}if(!I||I.nodeType==3||I.nodeType==8){return g}J.result=g;J.target=I;L=o.makeArray(L);L.unshift(J)}J.currentTarget=I;var K=o.data(I,"handle");if(K){K.apply(I,L)}if((!I[H]||(o.nodeName(I,"a")&&H=="click"))&&I["on"+H]&&I["on"+H].apply(I,L)===false){J.result=false}if(!F&&I[H]&&!J.isDefaultPrevented()&&!(o.nodeName(I,"a")&&H=="click")){this.triggered=true;try{I[H]()}catch(M){}}this.triggered=false;if(!J.isPropagationStopped()){var G=I.parentNode||I.ownerDocument;if(G){o.event.trigger(J,L,G,true)}}},handle:function(L){var K,F;L=arguments[0]=o.event.fix(L||l.event);L.currentTarget=this;var M=L.type.split(".");L.type=M.shift();K=!M.length&&!L.exclusive;var J=RegExp("(^|\\.)"+M.slice().sort().join(".*\\.")+"(\\.|$)");F=(o.data(this,"events")||{})[L.type];for(var H in F){var I=F[H];if(K||J.test(I.type)){L.handler=I;L.data=I.data;var G=I.apply(this,arguments);if(G!==g){L.result=G;if(G===false){L.preventDefault();L.stopPropagation()}}if(L.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[h]){return I}var G=I;I=o.Event(G);for(var H=this.props.length,K;H;){K=this.props[--H];I[K]=G[K]}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,F=document.body;I.pageX=I.clientX+(J&&J.scrollLeft||F&&F.scrollLeft||0)-(J.clientLeft||0);I.pageY=I.clientY+(J&&J.scrollTop||F&&F.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(G,F){F=F||function(){return G.apply(this,arguments)};F.guid=G.guid=G.guid||F.guid||this.guid++;return F},special:{ready:{setup:C,teardown:function(){}}},specialAll:{live:{setup:function(F,G){o.event.add(this,G[0],c)},teardown:function(H){if(H.length){var F=0,G=RegExp("(^|\\.)"+H[0]+"(\\.|$)");o.each((o.data(this,"events").live||{}),function(){if(G.test(this.type)){F++}});if(F<1){o.event.remove(this,H[0],c)}}}}}};o.Event=function(F){if(!this.preventDefault){return new o.Event(F)}if(F&&F.type){this.originalEvent=F;this.type=F.type}else{this.type=F}this.timeStamp=e();this[h]=true};function k(){return false}function v(){return true}o.Event.prototype={preventDefault:function(){this.isDefaultPrevented=v;var F=this.originalEvent;if(!F){return}if(F.preventDefault){F.preventDefault()}F.returnValue=false},stopPropagation:function(){this.isPropagationStopped=v;var F=this.originalEvent;if(!F){return}if(F.stopPropagation){F.stopPropagation()}F.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=v;this.stopPropagation()},isDefaultPrevented:k,isPropagationStopped:k,isImmediatePropagationStopped:k};var a=function(G){var F=G.relatedTarget;while(F&&F!=this){try{F=F.parentNode}catch(H){F=this}}if(F!=this){G.type=G.data;o.event.handle.apply(this,arguments)}};o.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(G,F){o.event.special[F]={setup:function(){o.event.add(this,G,a,F)},teardown:function(){o.event.remove(this,G,a)}}});o.fn.extend({bind:function(G,H,F){return G=="unload"?this.one(G,H,F):this.each(function(){o.event.add(this,G,F||H,F&&H)})},one:function(H,I,G){var F=o.event.proxy(G||I,function(J){o(this).unbind(J,F);return(G||I).apply(this,arguments)});return this.each(function(){o.event.add(this,H,F,G&&I)})},unbind:function(G,F){return this.each(function(){o.event.remove(this,G,F)})},trigger:function(F,G){return this.each(function(){o.event.trigger(F,G,this)})},triggerHandler:function(F,H){if(this[0]){var G=o.Event(F);G.preventDefault();G.stopPropagation();o.event.trigger(G,H,this[0]);return G.result}},toggle:function(H){var F=arguments,G=1;while(G<F.length){o.event.proxy(H,F[G++])}return this.click(o.event.proxy(H,function(I){this.lastToggle=(this.lastToggle||0)%G;I.preventDefault();return F[this.lastToggle++].apply(this,arguments)||false}))},hover:function(F,G){return this.mouseenter(F).mouseleave(G)},ready:function(F){C();if(o.isReady){F.call(document,o)}else{o.readyList.push(F)}return this},live:function(H,G){var F=o.event.proxy(G);F.guid+=this.selector+H;o(document).bind(i(H,this.selector),this.selector,F);return this},die:function(G,F){o(document).unbind(i(G,this.selector),F?{guid:F.guid+this.selector+G}:null);return this}});function c(I){var F=RegExp("(^|\\.)"+I.type+"(\\.|$)"),H=true,G=[];o.each(o.data(this,"events").live||[],function(J,K){if(F.test(K.type)){var L=o(I.target).closest(K.data)[0];if(L){G.push({elem:L,fn:K})}}});G.sort(function(K,J){return o.data(K.elem,"closest")-o.data(J.elem,"closest")});o.each(G,function(){if(this.fn.call(this.elem,I,this.fn.data)===false){return(H=false)}});return H}function i(G,F){return["live",G,F.replace(/\./g,"`").replace(/ /g,"|")].join(".")}o.extend({isReady:false,readyList:[],ready:function(){if(!o.isReady){o.isReady=true;if(o.readyList){o.each(o.readyList,function(){this.call(document,o)});o.readyList=null}o(document).triggerHandler("ready")}}});var y=false;function C(){if(y){return}y=true;if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false);o.ready()},false)}else{if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);o.ready()}});if(document.documentElement.doScroll&&l==l.top){(function(){if(o.isReady){return}try{document.documentElement.doScroll("left")}catch(F){setTimeout(arguments.callee,0);return}o.ready()})()}}}o.event.add(l,"load",o.ready)}o.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(G,F){o.fn[F]=function(H){return H?this.bind(F,H):this.trigger(F)}});o(l).bind("unload",function(){for(var F in o.cache){if(F!=1&&o.cache[F].handle){o.event.remove(o.cache[F].handle.elem)}}});(function(){o.support={};var G=document.documentElement,H=document.createElement("script"),L=document.createElement("div"),K="script"+(new Date).getTime();L.style.display="none";L.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 I=L.getElementsByTagName("*"),F=L.getElementsByTagName("a")[0];if(!I||!I.length||!F){return}o.support={leadingWhitespace:L.firstChild.nodeType==3,tbody:!L.getElementsByTagName("tbody").length,objectAll:!!L.getElementsByTagName("object")[0].getElementsByTagName("*").length,htmlSerialize:!!L.getElementsByTagName("link").length,style:/red/.test(F.getAttribute("style")),hrefNormalized:F.getAttribute("href")==="/a",opacity:F.style.opacity==="0.5",cssFloat:!!F.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};H.type="text/javascript";try{H.appendChild(document.createTextNode("window."+K+"=1;"))}catch(J){}G.insertBefore(H,G.firstChild);if(l[K]){o.support.scriptEval=true;delete l[K]}G.removeChild(H);if(L.attachEvent&&L.fireEvent){L.attachEvent("onclick",function(){o.support.noCloneEvent=false;L.detachEvent("onclick",arguments.callee)});L.cloneNode(true).fireEvent("onclick")}o(function(){var M=document.createElement("div");M.style.width=M.style.paddingLeft="1px";document.body.appendChild(M);o.boxModel=o.support.boxModel=M.offsetWidth===2;document.body.removeChild(M).style.display="none"})})();var x=o.support.cssFloat?"cssFloat":"styleFloat";o.props={"for":"htmlFor","class":"className","float":x,cssFloat:x,styleFloat:x,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",tabindex:"tabIndex"};o.fn.extend({_load:o.fn.load,load:function(H,K,L){if(typeof H!=="string"){return this._load(H)}var J=H.indexOf(" ");if(J>=0){var F=H.slice(J,H.length);H=H.slice(0,J)}var I="GET";if(K){if(o.isFunction(K)){L=K;K=null}else{if(typeof K==="object"){K=o.param(K);I="POST"}}}var G=this;o.ajax({url:H,type:I,dataType:"html",data:K,complete:function(N,M){if(M=="success"||M=="notmodified"){G.html(F?o("<div/>").append(N.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(F):N.responseText)}if(L){G.each(L,[N.responseText,M,N])}}});return this},serialize:function(){return o.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?o.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|search/i.test(this.type))}).map(function(F,G){var H=o(this).val();return H==null?null:o.isArray(H)?o.map(H,function(J,I){return{name:G.name,value:J}}):{name:G.name,value:H}}).get()}});o.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(F,G){o.fn[G]=function(H){return this.bind(G,H)}});var r=e();o.extend({get:function(F,H,I,G){if(o.isFunction(H)){I=H;H=null}return o.ajax({type:"GET",url:F,data:H,success:I,dataType:G})},getScript:function(F,G){return o.get(F,null,G,"script")},getJSON:function(F,G,H){return o.get(F,G,H,"json")},post:function(F,H,I,G){if(o.isFunction(H)){I=H;H={}}return o.ajax({type:"POST",url:F,data:H,success:I,dataType:G})},ajaxSetup:function(F){o.extend(o.ajaxSettings,F)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return l.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(N){N=o.extend(true,N,o.extend(true,{},o.ajaxSettings,N));var X,G=/=\?(&|$)/g,S,W,H=N.type.toUpperCase();if(N.data&&N.processData&&typeof N.data!=="string"){N.data=o.param(N.data)}if(N.dataType=="jsonp"){if(H=="GET"){if(!N.url.match(G)){N.url+=(N.url.match(/\?/)?"&":"?")+(N.jsonp||"callback")+"=?"}}else{if(!N.data||!N.data.match(G)){N.data=(N.data?N.data+"&":"")+(N.jsonp||"callback")+"=?"}}N.dataType="json"}if(N.dataType=="json"&&(N.data&&N.data.match(G)||N.url.match(G))){X="jsonp"+r++;if(N.data){N.data=(N.data+"").replace(G,"="+X+"$1")}N.url=N.url.replace(G,"="+X+"$1");N.dataType="script";l[X]=function(Y){W=Y;J();M();l[X]=g;try{delete l[X]}catch(Z){}if(I){I.removeChild(U)}}}if(N.dataType=="script"&&N.cache==null){N.cache=false}if(N.cache===false&&H=="GET"){var F=e();var V=N.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+F+"$2");N.url=V+((V==N.url)?(N.url.match(/\?/)?"&":"?")+"_="+F:"")}if(N.data&&H=="GET"){N.url+=(N.url.match(/\?/)?"&":"?")+N.data;N.data=null}if(N.global&&!o.active++){o.event.trigger("ajaxStart")}var R=/^(\w+:)?\/\/([^\/?#]+)/.exec(N.url);if(N.dataType=="script"&&H=="GET"&&R&&(R[1]&&R[1]!=location.protocol||R[2]!=location.host)){var I=document.getElementsByTagName("head")[0];var U=document.createElement("script");U.src=N.url;if(N.scriptCharset){U.charset=N.scriptCharset}if(!X){var P=false;U.onload=U.onreadystatechange=function(){if(!P&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){P=true;J();M();U.onload=U.onreadystatechange=null;I.removeChild(U)}}}I.appendChild(U);return g}var L=false;var K=N.xhr();if(N.username){K.open(H,N.url,N.async,N.username,N.password)}else{K.open(H,N.url,N.async)}try{if(N.data){K.setRequestHeader("Content-Type",N.contentType)}if(N.ifModified){K.setRequestHeader("If-Modified-Since",o.lastModified[N.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}K.setRequestHeader("X-Requested-With","XMLHttpRequest");K.setRequestHeader("Accept",N.dataType&&N.accepts[N.dataType]?N.accepts[N.dataType]+", */*":N.accepts._default)}catch(T){}if(N.beforeSend&&N.beforeSend(K,N)===false){if(N.global&&!--o.active){o.event.trigger("ajaxStop")}K.abort();return false}if(N.global){o.event.trigger("ajaxSend",[K,N])}var O=function(Y){if(K.readyState==0){if(Q){clearInterval(Q);Q=null;if(N.global&&!--o.active){o.event.trigger("ajaxStop")}}}else{if(!L&&K&&(K.readyState==4||Y=="timeout")){L=true;if(Q){clearInterval(Q);Q=null}S=Y=="timeout"?"timeout":!o.httpSuccess(K)?"error":N.ifModified&&o.httpNotModified(K,N.url)?"notmodified":"success";if(S=="success"){try{W=o.httpData(K,N.dataType,N)}catch(aa){S="parsererror"}}if(S=="success"){var Z;try{Z=K.getResponseHeader("Last-Modified")}catch(aa){}if(N.ifModified&&Z){o.lastModified[N.url]=Z}if(!X){J()}}else{o.handleError(N,K,S)}M();if(Y){K.abort()}if(N.async){K=null}}}};if(N.async){var Q=setInterval(O,13);if(N.timeout>0){setTimeout(function(){if(K&&!L){O("timeout")}},N.timeout)}}try{K.send(N.data)}catch(T){o.handleError(N,K,null,T)}if(!N.async){O()}function J(){if(N.success){N.success(W,S)}if(N.global){o.event.trigger("ajaxSuccess",[K,N])}}function M(){if(N.complete){N.complete(K,S)}if(N.global){o.event.trigger("ajaxComplete",[K,N])}if(N.global&&!--o.active){o.event.trigger("ajaxStop")}}return K},handleError:function(G,I,F,H){if(G.error){G.error(I,F,H)}if(G.global){o.event.trigger("ajaxError",[I,G,H])}},active:0,httpSuccess:function(G){try{return !G.status&&location.protocol=="file:"||(G.status>=200&&G.status<300)||G.status==304||G.status==1223}catch(F){}return false},httpNotModified:function(H,F){try{var I=H.getResponseHeader("Last-Modified");return H.status==304||I==o.lastModified[F]}catch(G){}return false},httpData:function(K,I,H){var G=K.getResponseHeader("content-type"),F=I=="xml"||!I&&G&&G.indexOf("xml")>=0,J=F?K.responseXML:K.responseText;if(F&&J.documentElement.tagName=="parsererror"){throw"parsererror"}if(H&&H.dataFilter){J=H.dataFilter(J,I)}if(typeof J==="string"){if(I=="script"){o.globalEval(J)}if(I=="json"){J=l["eval"]("("+J+")")}}return J},param:function(F){var H=[];function I(J,K){H[H.length]=encodeURIComponent(J)+"="+encodeURIComponent(K)}if(o.isArray(F)||F.jquery){o.each(F,function(){I(this.name,this.value)})}else{for(var G in F){if(o.isArray(F[G])){o.each(F[G],function(){I(G,this)})}else{I(G,o.isFunction(F[G])?F[G]():F[G])}}}return H.join("&").replace(/%20/g,"+")}});var m={},n,d=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function u(G,F){var H={};o.each(d.concat.apply([],d.slice(0,F)),function(){H[this]=G});return H}o.fn.extend({show:function(K,M){if(K){return this.animate(u("show",3),K,M)}else{for(var I=0,G=this.length;I<G;I++){var F=o.data(this[I],"olddisplay");this[I].style.display=F||"";if(o.css(this[I],"display")==="none"){var H=this[I].tagName,L;if(m[H]){L=m[H]}else{var J=o("<"+H+" />").appendTo("body");L=J.css("display");if(L==="none"){L="block"}J.remove();m[H]=L}o.data(this[I],"olddisplay",L)}}for(var I=0,G=this.length;I<G;I++){this[I].style.display=o.data(this[I],"olddisplay")||""}return this}},hide:function(I,J){if(I){return this.animate(u("hide",3),I,J)}else{for(var H=0,G=this.length;H<G;H++){var F=o.data(this[H],"olddisplay");if(!F&&F!=="none"){o.data(this[H],"olddisplay",o.css(this[H],"display"))}}for(var H=0,G=this.length;H<G;H++){this[H].style.display="none"}return this}},_toggle:o.fn.toggle,toggle:function(H,G){var F=typeof H==="boolean";return o.isFunction(H)&&o.isFunction(G)?this._toggle.apply(this,arguments):H==null||F?this.each(function(){var I=F?H:o(this).is(":hidden");o(this)[I?"show":"hide"]()}):this.animate(u("toggle",3),H,G)},fadeTo:function(F,H,G){return this.animate({opacity:H},F,G)},animate:function(J,G,I,H){var F=o.speed(G,I,H);return this[F.queue===false?"each":"queue"](function(){var L=o.extend({},F),N,M=this.nodeType==1&&o(this).is(":hidden"),K=this;for(N in J){if(J[N]=="hide"&&M||J[N]=="show"&&!M){return L.complete.call(this)}if((N=="height"||N=="width")&&this.style){L.display=o.css(this,"display");L.overflow=this.style.overflow}}if(L.overflow!=null){this.style.overflow="hidden"}L.curAnim=o.extend({},J);o.each(J,function(P,T){var S=new o.fx(K,L,P);if(/toggle|show|hide/.test(T)){S[T=="toggle"?M?"show":"hide":T](J)}else{var R=T.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),U=S.cur(true)||0;if(R){var O=parseFloat(R[2]),Q=R[3]||"px";if(Q!="px"){K.style[P]=(O||1)+Q;U=((O||1)/S.cur(true))*U;K.style[P]=U+Q}if(R[1]){O=((R[1]=="-="?-1:1)*O)+U}S.custom(U,O,Q)}else{S.custom(U,T,"")}}});return true})},stop:function(G,F){var H=o.timers;if(G){this.queue([])}this.each(function(){for(var I=H.length-1;I>=0;I--){if(H[I].elem==this){if(F){H[I](true)}H.splice(I,1)}}});if(!F){this.dequeue()}return this}});o.each({slideDown:u("show",1),slideUp:u("hide",1),slideToggle:u("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(F,G){o.fn[F]=function(H,I){return this.animate(G,H,I)}});o.extend({speed:function(H,I,G){var F=typeof H==="object"?H:{complete:G||!G&&I||o.isFunction(H)&&H,duration:H,easing:G&&I||I&&!o.isFunction(I)&&I};F.duration=o.fx.off?0:typeof F.duration==="number"?F.duration:o.fx.speeds[F.duration]||o.fx.speeds._default;F.old=F.complete;F.complete=function(){if(F.queue!==false){o(this).dequeue()}if(o.isFunction(F.old)){F.old.call(this)}};return F},easing:{linear:function(H,I,F,G){return F+G*H},swing:function(H,I,F,G){return((-Math.cos(H*Math.PI)/2)+0.5)*G+F}},timers:[],fx:function(G,F,H){this.options=F;this.elem=G;this.prop=H;if(!F.orig){F.orig={}}}});o.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(o.fx.step[this.prop]||o.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(G){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var F=parseFloat(o.css(this.elem,this.prop,G));return F&&F>-10000?F:parseFloat(o.curCSS(this.elem,this.prop))||0},custom:function(J,I,H){this.startTime=e();this.start=J;this.end=I;this.unit=H||this.unit||"px";this.now=this.start;this.pos=this.state=0;var F=this;function G(K){return F.step(K)}G.elem=this.elem;if(G()&&o.timers.push(G)&&!n){n=setInterval(function(){var L=o.timers;for(var K=0;K<L.length;K++){if(!L[K]()){L.splice(K--,1)}}if(!L.length){clearInterval(n);n=g}},13)}},show:function(){this.options.orig[this.prop]=o.attr(this.elem.style,this.prop);this.options.show=true;this.custom(this.prop=="width"||this.prop=="height"?1:0,this.cur());o(this.elem).show()},hide:function(){this.options.orig[this.prop]=o.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(I){var H=e();if(I||H>=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 G in this.options.curAnim){if(this.options.curAnim[G]!==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(o.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){o(this.elem).hide()}if(this.options.hide||this.options.show){for(var J in this.options.curAnim){o.attr(this.elem.style,J,this.options.orig[J])}}this.options.complete.call(this.elem)}return false}else{var K=H-this.startTime;this.state=K/this.options.duration;this.pos=o.easing[this.options.easing||(o.easing.swing?"swing":"linear")](this.state,K,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};o.extend(o.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(F){o.attr(F.elem.style,"opacity",F.now)},_default:function(F){if(F.elem.style&&F.elem.style[F.prop]!=null){F.elem.style[F.prop]=F.now+F.unit}else{F.elem[F.prop]=F.now}}}});if(document.documentElement.getBoundingClientRect){o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}var H=this[0].getBoundingClientRect(),K=this[0].ownerDocument,G=K.body,F=K.documentElement,M=F.clientTop||G.clientTop||0,L=F.clientLeft||G.clientLeft||0,J=H.top+(self.pageYOffset||o.boxModel&&F.scrollTop||G.scrollTop)-M,I=H.left+(self.pageXOffset||o.boxModel&&F.scrollLeft||G.scrollLeft)-L;return{top:J,left:I}}}else{o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}o.offset.initialized||o.offset.initialize();var K=this[0],H=K.offsetParent,G=K,P=K.ownerDocument,N,I=P.documentElement,L=P.body,M=P.defaultView,F=M.getComputedStyle(K,null),O=K.offsetTop,J=K.offsetLeft;while((K=K.parentNode)&&K!==L&&K!==I){N=M.getComputedStyle(K,null);O-=K.scrollTop,J-=K.scrollLeft;if(K===H){O+=K.offsetTop,J+=K.offsetLeft;if(o.offset.doesNotAddBorder&&!(o.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(K.tagName))){O+=parseInt(N.borderTopWidth,10)||0,J+=parseInt(N.borderLeftWidth,10)||0}G=H,H=K.offsetParent}if(o.offset.subtractsBorderForOverflowNotVisible&&N.overflow!=="visible"){O+=parseInt(N.borderTopWidth,10)||0,J+=parseInt(N.borderLeftWidth,10)||0}F=N}if(F.position==="relative"||F.position==="static"){O+=L.offsetTop,J+=L.offsetLeft}if(F.position==="fixed"){O+=Math.max(I.scrollTop,L.scrollTop),J+=Math.max(I.scrollLeft,L.scrollLeft)}return{top:O,left:J}}}o.offset={initialize:function(){if(this.initialized){return}var M=document.body,G=document.createElement("div"),I,H,O,J,N,F,K=M.style.marginTop,L='<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>';N={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(F in N){G.style[F]=N[F]}G.innerHTML=L;M.insertBefore(G,M.firstChild);I=G.firstChild,H=I.firstChild,J=I.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(H.offsetTop!==5);this.doesAddBorderForTableAndCells=(J.offsetTop===5);I.style.overflow="hidden",I.style.position="relative";this.subtractsBorderForOverflowNotVisible=(H.offsetTop===-5);M.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(M.offsetTop===0);M.style.marginTop=K;M.removeChild(G);this.initialized=true},bodyOffset:function(F){o.offset.initialized||o.offset.initialize();var H=F.offsetTop,G=F.offsetLeft;if(o.offset.doesNotIncludeMarginInBodyOffset){H+=parseInt(o.curCSS(F,"marginTop",true),10)||0,G+=parseInt(o.curCSS(F,"marginLeft",true),10)||0}return{top:H,left:G}}};o.fn.extend({position:function(){var J=0,I=0,G;if(this[0]){var H=this.offsetParent(),K=this.offset(),F=/^body|html$/i.test(H[0].tagName)?{top:0,left:0}:H.offset();K.top-=j(this,"marginTop");K.left-=j(this,"marginLeft");F.top+=j(H,"borderTopWidth");F.left+=j(H,"borderLeftWidth");G={top:K.top-F.top,left:K.left-F.left}}return G},offsetParent:function(){var F=this[0].offsetParent||document.body;while(F&&(!/^body|html$/i.test(F.tagName)&&o.css(F,"position")=="static")){F=F.offsetParent}return o(F)}});o.each(["Left","Top"],function(G,F){var H="scroll"+F;o.fn[H]=function(I){if(!this[0]){return null}return I!==g?this.each(function(){this==l||this==document?l.scrollTo(!G?I:o(l).scrollLeft(),G?I:o(l).scrollTop()):this[H]=I}):this[0]==l||this[0]==document?self[G?"pageYOffset":"pageXOffset"]||o.boxModel&&document.documentElement[H]||document.body[H]:this[0][H]}});o.each(["Height","Width"],function(J,H){var F=J?"Left":"Top",I=J?"Right":"Bottom",G=H.toLowerCase();o.fn["inner"+H]=function(){return this[0]?o.css(this[0],G,false,"padding"):null};o.fn["outer"+H]=function(L){return this[0]?o.css(this[0],G,false,L?"margin":"border"):null};var K=H.toLowerCase();o.fn[K]=function(L){return this[0]==l?document.compatMode=="CSS1Compat"&&document.documentElement["client"+H]||document.body["client"+H]:this[0]==document?Math.max(document.documentElement["client"+H],document.body["scroll"+H],document.documentElement["scroll"+H],document.body["offset"+H],document.documentElement["offset"+H]):L===g?(this.length?o.css(this[0],K):null):this.css(K,typeof L==="string"?L:L+"px")}})})();(function(b){var c=function(e,d){if(/\/$/.test(e)||/^\//.test(d)){return e+d}else{return e+"/"+d}};var a=function(e){var d=/^(https?|mailto):\/*(.*?)$/i.exec(e);if(d===null){e=c("internal",e)}else{if(/https?/i.test(d[1])){e=c("external",d[2])}else{if(/mailto/i.test(d[1])){e=c("mailto",d[2])}}}return c("click",e)};b.fn.trackClicks=function(){this.find("a").andSelf().filter("a").click(function(){pageTracker._trackPageview(c(window.location.pathname,a(b(this).attr("href"))));return true});return this};b.fn.trackDownloads=function(){this.find("a").andSelf().filter("a").click(function(){pageTracker._trackPageview(c("click/download",b(this).attr("href").replace(/^.*?([^\/]*)$/,"$1")));return true});return this}})(jQuery);(function(b){b.dimensions={version:"1.2"};b.each(["Height","Width"],function(d,c){b.fn["inner"+c]=function(){if(!this[0]){return}var f=c=="Height"?"Top":"Left",e=c=="Height"?"Bottom":"Right";return this.is(":visible")?this[0]["client"+c]:a(this,c.toLowerCase())+a(this,"padding"+f)+a(this,"padding"+e)};b.fn["outer"+c]=function(f){if(!this[0]){return}var h=c=="Height"?"Top":"Left",e=c=="Height"?"Bottom":"Right";f=b.extend({margin:false},f||{});var g=this.is(":visible")?this[0]["offset"+c]:a(this,c.toLowerCase())+a(this,"border"+h+"Width")+a(this,"border"+e+"Width")+a(this,"padding"+h)+a(this,"padding"+e);return g+(f.margin?(a(this,"margin"+h)+a(this,"margin"+e)):0)}});b.each(["Left","Top"],function(d,c){b.fn["scroll"+c]=function(e){if(!this[0]){return}return e!=undefined?this.each(function(){this==window||this==document?window.scrollTo(c=="Left"?e:b(window)["scrollLeft"](),c=="Top"?e:b(window)["scrollTop"]()):this["scroll"+c]=e}):this[0]==window||this[0]==document?self[(c=="Left"?"pageXOffset":"pageYOffset")]||b.boxModel&&document.documentElement["scroll"+c]||document.body["scroll"+c]:this[0]["scroll"+c]}});b.fn.extend({position:function(){var h=0,g=0,f=this[0],i,c,e,d;if(f){e=this.offsetParent();i=this.offset();c=e.offset();i.top-=a(f,"marginTop");i.left-=a(f,"marginLeft");c.top+=a(e,"borderTopWidth");c.left+=a(e,"borderLeftWidth");d={top:i.top-c.top,left:i.left-c.left}}return d},offsetParent:function(){var c=this[0].offsetParent;while(c&&(!/^body|html$/i.test(c.tagName)&&b.css(c,"position")=="static")){c=c.offsetParent}return b(c)}});function a(c,d){return parseInt(b.curCSS(c.jquery?c[0]:c,d,true))||0}})(jQuery);jQuery.fn.reveal_table_rows=function(a){a=parseInt(a,10);this.find("tr:gt("+a+")").hide();this.find("tr:lt("+(a+1)+")").show();return this};jQuery.fn.keepNumberOfVisibleRowsSyncedWithSelect=function(a){var c=this;var b=function(){c.reveal_table_rows($(a).val())};b();$(a).change(b);return this};jQuery.fn.recalculate_list_positions=function(){this.children("li").each(function(a){jQuery(this).find('input[name$="[position]"]').val(a+1)});return this};jQuery.fn.makeSortable=function(){this.each(function(){var a=jQuery(this);if(a.find("li").length>1){a.addClass("active_sortable");var b=a.find('link[rel="collection"]').attr("href");a.sortable({items:"> li",axis:"y",opacity:0.8,start:function(d,c){jQuery(c.helper).css("list-style","none").addClass("sortable_selected")},update:function(d,c){jQuery.ajax({type:"PUT",url:[b,"order"].join("/"),data:jQuery(this).sortable("serialize")})}})}});return this};jQuery.fn.conditional=function(e,d){if(typeof(d)=="undefined"){d={}}var b=d.show||function(g){if(g){this.slideDown("fast")}else{this.show()}};var c=d.hide||function(g){if(g){this.slideUp("fast")}else{this.hide()}};var f=function(g){return function(){var j=e[jQuery(this).val()];var h=function(){if(j&&(j.index(this)!=-1)){b.apply(jQuery(this),[g])}else{c.apply(jQuery(this),[g])}};for(var i in e){if(e.hasOwnProperty(i)){e[i].each(h)}}}};var a=this;if(a.is(":radio")){a=a.filter(":radio:checked:first")}f(false).call(a);this.change(f(true));this.click(f(false));return this};(function(){var b=function(d){d.find("option:hidden").show().removeAttr("disabled").end().filter("[value]").each(function(){d.find('option:not(:selected)[value="'+jQuery(this).val()+'"]').hide().attr("disabled","disabled")})};var a=function(h,g,e){var f=h.filter(":visible");var i=f.filter(":last").is(":not([value])");var d=(typeof(g)=="undefined")||(f.length<g);if(!i&&d){if(typeof(e)=="undefined"){e=function(){this.show()}}e.call(h.filter(":hidden:first").parent())}};var c=function(f,e){var d=function(h){var j=f.filter(":visible");var g=h.is(":not([value])");var k=h.get(0)==j.filter(":last").get(0);var i=(typeof(e)!="undefined")&&(j.length>e);if(g&&(!k||i)){f=f.not(h).add(h.parent().clone(true).insertAfter(f.filter(":last").parent()).hide().children("select").val(null));h.parent().slideUp("fast",function(){jQuery(this).remove()})}};return function(){b(f);d(jQuery(this));a(f,e,function(){this.slideDown("fast")})}};jQuery.fn.exclusive=function(d){b(this);this.change(c(this,d)).filter(":not([value])").parent().hide();a(this,d);return this}})();jQuery.fn.collapsible=function(){this.children(":first-child").siblings().hide().end().click(function(){jQuery(this).parent().toggleClass("active").end().siblings().toggle()});return this};jQuery.fn.connect_counter_to_textarea=function(){this.each(function(){var a=parseInt(jQuery(this).children(".counter:first").text());jQuery(this).parent().children("textarea").TextCounter(a,{counterDisplayClass:"counter",addLineBreak:false})})};jQuery.fn.convert_submit_button_to_link=function(){this.each(function(){var a=jQuery(this);a.hide().after(jQuery('<a href="#">'+a.attr("value")+"</a>").attr("class",a.attr("class")).click(a.attr("onclick")))});return this};jQuery.fn.submitWithAjax=function(){$.post($(this).attr("action")+".js",$(this).serializeArray(),null,"script");return false};jQuery.fn.keepVisibilitySyncedWithCheckbox=function(c,a){var d=this;var b=function(){if($(c).is(":checked")===a){d.show()}else{d.hide()}};b();$(c).click(b);return this};jQuery.fn.jtip=function(a,b){this.each(function(){var c=jQuery(this);var f=jQuery("<div id='JT'><div class='copy'>"+a.apply(c)+"</div></div>").hide().get(0);var d=jQuery("<span class='question'></span>").appendTo(c);var e=function(g){if(f!=jQuery("#JT").remove().get(0)){jQuery("body").append(f)}if(b){var i=g.pageX;var h=g.pageY}else{var i=c.position().left+c.width();var h=c.position().top}jQuery(f).css({left:i,top:h}).show()};if(b){d.click(e)}else{c.hover(e,function(){jQuery(f).remove()})}})};jQuery.fn.TextCounter=function(a,b){b=$.extend({counterDisplayElement:"span",counterDisplayClass:"text_counter_display",addLineBreak:true},b);$(this).each(function(c){updateCounter(this,a,b,c);$(this).keyup(function(){updateCounter(this,a,b,c);return this})});return this};function updateCounter(i,h,j,g){var f=0;var c=$(i).val();if(c){f=c.length}if(f>h){$(i).val(c.substring(0,h))}else{var a=h-f;var e=j.counterDisplayElement+"."+j.counterDisplayClass+":eq("+g+")";var b=$(e).length==0;if(b){var d=document.createElement(j.counterDisplayElement);if(j.counterDisplayElement=="input"){$(d).val(a.toString())}else{$(d).html(a.toString())}$(d).addClass(j.counterDisplayClass).insertAfter($(i));if(j.addLineBreak){$(i).after("<br />")}}else{if(j.counterDisplayElement=="input"){$(e).val(a.toString())}else{$(e).html(a.toString())}}}}jQuery.ui||(function(c){var i=c.fn.remove,d=c.browser.mozilla&&(parseFloat(c.browser.version)<1.9);c.ui={version:"1.7",plugin:{add:function(k,l,n){var m=c.ui[k].prototype;for(var j in n){m.plugins[j]=m.plugins[j]||[];m.plugins[j].push([l,n[j]])}},call:function(j,l,k){var n=j.plugins[l];if(!n||!j.element[0].parentNode){return}for(var m=0;m<n.length;m++){if(j.options[n[m][0]]){n[m][1].apply(j.element,k)}}}},contains:function(k,j){return document.compareDocumentPosition?k.compareDocumentPosition(j)&16:k!==j&&k.contains(j)},hasScroll:function(m,k){if(c(m).css("overflow")=="hidden"){return false}var j=(k&&k=="left")?"scrollLeft":"scrollTop",l=false;if(m[j]>0){return true}m[j]=1;l=(m[j]>0);m[j]=0;return l},isOverAxis:function(k,j,l){return(k>j)&&(k<(j+l))},isOver:function(o,k,n,m,j,l){return c.ui.isOverAxis(o,n,j)&&c.ui.isOverAxis(k,m,l)},keyCode:{BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38}};if(d){var f=c.attr,e=c.fn.removeAttr,h="http://www.w3.org/2005/07/aaa",a=/^aria-/,b=/^wairole:/;c.attr=function(k,j,l){var m=l!==undefined;return(j=="role"?(m?f.call(this,k,j,"wairole:"+l):(f.apply(this,arguments)||"").replace(b,"")):(a.test(j)?(m?k.setAttributeNS(h,j.replace(a,"aaa:"),l):f.call(this,k,j.replace(a,"aaa:"))):f.apply(this,arguments)))};c.fn.removeAttr=function(j){return(a.test(j)?this.each(function(){this.removeAttributeNS(h,j.replace(a,""))}):e.call(this,j))}}c.fn.extend({remove:function(){c("*",this).add(this).each(function(){c(this).triggerHandler("remove")});return i.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((c.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){j=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test(c.curCSS(this,"position",1))&&(/(auto|scroll)/).test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0)}else{j=this.parents().filter(function(){return(/(auto|scroll)/).test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0)}return(/fixed/).test(this.css("position"))||!j.length?c(document):j}});c.extend(c.expr[":"],{data:function(l,k,j){return !!c.data(l,j[3])},focusable:function(k){var l=k.nodeName.toLowerCase(),j=c.attr(k,"tabindex");return(/input|select|textarea|button|object/.test(l)?!k.disabled:"a"==l||"area"==l?k.href||!isNaN(j):!isNaN(j))&&!c(k)["area"==l?"parents":"closest"](":hidden").length},tabbable:function(k){var j=c.attr(k,"tabindex");return(isNaN(j)||j>=0)&&c(k).is(":focusable")}});function g(m,n,o,l){function k(q){var p=c[m][n][q]||[];return(typeof p=="string"?p.split(/,?\s+/):p)}var j=k("getter");if(l.length==1&&typeof l[0]=="string"){j=j.concat(k("getterSetter"))}return(c.inArray(o,j)!=-1)}c.widget=function(k,j){var l=k.split(".")[0];k=k.split(".")[1];c.fn[k]=function(p){var n=(typeof p=="string"),o=Array.prototype.slice.call(arguments,1);if(n&&p.substring(0,1)=="_"){return this}if(n&&g(l,k,p,o)){var m=c.data(this[0],k);return(m?m[p].apply(m,o):undefined)}return this.each(function(){var q=c.data(this,k);(!q&&!n&&c.data(this,k,new c[l][k](this,p))._init());(q&&n&&c.isFunction(q[p])&&q[p].apply(q,o))})};c[l]=c[l]||{};c[l][k]=function(o,n){var m=this;this.namespace=l;this.widgetName=k;this.widgetEventPrefix=c[l][k].eventPrefix||k;this.widgetBaseClass=l+"-"+k;this.options=c.extend({},c.widget.defaults,c[l][k].defaults,c.metadata&&c.metadata.get(o)[k],n);this.element=c(o).bind("setData."+k,function(q,p,r){if(q.target==o){return m._setData(p,r)}}).bind("getData."+k,function(q,p){if(q.target==o){return m._getData(p)}}).bind("remove",function(){return m.destroy()})};c[l][k].prototype=c.extend({},c.widget.prototype,j);c[l][k].getterSetter="option"};c.widget.prototype={_init:function(){},destroy:function(){this.element.removeData(this.widgetName).removeClass(this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").removeAttr("aria-disabled")},option:function(l,m){var k=l,j=this;if(typeof l=="string"){if(m===undefined){return this._getData(l)}k={};k[l]=m}c.each(k,function(n,o){j._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(l,m,n){var p=this.options[l],j=(l==this.widgetEventPrefix?l:this.widgetEventPrefix+l);m=c.Event(m);m.type=j;if(m.originalEvent){for(var k=c.event.props.length,o;k;){o=c.event.props[--k];m[o]=m.originalEvent[o]}}this.element.trigger(m,n);return !(c.isFunction(p)&&p.call(this.element[0],m,n)===false||m.isDefaultPrevented())}};c.widget.defaults={disabled:false};c.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(c.browser.msie){this._mouseUnselectable=this.element.attr("unselectable");this.element.attr("unselectable","on")}this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName);(c.browser.msie&&this.element.attr("unselectable",this._mouseUnselectable))},_mouseDown:function(l){l.originalEvent=l.originalEvent||{};if(l.originalEvent.mouseHandled){return}(this._mouseStarted&&this._mouseUp(l));this._mouseDownEvent=l;var k=this,m=(l.which==1),j=(typeof this.options.cancel=="string"?c(l.target).parents().add(l.target).filter(this.options.cancel).length:false);if(!m||j||!this._mouseCapture(l)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){k.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(l)&&this._mouseDelayMet(l)){this._mouseStarted=(this._mouseStart(l)!==false);if(!this._mouseStarted){l.preventDefault();return true}}this._mouseMoveDelegate=function(n){return k._mouseMove(n)};this._mouseUpDelegate=function(n){return k._mouseUp(n)};c(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);(c.browser.safari||l.preventDefault());l.originalEvent.mouseHandled=true;return true},_mouseMove:function(j){if(c.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){c(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}};c.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(b,d){this.position=this._generatePosition(b);this.positionAbs=this._convertPositionTo("absolute");if(!d){var c=this._uiHash();this._trigger("drag",b,c);this.position=c.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,b)}return false},_mouseStop:function(c){var d=false;if(a.ui.ddmanager&&!this.options.dropBehaviour){d=a.ui.ddmanager.drop(this,c)}if(this.dropped){d=this.dropped;this.dropped=false}if((this.options.revert=="invalid"&&!d)||(this.options.revert=="valid"&&d)||this.options.revert===true||(a.isFunction(this.options.revert)&&this.options.revert.call(this.element,d))){var b=this;a(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){b._trigger("stop",c);b._clear()})}else{this._trigger("stop",c);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 d=this.options;var b=a.isFunction(d.helper)?a(d.helper.apply(this.element[0],[c])):(d.helper=="clone"?this.element.clone():this.element);if(!b.parents("body").length){b.appendTo((d.appendTo=="parent"?this.element[0].parentNode:d.appendTo))}if(b[0]!=this.element[0]&&!(/(fixed|absolute)/).test(b.css("position"))){b.css("position","absolute")}return b},_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 e=this.options;if(e.containment=="parent"){e.containment=this.helper[0].parentNode}if(e.containment=="document"||e.containment=="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,a(e.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(a(e.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]}if(!(/^(document|window|parent)$/).test(e.containment)&&e.containment.constructor!=Array){var c=a(e.containment)[0];if(!c){return}var d=a(e.containment).offset();var b=(a(c).css("overflow")!="hidden");this.containment=[d.left+(parseInt(a(c).css("borderLeftWidth"),10)||0)+(parseInt(a(c).css("paddingLeft"),10)||0)-this.margins.left,d.top+(parseInt(a(c).css("borderTopWidth"),10)||0)+(parseInt(a(c).css("paddingTop"),10)||0)-this.margins.top,d.left+(b?Math.max(c.scrollWidth,c.offsetWidth):c.offsetWidth)-(parseInt(a(c).css("borderLeftWidth"),10)||0)-(parseInt(a(c).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,d.top+(b?Math.max(c.scrollHeight,c.offsetHeight):c.offsetHeight)-(parseInt(a(c).css("borderTopWidth"),10)||0)-(parseInt(a(c).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}else{if(e.containment.constructor==Array){this.containment=e.containment}}},_convertPositionTo:function(f,h){if(!h){h=this.position}var c=f=="absolute"?1:-1;var e=this.options,b=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,g=(/(html|body)/i).test(b[0].tagName);return{top:(h.top+this.offset.relative.top*c+this.offset.parent.top*c-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(g?0:b.scrollTop()))*c)),left:(h.left+this.offset.relative.left*c+this.offset.parent.left*c-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():g?0:b.scrollLeft())*c))}},_generatePosition:function(e){var h=this.options,b=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(b[0].tagName);if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0])){this.offset.relative=this._getRelativeOffset()}var d=e.pageX;var c=e.pageY;if(this.originalPosition){if(this.containment){if(e.pageX-this.offset.click.left<this.containment[0]){d=this.containment[0]+this.offset.click.left}if(e.pageY-this.offset.click.top<this.containment[1]){c=this.containment[1]+this.offset.click.top}if(e.pageX-this.offset.click.left>this.containment[2]){d=this.containment[2]+this.offset.click.left}if(e.pageY-this.offset.click.top>this.containment[3]){c=this.containment[3]+this.offset.click.top}}if(h.grid){var g=this.originalPageY+Math.round((c-this.originalPageY)/h.grid[1])*h.grid[1];c=this.containment?(!(g-this.offset.click.top<this.containment[1]||g-this.offset.click.top>this.containment[3])?g:(!(g-this.offset.click.top<this.containment[1])?g-h.grid[1]:g+h.grid[1])):g;var f=this.originalPageX+Math.round((d-this.originalPageX)/h.grid[0])*h.grid[0];d=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-h.grid[0]:f+h.grid[0])):f}}return{top:(c-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:b.scrollTop())))),left:(d-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:b.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(b,c,d){d=d||this._uiHash();a.ui.plugin.call(this,b,[c,d]);if(b=="drag"){this.positionAbs=this._convertPositionTo("absolute")}return a.widget.prototype._trigger.call(this,b,c,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",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(c,e){var d=a(this).data("draggable"),f=d.options,b=a.extend({},e,{item:d.element});d.sortables=[];a(f.connectToSortable).each(function(){var g=a.data(this,"sortable");if(g&&!g.options.disabled){d.sortables.push({instance:g,shouldRevert:g.options.revert});g._refreshItems();g._trigger("activate",c,b)}})},stop:function(c,e){var d=a(this).data("draggable"),b=a.extend({},e,{item:d.element});a.each(d.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;d.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert){this.instance.options.revert=true}this.instance._mouseStop(c);this.instance.options.helper=this.instance.options._helper;if(d.options.helper=="original"){this.instance.currentItem.css({top:"auto",left:"auto"})}}else{this.instance.cancelHelperRemoval=false;this.instance._trigger("deactivate",c,b)}})},drag:function(c,f){var e=a(this).data("draggable"),b=this;var d=function(i){var n=this.offset.click.top,m=this.offset.click.left;var g=this.positionAbs.top,k=this.positionAbs.left;var j=i.height,l=i.width;var p=i.top,h=i.left;return a.ui.isOver(g+n,k+m,p,h,j,l)};a.each(e.sortables,function(g){this.instance.positionAbs=e.positionAbs;this.instance.helperProportions=e.helperProportions;this.instance.offset.click=e.offset.click;if(this.instance._intersectsWith(this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=a(b).clone().appendTo(this.instance.element).data("sortable-item",true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return f.helper[0]};c.target=this.instance.currentItem[0];this.instance._mouseCapture(c,true);this.instance._mouseStart(c,true,true);this.instance.offset.click.top=e.offset.click.top;this.instance.offset.click.left=e.offset.click.left;this.instance.offset.parent.left-=e.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=e.offset.parent.top-this.instance.offset.parent.top;e._trigger("toSortable",c);e.dropped=this.instance.element;e.currentItem=e.element;this.instance.fromOutside=e}if(this.instance.currentItem){this.instance._mouseDrag(c)}}else{if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance._trigger("out",c,this.instance._uiHash(this.instance));this.instance._mouseStop(c,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();if(this.instance.placeholder){this.instance.placeholder.remove()}e._trigger("fromSortable",c);e.dropped=false}}})}});a.ui.plugin.add("draggable","cursor",{start:function(c,d){var b=a("body"),e=a(this).data("draggable").options;if(b.css("cursor")){e._cursor=b.css("cursor")}b.css("cursor",e.cursor)},stop:function(b,c){var d=a(this).data("draggable").options;if(d._cursor){a("body").css("cursor",d._cursor)}}});a.ui.plugin.add("draggable","iframeFix",{start:function(b,c){var d=a(this).data("draggable").options;a(d.iframeFix===true?"iframe":d.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(b,c){a("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)})}});a.ui.plugin.add("draggable","opacity",{start:function(c,d){var b=a(d.helper),e=a(this).data("draggable").options;if(b.css("opacity")){e._opacity=b.css("opacity")}b.css("opacity",e.opacity)},stop:function(b,c){var d=a(this).data("draggable").options;if(d._opacity){a(c.helper).css("opacity",d._opacity)}}});a.ui.plugin.add("draggable","scroll",{start:function(c,d){var b=a(this).data("draggable");if(b.scrollParent[0]!=document&&b.scrollParent[0].tagName!="HTML"){b.overflowOffset=b.scrollParent.offset()}},drag:function(d,e){var c=a(this).data("draggable"),f=c.options,b=false;if(c.scrollParent[0]!=document&&c.scrollParent[0].tagName!="HTML"){if(!f.axis||f.axis!="x"){if((c.overflowOffset.top+c.scrollParent[0].offsetHeight)-d.pageY<f.scrollSensitivity){c.scrollParent[0].scrollTop=b=c.scrollParent[0].scrollTop+f.scrollSpeed}else{if(d.pageY-c.overflowOffset.top<f.scrollSensitivity){c.scrollParent[0].scrollTop=b=c.scrollParent[0].scrollTop-f.scrollSpeed}}}if(!f.axis||f.axis!="y"){if((c.overflowOffset.left+c.scrollParent[0].offsetWidth)-d.pageX<f.scrollSensitivity){c.scrollParent[0].scrollLeft=b=c.scrollParent[0].scrollLeft+f.scrollSpeed}else{if(d.pageX-c.overflowOffset.left<f.scrollSensitivity){c.scrollParent[0].scrollLeft=b=c.scrollParent[0].scrollLeft-f.scrollSpeed}}}}else{if(!f.axis||f.axis!="x"){if(d.pageY-a(document).scrollTop()<f.scrollSensitivity){b=a(document).scrollTop(a(document).scrollTop()-f.scrollSpeed)}else{if(a(window).height()-(d.pageY-a(document).scrollTop())<f.scrollSensitivity){b=a(document).scrollTop(a(document).scrollTop()+f.scrollSpeed)}}}if(!f.axis||f.axis!="y"){if(d.pageX-a(document).scrollLeft()<f.scrollSensitivity){b=a(document).scrollLeft(a(document).scrollLeft()-f.scrollSpeed)}else{if(a(window).width()-(d.pageX-a(document).scrollLeft())<f.scrollSensitivity){b=a(document).scrollLeft(a(document).scrollLeft()+f.scrollSpeed)}}}}if(b!==false&&a.ui.ddmanager&&!f.dropBehaviour){a.ui.ddmanager.prepareOffsets(c,d)}}});a.ui.plugin.add("draggable","snap",{start:function(c,d){var b=a(this).data("draggable"),e=b.options;b.snapElements=[];a(e.snap.constructor!=String?(e.snap.items||":data(draggable)"):e.snap).each(function(){var g=a(this);var f=g.offset();if(this!=b.element[0]){b.snapElements.push({item:this,width:g.outerWidth(),height:g.outerHeight(),top:f.top,left:f.left})}})},drag:function(u,p){var g=a(this).data("draggable"),q=g.options;var y=q.snapTolerance;var x=p.offset.left,w=x+g.helperProportions.width,f=p.offset.top,e=f+g.helperProportions.height;for(var v=g.snapElements.length-1;v>=0;v--){var s=g.snapElements[v].left,n=s+g.snapElements[v].width,m=g.snapElements[v].top,A=m+g.snapElements[v].height;if(!((s-y<x&&x<n+y&&m-y<f&&f<A+y)||(s-y<x&&x<n+y&&m-y<e&&e<A+y)||(s-y<w&&w<n+y&&m-y<f&&f<A+y)||(s-y<w&&w<n+y&&m-y<e&&e<A+y))){if(g.snapElements[v].snapping){(g.options.snap.release&&g.options.snap.release.call(g.element,u,a.extend(g._uiHash(),{snapItem:g.snapElements[v].item})))}g.snapElements[v].snapping=false;continue}if(q.snapMode!="inner"){var c=Math.abs(m-e)<=y;var z=Math.abs(A-f)<=y;var j=Math.abs(s-w)<=y;var k=Math.abs(n-x)<=y;if(c){p.position.top=g._convertPositionTo("relative",{top:m-g.helperProportions.height,left:0}).top-g.margins.top}if(z){p.position.top=g._convertPositionTo("relative",{top:A,left:0}).top-g.margins.top}if(j){p.position.left=g._convertPositionTo("relative",{top:0,left:s-g.helperProportions.width}).left-g.margins.left}if(k){p.position.left=g._convertPositionTo("relative",{top:0,left:n}).left-g.margins.left}}var h=(c||z||j||k);if(q.snapMode!="outer"){var c=Math.abs(m-f)<=y;var z=Math.abs(A-e)<=y;var j=Math.abs(s-x)<=y;var k=Math.abs(n-w)<=y;if(c){p.position.top=g._convertPositionTo("relative",{top:m,left:0}).top-g.margins.top}if(z){p.position.top=g._convertPositionTo("relative",{top:A-g.helperProportions.height,left:0}).top-g.margins.top}if(j){p.position.left=g._convertPositionTo("relative",{top:0,left:s}).left-g.margins.left}if(k){p.position.left=g._convertPositionTo("relative",{top:0,left:n-g.helperProportions.width}).left-g.margins.left}}if(!g.snapElements[v].snapping&&(c||z||j||k||h)){(g.options.snap.snap&&g.options.snap.snap.call(g.element,u,a.extend(g._uiHash(),{snapItem:g.snapElements[v].item})))}g.snapElements[v].snapping=(c||z||j||k||h)}}});a.ui.plugin.add("draggable","stack",{start:function(b,c){var e=a(this).data("draggable").options;var d=a.makeArray(a(e.stack.group)).sort(function(g,f){return(parseInt(a(g).css("zIndex"),10)||e.stack.min)-(parseInt(a(f).css("zIndex"),10)||e.stack.min)});a(d).each(function(f){this.style.zIndex=e.stack.min+f});this[0].style.zIndex=e.stack.min+d.length}});a.ui.plugin.add("draggable","zIndex",{start:function(c,d){var b=a(d.helper),e=a(this).data("draggable").options;if(b.css("zIndex")){e._zIndex=b.css("zIndex")}b.css("zIndex",e.zIndex)},stop:function(b,c){var d=a(this).data("draggable").options;if(d._zIndex){a(c.helper).css("zIndex",d._zIndex)}}})})(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(e,f){if(this.reverting){return false}if(this.options.disabled||this.options.type=="static"){return false}this._refreshItems(e);var d=null,c=this,b=a(e.target).parents().each(function(){if(a.data(this,"sortable-item")==c){d=a(this);return false}});if(a.data(e.target,"sortable-item")==c){d=a(e.target)}if(!d){return false}if(this.options.handle&&!f){var g=false;a(this.options.handle,d).find("*").andSelf().each(function(){if(this==e.target){g=true}});if(!g){return false}}this.currentItem=d;this._removeCurrentsFromItems();return true},_mouseStart:function(e,f,b){var g=this.options,c=this;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(e);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:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(e);this.originalPageX=e.pageX;this.originalPageY=e.pageY;if(g.cursorAt){this._adjustOffsetFromHelper(g.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(g.containment){this._setContainment()}if(g.cursor){if(a("body").css("cursor")){this._storedCursor=a("body").css("cursor")}a("body").css("cursor",g.cursor)}if(g.opacity){if(this.helper.css("opacity")){this._storedOpacity=this.helper.css("opacity")}this.helper.css("opacity",g.opacity)}if(g.zIndex){if(this.helper.css("zIndex")){this._storedZIndex=this.helper.css("zIndex")}this.helper.css("zIndex",g.zIndex)}if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){this.overflowOffset=this.scrollParent.offset()}this._trigger("start",e,this._uiHash());if(!this._preserveHelperProportions){this._cacheHelperProportions()}if(!b){for(var d=this.containers.length-1;d>=0;d--){this.containers[d]._trigger("activate",e,c._uiHash(this))}}if(a.ui.ddmanager){a.ui.ddmanager.current=this}if(a.ui.ddmanager&&!g.dropBehaviour){a.ui.ddmanager.prepareOffsets(this,e)}this.dragging=true;this.helper.addClass("ui-sortable-helper");this._mouseDrag(e);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 g=this.options,b=false;if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){if((this.overflowOffset.top+this.scrollParent[0].offsetHeight)-f.pageY<g.scrollSensitivity){this.scrollParent[0].scrollTop=b=this.scrollParent[0].scrollTop+g.scrollSpeed}else{if(f.pageY-this.overflowOffset.top<g.scrollSensitivity){this.scrollParent[0].scrollTop=b=this.scrollParent[0].scrollTop-g.scrollSpeed}}if((this.overflowOffset.left+this.scrollParent[0].offsetWidth)-f.pageX<g.scrollSensitivity){this.scrollParent[0].scrollLeft=b=this.scrollParent[0].scrollLeft+g.scrollSpeed}else{if(f.pageX-this.overflowOffset.left<g.scrollSensitivity){this.scrollParent[0].scrollLeft=b=this.scrollParent[0].scrollLeft-g.scrollSpeed}}}else{if(f.pageY-a(document).scrollTop()<g.scrollSensitivity){b=a(document).scrollTop(a(document).scrollTop()-g.scrollSpeed)}else{if(a(window).height()-(f.pageY-a(document).scrollTop())<g.scrollSensitivity){b=a(document).scrollTop(a(document).scrollTop()+g.scrollSpeed)}}if(f.pageX-a(document).scrollLeft()<g.scrollSensitivity){b=a(document).scrollLeft(a(document).scrollLeft()-g.scrollSpeed)}else{if(a(window).width()-(f.pageX-a(document).scrollLeft())<g.scrollSensitivity){b=a(document).scrollLeft(a(document).scrollLeft()+g.scrollSpeed)}}}if(b!==false&&a.ui.ddmanager&&!g.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 d=this.items.length-1;d>=0;d--){var e=this.items[d],c=e.item[0],h=this._intersectsWithPointer(e);if(!h){continue}if(c!=this.currentItem[0]&&this.placeholder[h==1?"next":"prev"]()[0]!=c&&!a.ui.contains(this.placeholder[0],c)&&(this.options.type=="semi-dynamic"?!a.ui.contains(this.element[0],c):true)){this.direction=h==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectsWithSides(e)){this._rearrange(f,e)}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,d){if(!c){return}if(a.ui.ddmanager&&!this.options.dropBehaviour){a.ui.ddmanager.drop(this,c)}if(this.options.revert){var b=this;var e=b.placeholder.offset();b.reverting=true;a(this.helper).animate({left:e.left-this.offset.parent.left-b.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:e.top-this.offset.parent.top-b.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){b._clear(c)})}else{this._clear(c,d)}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(d){var b=this._getItemsAsjQuery(d&&d.connected);var c=[];d=d||{};a(b).each(function(){var e=(a(d.item||this).attr(d.attribute||"id")||"").match(d.expression||(/(.+)[-=_](.+)/));if(e){c.push((d.key||e[1]+"[]")+"="+(d.key&&d.expression?e[1]:e[2]))}});return c.join("&")},toArray:function(d){var b=this._getItemsAsjQuery(d&&d.connected);var c=[];d=d||{};b.each(function(){c.push(a(d.item||this).attr(d.attribute||"id")||"")});return c},_intersectsWith:function(m){var e=this.positionAbs.left,d=e+this.helperProportions.width,k=this.positionAbs.top,j=k+this.helperProportions.height;var f=m.left,c=f+m.width,n=m.top,i=n+m.height;var o=this.offset.click.top,h=this.offset.click.left;var g=(k+o)>n&&(k+o)<i&&(e+h)>f&&(e+h)<c;if(this.options.tolerance=="pointer"||this.options.forcePointerForContainers||(this.options.tolerance!="pointer"&&this.helperProportions[this.floating?"width":"height"]>m[this.floating?"width":"height"])){return g}else{return(f<e+(this.helperProportions.width/2)&&d-(this.helperProportions.width/2)<c&&n<k+(this.helperProportions.height/2)&&j-(this.helperProportions.height/2)<i)}},_intersectsWithPointer:function(d){var e=a.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,d.top,d.height),c=a.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,d.left,d.width),g=e&&c,b=this._getDragVerticalDirection(),f=this._getDragHorizontalDirection();if(!g){return false}return this.floating?(((f&&f=="right")||b=="down")?2:1):(b&&(b=="down"?2:1))},_intersectsWithSides:function(e){var c=a.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,e.top+(e.height/2),e.height),d=a.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,e.left+(e.width/2),e.width),b=this._getDragVerticalDirection(),f=this._getDragHorizontalDirection();if(this.floating&&f){return((f=="right"&&d)||(f=="left"&&!d))}else{return b&&((b=="down"&&c)||(b=="up"&&!c))}},_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(b){var l=this;var g=[];var e=[];var h=this._connectWith();if(h&&b){for(var d=h.length-1;d>=0;d--){var k=a(h[d]);for(var c=k.length-1;c>=0;c--){var f=a.data(k[c],"sortable");if(f&&f!=this&&!f.options.disabled){e.push([a.isFunction(f.options.items)?f.options.items.call(f.element):a(f.options.items,f.element).not(".ui-sortable-helper"),f])}}}}e.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 d=e.length-1;d>=0;d--){e[d][0].each(function(){g.push(this)})}return a(g)},_removeCurrentsFromItems:function(){var d=this.currentItem.find(":data(sortable-item)");for(var c=0;c<this.items.length;c++){for(var b=0;b<d.length;b++){if(d[b]==this.items[c].item[0]){this.items.splice(c,1)}}}},_refreshItems:function(b){this.items=[];this.containers=[this];var h=this.items;var p=this;var f=[[a.isFunction(this.options.items)?this.options.items.call(this.element[0],b,{item:this.currentItem}):a(this.options.items,this.element),this]];var l=this._connectWith();if(l){for(var e=l.length-1;e>=0;e--){var m=a(l[e]);for(var d=m.length-1;d>=0;d--){var g=a.data(m[d],"sortable");if(g&&g!=this&&!g.options.disabled){f.push([a.isFunction(g.options.items)?g.options.items.call(g.element[0],b,{item:this.currentItem}):a(g.options.items,g.element),g]);this.containers.push(g)}}}}for(var e=f.length-1;e>=0;e--){var k=f[e][1];var c=f[e][0];for(var d=0,n=c.length;d<n;d++){var o=a(c[d]);o.data("sortable-item",k);h.push({item:o,instance:k,width:0,height:0,left:0,top:0})}}},refreshPositions:function(b){if(this.offsetParent&&this.helper){this.offset.parent=this._getParentOffset()}for(var d=this.items.length-1;d>=0;d--){var e=this.items[d];if(e.instance!=this.currentContainer&&this.currentContainer&&e.item[0]!=this.currentItem[0]){continue}var c=this.options.toleranceElement?a(this.options.toleranceElement,e.item):e.item;if(!b){e.width=c.outerWidth();e.height=c.outerHeight()}var f=c.offset();e.left=f.left;e.top=f.top}if(this.options.custom&&this.options.custom.refreshContainers){this.options.custom.refreshContainers.call(this)}else{for(var d=this.containers.length-1;d>=0;d--){var f=this.containers[d].element.offset();this.containers[d].containerCache.left=f.left;this.containers[d].containerCache.top=f.top;this.containers[d].containerCache.width=this.containers[d].element.outerWidth();this.containers[d].containerCache.height=this.containers[d].element.outerHeight()}}},_createPlaceholder:function(d){var b=d||this,e=b.options;if(!e.placeholder||e.placeholder.constructor==String){var c=e.placeholder;e.placeholder={element:function(){var f=a(document.createElement(b.currentItem[0].nodeName)).addClass(c||b.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];if(!c){f.style.visibility="hidden"}return f},update:function(f,g){if(c&&!e.forcePlaceholderSize){return}if(!g.height()){g.height(b.currentItem.innerHeight()-parseInt(b.currentItem.css("paddingTop")||0,10)-parseInt(b.currentItem.css("paddingBottom")||0,10))}if(!g.width()){g.width(b.currentItem.innerWidth()-parseInt(b.currentItem.css("paddingLeft")||0,10)-parseInt(b.currentItem.css("paddingRight")||0,10))}}}}b.placeholder=a(e.placeholder.element.call(b.element,b.currentItem));b.currentItem.after(b.placeholder);e.placeholder.update(b,b.placeholder)},_contactContainers:function(d){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 h=10000;var g=null;var e=this.positionAbs[this.containers[c].floating?"left":"top"];for(var b=this.items.length-1;b>=0;b--){if(!a.ui.contains(this.containers[c].element[0],this.items[b].item[0])){continue}var f=this.items[b][this.containers[c].floating?"left":"top"];if(Math.abs(f-e)<h){h=Math.abs(f-e);g=this.items[b]}}if(!g&&!this.options.dropOnEmpty){continue}this.currentContainer=this.containers[c];g?this._rearrange(d,g,null,true):this._rearrange(d,null,this.containers[c].element,true);this._trigger("change",d,this._uiHash());this.containers[c]._trigger("change",d,this._uiHash(this));this.options.placeholder.update(this.currentContainer,this.placeholder)}this.containers[c]._trigger("over",d,this._uiHash(this));this.containers[c].containerCache.over=1}}else{if(this.containers[c].containerCache.over){this.containers[c]._trigger("out",d,this._uiHash(this));this.containers[c].containerCache.over=0}}}},_createHelper:function(c){var d=this.options;var b=a.isFunction(d.helper)?a(d.helper.apply(this.element[0],[c,this.currentItem])):(d.helper=="clone"?this.currentItem.clone():this.currentItem);if(!b.parents("body").length){a(d.appendTo!="parent"?d.appendTo:this.currentItem[0].parentNode)[0].appendChild(b[0])}if(b[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(b[0].style.width==""||d.forceHelperSize){b.width(this.currentItem.width())}if(b[0].style.height==""||d.forceHelperSize){b.height(this.currentItem.height())}return b},_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 e=this.options;if(e.containment=="parent"){e.containment=this.helper[0].parentNode}if(e.containment=="document"||e.containment=="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,a(e.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(a(e.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]}if(!(/^(document|window|parent)$/).test(e.containment)){var c=a(e.containment)[0];var d=a(e.containment).offset();var b=(a(c).css("overflow")!="hidden");this.containment=[d.left+(parseInt(a(c).css("borderLeftWidth"),10)||0)+(parseInt(a(c).css("paddingLeft"),10)||0)-this.margins.left,d.top+(parseInt(a(c).css("borderTopWidth"),10)||0)+(parseInt(a(c).css("paddingTop"),10)||0)-this.margins.top,d.left+(b?Math.max(c.scrollWidth,c.offsetWidth):c.offsetWidth)-(parseInt(a(c).css("borderLeftWidth"),10)||0)-(parseInt(a(c).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,d.top+(b?Math.max(c.scrollHeight,c.offsetHeight):c.offsetHeight)-(parseInt(a(c).css("borderTopWidth"),10)||0)-(parseInt(a(c).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(f,h){if(!h){h=this.position}var c=f=="absolute"?1:-1;var e=this.options,b=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,g=(/(html|body)/i).test(b[0].tagName);return{top:(h.top+this.offset.relative.top*c+this.offset.parent.top*c-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(g?0:b.scrollTop()))*c)),left:(h.left+this.offset.relative.left*c+this.offset.parent.left*c-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():g?0:b.scrollLeft())*c))}},_generatePosition:function(e){var h=this.options,b=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(b[0].tagName);if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0])){this.offset.relative=this._getRelativeOffset()}var d=e.pageX;var c=e.pageY;if(this.originalPosition){if(this.containment){if(e.pageX-this.offset.click.left<this.containment[0]){d=this.containment[0]+this.offset.click.left}if(e.pageY-this.offset.click.top<this.containment[1]){c=this.containment[1]+this.offset.click.top}if(e.pageX-this.offset.click.left>this.containment[2]){d=this.containment[2]+this.offset.click.left}if(e.pageY-this.offset.click.top>this.containment[3]){c=this.containment[3]+this.offset.click.top}}if(h.grid){var g=this.originalPageY+Math.round((c-this.originalPageY)/h.grid[1])*h.grid[1];c=this.containment?(!(g-this.offset.click.top<this.containment[1]||g-this.offset.click.top>this.containment[3])?g:(!(g-this.offset.click.top<this.containment[1])?g-h.grid[1]:g+h.grid[1])):g;var f=this.originalPageX+Math.round((d-this.originalPageX)/h.grid[0])*h.grid[0];d=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-h.grid[0]:f+h.grid[0])):f}}return{top:(c-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:b.scrollTop())))),left:(d-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:b.scrollLeft())))}},_rearrange:function(g,f,c,e){c?c[0].appendChild(this.placeholder[0]):f.item[0].parentNode.insertBefore(this.placeholder[0],(this.direction=="down"?f.item[0]:f.item[0].nextSibling));this.counter=this.counter?++this.counter:1;var d=this,b=this.counter;window.setTimeout(function(){if(b==d.counter){d.refreshPositions(!e)}},0)},_clear:function(d,e){this.reverting=false;var f=[],b=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&&!e){f.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])&&!e){f.push(function(g){this._trigger("update",g,this._uiHash())})}if(!a.ui.contains(this.element[0],this.currentItem[0])){if(!e){f.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])&&!e){f.push((function(g){return function(h){g._trigger("receive",h,this._uiHash(this))}}).call(this,this.containers[c]));f.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(!e){f.push((function(g){return function(h){g._trigger("deactivate",h,this._uiHash(this))}}).call(this,this.containers[c]))}if(this.containers[c].containerCache.over){f.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(!e){this._trigger("beforeStop",d,this._uiHash());for(var c=0;c<f.length;c++){f[c].call(this,d)}this._trigger("stop",d,this._uiHash())}return false}if(!e){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(!e){for(var c=0;c<f.length;c++){f[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(c){var b=c||this;return{helper:b.helper,placeholder:b.placeholder||a([]),position:b.position,absolutePosition:b.positionAbs,offset:b.positionAbs,item:b.currentItem,sender:c?c.element:null}}}));a.extend(a.ui.sortable,{getter:"serialize toArray",version:"1.7",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);(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(c,b){return{tab:c,panel:b,index:this.anchors.index(c)}},_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(n){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 p=this,d=this.options;var c=/^#.+/;this.anchors.each(function(r,o){var q=a(o).attr("href");var s=q.split("#")[0],u;if(s&&(s===location.toString().split("#")[0]||(u=a("base")[0])&&s===u.href)){q=o.hash;o.href=q}if(c.test(q)){p.panels=p.panels.add(p._sanitizeSelector(q))}else{if(q!="#"){a.data(o,"href.tabs",q);a.data(o,"load.tabs",q.replace(/#.*$/,""));var w=p._tabId(o);o.href="#"+w;var v=a("#"+w);if(!v.length){v=a(d.panelTemplate).attr("id",w).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(p.panels[r-1]||p.list);v.data("destroy.tabs",true)}p.panels=p.panels.add(v)}else{d.disabled.push(r)}}});if(n){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(d.selected===undefined){if(location.hash){this.anchors.each(function(q,o){if(o.hash==location.hash){d.selected=q;return false}})}if(typeof d.selected!="number"&&d.cookie){d.selected=parseInt(p._cookie(),10)}if(typeof d.selected!="number"&&this.lis.filter(".ui-tabs-selected").length){d.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}d.selected=d.selected||0}else{if(d.selected===null){d.selected=-1}}d.selected=((d.selected>=0&&this.anchors[d.selected])||d.selected<0)?d.selected:0;d.disabled=a.unique(d.disabled.concat(a.map(this.lis.filter(".ui-state-disabled"),function(q,o){return p.lis.index(q)}))).sort();if(a.inArray(d.selected,d.disabled)!=-1){d.disabled.splice(a.inArray(d.selected,d.disabled),1)}this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active");if(d.selected>=0&&this.anchors.length){this.panels.eq(d.selected).removeClass("ui-tabs-hide");this.lis.eq(d.selected).addClass("ui-tabs-selected ui-state-active");p.element.queue("tabs",function(){p._trigger("show",null,p._ui(p.anchors[d.selected],p.panels[d.selected]))});this.load(d.selected)}a(window).bind("unload",function(){p.lis.add(p.anchors).unbind(".tabs");p.lis=p.anchors=p.panels=null})}else{d.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}this.element[d.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");if(d.cookie){this._cookie(d.selected,d.cookie)}for(var g=0,m;(m=this.lis[g]);g++){a(m)[a.inArray(g,d.disabled)!=-1&&!a(m).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled")}if(d.cache===false){this.anchors.removeData("cache.tabs")}this.lis.add(this.anchors).unbind(".tabs");if(d.event!="mouseover"){var f=function(o,i){if(i.is(":not(.ui-state-disabled)")){i.addClass("ui-state-"+o)}};var j=function(o,i){i.removeClass("ui-state-"+o)};this.lis.bind("mouseover.tabs",function(){f("hover",a(this))});this.lis.bind("mouseout.tabs",function(){j("hover",a(this))});this.anchors.bind("focus.tabs",function(){f("focus",a(this).closest("li"))});this.anchors.bind("blur.tabs",function(){j("focus",a(this).closest("li"))})}var b,h;if(d.fx){if(a.isArray(d.fx)){b=d.fx[0];h=d.fx[1]}else{b=h=d.fx}}function e(i,o){i.css({display:""});if(a.browser.msie&&o.opacity){i[0].style.removeAttribute("filter")}}var k=h?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(h,h.duration||"normal",function(){e(o,h);p._trigger("show",null,p._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");p._trigger("show",null,p._ui(i,o[0]))};var l=b?function(o,i){i.animate(b,b.duration||"normal",function(){p.lis.removeClass("ui-tabs-selected ui-state-active").addClass("ui-state-default");i.addClass("ui-tabs-hide");e(i,b);p.element.dequeue("tabs")})}:function(o,i,q){p.lis.removeClass("ui-tabs-selected ui-state-active").addClass("ui-state-default");i.addClass("ui-tabs-hide");p.element.dequeue("tabs")};this.anchors.bind(d.event+".tabs",function(){var o=this,r=a(this).closest("li"),i=p.panels.filter(":not(.ui-tabs-hide)"),q=a(p._sanitizeSelector(this.hash));if((r.hasClass("ui-tabs-selected")&&!d.collapsible)||r.hasClass("ui-state-disabled")||r.hasClass("ui-state-processing")||p._trigger("select",null,p._ui(this,q[0]))===false){this.blur();return false}d.selected=p.anchors.index(this);p.abort();if(d.collapsible){if(r.hasClass("ui-tabs-selected")){d.selected=-1;if(d.cookie){p._cookie(d.selected,d.cookie)}p.element.queue("tabs",function(){l(o,i)}).dequeue("tabs");this.blur();return false}else{if(!i.length){if(d.cookie){p._cookie(d.selected,d.cookie)}p.element.queue("tabs",function(){k(o,q)});p.load(p.anchors.index(this));this.blur();return false}}}if(d.cookie){p._cookie(d.selected,d.cookie)}if(q.length){if(i.length){p.element.queue("tabs",function(){l(o,i)})}p.element.queue("tabs",function(){k(o,q)});p.load(p.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(e,f){d.removeData(f+".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(e,d,c){if(c===undefined){c=this.anchors.length}var b=this,g=this.options,i=a(g.tabTemplate.replace(/#\{href\}/g,e).replace(/#\{label\}/g,d)),h=!e.indexOf("#")?e.replace("#",""):this._tabId(a("a",i)[0]);i.addClass("ui-state-default ui-corner-top").data("destroy.tabs",true);var f=a("#"+h);if(!f.length){f=a(g.panelTemplate).attr("id",h).data("destroy.tabs",true)}f.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");if(c>=this.lis.length){i.appendTo(this.list);f.appendTo(this.list[0].parentNode)}else{i.insertBefore(this.lis[c]);f.insertBefore(this.panels[c])}g.disabled=a.map(g.disabled,function(k,j){return k>=c?++k:k});this._tabify();if(this.anchors.length==1){i.addClass("ui-tabs-selected ui-state-active");f.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[c],this.panels[c]))},remove:function(b){var d=this.options,e=this.lis.eq(b).remove(),c=this.panels.eq(b).remove();if(e.hasClass("ui-tabs-selected")&&this.anchors.length>1){this.select(b+(b+1<this.anchors.length?1:-1))}d.disabled=a.map(a.grep(d.disabled,function(g,f){return g!=b}),function(g,f){return g>=b?--g:g});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(e,d){return e!=b});this._trigger("enable",null,this._ui(this.anchors[b],this.panels[b]))},disable:function(c){var b=this,d=this.options;if(c!=d.selected){this.lis.eq(c).addClass("ui-state-disabled");d.disabled.push(c);d.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(e){var c=this,g=this.options,b=this.anchors.eq(e)[0],d=a.data(b,"load.tabs");this.abort();if(!d||this.element.queue("tabs").length!==0&&a.data(b,"cache.tabs")){this.element.dequeue("tabs");return}this.lis.eq(e).addClass("ui-state-processing");if(g.spinner){var f=a("span",b);f.data("label.tabs",f.html()).html(g.spinner)}this.xhr=a.ajax(a.extend({},g.ajaxOptions,{url:d,success:function(i,h){a(c._sanitizeSelector(b.hash)).html(i);c._cleanup();if(g.cache){a.data(b,"cache.tabs",true)}c._trigger("load",null,c._ui(c.anchors[e],c.panels[e]));try{g.ajaxOptions.success(i,h)}catch(j){}c.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(c,b){this.anchors.eq(c).removeData("cache.tabs").data("load.tabs",b)},length:function(){return this.anchors.length}});a.extend(a.ui.tabs,{version:"1.7",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(d,f){var b=this,g=this.options;var c=b._rotate||(b._rotate=function(h){clearTimeout(b.rotation);b.rotation=setTimeout(function(){var i=g.selected;b.select(++i<b.anchors.length?i:0)},d);if(h){h.stopPropagation()}});var e=b._unrotate||(b._unrotate=!f?function(h){if(h.clientX){b.rotate(null)}}:function(h){t=g.selected;c()});if(d){this.element.bind("tabsshow",c);this.anchors.bind(g.event+".tabs",e);c()}else{clearTimeout(b.rotation);this.element.unbind("tabsshow",c);this.anchors.unbind(g.event+".tabs",e);delete this._rotate;delete this._unrotate}}})})(jQuery);$(document).ready(function(){$("body").bind("ajaxSend",function(c,b,a){if(a.type=="GET"){return}if(a.data&&a.data.match(new RegExp("\\b"+window._auth_token_name+"="))){return}if(a.data){a.data=a.data+"&"}else{a.data="";b.setRequestHeader("Content-Type",a.contentType)}a.data=a.data+encodeURIComponent(window._auth_token_name)+"="+encodeURIComponent(window._auth_token)});$(".tooltip").jtip(function(){var a=this.attr("title");this.removeAttr("title").removeAttr("alt");return"<p>"+a+"</p>"});$(".helptip").jtip(function(){var a=this.html();this.empty().addClass("tooltippy");return a},true);$(".highlights").each(function(){var a=$(this);a.tabs();var b=a.find("li").index(a.find(".active"));if(b!=-1){a.tabs("select",b)}});$("#booking_attendees_table").keepNumberOfVisibleRowsSyncedWithSelect("#number_of_bookings");$("#award_entries_table").keepNumberOfVisibleRowsSyncedWithSelect("#number_of_award_entries");$(".submit-on-change").change(function(){$(this).parents("form").submit()});$(".remove-member").click(function(){return confirm("Are you sure you want to remove this user from the membership?")});$(".current_career").click(function(){$(".enddate").toggleClass("hide")});$(".remove_newsletter_item").click(function(){$(this).parents(".newsletter_item_fields").slideUp("normal",function(){var a=$(this).parent();$(this).remove();a.recalculate_list_positions()});return false});$(".newsletter_items").sortable({axis:"y",opacity:0.8,start:function(a,b){$(b.helper).css("list-style","none").addClass("sortable_selected")},change:function(){$(this).recalculate_list_positions()}});$(".sortable").makeSortable();$("#member_directory_topics_answers select").exclusive();$(".advanced_search_link").click(function(){$(".advanced_search").slideDown();$(".non_advanced").hide();return false});$(".ui-tabs-nav").bind("tabsselect",function(a,b){$(this).parent().find(".advanced_search").each(function(){$(this).hide()}).end().find(".non_advanced").each(function(){$(this).show()})});$("#press_release_published_at").keepVisibilitySyncedWithCheckbox("#press_release_publish_now",false);$("#edit_vat_for_line_item").keepVisibilitySyncedWithCheckbox("#line_item_override_vat",true);$("form.unload").find(":text").change(function(){window.onbeforeunload=function(){return"You have entered new data on this page. If you navigate away from this page without first saving your data, the changes will be lost."}}).end().find(":submit").click(function(){window.onbeforeunload=null});$(":text[title]:not(:text[value])").addClass("hint").attr("value",function(){return $(this).attr("title")});$(":text.hint").focus(function(){if($(this).hasClass("hint")){$(this).removeClass("hint").attr({value:""})}});$(":text.hint").change(function(){$(this).removeClass("hint")});$(":text.hint").blur(function(){if($(this).attr("value")===""){$(this).addClass("hint").attr("value",$(this).attr("title"))}});$("form").submit(function(){$(":text.hint").each(function(){$(this).attr({value:""})})});$(".biglist > li").collapsible();$(".text_area_counter").connect_counter_to_textarea();$("input.submit-link").convert_submit_button_to_link();$("a.submit-link").live("click",function(){$(this).parents("form").submit();return false});$("form.ajax").live("submit",function(){$(this).find("input[type=image]").hide("slow");$(this).submitWithAjax();return false})});$.ajaxSetup({beforeSend:function(a){a.setRequestHeader("Accept","text/javascript")}});$(function(){var a={script_url:"/javascripts/tiny_mce/tiny_mce.js",theme:"advanced",theme_advanced_buttons2:"",theme_advanced_buttons3:"",theme_advanced_toolbar_location:"top",theme_advanced_toolbar_align:"left",remove_trailing_nbsp:true,remove_linebreaks:false,relative_urls:false,remove_script_host:false,width:"100%"};$("textarea.wysiwyg").tinymce($.extend({},a,{theme_advanced_buttons1:"bold,italic,separator,link,unlink,blockquote,bullist,numlist,removeformat"}));$("textarea.wysiwyg_unrestricted").tinymce($.extend({},a,{plugins:"media",media_strict:false,theme_advanced_buttons1:"formatselect,bold,italic,separator,link,unlink,image,media,blockquote,separator,bullist,numlist,indent,outdent,separator,code,removeformat",theme_advanced_blockformats:"p,h2,h3,h4,h5,h6",extended_valid_elements:"iframe[src|width|height|align|scrolling|frameBorder]"}))});