/*
 * jQuery JavaScript Library v1.3.2
 * http://jquery.com/
 *
 * Copyright (c) 2009 John Resig
 * Dual licensed under the MIT and GPL licenses.
 * http://docs.jquery.com/License
 *
 * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009)
 * Revision: 6246
 */
(function(){var n=this,h,C=n.jQuery,s=n.$,r=n.jQuery=n.$=function(I,J){return new r.fn.init(I,J)},H=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,g=/^.[^:#\[\.,]*$/;r.fn=r.prototype={init:function(I,L){I=I||document;if(I.nodeType){this[0]=I;this.length=1;this.context=I;return this}if(typeof I==="string"){var K=H.exec(I);if(K&&(K[1]||!L)){if(K[1]){I=r.clean([K[1]],L)}else{var M=document.getElementById(K[3]);if(M&&M.id!=K[3]){return r().find(I)}var J=r(M||[]);J.context=document;J.selector=I;return J}}else{return r(L).find(I)}}else{if(r.isFunction(I)){return r(document).ready(I)}}if(I.selector&&I.context){this.selector=I.selector;this.context=I.context}return this.setArray(r.isArray(I)?I:r.makeArray(I))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(I){return I===h?Array.prototype.slice.call(this):this[I]},pushStack:function(J,L,I){var K=r(J);K.prevObject=this;K.context=this.context;if(L==="find"){K.selector=this.selector+(this.selector?" ":"")+I}else{if(L){K.selector=this.selector+"."+L+"("+I+")"}}return K},setArray:function(I){this.length=0;Array.prototype.push.apply(this,I);return this},each:function(J,I){return r.each(this,J,I)},index:function(I){return r.inArray(I&&I.jquery?I[0]:I,this)},attr:function(J,L,K){var I=J;if(typeof J==="string"){if(L===h){return this[0]&&r[K||"attr"](this[0],J)}else{I={};I[J]=L}}return this.each(function(M){for(J in I){r.attr(K?this.style:this,J,r.prop(this,I[J],K,M,J))}})},css:function(I,J){if((I=="width"||I=="height")&&parseFloat(J)<0){J=h}return this.attr(I,J,"curCSS")},text:function(J){if(typeof J!=="object"&&J!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(J))}var I="";r.each(J||this,function(){r.each(this.childNodes,function(){if(this.nodeType!=8){I+=this.nodeType!=1?this.nodeValue:r.fn.text([this])}})});return I},wrapAll:function(I){if(this[0]){var J=r(I,this[0].ownerDocument).clone();if(this[0].parentNode){J.insertBefore(this[0])}J.map(function(){var K=this;while(K.firstChild){K=K.firstChild}return K}).append(this)}return this},wrapInner:function(I){return this.each(function(){r(this).contents().wrapAll(I)})},wrap:function(I){return this.each(function(){r(this).wrapAll(I)})},append:function(){return this.domManip(arguments,true,function(I){if(this.nodeType==1){this.appendChild(I)}})},prepend:function(){return this.domManip(arguments,true,function(I){if(this.nodeType==1){this.insertBefore(I,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(I){this.parentNode.insertBefore(I,this)})},after:function(){return this.domManip(arguments,false,function(I){this.parentNode.insertBefore(I,this.nextSibling)})},end:function(){return this.prevObject||r([])},push:[].push,sort:[].sort,splice:[].splice,find:function(I){if(this.length===1){var J=this.pushStack([],"find",I);J.length=0;r.find(I,this[0],J);return J}else{return this.pushStack(r.unique(r.map(this,function(K){return r.find(I,K)})),"find",I)}},clone:function(K){var I=this.map(function(){if(!r.support.noCloneEvent&&!r.isXMLDoc(this)){var M=this.outerHTML;if(!M){var N=this.ownerDocument.createElement("div");N.appendChild(this.cloneNode(true));M=N.innerHTML}return r.clean([M.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]}else{return this.cloneNode(true)}});if(K===true){var L=this.find("*").andSelf(),J=0;I.find("*").andSelf().each(function(){if(this.nodeName!==L[J].nodeName){return}var M=r.data(L[J],"events");for(var O in M){for(var N in M[O]){r.event.add(this,O,M[O][N],M[O][N].data)}}J++})}return I},filter:function(I){return this.pushStack(r.isFunction(I)&&r.grep(this,function(K,J){return I.call(K,J)})||r.multiFilter(I,r.grep(this,function(J){return J.nodeType===1})),"filter",I)},closest:function(I){var K=r.expr.match.POS.test(I)?r(I):null,J=0;return this.map(function(){var L=this;while(L&&L.ownerDocument){if(K?K.index(L)>-1:r(L).is(I)){r.data(L,"closest",J);return L}L=L.parentNode;J++}})},not:function(I){if(typeof I==="string"){if(g.test(I)){return this.pushStack(r.multiFilter(I,this,true),"not",I)}else{I=r.multiFilter(I,this)}}var J=I.length&&I[I.length-1]!==h&&!I.nodeType;return this.filter(function(){return J?r.inArray(this,I)<0:this!=I})},add:function(I){return this.pushStack(r.unique(r.merge(this.get(),typeof I==="string"?r(I):r.makeArray(I))))},is:function(I){return !!I&&r.multiFilter(I,this).length>0},hasClass:function(I){return !!I&&this.is("."+I)},val:function(O){if(O===h){var I=this[0];if(I){if(r.nodeName(I,"option")){return(I.attributes.value||{}).specified?I.value:I.text}if(r.nodeName(I,"select")){var M=I.selectedIndex,P=[],Q=I.options,L=I.type=="select-one";if(M<0){return null}for(var J=L?M:0,N=L?M+1:Q.length;J<N;J++){var K=Q[J];if(K.selected){O=r(K).val();if(L){return O}P.push(O)}}return P}return(I.value||"").replace(/\r/g,"")}return h}if(typeof O==="number"){O+=""}return this.each(function(){if(this.nodeType!=1){return}if(r.isArray(O)&&/radio|checkbox/.test(this.type)){this.checked=(r.inArray(this.value,O)>=0||r.inArray(this.name,O)>=0)}else{if(r.nodeName(this,"select")){var R=r.makeArray(O);r("option",this).each(function(){this.selected=(r.inArray(this.value,R)>=0||r.inArray(this.text,R)>=0)});if(!R.length){this.selectedIndex=-1}}else{this.value=O}}})},html:function(I){return I===h?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(I)},replaceWith:function(I){return this.after(I).remove()},eq:function(I){return this.slice(I,+I+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(I){return this.pushStack(r.map(this,function(K,J){return I.call(K,J,K)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(N,Q,P){if(this[0]){var M=(this[0].ownerDocument||this[0]).createDocumentFragment(),J=r.clean(N,(this[0].ownerDocument||this[0]),M),L=M.firstChild;if(L){for(var K=0,I=this.length;K<I;K++){P.call(O(this[K],L),this.length>1||K>0?M.cloneNode(true):M)}}if(J){r.each(J,D)}}return this;function O(R,S){return Q&&r.nodeName(R,"table")&&r.nodeName(S,"tr")?(R.getElementsByTagName("tbody")[0]||R.appendChild(R.ownerDocument.createElement("tbody"))):R}}};r.fn.init.prototype=r.fn;function D(I,J){if(J.src){r.ajax({url:J.src,async:false,dataType:"script"})}else{r.globalEval(J.text||J.textContent||J.innerHTML||"")}if(J.parentNode){J.parentNode.removeChild(J)}}function f(){return +new Date}r.extend=r.fn.extend=function(){var N=arguments[0]||{},L=1,M=arguments.length,I=false,K;if(typeof N==="boolean"){I=N;N=arguments[1]||{};L=2}if(typeof N!=="object"&&!r.isFunction(N)){N={}}if(M==L){N=this;--L}for(;L<M;L++){if((K=arguments[L])!=null){for(var J in K){var O=N[J],P=K[J];if(N===P){continue}if(I&&P&&typeof P==="object"&&!P.nodeType){N[J]=r.extend(I,O||(P.length!=null?[]:{}),P)}else{if(P!==h){N[J]=P}}}}}return N};var b=/z-?index|font-?weight|opacity|zoom|line-?height/i,u=document.defaultView||{},w=Object.prototype.toString;r.extend({noConflict:function(I){n.$=s;if(I){n.jQuery=C}return r},isFunction:function(I){return w.call(I)==="[object Function]"},isArray:function(I){return w.call(I)==="[object Array]"},isXMLDoc:function(I){return I.nodeType===9&&I.documentElement.nodeName!=="HTML"||!!I.ownerDocument&&r.isXMLDoc(I.ownerDocument)},globalEval:function(K){if(K&&/\S/.test(K)){var J=document.getElementsByTagName("head")[0]||document.documentElement,I=document.createElement("script");I.type="text/javascript";if(r.support.scriptEval){I.appendChild(document.createTextNode(K))}else{I.text=K}J.insertBefore(I,J.firstChild);J.removeChild(I)}},nodeName:function(J,I){return J.nodeName&&J.nodeName.toUpperCase()==I.toUpperCase()},each:function(K,O,J){var I,L=0,M=K.length;
if(J){if(M===h){for(I in K){if(O.apply(K[I],J)===false){break}}}else{for(;L<M;){if(O.apply(K[L++],J)===false){break}}}}else{if(M===h){for(I in K){if(O.call(K[I],I,K[I])===false){break}}}else{for(var N=K[0];L<M&&O.call(N,L,N)!==false;N=K[++L]){}}}return K},prop:function(L,M,K,J,I){if(r.isFunction(M)){M=M.call(L,J)}return typeof M==="number"&&K=="curCSS"&&!b.test(I)?M+"px":M},className:{add:function(I,J){r.each((J||"").split(/\s+/),function(K,L){if(I.nodeType==1&&!r.className.has(I.className,L)){I.className+=(I.className?" ":"")+L}})},remove:function(I,J){if(I.nodeType==1){I.className=J!==h?r.grep(I.className.split(/\s+/),function(K){return !r.className.has(J,K)}).join(" "):""}},has:function(J,I){return J&&r.inArray(I,(J.className||J).toString().split(/\s+/))>-1}},swap:function(L,K,M){var I={};for(var J in K){I[J]=L.style[J];L.style[J]=K[J]}M.call(L);for(var J in K){L.style[J]=I[J]}},css:function(L,J,N,I){if(J=="width"||J=="height"){var P,K={position:"absolute",visibility:"hidden",display:"block"},O=J=="width"?["Left","Right"]:["Top","Bottom"];function M(){P=J=="width"?L.offsetWidth:L.offsetHeight;if(I==="border"){return}r.each(O,function(){if(!I){P-=parseFloat(r.curCSS(L,"padding"+this,true))||0}if(I==="margin"){P+=parseFloat(r.curCSS(L,"margin"+this,true))||0}else{P-=parseFloat(r.curCSS(L,"border"+this+"Width",true))||0}})}if(L.offsetWidth!==0){M()}else{r.swap(L,K,M)}return Math.max(0,Math.round(P))}return r.curCSS(L,J,N)},curCSS:function(M,J,K){var P,I=M.style;if(J=="opacity"&&!r.support.opacity){P=r.attr(I,"opacity");return P==""?"1":P}if(J.match(/float/i)){J=A}if(!K&&I&&I[J]){P=I[J]}else{if(u.getComputedStyle){if(J.match(/float/i)){J="float"}J=J.replace(/([A-Z])/g,"-$1").toLowerCase();var Q=u.getComputedStyle(M,null);if(Q){P=Q.getPropertyValue(J)}if(J=="opacity"&&P==""){P="1"}}else{if(M.currentStyle){var N=J.replace(/\-(\w)/g,function(R,S){return S.toUpperCase()});P=M.currentStyle[J]||M.currentStyle[N];if(!/^\d+(px)?$/i.test(P)&&/^\d/.test(P)){var L=I.left,O=M.runtimeStyle.left;M.runtimeStyle.left=M.currentStyle.left;I.left=P||0;P=I.pixelLeft+"px";I.left=L;M.runtimeStyle.left=O}}}}return P},clean:function(J,O,M){O=O||document;if(typeof O.createElement==="undefined"){O=O.ownerDocument||O[0]&&O[0].ownerDocument||document}if(!M&&J.length===1&&typeof J[0]==="string"){var L=/^<(\w+)\s*\/?>$/.exec(J[0]);if(L){return[O.createElement(L[1])]}}var K=[],I=[],P=O.createElement("div");r.each(J,function(T,W){if(typeof W==="number"){W+=""}if(!W){return}if(typeof W==="string"){W=W.replace(/(<(\w+)[^>]*?)\/>/g,function(Y,Z,X){return X.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?Y:Z+"></"+X+">"});var S=W.replace(/^\s+/,"").substring(0,10).toLowerCase();var U=!S.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!S.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||S.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!S.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!S.indexOf("<td")||!S.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!S.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!r.support.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];P.innerHTML=U[1]+W+U[2];while(U[0]--){P=P.lastChild}if(!r.support.tbody){var V=/<tbody/i.test(W),R=!S.indexOf("<table")&&!V?P.firstChild&&P.firstChild.childNodes:U[1]=="<table>"&&!V?P.childNodes:[];for(var Q=R.length-1;Q>=0;--Q){if(r.nodeName(R[Q],"tbody")&&!R[Q].childNodes.length){R[Q].parentNode.removeChild(R[Q])}}}if(!r.support.leadingWhitespace&&/^\s/.test(W)){P.insertBefore(O.createTextNode(W.match(/^\s*/)[0]),P.firstChild)}W=r.makeArray(P.childNodes)}if(W.nodeType){K.push(W)}else{K=r.merge(K,W)}});if(M){for(var N=0;K[N];N++){if(r.nodeName(K[N],"script")&&(!K[N].type||K[N].type.toLowerCase()==="text/javascript")){I.push(K[N].parentNode?K[N].parentNode.removeChild(K[N]):K[N])}else{if(K[N].nodeType===1){K.splice.apply(K,[N+1,0].concat(r.makeArray(K[N].getElementsByTagName("script"))))}M.appendChild(K[N])}}return I}return K},attr:function(N,K,O){if(!N||N.nodeType==3||N.nodeType==8){return h}var L=!r.isXMLDoc(N),P=O!==h;K=L&&r.props[K]||K;if(N.tagName){var J=/href|src|style/.test(K);if(K=="selected"&&N.parentNode){N.parentNode.selectedIndex}if(K in N&&L&&!J){if(P){if(K=="type"&&r.nodeName(N,"input")&&N.parentNode){throw"type property can't be changed"}N[K]=O}if(r.nodeName(N,"form")&&N.getAttributeNode(K)){return N.getAttributeNode(K).nodeValue}if(K=="tabIndex"){var M=N.getAttributeNode("tabIndex");return M&&M.specified?M.value:N.nodeName.match(/(button|input|object|select|textarea)/i)?0:N.nodeName.match(/^(a|area)$/i)&&N.href?0:h}return N[K]}if(!r.support.style&&L&&K=="style"){return r.attr(N.style,"cssText",O)}if(P){N.setAttribute(K,""+O)}var I=!r.support.hrefNormalized&&L&&J?N.getAttribute(K,2):N.getAttribute(K);return I===null?h:I}if(!r.support.opacity&&K=="opacity"){if(P){N.zoom=1;N.filter=(N.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(O)+""=="NaN"?"":"alpha(opacity="+O*100+")")}return N.filter&&N.filter.indexOf("opacity=")>=0?(parseFloat(N.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}K=K.replace(/-([a-z])/ig,function(Q,R){return R.toUpperCase()});if(P){N[K]=O}return N[K]},trim:function(I){return(I||"").replace(/^\s+|\s+$/g,"")},makeArray:function(K){var I=[];if(K!=null){var J=K.length;if(J==null||typeof K==="string"||r.isFunction(K)||K.setInterval){I[0]=K}else{while(J){I[--J]=K[J]}}}return I},inArray:function(K,L){for(var I=0,J=L.length;I<J;I++){if(L[I]===K){return I}}return -1},merge:function(L,I){var J=0,K,M=L.length;if(!r.support.getAll){while((K=I[J++])!=null){if(K.nodeType!=8){L[M++]=K}}}else{while((K=I[J++])!=null){L[M++]=K}}return L},unique:function(O){var J=[],I={};try{for(var K=0,L=O.length;K<L;K++){var N=r.data(O[K]);if(!I[N]){I[N]=true;J.push(O[K])}}}catch(M){J=O}return J},grep:function(J,N,I){var K=[];for(var L=0,M=J.length;L<M;L++){if(!I!=!N(J[L],L)){K.push(J[L])}}return K},map:function(I,N){var J=[];for(var K=0,L=I.length;K<L;K++){var M=N(I[K],K);if(M!=null){J[J.length]=M}}return J.concat.apply([],J)}});var G=navigator.userAgent.toLowerCase();r.browser={version:(G.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],safari:/webkit/.test(G),opera:/opera/.test(G),msie:/msie/.test(G)&&!/opera/.test(G),mozilla:/mozilla/.test(G)&&!/(compatible|webkit)/.test(G)};r.each({parent:function(I){return I.parentNode},parents:function(I){return r.dir(I,"parentNode")},next:function(I){return r.nth(I,2,"nextSibling")},prev:function(I){return r.nth(I,2,"previousSibling")},nextAll:function(I){return r.dir(I,"nextSibling")},prevAll:function(I){return r.dir(I,"previousSibling")},siblings:function(I){return r.sibling(I.parentNode.firstChild,I)},children:function(I){return r.sibling(I.firstChild)},contents:function(I){return r.nodeName(I,"iframe")?I.contentDocument||I.contentWindow.document:r.makeArray(I.childNodes)}},function(I,J){r.fn[I]=function(K){var L=r.map(this,J);if(K&&typeof K=="string"){L=r.multiFilter(K,L)}return this.pushStack(r.unique(L),I,K)}});r.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(I,J){r.fn[I]=function(K){var N=[],P=r(K);for(var O=0,L=P.length;O<L;O++){var M=(O>0?this.clone(true):this).get();r.fn[J].apply(r(P[O]),M);N=N.concat(M)}return this.pushStack(N,I,K)}});r.each({removeAttr:function(I){r.attr(this,I,"");if(this.nodeType==1){this.removeAttribute(I)}},addClass:function(I){r.className.add(this,I)},removeClass:function(I){r.className.remove(this,I)},toggleClass:function(J,I){if(typeof I!=="boolean"){I=!r.className.has(this,J)}r.className[I?"add":"remove"](this,J)},remove:function(I){if(!I||r.filter(I,[this]).length){r("*",this).add([this]).each(function(){r.event.remove(this);r.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){r(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(I,J){r.fn[I]=function(){return this.each(J,arguments)
}});function l(I,J){return I[0]&&parseInt(r.curCSS(I[0],J,true),10)||0}var j="jQuery"+f(),z=0,E={};r.extend({cache:{},data:function(J,I,K){J=J==n?E:J;var L=J[j];if(!L){L=J[j]=++z}if(I&&!r.cache[L]){r.cache[L]={}}if(K!==h){r.cache[L][I]=K}return I?r.cache[L][I]:L},removeData:function(J,I){J=J==n?E:J;var L=J[j];if(I){if(r.cache[L]){delete r.cache[L][I];I="";for(I in r.cache[L]){break}if(!I){r.removeData(J)}}}else{try{delete J[j]}catch(K){if(J.removeAttribute){J.removeAttribute(j)}}delete r.cache[L]}},queue:function(J,I,L){if(J){I=(I||"fx")+"queue";var K=r.data(J,I);if(!K||r.isArray(L)){K=r.data(J,I,r.makeArray(L))}else{if(L){K.push(L)}}}return K},dequeue:function(L,K){var I=r.queue(L,K),J=I.shift();if(!K||K==="fx"){J=I[0]}if(J!==h){J.call(L)}}});r.fn.extend({data:function(I,K){var L=I.split(".");L[1]=L[1]?"."+L[1]:"";if(K===h){var J=this.triggerHandler("getData"+L[1]+"!",[L[0]]);if(J===h&&this.length){J=r.data(this[0],I)}return J===h&&L[1]?this.data(L[0]):J}else{return this.trigger("setData"+L[1]+"!",[L[0],K]).each(function(){r.data(this,I,K)})}},removeData:function(I){return this.each(function(){r.removeData(this,I)})},queue:function(I,J){if(typeof I!=="string"){J=I;I="fx"}if(J===h){return r.queue(this[0],I)}return this.each(function(){var K=r.queue(this,I,J);if(I=="fx"&&K.length==1){K[0].call(this)}})},dequeue:function(I){return this.each(function(){r.dequeue(this,I)})}});
/*
 * Sizzle CSS Selector Engine - v0.9.3
 *  Copyright 2009, The Dojo Foundation
 *  Released under the MIT, BSD, and GPL Licenses.
 *  More information: http://sizzlejs.com/
 */
(function(){var V=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,P=0,L=Object.prototype.toString;var J=function(ac,Y,af,ag){af=af||[];Y=Y||document;if(Y.nodeType!==1&&Y.nodeType!==9){return[]}if(!ac||typeof ac!=="string"){return af}var ad=[],aa,aj,am,X,ah,Z,ab=true;V.lastIndex=0;while((aa=V.exec(ac))!==null){ad.push(aa[1]);if(aa[2]){Z=RegExp.rightContext;break}}if(ad.length>1&&Q.exec(ac)){if(ad.length===2&&M.relative[ad[0]]){aj=N(ad[0]+ad[1],Y)}else{aj=M.relative[ad[0]]?[Y]:J(ad.shift(),Y);while(ad.length){ac=ad.shift();if(M.relative[ac]){ac+=ad.shift()}aj=N(ac,aj)}}}else{var ai=ag?{expr:ad.pop(),set:I(ag)}:J.find(ad.pop(),ad.length===1&&Y.parentNode?Y.parentNode:Y,U(Y));aj=J.filter(ai.expr,ai.set);if(ad.length>0){am=I(aj)}else{ab=false}while(ad.length){var al=ad.pop(),ak=al;if(!M.relative[al]){al=""}else{ak=ad.pop()}if(ak==null){ak=Y}M.relative[al](am,ak,U(Y))}}if(!am){am=aj}if(!am){throw"Syntax error, unrecognized expression: "+(al||ac)}if(L.call(am)==="[object Array]"){if(!ab){af.push.apply(af,am)}else{if(Y.nodeType===1){for(var ae=0;am[ae]!=null;ae++){if(am[ae]&&(am[ae]===true||am[ae].nodeType===1&&O(Y,am[ae]))){af.push(aj[ae])}}}else{for(var ae=0;am[ae]!=null;ae++){if(am[ae]&&am[ae].nodeType===1){af.push(aj[ae])}}}}}else{I(am,af)}if(Z){J(Z,Y,af,ag);if(K){hasDuplicate=false;af.sort(K);if(hasDuplicate){for(var ae=1;ae<af.length;ae++){if(af[ae]===af[ae-1]){af.splice(ae--,1)}}}}}return af};J.matches=function(X,Y){return J(X,null,null,Y)};J.find=function(ae,X,af){var ad,ab;if(!ae){return[]}for(var aa=0,Z=M.order.length;aa<Z;aa++){var ac=M.order[aa],ab;if((ab=M.match[ac].exec(ae))){var Y=RegExp.leftContext;if(Y.substr(Y.length-1)!=="\\"){ab[1]=(ab[1]||"").replace(/\\/g,"");ad=M.find[ac](ab,X,af);if(ad!=null){ae=ae.replace(M.match[ac],"");break}}}}if(!ad){ad=X.getElementsByTagName("*")}return{set:ad,expr:ae}};J.filter=function(ah,ag,ak,aa){var Z=ah,am=[],ae=ag,ac,X,ad=ag&&ag[0]&&U(ag[0]);while(ah&&ag.length){for(var af in M.filter){if((ac=M.match[af].exec(ah))!=null){var Y=M.filter[af],al,aj;X=false;if(ae==am){am=[]}if(M.preFilter[af]){ac=M.preFilter[af](ac,ae,ak,am,aa,ad);if(!ac){X=al=true}else{if(ac===true){continue}}}if(ac){for(var ab=0;(aj=ae[ab])!=null;ab++){if(aj){al=Y(aj,ac,ab,ae);var ai=aa^!!al;if(ak&&al!=null){if(ai){X=true}else{ae[ab]=false}}else{if(ai){am.push(aj);X=true}}}}}if(al!==h){if(!ak){ae=am}ah=ah.replace(M.match[af],"");if(!X){return[]}break}}}if(ah==Z){if(X==null){throw"Syntax error, unrecognized expression: "+ah}else{break}}Z=ah}return ae};var M=J.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(X){return X.getAttribute("href")}},relative:{"+":function(ae,X,ad){var ab=typeof X==="string",af=ab&&!/\W/.test(X),ac=ab&&!af;if(af&&!ad){X=X.toUpperCase()}for(var aa=0,Z=ae.length,Y;aa<Z;aa++){if((Y=ae[aa])){while((Y=Y.previousSibling)&&Y.nodeType!==1){}ae[aa]=ac||Y&&Y.nodeName===X?Y||false:Y===X}}if(ac){J.filter(X,ae,true)}},">":function(ad,Y,ae){var ab=typeof Y==="string";if(ab&&!/\W/.test(Y)){Y=ae?Y:Y.toUpperCase();for(var Z=0,X=ad.length;Z<X;Z++){var ac=ad[Z];if(ac){var aa=ac.parentNode;ad[Z]=aa.nodeName===Y?aa:false}}}else{for(var Z=0,X=ad.length;Z<X;Z++){var ac=ad[Z];if(ac){ad[Z]=ab?ac.parentNode:ac.parentNode===Y}}if(ab){J.filter(Y,ad,true)}}},"":function(aa,Y,ac){var Z=P++,X=W;if(!Y.match(/\W/)){var ab=Y=ac?Y:Y.toUpperCase();X=T}X("parentNode",Y,Z,aa,ab,ac)},"~":function(aa,Y,ac){var Z=P++,X=W;if(typeof Y==="string"&&!Y.match(/\W/)){var ab=Y=ac?Y:Y.toUpperCase();X=T}X("previousSibling",Y,Z,aa,ab,ac)}},find:{ID:function(Y,Z,aa){if(typeof Z.getElementById!=="undefined"&&!aa){var X=Z.getElementById(Y[1]);return X?[X]:[]}},NAME:function(Z,ac,ad){if(typeof ac.getElementsByName!=="undefined"){var Y=[],ab=ac.getElementsByName(Z[1]);for(var aa=0,X=ab.length;aa<X;aa++){if(ab[aa].getAttribute("name")===Z[1]){Y.push(ab[aa])}}return Y.length===0?null:Y}},TAG:function(X,Y){return Y.getElementsByTagName(X[1])}},preFilter:{CLASS:function(aa,Y,Z,X,ad,ae){aa=" "+aa[1].replace(/\\/g,"")+" ";if(ae){return aa}for(var ab=0,ac;(ac=Y[ab])!=null;ab++){if(ac){if(ad^(ac.className&&(" "+ac.className+" ").indexOf(aa)>=0)){if(!Z){X.push(ac)}}else{if(Z){Y[ab]=false}}}}return false},ID:function(X){return X[1].replace(/\\/g,"")},TAG:function(Y,X){for(var Z=0;X[Z]===false;Z++){}return X[Z]&&U(X[Z])?Y[1]:Y[1].toUpperCase()},CHILD:function(X){if(X[1]=="nth"){var Y=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(X[2]=="even"&&"2n"||X[2]=="odd"&&"2n+1"||!/\D/.test(X[2])&&"0n+"+X[2]||X[2]);X[2]=(Y[1]+(Y[2]||1))-0;X[3]=Y[3]-0}X[0]=P++;return X},ATTR:function(ab,Y,Z,X,ac,ad){var aa=ab[1].replace(/\\/g,"");if(!ad&&M.attrMap[aa]){ab[1]=M.attrMap[aa]}if(ab[2]==="~="){ab[4]=" "+ab[4]+" "}return ab},PSEUDO:function(ab,Y,Z,X,ac){if(ab[1]==="not"){if(ab[3].match(V).length>1||/^\w/.test(ab[3])){ab[3]=J(ab[3],null,null,Y)}else{var aa=J.filter(ab[3],Y,Z,true^ac);if(!Z){X.push.apply(X,aa)}return false}}else{if(M.match.POS.test(ab[0])||M.match.CHILD.test(ab[0])){return true}}return ab},POS:function(X){X.unshift(true);return X}},filters:{enabled:function(X){return X.disabled===false&&X.type!=="hidden"},disabled:function(X){return X.disabled===true},checked:function(X){return X.checked===true},selected:function(X){X.parentNode.selectedIndex;return X.selected===true},parent:function(X){return !!X.firstChild},empty:function(X){return !X.firstChild},has:function(Z,Y,X){return !!J(X[3],Z).length},header:function(X){return/h\d/i.test(X.nodeName)},text:function(X){return"text"===X.type},radio:function(X){return"radio"===X.type},checkbox:function(X){return"checkbox"===X.type},file:function(X){return"file"===X.type},password:function(X){return"password"===X.type},submit:function(X){return"submit"===X.type},image:function(X){return"image"===X.type},reset:function(X){return"reset"===X.type},button:function(X){return"button"===X.type||X.nodeName.toUpperCase()==="BUTTON"
},input:function(X){return/input|select|textarea|button/i.test(X.nodeName)}},setFilters:{first:function(Y,X){return X===0},last:function(Z,Y,X,aa){return Y===aa.length-1},even:function(Y,X){return X%2===0},odd:function(Y,X){return X%2===1},lt:function(Z,Y,X){return Y<X[3]-0},gt:function(Z,Y,X){return Y>X[3]-0},nth:function(Z,Y,X){return X[3]-0==Y},eq:function(Z,Y,X){return X[3]-0==Y}},filter:{PSEUDO:function(ad,Z,aa,ae){var Y=Z[1],ab=M.filters[Y];if(ab){return ab(ad,aa,Z,ae)}else{if(Y==="contains"){return(ad.textContent||ad.innerText||"").indexOf(Z[3])>=0}else{if(Y==="not"){var ac=Z[3];for(var aa=0,X=ac.length;aa<X;aa++){if(ac[aa]===ad){return false}}return true}}}},CHILD:function(X,aa){var ad=aa[1],Y=X;switch(ad){case"only":case"first":while(Y=Y.previousSibling){if(Y.nodeType===1){return false}}if(ad=="first"){return true}Y=X;case"last":while(Y=Y.nextSibling){if(Y.nodeType===1){return false}}return true;case"nth":var Z=aa[2],ag=aa[3];if(Z==1&&ag==0){return true}var ac=aa[0],af=X.parentNode;if(af&&(af.sizcache!==ac||!X.nodeIndex)){var ab=0;for(Y=af.firstChild;Y;Y=Y.nextSibling){if(Y.nodeType===1){Y.nodeIndex=++ab}}af.sizcache=ac}var ae=X.nodeIndex-ag;if(Z==0){return ae==0}else{return(ae%Z==0&&ae/Z>=0)}}},ID:function(Y,X){return Y.nodeType===1&&Y.getAttribute("id")===X},TAG:function(Y,X){return(X==="*"&&Y.nodeType===1)||Y.nodeName===X},CLASS:function(Y,X){return(" "+(Y.className||Y.getAttribute("class"))+" ").indexOf(X)>-1},ATTR:function(ac,aa){var Z=aa[1],X=M.attrHandle[Z]?M.attrHandle[Z](ac):ac[Z]!=null?ac[Z]:ac.getAttribute(Z),ad=X+"",ab=aa[2],Y=aa[4];return X==null?ab==="!=":ab==="="?ad===Y:ab==="*="?ad.indexOf(Y)>=0:ab==="~="?(" "+ad+" ").indexOf(Y)>=0:!Y?ad&&X!==false:ab==="!="?ad!=Y:ab==="^="?ad.indexOf(Y)===0:ab==="$="?ad.substr(ad.length-Y.length)===Y:ab==="|="?ad===Y||ad.substr(0,Y.length+1)===Y+"-":false},POS:function(ab,Y,Z,ac){var X=Y[2],aa=M.setFilters[X];if(aa){return aa(ab,Z,Y,ac)}}}};var Q=M.match.POS;for(var S in M.match){M.match[S]=RegExp(M.match[S].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var I=function(Y,X){Y=Array.prototype.slice.call(Y);if(X){X.push.apply(X,Y);return X}return Y};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(R){I=function(ab,aa){var Y=aa||[];if(L.call(ab)==="[object Array]"){Array.prototype.push.apply(Y,ab)}else{if(typeof ab.length==="number"){for(var Z=0,X=ab.length;Z<X;Z++){Y.push(ab[Z])}}else{for(var Z=0;ab[Z];Z++){Y.push(ab[Z])}}}return Y}}var K;if(document.documentElement.compareDocumentPosition){K=function(Y,X){var Z=Y.compareDocumentPosition(X)&4?-1:Y===X?0:1;if(Z===0){hasDuplicate=true}return Z}}else{if("sourceIndex" in document.documentElement){K=function(Y,X){var Z=Y.sourceIndex-X.sourceIndex;if(Z===0){hasDuplicate=true}return Z}}else{if(document.createRange){K=function(aa,Y){var Z=aa.ownerDocument.createRange(),X=Y.ownerDocument.createRange();Z.selectNode(aa);Z.collapse(true);X.selectNode(Y);X.collapse(true);var ab=Z.compareBoundaryPoints(Range.START_TO_END,X);if(ab===0){hasDuplicate=true}return ab}}}}(function(){var Y=document.createElement("form"),Z="script"+(new Date).getTime();Y.innerHTML="<input name='"+Z+"'/>";var X=document.documentElement;X.insertBefore(Y,X.firstChild);if(!!document.getElementById(Z)){M.find.ID=function(ab,ac,ad){if(typeof ac.getElementById!=="undefined"&&!ad){var aa=ac.getElementById(ab[1]);return aa?aa.id===ab[1]||typeof aa.getAttributeNode!=="undefined"&&aa.getAttributeNode("id").nodeValue===ab[1]?[aa]:h:[]}};M.filter.ID=function(ac,aa){var ab=typeof ac.getAttributeNode!=="undefined"&&ac.getAttributeNode("id");return ac.nodeType===1&&ab&&ab.nodeValue===aa}}X.removeChild(Y)})();(function(){var X=document.createElement("div");X.appendChild(document.createComment(""));if(X.getElementsByTagName("*").length>0){M.find.TAG=function(Y,ac){var ab=ac.getElementsByTagName(Y[1]);if(Y[1]==="*"){var aa=[];for(var Z=0;ab[Z];Z++){if(ab[Z].nodeType===1){aa.push(ab[Z])}}ab=aa}return ab}}X.innerHTML="<a href='#'></a>";if(X.firstChild&&typeof X.firstChild.getAttribute!=="undefined"&&X.firstChild.getAttribute("href")!=="#"){M.attrHandle.href=function(Y){return Y.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var X=J,Y=document.createElement("div");Y.innerHTML="<p class='TEST'></p>";if(Y.querySelectorAll&&Y.querySelectorAll(".TEST").length===0){return}J=function(ac,ab,Z,aa){ab=ab||document;if(!aa&&ab.nodeType===9&&!U(ab)){try{return I(ab.querySelectorAll(ac),Z)}catch(ad){}}return X(ac,ab,Z,aa)};J.find=X.find;J.filter=X.filter;J.selectors=X.selectors;J.matches=X.matches})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var X=document.createElement("div");X.innerHTML="<div class='test e'></div><div class='test'></div>";if(X.getElementsByClassName("e").length===0){return}X.lastChild.className="e";if(X.getElementsByClassName("e").length===1){return}M.order.splice(1,0,"CLASS");M.find.CLASS=function(Y,Z,aa){if(typeof Z.getElementsByClassName!=="undefined"&&!aa){return Z.getElementsByClassName(Y[1])}}})()}function T(Y,ad,ac,ah,ae,ag){var af=Y=="previousSibling"&&!ag;for(var aa=0,Z=ah.length;aa<Z;aa++){var X=ah[aa];if(X){if(af&&X.nodeType===1){X.sizcache=ac;X.sizset=aa}X=X[Y];var ab=false;while(X){if(X.sizcache===ac){ab=ah[X.sizset];break}if(X.nodeType===1&&!ag){X.sizcache=ac;X.sizset=aa}if(X.nodeName===ad){ab=X;break}X=X[Y]}ah[aa]=ab}}}function W(Y,ad,ac,ah,ae,ag){var af=Y=="previousSibling"&&!ag;for(var aa=0,Z=ah.length;aa<Z;aa++){var X=ah[aa];if(X){if(af&&X.nodeType===1){X.sizcache=ac;X.sizset=aa}X=X[Y];var ab=false;while(X){if(X.sizcache===ac){ab=ah[X.sizset];break}if(X.nodeType===1){if(!ag){X.sizcache=ac;X.sizset=aa}if(typeof ad!=="string"){if(X===ad){ab=true;break}}else{if(J.filter(ad,[X]).length>0){ab=X;break}}}X=X[Y]}ah[aa]=ab}}}var O=document.compareDocumentPosition?function(Y,X){return Y.compareDocumentPosition(X)&16}:function(Y,X){return Y!==X&&(Y.contains?Y.contains(X):true)};var U=function(X){return X.nodeType===9&&X.documentElement.nodeName!=="HTML"||!!X.ownerDocument&&U(X.ownerDocument)};var N=function(X,ae){var aa=[],ab="",ac,Z=ae.nodeType?[ae]:ae;while((ac=M.match.PSEUDO.exec(X))){ab+=ac[0];X=X.replace(M.match.PSEUDO,"")}X=M.relative[X]?X+"*":X;for(var ad=0,Y=Z.length;ad<Y;ad++){J(X,Z[ad],aa)}return J.filter(ab,aa)};r.find=J;r.filter=J.filter;r.expr=J.selectors;r.expr[":"]=r.expr.filters;J.selectors.filters.hidden=function(X){return X.offsetWidth===0||X.offsetHeight===0};J.selectors.filters.visible=function(X){return X.offsetWidth>0||X.offsetHeight>0};J.selectors.filters.animated=function(X){return r.grep(r.timers,function(Y){return X===Y.elem}).length};r.multiFilter=function(Z,X,Y){if(Y){Z=":not("+Z+")"}return J.matches(Z,X)};r.dir=function(Z,Y){var X=[],aa=Z[Y];while(aa&&aa!=document){if(aa.nodeType==1){X.push(aa)}aa=aa[Y]}return X};r.nth=function(ab,X,Z,aa){X=X||1;var Y=0;for(;ab;ab=ab[Z]){if(ab.nodeType==1&&++Y==X){break}}return ab};r.sibling=function(Z,Y){var X=[];for(;Z;Z=Z.nextSibling){if(Z.nodeType==1&&Z!=Y){X.push(Z)}}return X};return;n.Sizzle=J})();r.event={add:function(M,J,L,O){if(M.nodeType==3||M.nodeType==8){return}if(M.setInterval&&M!=n){M=n}if(!L.guid){L.guid=this.guid++}if(O!==h){var K=L;L=this.proxy(K);L.data=O}var I=r.data(M,"events")||r.data(M,"events",{}),N=r.data(M,"handle")||r.data(M,"handle",function(){return typeof r!=="undefined"&&!r.event.triggered?r.event.handle.apply(arguments.callee.elem,arguments):h});N.elem=M;r.each(J.split(/\s+/),function(Q,R){var S=R.split(".");R=S.shift();L.type=S.slice().sort().join(".");var P=I[R];if(r.event.specialAll[R]){r.event.specialAll[R].setup.call(M,O,S)}if(!P){P=I[R]={};if(!r.event.special[R]||r.event.special[R].setup.call(M,O,S)===false){if(M.addEventListener){M.addEventListener(R,N,false)}else{if(M.attachEvent){M.attachEvent("on"+R,N)}}}}P[L.guid]=L;r.event.global[R]=true});M=null},guid:1,global:{},remove:function(O,L,N){if(O.nodeType==3||O.nodeType==8){return}var K=r.data(O,"events"),J,I;if(K){if(L===h||(typeof L==="string"&&L.charAt(0)==".")){for(var M in K){this.remove(O,M+(L||""))
}}else{if(L.type){N=L.handler;L=L.type}r.each(L.split(/\s+/),function(Q,S){var U=S.split(".");S=U.shift();var R=RegExp("(^|\\.)"+U.slice().sort().join(".*\\.")+"(\\.|$)");if(K[S]){if(N){delete K[S][N.guid]}else{for(var T in K[S]){if(R.test(K[S][T].type)){delete K[S][T]}}}if(r.event.specialAll[S]){r.event.specialAll[S].teardown.call(O,U)}for(J in K[S]){break}if(!J){if(!r.event.special[S]||r.event.special[S].teardown.call(O,U)===false){if(O.removeEventListener){O.removeEventListener(S,r.data(O,"handle"),false)}else{if(O.detachEvent){O.detachEvent("on"+S,r.data(O,"handle"))}}}J=null;delete K[S]}}})}for(J in K){break}if(!J){var P=r.data(O,"handle");if(P){P.elem=null}r.removeData(O,"events");r.removeData(O,"handle")}}},trigger:function(M,O,L,I){var K=M.type||M;if(!I){M=typeof M==="object"?M[j]?M:r.extend(r.Event(K),M):r.Event(K);if(K.indexOf("!")>=0){M.type=K=K.slice(0,-1);M.exclusive=true}if(!L){M.stopPropagation();if(this.global[K]){r.each(r.cache,function(){if(this.events&&this.events[K]){r.event.trigger(M,O,this.handle.elem)}})}}if(!L||L.nodeType==3||L.nodeType==8){return h}M.result=h;M.target=L;O=r.makeArray(O);O.unshift(M)}M.currentTarget=L;var N=r.data(L,"handle");if(N){N.apply(L,O)}if((!L[K]||(r.nodeName(L,"a")&&K=="click"))&&L["on"+K]&&L["on"+K].apply(L,O)===false){M.result=false}if(!I&&L[K]&&!M.isDefaultPrevented()&&!(r.nodeName(L,"a")&&K=="click")){this.triggered=true;try{L[K]()}catch(P){}}this.triggered=false;if(!M.isPropagationStopped()){var J=L.parentNode||L.ownerDocument;if(J){r.event.trigger(M,O,J,true)}}},handle:function(O){var N,I;O=arguments[0]=r.event.fix(O||n.event);O.currentTarget=this;var P=O.type.split(".");O.type=P.shift();N=!P.length&&!O.exclusive;var M=RegExp("(^|\\.)"+P.slice().sort().join(".*\\.")+"(\\.|$)");I=(r.data(this,"events")||{})[O.type];for(var K in I){var L=I[K];if(N||M.test(L.type)){O.handler=L;O.data=L.data;var J=L.apply(this,arguments);if(J!==h){O.result=J;if(J===false){O.preventDefault();O.stopPropagation()}}if(O.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(L){if(L[j]){return L}var J=L;L=r.Event(J);for(var K=this.props.length,N;K;){N=this.props[--K];L[N]=J[N]}if(!L.target){L.target=L.srcElement||document}if(L.target.nodeType==3){L.target=L.target.parentNode}if(!L.relatedTarget&&L.fromElement){L.relatedTarget=L.fromElement==L.target?L.toElement:L.fromElement}if(L.pageX==null&&L.clientX!=null){var M=document.documentElement,I=document.body;L.pageX=L.clientX+(M&&M.scrollLeft||I&&I.scrollLeft||0)-(M.clientLeft||0);L.pageY=L.clientY+(M&&M.scrollTop||I&&I.scrollTop||0)-(M.clientTop||0)}if(!L.which&&((L.charCode||L.charCode===0)?L.charCode:L.keyCode)){L.which=L.charCode||L.keyCode}if(!L.metaKey&&L.ctrlKey){L.metaKey=L.ctrlKey}if(!L.which&&L.button){L.which=(L.button&1?1:(L.button&2?3:(L.button&4?2:0)))}return L},proxy:function(J,I){I=I||function(){return J.apply(this,arguments)};I.guid=J.guid=J.guid||I.guid||this.guid++;return I},special:{ready:{setup:F,teardown:function(){}}},specialAll:{live:{setup:function(I,J){r.event.add(this,J[0],c)},teardown:function(K){if(K.length){var I=0,J=RegExp("(^|\\.)"+K[0]+"(\\.|$)");r.each((r.data(this,"events").live||{}),function(){if(J.test(this.type)){I++}});if(I<1){r.event.remove(this,K[0],c)}}}}}};r.Event=function(I){if(!this.preventDefault){return new r.Event(I)}if(I&&I.type){this.originalEvent=I;this.type=I.type}else{this.type=I}this.timeStamp=f();this[j]=true};function m(){return false}function y(){return true}r.Event.prototype={preventDefault:function(){this.isDefaultPrevented=y;var I=this.originalEvent;if(!I){return}if(I.preventDefault){I.preventDefault()}I.returnValue=false},stopPropagation:function(){this.isPropagationStopped=y;var I=this.originalEvent;if(!I){return}if(I.stopPropagation){I.stopPropagation()}I.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=y;this.stopPropagation()},isDefaultPrevented:m,isPropagationStopped:m,isImmediatePropagationStopped:m};var a=function(J){var I=J.relatedTarget;while(I&&I!=this){try{I=I.parentNode}catch(K){I=this}}if(I!=this){J.type=J.data;r.event.handle.apply(this,arguments)}};r.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(J,I){r.event.special[I]={setup:function(){r.event.add(this,J,a,I)},teardown:function(){r.event.remove(this,J,a)}}});r.fn.extend({bind:function(J,K,I){return J=="unload"?this.one(J,K,I):this.each(function(){r.event.add(this,J,I||K,I&&K)})},one:function(K,L,J){var I=r.event.proxy(J||L,function(M){r(this).unbind(M,I);return(J||L).apply(this,arguments)});return this.each(function(){r.event.add(this,K,I,J&&L)})},unbind:function(J,I){return this.each(function(){r.event.remove(this,J,I)})},trigger:function(I,J){return this.each(function(){r.event.trigger(I,J,this)})},triggerHandler:function(I,K){if(this[0]){var J=r.Event(I);J.preventDefault();J.stopPropagation();r.event.trigger(J,K,this[0]);return J.result}},toggle:function(K){var I=arguments,J=1;while(J<I.length){r.event.proxy(K,I[J++])}return this.click(r.event.proxy(K,function(L){this.lastToggle=(this.lastToggle||0)%J;L.preventDefault();return I[this.lastToggle++].apply(this,arguments)||false}))},hover:function(I,J){return this.mouseenter(I).mouseleave(J)},ready:function(I){F();if(r.isReady){I.call(document,r)}else{r.readyList.push(I)}return this},live:function(K,J){var I=r.event.proxy(J);I.guid+=this.selector+K;r(document).bind(k(K,this.selector),this.selector,I);return this},die:function(J,I){r(document).unbind(k(J,this.selector),I?{guid:I.guid+this.selector+J}:null);return this}});function c(L){var I=RegExp("(^|\\.)"+L.type+"(\\.|$)"),K=true,J=[];r.each(r.data(this,"events").live||[],function(M,N){if(I.test(N.type)){var O=r(L.target).closest(N.data)[0];if(O){J.push({elem:O,fn:N})}}});J.sort(function(N,M){return r.data(N.elem,"closest")-r.data(M.elem,"closest")});r.each(J,function(){if(this.fn.call(this.elem,L,this.fn.data)===false){return(K=false)}});return K}function k(J,I){return["live",J,I.replace(/\./g,"`").replace(/ /g,"|")].join(".")}r.extend({isReady:false,readyList:[],ready:function(){if(!r.isReady){r.isReady=true;if(r.readyList){r.each(r.readyList,function(){this.call(document,r)});r.readyList=null}r(document).triggerHandler("ready")}}});var B=false;function F(){if(B){return}B=true;if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false);r.ready()},false)}else{if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);r.ready()}});if(document.documentElement.doScroll&&n==n.top){(function(){if(r.isReady){return}try{document.documentElement.doScroll("left")}catch(I){setTimeout(arguments.callee,0);return}r.ready()})()}}}r.event.add(n,"load",r.ready)}r.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(J,I){r.fn[I]=function(K){return K?this.bind(I,K):this.trigger(I)}});r(n).bind("unload",function(){for(var I in r.cache){if(I!=1&&r.cache[I].handle){r.event.remove(r.cache[I].handle.elem)}}});(function(){r.support={};var J=document.documentElement,K=document.createElement("script"),O=document.createElement("div"),N="script"+(new Date).getTime();O.style.display="none";O.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 L=O.getElementsByTagName("*"),I=O.getElementsByTagName("a")[0];if(!L||!L.length||!I){return}r.support={leadingWhitespace:O.firstChild.nodeType==3,tbody:!O.getElementsByTagName("tbody").length,objectAll:!!O.getElementsByTagName("object")[0].getElementsByTagName("*").length,htmlSerialize:!!O.getElementsByTagName("link").length,style:/red/.test(I.getAttribute("style")),hrefNormalized:I.getAttribute("href")==="/a",opacity:I.style.opacity==="0.5",cssFloat:!!I.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};
K.type="text/javascript";try{K.appendChild(document.createTextNode("window."+N+"=1;"))}catch(M){}J.insertBefore(K,J.firstChild);if(n[N]){r.support.scriptEval=true;delete n[N]}J.removeChild(K);if(O.attachEvent&&O.fireEvent){O.attachEvent("onclick",function(){r.support.noCloneEvent=false;O.detachEvent("onclick",arguments.callee)});O.cloneNode(true).fireEvent("onclick")}r(function(){var P=document.createElement("div");P.style.width=P.style.paddingLeft="1px";document.body.appendChild(P);r.boxModel=r.support.boxModel=P.offsetWidth===2;document.body.removeChild(P).style.display="none"})})();var A=r.support.cssFloat?"cssFloat":"styleFloat";r.props={"for":"htmlFor","class":"className","float":A,cssFloat:A,styleFloat:A,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",tabindex:"tabIndex"};r.fn.extend({_load:r.fn.load,load:function(K,N,O){if(typeof K!=="string"){return this._load(K)}var M=K.indexOf(" ");if(M>=0){var I=K.slice(M,K.length);K=K.slice(0,M)}var L="GET";if(N){if(r.isFunction(N)){O=N;N=null}else{if(typeof N==="object"){N=r.param(N);L="POST"}}}var J=this;r.ajax({url:K,type:L,dataType:"html",data:N,complete:function(Q,P){if(P=="success"||P=="notmodified"){J.html(I?r("<div/>").append(Q.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(I):Q.responseText)}if(O){J.each(O,[Q.responseText,P,Q])}}});return this},serialize:function(){return r.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?r.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(I,J){var K=r(this).val();return K==null?null:r.isArray(K)?r.map(K,function(M,L){return{name:J.name,value:M}}):{name:J.name,value:K}}).get()}});r.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(I,J){r.fn[J]=function(K){return this.bind(J,K)}});var v=f();r.extend({get:function(I,K,L,J){if(r.isFunction(K)){L=K;K=null}return r.ajax({type:"GET",url:I,data:K,success:L,dataType:J})},getScript:function(I,J){return r.get(I,null,J,"script")},getJSON:function(I,J,K){return r.get(I,J,K,"json")},post:function(I,K,L,J){if(r.isFunction(K)){L=K;K={}}return r.ajax({type:"POST",url:I,data:K,success:L,dataType:J})},ajaxSetup:function(I){r.extend(r.ajaxSettings,I)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return n.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(Q){Q=r.extend(true,Q,r.extend(true,{},r.ajaxSettings,Q));var aa,J=/=\?(&|$)/g,V,Z,K=Q.type.toUpperCase();if(Q.data&&Q.processData&&typeof Q.data!=="string"){Q.data=r.param(Q.data)}if(Q.dataType=="jsonp"){if(K=="GET"){if(!Q.url.match(J)){Q.url+=(Q.url.match(/\?/)?"&":"?")+(Q.jsonp||"callback")+"=?"}}else{if(!Q.data||!Q.data.match(J)){Q.data=(Q.data?Q.data+"&":"")+(Q.jsonp||"callback")+"=?"}}Q.dataType="json"}if(Q.dataType=="json"&&(Q.data&&Q.data.match(J)||Q.url.match(J))){aa="jsonp"+v++;if(Q.data){Q.data=(Q.data+"").replace(J,"="+aa+"$1")}Q.url=Q.url.replace(J,"="+aa+"$1");Q.dataType="script";n[aa]=function(ab){Z=ab;M();P();n[aa]=h;try{delete n[aa]}catch(ac){}if(L){L.removeChild(X)}}}if(Q.dataType=="script"&&Q.cache==null){Q.cache=false}if(Q.cache===false&&K=="GET"){var I=f();var Y=Q.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+I+"$2");Q.url=Y+((Y==Q.url)?(Q.url.match(/\?/)?"&":"?")+"_="+I:"")}if(Q.data&&K=="GET"){Q.url+=(Q.url.match(/\?/)?"&":"?")+Q.data;Q.data=null}if(Q.global&&!r.active++){r.event.trigger("ajaxStart")}var U=/^(\w+:)?\/\/([^\/?#]+)/.exec(Q.url);if(Q.dataType=="script"&&K=="GET"&&U&&(U[1]&&U[1]!=location.protocol||U[2]!=location.host)){var L=document.getElementsByTagName("head")[0];var X=document.createElement("script");X.src=Q.url;if(Q.scriptCharset){X.charset=Q.scriptCharset}if(!aa){var S=false;X.onload=X.onreadystatechange=function(){if(!S&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){S=true;M();P();X.onload=X.onreadystatechange=null;L.removeChild(X)}}}L.appendChild(X);return h}var O=false;var N=Q.xhr();if(Q.username){N.open(K,Q.url,Q.async,Q.username,Q.password)}else{N.open(K,Q.url,Q.async)}try{if(Q.data){N.setRequestHeader("Content-Type",Q.contentType)}if(Q.ifModified){N.setRequestHeader("If-Modified-Since",r.lastModified[Q.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}N.setRequestHeader("X-Requested-With","XMLHttpRequest");N.setRequestHeader("Accept",Q.dataType&&Q.accepts[Q.dataType]?Q.accepts[Q.dataType]+", */*":Q.accepts._default)}catch(W){}if(Q.beforeSend&&Q.beforeSend(N,Q)===false){if(Q.global&&!--r.active){r.event.trigger("ajaxStop")}N.abort();return false}if(Q.global){r.event.trigger("ajaxSend",[N,Q])}var R=function(ab){if(N.readyState==0){if(T){clearInterval(T);T=null;if(Q.global&&!--r.active){r.event.trigger("ajaxStop")}}}else{if(!O&&N&&(N.readyState==4||ab=="timeout")){O=true;if(T){clearInterval(T);T=null}V=ab=="timeout"?"timeout":!r.httpSuccess(N)?"error":Q.ifModified&&r.httpNotModified(N,Q.url)?"notmodified":"success";if(V=="success"){try{Z=r.httpData(N,Q.dataType,Q)}catch(ad){V="parsererror"}}if(V=="success"){var ac;try{ac=N.getResponseHeader("Last-Modified")}catch(ad){}if(Q.ifModified&&ac){r.lastModified[Q.url]=ac}if(!aa){M()}}else{r.handleError(Q,N,V)}P();if(ab){N.abort()}if(Q.async){N=null}}}};if(Q.async){var T=setInterval(R,13);if(Q.timeout>0){setTimeout(function(){if(N&&!O){R("timeout")}},Q.timeout)}}try{N.send(Q.data)}catch(W){r.handleError(Q,N,null,W)}if(!Q.async){R()}function M(){if(Q.success){Q.success(Z,V)}if(Q.global){r.event.trigger("ajaxSuccess",[N,Q])}}function P(){if(Q.complete){Q.complete(N,V)}if(Q.global){r.event.trigger("ajaxComplete",[N,Q])}if(Q.global&&!--r.active){r.event.trigger("ajaxStop")}}return N},handleError:function(J,L,I,K){if(J.error){J.error(L,I,K)}if(J.global){r.event.trigger("ajaxError",[L,J,K])}},active:0,httpSuccess:function(J){try{return !J.status&&location.protocol=="file:"||(J.status>=200&&J.status<300)||J.status==304||J.status==1223}catch(I){}return false},httpNotModified:function(K,I){try{var L=K.getResponseHeader("Last-Modified");return K.status==304||L==r.lastModified[I]}catch(J){}return false},httpData:function(N,L,K){var J=N.getResponseHeader("content-type"),I=L=="xml"||!L&&J&&J.indexOf("xml")>=0,M=I?N.responseXML:N.responseText;if(I&&M.documentElement.tagName=="parsererror"){throw"parsererror"}if(K&&K.dataFilter){M=K.dataFilter(M,L)}if(typeof M==="string"){if(L=="script"){r.globalEval(M)}if(L=="json"){M=n["eval"]("("+M+")")}}return M},param:function(I){var K=[];function L(M,N){K[K.length]=encodeURIComponent(M)+"="+encodeURIComponent(N)}if(r.isArray(I)||I.jquery){r.each(I,function(){L(this.name,this.value)})}else{for(var J in I){if(r.isArray(I[J])){r.each(I[J],function(){L(J,this)})}else{L(J,r.isFunction(I[J])?I[J]():I[J])}}}return K.join("&").replace(/%20/g,"+")}});var o={},p,e=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function x(J,I){var K={};r.each(e.concat.apply([],e.slice(0,I)),function(){K[this]=J});return K}r.fn.extend({show:function(N,P){if(N){return this.animate(x("show",3),N,P)}else{for(var L=0,J=this.length;L<J;L++){var I=r.data(this[L],"olddisplay");this[L].style.display=I||"";if(r.css(this[L],"display")==="none"){var K=this[L].tagName,O;if(o[K]){O=o[K]}else{var M=r("<"+K+" />").appendTo("body");O=M.css("display");if(O==="none"){O="block"}M.remove();o[K]=O}r.data(this[L],"olddisplay",O)}}for(var L=0,J=this.length;L<J;L++){this[L].style.display=r.data(this[L],"olddisplay")||""}return this}},hide:function(L,M){if(L){return this.animate(x("hide",3),L,M)
}else{for(var K=0,J=this.length;K<J;K++){var I=r.data(this[K],"olddisplay");if(!I&&I!=="none"){r.data(this[K],"olddisplay",r.css(this[K],"display"))}}for(var K=0,J=this.length;K<J;K++){this[K].style.display="none"}return this}},_toggle:r.fn.toggle,toggle:function(K,J){var I=typeof K==="boolean";return r.isFunction(K)&&r.isFunction(J)?this._toggle.apply(this,arguments):K==null||I?this.each(function(){var L=I?K:r(this).is(":hidden");r(this)[L?"show":"hide"]()}):this.animate(x("toggle",3),K,J)},fadeTo:function(I,K,J){return this.animate({opacity:K},I,J)},animate:function(M,J,L,K){var I=r.speed(J,L,K);return this[I.queue===false?"each":"queue"](function(){var O=r.extend({},I),Q,P=this.nodeType==1&&r(this).is(":hidden"),N=this;for(Q in M){if(M[Q]=="hide"&&P||M[Q]=="show"&&!P){return O.complete.call(this)}if((Q=="height"||Q=="width")&&this.style){O.display=r.css(this,"display");O.overflow=this.style.overflow}}if(O.overflow!=null){this.style.overflow="hidden"}O.curAnim=r.extend({},M);r.each(M,function(S,W){var V=new r.fx(N,O,S);if(/toggle|show|hide/.test(W)){V[W=="toggle"?P?"show":"hide":W](M)}else{var U=W.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),X=V.cur(true)||0;if(U){var R=parseFloat(U[2]),T=U[3]||"px";if(T!="px"){N.style[S]=(R||1)+T;X=((R||1)/V.cur(true))*X;N.style[S]=X+T}if(U[1]){R=((U[1]=="-="?-1:1)*R)+X}V.custom(X,R,T)}else{V.custom(X,W,"")}}});return true})},stop:function(J,I){var K=r.timers;if(J){this.queue([])}this.each(function(){for(var L=K.length-1;L>=0;L--){if(K[L].elem==this){if(I){K[L](true)}K.splice(L,1)}}});if(!I){this.dequeue()}return this}});r.each({slideDown:x("show",1),slideUp:x("hide",1),slideToggle:x("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(I,J){r.fn[I]=function(K,L){return this.animate(J,K,L)}});r.extend({speed:function(K,L,J){var I=typeof K==="object"?K:{complete:J||!J&&L||r.isFunction(K)&&K,duration:K,easing:J&&L||L&&!r.isFunction(L)&&L};I.duration=r.fx.off?0:typeof I.duration==="number"?I.duration:r.fx.speeds[I.duration]||r.fx.speeds._default;I.old=I.complete;I.complete=function(){if(I.queue!==false){r(this).dequeue()}if(r.isFunction(I.old)){I.old.call(this)}};return I},easing:{linear:function(K,L,I,J){return I+J*K},swing:function(K,L,I,J){return((-Math.cos(K*Math.PI)/2)+0.5)*J+I}},timers:[],fx:function(J,I,K){this.options=I;this.elem=J;this.prop=K;if(!I.orig){I.orig={}}}});r.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(r.fx.step[this.prop]||r.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(J){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var I=parseFloat(r.css(this.elem,this.prop,J));return I&&I>-10000?I:parseFloat(r.curCSS(this.elem,this.prop))||0},custom:function(M,L,K){this.startTime=f();this.start=M;this.end=L;this.unit=K||this.unit||"px";this.now=this.start;this.pos=this.state=0;var I=this;function J(N){return I.step(N)}J.elem=this.elem;if(J()&&r.timers.push(J)&&!p){p=setInterval(function(){var O=r.timers;for(var N=0;N<O.length;N++){if(!O[N]()){O.splice(N--,1)}}if(!O.length){clearInterval(p);p=h}},13)}},show:function(){this.options.orig[this.prop]=r.attr(this.elem.style,this.prop);this.options.show=true;this.custom(this.prop=="width"||this.prop=="height"?1:0,this.cur());r(this.elem).show()},hide:function(){this.options.orig[this.prop]=r.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(L){var K=f();if(L||K>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var I=true;for(var J in this.options.curAnim){if(this.options.curAnim[J]!==true){I=false}}if(I){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(r.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){r(this.elem).hide()}if(this.options.hide||this.options.show){for(var M in this.options.curAnim){r.attr(this.elem.style,M,this.options.orig[M])}}this.options.complete.call(this.elem)}return false}else{var N=K-this.startTime;this.state=N/this.options.duration;this.pos=r.easing[this.options.easing||(r.easing.swing?"swing":"linear")](this.state,N,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};r.extend(r.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(I){r.attr(I.elem.style,"opacity",I.now)},_default:function(I){if(I.elem.style&&I.elem.style[I.prop]!=null){I.elem.style[I.prop]=I.now+I.unit}else{I.elem[I.prop]=I.now}}}});if(document.documentElement.getBoundingClientRect){r.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return r.offset.bodyOffset(this[0])}var K=this[0].getBoundingClientRect(),N=this[0].ownerDocument,J=N.body,I=N.documentElement,P=I.clientTop||J.clientTop||0,O=I.clientLeft||J.clientLeft||0,M=K.top+(self.pageYOffset||r.boxModel&&I.scrollTop||J.scrollTop)-P,L=K.left+(self.pageXOffset||r.boxModel&&I.scrollLeft||J.scrollLeft)-O;return{top:M,left:L}}}else{r.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return r.offset.bodyOffset(this[0])}r.offset.initialized||r.offset.initialize();var N=this[0],K=N.offsetParent,J=N,S=N.ownerDocument,Q,L=S.documentElement,O=S.body,P=S.defaultView,I=P.getComputedStyle(N,null),R=N.offsetTop,M=N.offsetLeft;while((N=N.parentNode)&&N!==O&&N!==L){Q=P.getComputedStyle(N,null);R-=N.scrollTop,M-=N.scrollLeft;if(N===K){R+=N.offsetTop,M+=N.offsetLeft;if(r.offset.doesNotAddBorder&&!(r.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(N.tagName))){R+=parseInt(Q.borderTopWidth,10)||0,M+=parseInt(Q.borderLeftWidth,10)||0}J=K,K=N.offsetParent}if(r.offset.subtractsBorderForOverflowNotVisible&&Q.overflow!=="visible"){R+=parseInt(Q.borderTopWidth,10)||0,M+=parseInt(Q.borderLeftWidth,10)||0}I=Q}if(I.position==="relative"||I.position==="static"){R+=O.offsetTop,M+=O.offsetLeft}if(I.position==="fixed"){R+=Math.max(L.scrollTop,O.scrollTop),M+=Math.max(L.scrollLeft,O.scrollLeft)}return{top:R,left:M}}}r.offset={initialize:function(){if(this.initialized){return}var P=document.body,J=document.createElement("div"),L,K,R,M,Q,I,N=P.style.marginTop,O='<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>';Q={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(I in Q){J.style[I]=Q[I]}J.innerHTML=O;P.insertBefore(J,P.firstChild);L=J.firstChild,K=L.firstChild,M=L.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(K.offsetTop!==5);this.doesAddBorderForTableAndCells=(M.offsetTop===5);L.style.overflow="hidden",L.style.position="relative";this.subtractsBorderForOverflowNotVisible=(K.offsetTop===-5);P.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(P.offsetTop===0);P.style.marginTop=N;P.removeChild(J);this.initialized=true},bodyOffset:function(I){r.offset.initialized||r.offset.initialize();var K=I.offsetTop,J=I.offsetLeft;if(r.offset.doesNotIncludeMarginInBodyOffset){K+=parseInt(r.curCSS(I,"marginTop",true),10)||0,J+=parseInt(r.curCSS(I,"marginLeft",true),10)||0}return{top:K,left:J}}};r.fn.extend({position:function(){var M=0,L=0,J;if(this[0]){var K=this.offsetParent(),N=this.offset(),I=/^body|html$/i.test(K[0].tagName)?{top:0,left:0}:K.offset();N.top-=l(this,"marginTop");N.left-=l(this,"marginLeft");I.top+=l(K,"borderTopWidth");I.left+=l(K,"borderLeftWidth");J={top:N.top-I.top,left:N.left-I.left}}return J},offsetParent:function(){var I=this[0].offsetParent||document.body;while(I&&(!/^body|html$/i.test(I.tagName)&&r.css(I,"position")=="static")){I=I.offsetParent
}return r(I)}});r.each(["Left","Top"],function(J,I){var K="scroll"+I;r.fn[K]=function(L){if(!this[0]){return null}return L!==h?this.each(function(){this==n||this==document?n.scrollTo(!J?L:r(n).scrollLeft(),J?L:r(n).scrollTop()):this[K]=L}):this[0]==n||this[0]==document?self[J?"pageYOffset":"pageXOffset"]||r.boxModel&&document.documentElement[K]||document.body[K]:this[0][K]}});r.each(["Height","Width"],function(M,K){var I=M?"Left":"Top",L=M?"Right":"Bottom",J=K.toLowerCase();r.fn["inner"+K]=function(){return this[0]?r.css(this[0],J,false,"padding"):null};r.fn["outer"+K]=function(O){return this[0]?r.css(this[0],J,false,O?"margin":"border"):null};var N=K.toLowerCase();r.fn[N]=function(O){return this[0]==n?document.compatMode=="CSS1Compat"&&document.documentElement["client"+K]||document.body["client"+K]:this[0]==document?Math.max(document.documentElement["client"+K],document.body["scroll"+K],document.documentElement["scroll"+K],document.body["offset"+K],document.documentElement["offset"+K]):O===h?(this.length?r.css(this[0],N):null):this.css(N,typeof O==="string"?O:O+"px")}})})();(function(b){b.dimensions={version:"1.2"};b.each(["Height","Width"],function(e,c){b.fn["inner"+c]=function(){if(!this[0]){return}var g=c=="Height"?"Top":"Left",f=c=="Height"?"Bottom":"Right";return this.is(":visible")?this[0]["client"+c]:a(this,c.toLowerCase())+a(this,"padding"+g)+a(this,"padding"+f)};b.fn["outer"+c]=function(g){if(!this[0]){return}var j=c=="Height"?"Top":"Left",f=c=="Height"?"Bottom":"Right";g=b.extend({margin:false},g||{});var h=this.is(":visible")?this[0]["offset"+c]:a(this,c.toLowerCase())+a(this,"border"+j+"Width")+a(this,"border"+f+"Width")+a(this,"padding"+j)+a(this,"padding"+f);return h+(g.margin?(a(this,"margin"+j)+a(this,"margin"+f)):0)}});b.each(["Left","Top"],function(e,c){b.fn["scroll"+c]=function(f){if(!this[0]){return}return f!=undefined?this.each(function(){this==window||this==document?window.scrollTo(c=="Left"?f:b(window)["scrollLeft"](),c=="Top"?f:b(window)["scrollTop"]()):this["scroll"+c]=f}):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 j=0,h=0,g=this[0],k,c,f,e;if(g){f=this.offsetParent();k=this.offset();c=f.offset();k.top-=a(g,"marginTop");k.left-=a(g,"marginLeft");c.top+=a(f,"borderTopWidth");c.left+=a(f,"borderLeftWidth");e={top:k.top-c.top,left:k.left-c.left}}return e},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,e){return parseInt(b.curCSS(c.jquery?c[0]:c,e,true))||0}})(jQuery);(function(g){g.fn.jqm=function(f){var e={overlay:50,overlayClass:"jqmOverlay",closeClass:"jqmClose",trigger:".jqModal",ajax:p,ajaxText:"",target:p,modal:p,toTop:p,onShow:p,onHide:p,onLoad:p};return this.each(function(){if(this._jqm){return o[this._jqm].c=g.extend({},o[this._jqm].c,f)}r++;this._jqm=r;o[r]={c:g.extend(e,g.jqm.params,f),a:p,w:g(this).addClass("jqmID"+r),s:r};if(e.trigger){g(this).jqmAddTrigger(e.trigger)}})};g.fn.jqmAddClose=function(f){return n(this,f,"jqmHide")};g.fn.jqmAddTrigger=function(f){return n(this,f,"jqmShow")};g.fn.jqmShow=function(e){return this.each(function(){e=e||window.event;g.jqm.open(this._jqm,e)})};g.fn.jqmHide=function(e){return this.each(function(){e=e||window.event;g.jqm.close(this._jqm,e)})};g.jqm={hash:{},open:function(D,C){var v=o[D],w=v.c,m="."+w.closeClass,x=(parseInt(v.w.css("z-index"))),x=(x>0)?x:3000,f=g("<div></div>").css({height:"100%",width:"100%",position:"fixed",left:0,top:0,"z-index":x-1,opacity:w.overlay/100});if(v.a){return p}v.t=C;v.a=true;v.w.css("z-index",x);if(w.modal){if(!a[0]){l("bind")}a.push(D)}else{if(w.overlay>0){v.w.jqmAddClose(f)}else{f=p}}v.o=(f)?f.addClass(w.overlayClass).prependTo("body"):p;if(c){g("html,body").css({height:"100%",width:"100%"});if(f){f=f.css({position:"absolute"})[0];for(var A in {Top:1,Left:1}){f.style.setExpression(A.toLowerCase(),"(_=(document.documentElement.scroll"+A+" || document.body.scroll"+A+"))+'px'")}}}if(w.ajax){var e=w.target||v.w,B=w.ajax,e=(typeof e=="string")?g(e,v.w):g(e),B=(B.substr(0,1)=="@")?g(C).attr(B.substring(1)):B;e.html(w.ajaxText).load(B,function(){if(w.onLoad){w.onLoad.call(this,v)}if(m){v.w.jqmAddClose(g(m,v.w))}k(v)})}else{if(m){v.w.jqmAddClose(g(m,v.w))}}if(w.toTop&&v.o){v.w.before('<span id="jqmP'+v.w[0]._jqm+'"></span>').insertAfter(v.o)}(w.onShow)?w.onShow(v):v.w.show();k(v);return p},close:function(f){var e=o[f];if(!e.a){return p}e.a=p;if(a[0]){a.pop();if(!a[0]){l("unbind")}}if(e.c.toTop&&e.o){g("#jqmP"+e.w[0]._jqm).after(e.w).remove()}if(e.c.onHide){e.c.onHide(e)}else{e.w.hide();if(e.o){e.o.remove()}}return p},params:{}};var r=0,o=g.jqm.hash,a=[],c=g.browser.msie&&(g.browser.version=="6.0"),p=false,h=g('<iframe src="javascript:false;document.write(\'\');" class="jqm"></iframe>').css({opacity:0}),k=function(e){if(c){if(e.o){e.o.html('<p style="width:100%;height:100%"/>').prepend(h)}else{if(!g("iframe.jqm",e.w)[0]){e.w.prepend(h)}}}j(e)},j=function(f){try{g(":input:visible",f.w)[0].focus()}catch(e){}},l=function(e){g()[e]("keypress",b)[e]("keydown",b)[e]("mousedown",b)},b=function(s){var f=o[a[a.length-1]],m=(!g(s.target).parents(".jqmID"+f.s)[0]);if(m){j(f)}return !m},n=function(e,f,m){return e.each(function(){var u=this._jqm;g(f).each(function(){if(!this[m]){this[m]=[];g(this).click(function(){for(var v in {jqmShow:1,jqmHide:1}){for(var w in this[v]){if(o[this[v][w]]){o[this[v][w]].w[v](this)}}}return p})}this[m].push(u)})})}})(jQuery);jQuery.ui||(function(c){var k=c.fn.remove,e=c.browser.mozilla&&(parseFloat(c.browser.version)<1.9);c.ui={version:"1.7.1",plugin:{add:function(m,n,p){var o=c.ui[m].prototype;for(var l in p){o.plugins[l]=o.plugins[l]||[];o.plugins[l].push([n,p[l]])}},call:function(l,n,m){var p=l.plugins[n];if(!p||!l.element[0].parentNode){return}for(var o=0;o<p.length;o++){if(l.options[p[o][0]]){p[o][1].apply(l.element,m)}}}},contains:function(m,l){return document.compareDocumentPosition?m.compareDocumentPosition(l)&16:m!==l&&m.contains(l)},hasScroll:function(o,m){if(c(o).css("overflow")=="hidden"){return false}var l=(m&&m=="left")?"scrollLeft":"scrollTop",n=false;if(o[l]>0){return true}o[l]=1;n=(o[l]>0);o[l]=0;return n},isOverAxis:function(m,l,n){return(m>l)&&(m<(l+n))},isOver:function(r,m,p,o,l,n){return c.ui.isOverAxis(r,p,l)&&c.ui.isOverAxis(m,o,n)},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(e){var g=c.attr,f=c.fn.removeAttr,j="http://www.w3.org/2005/07/aaa",a=/^aria-/,b=/^wairole:/;c.attr=function(m,l,n){var o=n!==undefined;return(l=="role"?(o?g.call(this,m,l,"wairole:"+n):(g.apply(this,arguments)||"").replace(b,"")):(a.test(l)?(o?m.setAttributeNS(j,l.replace(a,"aaa:"),n):g.call(this,m,l.replace(a,"aaa:"))):g.apply(this,arguments)))};c.fn.removeAttr=function(l){return(a.test(l)?this.each(function(){this.removeAttributeNS(j,l.replace(a,""))}):f.call(this,l))}}c.fn.extend({remove:function(){c("*",this).add(this).each(function(){c(this).triggerHandler("remove")});return k.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 l;if((c.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){l=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{l=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"))||!l.length?c(document):l}});c.extend(c.expr[":"],{data:function(n,m,l){return !!c.data(n,l[3])},focusable:function(m){var n=m.nodeName.toLowerCase(),l=c.attr(m,"tabindex");return(/input|select|textarea|button|object/.test(n)?!m.disabled:"a"==n||"area"==n?m.href||!isNaN(l):!isNaN(l))&&!c(m)["area"==n?"parents":"closest"](":hidden").length},tabbable:function(m){var l=c.attr(m,"tabindex");return(isNaN(l)||l>=0)&&c(m).is(":focusable")}});function h(o,p,r,n){function m(u){var s=c[o][p][u]||[];return(typeof s=="string"?s.split(/,?\s+/):s)}var l=m("getter");if(n.length==1&&typeof n[0]=="string"){l=l.concat(m("getterSetter"))}return(c.inArray(r,l)!=-1)}c.widget=function(m,l){var n=m.split(".")[0];m=m.split(".")[1];c.fn[m]=function(s){var p=(typeof s=="string"),r=Array.prototype.slice.call(arguments,1);if(p&&s.substring(0,1)=="_"){return this}if(p&&h(n,m,s,r)){var o=c.data(this[0],m);return(o?o[s].apply(o,r):undefined)}return this.each(function(){var u=c.data(this,m);(!u&&!p&&c.data(this,m,new c[n][m](this,s))._init());(u&&p&&c.isFunction(u[s])&&u[s].apply(u,r))})};c[n]=c[n]||{};c[n][m]=function(r,p){var o=this;this.namespace=n;this.widgetName=m;this.widgetEventPrefix=c[n][m].eventPrefix||m;this.widgetBaseClass=n+"-"+m;this.options=c.extend({},c.widget.defaults,c[n][m].defaults,c.metadata&&c.metadata.get(r)[m],p);this.element=c(r).bind("setData."+m,function(u,s,v){if(u.target==r){return o._setData(s,v)}}).bind("getData."+m,function(u,s){if(u.target==r){return o._getData(s)}}).bind("remove",function(){return o.destroy()})};c[n][m].prototype=c.extend({},c.widget.prototype,l);c[n][m].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(n,o){var m=n,l=this;if(typeof n=="string"){if(o===undefined){return this._getData(n)}m={};m[n]=o}c.each(m,function(p,r){l._setData(p,r)})},_getData:function(l){return this.options[l]},_setData:function(l,m){this.options[l]=m;if(l=="disabled"){this.element[m?"addClass":"removeClass"](this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").attr("aria-disabled",m)}},enable:function(){this._setData("disabled",false)},disable:function(){this._setData("disabled",true)},_trigger:function(n,o,p){var s=this.options[n],l=(n==this.widgetEventPrefix?n:this.widgetEventPrefix+n);o=c.Event(o);o.type=l;if(o.originalEvent){for(var m=c.event.props.length,r;m;){r=c.event.props[--m];o[r]=o.originalEvent[r]}}this.element.trigger(o,p);return !(c.isFunction(s)&&s.call(this.element[0],o,p)===false||o.isDefaultPrevented())}};c.widget.defaults={disabled:false};c.ui.mouse={_mouseInit:function(){var l=this;this.element.bind("mousedown."+this.widgetName,function(m){return l._mouseDown(m)}).bind("click."+this.widgetName,function(m){if(l._preventClickEvent){l._preventClickEvent=false;m.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(n){n.originalEvent=n.originalEvent||{};if(n.originalEvent.mouseHandled){return}(this._mouseStarted&&this._mouseUp(n));this._mouseDownEvent=n;var m=this,o=(n.which==1),l=(typeof this.options.cancel=="string"?c(n.target).parents().add(n.target).filter(this.options.cancel).length:false);if(!o||l||!this._mouseCapture(n)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){m.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(n)&&this._mouseDelayMet(n)){this._mouseStarted=(this._mouseStart(n)!==false);if(!this._mouseStarted){n.preventDefault();return true}}this._mouseMoveDelegate=function(p){return m._mouseMove(p)};this._mouseUpDelegate=function(p){return m._mouseUp(p)};c(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);(c.browser.safari||n.preventDefault());n.originalEvent.mouseHandled=true;return true},_mouseMove:function(l){if(c.browser.msie&&!l.button){return this._mouseUp(l)}if(this._mouseStarted){this._mouseDrag(l);return l.preventDefault()}if(this._mouseDistanceMet(l)&&this._mouseDelayMet(l)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,l)!==false);(this._mouseStarted?this._mouseDrag(l):this._mouseUp(l))}return !this._mouseStarted},_mouseUp:function(l){c(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=(l.target==this._mouseDownEvent.target);this._mouseStop(l)}return false},_mouseDistanceMet:function(l){return(Math.max(Math.abs(this._mouseDownEvent.pageX-l.pageX),Math.abs(this._mouseDownEvent.pageY-l.pageY))>=this.options.distance)},_mouseDelayMet:function(l){return this.mouseDelayMet},_mouseStart:function(l){},_mouseDrag:function(l){},_mouseStop:function(l){},_mouseCapture:function(l){return true}};c.ui.mouse.defaults={cancel:null,distance:1,delay:0}})(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(p){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 r=this,e=this.options;var c=/^#.+/;this.anchors.each(function(u,o){var s=a(o).attr("href");var v=s.split("#")[0],w;if(v&&(v===location.toString().split("#")[0]||(w=a("base")[0])&&v===w.href)){s=o.hash;o.href=s}if(c.test(s)){r.panels=r.panels.add(r._sanitizeSelector(s))}else{if(s!="#"){a.data(o,"href.tabs",s);a.data(o,"load.tabs",s.replace(/#.*$/,""));var y=r._tabId(o);o.href="#"+y;var x=a("#"+y);if(!x.length){x=a(e.panelTemplate).attr("id",y).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(r.panels[u-1]||r.list);x.data("destroy.tabs",true)}r.panels=r.panels.add(x)}else{e.disabled.push(u)}}});if(p){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(e.selected===undefined){if(location.hash){this.anchors.each(function(s,o){if(o.hash==location.hash){e.selected=s;return false}})}if(typeof e.selected!="number"&&e.cookie){e.selected=parseInt(r._cookie(),10)}if(typeof e.selected!="number"&&this.lis.filter(".ui-tabs-selected").length){e.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}e.selected=e.selected||0
}else{if(e.selected===null){e.selected=-1}}e.selected=((e.selected>=0&&this.anchors[e.selected])||e.selected<0)?e.selected:0;e.disabled=a.unique(e.disabled.concat(a.map(this.lis.filter(".ui-state-disabled"),function(s,o){return r.lis.index(s)}))).sort();if(a.inArray(e.selected,e.disabled)!=-1){e.disabled.splice(a.inArray(e.selected,e.disabled),1)}this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active");if(e.selected>=0&&this.anchors.length){this.panels.eq(e.selected).removeClass("ui-tabs-hide");this.lis.eq(e.selected).addClass("ui-tabs-selected ui-state-active");r.element.queue("tabs",function(){r._trigger("show",null,r._ui(r.anchors[e.selected],r.panels[e.selected]))});this.load(e.selected)}a(window).bind("unload",function(){r.lis.add(r.anchors).unbind(".tabs");r.lis=r.anchors=r.panels=null})}else{e.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}this.element[e.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");if(e.cookie){this._cookie(e.selected,e.cookie)}for(var h=0,n;(n=this.lis[h]);h++){a(n)[a.inArray(h,e.disabled)!=-1&&!a(n).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled")}if(e.cache===false){this.anchors.removeData("cache.tabs")}this.lis.add(this.anchors).unbind(".tabs");if(e.event!="mouseover"){var g=function(s,o){if(o.is(":not(.ui-state-disabled)")){o.addClass("ui-state-"+s)}};var k=function(s,o){o.removeClass("ui-state-"+s)};this.lis.bind("mouseover.tabs",function(){g("hover",a(this))});this.lis.bind("mouseout.tabs",function(){k("hover",a(this))});this.anchors.bind("focus.tabs",function(){g("focus",a(this).closest("li"))});this.anchors.bind("blur.tabs",function(){k("focus",a(this).closest("li"))})}var b,j;if(e.fx){if(a.isArray(e.fx)){b=e.fx[0];j=e.fx[1]}else{b=j=e.fx}}function f(o,s){o.css({display:""});if(a.browser.msie&&s.opacity){o[0].style.removeAttribute("filter")}}var l=j?function(o,s){a(o).closest("li").removeClass("ui-state-default").addClass("ui-tabs-selected ui-state-active");s.hide().removeClass("ui-tabs-hide").animate(j,j.duration||"normal",function(){f(s,j);r._trigger("show",null,r._ui(o,s[0]))})}:function(o,s){a(o).closest("li").removeClass("ui-state-default").addClass("ui-tabs-selected ui-state-active");s.removeClass("ui-tabs-hide");r._trigger("show",null,r._ui(o,s[0]))};var m=b?function(s,o){o.animate(b,b.duration||"normal",function(){r.lis.removeClass("ui-tabs-selected ui-state-active").addClass("ui-state-default");o.addClass("ui-tabs-hide");f(o,b);r.element.dequeue("tabs")})}:function(s,o,u){r.lis.removeClass("ui-tabs-selected ui-state-active").addClass("ui-state-default");o.addClass("ui-tabs-hide");r.element.dequeue("tabs")};this.anchors.bind(e.event+".tabs",function(){var s=this,v=a(this).closest("li"),o=r.panels.filter(":not(.ui-tabs-hide)"),u=a(r._sanitizeSelector(this.hash));if((v.hasClass("ui-tabs-selected")&&!e.collapsible)||v.hasClass("ui-state-disabled")||v.hasClass("ui-state-processing")||r._trigger("select",null,r._ui(this,u[0]))===false){this.blur();return false}e.selected=r.anchors.index(this);r.abort();if(e.collapsible){if(v.hasClass("ui-tabs-selected")){e.selected=-1;if(e.cookie){r._cookie(e.selected,e.cookie)}r.element.queue("tabs",function(){m(s,o)}).dequeue("tabs");this.blur();return false}else{if(!o.length){if(e.cookie){r._cookie(e.selected,e.cookie)}r.element.queue("tabs",function(){l(s,u)});r.load(r.anchors.index(this));this.blur();return false}}}if(e.cookie){r._cookie(e.selected,e.cookie)}if(u.length){if(o.length){r.element.queue("tabs",function(){m(s,o)})}r.element.queue("tabs",function(){l(s,u)});r.load(r.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 e=a(this).unbind(".tabs");a.each(["href","load","cache"],function(f,g){e.removeData(g+".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(f,e,c){if(c===undefined){c=this.anchors.length}var b=this,h=this.options,k=a(h.tabTemplate.replace(/#\{href\}/g,f).replace(/#\{label\}/g,e)),j=!f.indexOf("#")?f.replace("#",""):this._tabId(a("a",k)[0]);k.addClass("ui-state-default ui-corner-top").data("destroy.tabs",true);var g=a("#"+j);if(!g.length){g=a(h.panelTemplate).attr("id",j).data("destroy.tabs",true)}g.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");if(c>=this.lis.length){k.appendTo(this.list);g.appendTo(this.list[0].parentNode)}else{k.insertBefore(this.lis[c]);g.insertBefore(this.panels[c])}h.disabled=a.map(h.disabled,function(m,l){return m>=c?++m:m});this._tabify();if(this.anchors.length==1){k.addClass("ui-tabs-selected ui-state-active");g.removeClass("ui-tabs-hide");this.element.queue("tabs",function(){b._trigger("show",null,b._ui(b.anchors[0],b.panels[0]))});this.load(0)}this._trigger("add",null,this._ui(this.anchors[c],this.panels[c]))},remove:function(b){var e=this.options,f=this.lis.eq(b).remove(),c=this.panels.eq(b).remove();if(f.hasClass("ui-tabs-selected")&&this.anchors.length>1){this.select(b+(b+1<this.anchors.length?1:-1))}e.disabled=a.map(a.grep(e.disabled,function(h,g){return h!=b}),function(h,g){return h>=b?--h:h});this._tabify();this._trigger("remove",null,this._ui(f.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(f,e){return f!=b});this._trigger("enable",null,this._ui(this.anchors[b],this.panels[b]))},disable:function(c){var b=this,e=this.options;if(c!=e.selected){this.lis.eq(c).addClass("ui-state-disabled");e.disabled.push(c);e.disabled.sort();this._trigger("disable",null,this._ui(this.anchors[c],this.panels[c]))}},select:function(b){if(typeof b=="string"){b=this.anchors.index(this.anchors.filter("[href$="+b+"]"))}else{if(b===null){b=-1}}if(b==-1&&this.options.collapsible){b=this.options.selected}this.anchors.eq(b).trigger(this.options.event+".tabs")},load:function(f){var c=this,h=this.options,b=this.anchors.eq(f)[0],e=a.data(b,"load.tabs");this.abort();if(!e||this.element.queue("tabs").length!==0&&a.data(b,"cache.tabs")){this.element.dequeue("tabs");return}this.lis.eq(f).addClass("ui-state-processing");if(h.spinner){var g=a("span",b);g.data("label.tabs",g.html()).html(h.spinner)}this.xhr=a.ajax(a.extend({},h.ajaxOptions,{url:e,success:function(k,j){a(c._sanitizeSelector(b.hash)).html(k);c._cleanup();if(h.cache){a.data(b,"cache.tabs",true)}c._trigger("load",null,c._ui(c.anchors[f],c.panels[f]));try{h.ajaxOptions.success(k,j)}catch(l){}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.1",getter:"length",defaults:{ajaxOptions:null,cache:false,cookie:null,collapsible:false,disabled:[],event:"click",fx:null,idPrefix:"ui-tabs-",panelTemplate:"<div></div>",spinner:"<em>Loading&#8230;</em>",tabTemplate:'<li><a href="#{href}"><span>#{label}</span></a></li>'}});a.extend(a.ui.tabs.prototype,{rotation:null,rotate:function(e,g){var b=this,h=this.options;var c=b._rotate||(b._rotate=function(j){clearTimeout(b.rotation);
b.rotation=setTimeout(function(){var k=h.selected;b.select(++k<b.anchors.length?k:0)},e);if(j){j.stopPropagation()}});var f=b._unrotate||(b._unrotate=!g?function(j){if(j.clientX){b.rotate(null)}}:function(j){t=h.selected;c()});if(e){this.element.bind("tabsshow",c);this.anchors.bind(h.event+".tabs",f);c()}else{clearTimeout(b.rotation);this.element.unbind("tabsshow",c);this.anchors.unbind(h.event+".tabs",f);delete this._rotate;delete this._unrotate}}})})(jQuery);(function($){function toIntegersAtLease(n){return n<10?"0"+n:n}Date.prototype.toJSON=function(date){return this.getUTCFullYear()+"-"+toIntegersAtLease(this.getUTCMonth())+"-"+toIntegersAtLease(this.getUTCDate())};var escapeable=/["\\\x00-\x1f\x7f-\x9f]/g;var meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};$.quoteString=function(string){if(escapeable.test(string)){return'"'+string.replace(escapeable,function(a){var c=meta[a];if(typeof c==="string"){return c}c=a.charCodeAt();return"\\u00"+Math.floor(c/16).toString(16)+(c%16).toString(16)})+'"'}return'"'+string+'"'};$.toJSON=function(o,compact){var type=typeof(o);if(type=="undefined"){return"undefined"}else{if(type=="number"||type=="boolean"){return o+""}else{if(o===null){return"null"}}}if(type=="string"){return $.quoteString(o)}if(type=="object"&&typeof o.toJSON=="function"){return o.toJSON(compact)}if(type!="function"&&typeof(o.length)=="number"){var ret=[];for(var i=0;i<o.length;i++){ret.push($.toJSON(o[i],compact))}if(compact){return"["+ret.join(",")+"]"}else{return"["+ret.join(", ")+"]"}}if(type=="function"){throw new TypeError("Unable to convert object of type 'function' to json.")}var ret=[];for(var k in o){var name;type=typeof(k);if(type=="number"){name='"'+k+'"'}else{if(type=="string"){name=$.quoteString(k)}else{continue}}var val=$.toJSON(o[k],compact);if(typeof(val)!="string"){continue}if(compact){ret.push(name+":"+val)}else{ret.push(name+": "+val)}}return"{"+ret.join(", ")+"}"};$.compactJSON=function(o){return $.toJSON(o,true)};$.evalJSON=function(src){return eval("("+src+")")};$.secureEvalJSON=function(src){var filtered=src;filtered=filtered.replace(/\\["\\\/bfnrtu]/g,"@");filtered=filtered.replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]");filtered=filtered.replace(/(?:^|:|,)(?:\s*\[)+/g,"");if(/^[\],:{}\s]*$/.test(filtered)){return eval("("+src+")")}else{throw new SyntaxError("Error parsing JSON, source is not valid.")}}})(jQuery);jQuery.cookie=function(b,k,n){if(typeof k!="undefined"){n=n||{};if(k===null){k="";n.expires=-1}var f="";if(n.expires&&(typeof n.expires=="number"||n.expires.toUTCString)){var g;if(typeof n.expires=="number"){g=new Date();g.setTime(g.getTime()+(n.expires*24*60*60*1000))}else{g=n.expires}f="; expires="+g.toUTCString()}var m=n.path?"; path="+(n.path):"";var h=n.domain?"; domain="+(n.domain):"";var a=n.secure?"; secure":"";document.cookie=[b,"=",encodeURIComponent(k),f,m,h,a].join("")}else{var e=null;if(document.cookie&&document.cookie!=""){var l=document.cookie.split(";");for(var j=0;j<l.length;j++){var c=jQuery.trim(l[j]);if(c.substring(0,b.length+1)==(b+"=")){e=decodeURIComponent(c.substring(b.length+1));break}}}return e}};(function(a){a.swfobject=function(){var B="undefined",u="object",e="Shockwave Flash",I="ShockwaveFlash.ShockwaveFlash",z="application/x-shockwave-flash",l="SWFObjectExprInst",j=window,H=document,o=navigator,k=[],n=[],y=[],m=null,w=null,f=false,D,x,g,F,E,v,h,C,c,s,r,b,A,G,p;D=function(){var O=typeof H.getElementById!==B&&typeof H.getElementsByTagName!==B&&typeof H.createElement!==B,T=[0,0,0],P=null;if(typeof o.plugins!==B&&typeof o.plugins[e]===u){P=o.plugins[e].description;if(P&&!(typeof o.mimeTypes!==B&&o.mimeTypes[z]&&!o.mimeTypes[z].enabledPlugin)){P=P.replace(/^[\S|\s]*\s+(\S+\s+\S+$)/,"$1");T[0]=parseInt(P.replace(/^([\S|\s]*)\.[\S|\s]*$/,"$1"),10);T[1]=parseInt(P.replace(/^[\S|\s]*\.([\S|\s]*)\s[\S|\s]*$/,"$1"),10);T[2]=/r/.test(P)?parseInt(P.replace(/^[\S|\s]*r([\S|\s]*)$/,"$1"),10):0}}else{if(typeof j.ActiveXObject!==B){var Q=null,R=false;try{Q=new ActiveXObject(I+".7")}catch(N){try{Q=new ActiveXObject(I+".6");T=[6,0,21];Q.AllowScriptAccess="always"}catch(M){if(T[0]===6){R=true}}if(!R){try{Q=new ActiveXObject(I)}catch(L){}}}if(!R&&Q){try{P=Q.GetVariable("$version");if(P){P=P.split(" ")[1].split(",");T=[parseInt(P[0],10),parseInt(P[1],10),parseInt(P[2],10)]}}catch(J){}}}}var S=o.userAgent.toLowerCase(),K=o.platform.toLowerCase();return{w3cdom:O,pv:T,webkit:jQuery.browser.safari?jQuery.browser.version:false,ie:jQuery.browser.msie,win:K?/win/.test(K):/win/.test(S),mac:K?/mac/.test(K):/mac/.test(S)}}();a(function(){var L=k.length;for(var J=0;J<L;J++){var M=k[J].id;if(D.pv[0]>0){var K=a("#"+M);if(K.length){k[J].width=K.attr("width")?K.attr("width"):"0";k[J].height=K.attr("height")?K.attr("height"):"0";if(r(k[J].swfVersion)){if(D.webkit&&D.webkit<312){x(K[0])}A(M,true)}else{if(k[J].expressInstall&&!f&&r("6.0.65")&&(D.win||D.mac)){g(k[J])}else{F(K[0])}}}}else{A(M,true)}}});x=function(N){N=a(N);var K=N.find("object");if(K.length){var M=a("<embed />"),J=K[0].attributes;if(J){for(var L=0;L<J.length;L++){M.attr((J[L].nodeName==="DATA")?"src":J[L].nodeName,J[L].nodeValue)}}K.children().each(function(){if(this.nodeType===1&&this.nodeName==="PARAM"){M.attr(a(this).attr("name"),a(this).attr("value"))}});N.replaceWith(M)}};g=function(O){f=true;var M=a("#"+O.id);if(M.length){if(O.altContentId){var Q=a("#"+O.altContentId)[0];if(Q){m=Q;w=O.altContentId}}else{m=E(M[0])}if(!/%$/.test(O.width)&&parseInt(O.width,10)<310){O.width="310"}if(!/%$/.test(O.height)&&parseInt(O.height,10)<137){O.height="137"}H.title=H.title.slice(0,47)+" - Flash Player Installation";var R=D.ie&&D.win?"ActiveX":"PlugIn",J=H.title,K="MMredirectURL="+j.location+"&MMplayerType="+R+"&MMdoctitle="+J,P=O.id;if(D.ie&&D.win&&M[0].readyState!==4){P+="SWFObjectNew";var L=a('<div id="'+P+'" />');M.before(L);M.css("display","none");var N=function(){M.remove()};s(j,"onload",N)}v({data:O.expressInstall,id:l,width:O.width,height:O.height},{flashvars:K},P)}};F=function(L){L=a(L);if(D.ie&&D.win&&L[0].readyState!==4){var K=a("<div/>");L.before(K);K.replaceWith(a(E(L[0])));L.css("display","none");var J=function(){L.remove()};s(j,"onload",J)}else{L.replaceWith(a(E(L[0])))}};E=function(K){K=a(K);var J=a("<div />");if(D.win&&D.ie){J.html(K.html())}else{K.find("object").children().each(function(){if(!(this.nodeType===1&&this.nodeName==="PARAM")&&!(this.nodeType===8)){a(this.cloneNode(true)).appendTo(J)}})}return J[0]};v=function(X,V,K){var J,M=a("#"+K);if(M.length){if(typeof X.id===B){X.id=K}if(D.ie&&D.win){var W="";for(var S in X){if(X[S]!==Object.prototype[S]){if(S.toLowerCase()==="data"){V.movie=X[S]}else{if(S.toLowerCase()==="styleclass"){W+=' class="'+X[S]+'"'}else{if(S.toLowerCase()!=="classid"){W+=" "+S+'="'+X[S]+'"'}}}}}var U="";for(var R in V){if(V[R]!==Object.prototype[R]){U+='<param name="'+R+'" value="'+V[R]+'" />'}}M[0].outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+W+">"+U+"</object>";n[n.length]=X.id;J=a("#"+X.id)[0]}else{if(D.webkit&&D.webkit<312){var T=a('<embed type="'+z+'" />');for(var Q in X){if(X[Q]!==Object.prototype[Q]){if(Q.toLowerCase()==="data"){T.attr("src",X[Q])}else{if(Q.toLowerCase()==="styleclass"){T.attr("class",X[Q])}else{if(Q.toLowerCase()!=="classid"){T.attr(Q,X[Q])}}}}}for(var P in V){if(V[P]!==Object.prototype[P]){if(P.toLowerCase()!=="movie"){T.attr(P,V[P])}}}M.replaceWith(T);J=T[0]}else{var L=a('<object type="'+z+'" />');for(var O in X){if(X[O]!==Object.prototype[O]){if(O.toLowerCase()==="styleclass"){L.attr("class",X[O])}else{if(O.toLowerCase()!=="classid"){L.attr(O,X[O])}}}}for(var N in V){if(V[N]!==Object.prototype[N]&&N.toLowerCase()!=="movie"){h(L[0],N,V[N])}}M.replaceWith(L);J=L[0]}}}return J};h=function(L,J,K){a(L).append(a('<param name="'+J+'" value="'+K+'" />'))};C=function(K){var J=a("#"+K);if(J&&(J[0].nodeName==="OBJECT"||J[0].nodeName==="EMBED")){if(D.ie&&D.win){if(J[0].readyState===4){c(K)}else{j.attachEvent("onload",function(){c(K)
})}}else{J.remove()}}};c=function(L){var K=a("#"+L);if(K.length){for(var J in K[0]){if(typeof K[0][J]==="function"){K[0][J]=null}}K.remove()}};s=function(L,J,K){L.attachEvent(J,K);y[y.length]=[L,J,K]};r=function(L){var K=D.pv,J=L.split(".");J[0]=parseInt(J[0],10);J[1]=parseInt(J[1],10)||0;J[2]=parseInt(J[2],10)||0;return(K[0]>J[0]||(K[0]===J[0]&&K[1]>J[1])||(K[0]===J[0]&&K[1]===J[1]&&K[2]>=J[2]))?true:false};b=function(N,K){if(D.ie&&D.mac){return}var M=a("head"),L=a('<style media="screen" type="text/css" />');if(!(D.ie&&D.win)&&typeof H.createTextNode!==B){a(H.createTextNode(N+" {"+K+"}")).appendTo(L)}L.appendTo(M);if(D.ie&&D.win&&typeof H.styleSheets!==B&&H.styleSheets.length>0){var J=H.styleSheets[H.styleSheets.length-1];if(typeof J.addRule===u){J.addRule(N,K)}}};A=function(M,J){var K=J?"visible":"hidden",L=a("#"+M);if(L.length){a(function(){L.css("visibility",K)})}else{b("#"+M,"visibility: "+K)}};G=function(K){var L=/[\\\"<>\.;]/;var J=L.exec(K)!==null;return J?encodeURIComponent(K):K};p=function(){if(D.ie&&D.win){window.attachEvent("onunload",function(){var O=y.length;for(var N=0;N<O;N++){y[N][0].detachEvent(y[N][1],y[N][2])}var L=n.length;for(var M=0;M<L;M++){C(n[M])}for(var K in D){D[K]=null}D=null;for(var J in jQuery.swfobject){jQuery.swfobject[J]=null}jQuery.swfobject=null})}}();return{registerObject:function(M,J,L){if(!D.w3cdom||!M||!J){return}var K={};K.id=M;K.swfVersion=J;K.expressInstall=L?L:false;k[k.length]=K;A(M,false)},getObjectById:function(M){var J=null;if(D.w3cdom){var K=a("#"+M);if(K.length){var L=K.find(u)[0];if(!L||(L&&typeof K.SetVariable!==B)){J=K[0]}else{if(typeof L.SetVariable!==B){J=L}}}}return J},createCSS:function(K,J){if(D.w3cdom){b(K,J)}},createSWF:function(L,K,J){if(D.w3cdom){return v(L,K,J)}else{return undefined}},embedSWF:function(P,W,T,V,J,O,K,R,U){if(!D.w3cdom||!P||!W||!T||!V||!J){return}T+="";V+="";if(r(J)){A(W,false);var S={};if(U&&typeof U===u){for(var N in U){if(U[N]!==Object.prototype[N]){S[N]=U[N]}}}S.data=P;S.width=T;S.height=V;var Q={};if(R&&typeof R===u){for(var M in R){if(R[M]!==Object.prototype[M]){Q[M]=R[M]}}}if(K&&typeof K===u){for(var L in K){if(K[L]!==Object.prototype[L]){if(typeof Q.flashvars!==B){Q.flashvars+="&"+L+"="+K[L]}else{Q.flashvars=L+"="+K[L]}}}}a(function(){v(S,Q,W);if(S.id===W){A(W,true)}})}else{if(O&&!f&&r("6.0.65")&&(D.win||D.mac)){f=true;A(W,false);a(function(){var X={};X.id=X.altContentId=W;X.width=T;X.height=V;X.expressInstall=O;g(X)})}}},expressInstallCallback:function(){if(f&&m){var J=a("#"+l);if(J.length){J.replaceWith(a(m));if(w){A(w,true);if(D.ie&&D.win){a(m).css("display","block")}}m=null;w=null;f=false}}},getFlashPlayerVersion:function(){return{major:D.pv[0],minor:D.pv[1],release:D.pv[2]}},getQueryParamValue:function(M){var L=H.location.search||H.location.hash;if(M===null){return G(L)}if(L){var K=L.substring(1).split("&");for(var J=0;J<K.length;J++){if(K[J].substring(0,K[J].indexOf("="))===M){return G(K[J].substring((K[J].indexOf("=")+1)))}}}return""},hasFlashPlayerVersion:r,removeSWF:function(J){if(D.w3cdom){C(J)}}}}()})(jQuery);(function($){jQuery.extend({createUploadIframe:function(id,uri){var frameId="jUploadFrame"+id;if(window.ActiveXObject){var io=document.createElement('<iframe id="'+frameId+'" name="'+frameId+'" />');if(typeof uri=="boolean"){io.src="javascript:false"}else{if(typeof uri=="string"){io.src=uri}}}else{var io=document.createElement("iframe");io.id=frameId;io.name=frameId}io.style.position="absolute";io.style.top="-1000px";io.style.left="-1000px";document.body.appendChild(io);return io},createUploadForm:function(id,fileElementId){var formId="jUploadForm"+id;var fileId="jUploadFile"+id;var form=$('<form  action="" method="POST" name="'+formId+'" id="'+formId+'" enctype="multipart/form-data"></form>');var oldElement=$("#"+fileElementId);var newElement=$(oldElement).clone();$(oldElement).attr("id",fileId);$(oldElement).before(newElement);$(oldElement).appendTo(form);$(form).css("position","absolute");$(form).css("top","-1200px");$(form).css("left","-1200px");$(form).appendTo("body");return form},ajaxFileUpload:function(s){s=jQuery.extend({},jQuery.ajaxSettings,s);var id=new Date().getTime();var form=jQuery.createUploadForm(id,s.fileElementId);var io=jQuery.createUploadIframe(id,s.secureuri);var frameId="jUploadFrame"+id;var formId="jUploadForm"+id;if(s.global&&!jQuery.active++){jQuery.event.trigger("ajaxStart")}var requestDone=false;var xml={};if(s.global){jQuery.event.trigger("ajaxSend",[xml,s])}var uploadCallback=function(isTimeout){var io=document.getElementById(frameId);try{if(io.contentWindow){xml.responseText=io.contentWindow.document.body?io.contentWindow.document.body.innerHTML:null;xml.responseXML=io.contentWindow.document.XMLDocument?io.contentWindow.document.XMLDocument:io.contentWindow.document}else{if(io.contentDocument){xml.responseText=io.contentDocument.document.body?io.contentDocument.document.body.innerHTML:null;xml.responseXML=io.contentDocument.document.XMLDocument?io.contentDocument.document.XMLDocument:io.contentDocument.document}}}catch(e){jQuery.handleError(s,xml,null,e)}if(xml||isTimeout=="timeout"){requestDone=true;var status;try{status=isTimeout!="timeout"?"success":"error";if(status!="error"){var data=jQuery.uploadHttpData(xml,s.dataType);if(s.success){s.success(data,status)}if(s.global){jQuery.event.trigger("ajaxSuccess",[xml,s])}}else{jQuery.handleError(s,xml,status)}}catch(e){status="error";jQuery.handleError(s,xml,status,e)}if(s.global){jQuery.event.trigger("ajaxComplete",[xml,s])}if(s.global&&!--jQuery.active){jQuery.event.trigger("ajaxStop")}if(s.complete){s.complete(xml,status)}jQuery(io).unbind();setTimeout(function(){try{$(io).remove();$(form).remove()}catch(e){jQuery.handleError(s,xml,null,e)}},100);xml=null}};if(s.timeout>0){setTimeout(function(){if(!requestDone){uploadCallback("timeout")}},s.timeout)}try{var form=$("#"+formId);$(form).attr("action",s.url);$(form).attr("method","POST");$(form).attr("target",frameId);if(form.encoding){form.encoding="multipart/form-data"}else{form.enctype="multipart/form-data"}$(form).submit()}catch(e){jQuery.handleError(s,xml,null,e)}if(window.attachEvent){document.getElementById(frameId).attachEvent("onload",uploadCallback)}else{document.getElementById(frameId).addEventListener("load",uploadCallback,false)}return{abort:function(){}}},uploadHttpData:function(r,type){var data=!type;data=type=="xml"||data?r.responseXML:r.responseText;if(type=="script"){jQuery.globalEval(data)}if(type=="json"){eval("data = "+data)}if(type=="html"){jQuery("<div/>").html(data).evalScripts()}return data}})})(jQuery);if(jQuery){(function(a){a.extend(a.fn,{contextMenu:function(b,c){if(b.menu==undefined){return false}if(b.inSpeed==undefined){b.inSpeed=150}if(b.outSpeed==undefined){b.outSpeed=75}if(b.inSpeed==0){b.inSpeed=-1}if(b.outSpeed==0){b.outSpeed=-1}a(this).each(function(){var e=a(this);var f=e.offset();a("#"+b.menu).addClass("contextMenu");e.mousedown(function(j){var g=j;var h=function(o){var l=a(this);a(this).unbind("mouseup",h);if(g.button==2){a(".contextMenu").hide();var r=a("#"+b.menu);if(a(e).hasClass("disabled")){return false}var p={},k,s;if(self.innerHeight){p.pageYOffset=self.pageYOffset;p.pageXOffset=self.pageXOffset;p.innerHeight=self.innerHeight;p.innerWidth=self.innerWidth}else{if(document.documentElement&&document.documentElement.clientHeight){p.pageYOffset=document.documentElement.scrollTop;p.pageXOffset=document.documentElement.scrollLeft;p.innerHeight=document.documentElement.clientHeight;p.innerWidth=document.documentElement.clientWidth}else{if(document.body){p.pageYOffset=document.body.scrollTop;p.pageXOffset=document.body.scrollLeft;p.innerHeight=document.body.clientHeight;p.innerWidth=document.body.clientWidth}}}(o.pageX)?k=o.pageX:k=o.clientX+p.scrollLeft;(o.pageY)?s=o.pageY:k=o.clientY+p.scrollTop;a(r).css({top:s,left:k}).fadeIn(b.inSpeed);a(r).find("A").mouseover(function(){a(r).find("LI.hover").removeClass("hover");a(this).parent().addClass("hover")}).mouseout(function(){a(r).find("LI.hover").removeClass("hover")
});var n=function(u){switch(u.keyCode){case 38:if(a(r).find("LI.hover").size()==0){a(r).find("LI:last").addClass("hover")}else{a(r).find("LI.hover").removeClass("hover").prevAll("LI:not(.disabled)").eq(0).addClass("hover");if(a(r).find("LI.hover").size()==0){a(r).find("LI:last").addClass("hover")}}break;case 40:if(a(r).find("LI.hover").size()==0){a(r).find("LI:first").addClass("hover")}else{a(r).find("LI.hover").removeClass("hover").nextAll("LI:not(.disabled)").eq(0).addClass("hover");if(a(r).find("LI.hover").size()==0){a(r).find("LI:first").addClass("hover")}}break;case 13:a(r).find("LI.hover A").trigger("click");break;case 27:a(document).trigger("click");break}};a(document).keypress(n);var m=function(){a(document).unbind("click",m).unbind("keypress",n);a(r).fadeOut(b.outSpeed);return false};a("#"+b.menu).find("A").unbind("click");a("#"+b.menu).find("LI:not(.disabled) A").click(function(){a(document).unbind("click",m).unbind("keypress",n);a(".contextMenu").hide();if(c){c(a(this).attr("href").substr(1),a(l),{x:k-f.left,y:s-f.top,docX:k,docY:s})}return false});setTimeout(function(){a(document).click(m)},0)}};a(this).mouseup(h)});if(a.browser.mozilla){a("#"+b.menu).each(function(){a(this).css({MozUserSelect:"none"})})}else{if(a.browser.msie){a("#"+b.menu).each(function(){a(this).bind("selectstart.disableTextSelect",function(){return false})})}else{a("#"+b.menu).each(function(){a(this).bind("mousedown.disableTextSelect",function(){return false})})}}a(e).add("UL.contextMenu").bind("contextmenu",function(){return false})});return a(this)},disableContextMenuItems:function(b){if(b==undefined){a(this).find("LI").addClass("disabled");return(a(this))}a(this).each(function(){if(b!=undefined){var e=b.split(",");for(var c=0;c<e.length;c++){a(this).find('A[href="'+e[c]+'"]').parent().addClass("disabled")}}});return(a(this))},enableContextMenuItems:function(b){if(b==undefined){a(this).find("LI.disabled").removeClass("disabled");return(a(this))}a(this).each(function(){if(b!=undefined){var e=b.split(",");for(var c=0;c<e.length;c++){a(this).find('A[href="'+e[c]+'"]').parent().removeClass("disabled")}}});return(a(this))},disableContextMenu:function(){a(this).each(function(){a(this).addClass("disabled")});return(a(this))},enableContextMenu:function(){a(this).each(function(){a(this).removeClass("disabled")});return(a(this))},destroyContextMenu:function(){a(this).each(function(){a(this).unbind("mousedown").unbind("mouseup")});return(a(this))}})})(jQuery)}if(!window.console||(!console.firebug&&!/chrome/i.test(navigator.userAgent))){var names=["log","debug","info","warn","error","assert","dir","dirxml","group","groupEnd","time","timeEnd","count","trace","profile","profileEnd"];window.console={};for(var i=0;i<names.length;++i){window.console[names[i]]=function(){}}}(function(c){var e="bookmark";function b(){this._defaults={url:"",title:"",sites:[],icons:"bookmarks.png",iconSize:16,target:"_blank",compact:true,hint:"Send to {s}",popup:false,popupText:"Bookmark this site...",addFavorite:false,favoriteText:"Favorite",favoriteIcon:0,addEmail:false,emailText:"E-mail",emailIcon:1,emailSubject:"Interesting page",emailBody:"I thought you might find this page interesting:\n{t} ({u})",manualBookmark:"Please close this dialog and\npress Ctrl-D to bookmark this page."};this._sites={alltagz:{display:"alltagz",icon:69,url:"http://www.alltagz.de/bookmarks/?action=add&address={u}&amp;title={t}"},aol:{display:"myAOL",icon:2,url:"http://favorites.my.aol.com/ffclient/webroot/0.4.1/src/html/addBookmarkDialog.html?url={u}&amp;title={t}&amp;favelet=true"},ask:{display:"Ask",icon:3,url:"http://myjeeves.ask.com/mysearch/BookmarkIt?v=1.2&amp;t=webpages&amp;url={u}&amp;title={t}"},backflip:{display:"Backflip",icon:62,url:"http://www.backflip.com/add_page_pop.ihtml?url={u}&amp;title={t}"},ballhype:{display:"BallHype",icon:63,url:"http://ballhype.com/post/url/?url={u}&amp;title={t}"},bebo:{display:"Bebo",icon:64,url:"http://bebo.com/c/share?Url={u}&amp;Title={t}"},blinklist:{display:"BlinkList",icon:4,url:"http://www.blinklist.com/index.php?Action=Blink/addblink.php&amp;Url={u}&amp;Title={t}"},bloglines:{display:"Bloglines",icon:48,url:"http://www.bloglines.com/sub/{u}"},blogmarks:{display:"Blogmarks",icon:5,url:"http://blogmarks.net/my/new.php?mini=1&amp;simple=1&amp;url={u}&amp;title={t}"},bookmarkit:{display:"bookmark.it",icon:71,url:"http://www.bookmark.it/bookmark.php?url={u}"},care2:{display:"Care2",icon:6,url:"http://www.care2.com/news/news_post.html?url={u}&amp;title={t}"},current:{display:"Current",icon:49,url:"http://current.com/clipper.htm?url={u}&amp;title={t}"},delicious:{display:"del.icio.us",icon:7,url:"http://del.icio.us/post?url={u}&amp;title={t}"},designfloat:{display:"Design Float",icon:50,url:"http://www.designfloat.com/submit.php?url={u}&amp;title={t}"},digg:{display:"Digg",icon:8,url:"http://digg.com/submit?phase=2&amp;url={u}&amp;title={t}"},diigo:{display:"Diigo",icon:9,url:"http://www.diigo.com/post?url={u}&amp;title={t}"},dzone:{display:"DZone",icon:10,url:"http://www.dzone.com/links/add.html?url={u}&amp;title={t}"},facebook:{display:"Facebook",icon:11,url:"http://www.facebook.com/sharer.php?u={u}&amp;t={t}"},fark:{display:"Fark",icon:12,url:"http://cgi.fark.com/cgi/fark/submit.pl?new_url={u}&amp;new_comment={t}"},faves:{display:"Faves",icon:13,url:"http://faves.com/Authoring.aspx?u={u}&amp;t={t}"},feedmelinks:{display:"Feed Me Links",icon:14,url:"http://feedmelinks.com/categorize?from=toolbar&amp;op=submit&amp;url={u}&amp;name={t}"},fresqui:{display:"Fresqui",icon:51,url:"http://ocio.fresqui.com/post?url={u}&amp;title={t}"},friendfeed:{display:"FriendFeed",icon:52,url:"http://friendfeed.com/share?url={u}&amp;title={t}"},funp:{display:"funP",icon:53,url:"http://funp.com/pages/submit/add.php?url={u}&amp;title={t}"},furl:{display:"Furl",icon:15,url:"http://www.furl.net/storeIt.jsp?u={u}&amp;t={t}"},google:{display:"Google",icon:16,url:"http://www.google.com/bookmarks/mark?op=edit&amp;bkmk={u}&amp;title={t}"},hugg:{display:"Hugg",icon:17,url:"http://www.hugg.com/submit?url={u}"},kaboodle:{display:"Kaboodle",icon:65,url:"http://www.kaboodle.com/grab/addItemWithUrl?url={u}&amp;pidOrRid=pid=&amp;redirectToKPage=true"},kirtsy:{display:"Kirtsy",icon:54,url:"http://www.kirtsy.com/submit.php?url={u}"},kool:{display:"Koolontheweb",icon:43,url:"http://www.koolontheweb.com/post?url={u}&title={t}"},linkarena:{display:"Linkarena",icon:70,url:"http://linkarena.com/bookmarks/addlink/?url={u}&amp;title={t}&amp;desc=&amp;tags="},linkagogo:{display:"LinkaGoGo",icon:18,url:"http://www.linkagogo.com/go/AddNoPopup?url={u}&amp;title={t}"},linkedin:{display:"LinkedIn",icon:66,url:"http://www.linkedin.com/shareArticle?mini=true&amp;url={u}&amp;title={t}&amp;ro=false&amp;summary=&amp;source="},livejournal:{display:"LiveJournal",icon:19,url:"http://www.livejournal.com/update.bml?subject={u}"},magnolia:{display:"ma.gnolia",icon:20,url:"http://ma.gnolia.com/bookmarklet/add?url={u}&amp;title={t}"},meneame:{display:"menéame",icon:55,url:"http://meneame.net/submit.php?url={u}"},mindbody:{display:"MindBodyGreen",icon:21,url:"http://www.mindbodygreen.com/passvote.action?u={u}"},misterwong:{display:"Mister Wong",icon:22,url:"http://www.mister-wong.com/index.php?action=addurl&amp;bm_url={u}&amp;bm_description={t}"},mixx:{display:"Mixx",icon:23,url:"http://www.mixx.com/submit/story?page_url={u}&amp;title={t}"},multiply:{display:"Multiply",icon:24,url:"http://multiply.com/gus/journal/compose/addthis?body=&amp;url={u}&amp;subject={t}"},myspace:{display:"MySpace",icon:25,url:"http://www.myspace.com/Modules/PostTo/Pages/?c={u}&amp;t={t}"},n4g:{display:"N4G",icon:56,url:"http://www.n4g.com/tips.aspx?url={u}&amp;title={t}"},netscape:{display:"Netscape",icon:26,url:"http://www.netscape.com/submit/?U={u}&amp;T={t}"},netvouz:{display:"Netvouz",icon:27,url:"http://netvouz.com/action/submitBookmark?url={u}&amp;title={t}&amp;popup=no"},newsvine:{display:"Newsvine",icon:28,url:"http://www.newsvine.com/_wine/save?u={u}&amp;h={t}"},nowpublic:{display:"NowPublic",icon:29,url:"http://view.nowpublic.com/?src={u}&amp;t={t}"},oknotizie:{display:"OKNOtizie",icon:57,url:"http://oknotizie.alice.it/post?url={u}&amp;title={t}"},oneview:{display:"OneView",icon:72,url:"http://www.oneview.de/quickadd/neu/addBookmark.jsf?URL={u}&amp;title={t}"},propeller:{display:"Propeller",icon:58,url:"http://www.propeller.com/submit/?U={u}&amp;T={t}"},reddit:{display:"reddit",icon:30,url:"http://reddit.com/submit?url={u}&amp;title={t}"},scoopeo:{display:"Scoopeo",icon:46,url:"http://www.scoopeo.com/scoop/new?newurl={u}&amp;title={t}"},segnalo:{display:"Segnalo",icon:31,url:"http://segnalo.alice.it/post.html.php?url={u}&amp;title={t}"},simpy:{display:"Simpy",icon:32,url:"http://www.simpy.com/simpy/LinkAdd.do?href={u}&amp;title={t}"},slashdot:{display:"Slashdot",icon:33,url:"http://slashdot.org/bookmark.pl?url={u}&amp;title={t}"},smarking:{display:"Smarking",icon:34,url:"http://smarking.com/editbookmark/?url={u}&amp;title={t}"},sphinn:{display:"Sphinn",icon:44,url:"http://sphinn.com/submit.php?url={u}&amp;title={t}"},spurl:{display:"Spurl",icon:35,url:"http://www.spurl.net/spurl.php?url={u}&amp;title={t}"},squidoo:{display:"Squidoo",icon:42,url:"http://www.squidoo.com/lensmaster/bookmark?{u}&title={t}"},stumbleupon:{display:"StumbleUpon",icon:36,url:"http://www.stumbleupon.com/submit?url={u}&amp;title={t}"},tailrank:{display:"Tailrank",icon:37,url:"http://tailrank.com/share/?link_href={u}&amp;title={t}"},technorati:{display:"Technorati",icon:38,url:"http://www.technorati.com/faves?add={u}"},thisnext:{display:"ThisNext",icon:39,url:"http://www.thisnext.com/pick/new/submit/sociable/?url={u}&amp;name={t}"},twitthis:{display:"TwitThis",icon:45,url:"http://twitthis.com/twit?url={u}"},wikio:{display:"Wikio",icon:47,url:"http://www.wikio.com/vote?newurl={u}"},windows:{display:"Windows Live",icon:40,url:"https://favorites.live.com/quickadd.aspx?marklet=1&amp;mkt=en-us&amp;url={u}&amp;title={t}"},xanga:{display:"Xanga",icon:59,url:"http://www.xanga.com/private/editorx.aspx?u={u}&amp;t={t}"},yahoobm:{display:"Yahoo Bookmarks",icon:60,url:"http://bookmarks.yahoo.com/toolbar/savebm?opener=tb&amp;u={u}&amp;t={t}"},yahoobuzz:{display:"Yahoo Buzz",icon:67,url:"http://buzz.yahoo.com/submit?submitUrl={u}&amp;submitHeadline={t}"},yahoo:{display:"Yahoo MyWeb",icon:41,url:"http://myweb2.search.yahoo.com/myresults/bookmarklet?u={u}&amp;t={t}"},yardbarker:{display:"Yardbarker",icon:68,url:"http://www.yardbarker.com/author/new/?pUrl={u}"},yigg:{display:"Yigg",icon:61,url:"http://www.yigg.de/neu?exturl={u}&amp;exttitle={t}"}}
}c.extend(b.prototype,{markerClassName:"hasBookmark",setDefaults:function(f){a(this._defaults,f||{});return this},addSite:function(j,h,g,f){this._sites[j]={display:h,icon:g,url:f};return this},getSites:function(){return this._sites},_attachBookmark:function(g,f){g=c(g);if(g.hasClass(this.markerClassName)){return}g.addClass(this.markerClassName);this._updateBookmark(g,f)},_changeBookmark:function(g,f){g=c(g);if(!g.hasClass(this.markerClassName)){return}this._updateBookmark(g,f)},_updateBookmark:function(m,h){var l=c.data(m[0],e)||c.extend({},this._defaults);h=a(l,h||{});c.data(m[0],e,h);var o=h.sites;if(o.length==0){c.each(this._sites,function(r){o.push(r)})}var j=h.hint||"{s}";var k=(h.popup?'<span class="bookmark_popup_text">'+h.popupText+'</span><div class="bookmark_popup">':"")+'<ul class="bookmark_list'+(h.compact?" bookmark_compact":"")+'">';var f=function(w,v,s,r){var u='<li><a href="'+s+'"'+(r?' onclick="'+r+'"':(h.target?' target="'+h.target+'"':""))+">";if(v!=null){var x=j.replace(/\{s\}/,w);if(typeof v=="number"){u+='<span title="'+x+'" style="background: transparent url('+h.icons+") no-repeat -"+(v*h.iconSize)+"px 0px;"+(c.browser.mozilla&&c.browser.version<"1.9"?" padding-left: "+h.iconSize+"px; padding-bottom: "+Math.max(0,(h.iconSize/2)-5)+"px;":"")+'"></span>'}else{u+='<img src="'+v+'" alt="'+x+'" title="'+x+'"'+((c.browser.mozilla&&c.browser.version<"1.9")||(c.browser.msie&&c.browser.version<"7.0")?' style="vertical-align: bottom;"':(c.browser.msie?' style="vertical-align: middle;"':(c.browser.opera||c.browser.safari?' style="vertical-align: baseline;"':"")))+"/>"}u+=(h.compact?"":"&#xa0;")}u+=(h.compact?"":w)+"</a></li>";return u};var g=h.url||window.location.href;var p=h.title||document.title;if(h.addFavorite){k+=f(h.favoriteText,h.favoriteIcon,"#","jQuery.bookmark._addFavourite('"+g+"','"+p+"')")}if(h.addEmail){k+=f(h.emailText,h.emailIcon,"mailto:?subject="+encodeURIComponent(h.emailSubject)+"&amp;body="+encodeURIComponent(h.emailBody.replace(/{u}/,g).replace(/{t}/,p)))}g=encodeURIComponent(g);p=encodeURIComponent(p);var n=this._sites;c.each(o,function(s,u){var r=n[u];if(r){k+=f(r.display,r.icon,r.url.replace(/{u}/,g).replace(/{t}/,p))}});k+="</ul>"+(h.popup?"</div>":"");m.html(k);if(h.popup){c(m).click(function(){var s=c(this);var u=s.offset();var r=c.bookmark._getExtras(s);c(".bookmark_popup",s).css("left",u.left).css("top",u.top+s.height()+r[1]).toggle()})}},_getExtras:function(f){var g=function(h){return{thin:1,medium:3,thick:5}[h]||h};return[parseInt(g(f.css("border-left-width")),10)+parseInt(g(f.css("border-right-width")),10)+parseInt(f.css("padding-left"),10)+parseInt(f.css("padding-right"),10),parseInt(g(f.css("border-top-width")),10)+parseInt(g(f.css("border-bottom-width")),10)+parseInt(f.css("padding-top"),10)+parseInt(f.css("padding-bottom"),10)]},_destroyBookmark:function(f){f=c(f);if(!f.hasClass(this.markerClassName)){return}f.removeClass(this.markerClassName).empty();c.removeData(f[0],e)},_addFavourite:function(f,g){if(c.browser.msie){window.external.addFavorite(f,g)}else{alert(this._defaults.manualBookmark)}}});function a(h,g){c.extend(h,g);for(var f in g){if(g[f]==null){h[f]=null}}return h}c.fn.bookmark=function(g){var f=Array.prototype.slice.call(arguments,1);return this.each(function(){if(typeof g=="string"){c.bookmark["_"+g+"Bookmark"].apply(c.bookmark,[this].concat(f))}else{c.bookmark._attachBookmark(this,g||{})}})};c.bookmark=new b()})(jQuery);var SWFUpload;if(SWFUpload==undefined){SWFUpload=function(a){this.initSWFUpload(a)}}SWFUpload.prototype.initSWFUpload=function(b){try{this.customSettings={};this.settings=b;this.eventQueue=[];this.movieName="SWFUpload_"+SWFUpload.movieCount++;this.movieElement=null;SWFUpload.instances[this.movieName]=this;this.initSettings();this.loadFlash();this.displayDebugInfo()}catch(a){delete SWFUpload.instances[this.movieName];throw a}};SWFUpload.instances={};SWFUpload.movieCount=0;SWFUpload.version="2.2.0 2009-03-25";SWFUpload.QUEUE_ERROR={QUEUE_LIMIT_EXCEEDED:-100,FILE_EXCEEDS_SIZE_LIMIT:-110,ZERO_BYTE_FILE:-120,INVALID_FILETYPE:-130};SWFUpload.UPLOAD_ERROR={HTTP_ERROR:-200,MISSING_UPLOAD_URL:-210,IO_ERROR:-220,SECURITY_ERROR:-230,UPLOAD_LIMIT_EXCEEDED:-240,UPLOAD_FAILED:-250,SPECIFIED_FILE_ID_NOT_FOUND:-260,FILE_VALIDATION_FAILED:-270,FILE_CANCELLED:-280,UPLOAD_STOPPED:-290};SWFUpload.FILE_STATUS={QUEUED:-1,IN_PROGRESS:-2,ERROR:-3,COMPLETE:-4,CANCELLED:-5};SWFUpload.BUTTON_ACTION={SELECT_FILE:-100,SELECT_FILES:-110,START_UPLOAD:-120};SWFUpload.CURSOR={ARROW:-1,HAND:-2};SWFUpload.WINDOW_MODE={WINDOW:"window",TRANSPARENT:"transparent",OPAQUE:"opaque"};SWFUpload.completeURL=function(a){if(typeof(a)!=="string"||a.match(/^https?:\/\//i)||a.match(/^\//)){return a}var c=window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:"");var b=window.location.pathname.lastIndexOf("/");if(b<=0){path="/"}else{path=window.location.pathname.substr(0,b)+"/"}return path+a};SWFUpload.prototype.initSettings=function(){this.ensureDefault=function(b,a){this.settings[b]=(this.settings[b]==undefined)?a:this.settings[b]};this.ensureDefault("upload_url","");this.ensureDefault("preserve_relative_urls",false);this.ensureDefault("file_post_name","Filedata");this.ensureDefault("post_params",{});this.ensureDefault("use_query_string",false);this.ensureDefault("requeue_on_error",false);this.ensureDefault("http_success",[]);this.ensureDefault("assume_success_timeout",0);this.ensureDefault("file_types","*.*");this.ensureDefault("file_types_description","All Files");this.ensureDefault("file_size_limit",0);this.ensureDefault("file_upload_limit",0);this.ensureDefault("file_queue_limit",0);this.ensureDefault("flash_url","swfupload.swf");this.ensureDefault("prevent_swf_caching",true);this.ensureDefault("button_image_url","");this.ensureDefault("button_width",1);this.ensureDefault("button_height",1);this.ensureDefault("button_text","");this.ensureDefault("button_text_style","color: #000000; font-size: 16pt;");this.ensureDefault("button_text_top_padding",0);this.ensureDefault("button_text_left_padding",0);this.ensureDefault("button_action",SWFUpload.BUTTON_ACTION.SELECT_FILES);this.ensureDefault("button_disabled",false);this.ensureDefault("button_placeholder_id","");this.ensureDefault("button_placeholder",null);this.ensureDefault("button_cursor",SWFUpload.CURSOR.ARROW);this.ensureDefault("button_window_mode",SWFUpload.WINDOW_MODE.WINDOW);this.ensureDefault("debug",false);this.settings.debug_enabled=this.settings.debug;this.settings.return_upload_start_handler=this.returnUploadStart;this.ensureDefault("swfupload_loaded_handler",null);this.ensureDefault("file_dialog_start_handler",null);this.ensureDefault("file_queued_handler",null);this.ensureDefault("file_queue_error_handler",null);this.ensureDefault("file_dialog_complete_handler",null);this.ensureDefault("upload_start_handler",null);this.ensureDefault("upload_progress_handler",null);this.ensureDefault("upload_error_handler",null);this.ensureDefault("upload_success_handler",null);this.ensureDefault("upload_complete_handler",null);this.ensureDefault("debug_handler",this.debugMessage);this.ensureDefault("custom_settings",{});this.customSettings=this.settings.custom_settings;if(!!this.settings.prevent_swf_caching){this.settings.flash_url=this.settings.flash_url+(this.settings.flash_url.indexOf("?")<0?"?":"&")+"preventswfcaching="+new Date().getTime()}if(!this.settings.preserve_relative_urls){this.settings.upload_url=SWFUpload.completeURL(this.settings.upload_url);this.settings.button_image_url=SWFUpload.completeURL(this.settings.button_image_url)}delete this.ensureDefault};SWFUpload.prototype.loadFlash=function(){var a,b;if(document.getElementById(this.movieName)!==null){throw"ID "+this.movieName+" is already in use. The Flash Object could not be added"}a=document.getElementById(this.settings.button_placeholder_id)||this.settings.button_placeholder;if(a==undefined){throw"Could not find the placeholder element: "+this.settings.button_placeholder_id
}b=document.createElement("div");b.innerHTML=this.getFlashHTML();a.parentNode.replaceChild(b.firstChild,a);if(window[this.movieName]==undefined){window[this.movieName]=this.getMovieElement()}};SWFUpload.prototype.getFlashHTML=function(){return['<object id="',this.movieName,'" type="application/x-shockwave-flash" data="',this.settings.flash_url,'" width="',this.settings.button_width,'" height="',this.settings.button_height,'" class="swfupload">','<param name="wmode" value="',this.settings.button_window_mode,'" />','<param name="movie" value="',this.settings.flash_url,'" />','<param name="quality" value="high" />','<param name="menu" value="false" />','<param name="allowScriptAccess" value="always" />','<param name="flashvars" value="'+this.getFlashVars()+'" />',"</object>"].join("")};SWFUpload.prototype.getFlashVars=function(){var b=this.buildParamString();var a=this.settings.http_success.join(",");return["movieName=",encodeURIComponent(this.movieName),"&amp;uploadURL=",encodeURIComponent(this.settings.upload_url),"&amp;useQueryString=",encodeURIComponent(this.settings.use_query_string),"&amp;requeueOnError=",encodeURIComponent(this.settings.requeue_on_error),"&amp;httpSuccess=",encodeURIComponent(a),"&amp;assumeSuccessTimeout=",encodeURIComponent(this.settings.assume_success_timeout),"&amp;params=",encodeURIComponent(b),"&amp;filePostName=",encodeURIComponent(this.settings.file_post_name),"&amp;fileTypes=",encodeURIComponent(this.settings.file_types),"&amp;fileTypesDescription=",encodeURIComponent(this.settings.file_types_description),"&amp;fileSizeLimit=",encodeURIComponent(this.settings.file_size_limit),"&amp;fileUploadLimit=",encodeURIComponent(this.settings.file_upload_limit),"&amp;fileQueueLimit=",encodeURIComponent(this.settings.file_queue_limit),"&amp;debugEnabled=",encodeURIComponent(this.settings.debug_enabled),"&amp;buttonImageURL=",encodeURIComponent(this.settings.button_image_url),"&amp;buttonWidth=",encodeURIComponent(this.settings.button_width),"&amp;buttonHeight=",encodeURIComponent(this.settings.button_height),"&amp;buttonText=",encodeURIComponent(this.settings.button_text),"&amp;buttonTextTopPadding=",encodeURIComponent(this.settings.button_text_top_padding),"&amp;buttonTextLeftPadding=",encodeURIComponent(this.settings.button_text_left_padding),"&amp;buttonTextStyle=",encodeURIComponent(this.settings.button_text_style),"&amp;buttonAction=",encodeURIComponent(this.settings.button_action),"&amp;buttonDisabled=",encodeURIComponent(this.settings.button_disabled),"&amp;buttonCursor=",encodeURIComponent(this.settings.button_cursor)].join("")};SWFUpload.prototype.getMovieElement=function(){if(this.movieElement==undefined){this.movieElement=document.getElementById(this.movieName)}if(this.movieElement===null){throw"Could not find Flash element"}return this.movieElement};SWFUpload.prototype.buildParamString=function(){var c=this.settings.post_params;var b=[];if(typeof(c)==="object"){for(var a in c){if(c.hasOwnProperty(a)){b.push(encodeURIComponent(a.toString())+"="+encodeURIComponent(c[a].toString()))}}}return b.join("&amp;")};SWFUpload.prototype.destroy=function(){try{this.cancelUpload(null,false);var a=null;a=this.getMovieElement();if(a&&typeof(a.CallFunction)==="unknown"){for(var c in a){try{if(typeof(a[c])==="function"){a[c]=null}}catch(f){}}try{a.parentNode.removeChild(a)}catch(b){}}window[this.movieName]=null;SWFUpload.instances[this.movieName]=null;delete SWFUpload.instances[this.movieName];this.movieElement=null;this.settings=null;this.customSettings=null;this.eventQueue=null;this.movieName=null;return true}catch(e){return false}};SWFUpload.prototype.displayDebugInfo=function(){this.debug(["---SWFUpload Instance Info---\n","Version: ",SWFUpload.version,"\n","Movie Name: ",this.movieName,"\n","Settings:\n","\t","upload_url:               ",this.settings.upload_url,"\n","\t","flash_url:                ",this.settings.flash_url,"\n","\t","use_query_string:         ",this.settings.use_query_string.toString(),"\n","\t","requeue_on_error:         ",this.settings.requeue_on_error.toString(),"\n","\t","http_success:             ",this.settings.http_success.join(", "),"\n","\t","assume_success_timeout:   ",this.settings.assume_success_timeout,"\n","\t","file_post_name:           ",this.settings.file_post_name,"\n","\t","post_params:              ",this.settings.post_params.toString(),"\n","\t","file_types:               ",this.settings.file_types,"\n","\t","file_types_description:   ",this.settings.file_types_description,"\n","\t","file_size_limit:          ",this.settings.file_size_limit,"\n","\t","file_upload_limit:        ",this.settings.file_upload_limit,"\n","\t","file_queue_limit:         ",this.settings.file_queue_limit,"\n","\t","debug:                    ",this.settings.debug.toString(),"\n","\t","prevent_swf_caching:      ",this.settings.prevent_swf_caching.toString(),"\n","\t","button_placeholder_id:    ",this.settings.button_placeholder_id.toString(),"\n","\t","button_placeholder:       ",(this.settings.button_placeholder?"Set":"Not Set"),"\n","\t","button_image_url:         ",this.settings.button_image_url.toString(),"\n","\t","button_width:             ",this.settings.button_width.toString(),"\n","\t","button_height:            ",this.settings.button_height.toString(),"\n","\t","button_text:              ",this.settings.button_text.toString(),"\n","\t","button_text_style:        ",this.settings.button_text_style.toString(),"\n","\t","button_text_top_padding:  ",this.settings.button_text_top_padding.toString(),"\n","\t","button_text_left_padding: ",this.settings.button_text_left_padding.toString(),"\n","\t","button_action:            ",this.settings.button_action.toString(),"\n","\t","button_disabled:          ",this.settings.button_disabled.toString(),"\n","\t","custom_settings:          ",this.settings.custom_settings.toString(),"\n","Event Handlers:\n","\t","swfupload_loaded_handler assigned:  ",(typeof this.settings.swfupload_loaded_handler==="function").toString(),"\n","\t","file_dialog_start_handler assigned: ",(typeof this.settings.file_dialog_start_handler==="function").toString(),"\n","\t","file_queued_handler assigned:       ",(typeof this.settings.file_queued_handler==="function").toString(),"\n","\t","file_queue_error_handler assigned:  ",(typeof this.settings.file_queue_error_handler==="function").toString(),"\n","\t","upload_start_handler assigned:      ",(typeof this.settings.upload_start_handler==="function").toString(),"\n","\t","upload_progress_handler assigned:   ",(typeof this.settings.upload_progress_handler==="function").toString(),"\n","\t","upload_error_handler assigned:      ",(typeof this.settings.upload_error_handler==="function").toString(),"\n","\t","upload_success_handler assigned:    ",(typeof this.settings.upload_success_handler==="function").toString(),"\n","\t","upload_complete_handler assigned:   ",(typeof this.settings.upload_complete_handler==="function").toString(),"\n","\t","debug_handler assigned:             ",(typeof this.settings.debug_handler==="function").toString(),"\n"].join(""))};SWFUpload.prototype.addSetting=function(b,c,a){if(c==undefined){return(this.settings[b]=a)}else{return(this.settings[b]=c)}};SWFUpload.prototype.getSetting=function(a){if(this.settings[a]!=undefined){return this.settings[a]}return""};SWFUpload.prototype.callFlash=function(functionName,argumentArray){argumentArray=argumentArray||[];var movieElement=this.getMovieElement();var returnValue,returnString;try{returnString=movieElement.CallFunction('<invoke name="'+functionName+'" returntype="javascript">'+__flash__argumentsToXML(argumentArray,0)+"</invoke>");returnValue=eval(returnString)}catch(ex){throw"Call to "+functionName+" failed"}if(returnValue!=undefined&&typeof returnValue.post==="object"){returnValue=this.unescapeFilePostParams(returnValue)}return returnValue};SWFUpload.prototype.selectFile=function(){this.callFlash("SelectFile")};SWFUpload.prototype.selectFiles=function(){this.callFlash("SelectFiles")};
SWFUpload.prototype.startUpload=function(a){this.callFlash("StartUpload",[a])};SWFUpload.prototype.cancelUpload=function(a,b){if(b!==false){b=true}this.callFlash("CancelUpload",[a,b])};SWFUpload.prototype.stopUpload=function(){this.callFlash("StopUpload")};SWFUpload.prototype.getStats=function(){return this.callFlash("GetStats")};SWFUpload.prototype.setStats=function(a){this.callFlash("SetStats",[a])};SWFUpload.prototype.getFile=function(a){if(typeof(a)==="number"){return this.callFlash("GetFileByIndex",[a])}else{return this.callFlash("GetFile",[a])}};SWFUpload.prototype.addFileParam=function(a,b,c){return this.callFlash("AddFileParam",[a,b,c])};SWFUpload.prototype.removeFileParam=function(a,b){this.callFlash("RemoveFileParam",[a,b])};SWFUpload.prototype.setUploadURL=function(a){this.settings.upload_url=a.toString();this.callFlash("SetUploadURL",[a])};SWFUpload.prototype.setPostParams=function(a){this.settings.post_params=a;this.callFlash("SetPostParams",[a])};SWFUpload.prototype.addPostParam=function(a,b){this.settings.post_params[a]=b;this.callFlash("SetPostParams",[this.settings.post_params])};SWFUpload.prototype.removePostParam=function(a){delete this.settings.post_params[a];this.callFlash("SetPostParams",[this.settings.post_params])};SWFUpload.prototype.setFileTypes=function(a,b){this.settings.file_types=a;this.settings.file_types_description=b;this.callFlash("SetFileTypes",[a,b])};SWFUpload.prototype.setFileSizeLimit=function(a){this.settings.file_size_limit=a;this.callFlash("SetFileSizeLimit",[a])};SWFUpload.prototype.setFileUploadLimit=function(a){this.settings.file_upload_limit=a;this.callFlash("SetFileUploadLimit",[a])};SWFUpload.prototype.setFileQueueLimit=function(a){this.settings.file_queue_limit=a;this.callFlash("SetFileQueueLimit",[a])};SWFUpload.prototype.setFilePostName=function(a){this.settings.file_post_name=a;this.callFlash("SetFilePostName",[a])};SWFUpload.prototype.setUseQueryString=function(a){this.settings.use_query_string=a;this.callFlash("SetUseQueryString",[a])};SWFUpload.prototype.setRequeueOnError=function(a){this.settings.requeue_on_error=a;this.callFlash("SetRequeueOnError",[a])};SWFUpload.prototype.setHTTPSuccess=function(a){if(typeof a==="string"){a=a.replace(" ","").split(",")}this.settings.http_success=a;this.callFlash("SetHTTPSuccess",[a])};SWFUpload.prototype.setAssumeSuccessTimeout=function(a){this.settings.assume_success_timeout=a;this.callFlash("SetAssumeSuccessTimeout",[a])};SWFUpload.prototype.setDebugEnabled=function(a){this.settings.debug_enabled=a;this.callFlash("SetDebugEnabled",[a])};SWFUpload.prototype.setButtonImageURL=function(a){if(a==undefined){a=""}this.settings.button_image_url=a;this.callFlash("SetButtonImageURL",[a])};SWFUpload.prototype.setButtonDimensions=function(c,a){this.settings.button_width=c;this.settings.button_height=a;var b=this.getMovieElement();if(b!=undefined){b.style.width=c+"px";b.style.height=a+"px"}this.callFlash("SetButtonDimensions",[c,a])};SWFUpload.prototype.setButtonText=function(a){this.settings.button_text=a;this.callFlash("SetButtonText",[a])};SWFUpload.prototype.setButtonTextPadding=function(b,a){this.settings.button_text_top_padding=a;this.settings.button_text_left_padding=b;this.callFlash("SetButtonTextPadding",[b,a])};SWFUpload.prototype.setButtonTextStyle=function(a){this.settings.button_text_style=a;this.callFlash("SetButtonTextStyle",[a])};SWFUpload.prototype.setButtonDisabled=function(a){this.settings.button_disabled=a;this.callFlash("SetButtonDisabled",[a])};SWFUpload.prototype.setButtonAction=function(a){this.settings.button_action=a;this.callFlash("SetButtonAction",[a])};SWFUpload.prototype.setButtonCursor=function(a){this.settings.button_cursor=a;this.callFlash("SetButtonCursor",[a])};SWFUpload.prototype.queueEvent=function(b,c){if(c==undefined){c=[]}else{if(!(c instanceof Array)){c=[c]}}var a=this;if(typeof this.settings[b]==="function"){this.eventQueue.push(function(){this.settings[b].apply(this,c)});setTimeout(function(){a.executeNextEvent()},0)}else{if(this.settings[b]!==null){throw"Event handler "+b+" is unknown or is not a function"}}};SWFUpload.prototype.executeNextEvent=function(){var a=this.eventQueue?this.eventQueue.shift():null;if(typeof(a)==="function"){a.apply(this)}};SWFUpload.prototype.unescapeFilePostParams=function(c){var f=/[$]([0-9a-f]{4})/i;var g={};var e;if(c!=undefined){for(var a in c.post){if(c.post.hasOwnProperty(a)){e=a;var b;while((b=f.exec(e))!==null){e=e.replace(b[0],String.fromCharCode(parseInt("0x"+b[1],16)))}g[e]=c.post[a]}}c.post=g}return c};SWFUpload.prototype.testExternalInterface=function(){try{return this.callFlash("TestExternalInterface")}catch(a){return false}};SWFUpload.prototype.flashReady=function(){var a=this.getMovieElement();if(!a){this.debug("Flash called back ready but the flash movie can't be found.");return}this.cleanUp(a);this.queueEvent("swfupload_loaded_handler")};SWFUpload.prototype.cleanUp=function(a){try{if(this.movieElement&&typeof(a.CallFunction)==="unknown"){this.debug("Removing Flash functions hooks (this should only run in IE and should prevent memory leaks)");for(var c in a){try{if(typeof(a[c])==="function"){a[c]=null}}catch(b){}}}}catch(e){}window.__flash__removeCallback=function(f,g){try{if(f){f[g]=null}}catch(h){}}};SWFUpload.prototype.fileDialogStart=function(){this.queueEvent("file_dialog_start_handler")};SWFUpload.prototype.fileQueued=function(a){a=this.unescapeFilePostParams(a);this.queueEvent("file_queued_handler",a)};SWFUpload.prototype.fileQueueError=function(a,c,b){a=this.unescapeFilePostParams(a);this.queueEvent("file_queue_error_handler",[a,c,b])};SWFUpload.prototype.fileDialogComplete=function(b,c,a){this.queueEvent("file_dialog_complete_handler",[b,c,a])};SWFUpload.prototype.uploadStart=function(a){a=this.unescapeFilePostParams(a);this.queueEvent("return_upload_start_handler",a)};SWFUpload.prototype.returnUploadStart=function(a){var b;if(typeof this.settings.upload_start_handler==="function"){a=this.unescapeFilePostParams(a);b=this.settings.upload_start_handler.call(this,a)}else{if(this.settings.upload_start_handler!=undefined){throw"upload_start_handler must be a function"}}if(b===undefined){b=true}b=!!b;this.callFlash("ReturnUploadStart",[b])};SWFUpload.prototype.uploadProgress=function(a,c,b){a=this.unescapeFilePostParams(a);this.queueEvent("upload_progress_handler",[a,c,b])};SWFUpload.prototype.uploadError=function(a,c,b){a=this.unescapeFilePostParams(a);this.queueEvent("upload_error_handler",[a,c,b])};SWFUpload.prototype.uploadSuccess=function(b,a,c){b=this.unescapeFilePostParams(b);this.queueEvent("upload_success_handler",[b,a,c])};SWFUpload.prototype.uploadComplete=function(a){a=this.unescapeFilePostParams(a);this.queueEvent("upload_complete_handler",a)};SWFUpload.prototype.debug=function(a){this.queueEvent("debug_handler",a)};SWFUpload.prototype.debugMessage=function(c){if(this.settings.debug){var a,e=[];if(typeof c==="object"&&typeof c.name==="string"&&typeof c.message==="string"){for(var b in c){if(c.hasOwnProperty(b)){e.push(b+": "+c[b])}}a=e.join("\n")||"";e=a.split("\n");a="EXCEPTION: "+e.join("\nEXCEPTION: ");SWFUpload.Console.writeLine(a)}else{SWFUpload.Console.writeLine(c)}}};SWFUpload.Console={};SWFUpload.Console.writeLine=function(e){var b,a;try{b=document.getElementById("SWFUpload_Console");if(!b){a=document.createElement("form");document.getElementsByTagName("body")[0].appendChild(a);b=document.createElement("textarea");b.id="SWFUpload_Console";b.style.fontFamily="monospace";b.setAttribute("wrap","off");b.wrap="off";b.style.overflow="auto";b.style.width="700px";b.style.height="350px";b.style.margin="5px";a.appendChild(b)}b.value+=e+"\n";b.scrollTop=b.scrollHeight-b.clientHeight}catch(c){alert("Exception: "+c.name+" Message: "+c.message)}};var SWFUpload;if(typeof(SWFUpload)==="function"){SWFUpload.queue={};SWFUpload.prototype.initSettings=(function(a){return function(){if(typeof(a)==="function"){a.call(this)}this.queueSettings={};this.queueSettings.queue_cancelled_flag=false;
this.queueSettings.queue_upload_count=0;this.queueSettings.user_upload_complete_handler=this.settings.upload_complete_handler;this.queueSettings.user_upload_start_handler=this.settings.upload_start_handler;this.settings.upload_complete_handler=SWFUpload.queue.uploadCompleteHandler;this.settings.upload_start_handler=SWFUpload.queue.uploadStartHandler;this.settings.queue_complete_handler=this.settings.queue_complete_handler||null}})(SWFUpload.prototype.initSettings);SWFUpload.prototype.startUpload=function(a){this.queueSettings.queue_cancelled_flag=false;this.callFlash("StartUpload",[a])};SWFUpload.prototype.cancelQueue=function(){this.queueSettings.queue_cancelled_flag=true;this.stopUpload();var a=this.getStats();while(a.files_queued>0){this.cancelUpload();a=this.getStats()}};SWFUpload.queue.uploadStartHandler=function(a){var b;if(typeof(this.queueSettings.user_upload_start_handler)==="function"){b=this.queueSettings.user_upload_start_handler.call(this,a)}b=(b===false)?false:true;this.queueSettings.queue_cancelled_flag=!b;return b};SWFUpload.queue.uploadCompleteHandler=function(b){var c=this.queueSettings.user_upload_complete_handler;var e;if(b.filestatus===SWFUpload.FILE_STATUS.COMPLETE){this.queueSettings.queue_upload_count++}if(typeof(c)==="function"){e=(c.call(this,b)===false)?false:true}else{if(b.filestatus===SWFUpload.FILE_STATUS.QUEUED){e=false}else{e=true}}if(e){var a=this.getStats();if(a.files_queued>0&&this.queueSettings.queue_cancelled_flag===false){this.startUpload()}else{if(this.queueSettings.queue_cancelled_flag===false){this.queueEvent("queue_complete_handler",[this.queueSettings.queue_upload_count]);this.queueSettings.queue_upload_count=0}else{this.queueSettings.queue_cancelled_flag=false;this.queueSettings.queue_upload_count=0}}}}}(function(b){b.watermarker=function(){};b.extend(b.watermarker,{defaults:{color:"#999",left:4},setDefaults:function(e){b.extend(b.watermarker.defaults,e)},checkVal:function(f,e){if(f==""){b(e).show()}else{b(e).hide()}}});function c(e){return e.val()}function a(e){return e.closest("ul").text()||e.val()}b.fn.watermark=function(h,g){var f,e;f=b.extend(b.watermarker.defaults,g);e=this.filter("input[type=text], input[type=password], textarea");e.each(function(){var j,y,m,u,n;var p,k,s,r,w,v;var x,l=c;j=b(this);y=j.attr("placeholder")!=undefined&&j.attr("placeholder")!=""?"placeholder":"title";m=h===undefined||h===""?b(this).attr(y):h;u=b('<span class="watermark_container"></span>');n=b('<span class="watermark">'+m+"</span>");x=j;if(j.is(".multiselect input[type=text]")){x=j.closest(".multiselect");n.css("z-index",1);l=a}if(y=="placeholder"){j.removeAttr("placeholder")}u.css({"float":x.css("float"),position:"relative"});u=x.wrap(u).closest(".watermark_container");if(this.nodeName.toLowerCase()!="textarea"){w=x.outerHeight();r="50%";v=w+"px"}else{s=x.position();k=x.css("margin-top")!=="auto"?parseInt(x.css("margin-top")):0;r=s.top+parseInt(x.css("padding-top"))+k+parseInt(x.css("border-top-width"));v=x.css("line-height");w=v==="normal"?parseInt(x.css("font-size")):v}p=x.css("margin-left")!=="auto"?parseInt(x.css("margin-left")):"0";o();n.css({position:"absolute",fontFamily:x.css("font-family"),fontSize:x.css("font-size"),color:f.color,left:f.left,right:0,bottom:0,top:r,height:w+"px",lineHeight:v,marginTop:"-"+(w/2)+"px",marginLeft:p+parseInt(x.css("padding-left"))});u.prepend(n);n.click(function(){j.focus()});j.focus(function(){o();n.css("opacity",0.7)}).blur(function(){o();n.css("opacity",1)}).change(function(){o()}).keydown(function(z){b(n).hide()});function o(){b.watermarker.checkVal(l(j),n)}});return this};b(document).ready(function(){b(".jq_watermark").watermark()})})(jQuery);if(window.azouk==undefined){window.azouk={}}if(window.azouk.logging==undefined){window.azouk.logging={}}window.azouk.logging.log=function(f,c,a){try{a=jQuery.extend({level:f,verbosity:c,ctx:"javascript",flow:window.request.workflow},a);jQuery.ajax({url:AjaxAzoukLog,data:a,type:"GET",dataType:"text",timeout:10*1000,success:function(){},error:function(){},complete:function(){}})}catch(b){}};function ajax_error_sink(b,g,f,a){try{jQuery.ajax({url:AjaxErrorSink,type:"POST",data:{url:a.url,data:a.data,timeout:a.timeout,msg:g,error:f,time:Date().toString()},error:function(){}})}catch(c){}}jQuery.ajaxSetup({error:function(a,c,b){ajax_error_sink(a,c,b,this)}});function showCornerErrorMessage(c,b){b=jQuery.extend({timeout:4000,cssClass:"corner-error-message",css:{}},b);var a=$("<div/>");if(typeof c=="string"){a.html(c)}else{a.append(c)}a.addClass(b.cssClass).css({color:"red",fontWeight:"bold",position:"fixed",background:"yellow",top:5,left:5}).css(b.css).appendTo(document.body);setTimeout(function(){a.fadeOut()},b.timeout)}function initializeTheInits(){var a=function(){var g=$(this),c,b;try{c=g.html().replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&");window["eval"](c)}catch(f){console.error(["initializeTheInits",f]);if(window.DEBUG){alert("initializeTheInits failed for \n"+c+"\nwith: "+(f.message||f))}else{showCornerErrorMessage("Failed to initialize the page.",{timeout:4000})}}$(g).remove()};$("span.azouk-init").each(a);$("span.azouk-init-later").each(a);applyInputWaterkMarks()}$(initializeTheInits);$(function(){function a(j){alert("Error: "+j+".");return null}function b(l){if(l._tag_category_menu_is_initialized){return}var j=new Array();for(cat in AppSettings.tag_category){j[AppSettings.tag_category[cat]]=cat}for(var k=0;k<j.length;k++){if(j[k]){l[k-1]=new Option(j[k],k)}}l._tag_category_menu_is_initialized=true}function e(j){return parseInt($(".tag-id",j).html())}function g(k,j){j=jQuery.extend({url:TagInfoAction,data:{id:k},type:"GET",dataType:"json",timeout:3*1000},j);return jQuery.ajax(j)}function c(k){var j=undefined;jQuery.each(AppSettings.tag_category,function(l,m){if(m==k){j=l;return false}});return j}function h(n){var k,l,j;try{if(n==0){return a("You have to save this form first")}k=$("#edit-tag-dialog");l=$("#edit-tag-category",k)[0];b(l)}catch(m){return a("this tag cannot be edited")}function o(){a("failed to initialize the dialog\nYou must be logged in to use this feature");k.jqmHide()}j=$("input, select",k);j.attr("disabled","disabled");j.filter("[type=text]").val("");show_progress_wirek();g(n,{success:function(p){try{$("#edit-tag-id",k).val(p.id);$("#edit-tag-phrase",k).val(p.phrase);$("#edit-tag-abbreviation",k).val(p.abbreviation);for(var r=0;r<l.length;r++){if(l[r].value==p.category){l.selectedIndex=r;break}}j.removeAttr("disabled");$("#edit-tag-id",k).attr("disabled","disabled")}catch(s){alert(s);o()}},error:function(p,s,r){ajax_error_sink(p,s,r,this);o()},complete:hide_progress_wirek});k.jqm({modal:true}).jqmShow();$("html, body").animate({scrollTop:0},"slow")}function f(j,s){var l={},k=false,o,r;s=jQuery.extend({showInitialQuestion:true,validateTagIds:true},s);if(s.validateTagIds){jQuery.each(j,function(){if(l[this||0]){k=true;return false}l[this||0]=true});if(k){azouk.alert("Tags chosen for merge are repeated.");return}if(l[0]){azouk.alert("One of tags chosen for merge is new.");return}if(j.length<2){azouk.alert("Merge requires two or more tags.");return}}if(!s.showInitialQuestion){n();return}o=$('<div class="merge-tags-question"><p>Are you sure you want to merge the following tags?</p><ul></ul></div>');jQuery.each(j,function(){var w=this,v,u='<span class="tag-id">'+w+"</span>";v=$("<li>tag #"+w+"</li>").addClass("tag-display").append(u).appendTo(o.find("ul"));v.enableTagEdit();g(w,{success:function(x){var z,y="#"+w+" "+x.phrase;if(x.abbreviation){y+=" ("+x.abbreviation+")"}z=c(x.category);if(z){y+=" - "+z}$("<a/>").attr("href","/search/?q="+w).attr("target","_blank").text(y).appendTo(v.empty().append(u))},error:function(){v.empty().addClass("error").text("Failed to retrieve tag data.")}})});r=azouk.confirm({question:o,yes:n});return;function n(){loadAnyModalAjaxForm("/ajx/merge_tags?"+jQuery.param({tags:j.join(",")}),{modalClass:"tag-merge-dialog",postLoadCallback:function(u){u.data("_postModalSubmitCallback",m);
m(u)}})}function m(v){var u=$("#id_tags_multi",v);u.find(".multiselect-icon-marker").remove();u.find("li.ms_tag").click(function(z){var x,C,w,B,A,y;x=$(z.target).filter(".ms_tag");if(!x.length){x=$(z.target).closest(".ms_tag")}C=x.data("values");p(v,{phrase:C[0],abbreviation:C[1],id:C[2],category:C[3]});z.stopPropagation()})}function p(v,u){w("tag_id",u.id);w("phrase",u.phrase);w("abbreviation",u.abbreviation);w("category",u.category);function w(x,y){if(y==undefined){return}y=y||"";v.find("input, select").filter("[name="+x+"]").val(y)}}}window.azouk=window.azouk||{};azouk.tags=jQuery.extend(azouk.tags,{extractId:e,getTagData:g,categoryName:c,showTagEdit:h,showTagMerge:f});$.fn.enableTagEdit=function(){if(!window.USER_CAN_AJAX_EDIT_TAGS){return}var j,l={edit:function(n,m,o){h(e(m))},merge:function(o,n,r){var m=$(n).closest(".multiselect"),p=m.find(".ms_tag");if(!m.length){azouk.alert("You can only merge tags within search box.");return}f(jQuery.map(p,e))}};function k(n,m,o){return l[n](n,m,o)}j=$(".tag-display",this).add(this.filter(".tag-display"));j.not("#search-box .multiselect *").contextMenu({menu:"tag-display-context-menu"},k);j.filter("#search-box .multiselect *").contextMenu({menu:"tag-display-search-box-context-menu"},k)};$("#edit-tag-dialog form").submit(function(){show_progress_wirek();$.ajax({url:EditTagAction,type:"POST",data:{id:$("#edit-tag-id").val(),phrase:$("#edit-tag-phrase").val(),abbreviation:$("#edit-tag-abbreviation").val(),category:$("#edit-tag-category").val()},dataType:"json",success:function(j,k){if(j){for(d in j){if(window.add_action_message){window.add_action_message(j[d])}else{alert(j[d])}}}},complete:hide_progress_wirek,error:function(j,l,k){ajax_error_sink(j,l,k,this);alert("Saving failed!")},timeout:10*1000});$("#edit-tag-dialog").jqmHide();return false});$("body").enableTagEdit()});(function(a){a.fn.autogrow=function(b){var b=a.extend({minLength:100,maxLength:false,startLength:10,incrementLength:8},b);if(b.minLength==undefined){b.minLength=(b.startLength+1*b.incrementLength)}_adjust_size=function(){var e=a(this),c=(b.startLength+b.incrementLength*(e.val().length));if((b.minLength)&&(c<b.minLength)){c=b.minLength}if((b.maxLength)&&(c>b.maxLength)){c=b.maxLength}e.css("width",c);if(jQuery.browser.mozilla){e.val(e.val())}};this.css("width",b.minLength);this.keydown(_adjust_size).keyup(_adjust_size).change(_adjust_size);this.data("autogrow.adjust_size",_adjust_size);return this}})(jQuery);(function(a){jQuery.autocomplete=function(f,z){var D=a(f).attr("autocomplete","off"),s=document.createElement("div"),l=a(s),M=null,C="",m={},o=false,b=null,w=0,T=0,L=0,v="",S={},r=[],P,Q;if(z.inputClass){D.addClass(z.inputClass)}l.hide().addClass(z.resultsClass).css("position","absolute");if(z.width>0){l.css("width",z.width)}a("body").append(s);f.autocompleter=this;function p(){m={};m.data={};m.length=0}p();if(z.data!=null){if(typeof z.url!="string"){z.cacheLength=1}for(Q=0;Q<z.data.length;Q++){r=((typeof z.data[Q]=="string")?[z.data[Q]]:z.data[Q]);if(r[0].length>0){v=r[0].substring(0,1).toLowerCase();if(!S[v]){S[v]=[]}S[v].push(r)}}for(P in S){z.cacheLength++;g(P,S[P])}}function y(k){b=k.keyCode;L=(new Date).getTime();switch(k.keyCode){case 38:k.preventDefault();G(-1);break;case 40:k.preventDefault();G(1);break;case 9:case 13:if(I()){D.get(0).blur();k.preventDefault()}break;default:if(M){clearTimeout(M)}M=setTimeout(x,z.delay);break}}D.keydown(y).keyup(function(k){if(k.keyCode>=48){if(M){clearTimeout(M)}M=setTimeout(x,z.delay)}}).keypress(function(k){switch(k.keyCode||b){default:if(!k.keyCode&&k.which){}else{break}case 38:case 40:if((new Date).getTime()-L>100){return y({keyCode:k.keyCode||k.which||b,preventDefault:function(){k.preventDefault()}})}break}});D.focus(function(){o=true}).blur(function(){o=false;e()});A();function x(){if(b==46||(b>8&&b<32)){l.hide();return}var k=D.val();if(k==C){return}C=k;if(k.length>=z.minChars){D.addClass(z.loadingClass);F(k)}else{D.removeClass(z.loadingClass);l.hide()}}function G(U){var V=n(s),W=-1,k;if(V.length!=1){return}k=a("li",V);if(!k.length){return}k.each(function(X){if(a(this).is(".ac_over")){W=X;return false}});W+=U;if(W<0){W=k.length-1}else{if(W>=k.length){W=0}}k.removeClass("ac_over");a(k[W]).addClass("ac_over");H()}function I(){if(!l.is(":visible")){return false}var V=n(s),k=a("li.ac_over",V),U;if(k.length!=1){U=a("li",s);if(z.selectOnly){if(U.length==1){k=a(U[0])}}else{if(z.selectFirst){k=a(U[0])}}}if(k.length){k.click();return true}else{return false}}function u(k){if(!k){k=document.createElement("li");k.extra=[];k.selectValue=""}var U=a.trim(k.selectValue?k.selectValue:k.innerHTML);f.lastSelected=U;C=U;l.html("");D.val(U);A();if(z.onItemSelect){setTimeout(function(){z.onItemSelect(k)},1)}}function c(W,U){var V=D.get(0),k;if(V.createTextRange){k=V.createTextRange();k.collapse(true);k.moveStart("character",W);k.moveEnd("character",U);k.select()}else{if(V.setSelectionRange){V.setSelectionRange(W,U)}else{if(V.selectionStart){V.selectionStart=W;V.selectionEnd=U}}}V.focus()}function B(k){if(b!=8){D.val(D.val()+k.substring(C.length));c(C.length,k.length)}}function H(){var V=z.autocompleteTarget,W=a(V).offset(),k=a(V).outerHeight(),U=(z.width>0)?z.width:a(V).width();a("."+z.resultsClass).hide();if(!V.is(":visible")){return}l.css({width:parseInt(U)+"px",top:(W.top+k)+"px",left:W.left+"px"}).show();azouk.flashes.injectIframeIfNecessary(l)}function e(){if(M){clearTimeout(M)}M=setTimeout(A,200);return this}function A(){if(M){clearTimeout(M)}D.removeClass(z.loadingClass);if(l.is(":visible")){l.hide()}if(z.mustMatch){var k=D.val();if(k!=f.lastSelected){u(null)}}}function j(U,k){if(k){D.removeClass(z.loadingClass);l.empty();if(!o||k.length==0){A();return}N(O(k),u)}else{A()}}function N(U,k){if(M){clearTimeout(M)}D.removeClass(z.loadingClass);l.empty();K(U,k);l.append(U);if(z.autoFill&&(D.val().toLowerCase()==q.toLowerCase())){B(data[0][0])}H()}this.displayResultsDom=N;this.createSelection=c;function K(V,k){var U=n(V);if(U.length!=1){console.error("autocomplete: installCallbacks: list.length = "+U.length);return}a("li",U).hover(function(){a("li",U).removeClass("ac_over");a(this).addClass("ac_over")},function(){a(this).removeClass("ac_over")}).click(function(W){W.preventDefault();W.stopPropagation();k(this)})}function n(U){var k=a("ul, ol",U).add(a(U).filter("ul, ol"));if(k.length>1){k=k.filter(".ac_results_list")}return k}function h(U){if(!U){return null}var k=[];jQuery.each(U,function(){var V=[this.show,this.phrase,this.abbreviation,this.id,this.category];k[k.length]=V});return k}function O(Z){var Y=document.createElement("ul"),W=Z.length,X,aa,U,k,V;if((z.maxItemsToShow>0)&&(z.maxItemsToShow<W)){W=z.maxItemsToShow}for(X=0;X<W;X++){aa=Z[X];if(!aa){continue}U=document.createElement("li");if(z.formatItem){U.innerHTML=z.formatItem(aa,X,W);U.selectValue=aa[0]}else{U.innerHTML=aa[0];U.selectValue=aa[0]}k=null;if(aa.length>1){k=[];for(V=1;V<aa.length;V++){k[k.length]=aa[V]}}U.extra=k;Y.appendChild(U)}return Y}function F(U){if(!z.matchCase){U=U.toLowerCase()}var k=z.cacheLength?R(U):null,V=(++w);if(k){j(U,k)}else{if((typeof z.url=="string")&&(z.url.length>0)){a.get(z.url,{q:U},function(W){W=h(W);g(U,W);if(V>T){T=V;j(U,W)}},"json")}else{D.removeClass(z.loadingClass)}}}function R(Z){if(!Z){return null}if(m.data[Z]){return m.data[Z]}var X,U,aa,Y,V,k,W;if(z.matchSubset){for(X=Z.length-1;X>=z.minChars;X--){U=Z.substr(0,X);aa=m.data[U];if(aa){Y=[];for(V=0;V<aa.length;V++){k=aa[V];W=k[0];if(E(W,Z)){Y[Y.length]=k}}return Y}}}return null}function E(V,U){if(!z.matchCase){V=V.toLowerCase()}var k=V.indexOf(U);if(k==-1){return false}return k==0||z.matchContains}this.results=l;this.hideResultsNow=A;this.flushCache=p;this.focusInput=function(){D.focus()};this.setExtraParams=function(k){z.extraParams=k};this.findValue=function(){var U=D.val(),k;if(!z.matchCase){U=U.toLowerCase()}k=z.cacheLength?R(U):null;if(k){J(U,k)}else{if((typeof z.url=="string")&&(z.url.length>0)){a.get(z.url,{q:U},function(V){V=h(V);g(U,V);J(U,V)},"json")}else{J(U,null)
}}};function J(Z,Y){if(Y){D.removeClass(z.loadingClass)}var W=(Y)?Y.length:0,U=null,X,aa,k,V;for(X=0;X<W;X++){aa=Y[X];if(aa[0].toLowerCase()==Z.toLowerCase()){U=document.createElement("li");if(z.formatItem){U.innerHTML=z.formatItem(aa,X,W);U.selectValue=aa[0]}else{U.innerHTML=aa[0];U.selectValue=aa[0]}k=null;if(aa.length>1){k=[];for(V=1;V<aa.length;V++){k[k.length]=aa[V]}}U.extra=k}}if(z.onFindValue){setTimeout(function(){z.onFindValue(U)},1)}}function g(U,k){if(!k||!U||!z.cacheLength){return}if(!m.length||m.length>z.cacheLength){p();m.length++}else{if(!m[U]){m.length++}}m.data[U]=k}};jQuery.fn.autocomplete=function(c,b,e){b=b||{};b.url=c;b.data=((typeof e=="object")&&(e.constructor==Array))?e:null;b.width=parseInt(b.width,10);b=a.extend({inputClass:"ac_input",resultsClass:"ac_results",minChars:1,delay:400,matchCase:0,matchCase:1,matchContains:0,cacheLength:1,mustMatch:0,extraParams:{},loadingClass:"ac_loading",selectFirst:false,selectOnly:false,maxItemsToShow:-1,autoFill:false,width:0},b);this.each(function(){new jQuery.autocomplete(this,b)});return this};jQuery.fn.autocompleteArray=function(c,b){return this.autocomplete(null,b,c)};jQuery.fn.indexOf=function(c){for(var b=0;b<this.length;b++){if(this[b]==c){return b}}return -1}})(jQuery);(function(a){a.multiselect=function(b,e,w){var H=a(b)[0].form,j,A=false,ac,P,V,s,v,Y,D,R,L=null,T=-1,y=null,ad=null,l=undefined,z,G,Q,C,f=300,m=10,o=10,U=false;w=a.extend({format:{get:"multi-value",post:"json"}[H.method.toLowerCase()],widgetClass:"multiselect",delay:100,minChars:2,autoFill:false,maxItemsToShow:20,selectFirst:true,cacheLength:10,matchSubset:false,onItemSelect:n,tagsMaxCount:false,useFilter:false,useMulti:true,useFullTextSearch:true,formatItem:function(ah,ag,af){if(ah[2]){return'<b style="font-size:13px">'+ah[2]+"</b> <span><i>"+ah[1]+"</i></span>"}else{return'<span style="font-size: 13px"><i>'+ah[1]+"</i></span>"}},formatTag:function(af,ai){var ah=ai[0],ag=ah;if(ai[1]){console.log(ai);if((ai[2]==0)||(ai[3]!=AppSettings.tag_category["Expert Names"]&&ai[3]!=AppSettings.tag_category["Company Names"]&&ai[3]!=AppSettings.tag_category["Company Aliases"]&&ai[3]!=AppSettings.tag_category["Proper Names"])){ah=ai[1]}ag=ai[1]+" ("+ai[0]+")"}if(!ah||/^\s*$/.test(ah)){ah="&emsp;"}if(ai[2]){ah="<span class='tag-display'><span class='tag-id'>"+ai[2]+"</span>"+ah+"</span>"}return{text:ah,attr:{title:ag}}},formatMultiTag:function(af,ag){return{text:ag[0][1],attr:{title:ag[0][1]}}}},w);P=a(b).hide();V=P.attr("name");s=a('<div class="'+w.widgetClass+'" id="'+P.attr("id")+'_multi"><ul><li class="ms_entry"><input type="text" /></li></ul></div>');if(w.bgColor){s.css("background",w.bgColor)}P.after(s);v=a(document.createElement("abbr")).attr("title","Please select tags in this field").addClass("multiselect-icon-marker");s.prepend(v);v.click(function(){setTimeout(function(){D.focus()},1)});D=a("input",s).autogrow(w);if(w.watermark){setTimeout(function(){D.watermark(w.watermark)},1)}R=D.parent();a(H).submit(function(ag){if(w.useFullTextSearch&&D.val()){if(ag["last-submit-event-that-caused-fulltext-search"]){console.log("Fulltext search shown for some other field.");return}else{ag["last-submit-event-that-caused-fulltext-search"]=1}function af(){w.useFullTextSearch=false;D.val("");D.change();a(H).submit()}a.ajax({type:"GET",dataType:"json",data:{q:D.val(),fullText:1},url:w.url,success:function(ah){try{B(ah,true)}catch(ai){if(DEBUG){alert(ai)}af()}},error:af});return false}if(E()===false){return false}});w=a.extend({autocompleteTarget:s},w);b.tags=this;function ae(af){if(af.createTextRange){var ag=document.selection.createRange().duplicate();ag.moveEnd("character",af.value.length);if(ag.text===""){return af.value.length}return af.value.lastIndexOf(ag.text)}else{return af.selectionStart}}function S(af,ag){if(!af){return}a("*",s).removeClass("ms_active");af.addClass("ms_active");if(!ag&&af.is(".ms_entry")){a("input",af).focus()}if(af.hasClass("ms_multi")){I(af[0].title);activeMultiTag=af}}function W(ag,af){if(!ag||l){return}ag.removeClass("ms_active");if(!af&&ag.is(".ms_entry")){a("input",ag).blur()}}function N(af){if(!L){return null}$neighbour=L[af]();return $neighbour.length?$neighbour:null}function g(ag,af){if(!ag){return L}W(L,af);S(ag,af);var ah=L;L=ag;return ah}function k(af){if(!L||(L.is(".ms_entry")&&ae(a("input",L).get(0)))){return}g(N(af))}function h(){if(!L){return}if(L.is(".ms_entry")){if(ae(a("input",L).get(0))){return}else{g(N("prev"))}}else{var af=g(N("prev"));M(af)}}function J(){if(U){throw"busy"}function ag(ah){return{phrase:ah[0],abbreviation:ah[1],id:ah[2],category:ah[3]}}var af=[];a("li.ms_tag",s).each(function(){if(a(this).hasClass("ms_multi")){jQuery.each(a(this).data("values"),function(){af.push(ag(this))})}else{af.push(ag(a(this).data("values")))}});return af}function E(){try{if(U){alert("The form is still busy. Please wait a moment.");return false}var af=J();switch(w.format){case"multi-value":a("input[name="+V+"]",a(H)).remove();P=undefined;jQuery.each(af,function(){var ah=a('<input type="hidden"/>');if(this.category==AppSettings.tag_category["Full text search"]){ah.attr("name",V+"_full");ah.val(this.abbreviation)}else{ah.attr("name",V);ah.val([this.phrase,this.abbreviation,this.id].join(" "))}ah.appendTo(H)});break;case"json":P.val(jQuery.toJSON(af));break;default:alert("Error: failed to serialize the form data.\nUnknown serialization method: "+w.format);return false}}catch(ag){alert("Error: failed to serialize the form data.\n"+ag);return false}}function M(af){W(af);af.remove();if(s.find(".ms_tag").length<1){g(R)}if(w.tagsMaxCount&&s.children().length<w.tagsMaxCount+1){R.show().focus()}b.tags.modified=true}function u(ah,aj,ag){var af,ai="";if(ag){af=w.formatMultiTag(ah,aj)}else{af=w.formatTag(ah,aj)}if(ag){ai=" ms_multi"}$newTag=a('<li class="ms_tag'+ai+'">'+af.text+'<a href="#" class="ms_closebutton" title="remove this tag"></a></li>');if($newTag.enableTagEdit){$newTag.enableTagEdit()}$newTag.attr(af.attr);if(w.useFilter){if(aj.hide){$newTag.css("display","none")}}a(".ms_closebutton",$newTag).click(function(ak){$target=a(ak.target);M($target.parent());return false});$newTag.data("values",aj);R.before($newTag);if(w.tagsMaxCount&&a("li",s).length>=w.tagsMaxCount+1){R.hide()}b.tags.modified=true}function r(af,ag){u(af,ag,true)}function Z(af,ag){u(af,ag)}function n(af){Z(a(af).text(),af.extra);D.val("");ab();D.focus()}this.values=J;this.append=Z;D.autocomplete(e,w);ac=D[0].autocompleter;a(document).bind(a.browser.msie?"keydown":"keypress",function(af){if(af.keyCode==8&&L&&!L.is(".ms_entry")){return false}}).keydown(function(){if(L&&L.is(".ms_entry")&&a("input",L)){ad=a("input",L).val()}else{ad=null}}).keyup(function(af){switch(af.keyCode){case 37:k("prev");break;case 39:k("next");break;case 8:case 46:if(!ad){h()}break;default:break}}).click(function(af){$target=a(af.target);var ag=false;$target.parents("."+w.widgetClass).andSelf().each(function(){if(this===s.get(0)){ag=true}});if(ag===true){if($target.is("li")){g($target)}else{if($target.is("span")&&$target.parent().is("li")){g($target.parent())}else{g(R);if(!$target.is("input")){ac.createSelection(D.val().length,D.val().length)}}}return false}W(L,true);L=null});D.change(function(){A=false}).focus(function(){g(R,true);if(j){clearTimeout(j);j=undefined}}).blur(function(){if(L&&L.get(0)===R.get(0)){W(L,true);L=null}if(j){clearTimeout(j);j=undefined}if(A||!w.useFullTextSearch){return}j=setTimeout(function(){A=true;j=undefined;if(D.val()){a.ajax({type:"GET",dataType:"json",data:{q:D.val(),fullText:1},url:w.url,success:function(af){try{B(af,false)}catch(ag){if(DEBUG){alert(ag)}}}})}},500)});function K(ag){var af=a(".multihint > ol > li");if(!af){return}T+=ag;if(T<0){T=0}else{if(T>=af.size()){T=af.size()-1}}af.removeClass("ac_over");a(af[T]).addClass("ac_over")}function O(){if(!ac.results.is(":visible")){return false}var af=a("li.ac_over",ac.results)[0];if(!af){return false}a(af).click()}function ab(){if(jQuery.isFunction(D.data("autogrow.adjust_size"))){try{D.data("autogrow.adjust_size").call(D.get(0))
}catch(af){console.error(af)}}}a(":submit",H).keydown(function(af){y=af.keyCode;switch(af.keyCode){case 38:af.preventDefault();K(-1);break;case 40:af.preventDefault();K(1);break;case 9:case 13:if(O()){a(":submit",H).get[0].blur();af.preventDefault()}default:T=-1}});function B(ag,af){ac.displayResultsDom(a("<div/>").append('<div class="oracle-title">Did you mean?</div>').append(X(ag,af)),function(ah){c(ah,af)});ac.focusInput();l=true}function X(ak,aj){var ai,ag=ak.length,ah,af;if(!ag){return a("<div/>").append(a('<div class="ac-no-suggestions">No suggestions.</div>')).append(a("<ol/>").hide())}ai=document.createElement("ol");for(ah=0;ah<ag;ah++){pack=ak[ah];if(!pack){continue}af=document.createElement("li");if(w.formatItem){af.innerHTML=w.formatItem(["ignored-value",pack[0].phrase,pack[0].abbreviation,pack[0].id,pack[0].category],ah,ag);if(pack[0].category==AppSettings.tag_category["Full text search"]){a(af).css("margin-top","15px")}}else{af.innerHTML=pack[0].phrase}af.selectValue=pack;ai.appendChild(af)}return a(ai)}function c(ag,ai){ac.hideResultsNow();var aj=ag.selectValue,ah,af;D.val("");ab();if(aj){for(ah=0;ah<aj.length;ah++){af=aj[ah];Z("",[af.phrase,af.abbreviation,af.id,af.category])}}else{}if(ai){a(H).submit()}}function I(af){ac.displayResultsDom(x(af,z[af]),p);ac.focusInput();l=false}function x(ag,ah){var aj=document.createElement("ul"),ai,af;for(ai=0;ai<ah.length;ai++){af=document.createElement("li");af.innerHTML=ah[ai][0];af.selectValue=ah[ai][0];af.title=ag;aj.appendChild(af)}return aj}function p(ah){ac.hideResultsNow();var ag=a(ah).text(),af=activeMultiTag[0].title,ai;M(activeMultiTag);for(ai=0;ai<z[af].length;ai++){value=z[af][ai];if(value[0]==ag){Z("",value)}}}function F(al,ah,af,aj){aj=jQuery.extend({iterAtOnceTreshold:f,iterAtOnceLimit:m,iterChunkDelay:o},aj);af=af||function(){};if(al.length<aj.iterAtOnceTreshold){jQuery.each(al,ah);af()}else{var am=aj.iterAtOnceLimit,ai=aj.iterChunkDelay,ak=0,ag;(function(){ag=Math.min(al.length,ak+am);for(current=al[ak];ak<ag;current=al[++ak]){ah.call(current,ak.current)}if(ak==al.length){af()}else{setTimeout(arguments.callee,ai)}})()}}function aa(){if(U){throw"busy"}a("li.ms_tag",s).remove();var ao,an,am,af=[];for(ao in z){af.push(ao)}if(af.length<f){jQuery.each(z,ai);jQuery.each(z,al)}else{U=true;F(af,ag(ai),function(){F(af,ag(al),function(){U=false})})}function ag(ap){return function(){return ap(this,z[this])}}function ai(ap,aq){if(aq.length>1){am=jQuery.grep(aq,ah);if(am.length){ak(ap,am);aq=jQuery.grep(aq,aj)}}if((aq.length==1)||(ap=="")||(!w.useMulti)){ak(ap,aq)}}function al(ap,aq){aq=jQuery.grep(aq,aj);if((aq.length>1)&&(ap!="")&&(w.useMulti)){r(ap,aq)}}function ak(ap,aq){jQuery.each(aq,function(ar,at){u(ap,at)})}function ah(ap){return ap[3]==AppSettings.tag_category["Proper Names"]}function aj(ap){return !ah(ap)}}if(P.val()){(function(){var af=window["eval"](P.val()),ag=0;z={};U=true;F(af,ai,ah);return;function ai(){var al=[this.phrase,this.abbreviation,this.id,this.category],aj=this.phrase,ak=this.abbreviation;z[ak]=z[ak]||[];z[ak].push(al);if((w.useFilter)&&(aj.indexOf(" ")==-1)){al.hide=true}else{al.hide=false}}function ah(){U=false;aa();activeMultiTag="";if(w.useFilter){G=document.createElement("a");Q=a(G);G.innerHTML=gettext("show all");G.title=gettext("Show all tags");C=a(s).offset();$label=a("label[@for=id_topics]");Q.css({parent:s,position:"relative",top:0+"px",right:(70+$label.width()-(s.width()))+"px",cursor:"pointer"});$label.append(G);Q.click(function(aj){if(G.innerHTML==gettext("show all")){G.innerHTML=gettext("filter");G.title=gettext("Show only important tags")}else{G.innerHTML=gettext("show all");G.title=gettext("Show all tags")}w.useFilter=!w.useFilter;aa()})}}})()}b.tags.modified=false;a("input[name="+V+"_full]",a("#id_"+V).closest("form")).each(function(ag,af){Z("Exact Phrase",["Exact Phrase",a(af).val(),-1,AppSettings.tag_category["Full text search"]])}).remove()};a.fn.multiselect=function(c,b){return this.each(function(){new jQuery.multiselect(this,c,b)})};a.fn.multiselect_update=function(b){return this.each(function(){this.do_update(b)})}})(jQuery);$(function(){var c=this,b="_acvrc",a;if(c.request&&c.request.method=="GET"&&c.VERSION_SHORT_HASH&&c.AjaxCheckVersion&&jQuery.cookie){if(!jQuery.cookie(b)){jQuery.ajax({url:AjaxCheckVersion,type:"POST",data:{ver:c.VERSION_SHORT_HASH},dataType:"json",success:function(e,f){if(e===false){a=new Date();a.setTime(a.getTime()+30*1000);jQuery.cookie(b,1,a);c.location.reload()}}})}}});var _gaq=_gaq||[];$(function(){var c=window.document,b=c.body;if($("#search-categories-submenu .search-ct-box").length>0){$("#results").prepend('<div id="result-content-types"/>');$("#result-content-types").prepend($("#search-categories-submenu").html())}function a(){return $("#search-categories-menu .selected").length>0}function e(){submenu_id=$("#search-categories-menu .selected").attr("id").replace(/-link/,"");$("#search-categories-submenu div").hide();$("#"+submenu_id).show()}$("#search-categories-menu a").hover(function(f){link_id=$(f.target).attr("id");$("#search-categories-submenu div").hide();$("#"+link_id.replace(/-link/,"")).show()},function(){$("#search-categories-submenu div").hide();if(a()){e()}}).click(function(g,f){link_id=$(g.target).attr("id");$("#search-categories-menu a").removeClass("selected");$(g.target).addClass("selected");if(a()){e()}if(link_id=="content-link"){$("#id_item").val(1)}else{if(link_id=="experts-link"){$("#id_item").val(2)}else{if(link_id=="companies-link"){$("#id_item").val(3)}else{if(link_id=="expert-content-link"){$("#id_item").val(5)}else{if(link_id=="expert-experts-link"){$("#id_item").val(6)}else{if(link_id=="expert-companies-link"){$("#id_item").val(7)}else{if(link_id=="company-content-link"){$("#id_item").val(12)}else{if(link_id=="company-experts-link"){$("#id_item").val(13)}else{if(link_id=="company-companies-link"){$("#id_item").val(14)}}}}}}}}}return false});start_item_value=$("#id_item").val()||1;if(start_item_value==1){$("#content-link").click()}else{if(start_item_value==2){$("#experts-link").click()}else{if(start_item_value==3){$("#companies-link").click()}else{if(start_item_value==5){$("#expert-content-link").click()}else{if(start_item_value==6){$("#expert-experts-link").click()}else{if(start_item_value==7){$("#expert-companies-link").click()}else{if(start_item_value==12){$("#company-content-link").click()}else{if(start_item_value==13){$("#company-experts-link").click()}else{if(start_item_value==14){$("#company-companies-link").click()}}}}}}}}}$("#companies-link, #experts-link, #content-link, #expert-content-link, #expert-experts-link, #expert-companies-link, #company-content-link, #company-experts-link, #company-companies-link",$("body.myzouk-results, body.search-results")).click(function(){$("#search-form").submit()});$("#right-column-more").click(function(){$("#right-column-info").show();$("#right-column-less").show();$("#right-column-more").hide()});$("#right-column-less").click(function(){$("#right-column-info").hide();$("#right-column-less").hide();$("#right-column-more").show()});$("#right-column-more").click();$("#tags div").hide();$("#tags a.accordion-header").toggle(function(f){$(f.target).addClass("selected").next().slideDown("fast")},function(f){$(f.target).removeClass("selected").next().slideUp("fast")});$("#accordion-our-favorite-tags, #accordion-our-private-tags,  #accordion-experts-favorite-tags, #accordion-my-favorite-tags,  #accordion-my-private-tags,  #accordion-related-tags, #accordion-related-experts, #accordion-suggested-tags").click();$("#accordion-private-tags").click();$("#action-forms div").hide();$("#action-forms a").click(function(f){$("#action-forms div").slideUp("fast");$(f.target).next().slideDown("fast");return false});$(".preview-image1").each(function(f){$(this)[0].src=$(this)[0].title});$(".save-orange, .save-green, .save-blue").filter("input[type=submit]").add("#logo").focus(function(){$(this).blur()});$(".dropdown-links > a:eq(0)").each(function(){var n=$(this),h=n.parent(),j=h.data("dropdown-linkList")||h.children(".dropdown-links-list:eq(0)"),m="#"+azouk.ensureHasId(j),l=(jQuery.browser.msie&&jQuery.browser.version<8);
if(l&&h.find(m).length){h.data("dropdown-linkList",j);j.appendTo(b)}n.click(function(){if(j.is(":visible")){k()}else{f();$(c).bind("click",g)}n.blur();return false});function g(o){var r=$(o.target),p=r.is(m)||$(o.target).parents(m).length;if(!p){k()}}function f(){if(l){var o=h.offset();j.css({top:(o.top+h.outerHeight())+"px",left:o.left+"px",position:"absolute"})}if(jQuery.browser.msie){j.show()}else{j.fadeIn("fast")}}function k(){if(jQuery.browser.msie){j.hide()}else{j.fadeOut("fast")}$(c).unbind("click",g)}});$("#search-box-container").each(function(){var h=$("#search-categories-submenu",this),f,g;if(!h.length||!(f=h.children(".search-ct-box")).length){return}g=$(f.get(0)).offset().top;f.filter(function(){return $(this).offset().top>g}).remove()});if(/Linux/.test(navigator.platform)){$(".not-on-linux").remove()}setTimeout(function(){var g=c.referrer,f,h;if(g&&g.indexOf("//"+location.host+"/")==-1){$(".content-details #right-column-less").click();if((f=g.match(/\Wq=([^&]*)(&|$)/))){f=decodeURIComponent(f[1].replace(/[+]/g," "));if(!f){return}h=$(".content-details #search-form .multiselect input[type=text].ac_input:eq(0)").val(f);if(!h.length){return}jQuery.watermarker.checkVal(f,h.closest(".watermark_container").find(".watermark"));setTimeout(function(){h.data("autogrow.adjust_size").apply(h[0])},1)}}},30)});$(window).bind("load",function(){jQuery.each($("div.fix-height-by-absolutes").get().reverse(),function(){var b=$(this),a=0;$("div",b).filter(function(){return $(this).css("position")=="absolute"}).each(function(){a=Math.max(a,this.offsetHeight+this.offsetTop)});if(a){if(jQuery.browser.msie&&jQuery.browser.version<7){b.css("height",a+"px").addClass("ie6-height-as-min-height")}else{b.css("min-height",a+"px")}}})});$(window).bind("load",function(){$(".content-preview").each(function(){var a=$(this);$("img",a).filter(function(){return azouk.image.missing(this)}).remove();if(!$("img",a).length){a.prepend('<img src="'+MEDIA+'images/item-detail/no-preview.png" alt="" />')}})});function toggle_preview(b,a){var c=$("#"+b);$("div.preview").slideUp("fast");$(".showpreview div").css("background-position","0px -56px");if(c.is(":hidden")){$("#show"+b+" div").css("background-position","0px -45px");c.find(".preview-image2").each(function(){this.src=this.title});c.slideDown("fast",function(){$("html, body").animate({scrollTop:$("#"+a).offset().top},"fast")})}return false}function show_progress_wirek(a){a=jQuery.extend({zIndex:5000,toTop:true,label:"Working ...",dock:undefined},a);var b;if(a.dock){b=$(a.dock).addClass("wirek").html(a.label);return{hide:function(){b.removeClass("wirek").html("")}}}else{b=$("#dialog-closing-wirek-dialog");if(!b.length){b=$('<div id="dialog-closing-wirek-dialog" class="jqmWindow"><div class="wirek-wrapper"><div class="wirek"></div></div></div>').appendTo(document.body)}$(".wirek",b).html(a.label);b.jqm(a).jqmShow();if(jQuery.browser.msie&&jQuery.browser.version<7){b.css({position:"absolute",top:$(window).scrollTop()+100})}return{hide:hide_progress_wirek}}}function hide_progress_wirek(){return $("#dialog-closing-wirek-dialog").jqmHide()}function add_action_message(a){$("#action-messages-box").append($("<div/>").addClass("action-message").html(a)).show()}function do_generic_skip(b){b=$(b);while(!b.is("form")||b.is("body")){b=b.parent()}if(b.is("body")){return false}var a=$("input[name=_generic_skip]",b);if(!a.length){return false}a.val("skip");$(".multiselect input[type=text]",b).val("");b.submit();return true}function installServerSideActionField(c,e){var a=$("#"+c);var b=$("#"+e);if(a.length!=1||b.length!=1){}b.removeAttr("id");b.attr("href","#");b.click(function(){a.val("1");var f=a[0].form;if(f==undefined){alert("Error: input #"+c+" is not bound to a form.");return false}$(f).submit();return false})}function fixTagSepInAccordion(b){var a=$("#"+b);$(".tag-sep",a).remove();$("li:visible",a).not(".more-or-less").slice(1).each(function(){$(this).prepend($("<span/>").addClass("tag-sep").text(" | "))})}function showMoreTags(a){$("#"+a+" .tagx").show();$("#"+a+" .tagy").hide();fixTagSepInAccordion(a);return false}function showLessTags(a){$("#"+a+" .tagx").hide();$("#"+a+" .tagy").show();fixTagSepInAccordion(a);return false}function selectContentByBrowser(b){b=jQuery.extend({variantPrefix:".variant-",defaultName:"default",replacements:function(g){return g}},b);var c=$(b.box),e=$(b.source),a=["aol","camino","firefox","flock","icab","konqueror","mozilla","msie","netscape","opera","safari"];f(b.defaultName);jQuery.each(a,function(){if(jQuery.browser[this]&&f(this)){return false}});return;function f(g){var h=$(b.variantPrefix+g);if(!h.length){return false}c.html(b.replacements(h.html()));return true}}(function(b){var f=this,e=f.azouk=f.azouk||{},c=e.flashes=e.flashes||{},k,j=function(){};e.image=e.image||{};e.trav=e.trav||{};function a(l){return l.css("position","absolute").css("top",b(f).scrollTop()+50)}jQuery.extend(e,{alert:function(m,o){var n=(typeof m=="string"?{message:m}:m),l;n=jQuery.extend({title:"Alert",okText:"OK",okAction:j,beforeShowCallback:j},n);l=b('<div class="jqmWindow alert-box"   style="position: fixed;"> <h2/> <form class="standard-form" action="/undefined/">  <br/><br/>  <center>   <input type="submit" class="wide-button" />  </center> </form></div>');b("h2",l).text(n.title);b("input[type=submit]",l).val(n.okText);b("form",l).prepend(typeof n.message=="string"?b("<span/>").html(n.message):n.message).submit(function(){try{l.jqmHide()}catch(p){console.error(p)}setTimeout(n.okAction,1);return false});l.jqm({modal:true,onHide:function(p){p.w.hide();if(p.o){p.o.remove()}l.remove();if(o){o()}},toTop:true}).appendTo(document.body);l=a(l);l=n.beforeShowCallback(l)||l;return l.jqmShow()},confirm:function(l){l=jQuery.extend({title:"Are you sure?",yes:function(){},no:function(){}},l);var m=b('<div class="jqmWindow question-box"><h2></h2><form class="standard-form"><div class="question"></div><br/><input class="wide-button yes" type="button" value="Yes" /><input class="wide-button no" type="button" value="No" /></form></div>');b("h2",m).text(l.title);b("input.yes",m).click(function(){m.jqmHide();l.yes()});b("input.no",m).click(function(){m.jqmHide();l.no()});b(".question",m).append(l.question);m.jqm({modal:true,onHide:function(n){n.w.hide();if(n.o){n.o.remove()}m.remove()}}).appendTo(document.body);return a(m).jqmShow()},reload:function(l){l=jQuery.extend({showWirek:false,label:"Reloading ..."},l);if(l.showWirek){show_progress_wirek(l)}f.location.reload()},popup:function(m){m=jQuery.extend({target:"_blank",width:undefined,height:undefined,location:1,links:0,toolbar:0,scrollbars:1,menubar:0,resizable:1,status:1,alwaysRaised:1,top:undefined,left:undefined},m);var n=[],l;for(l in m){if(l=="target"||l=="url"||m[l]===undefined){continue}n.push(l+"="+m[l])}return f.open(m.url,m.target,n.join(","))},ajax:{call:function(l,o){l=jQuery.extend({type:"POST",dataType:"json"},l);var p=l.success||j,m=l.error||j;l.success=function(r){n(r);p(r)};l.error=function(){e.alert("Error occurred when contacting the server. Please, try again or contact us feedback form.");m()};jQuery.ajax(l);return;function n(s){if(s.action=="redirect"&&s.href){f.location.href=s.href;return}if(s.action=="call"&&s.fun){var r=jQuery.toJSON(s.args||[]);if(/^\[.*\]$/.test(r)){f["eval"]("window."+s.fun+"("+r.replace(/^\[(.*)\]$/,"$1")+")");return}}e.alert("Invalid response returned by the server.")}}},uuid:0,ensureHasId:function(l){l=b(l);if(!l.attr("id")){l.attr("id","id"+(++e.uuid))}return l.attr("id")}});jQuery.extend(c,{hide:function(){b("object:visible").each(function(){var l=b(this);l.data("__azouk_visibility",l.css("visibility"));l.css("visibility","hidden")})},show:function(){b("object").each(function(){var m=b(this),l=m.data("__azouk_visibility");if(!l){return}m.css("visibility",l);m.removeData("__azouk_visibility")})},injectIframe:function(l){l=b(l);if(l.length==0){return}else{if(l.length>1){l.each(this.injectIframe(this));return}}if(!b("iframe.-flash-cover-iframe",l).length){l.prepend('<iframe class="-flash-cover-iframe" src="/blank" style="width: 100%; height: 100%; z-index: -1; opacity: 0; position: absolute; border: 0px;" ></iframe>')
}},hideIfNecessary:function(){},showIfNecessary:function(){},injectIframeIfNecessary:function(){}});jQuery.extend(e.image,{missing:function(l){return((typeof l.naturalWidth!="undefined"&&l.naturalWidth==0)||(l.readyState=="uninitialized"))}});jQuery.extend(e.trav,{previousNode:function(m){m=b(m);var l=m.parent(),o,n;l.contents().each(function(p){if(this==m[0]){o=p;return false}});if(o===0){return null}if(!o){return undefined}l.contents().each(function(p){if(p==o-1){n=this;return false}});return n}});e.pageTracker=e.pageTracker||{};function g(l){return function(){if(f.pageTracker){try{f.pageTracker[l].apply(f.pageTracker,arguments)}catch(m){console.error(m)}}return undefined}}jQuery.extend(e.pageTracker,{_trackPageview:g("_trackPageview"),_trackEvent:g("_trackEvent")});if(/Linux/.test(navigator.platform)){jQuery.extend(c,{hideIfNecessary:c.hide,showIfNecessary:c.show,injectIframeIfNecessary:c.injectIframe});function h(){b(".jqmOverlay").each(function(){c.injectIframe(this)})}k=b.fn.jqmShow;b.fn.jqmShow=function(l){l=k.call(this,l);h();return l}}if(jQuery.browser.msie&&jQuery.browser.version<7){b(function(){b("input[type=checkbox]").addClass("checkbox");setTimeout(arguments.callee,100)})}})(jQuery);function showNotImplemented(){azouk.pageTracker._trackEvent("Main","showNotImplemented");azouk.alert({message:"Feature is not implemented yet.",title:"Not implemented"});return false}function showModalRegister(c,b,a){console.log(["showModalRegister",c,b,a]);azouk.pageTracker._trackEvent("Documents","showModalRegister");var e={next:b};if(a){e.company=a}loadAnyModalAjaxForm("/ajx/ajax_join?"+jQuery.param(e)).data("download_link",c);$("html, body").animate({scrollTop:0},"slow")}function showModalAskDirectContactPermission(a,b){loadAnyModalAjaxForm("/ajx/ask_contact_permission_and_open?"+jQuery.param({company_id:a,item_id:b}));$("html, body").animate({scrollTop:0},"slow")}function requestThumbGeneration(h,b){var e,c;if(b){b=$(b);c=$("a",b);e=$("span.thumbGenerationResultMessageBox",b);if(e.length==0){e=$("<span/>").addClass("thumbGenerationResultMessageBox").hide().appendTo(b)}c.hide();e.show()}else{b=e=c=$([])}e.text("working...").css("color",c.length?c.css("color"):"gray");function g(){e.text("requested").css("color","green");setTimeout(function(){b.empty().append($("<a href='javascript:window.location.reload()' style='color: green;'>reload</a>"))},10*1000)}function f(){e.text("failed").css("color","red");setTimeout(function(){e.remove();c.show()},10*1000)}azouk.pageTracker._trackEvent("Documents","requestThumbGeneration");jQuery.ajax({url:AjaxRequestThumbGeneration,type:"POST",data:{id:h},dataType:"json",success:function(a,j){if(a&&a.thumbGenerationRequested){g()}else{f()}},error:f})}function applyInputWaterkMarks(){$("input[title^=WATERMARK], textarea[title^=WATERMARK]").each(function(){var b=$(this),a=b.attr("title").replace(/WATERMARK: */,"");b.watermark(a).removeAttr("title")})}function inlineChangeAccountEmail(g){var e=$('<form method="post" style="display: inline;"><input type="email" name="email" style="width: 250px;"/><input type="submit" value="save"/></form>'),c=$("input[name=email]",e),a,b,f="An error occurred. Please try again later.";a=$("<span/>");g=$(g).replaceWith(a);show_progress_wirek({dock:a});jQuery.ajax({url:"/ajx/account_get_change_email_form_data",type:"GET",dataType:"json",error:function(){b.hide();azouk.alert(f);a.replaceWith(g)},success:function(h){e.attr("action",h.action);c.val(h.email);a.replaceWith(e)}});e.submit(function(){jQuery.ajax({url:e.attr("action"),data:$(":input",e).serializeArray(),type:"POST",dataType:"json",success:function(h){if(h.alert){azouk.alert(h.alert)}if(h.ok){e.replaceWith("Your new email has been saved.")}if((!h.alert)&&(!h.ok)){azouk.alert(f)}if(h.redirect){window.location.href=h.redirect}}});return false})}function truncateWords(c,k){k=jQuery.extend({},k);c=$(c);if(c.children().length){return}var h=c.text().split(/\s+/),a=[],b=[],f=k.num,e,g,j;if(h.length<=f){return}for(e=0;(e<h.length)&&(f>0);e++){a.push(h[e]);f--}for(;e<h.length;e++){b.push(h[e])}a=a.join(" ");b=b.join(" ");g=$('<a href="javascript:void()">... more »</a>').click(function(){g.hide();b.show();return false});j=$('<a href="javascript:void()">« less</a>').click(function(){g.show();b.hide();return false});b=$("<span/>").text(" "+b+" ").append(j);c.text(a).append(b).append(g);b.hide()}function makeRoundedCorners(a){a=$(a);var g=a.css("border-radius"),f=$([]),k=a.css("background-color"),b=a.css("border-color"),e,j,h,c;if(!g||!(g=parseInt(g))){return}for(e=g;e>=0;e--){j=e==g?g-1:Math.round(g-Math.sqrt(g*g-e*e));f=f.add('<div style="display: block; height: 1px; margin: 0 '+j+'px; "/>')}f=f.add(h=$('<div style="display: block;" />'));for(e=0;e<=g;e++){j=e==g?g-1:Math.round(g-Math.sqrt(g*g-e*e));f=f.add('<div style="display: block; height: 1px; margin: 0 '+j+'px; "/>')}f.css({backgroundColor:k,borderColor:b,borderWidth:"0px 1px",borderStyle:"solid",padding:0});c=$(f[0]).add(f[f.length-1]).css("background",b);h.css("border-width","0px 1px").append(a.contents());a.empty().css({background:"none",border:"none"}).append(f);if($.browser.msie&&jQuery.browser.version<7){f.not(h).css({fontSize:0});c.css({height:0,borderWidth:0})}}function openExclusiveContent(a){azouk.pageTracker._trackEvent("Documents","openExclusiveContent");azouk.ajax.call({url:"/ajx/open_exclusive_content",data:{item_id:a}})}function getURLParam(a){a=a.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var c=new RegExp("[\\?&]"+a+"=([^&#]*)");var b=c.exec(window.location.href);return(b?b[1]:"")}function addURLParamToFormAction(c,b){var h,a,g,f;b=b.split("&");while(b.length){h=b.pop().split("=");a=h.shift();g=h.join("=");f=document.createElement("input");f.setAttribute("type","hidden");f.setAttribute("name",a);f.setAttribute("value",g);c.appendChild(f)}}function addURLParamToFormsAction(b,a){b.each(function(){addURLParamToFormAction(this,a)})}function relatedTagAddToSearchOnClick(e,b){if(b==null){b=false}var c=$("#search-form");if(c.length==1&&$("#id_q",c).length==1){var a=$("#id_q",c)[0];if(a&&a.tags!=undefined&&(b||a.tags.modified)){if(typeof e=="string"){azouk.logging.log({level:azouk.logging.ERROR,verbosity:azouk.logging.HIGHVERBOSITY,text:"relatedTagAddToSearchOnClick called with tag_identifier being a string '"+e+"'",ctx:"javascript",flow:window.request.workflow});e=e.split(",")}a.tags.append("",e);c.submit();return false}}return true}function relatedTagAddToTopicsOnClick(b,c,f,e){var a=$("#id_topics_multi");if(a.length==1){input=$("#id_topics")[0];input.tags.append("",[b,c,f,e]);return false}return true}$(function(){if(window.THUMBNAIL_WIDTH==undefined||window.THUMBNAIL_HEIGHT==undefined){return}var a=/^url\((.+)\)$/i;var b=function(h,f){var g=new Image();g.style.opacity=0.01;var c=function(){try{document.body.removeChild(g)}catch(j){}};g.onload=function(){if(g.clientWidth&&g.clientHeight){if(g.clientWidth!=window.THUMBNAIL_WIDTH||g.clientHeight!=window.THUMBNAIL_HEIGHT){h.style.border="none";h.style.backgroundColor="transparent"}}c()};g.onabort=c;g.onerror=c;document.body.appendChild(g);g.src=f};$(".thumbnail").each(function(){var f=this;var c;if(f.style.backgroundImage&&(c=a.exec(f.style.backgroundImage))&&c[1]){b(f,c[1])}})});function loadAnyModalAjaxForm(e,c){c=jQuery.extend({data:undefined,modalSelector:null,modalClass:null,invalidModalError:{message:"Failed to initialize the dialog.\nInvalid modal.",title:"Error"},invalidResponseError:{message:"Failed to initialize the dialog.\nInvalid response.",title:"Error"},postLoadCallback:function(){}},c);c.jqmOptions=jQuery.extend({modal:true},c.jqmOptions);var f,a=c.jqmOptions.onHide;if(c.modalSelector){f=$(c.modalSelector)}else{f=$('<div class="jqmWindow"/>').appendTo(document.body);c.jqmOptions.onHide=function(g){g.w.hide();if(g.o){g.o.remove()}g.w.remove();if(a){a()}}}if(c.modalClass){f.addClass(c.modalClass)}if(f.length!=1){azouk.alert(c.invalidModalError,b);return}if(f.data("_anyModalAjaxFormIsLoading")===true){return}f.data("_anyModalAjaxFormIsLoading",true);
show_progress_wirek();f.load(e+" .azouk-lazy-modal",c.data,function(h,j,g){if(g.status==200){setTimeout(function(){initializeTheInits();hide_progress_wirek();f.jqm(c.jqmOptions).jqmShow();c.postLoadCallback(f);f.data("_anyModalAjaxFormIsLoading",false)},1)}else{hide_progress_wirek();f.data("_anyModalAjaxFormIsLoading",false);azouk.alert(c.invalidResponseError,b)}});return f;function b(){if(c.reloadOnInitializationError){azouk.reload({showWirek:(c.reloadOnInitializationError=="with-wirek")})}}}function submitAnyModalAjaxForm(e,b){b=jQuery.extend({modalSelector:"#share-invite-modal",invalidModalError:"Error: failed to submit the form.\nPage invalid.",invalidResponseError:"Error: failed to submit the form.\nInvalid response returned by server.",use_wirek:true},b);e=$(e);var a=$(":input",e).filter(function(){return $(this).attr("name")}),f,c={hide:function(){}};if(a.length){f=a.serializeArray()}modal=e.closest(b.modalSelector);if(!modal.length){modal=e.closest(".jqmWindow")}if(modal.length!=1){azouk.alert(b.invalidModalError);return}if(b.use_wirek){c=show_progress_wirek()}modal.load(e[0].action+" .azouk-lazy-modal",f,function(h,j,g){c.hide();if(g.status==200){setTimeout(function(){initializeTheInits();if(modal.data("_postModalSubmitCallback")){modal.data("_postModalSubmitCallback")(modal)}$(".jqmClose",modal).click(function(){modal.jqmHide()})},1)}else{azouk.alert(b.invalidResponseError);return}})}function showContactExpert(a){azouk.pageTracker._trackEvent("Share","showContactExpert","user "+a);loadAnyModalAjaxForm("/ajx/contact_expert?user_id="+a,{invalidResponseError:"Error: failed to initialize the dialog.",modalSelector:"#share-invite-modal"});$("html, body").animate({scrollTop:0},"slow")}function showContactCompany(a){azouk.pageTracker._trackEvent("Share","showContactCompany","company "+a);loadAnyModalAjaxForm("/ajx/contact_company?company_id="+a,{invalidResponseError:"Error: failed to initialize the dialog.",modalSelector:"#share-invite-modal"});$("html, body").animate({scrollTop:0},"slow")}function showShare(a){azouk.pageTracker._trackEvent("Share","showShare","item "+a);loadAnyModalAjaxForm("/ajx/share?item_id="+a,{invalidResponseError:"Error: failed to initialize the dialog.",modalSelector:"#share-invite-modal"});$("html, body").animate({scrollTop:0},"slow")}function showInvite(a){azouk.pageTracker._trackEvent("Share","showInvite","name "+a);loadAnyModalAjaxForm("/ajx/invite?name="+encodeURIComponent(a),{invalidResponseError:"Error: failed to initialize the dialog.",modalSelector:"#share-invite-modal"});$("html, body").animate({scrollTop:0},"slow")}function showInviteWithQuestion(a){azouk.pageTracker._trackEvent("Share","showInviteWithQuestion","name "+a);loadAnyModalAjaxForm("/ajx/invite?question=1&name="+encodeURIComponent(a),{invalidResponseError:"Error: failed to initialize the dialog.",modalSelector:"#share-invite-modal"});$("html, body").animate({scrollTop:0},"slow")}function showSendMessage(){azouk.pageTracker._trackEvent("Share","showSendMessage");loadAnyModalAjaxForm("/ajx/send_message",{invalidResponseError:"Error: failed to initialize the dialog.",modalSelector:"#share-invite-modal"});$("html, body").animate({scrollTop:0},"slow")}function submitAnyShareAjaxForm(b,a){submitAnyModalAjaxForm(b,jQuery.extend({invalidModalError:"Error: failed to send the email.\nPage invalid.",modalSelector:"#share-invite-modal",invalidResponseError:"Error: failed to send the message.\nInvalid response returned by server."},a))}function showEditContentInfo(a){azouk.pageTracker._trackEvent("Documents","showEditContentInfo","item "+a);loadAnyModalAjaxForm(AjaxEditContentInfo+"?item_id="+a,{invalidResponseError:"Error: failed to initialize the dialog.",invalidModalError:"Error: failed to initialize the dialog.\nInvalid modal.",modalSelector:"#save-to-myzouk-modal"});$("html, body").animate({scrollTop:0},"slow")}function showEditExclusiveContentInfo(b){var c=gettext("This is an exclusive content. Only the owner of this document can edit its properties.");function a(){azouk.pageTracker._trackEvent("Documents","showEditExclusiveForbidden","item "+b);azouk.alert(c)}show_progress_wirek();jQuery.ajax({url:AjaxCanEdit,type:"POST",data:{id:b},error:function(){hide_progress_wirek();a()},dataType:"json",success:function(e){if(e===true){showEditContentInfo(b)}else{hide_progress_wirek();a()}}})}function showSaveToMyzouk(c,a,b){var e;if(a==AppSettings.item_type.Bookmark||a==AppSettings.item_type.Upload){e=SaveContentToMyzoukModal}else{if(a==AppSettings.item_type.Company){e=SaveCompanyToMyzoukModal}else{if(a==AppSettings.item_type.User){e=SaveExpertToMyzoukModal}}}azouk.pageTracker._trackEvent("MyZouk","showSaveToMyzouk","item "+c);_showAnySaveToMyzouk(c,e,{},b);return false}function showMultiSaveToMyzouk(b,c,a){a=jQuery.extend({reloadOnInitializationError:"with-wirek",afterCloseCallback:function(){azouk.reload()}},a);azouk.pageTracker._trackEvent("MyZouk","showMultiSaveToMyzouk","source "+c);_showAnySaveToMyzouk(undefined,"/ajx/save_multicontent_to_myzouk?"+jQuery.param({source_type:b,source_id:c}),a);return false}function _showAnySaveToMyzouk(e,f,c,b){var a=f,g;c=jQuery.extend({modalSelector:"#save-to-myzouk-modal",afterCloseCallback:function(){}},c);c.jqmOptions=jQuery.extend({onHide:function(h){if(getURLParam("bookmarklet")){setTimeout(function(){alert("You can now safely close the window.")},500);window.close()}else{h.w.hide();if(h.o){h.o.remove()}c.afterCloseCallback()}}},c.jqmOptions);$("html, body").animate({scrollTop:0},"slow");params={};if(e){params.item_id=e}if(b===true){params.from_myzouk=1}params=jQuery.param(params);if(params){a=a+(a.match(/\?/)?"&":"?")+params}if(c.isNewContent){g=c.postLoadCallback||function(){};c.postLoadCallback=function(h){$(".jqmClose",h).unbind("click").click(function(){var j=show_progress_wirek({dock:this,label:""});jQuery.ajax({url:"/ajx/delete_fresh_item",data:{item_id:e},type:"POST",complete:function(){h.jqmHide();j.hide()}})});g(h)}}return loadAnyModalAjaxForm(a,c)}function showBookmarkAnalysisFailed(b,c,e,a){alertBox=azouk.alert({title:"",message:"We are not able to access this web page. Please verify the URL and try again.",okText:"Cancel",okAction:function(){jQuery.ajax({url:"/ajx/delete_fresh_item",data:{item_id:b},type:"POST",complete:function(){if(a.afterCloseCallback){a.afterCloseCallback()}}})},beforeShowCallback:function(f){var g=$("<a href=''>continue anyway</a>").click(function(){f.jqmHide();_showAnySaveToMyzouk(b,e,a);return false});$("input[type=submit]",f).parent().append(document.createTextNode(" or ")).append(g)}})}function submitSaveContentToMyzoukForm(a){submitAnyModalAjaxForm(a,{modalSelector:"#save-to-myzouk-modal"})}function addTagToMultiselect(a,c,g,e,f){a=unescape(a);c=unescape(c);var b=$(f)[0];b.tags.append("",[a,c,g,e]);return false}(function(g){var f=this,b=f.document;function a(){var h=g("#oauth-token-input-dispatcher");if(!h.length){h=g('<input type="hidden" name="x" value="" id="oauth-token-input-dispatcher" />').appendTo(b.body)}return h}function e(l,k){k=jQuery.extend({tokenAccepted:function(){}},k);var h;l=g(l).change(j).click(j).attr("disabled","disabled");jQuery.ajax({url:"/ajx/oauth_token",type:"POST",data:{service:AppSettings.oauth_service.Twitter},dataType:"json",success:function(n){if(n){l.val(n).attr("checked","checked")}},complete:function(){l.removeAttr("disabled")}});return;function j(){if(!l.is(":checked")){return}if(l.val()||l.data("requested")){return}azouk.pageTracker._trackEvent("Twitter","ShowTwitterOAuth");l.data("requested","requested");var o=azouk.popup({url:OAuthAuthorize+"?"+jQuery.param({service:AppSettings.oauth_service.Twitter}),target:"azouk-twitter-auth-win",width:815,height:412});try{o.focus()}catch(n){}h=a().bind("change",m);setTimeout(function(){l.removeData("requested")},1000)}function m(){if(!g(this).val()){return}var n=jQuery.evalJSON(g(this).val());if(n.oauth_service==AppSettings.oauth_service.Twitter){l.val(n.oauth_token);h.unbind("change",m);k.tokenAccepted(n);azouk.pageTracker._trackEvent("Twitter","AcceptTwitterOAuth")
}}}function c(h){a().val(jQuery.toJSON({oauth_token:h.oauth_token,oauth_service:h.oauth_service})).change()}jQuery.extend(f,{requireTwitterOAuthCheck:e,acceptOAuthToken:c})})(jQuery);