function deletewarn(b){var a=confirm("Pozor! Izbrisali boste "+b+".\nNadaljujem?");return a}function deleteWarning(b){var a=confirm(b);
return a}function delayedRedirect(a,c){var b=c*1000;_redirecturl=a;setTimeout("_redirect()",b)}var _redirecturl="";function _redirect(){redirect(_redirecturl)
}function redirect(a){window.location=a}function make(){var c=["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","r","s","t","u","v","x","y","z","@"];
var a="";a+=c[2*2*2];a+=c[39/3];a+=c[(27-2)/5];a+=c[2*2*2*2-2];a+=c[2*2*2*2+2*2*2];a+=c[1];a+=c[2*2*2*2];a+=c[2*2];a+=c[2*2*2*2+1];
a+=c[2*2*2*2+2];a+=".";a+=c[2*2*2*2+2/2];a+=c[2*2*2];var b="";b+=c[2*2*2+2*2];b+=c[2-2];b+=c[2*2*2];b+=c[2*2*2+2*2-2/2];b+=c[2*2*2*2+2];
b+=c[2*2*2+2*2+2];win=window.open(b+":"+a,"");if(win&&win.open&&!win.closed){win.close()}}var progressTimer;var index=0;var forwardfill=true;
function updateCodeLabel(b,a){document.getElementById("customerCodeTableLable_"+b).innerHTML=a}function manageStoreResponse(a,e,c,f){var d=$(a).find("status").eq(0).text();
var b=document.getElementById(c);$("[id^='err_']").remove();if(d=="0"){$(a).find("error").each(function(){var m=$(this).find("id").text();
var k=$(this).find("errorstr").text();document.getElementById(e+m).value="";var j=document.getElementById(f+m);var i=j.rowIndex;
var l=b.insertRow(i+1);l.id="err_"+m;var h=l.insertCell(0);h.colSpan=j.cells.length-3;var g=l.insertCell(1);g.colSpan=3;g.className="formerror";
g.innerHTML=k});setMessageDiv(true,$(a).find("message").text())}else{$("input[id^='"+e+"']").attr("value","");updateContainerData(a);
setMessageDiv(false,$(a).find("message").text())}}function updateContainerData(a){document.getElementById("containerSummaryDiv").style.display="block";
document.getElementById("containerEmptyDiv").style.display="none";document.getElementById("containerSummaryItemCountLabel").innerHTML=$(a).find("containerItemsSize").eq(0).text();
document.getElementById("containerSummaryPriceLabel").innerHTML=$(a).find("containerPrice").eq(0).text()}function setMessageDiv(a,c){var b=document.getElementById("messageDiv");
b.className=(a==true)?"errormessage":"infomessage";b.style.display="block";b.innerHTML=c}function placeOrder(c,h,b,e,a,i,d){$("img[id^='"+c+"']").attr("src","/images/blank_20.png");
var g="/ajax/"+h+"/addtocontainerajax/basename/"+b;var f=false;$("input[id^='"+b+"']").each(function(){if($(this).val()!=null&&$(this).val().length>0){g+="/"+$(this).attr("name")+"/"+encodeURIComponent($(this).val());
f=true}});if(f==false){return}progressTimer=setTimeout("waitOrder('"+i+"','"+d+"','"+c+"')",200);$.ajax({url:g,type:"GET",dataType:"xml",error:function(){alert("Unknown error.")
},success:function(j){manageStoreResponse(j,b,e,a);orderPlaced(i,d)}})}function waitOrder(d,c,a){document.getElementById(d).style.display="none";
document.getElementById(c).style.display="block";for(var b=0;b<=index;b++){$("img[id^='"+a+b+"']").attr("src",(forwardfill)?"/images/shopcart_sm.png":"/images/blank_20.png")
}for(var b=index+1;b<10;b++){$("img[id^='"+a+b+"']").attr("src",(forwardfill)?"/images/blank_20.png":"/images/shopcart_sm.png")
}index++;if(index>=10){index=0;forwardfill=!forwardfill}progressTimer=setTimeout("waitOrder('"+d+"','"+c+"','"+a+"')",500)
}function orderPlaced(b,a){clearTimeout(progressTimer);document.getElementById(b).style.display="block";document.getElementById(a).style.display="none";
index=0};/*!
* jQuery JavaScript Library v1.4.2
* http://jquery.com/
*
* Copyright 2010, John Resig
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* Includes Sizzle.js
* http://sizzlejs.com/
* Copyright 2010, The Dojo Foundation
* Released under the MIT, BSD, and GPL Licenses.
*
* Date: Sat Feb 13 22:33:48 2010 -0500
*/
(function(aO,I){function a0(){if(!ah.isReady){try{M.documentElement.doScroll("left")
}catch(c){setTimeout(a0,1);return}ah.ready()}}function E(s,c){c.src?ah.ajax({url:c.src,async:false,dataType:"script"}):ah.globalEval(c.text||c.textContent||c.innerHTML||"");
c.parentNode&&c.parentNode.removeChild(c)}function ap(s,c,K,F,G,w){var A=s.length;if(typeof c==="object"){for(var J in c){ap(s,J,c[J],F,G,K)
}return s}if(K!==I){F=!w&&F&&ah.isFunction(K);for(J=0;J<A;J++){G(s[J],c,F?K.call(s[J],J,G(s[J],c)):K,w)}return s}return A?G(s[0],c):I
}function aF(){return(new Date).getTime()}function ao(){return false}function am(){return true}function aK(s,c,w){w[0].type=s;
return ah.event.handle.apply(c,w)}function ag(O){var N,L=[],J=[],K=arguments,F,G,s,A,w,c;G=ah.data(this,"events");if(!(O.liveFired===this||!G||!G.live||O.button&&O.type==="click")){O.liveFired=this;
var P=G.live.slice(0);for(A=0;A<P.length;A++){G=P[A];G.origType.replace(az,"")===O.type?J.push(G.selector):P.splice(A--,1)
}F=ah(O.target).closest(J,O.currentTarget);w=0;for(c=F.length;w<c;w++){for(A=0;A<P.length;A++){G=P[A];if(F[w].selector===G.selector){s=F[w].elem;
J=null;if(G.preType==="mouseenter"||G.preType==="mouseleave"){J=ah(O.relatedTarget).closest(G.selector)[0]}if(!J||J!==s){L.push({elem:s,handleObj:G})
}}}}w=0;for(c=L.length;w<c;w++){F=L[w];O.currentTarget=F.elem;O.data=F.handleObj.data;O.handleObj=F.handleObj;if(F.handleObj.origHandler.apply(F.elem,K)===false){N=false;
break}}return N}}function z(s,c){return"live."+(s&&s!=="*"?s+".":"")+c.replace(/\./g,"`").replace(/ /g,"&")}function l(c){return !c||!c.parentNode||c.parentNode.nodeType===11
}function bj(s,c){var w=0;c.each(function(){if(this.nodeName===(s[w]&&s[w].nodeName)){var G=ah.data(s[w++]),J=ah.data(this,G);
if(G=G&&G.events){delete J.handle;J.events={};for(var A in G){for(var F in G[A]){ah.event.add(this,A,G[A][F],G[A][F].data)
}}}}})}function a3(s,c,G){var A,F,w;c=c&&c[0]?c[0].ownerDocument||c[0]:M;if(s.length===1&&typeof s[0]==="string"&&s[0].length<512&&c===M&&!aP.test(s[0])&&(ah.support.checkClone||!ak.test(s[0]))){F=true;
if(w=ah.fragments[s[0]]){if(w!==1){A=w}}}if(!A){A=c.createDocumentFragment();ah.clean(s,c,A,G)}if(F){ah.fragments[s[0]]=w?A:1
}return{fragment:A,cacheable:F}}function aC(s,c){var w={};ah.each(D.concat.apply([],D.slice(0,c)),function(){w[this]=s});
return w}function o(c){return"scrollTo" in c&&c.document?c:c.nodeType===9?c.defaultView||c.parentWindow:false}var ah=function(s,c){return new ah.fn.init(s,c)
},p=aO.jQuery,d=aO.$,M=aO.document,at,a7=/^[^<]*(<[\w\W]+>)[^>]*$|^#([\w-]+)$/,aT=/^.[^:#\[\.,]*$/,an=/\S/,H=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,q=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,ax=navigator.userAgent,b=false,av=[],aB,a1=Object.prototype.toString,aV=Object.prototype.hasOwnProperty,ay=Array.prototype.push,au=Array.prototype.slice,a6=Array.prototype.indexOf;
ah.fn=ah.prototype={init:function(s,c){var A,w;if(!s){return this}if(s.nodeType){this.context=this[0]=s;this.length=1;return this
}if(s==="body"&&!c){this.context=M;this[0]=M.body;this.selector="body";this.length=1;return this}if(typeof s==="string"){if((A=a7.exec(s))&&(A[1]||!c)){if(A[1]){w=c?c.ownerDocument||c:M;
if(s=q.exec(s)){if(ah.isPlainObject(c)){s=[M.createElement(s[1])];ah.fn.attr.call(s,c,true)}else{s=[w.createElement(s[1])]
}}else{s=a3([A[1]],[w]);s=(s.cacheable?s.fragment.cloneNode(true):s.fragment).childNodes}return ah.merge(this,s)}else{if(c=M.getElementById(A[2])){if(c.id!==A[2]){return at.find(s)
}this.length=1;this[0]=c}this.context=M;this.selector=s;return this}}else{if(!c&&/^\w+$/.test(s)){this.selector=s;this.context=M;
s=M.getElementsByTagName(s);return ah.merge(this,s)}else{return !c||c.jquery?(c||at).find(s):ah(c).find(s)}}}else{if(ah.isFunction(s)){return at.ready(s)
}}if(s.selector!==I){this.selector=s.selector;this.context=s.context}return ah.makeArray(s,this)},selector:"",jquery:"1.4.2",length:0,size:function(){return this.length
},toArray:function(){return au.call(this,0)},get:function(c){return c==null?this.toArray():c<0?this.slice(c)[0]:this[c]},pushStack:function(s,c,A){var w=ah();
ah.isArray(s)?ay.apply(w,s):ah.merge(w,s);w.prevObject=this;w.context=this.context;if(c==="find"){w.selector=this.selector+(this.selector?" ":"")+A
}else{if(c){w.selector=this.selector+"."+c+"("+A+")"}}return w},each:function(s,c){return ah.each(this,s,c)},ready:function(c){ah.bindReady();
if(ah.isReady){c.call(M,ah)}else{av&&av.push(c)}return this},eq:function(c){return c===-1?this.slice(c):this.slice(c,+c+1)
},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(au.apply(this,arguments),"slice",au.call(arguments).join(","))
},map:function(c){return this.pushStack(ah.map(this,function(s,w){return c.call(s,w,s)}))},end:function(){return this.prevObject||ah(null)
},push:ay,sort:[].sort,splice:[].splice};ah.fn.init.prototype=ah.fn;ah.extend=ah.fn.extend=function(){var s=arguments[0]||{},c=1,K=arguments.length,F=false,G,w,A,J;
if(typeof s==="boolean"){F=s;s=arguments[1]||{};c=2}if(typeof s!=="object"&&!ah.isFunction(s)){s={}}if(K===c){s=this;--c}for(;
c<K;c++){if((G=arguments[c])!=null){for(w in G){A=s[w];J=G[w];if(s!==J){if(F&&J&&(ah.isPlainObject(J)||ah.isArray(J))){A=A&&(ah.isPlainObject(A)||ah.isArray(A))?A:ah.isArray(J)?[]:{};
s[w]=ah.extend(F,A,J)}else{if(J!==I){s[w]=J}}}}}}return s};ah.extend({noConflict:function(c){aO.$=d;if(c){aO.jQuery=p}return ah
},isReady:false,ready:function(){if(!ah.isReady){if(!M.body){return setTimeout(ah.ready,13)}ah.isReady=true;if(av){for(var s,c=0;
s=av[c++];){s.call(M,ah)}av=null}ah.fn.triggerHandler&&ah(M).triggerHandler("ready")}},bindReady:function(){if(!b){b=true;
if(M.readyState==="complete"){return ah.ready()}if(M.addEventListener){M.addEventListener("DOMContentLoaded",aB,false);aO.addEventListener("load",ah.ready,false)
}else{if(M.attachEvent){M.attachEvent("onreadystatechange",aB);aO.attachEvent("onload",ah.ready);var s=false;try{s=aO.frameElement==null
}catch(c){}M.documentElement.doScroll&&s&&a0()}}}},isFunction:function(c){return a1.call(c)==="[object Function]"},isArray:function(c){return a1.call(c)==="[object Array]"
},isPlainObject:function(s){if(!s||a1.call(s)!=="[object Object]"||s.nodeType||s.setInterval){return false}if(s.constructor&&!aV.call(s,"constructor")&&!aV.call(s.constructor.prototype,"isPrototypeOf")){return false
}var c;for(c in s){}return c===I||aV.call(s,c)},isEmptyObject:function(s){for(var c in s){return false}return true},error:function(c){throw c
},parseJSON:function(c){if(typeof c!=="string"||!c){return null}c=ah.trim(c);if(/^[\],:{}\s]*$/.test(c.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){return aO.JSON&&aO.JSON.parse?aO.JSON.parse(c):(new Function("return "+c))()
}else{ah.error("Invalid JSON: "+c)}},noop:function(){},globalEval:function(s){if(s&&an.test(s)){var c=M.getElementsByTagName("head")[0]||M.documentElement,w=M.createElement("script");
w.type="text/javascript";if(ah.support.scriptEval){w.appendChild(M.createTextNode(s))}else{w.text=s}c.insertBefore(w,c.firstChild);
c.removeChild(w)}},nodeName:function(s,c){return s.nodeName&&s.nodeName.toUpperCase()===c.toUpperCase()},each:function(s,c,J){var F,G=0,w=s.length,A=w===I||ah.isFunction(s);
if(J){if(A){for(F in s){if(c.apply(s[F],J)===false){break}}}else{for(;G<w;){if(c.apply(s[G++],J)===false){break}}}}else{if(A){for(F in s){if(c.call(s[F],F,s[F])===false){break
}}}else{for(J=s[0];G<w&&c.call(J,G,J)!==false;J=s[++G]){}}}return s},trim:function(c){return(c||"").replace(H,"")},makeArray:function(s,c){c=c||[];
if(s!=null){s.length==null||typeof s==="string"||ah.isFunction(s)||typeof s!=="function"&&s.setInterval?ay.call(c,s):ah.merge(c,s)
}return c},inArray:function(s,c){if(c.indexOf){return c.indexOf(s)}for(var A=0,w=c.length;A<w;A++){if(c[A]===s){return A}}return -1
},merge:function(s,c){var F=s.length,w=0;if(typeof c.length==="number"){for(var A=c.length;w<A;w++){s[F++]=c[w]}}else{for(;
c[w]!==I;){s[F++]=c[w++]}}s.length=F;return s},grep:function(s,c,G){for(var A=[],F=0,w=s.length;F<w;F++){!G!==!c(s[F],F)&&A.push(s[F])
}return A},map:function(s,c,J){for(var F=[],G,w=0,A=s.length;w<A;w++){G=c(s[w],w,J);if(G!=null){F[F.length]=G}}return F.concat.apply([],F)
},guid:1,proxy:function(s,c,w){if(arguments.length===2){if(typeof c==="string"){w=s;s=w[c];c=I}else{if(c&&!ah.isFunction(c)){w=c;
c=I}}}if(!c&&s){c=function(){return s.apply(w||this,arguments)}}if(s){c.guid=s.guid=s.guid||c.guid||ah.guid++}return c},uaMatch:function(c){c=c.toLowerCase();
c=/(webkit)[ \/]([\w.]+)/.exec(c)||/(opera)(?:.*version)?[ \/]([\w.]+)/.exec(c)||/(msie) ([\w.]+)/.exec(c)||!/compatible/.test(c)&&/(mozilla)(?:.*? rv:([\w.]+))?/.exec(c)||[];
return{browser:c[1]||"",version:c[2]||"0"}},browser:{}});ax=ah.uaMatch(ax);if(ax.browser){ah.browser[ax.browser]=true;ah.browser.version=ax.version
}if(ah.browser.webkit){ah.browser.safari=true}if(a6){ah.inArray=function(s,c){return a6.call(c,s)}}at=ah(M);if(M.addEventListener){aB=function(){M.removeEventListener("DOMContentLoaded",aB,false);
ah.ready()}}else{if(M.attachEvent){aB=function(){if(M.readyState==="complete"){M.detachEvent("onreadystatechange",aB);ah.ready()
}}}}(function(){ah.support={};var L=M.documentElement,K=M.createElement("script"),J=M.createElement("div"),F="script"+aF();
J.style.display="none";J.innerHTML="   <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";
var G=J.getElementsByTagName("*"),w=J.getElementsByTagName("a")[0];if(!(!G||!G.length||!w)){ah.support={leadingWhitespace:J.firstChild.nodeType===3,tbody:!J.getElementsByTagName("tbody").length,htmlSerialize:!!J.getElementsByTagName("link").length,style:/red/.test(w.getAttribute("style")),hrefNormalized:w.getAttribute("href")==="/a",opacity:/^0.55$/.test(w.style.opacity),cssFloat:!!w.style.cssFloat,checkOn:J.getElementsByTagName("input")[0].value==="on",optSelected:M.createElement("select").appendChild(M.createElement("option")).selected,parentNode:J.removeChild(J.appendChild(M.createElement("div"))).parentNode===null,deleteExpando:true,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null};
K.type="text/javascript";try{K.appendChild(M.createTextNode("window."+F+"=1;"))}catch(A){}L.insertBefore(K,L.firstChild);
if(aO[F]){ah.support.scriptEval=true;delete aO[F]}try{delete K.test}catch(c){ah.support.deleteExpando=false}L.removeChild(K);
if(J.attachEvent&&J.fireEvent){J.attachEvent("onclick",function s(){ah.support.noCloneEvent=false;J.detachEvent("onclick",s)
});J.cloneNode(true).fireEvent("onclick")}J=M.createElement("div");J.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";
L=M.createDocumentFragment();L.appendChild(J.firstChild);ah.support.checkClone=L.cloneNode(true).cloneNode(true).lastChild.checked;
ah(function(){var N=M.createElement("div");N.style.width=N.style.paddingLeft="1px";M.body.appendChild(N);ah.boxModel=ah.support.boxModel=N.offsetWidth===2;
M.body.removeChild(N).style.display="none"});L=function(N){var P=M.createElement("div");N="on"+N;var O=N in P;if(!O){P.setAttribute(N,"return;");
O=typeof P[N]==="function"}return O};ah.support.submitBubbles=L("submit");ah.support.changeBubbles=L("change");L=K=J=G=w=null
}})();ah.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};
var aH="jQuery"+aF(),e=0,aS={};ah.extend({cache:{},expando:aH,noData:{embed:true,object:true,applet:true},data:function(s,c,F){if(!(s.nodeName&&ah.noData[s.nodeName.toLowerCase()])){s=s==aO?aS:s;
var w=s[aH],A=ah.cache;if(!w&&typeof c==="string"&&F===I){return null}w||(w=++e);if(typeof c==="object"){s[aH]=w;A[w]=ah.extend(true,{},c)
}else{if(!A[w]){s[aH]=w;A[w]={}}}s=A[w];if(F!==I){s[c]=F}return typeof c==="string"?s[c]:s}},removeData:function(s,c){if(!(s.nodeName&&ah.noData[s.nodeName.toLowerCase()])){s=s==aO?aS:s;
var F=s[aH],w=ah.cache,A=w[F];if(c){if(A){delete A[c];ah.isEmptyObject(A)&&ah.removeData(s)}}else{if(ah.support.deleteExpando){delete s[ah.expando]
}else{s.removeAttribute&&s.removeAttribute(ah.expando)}delete w[F]}}}});ah.fn.extend({data:function(s,c){if(typeof s==="undefined"&&this.length){return ah.data(this[0])
}else{if(typeof s==="object"){return this.each(function(){ah.data(this,s)})}}var A=s.split(".");A[1]=A[1]?"."+A[1]:"";if(c===I){var w=this.triggerHandler("getData"+A[1]+"!",[A[0]]);
if(w===I&&this.length){w=ah.data(this[0],s)}return w===I&&A[1]?this.data(A[0]):w}else{return this.trigger("setData"+A[1]+"!",[A[0],c]).each(function(){ah.data(this,s,c)
})}},removeData:function(c){return this.each(function(){ah.removeData(this,c)})}});ah.extend({queue:function(s,c,A){if(s){c=(c||"fx")+"queue";
var w=ah.data(s,c);if(!A){return w||[]}if(!w||ah.isArray(A)){w=ah.data(s,c,ah.makeArray(A))}else{w.push(A)}return w}},dequeue:function(s,c){c=c||"fx";
var A=ah.queue(s,c),w=A.shift();if(w==="inprogress"){w=A.shift()}if(w){c==="fx"&&A.unshift("inprogress");w.call(s,function(){ah.dequeue(s,c)
})}}});ah.fn.extend({queue:function(s,c){if(typeof s!=="string"){c=s;s="fx"}if(c===I){return ah.queue(this[0],s)}return this.each(function(){var w=ah.queue(this,s,c);
s==="fx"&&w[0]!=="inprogress"&&ah.dequeue(this,s)})},dequeue:function(c){return this.each(function(){ah.dequeue(this,c)})
},delay:function(s,c){s=ah.fx?ah.fx.speeds[s]||s:s;c=c||"fx";return this.queue(c,function(){var w=this;setTimeout(function(){ah.dequeue(w,c)
},s)})},clearQueue:function(c){return this.queue(c||"fx",[])}});var be=/[\n\t]/g,U=/\s+/,a8=/\r/g,aM=/href|src|style/,aU=/(button|input)/i,aw=/(button|input|object|select|textarea)/i,S=/^(a|area)$/i,aY=/radio|checkbox/;
ah.fn.extend({attr:function(s,c){return ap(this,s,c,true,ah.attr)},removeAttr:function(c){return this.each(function(){ah.attr(this,c,"");
this.nodeType===1&&this.removeAttribute(c)})},addClass:function(L){if(ah.isFunction(L)){return this.each(function(O){var N=ah(this);
N.addClass(L.call(this,O,N.attr("class")))})}if(L&&typeof L==="string"){for(var K=(L||"").split(U),J=0,F=this.length;J<F;
J++){var G=this[J];if(G.nodeType===1){if(G.className){for(var w=" "+G.className+" ",A=G.className,c=0,s=K.length;c<s;c++){if(w.indexOf(" "+K[c]+" ")<0){A+=" "+K[c]
}}G.className=ah.trim(A)}else{G.className=L}}}}return this},removeClass:function(s){if(ah.isFunction(s)){return this.each(function(L){var N=ah(this);
N.removeClass(s.call(this,L,N.attr("class")))})}if(s&&typeof s==="string"||s===I){for(var c=(s||"").split(U),K=0,F=this.length;
K<F;K++){var G=this[K];if(G.nodeType===1&&G.className){if(s){for(var w=(" "+G.className+" ").replace(be," "),A=0,J=c.length;
A<J;A++){w=w.replace(" "+c[A]+" "," ")}G.className=ah.trim(w)}else{G.className=""}}}}return this},toggleClass:function(s,c){var A=typeof s,w=typeof c==="boolean";
if(ah.isFunction(s)){return this.each(function(G){var F=ah(this);F.toggleClass(s.call(this,G,F.attr("class"),c),c)})}return this.each(function(){if(A==="string"){for(var K,G=0,J=ah(this),L=c,F=s.split(U);
K=F[G++];){L=w?L:!J.hasClass(K);J[L?"addClass":"removeClass"](K)}}else{if(A==="undefined"||A==="boolean"){this.className&&ah.data(this,"__className__",this.className);
this.className=this.className||s===false?"":ah.data(this,"__className__")||""}}})},hasClass:function(s){s=" "+s+" ";for(var c=0,w=this.length;
c<w;c++){if((" "+this[c].className+" ").replace(be," ").indexOf(s)>-1){return true}}return false},val:function(s){if(s===I){var c=this[0];
if(c){if(ah.nodeName(c,"option")){return(c.attributes.value||{}).specified?c.value:c.text}if(ah.nodeName(c,"select")){var K=c.selectedIndex,F=[],G=c.options;
c=c.type==="select-one";if(K<0){return null}var w=c?K:0;for(K=c?K+1:G.length;w<K;w++){var A=G[w];if(A.selected){s=ah(A).val();
if(c){return s}F.push(s)}}return F}if(aY.test(c.type)&&!ah.support.checkOn){return c.getAttribute("value")===null?"on":c.value
}return(c.value||"").replace(a8,"")}return I}var J=ah.isFunction(s);return this.each(function(L){var P=ah(this),O=s;if(this.nodeType===1){if(J){O=s.call(this,L,P.val())
}if(typeof O==="number"){O+=""}if(ah.isArray(O)&&aY.test(this.type)){this.checked=ah.inArray(P.val(),O)>=0}else{if(ah.nodeName(this,"select")){var N=ah.makeArray(O);
ah("option",this).each(function(){this.selected=ah.inArray(ah(this).val(),N)>=0});if(!N.length){this.selectedIndex=-1}}else{this.value=O
}}}})}});ah.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(s,c,G,A){if(!s||s.nodeType===3||s.nodeType===8){return I
}if(A&&c in ah.attrFn){return ah(s)[c](G)}A=s.nodeType!==1||!ah.isXMLDoc(s);var F=G!==I;c=A&&ah.props[c]||c;if(s.nodeType===1){var w=aM.test(c);
if(c in s&&A&&!w){if(F){c==="type"&&aU.test(s.nodeName)&&s.parentNode&&ah.error("type property can't be changed");s[c]=G}if(ah.nodeName(s,"form")&&s.getAttributeNode(c)){return s.getAttributeNode(c).nodeValue
}if(c==="tabIndex"){return(c=s.getAttributeNode("tabIndex"))&&c.specified?c.value:aw.test(s.nodeName)||S.test(s.nodeName)&&s.href?0:I
}return s[c]}if(!ah.support.style&&A&&c==="style"){if(F){s.style.cssText=""+G}return s.style.cssText}F&&s.setAttribute(c,""+G);
s=!ah.support.hrefNormalized&&A&&w?s.getAttribute(c,2):s.getAttribute(c);return s===null?I:s}return ah.style(s,c,G)}});var az=/\.(.*)$/,r=function(c){return c.replace(/[^\w\s\.\|`]/g,function(s){return"\\"+s
})};ah.event={add:function(P,O,L,J){if(!(P.nodeType===3||P.nodeType===8)){if(P.setInterval&&P!==aO&&!P.frameElement){P=aO
}var K,F;if(L.handler){K=L;L=K.handler}if(!L.guid){L.guid=ah.guid++}if(F=ah.data(P)){var G=F.events=F.events||{},s=F.handle;
if(!s){F.handle=s=function(){return typeof ah!=="undefined"&&!ah.event.triggered?ah.event.handle.apply(s.elem,arguments):I
}}s.elem=P;O=O.split(" ");for(var A,w=0,c;A=O[w++];){F=K?ah.extend({},K):{handler:L,data:J};if(A.indexOf(".")>-1){c=A.split(".");
A=c.shift();F.namespace=c.slice(0).sort().join(".")}else{c=[];F.namespace=""}F.type=A;F.guid=L.guid;var Q=G[A],N=ah.event.special[A]||{};
if(!Q){Q=G[A]=[];if(!N.setup||N.setup.call(P,J,c,s)===false){if(P.addEventListener){P.addEventListener(A,s,false)}else{P.attachEvent&&P.attachEvent("on"+A,s)
}}}if(N.add){N.add.call(P,F);if(!F.handler.guid){F.handler.guid=L.guid}}Q.push(F);ah.event.global[A]=true}P=null}}},global:{},remove:function(R,Q,O,L){if(!(R.nodeType===3||R.nodeType===8)){var N,J=0,K,A,G,F,c,T,P=ah.data(R),s=P&&P.events;
if(P&&s){if(Q&&Q.type){O=Q.handler;Q=Q.type}if(!Q||typeof Q==="string"&&Q.charAt(0)==="."){Q=Q||"";for(N in s){ah.event.remove(R,N+Q)
}}else{for(Q=Q.split(" ");N=Q[J++];){F=N;K=N.indexOf(".")<0;A=[];if(!K){A=N.split(".");N=A.shift();G=new RegExp("(^|\\.)"+ah.map(A.slice(0).sort(),r).join("\\.(?:.*\\.)?")+"(\\.|$)")
}if(c=s[N]){if(O){F=ah.event.special[N]||{};for(w=L||0;w<c.length;w++){T=c[w];if(O.guid===T.guid){if(K||G.test(T.namespace)){L==null&&c.splice(w--,1);
F.remove&&F.remove.call(R,T)}if(L!=null){break}}}if(c.length===0||L!=null&&c.length===1){if(!F.teardown||F.teardown.call(R,A)===false){aG(R,N,P.handle)
}delete s[N]}}else{for(var w=0;w<c.length;w++){T=c[w];if(K||G.test(T.namespace)){ah.event.remove(R,F,T.handler,w);c.splice(w--,1)
}}}}}if(ah.isEmptyObject(s)){if(Q=P.handle){Q.elem=null}delete P.events;delete P.handle;ah.isEmptyObject(P)&&ah.removeData(R)
}}}}},trigger:function(N,L,K,G){var J=N.type||N;if(!G){N=typeof N==="object"?N[aH]?N:ah.extend(ah.Event(J),N):ah.Event(J);
if(J.indexOf("!")>=0){N.type=J=J.slice(0,-1);N.exclusive=true}if(!K){N.stopPropagation();ah.event.global[J]&&ah.each(ah.cache,function(){this.events&&this.events[J]&&ah.event.trigger(N,L,this.handle.elem)
})}if(!K||K.nodeType===3||K.nodeType===8){return I}N.result=I;N.target=K;L=ah.makeArray(L);L.unshift(N)}N.currentTarget=K;
(G=ah.data(K,"handle"))&&G.apply(K,L);G=K.parentNode||K.ownerDocument;try{if(!(K&&K.nodeName&&ah.noData[K.nodeName.toLowerCase()])){if(K["on"+J]&&K["on"+J].apply(K,L)===false){N.result=false
}}}catch(A){}if(!N.isPropagationStopped()&&G){ah.event.trigger(N,L,G,true)}else{if(!N.isDefaultPrevented()){G=N.target;var F,c=ah.nodeName(G,"a")&&J==="click",w=ah.event.special[J]||{};
if((!w._default||w._default.call(K,N)===false)&&!c&&!(G&&G.nodeName&&ah.noData[G.nodeName.toLowerCase()])){try{if(G[J]){if(F=G["on"+J]){G["on"+J]=null
}ah.event.triggered=true;G[J]()}}catch(s){}if(F){G["on"+J]=F}ah.event.triggered=false}}}},handle:function(s){var c,J,F,G;
s=arguments[0]=ah.event.fix(s||aO.event);s.currentTarget=this;c=s.type.indexOf(".")<0&&!s.exclusive;if(!c){J=s.type.split(".");
s.type=J.shift();F=new RegExp("(^|\\.)"+J.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)")}G=ah.data(this,"events");J=G[s.type];
if(G&&J){J=J.slice(0);G=0;for(var w=J.length;G<w;G++){var A=J[G];if(c||F.test(A.namespace)){s.handler=A.handler;s.data=A.data;
s.handleObj=A;A=A.handler.apply(this,arguments);if(A!==I){s.result=A;if(A===false){s.preventDefault();s.stopPropagation()
}}if(s.isImmediatePropagationStopped()){break}}}}return s.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(s){if(s[aH]){return s
}var c=s;s=ah.Event(c);for(var A=this.props.length,w;A;){w=this.props[--A];s[w]=c[w]}if(!s.target){s.target=s.srcElement||M
}if(s.target.nodeType===3){s.target=s.target.parentNode}if(!s.relatedTarget&&s.fromElement){s.relatedTarget=s.fromElement===s.target?s.toElement:s.fromElement
}if(s.pageX==null&&s.clientX!=null){c=M.documentElement;A=M.body;s.pageX=s.clientX+(c&&c.scrollLeft||A&&A.scrollLeft||0)-(c&&c.clientLeft||A&&A.clientLeft||0);
s.pageY=s.clientY+(c&&c.scrollTop||A&&A.scrollTop||0)-(c&&c.clientTop||A&&A.clientTop||0)}if(!s.which&&(s.charCode||s.charCode===0?s.charCode:s.keyCode)){s.which=s.charCode||s.keyCode
}if(!s.metaKey&&s.ctrlKey){s.metaKey=s.ctrlKey}if(!s.which&&s.button!==I){s.which=s.button&1?1:s.button&2?3:s.button&4?2:0
}return s},guid:100000000,proxy:ah.proxy,special:{ready:{setup:ah.bindReady,teardown:ah.noop},live:{add:function(c){ah.event.add(this,c.origType,ah.extend({},c,{handler:ag}))
},remove:function(s){var c=true,w=s.origType.replace(az,"");ah.each(ah.data(this,"events").live||[],function(){if(w===this.origType.replace(az,"")){return c=false
}});c&&ah.event.remove(this,s.origType,ag)}},beforeunload:{setup:function(s,c,w){if(this.setInterval){this.onbeforeunload=w
}return false},teardown:function(s,c){if(this.onbeforeunload===c){this.onbeforeunload=null}}}}};var aG=M.removeEventListener?function(s,c,w){s.removeEventListener(c,w,false)
}:function(s,c,w){s.detachEvent("on"+c,w)};ah.Event=function(c){if(!this.preventDefault){return new ah.Event(c)}if(c&&c.type){this.originalEvent=c;
this.type=c.type}else{this.type=c}this.timeStamp=aF();this[aH]=true};ah.Event.prototype={preventDefault:function(){this.isDefaultPrevented=am;
var c=this.originalEvent;if(c){c.preventDefault&&c.preventDefault();c.returnValue=false}},stopPropagation:function(){this.isPropagationStopped=am;
var c=this.originalEvent;if(c){c.stopPropagation&&c.stopPropagation();c.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=am;
this.stopPropagation()},isDefaultPrevented:ao,isPropagationStopped:ao,isImmediatePropagationStopped:ao};var ae=function(s){var c=s.relatedTarget;
try{for(;c&&c!==this;){c=c.parentNode}if(c!==this){s.type=s.data;ah.event.handle.apply(this,arguments)}}catch(w){}},x=function(c){c.type=c.data;
ah.event.handle.apply(this,arguments)};ah.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(s,c){ah.event.special[s]={setup:function(w){ah.event.add(this,c,w&&w.selector?x:ae,s)
},teardown:function(w){ah.event.remove(this,c,w&&w.selector?x:ae)}}});if(!ah.support.submitBubbles){ah.event.special.submit={setup:function(){if(this.nodeName.toLowerCase()!=="form"){ah.event.add(this,"click.specialSubmit",function(s){var c=s.target,w=c.type;
if((w==="submit"||w==="image")&&ah(c).closest("form").length){return aK("submit",this,arguments)}});ah.event.add(this,"keypress.specialSubmit",function(s){var c=s.target,w=c.type;
if((w==="text"||w==="password")&&ah(c).closest("form").length&&s.keyCode===13){return aK("submit",this,arguments)}})}else{return false
}},teardown:function(){ah.event.remove(this,".specialSubmit")}}}if(!ah.support.changeBubbles){var t=/textarea|input|select/i,g,j=function(s){var c=s.type,w=s.value;
if(c==="radio"||c==="checkbox"){w=s.checked}else{if(c==="select-multiple"){w=s.selectedIndex>-1?ah.map(s.options,function(A){return A.selected
}).join("-"):""}else{if(s.nodeName.toLowerCase()==="select"){w=s.selectedIndex}}}return w},bd=function(s,c){var F=s.target,w,A;
if(!(!t.test(F.nodeName)||F.readOnly)){w=ah.data(F,"_change_data");A=j(F);if(s.type!=="focusout"||F.type!=="radio"){ah.data(F,"_change_data",A)
}if(!(w===I||A===w)){if(w!=null||A){s.type="change";return ah.event.trigger(s,c,F)}}}};ah.event.special.change={filters:{focusout:bd,click:function(s){var c=s.target,w=c.type;
if(w==="radio"||w==="checkbox"||c.nodeName.toLowerCase()==="select"){return bd.call(this,s)}},keydown:function(s){var c=s.target,w=c.type;
if(s.keyCode===13&&c.nodeName.toLowerCase()!=="textarea"||s.keyCode===32&&(w==="checkbox"||w==="radio")||w==="select-multiple"){return bd.call(this,s)
}},beforeactivate:function(c){c=c.target;ah.data(c,"_change_data",j(c))}},setup:function(){if(this.type==="file"){return false
}for(var c in g){ah.event.add(this,c+".specialChange",g[c])}return t.test(this.nodeName)},teardown:function(){ah.event.remove(this,".specialChange");
return t.test(this.nodeName)}};g=ah.event.special.change.filters}M.addEventListener&&ah.each({focus:"focusin",blur:"focusout"},function(s,c){function w(A){A=ah.event.fix(A);
A.type=c;return ah.event.handle.call(this,A)}ah.event.special[c]={setup:function(){this.addEventListener(s,w,true)},teardown:function(){this.removeEventListener(s,w,true)
}}});ah.each(["bind","one"],function(s,c){ah.fn[c]=function(K,F,G){if(typeof K==="object"){for(var w in K){this[c](w,F,K[w],G)
}return this}if(ah.isFunction(F)){G=F;F=I}var A=c==="one"?ah.proxy(G,function(L){ah(this).unbind(L,A);return G.apply(this,arguments)
}):G;if(K==="unload"&&c!=="one"){this.one(K,F,G)}else{w=0;for(var J=this.length;w<J;w++){ah.event.add(this[w],K,A,F)}}return this
}});ah.fn.extend({unbind:function(s,c){if(typeof s==="object"&&!s.preventDefault){for(var A in s){this.unbind(A,s[A])}}else{A=0;
for(var w=this.length;A<w;A++){ah.event.remove(this[A],s,c)}}return this},delegate:function(s,c,A,w){return this.live(c,A,w,s)
},undelegate:function(s,c,w){return arguments.length===0?this.unbind("live"):this.die(c,null,w,s)},trigger:function(s,c){return this.each(function(){ah.event.trigger(s,c,this)
})},triggerHandler:function(s,c){if(this[0]){s=ah.Event(s);s.preventDefault();s.stopPropagation();ah.event.trigger(s,c,this[0]);
return s.result}},toggle:function(s){for(var c=arguments,w=1;w<c.length;){ah.proxy(s,c[w++])}return this.click(ah.proxy(s,function(A){var F=(ah.data(this,"lastToggle"+s.guid)||0)%w;
ah.data(this,"lastToggle"+s.guid,F+1);A.preventDefault();return c[F].apply(this,arguments)||false}))},hover:function(s,c){return this.mouseenter(s).mouseleave(c||s)
}});var bh={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};ah.each(["live","die"],function(s,c){ah.fn[c]=function(O,L,N,J){var K,A=0,G,F,w=J||this.selector,P=J?this:ah(this.context);
if(ah.isFunction(L)){N=L;L=I}for(O=(O||"").split(" ");(K=O[A++])!=null;){J=az.exec(K);G="";if(J){G=J[0];K=K.replace(az,"")
}if(K==="hover"){O.push("mouseenter"+G,"mouseleave"+G)}else{F=K;if(K==="focus"||K==="blur"){O.push(bh[K]+G);K+=G}else{K=(bh[K]||K)+G
}c==="live"?P.each(function(){ah.event.add(this,z(K,w),{data:L,selector:w,handler:N,origType:K,origHandler:N,preType:F})}):P.unbind(z(K,w),N)
}}return this}});ah.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),function(s,c){ah.fn[c]=function(w){return w?this.bind(c,w):this.trigger(c)
};if(ah.attrFn){ah.attrFn[c]=true}});aO.attachEvent&&!aO.addEventListener&&aO.attachEvent("onunload",function(){for(var s in ah.cache){if(ah.cache[s].handle){try{ah.event.remove(ah.cache[s].handle.elem)
}catch(c){}}}});(function(){function W(ab){for(var aa="",Z,Y=0;ab[Y];Y++){Z=ab[Y];if(Z.nodeType===3||Z.nodeType===4){aa+=Z.nodeValue
}else{if(Z.nodeType!==8){aa+=W(Z.childNodes)}}}return aa}function V(bb,ba,ab,aa,Y,Z){Y=0;for(var bm=aa.length;Y<bm;Y++){var bn=aa[Y];
if(bn){bn=bn[bb];for(var bl=false;bn;){if(bn.sizcache===ab){bl=aa[bn.sizset];break}if(bn.nodeType===1&&!Z){bn.sizcache=ab;
bn.sizset=Y}if(bn.nodeName.toLowerCase()===ba){bl=bn;break}bn=bn[bb]}aa[Y]=bl}}}function T(bb,ba,ab,aa,Y,Z){Y=0;for(var bm=aa.length;
Y<bm;Y++){var bn=aa[Y];if(bn){bn=bn[bb];for(var bl=false;bn;){if(bn.sizcache===ab){bl=aa[bn.sizset];break}if(bn.nodeType===1){if(!Z){bn.sizcache=ab;
bn.sizset=Y}if(typeof ba!=="string"){if(bn===ba){bl=true;break}}else{if(N.filter(ba,[bn]).length>0){bl=bn;break}}}bn=bn[bb]
}aa[Y]=bl}}}var Q=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,R=0,O=Object.prototype.toString,P=false,K=true;
[0,0].sort(function(){K=false;return 0});var N=function(bm,bl,ba,ab){ba=ba||[];var Z=bl=bl||M;if(bl.nodeType!==1&&bl.nodeType!==9){return[]
}if(!bm||typeof bm!=="string"){return ba}for(var aa=[],br,bs,bo,bb,bq=true,bn=s(bl),bp=bm;(Q.exec(""),br=Q.exec(bp))!==null;
){bp=br[3];aa.push(br[1]);if(br[2]){bb=br[3];break}}if(aa.length>1&&G.exec(bm)){if(aa.length===2&&L.relative[aa[0]]){bs=X(aa[0]+aa[1],bl)
}else{for(bs=L.relative[aa[0]]?[bl]:N(aa.shift(),bl);aa.length;){bm=aa.shift();if(L.relative[bm]){bm+=aa.shift()}bs=X(bm,bs)
}}}else{if(!ab&&aa.length>1&&bl.nodeType===9&&!bn&&L.match.ID.test(aa[0])&&!L.match.ID.test(aa[aa.length-1])){br=N.find(aa.shift(),bl,bn);
bl=br.expr?N.filter(br.expr,br.set)[0]:br.set[0]}if(bl){br=ab?{expr:aa.pop(),set:c(ab)}:N.find(aa.pop(),aa.length===1&&(aa[0]==="~"||aa[0]==="+")&&bl.parentNode?bl.parentNode:bl,bn);
bs=br.expr?N.filter(br.expr,br.set):br.set;if(aa.length>0){bo=c(bs)}else{bq=false}for(;aa.length;){var Y=aa.pop();br=Y;if(L.relative[Y]){br=aa.pop()
}else{Y=""}if(br==null){br=bl}L.relative[Y](bo,br,bn)}}else{bo=[]}}bo||(bo=bs);bo||N.error(Y||bm);if(O.call(bo)==="[object Array]"){if(bq){if(bl&&bl.nodeType===1){for(bm=0;
bo[bm]!=null;bm++){if(bo[bm]&&(bo[bm]===true||bo[bm].nodeType===1&&A(bl,bo[bm]))){ba.push(bs[bm])}}}else{for(bm=0;bo[bm]!=null;
bm++){bo[bm]&&bo[bm].nodeType===1&&ba.push(bs[bm])}}}else{ba.push.apply(ba,bo)}}else{c(bo,ba)}if(bb){N(bb,Z,ba,ab);N.uniqueSort(ba)
}return ba};N.uniqueSort=function(Z){if(J){P=K;Z.sort(J);if(P){for(var Y=1;Y<Z.length;Y++){Z[Y]===Z[Y-1]&&Z.splice(Y--,1)
}}}return Z};N.matches=function(Z,Y){return N(Z,null,null,Y)};N.find=function(bb,ba,ab){var aa,Y;if(!bb){return[]}for(var Z=0,bm=L.order.length;
Z<bm;Z++){var bn=L.order[Z];if(Y=L.leftMatch[bn].exec(bb)){var bl=Y[1];Y.splice(1,1);if(bl.substr(bl.length-1)!=="\\"){Y[1]=(Y[1]||"").replace(/\\/g,"");
aa=L.find[bn](Y,ba,ab);if(aa!=null){bb=bb.replace(L.match[bn],"");break}}}}aa||(aa=ba.getElementsByTagName("*"));return{set:aa,expr:bb}
};N.filter=function(bn,bm,bb,ab){for(var Z=bn,aa=[],bt=bm,bu,bq,bl=bm&&bm[0]&&s(bm[0]);bn&&bm.length;){for(var bs in L.filter){if((bu=L.leftMatch[bs].exec(bn))!=null&&bu[2]){var bo=L.filter[bs],br,Y;
Y=bu[1];bq=false;bu.splice(1,1);if(Y.substr(Y.length-1)!=="\\"){if(bt===aa){aa=[]}if(L.preFilter[bs]){if(bu=L.preFilter[bs](bu,bt,bb,aa,ab,bl)){if(bu===true){continue
}}else{bq=br=true}}if(bu){for(var ba=0;(Y=bt[ba])!=null;ba++){if(Y){br=bo(Y,bu,ba,bt);var bp=ab^!!br;if(bb&&br!=null){if(bp){bq=true
}else{bt[ba]=false}}else{if(bp){aa.push(Y);bq=true}}}}}if(br!==I){bb||(bt=aa);bn=bn.replace(L.match[bs],"");if(!bq){return[]
}break}}}}if(bn===Z){if(bq==null){N.error(bn)}else{break}}Z=bn}return bt};N.error=function(Y){throw"Syntax error, unrecognized expression: "+Y
};var L=N.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\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(Y){return Y.getAttribute("href")
}},relative:{"+":function(ab,aa){var Z=typeof aa==="string",Y=Z&&!/\W/.test(aa);Z=Z&&!Y;if(Y){aa=aa.toLowerCase()}Y=0;for(var ba=ab.length,bb;
Y<ba;Y++){if(bb=ab[Y]){for(;(bb=bb.previousSibling)&&bb.nodeType!==1;){}ab[Y]=Z||bb&&bb.nodeName.toLowerCase()===aa?bb||false:bb===aa
}}Z&&N.filter(aa,ab,true)},">":function(ab,aa){var Z=typeof aa==="string";if(Z&&!/\W/.test(aa)){aa=aa.toLowerCase();for(var Y=0,ba=ab.length;
Y<ba;Y++){var bb=ab[Y];if(bb){Z=bb.parentNode;ab[Y]=Z.nodeName.toLowerCase()===aa?Z:false}}}else{Y=0;for(ba=ab.length;Y<ba;
Y++){if(bb=ab[Y]){ab[Y]=Z?bb.parentNode:bb.parentNode===aa}}Z&&N.filter(aa,ab,true)}},"":function(ab,aa,Z){var Y=R++,ba=T;
if(typeof aa==="string"&&!/\W/.test(aa)){var bb=aa=aa.toLowerCase();ba=V}ba("parentNode",aa,Y,ab,bb,Z)},"~":function(ab,aa,Z){var Y=R++,ba=T;
if(typeof aa==="string"&&!/\W/.test(aa)){var bb=aa=aa.toLowerCase();ba=V}ba("previousSibling",aa,Y,ab,bb,Z)}},find:{ID:function(aa,Z,Y){if(typeof Z.getElementById!=="undefined"&&!Y){return(aa=Z.getElementById(aa[1]))?[aa]:[]
}},NAME:function(ab,aa){if(typeof aa.getElementsByName!=="undefined"){var Z=[];aa=aa.getElementsByName(ab[1]);for(var Y=0,ba=aa.length;
Y<ba;Y++){aa[Y].getAttribute("name")===ab[1]&&Z.push(aa[Y])}return Z.length===0?null:Z}},TAG:function(Z,Y){return Y.getElementsByTagName(Z[1])
}},preFilter:{CLASS:function(ba,ab,Z,Y,bb,bl){ba=" "+ba[1].replace(/\\/g,"")+" ";if(bl){return ba}bl=0;for(var aa;(aa=ab[bl])!=null;
bl++){if(aa){if(bb^(aa.className&&(" "+aa.className+" ").replace(/[\t\n]/g," ").indexOf(ba)>=0)){Z||Y.push(aa)}else{if(Z){ab[bl]=false
}}}}return false},ID:function(Y){return Y[1].replace(/\\/g,"")},TAG:function(Y){return Y[1].toLowerCase()},CHILD:function(Z){if(Z[1]==="nth"){var Y=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(Z[2]==="even"&&"2n"||Z[2]==="odd"&&"2n+1"||!/\D/.test(Z[2])&&"0n+"+Z[2]||Z[2]);
Z[2]=Y[1]+(Y[2]||1)-0;Z[3]=Y[3]-0}Z[0]=R++;return Z},ATTR:function(ab,aa,Z,Y,ba,bb){aa=ab[1].replace(/\\/g,"");if(!bb&&L.attrMap[aa]){ab[1]=L.attrMap[aa]
}if(ab[2]==="~="){ab[4]=" "+ab[4]+" "}return ab},PSEUDO:function(ab,aa,Z,Y,ba){if(ab[1]==="not"){if((Q.exec(ab[3])||"").length>1||/^\w/.test(ab[3])){ab[3]=N(ab[3],null,null,aa)
}else{ab=N.filter(ab[3],aa,Z,true^ba);Z||Y.push.apply(Y,ab);return false}}else{if(L.match.POS.test(ab[0])||L.match.CHILD.test(ab[0])){return true
}}return ab},POS:function(Y){Y.unshift(true);return Y}},filters:{enabled:function(Y){return Y.disabled===false&&Y.type!=="hidden"
},disabled:function(Y){return Y.disabled===true},checked:function(Y){return Y.checked===true},selected:function(Y){return Y.selected===true
},parent:function(Y){return !!Y.firstChild},empty:function(Y){return !Y.firstChild},has:function(aa,Z,Y){return !!N(Y[3],aa).length
},header:function(Y){return/h\d/i.test(Y.nodeName)},text:function(Y){return"text"===Y.type},radio:function(Y){return"radio"===Y.type
},checkbox:function(Y){return"checkbox"===Y.type},file:function(Y){return"file"===Y.type},password:function(Y){return"password"===Y.type
},submit:function(Y){return"submit"===Y.type},image:function(Y){return"image"===Y.type},reset:function(Y){return"reset"===Y.type
},button:function(Y){return"button"===Y.type||Y.nodeName.toLowerCase()==="button"},input:function(Y){return/input|select|textarea|button/i.test(Y.nodeName)
}},setFilters:{first:function(Z,Y){return Y===0},last:function(ab,aa,Z,Y){return aa===Y.length-1},even:function(Z,Y){return Y%2===0
},odd:function(Z,Y){return Y%2===1},lt:function(aa,Z,Y){return Z<Y[3]-0},gt:function(aa,Z,Y){return Z>Y[3]-0},nth:function(aa,Z,Y){return Y[3]-0===Z
},eq:function(aa,Z,Y){return Y[3]-0===Z}},filter:{PSEUDO:function(ab,aa,Z,Y){var ba=aa[1],bb=L.filters[ba];if(bb){return bb(ab,Z,aa,Y)
}else{if(ba==="contains"){return(ab.textContent||ab.innerText||W([ab])||"").indexOf(aa[3])>=0}else{if(ba==="not"){aa=aa[3];
Z=0;for(Y=aa.length;Z<Y;Z++){if(aa[Z]===ab){return false}}return true}else{N.error("Syntax error, unrecognized expression: "+ba)
}}}},CHILD:function(ba,ab){var Z=ab[1],Y=ba;switch(Z){case"only":case"first":for(;Y=Y.previousSibling;){if(Y.nodeType===1){return false
}}if(Z==="first"){return true}Y=ba;case"last":for(;Y=Y.nextSibling;){if(Y.nodeType===1){return false}}return true;case"nth":Z=ab[2];
var bb=ab[3];if(Z===1&&bb===0){return true}ab=ab[0];var bl=ba.parentNode;if(bl&&(bl.sizcache!==ab||!ba.nodeIndex)){var aa=0;
for(Y=bl.firstChild;Y;Y=Y.nextSibling){if(Y.nodeType===1){Y.nodeIndex=++aa}}bl.sizcache=ab}ba=ba.nodeIndex-bb;return Z===0?ba===0:ba%Z===0&&ba/Z>=0
}},ID:function(Z,Y){return Z.nodeType===1&&Z.getAttribute("id")===Y},TAG:function(Z,Y){return Y==="*"&&Z.nodeType===1||Z.nodeName.toLowerCase()===Y
},CLASS:function(Z,Y){return(" "+(Z.className||Z.getAttribute("class"))+" ").indexOf(Y)>-1},ATTR:function(ab,aa){var Z=aa[1];
ab=L.attrHandle[Z]?L.attrHandle[Z](ab):ab[Z]!=null?ab[Z]:ab.getAttribute(Z);Z=ab+"";var Y=aa[2];aa=aa[4];return ab==null?Y==="!=":Y==="="?Z===aa:Y==="*="?Z.indexOf(aa)>=0:Y==="~="?(" "+Z+" ").indexOf(aa)>=0:!aa?Z&&ab!==false:Y==="!="?Z!==aa:Y==="^="?Z.indexOf(aa)===0:Y==="$="?Z.substr(Z.length-aa.length)===aa:Y==="|="?Z===aa||Z.substr(0,aa.length+1)===aa+"-":false
},POS:function(ab,aa,Z,Y){var ba=L.setFilters[aa[2]];if(ba){return ba(ab,Z,aa,Y)}}}},G=L.match.POS;for(var w in L.match){L.match[w]=new RegExp(L.match[w].source+/(?![^\[]*\])(?![^\(]*\))/.source);
L.leftMatch[w]=new RegExp(/(^(?:.|\r|\n)*?)/.source+L.match[w].source.replace(/\\(\d+)/g,function(Z,Y){return"\\"+(Y-0+1)
}))}var c=function(Z,Y){Z=Array.prototype.slice.call(Z,0);if(Y){Y.push.apply(Y,Z);return Y}return Z};try{Array.prototype.slice.call(M.documentElement.childNodes,0)
}catch(F){c=function(ab,aa){aa=aa||[];if(O.call(ab)==="[object Array]"){Array.prototype.push.apply(aa,ab)}else{if(typeof ab.length==="number"){for(var Z=0,Y=ab.length;
Z<Y;Z++){aa.push(ab[Z])}}else{for(Z=0;ab[Z];Z++){aa.push(ab[Z])}}}return aa}}var J;if(M.documentElement.compareDocumentPosition){J=function(Z,Y){if(!Z.compareDocumentPosition||!Y.compareDocumentPosition){if(Z==Y){P=true
}return Z.compareDocumentPosition?-1:1}Z=Z.compareDocumentPosition(Y)&4?-1:Z===Y?0:1;if(Z===0){P=true}return Z}}else{if("sourceIndex" in M.documentElement){J=function(Z,Y){if(!Z.sourceIndex||!Y.sourceIndex){if(Z==Y){P=true
}return Z.sourceIndex?-1:1}Z=Z.sourceIndex-Y.sourceIndex;if(Z===0){P=true}return Z}}else{if(M.createRange){J=function(ab,aa){if(!ab.ownerDocument||!aa.ownerDocument){if(ab==aa){P=true
}return ab.ownerDocument?-1:1}var Z=ab.ownerDocument.createRange(),Y=aa.ownerDocument.createRange();Z.setStart(ab,0);Z.setEnd(ab,0);
Y.setStart(aa,0);Y.setEnd(aa,0);ab=Z.compareBoundaryPoints(Range.START_TO_END,Y);if(ab===0){P=true}return ab}}}}(function(){var aa=M.createElement("div"),Z="script"+(new Date).getTime();
aa.innerHTML="<a name='"+Z+"'/>";var Y=M.documentElement;Y.insertBefore(aa,Y.firstChild);if(M.getElementById(Z)){L.find.ID=function(ab,ba,bb){if(typeof ba.getElementById!=="undefined"&&!bb){return(ba=ba.getElementById(ab[1]))?ba.id===ab[1]||typeof ba.getAttributeNode!=="undefined"&&ba.getAttributeNode("id").nodeValue===ab[1]?[ba]:I:[]
}};L.filter.ID=function(ab,ba){var bb=typeof ab.getAttributeNode!=="undefined"&&ab.getAttributeNode("id");return ab.nodeType===1&&bb&&bb.nodeValue===ba
}}Y.removeChild(aa);Y=aa=null})();(function(){var Y=M.createElement("div");Y.appendChild(M.createComment(""));if(Y.getElementsByTagName("*").length>0){L.find.TAG=function(ab,aa){aa=aa.getElementsByTagName(ab[1]);
if(ab[1]==="*"){ab=[];for(var Z=0;aa[Z];Z++){aa[Z].nodeType===1&&ab.push(aa[Z])}aa=ab}return aa}}Y.innerHTML="<a href='#'></a>";
if(Y.firstChild&&typeof Y.firstChild.getAttribute!=="undefined"&&Y.firstChild.getAttribute("href")!=="#"){L.attrHandle.href=function(Z){return Z.getAttribute("href",2)
}}Y=null})();M.querySelectorAll&&function(){var aa=N,Z=M.createElement("div");Z.innerHTML="<p class='TEST'></p>";if(!(Z.querySelectorAll&&Z.querySelectorAll(".TEST").length===0)){N=function(ab,bl,bm,ba){bl=bl||M;
if(!ba&&bl.nodeType===9&&!s(bl)){try{return c(bl.querySelectorAll(ab),bm)}catch(bb){}}return aa(ab,bl,bm,ba)};for(var Y in aa){N[Y]=aa[Y]
}Z=null}}();(function(){var Y=M.createElement("div");Y.innerHTML="<div class='test e'></div><div class='test'></div>";if(!(!Y.getElementsByClassName||Y.getElementsByClassName("e").length===0)){Y.lastChild.className="e";
if(Y.getElementsByClassName("e").length!==1){L.order.splice(1,0,"CLASS");L.find.CLASS=function(ab,aa,Z){if(typeof aa.getElementsByClassName!=="undefined"&&!Z){return aa.getElementsByClassName(ab[1])
}};Y=null}}})();var A=M.compareDocumentPosition?function(Z,Y){return !!(Z.compareDocumentPosition(Y)&16)}:function(Z,Y){return Z!==Y&&(Z.contains?Z.contains(Y):true)
},s=function(Y){return(Y=(Y?Y.ownerDocument||Y:0).documentElement)?Y.nodeName!=="HTML":false},X=function(ab,aa){var Z=[],Y="",ba;
for(aa=aa.nodeType?[aa]:aa;ba=L.match.PSEUDO.exec(ab);){Y+=ba[0];ab=ab.replace(L.match.PSEUDO,"")}ab=L.relative[ab]?ab+"*":ab;
ba=0;for(var bb=aa.length;ba<bb;ba++){N(ab,aa[ba],Z)}return N.filter(Y,Z)};ah.find=N;ah.expr=N.selectors;ah.expr[":"]=ah.expr.filters;
ah.unique=N.uniqueSort;ah.text=W;ah.isXMLDoc=s;ah.contains=A})();var f=/Until$/,a9=/^(?:parents|prevUntil|prevAll)/,aW=/,/;
au=Array.prototype.slice;var aL=function(s,c,A){if(ah.isFunction(c)){return ah.grep(s,function(G,F){return !!c.call(G,F,G)===A
})}else{if(c.nodeType){return ah.grep(s,function(F){return F===c===A})}else{if(typeof c==="string"){var w=ah.grep(s,function(F){return F.nodeType===1
});if(aT.test(c)){return ah.filter(c,w,!A)}else{c=ah.filter(c,w)}}}}return ah.grep(s,function(F){return ah.inArray(F,c)>=0===A
})};ah.fn.extend({find:function(s){for(var c=this.pushStack("","find",s),J=0,F=0,G=this.length;F<G;F++){J=c.length;ah.find(s,this[F],c);
if(F>0){for(var w=J;w<c.length;w++){for(var A=0;A<J;A++){if(c[A]===c[w]){c.splice(w--,1);break}}}}}return c},has:function(s){var c=ah(s);
return this.filter(function(){for(var A=0,w=c.length;A<w;A++){if(ah.contains(this,c[A])){return true}}})},not:function(c){return this.pushStack(aL(this,c,false),"not",c)
},filter:function(c){return this.pushStack(aL(this,c,true),"filter",c)},is:function(c){return !!c&&ah.filter(c,this).length>0
},closest:function(L,K){if(ah.isArray(L)){var J=[],F=this[0],G,w={},A;if(F&&L.length){G=0;for(var c=L.length;G<c;G++){A=L[G];
w[A]||(w[A]=ah.expr.match.POS.test(A)?ah(A,K||this.context):A)}for(;F&&F.ownerDocument&&F!==K;){for(A in w){G=w[A];if(G.jquery?G.index(F)>-1:ah(F).is(G)){J.push({selector:A,elem:F});
delete w[A]}}F=F.parentNode}}return J}var s=ah.expr.match.POS.test(L)?ah(L,K||this.context):null;return this.map(function(O,N){for(;
N&&N.ownerDocument&&N!==K;){if(s?s.index(N)>-1:ah(N).is(L)){return N}N=N.parentNode}return null})},index:function(c){if(!c||typeof c==="string"){return ah.inArray(this[0],c?ah(c):this.parent().children())
}return ah.inArray(c.jquery?c[0]:c,this)},add:function(s,c){s=typeof s==="string"?ah(s,c||this.context):ah.makeArray(s);c=ah.merge(this.get(),s);
return this.pushStack(l(s[0])||l(c[0])?c:ah.unique(c))},andSelf:function(){return this.add(this.prevObject)}});ah.each({parent:function(c){return(c=c.parentNode)&&c.nodeType!==11?c:null
},parents:function(c){return ah.dir(c,"parentNode")},parentsUntil:function(s,c,w){return ah.dir(s,"parentNode",w)},next:function(c){return ah.nth(c,2,"nextSibling")
},prev:function(c){return ah.nth(c,2,"previousSibling")},nextAll:function(c){return ah.dir(c,"nextSibling")},prevAll:function(c){return ah.dir(c,"previousSibling")
},nextUntil:function(s,c,w){return ah.dir(s,"nextSibling",w)},prevUntil:function(s,c,w){return ah.dir(s,"previousSibling",w)
},siblings:function(c){return ah.sibling(c.parentNode.firstChild,c)},children:function(c){return ah.sibling(c.firstChild)
},contents:function(c){return ah.nodeName(c,"iframe")?c.contentDocument||c.contentWindow.document:ah.makeArray(c.childNodes)
}},function(s,c){ah.fn[s]=function(F,w){var A=ah.map(this,c,F);f.test(s)||(w=F);if(w&&typeof w==="string"){A=ah.filter(w,A)
}A=this.length>1?ah.unique(A):A;if((this.length>1||aW.test(w))&&a9.test(s)){A=A.reverse()}return this.pushStack(A,s,au.call(arguments).join(","))
}});ah.extend({filter:function(s,c,w){if(w){s=":not("+s+")"}return ah.find.matches(s,c)},dir:function(s,c,A){var w=[];for(s=s[c];
s&&s.nodeType!==9&&(A===I||s.nodeType!==1||!ah(s).is(A));){s.nodeType===1&&w.push(s);s=s[c]}return w},nth:function(s,c,A){c=c||1;
for(var w=0;s;s=s[A]){if(s.nodeType===1&&++w===c){break}}return s},sibling:function(s,c){for(var w=[];s;s=s.nextSibling){s.nodeType===1&&s!==c&&w.push(s)
}return w}});var ai=/ jQuery\d+="(?:\d+|null)"/g,ar=/^\s+/,B=/(<([\w:]+)[^>]*?)\/>/g,aD=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,m=/<([\w:]+)/,ac=/<tbody/i,u=/<|&#?\w+;/,aP=/<script|<object|<embed|<option|<style/i,ak=/checked\s*(?:[^=]|=\s*.checked.)/i,bk=function(s,c,w){return aD.test(w)?s:c+"></"+w+">"
},aJ={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};
aJ.optgroup=aJ.option;aJ.tbody=aJ.tfoot=aJ.colgroup=aJ.caption=aJ.thead;aJ.th=aJ.td;if(!ah.support.htmlSerialize){aJ._default=[1,"div<div>","</div>"]
}ah.fn.extend({text:function(c){if(ah.isFunction(c)){return this.each(function(s){var w=ah(this);w.text(c.call(this,s,w.text()))
})}if(typeof c!=="object"&&c!==I){return this.empty().append((this[0]&&this[0].ownerDocument||M).createTextNode(c))}return ah.text(this)
},wrapAll:function(s){if(ah.isFunction(s)){return this.each(function(w){ah(this).wrapAll(s.call(this,w))})}if(this[0]){var c=ah(s,this[0].ownerDocument).eq(0).clone(true);
this[0].parentNode&&c.insertBefore(this[0]);c.map(function(){for(var w=this;w.firstChild&&w.firstChild.nodeType===1;){w=w.firstChild
}return w}).append(this)}return this},wrapInner:function(c){if(ah.isFunction(c)){return this.each(function(s){ah(this).wrapInner(c.call(this,s))
})}return this.each(function(){var s=ah(this),w=s.contents();w.length?w.wrapAll(c):s.append(c)})},wrap:function(c){return this.each(function(){ah(this).wrapAll(c)
})},unwrap:function(){return this.parent().each(function(){ah.nodeName(this,"body")||ah(this).replaceWith(this.childNodes)
}).end()},append:function(){return this.domManip(arguments,true,function(c){this.nodeType===1&&this.appendChild(c)})},prepend:function(){return this.domManip(arguments,true,function(c){this.nodeType===1&&this.insertBefore(c,this.firstChild)
})},before:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(s){this.parentNode.insertBefore(s,this)
})}else{if(arguments.length){var c=ah(arguments[0]);c.push.apply(c,this.toArray());return this.pushStack(c,"before",arguments)
}}},after:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(s){this.parentNode.insertBefore(s,this.nextSibling)
})}else{if(arguments.length){var c=this.pushStack(this,"after",arguments);c.push.apply(c,ah(arguments[0]).toArray());return c
}}},remove:function(s,c){for(var A=0,w;(w=this[A])!=null;A++){if(!s||ah.filter(s,[w]).length){if(!c&&w.nodeType===1){ah.cleanData(w.getElementsByTagName("*"));
ah.cleanData([w])}w.parentNode&&w.parentNode.removeChild(w)}}return this},empty:function(){for(var s=0,c;(c=this[s])!=null;
s++){for(c.nodeType===1&&ah.cleanData(c.getElementsByTagName("*"));c.firstChild;){c.removeChild(c.firstChild)}}return this
},clone:function(s){var c=this.map(function(){if(!ah.support.noCloneEvent&&!ah.isXMLDoc(this)){var A=this.outerHTML,w=this.ownerDocument;
if(!A){A=w.createElement("div");A.appendChild(this.cloneNode(true));A=A.innerHTML}return ah.clean([A.replace(ai,"").replace(/=([^="'>\s]+\/)>/g,'="$1">').replace(ar,"")],w)[0]
}else{return this.cloneNode(true)}});if(s===true){bj(this,c);bj(this.find("*"),c.find("*"))}return c},html:function(s){if(s===I){return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(ai,""):null
}else{if(typeof s==="string"&&!aP.test(s)&&(ah.support.leadingWhitespace||!ar.test(s))&&!aJ[(m.exec(s)||["",""])[1].toLowerCase()]){s=s.replace(B,bk);
try{for(var c=0,A=this.length;c<A;c++){if(this[c].nodeType===1){ah.cleanData(this[c].getElementsByTagName("*"));this[c].innerHTML=s
}}}catch(w){this.empty().append(s)}}else{ah.isFunction(s)?this.each(function(J){var F=ah(this),G=F.html();F.empty().append(function(){return s.call(this,J,G)
})}):this.empty().append(s)}}return this},replaceWith:function(c){if(this[0]&&this[0].parentNode){if(ah.isFunction(c)){return this.each(function(s){var A=ah(this),w=A.html();
A.replaceWith(c.call(this,s,w))})}if(typeof c!=="string"){c=ah(c).detach()}return this.each(function(){var s=this.nextSibling,w=this.parentNode;
ah(this).remove();s?ah(s).before(c):ah(w).append(c)})}else{return this.pushStack(ah(ah.isFunction(c)?c():c),"replaceWith",c)
}},detach:function(c){return this.remove(c,true)},domManip:function(O,N,L){function J(P){return ah.nodeName(P,"table")?P.getElementsByTagName("tbody")[0]||P.appendChild(P.ownerDocument.createElement("tbody")):P
}var K,F,G=O[0],s=[],A;if(!ah.support.checkClone&&arguments.length===3&&typeof G==="string"&&ak.test(G)){return this.each(function(){ah(this).domManip(O,N,L,true)
})}if(ah.isFunction(G)){return this.each(function(P){var Q=ah(this);O[0]=G.call(this,P,N?Q.html():I);Q.domManip(O,N,L)})}if(this[0]){K=G&&G.parentNode;
K=ah.support.parentNode&&K&&K.nodeType===11&&K.childNodes.length===this.length?{fragment:K}:a3(O,this,s);A=K.fragment;if(F=A.childNodes.length===1?(A=A.firstChild):A.firstChild){N=N&&ah.nodeName(F,"tr");
for(var w=0,c=this.length;w<c;w++){L.call(N?J(this[w],F):this[w],w>0||K.cacheable||this.length>1?A.cloneNode(true):A)}}s.length&&ah.each(s,E)
}return this}});ah.fragments={};ah.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(s,c){ah.fn[s]=function(J){var F=[];
J=ah(J);var G=this.length===1&&this[0].parentNode;if(G&&G.nodeType===11&&G.childNodes.length===1&&J.length===1){J[c](this[0]);
return this}else{G=0;for(var w=J.length;G<w;G++){var A=(G>0?this.clone(true):this).get();ah.fn[c].apply(ah(J[G]),A);F=F.concat(A)
}return this.pushStack(F,s,J.selector)}}});ah.extend({clean:function(O,N,L,J){N=N||M;if(typeof N.createElement==="undefined"){N=N.ownerDocument||N[0]&&N[0].ownerDocument||M
}for(var K=[],F=0,G;(G=O[F])!=null;F++){if(typeof G==="number"){G+=""}if(G){if(typeof G==="string"&&!u.test(G)){G=N.createTextNode(G)
}else{if(typeof G==="string"){G=G.replace(B,bk);var s=(m.exec(G)||["",""])[1].toLowerCase(),A=aJ[s]||aJ._default,w=A[0],c=N.createElement("div");
for(c.innerHTML=A[1]+G+A[2];w--;){c=c.lastChild}if(!ah.support.tbody){w=ac.test(G);s=s==="table"&&!w?c.firstChild&&c.firstChild.childNodes:A[1]==="<table>"&&!w?c.childNodes:[];
for(A=s.length-1;A>=0;--A){ah.nodeName(s[A],"tbody")&&!s[A].childNodes.length&&s[A].parentNode.removeChild(s[A])}}!ah.support.leadingWhitespace&&ar.test(G)&&c.insertBefore(N.createTextNode(ar.exec(G)[0]),c.firstChild);
G=c.childNodes}}if(G.nodeType){K.push(G)}else{K=ah.merge(K,G)}}}if(L){for(F=0;K[F];F++){if(J&&ah.nodeName(K[F],"script")&&(!K[F].type||K[F].type.toLowerCase()==="text/javascript")){J.push(K[F].parentNode?K[F].parentNode.removeChild(K[F]):K[F])
}else{K[F].nodeType===1&&K.splice.apply(K,[F+1,0].concat(ah.makeArray(K[F].getElementsByTagName("script"))));L.appendChild(K[F])
}}}return K},cleanData:function(L){for(var K,J,F=ah.cache,G=ah.event.special,w=ah.support.deleteExpando,A=0,c;(c=L[A])!=null;
A++){if(J=c[ah.expando]){K=F[J];if(K.events){for(var s in K.events){G[s]?ah.event.remove(c,s):aG(c,s,K.handle)}}if(w){delete c[ah.expando]
}else{c.removeAttribute&&c.removeAttribute(ah.expando)}delete F[J]}}}});var h=/z-?index|font-?weight|opacity|zoom|line-?height/i,a4=/alpha\([^)]*\)/,aQ=/opacity=([^)]*)/,aE=/float/i,ad=/-([a-z])/ig,bf=/([A-Z])/g,aZ=/^-?\d+(?:px)?$/i,aI=/^-?\d/,af={position:"absolute",visibility:"hidden",display:"block"},y=["Left","Right"],k=["Top","Bottom"],bi=M.defaultView&&M.defaultView.getComputedStyle,al=ah.support.cssFloat?"cssFloat":"styleFloat",v=function(s,c){return c.toUpperCase()
};ah.fn.css=function(s,c){return ap(this,s,c,true,function(F,w,A){if(A===I){return ah.curCSS(F,w)}if(typeof A==="number"&&!h.test(w)){A+="px"
}ah.style(F,w,A)})};ah.extend({style:function(s,c,F){if(!s||s.nodeType===3||s.nodeType===8){return I}if((c==="width"||c==="height")&&parseFloat(F)<0){F=I
}var w=s.style||s,A=F!==I;if(!ah.support.opacity&&c==="opacity"){if(A){w.zoom=1;c=parseInt(F,10)+""==="NaN"?"":"alpha(opacity="+F*100+")";
s=w.filter||ah.curCSS(s,"filter")||"";w.filter=a4.test(s)?s.replace(a4,c):c}return w.filter&&w.filter.indexOf("opacity=")>=0?parseFloat(aQ.exec(w.filter)[1])/100+"":""
}if(aE.test(c)){c=al}c=c.replace(ad,v);if(A){w[c]=F}return w[c]},css:function(s,c,J,F){if(c==="width"||c==="height"){var G,w=c==="width"?y:k;
function A(){G=c==="width"?s.offsetWidth:s.offsetHeight;F!=="border"&&ah.each(w,function(){F||(G-=parseFloat(ah.curCSS(s,"padding"+this,true))||0);
if(F==="margin"){G+=parseFloat(ah.curCSS(s,"margin"+this,true))||0}else{G-=parseFloat(ah.curCSS(s,"border"+this+"Width",true))||0
}})}s.offsetWidth!==0?A():ah.swap(s,af,A);return Math.max(0,Math.round(G))}return ah.curCSS(s,c,J)},curCSS:function(s,c,G){var A,F=s.style;
if(!ah.support.opacity&&c==="opacity"&&s.currentStyle){A=aQ.test(s.currentStyle.filter||"")?parseFloat(RegExp.$1)/100+"":"";
return A===""?"1":A}if(aE.test(c)){c=al}if(!G&&F&&F[c]){A=F[c]}else{if(bi){if(aE.test(c)){c="float"}c=c.replace(bf,"-$1").toLowerCase();
F=s.ownerDocument.defaultView;if(!F){return null}if(s=F.getComputedStyle(s,null)){A=s.getPropertyValue(c)}if(c==="opacity"&&A===""){A="1"
}}else{if(s.currentStyle){G=c.replace(ad,v);A=s.currentStyle[c]||s.currentStyle[G];if(!aZ.test(A)&&aI.test(A)){c=F.left;var w=s.runtimeStyle.left;
s.runtimeStyle.left=s.currentStyle.left;F.left=G==="fontSize"?"1em":A||0;A=F.pixelLeft+"px";F.left=c;s.runtimeStyle.left=w
}}}}return A},swap:function(s,c,F){var w={};for(var A in c){w[A]=s.style[A];s.style[A]=c[A]}F.call(s);for(A in c){s.style[A]=w[A]
}}});if(ah.expr&&ah.expr.filters){ah.expr.filters.hidden=function(s){var c=s.offsetWidth,A=s.offsetHeight,w=s.nodeName.toLowerCase()==="tr";
return c===0&&A===0&&!w?true:c>0&&A>0&&!w?false:ah.curCSS(s,"display")==="none"};ah.expr.filters.visible=function(c){return !ah.expr.filters.hidden(c)
}}var a2=aF(),aN=/<script(.|\s)*?\/script>/gi,aj=/select|textarea/i,C=/color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,aA=/=\?(&|$)/,i=/\?/,n=/(\?|&)_=.*?(&|$)/,a=/^(\w+:)?\/\/([^\/?#]+)/,a5=/%20/g,aR=ah.fn.load;
ah.fn.extend({load:function(s,c,G){if(typeof s!=="string"){return aR.call(this,s)}else{if(!this.length){return this}}var A=s.indexOf(" ");
if(A>=0){var F=s.slice(A,s.length);s=s.slice(0,A)}A="GET";if(c){if(ah.isFunction(c)){G=c;c=null}else{if(typeof c==="object"){c=ah.param(c,ah.ajaxSettings.traditional);
A="POST"}}}var w=this;ah.ajax({url:s,type:A,dataType:"html",data:c,complete:function(J,K){if(K==="success"||K==="notmodified"){w.html(F?ah("<div />").append(J.responseText.replace(aN,"")).find(F):J.responseText)
}G&&w.each(G,[J.responseText,K,J])}});return this},serialize:function(){return ah.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?ah.makeArray(this.elements):this
}).filter(function(){return this.name&&!this.disabled&&(this.checked||aj.test(this.nodeName)||C.test(this.type))}).map(function(s,c){s=ah(this).val();
return s==null?null:ah.isArray(s)?ah.map(s,function(w){return{name:c.name,value:w}}):{name:c.name,value:s}}).get()}});ah.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(s,c){ah.fn[c]=function(w){return this.bind(c,w)
}});ah.extend({get:function(s,c,A,w){if(ah.isFunction(c)){w=w||A;A=c;c=null}return ah.ajax({type:"GET",url:s,data:c,success:A,dataType:w})
},getScript:function(s,c){return ah.get(s,null,c,"script")},getJSON:function(s,c,w){return ah.get(s,c,w,"json")},post:function(s,c,A,w){if(ah.isFunction(c)){w=w||A;
A=c;c={}}return ah.ajax({type:"POST",url:s,data:c,success:A,dataType:w})},ajaxSetup:function(c){ah.extend(ah.ajaxSettings,c)
},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:aO.XMLHttpRequest&&(aO.location.protocol!=="file:"||!aO.ActiveXObject)?function(){return new aO.XMLHttpRequest
}:function(){try{return new aO.ActiveXObject("Microsoft.XMLHTTP")}catch(c){}},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},etag:{},ajax:function(aa){function Z(){X.success&&X.success.call(P,K,R,s);
X.global&&W("ajaxSuccess",[s,X])}function Y(){X.complete&&X.complete.call(P,s,R);X.global&&W("ajaxComplete",[s,X]);X.global&&!--ah.active&&ah.event.trigger("ajaxStop")
}function W(ba,bb){(X.context?ah(X.context):ah.event).trigger(ba,bb)}var X=ah.extend(true,{},ah.ajaxSettings,aa),Q,R,K,P=aa&&aa.context||X,L=X.type.toUpperCase();
if(X.data&&X.processData&&typeof X.data!=="string"){X.data=ah.param(X.data,X.traditional)}if(X.dataType==="jsonp"){if(L==="GET"){aA.test(X.url)||(X.url+=(i.test(X.url)?"&":"?")+(X.jsonp||"callback")+"=?")
}else{if(!X.data||!aA.test(X.data)){X.data=(X.data?X.data+"&":"")+(X.jsonp||"callback")+"=?"}}X.dataType="json"}if(X.dataType==="json"&&(X.data&&aA.test(X.data)||aA.test(X.url))){Q=X.jsonpCallback||"jsonp"+a2++;
if(X.data){X.data=(X.data+"").replace(aA,"="+Q+"$1")}X.url=X.url.replace(aA,"="+Q+"$1");X.dataType="script";aO[Q]=aO[Q]||function(ba){K=ba;
Z();Y();aO[Q]=I;try{delete aO[Q]}catch(bb){}c&&c.removeChild(F)}}if(X.dataType==="script"&&X.cache===null){X.cache=false}if(X.cache===false&&L==="GET"){var G=aF(),w=X.url.replace(n,"$1_="+G+"$2");
X.url=w+(w===X.url?(i.test(X.url)?"&":"?")+"_="+G:"")}if(X.data&&L==="GET"){X.url+=(i.test(X.url)?"&":"?")+X.data}X.global&&!ah.active++&&ah.event.trigger("ajaxStart");
G=(G=a.exec(X.url))&&(G[1]&&G[1]!==location.protocol||G[2]!==location.host);if(X.dataType==="script"&&L==="GET"&&G){var c=M.getElementsByTagName("head")[0]||M.documentElement,F=M.createElement("script");
F.src=X.url;if(X.scriptCharset){F.charset=X.scriptCharset}if(!Q){var J=false;F.onload=F.onreadystatechange=function(){if(!J&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){J=true;
Z();Y();F.onload=F.onreadystatechange=null;c&&F.parentNode&&c.removeChild(F)}}}c.insertBefore(F,c.firstChild);return I}var A=false,s=X.xhr();
if(s){X.username?s.open(L,X.url,X.async,X.username,X.password):s.open(L,X.url,X.async);try{if(X.data||aa&&aa.contentType){s.setRequestHeader("Content-Type",X.contentType)
}if(X.ifModified){ah.lastModified[X.url]&&s.setRequestHeader("If-Modified-Since",ah.lastModified[X.url]);ah.etag[X.url]&&s.setRequestHeader("If-None-Match",ah.etag[X.url])
}G||s.setRequestHeader("X-Requested-With","XMLHttpRequest");s.setRequestHeader("Accept",X.dataType&&X.accepts[X.dataType]?X.accepts[X.dataType]+", */*":X.accepts._default)
}catch(ab){}if(X.beforeSend&&X.beforeSend.call(P,s,X)===false){X.global&&!--ah.active&&ah.event.trigger("ajaxStop");s.abort();
return false}X.global&&W("ajaxSend",[s,X]);var V=s.onreadystatechange=function(bb){if(!s||s.readyState===0||bb==="abort"){A||Y();
A=true;if(s){s.onreadystatechange=ah.noop}}else{if(!A&&s&&(s.readyState===4||bb==="timeout")){A=true;s.onreadystatechange=ah.noop;
R=bb==="timeout"?"timeout":!ah.httpSuccess(s)?"error":X.ifModified&&ah.httpNotModified(s,X.url)?"notmodified":"success";var bl;
if(R==="success"){try{K=ah.httpData(s,X.dataType,X)}catch(ba){R="parsererror";bl=ba}}if(R==="success"||R==="notmodified"){Q||Z()
}else{ah.handleError(X,s,R,bl)}Y();bb==="timeout"&&s.abort();if(X.async){s=null}}}};try{var T=s.abort;s.abort=function(){s&&T.call(s);
V("abort")}}catch(O){}X.async&&X.timeout>0&&setTimeout(function(){s&&!A&&V("timeout")},X.timeout);try{s.send(L==="POST"||L==="PUT"||L==="DELETE"?X.data:null)
}catch(N){ah.handleError(X,s,null,N);Y()}X.async||V();return s}},handleError:function(s,c,A,w){if(s.error){s.error.call(s.context||s,c,A,w)
}if(s.global){(s.context?ah(s.context):ah.event).trigger("ajaxError",[c,s,w])}},active:0,httpSuccess:function(s){try{return !s.status&&location.protocol==="file:"||s.status>=200&&s.status<300||s.status===304||s.status===1223||s.status===0
}catch(c){}return false},httpNotModified:function(s,c){var A=s.getResponseHeader("Last-Modified"),w=s.getResponseHeader("Etag");
if(A){ah.lastModified[c]=A}if(w){ah.etag[c]=w}return s.status===304||s.status===0},httpData:function(s,c,F){var w=s.getResponseHeader("content-type")||"",A=c==="xml"||!c&&w.indexOf("xml")>=0;
s=A?s.responseXML:s.responseText;A&&s.documentElement.nodeName==="parsererror"&&ah.error("parsererror");if(F&&F.dataFilter){s=F.dataFilter(s,c)
}if(typeof s==="string"){if(c==="json"||!c&&w.indexOf("json")>=0){s=ah.parseJSON(s)}else{if(c==="script"||!c&&w.indexOf("javascript")>=0){ah.globalEval(s)
}}}return s},param:function(s,c){function G(J,K){if(ah.isArray(K)){ah.each(K,function(L,N){c||/\[\]$/.test(J)?A(J,N):G(J+"["+(typeof N==="object"||ah.isArray(N)?L:"")+"]",N)
})}else{!c&&K!=null&&typeof K==="object"?ah.each(K,function(L,N){G(J+"["+L+"]",N)}):A(J,K)}}function A(J,K){K=ah.isFunction(K)?K():K;
F[F.length]=encodeURIComponent(J)+"="+encodeURIComponent(K)}var F=[];if(c===I){c=ah.ajaxSettings.traditional}if(ah.isArray(s)||s.jquery){ah.each(s,function(){A(this.name,this.value)
})}else{for(var w in s){G(w,s[w])}}return F.join("&").replace(a5,"+")}});var bg={},bc=/toggle|show|hide/,aX=/^([+-]=)?([\d+-.]+)(.*)$/,aq,D=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];
ah.fn.extend({show:function(s,c){if(s||s===0){return this.animate(aC("show",3),s,c)}else{s=0;for(c=this.length;s<c;s++){var F=ah.data(this[s],"olddisplay");
this[s].style.display=F||"";if(ah.css(this[s],"display")==="none"){F=this[s].nodeName;var w;if(bg[F]){w=bg[F]}else{var A=ah("<"+F+" />").appendTo("body");
w=A.css("display");if(w==="none"){w="block"}A.remove();bg[F]=w}ah.data(this[s],"olddisplay",w)}}s=0;for(c=this.length;s<c;
s++){this[s].style.display=ah.data(this[s],"olddisplay")||""}return this}},hide:function(s,c){if(s||s===0){return this.animate(aC("hide",3),s,c)
}else{s=0;for(c=this.length;s<c;s++){var w=ah.data(this[s],"olddisplay");!w&&w!=="none"&&ah.data(this[s],"olddisplay",ah.css(this[s],"display"))
}s=0;for(c=this.length;s<c;s++){this[s].style.display="none"}return this}},_toggle:ah.fn.toggle,toggle:function(s,c){var w=typeof s==="boolean";
if(ah.isFunction(s)&&ah.isFunction(c)){this._toggle.apply(this,arguments)}else{s==null||w?this.each(function(){var A=w?s:ah(this).is(":hidden");
ah(this)[A?"show":"hide"]()}):this.animate(aC("toggle",3),s,c)}return this},fadeTo:function(s,c,w){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:c},s,w)
},animate:function(s,c,F,w){var A=ah.speed(c,F,w);if(ah.isEmptyObject(s)){return this.each(A.complete)}return this[A.queue===false?"each":"queue"](function(){var J=ah.extend({},A),K,L=this.nodeType===1&&ah(this).is(":hidden"),G=this;
for(K in s){var N=K.replace(ad,v);if(K!==N){s[N]=s[K];delete s[K];K=N}if(s[K]==="hide"&&L||s[K]==="show"&&!L){return J.complete.call(this)
}if((K==="height"||K==="width")&&this.style){J.display=ah.css(this,"display");J.overflow=this.style.overflow}if(ah.isArray(s[K])){(J.specialEasing=J.specialEasing||{})[K]=s[K][1];
s[K]=s[K][0]}}if(J.overflow!=null){this.style.overflow="hidden"}J.curAnim=ah.extend({},s);ah.each(s,function(P,O){var T=new ah.fx(G,J,P);
if(bc.test(O)){T[O==="toggle"?L?"show":"hide":O](s)}else{var R=aX.exec(O),V=T.cur(true)||0;if(R){O=parseFloat(R[2]);var Q=R[3]||"px";
if(Q!=="px"){G.style[P]=(O||1)+Q;V=(O||1)/T.cur(true)*V;G.style[P]=V+Q}if(R[1]){O=(R[1]==="-="?-1:1)*O+V}T.custom(V,O,Q)}else{T.custom(V,O,"")
}}});return true})},stop:function(s,c){var w=ah.timers;s&&this.queue([]);this.each(function(){for(var A=w.length-1;A>=0;A--){if(w[A].elem===this){c&&w[A](true);
w.splice(A,1)}}});c||this.dequeue();return this}});ah.each({slideDown:aC("show",1),slideUp:aC("hide",1),slideToggle:aC("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(s,c){ah.fn[s]=function(A,w){return this.animate(c,A,w)
}});ah.extend({speed:function(s,c,A){var w=s&&typeof s==="object"?s:{complete:A||!A&&c||ah.isFunction(s)&&s,duration:s,easing:A&&c||c&&!ah.isFunction(c)&&c};
w.duration=ah.fx.off?0:typeof w.duration==="number"?w.duration:ah.fx.speeds[w.duration]||ah.fx.speeds._default;w.old=w.complete;
w.complete=function(){w.queue!==false&&ah(this).dequeue();ah.isFunction(w.old)&&w.old.call(this)};return w},easing:{linear:function(s,c,A,w){return A+w*s
},swing:function(s,c,A,w){return(-Math.cos(s*Math.PI)/2+0.5)*w+A}},timers:[],fx:function(s,c,w){this.options=c;this.elem=s;
this.prop=w;if(!c.orig){c.orig={}}}});ah.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);
(ah.fx.step[this.prop]||ah.fx.step._default)(this);if((this.prop==="height"||this.prop==="width")&&this.elem.style){this.elem.style.display="block"
}},cur:function(c){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]
}return(c=parseFloat(ah.css(this.elem,this.prop,c)))&&c>-10000?c:parseFloat(ah.curCSS(this.elem,this.prop))||0},custom:function(s,c,F){function w(G){return A.step(G)
}this.startTime=aF();this.start=s;this.end=c;this.unit=F||this.unit||"px";this.now=this.start;this.pos=this.state=0;var A=this;
w.elem=this.elem;if(w()&&ah.timers.push(w)&&!aq){aq=setInterval(ah.fx.tick,13)}},show:function(){this.options.orig[this.prop]=ah.style(this.elem,this.prop);
this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());ah(this.elem).show()},hide:function(){this.options.orig[this.prop]=ah.style(this.elem,this.prop);
this.options.hide=true;this.custom(this.cur(),0)},step:function(s){var c=aF(),F=true;if(s||c>=this.options.duration+this.startTime){this.now=this.end;
this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var w in this.options.curAnim){if(this.options.curAnim[w]!==true){F=false
}}if(F){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;s=ah.data(this.elem,"olddisplay");this.elem.style.display=s?s:this.options.display;
if(ah.css(this.elem,"display")==="none"){this.elem.style.display="block"}}this.options.hide&&ah(this.elem).hide();if(this.options.hide||this.options.show){for(var A in this.options.curAnim){ah.style(this.elem,A,this.options.orig[A])
}}this.options.complete.call(this.elem)}return false}else{A=c-this.startTime;this.state=A/this.options.duration;s=this.options.easing||(ah.easing.swing?"swing":"linear");
this.pos=ah.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||s](this.state,A,0,1,this.options.duration);
this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};ah.extend(ah.fx,{tick:function(){for(var s=ah.timers,c=0;
c<s.length;c++){s[c]()||s.splice(c--,1)}s.length||ah.fx.stop()},stop:function(){clearInterval(aq);aq=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(c){ah.style(c.elem,"opacity",c.now)
},_default:function(c){if(c.elem.style&&c.elem.style[c.prop]!=null){c.elem.style[c.prop]=(c.prop==="width"||c.prop==="height"?Math.max(0,c.now):c.now)+c.unit
}else{c.elem[c.prop]=c.now}}}});if(ah.expr&&ah.expr.filters){ah.expr.filters.animated=function(c){return ah.grep(ah.timers,function(s){return c===s.elem
}).length}}ah.fn.offset="getBoundingClientRect" in M.documentElement?function(s){var c=this[0];if(s){return this.each(function(F){ah.offset.setOffset(this,s,F)
})}if(!c||!c.ownerDocument){return null}if(c===c.ownerDocument.body){return ah.offset.bodyOffset(c)}var A=c.getBoundingClientRect(),w=c.ownerDocument;
c=w.body;w=w.documentElement;return{top:A.top+(self.pageYOffset||ah.support.boxModel&&w.scrollTop||c.scrollTop)-(w.clientTop||c.clientTop||0),left:A.left+(self.pageXOffset||ah.support.boxModel&&w.scrollLeft||c.scrollLeft)-(w.clientLeft||c.clientLeft||0)}
}:function(N){var L=this[0];if(N){return this.each(function(O){ah.offset.setOffset(this,N,O)})}if(!L||!L.ownerDocument){return null
}if(L===L.ownerDocument.body){return ah.offset.bodyOffset(L)}ah.offset.initialize();var K=L.offsetParent,G=L,J=L.ownerDocument,A,F=J.documentElement,c=J.body;
G=(J=J.defaultView)?J.getComputedStyle(L,null):L.currentStyle;for(var w=L.offsetTop,s=L.offsetLeft;(L=L.parentNode)&&L!==c&&L!==F;
){if(ah.offset.supportsFixedPosition&&G.position==="fixed"){break}A=J?J.getComputedStyle(L,null):L.currentStyle;w-=L.scrollTop;
s-=L.scrollLeft;if(L===K){w+=L.offsetTop;s+=L.offsetLeft;if(ah.offset.doesNotAddBorder&&!(ah.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(L.nodeName))){w+=parseFloat(A.borderTopWidth)||0;
s+=parseFloat(A.borderLeftWidth)||0}G=K;K=L.offsetParent}if(ah.offset.subtractsBorderForOverflowNotVisible&&A.overflow!=="visible"){w+=parseFloat(A.borderTopWidth)||0;
s+=parseFloat(A.borderLeftWidth)||0}G=A}if(G.position==="relative"||G.position==="static"){w+=c.offsetTop;s+=c.offsetLeft
}if(ah.offset.supportsFixedPosition&&G.position==="fixed"){w+=Math.max(F.scrollTop,c.scrollTop);s+=Math.max(F.scrollLeft,c.scrollLeft)
}return{top:w,left:s}};ah.offset={initialize:function(){var s=M.body,c=M.createElement("div"),G,A,F,w=parseFloat(ah.curCSS(s,"marginTop",true))||0;
ah.extend(c.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"});c.innerHTML="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";
s.insertBefore(c,s.firstChild);G=c.firstChild;A=G.firstChild;F=G.nextSibling.firstChild.firstChild;this.doesNotAddBorder=A.offsetTop!==5;
this.doesAddBorderForTableAndCells=F.offsetTop===5;A.style.position="fixed";A.style.top="20px";this.supportsFixedPosition=A.offsetTop===20||A.offsetTop===15;
A.style.position=A.style.top="";G.style.overflow="hidden";G.style.position="relative";this.subtractsBorderForOverflowNotVisible=A.offsetTop===-5;
this.doesNotIncludeMarginInBodyOffset=s.offsetTop!==w;s.removeChild(c);ah.offset.initialize=ah.noop},bodyOffset:function(s){var c=s.offsetTop,w=s.offsetLeft;
ah.offset.initialize();if(ah.offset.doesNotIncludeMarginInBodyOffset){c+=parseFloat(ah.curCSS(s,"marginTop",true))||0;w+=parseFloat(ah.curCSS(s,"marginLeft",true))||0
}return{top:c,left:w}},setOffset:function(s,c,J){if(/static/.test(ah.curCSS(s,"position"))){s.style.position="relative"}var F=ah(s),G=F.offset(),w=parseInt(ah.curCSS(s,"top",true),10)||0,A=parseInt(ah.curCSS(s,"left",true),10)||0;
if(ah.isFunction(c)){c=c.call(s,J,G)}J={top:c.top-G.top+w,left:c.left-G.left+A};"using" in c?c.using.call(s,J):F.css(J)}};
ah.fn.extend({position:function(){if(!this[0]){return null}var s=this[0],c=this.offsetParent(),A=this.offset(),w=/^body|html$/i.test(c[0].nodeName)?{top:0,left:0}:c.offset();
A.top-=parseFloat(ah.curCSS(s,"marginTop",true))||0;A.left-=parseFloat(ah.curCSS(s,"marginLeft",true))||0;w.top+=parseFloat(ah.curCSS(c[0],"borderTopWidth",true))||0;
w.left+=parseFloat(ah.curCSS(c[0],"borderLeftWidth",true))||0;return{top:A.top-w.top,left:A.left-w.left}},offsetParent:function(){return this.map(function(){for(var c=this.offsetParent||M.body;
c&&!/^body|html$/i.test(c.nodeName)&&ah.css(c,"position")==="static";){c=c.offsetParent}return c})}});ah.each(["Left","Top"],function(s,c){var w="scroll"+c;
ah.fn[w]=function(F){var G=this[0],A;if(!G){return null}if(F!==I){return this.each(function(){if(A=o(this)){A.scrollTo(!s?F:ah(A).scrollLeft(),s?F:ah(A).scrollTop())
}else{this[w]=F}})}else{return(A=o(G))?"pageXOffset" in A?A[s?"pageYOffset":"pageXOffset"]:ah.support.boxModel&&A.document.documentElement[w]||A.document.body[w]:G[w]
}}});ah.each(["Height","Width"],function(s,c){var w=c.toLowerCase();ah.fn["inner"+c]=function(){return this[0]?ah.css(this[0],w,false,"padding"):null
};ah.fn["outer"+c]=function(A){return this[0]?ah.css(this[0],w,false,A?"margin":"border"):null};ah.fn[w]=function(A){var F=this[0];
if(!F){return A==null?null:this}if(ah.isFunction(A)){return this.each(function(G){var J=ah(this);J[w](A.call(this,G,J[w]()))
})}return"scrollTo" in F&&F.document?F.document.compatMode==="CSS1Compat"&&F.document.documentElement["client"+c]||F.document.body["client"+c]:F.nodeType===9?Math.max(F.documentElement["client"+c],F.body["scroll"+c],F.documentElement["scroll"+c],F.body["offset"+c],F.documentElement["offset"+c]):A===I?ah.css(F,w):this.css(w,typeof A==="string"?A:A+"px")
}});aO.jQuery=aO.$=ah})(window);(function(f){var e=["DOMMouseScroll","mousewheel"];f.event.special.mousewheel={setup:function(){if(this.addEventListener){for(var a=e.length;
a;){this.addEventListener(e[--a],d,false)}}else{this.onmousewheel=d}},teardown:function(){if(this.removeEventListener){for(var a=e.length;
a;){this.removeEventListener(e[--a],d,false)}}else{this.onmousewheel=null}}};f.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")
},unmousewheel:function(a){return this.unbind("mousewheel",a)}});function d(b){var k=b||window.event,l=[].slice.call(arguments,1),a=0,c=true,m=0,n=0;
b=f.event.fix(k);b.type="mousewheel";if(b.wheelDelta){a=b.wheelDelta/120}if(b.detail){a=-b.detail/3}n=a;if(k.axis!==undefined&&k.axis===k.HORIZONTAL_AXIS){n=0;
m=-1*a}if(k.wheelDeltaY!==undefined){n=k.wheelDeltaY/120}if(k.wheelDeltaX!==undefined){m=-1*k.wheelDeltaX/120}l.unshift(b,a,m,n);
return f.event.handle.apply(this,l)}})(jQuery);/*!
* jQuery UI 1.8.6
*
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI
*/
(function(a,c){a.ui=a.ui||{};
if(a.ui.version){return}a.extend(a.ui,{version:"1.8.6",keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});
a.fn.extend({_focus:a.fn.focus,focus:function(d,e){return typeof d==="number"?this.each(function(){var f=this;setTimeout(function(){a(f).focus();
if(e){e.call(f)}},d)}):this._focus.apply(this,arguments)},scrollParent:function(){var d;if((a.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){d=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test(a.curCSS(this,"position",1))&&(/(auto|scroll)/).test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))
}).eq(0)}else{d=this.parents().filter(function(){return(/(auto|scroll)/).test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))
}).eq(0)}return(/fixed/).test(this.css("position"))||!d.length?a(document):d},zIndex:function(g){if(g!==c){return this.css("zIndex",g)
}if(this.length){var e=a(this[0]),d,f;while(e.length&&e[0]!==document){d=e.css("position");if(d==="absolute"||d==="relative"||d==="fixed"){f=parseInt(e.css("zIndex"),10);
if(!isNaN(f)&&f!==0){return f}}e=e.parent()}}return 0},disableSelection:function(){return this.bind((a.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(d){d.preventDefault()
})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});a.each(["Width","Height"],function(f,d){var e=d==="Width"?["Left","Right"]:["Top","Bottom"],g=d.toLowerCase(),j={innerWidth:a.fn.innerWidth,innerHeight:a.fn.innerHeight,outerWidth:a.fn.outerWidth,outerHeight:a.fn.outerHeight};
function h(l,k,i,m){a.each(e,function(){k-=parseFloat(a.curCSS(l,"padding"+this,true))||0;if(i){k-=parseFloat(a.curCSS(l,"border"+this+"Width",true))||0
}if(m){k-=parseFloat(a.curCSS(l,"margin"+this,true))||0}});return k}a.fn["inner"+d]=function(i){if(i===c){return j["inner"+d].call(this)
}return this.each(function(){a(this).css(g,h(this,i)+"px")})};a.fn["outer"+d]=function(i,k){if(typeof i!=="number"){return j["outer"+d].call(this,i)
}return this.each(function(){a(this).css(g,h(this,i,true,k)+"px")})}});function b(d){return !a(d).parents().andSelf().filter(function(){return a.curCSS(this,"visibility")==="hidden"||a.expr.filters.hidden(this)
}).length}a.extend(a.expr[":"],{data:function(f,e,d){return !!a.data(f,d[3])},focusable:function(f){var i=f.nodeName.toLowerCase(),d=a.attr(f,"tabindex");
if("area"===i){var h=f.parentNode,g=h.name,e;if(!f.href||!g||h.nodeName.toLowerCase()!=="map"){return false}e=a("img[usemap=#"+g+"]")[0];
return !!e&&b(e)}return(/input|select|textarea|button|object/.test(i)?!f.disabled:"a"==i?f.href||!isNaN(d):!isNaN(d))&&b(f)
},tabbable:function(e){var d=a.attr(e,"tabindex");return(isNaN(d)||d>=0)&&a(e).is(":focusable")}});a(function(){var d=document.body,e=d.appendChild(e=document.createElement("div"));
a.extend(e.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});a.support.minHeight=e.offsetHeight===100;a.support.selectstart="onselectstart" in e;
d.removeChild(e).style.display="none"});a.extend(a.ui,{plugin:{add:function(e,f,h){var g=a.ui[e].prototype;for(var d in h){g.plugins[d]=g.plugins[d]||[];
g.plugins[d].push([f,h[d]])}},call:function(d,f,e){var h=d.plugins[f];if(!h||!d.element[0].parentNode){return}for(var g=0;
g<h.length;g++){if(d.options[h[g][0]]){h[g][1].apply(d.element,e)}}}},contains:function(e,d){return document.compareDocumentPosition?e.compareDocumentPosition(d)&16:e!==d&&e.contains(d)
},hasScroll:function(g,e){if(a(g).css("overflow")==="hidden"){return false}var d=(e&&e==="left")?"scrollLeft":"scrollTop",f=false;
if(g[d]>0){return true}g[d]=1;f=(g[d]>0);g[d]=0;return f},isOverAxis:function(e,d,f){return(e>d)&&(e<(d+f))},isOver:function(i,e,h,g,d,f){return a.ui.isOverAxis(i,h,d)&&a.ui.isOverAxis(e,g,f)
}})})(jQuery);
/*!
* jQuery UI Widget 1.8.6
*
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Widget
*/
(function(b,d){if(b.cleanData){var c=b.cleanData;
b.cleanData=function(e){for(var f=0,g;(g=e[f])!=null;f++){b(g).triggerHandler("remove")}c(e)}}else{var a=b.fn.remove;b.fn.remove=function(e,f){return this.each(function(){if(!f){if(!e||b.filter(e,[this]).length){b("*",this).add([this]).each(function(){b(this).triggerHandler("remove")
})}}return a.call(b(this),e,f)})}}b.widget=function(f,h,e){var g=f.split(".")[0],j;f=f.split(".")[1];j=g+"-"+f;if(!e){e=h;
h=b.Widget}b.expr[":"][j]=function(k){return !!b.data(k,f)};b[g]=b[g]||{};b[g][f]=function(k,l){if(arguments.length){this._createWidget(k,l)
}};var i=new h();i.options=b.extend(true,{},i.options);b[g][f].prototype=b.extend(true,i,{namespace:g,widgetName:f,widgetEventPrefix:b[g][f].prototype.widgetEventPrefix||f,widgetBaseClass:j},e);
b.widget.bridge(f,b[g][f])};b.widget.bridge=function(f,e){b.fn[f]=function(i){var g=typeof i==="string",h=Array.prototype.slice.call(arguments,1),j=this;
i=!g&&h.length?b.extend.apply(null,[true,i].concat(h)):i;if(g&&i.charAt(0)==="_"){return j}if(g){this.each(function(){var k=b.data(this,f),l=k&&b.isFunction(k[i])?k[i].apply(k,h):k;
if(l!==k&&l!==d){j=l;return false}})}else{this.each(function(){var k=b.data(this,f);if(k){k.option(i||{})._init()}else{b.data(this,f,new e(i,this))
}})}return j}};b.Widget=function(e,f){if(arguments.length){this._createWidget(e,f)}};b.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(f,g){b.data(g,this.widgetName,this);
this.element=b(g);this.options=b.extend(true,{},this.options,this._getCreateOptions(),f);var e=this;this.element.bind("remove."+this.widgetName,function(){e.destroy()
});this._create();this._trigger("create");this._init()},_getCreateOptions:function(){return b.metadata&&b.metadata.get(this.element[0])[this.widgetName]
},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);
this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")
},widget:function(){return this.element},option:function(f,g){var e=f;if(arguments.length===0){return b.extend({},this.options)
}if(typeof f==="string"){if(g===d){return this.options[f]}e={};e[f]=g}this._setOptions(e);return this},_setOptions:function(f){var e=this;
b.each(f,function(g,h){e._setOption(g,h)});return this},_setOption:function(e,f){this.options[e]=f;if(e==="disabled"){this.widget()[f?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",f)
}return this},enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)
},_trigger:function(f,g,h){var k=this.options[f];g=b.Event(g);g.type=(f===this.widgetEventPrefix?f:this.widgetEventPrefix+f).toLowerCase();
h=h||{};if(g.originalEvent){for(var e=b.event.props.length,j;e;){j=b.event.props[--e];g[j]=g.originalEvent[j]}}this.element.trigger(g,h);
return !(b.isFunction(k)&&k.call(this.element[0],g,h)===false||g.isDefaultPrevented())}}})(jQuery);
/*!
* jQuery UI Mouse 1.8.6
*
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Mouse
*
* Depends:
*	jquery.ui.widget.js
*/
(function(a,b){a.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var c=this;
this.element.bind("mousedown."+this.widgetName,function(d){return c._mouseDown(d)}).bind("click."+this.widgetName,function(d){if(c._preventClickEvent){c._preventClickEvent=false;
d.stopImmediatePropagation();return false}});this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName)
},_mouseDown:function(e){e.originalEvent=e.originalEvent||{};if(e.originalEvent.mouseHandled){return}(this._mouseStarted&&this._mouseUp(e));
this._mouseDownEvent=e;var d=this,f=(e.which==1),c=(typeof this.options.cancel=="string"?a(e.target).parents().add(e.target).filter(this.options.cancel).length:false);
if(!f||c||!this._mouseCapture(e)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){d.mouseDelayMet=true
},this.options.delay)}if(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)){this._mouseStarted=(this._mouseStart(e)!==false);
if(!this._mouseStarted){e.preventDefault();return true}}this._mouseMoveDelegate=function(g){return d._mouseMove(g)};this._mouseUpDelegate=function(g){return d._mouseUp(g)
};a(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);
e.preventDefault();e.originalEvent.mouseHandled=true;return true},_mouseMove:function(c){if(a.browser.msie&&!(document.documentMode>=9)&&!c.button){return this._mouseUp(c)
}if(this._mouseStarted){this._mouseDrag(c);return c.preventDefault()}if(this._mouseDistanceMet(c)&&this._mouseDelayMet(c)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,c)!==false);
(this._mouseStarted?this._mouseDrag(c):this._mouseUp(c))}return !this._mouseStarted},_mouseUp:function(c){a(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);
if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=(c.target==this._mouseDownEvent.target);this._mouseStop(c)
}return false},_mouseDistanceMet:function(c){return(Math.max(Math.abs(this._mouseDownEvent.pageX-c.pageX),Math.abs(this._mouseDownEvent.pageY-c.pageY))>=this.options.distance)
},_mouseDelayMet:function(c){return this.mouseDelayMet},_mouseStart:function(c){},_mouseDrag:function(c){},_mouseStop:function(c){},_mouseCapture:function(c){return true
}})})(jQuery);(function(f,g){f.ui=f.ui||{};var d=/left|center|right/,e=/top|center|bottom/,a="center",b=f.fn.position,c=f.fn.offset;
f.fn.position=function(i){if(!i||!i.of){return b.apply(this,arguments)}i=f.extend({},i);var m=f(i.of),l=m[0],o=(i.collision||"flip").split(" "),n=i.offset?i.offset.split(" "):[0,0],k,h,j;
if(l.nodeType===9){k=m.width();h=m.height();j={top:0,left:0}}else{if(l.setTimeout){k=m.width();h=m.height();j={top:m.scrollTop(),left:m.scrollLeft()}
}else{if(l.preventDefault){i.at="left top";k=h=0;j={top:i.of.pageY,left:i.of.pageX}}else{k=m.outerWidth();h=m.outerHeight();
j=m.offset()}}}f.each(["my","at"],function(){var p=(i[this]||"").split(" ");if(p.length===1){p=d.test(p[0])?p.concat([a]):e.test(p[0])?[a].concat(p):[a,a]
}p[0]=d.test(p[0])?p[0]:a;p[1]=e.test(p[1])?p[1]:a;i[this]=p});if(o.length===1){o[1]=o[0]}n[0]=parseInt(n[0],10)||0;if(n.length===1){n[1]=n[0]
}n[1]=parseInt(n[1],10)||0;if(i.at[0]==="right"){j.left+=k}else{if(i.at[0]===a){j.left+=k/2}}if(i.at[1]==="bottom"){j.top+=h
}else{if(i.at[1]===a){j.top+=h/2}}j.left+=n[0];j.top+=n[1];return this.each(function(){var s=f(this),v=s.outerWidth(),r=s.outerHeight(),u=parseInt(f.curCSS(this,"marginLeft",true))||0,q=parseInt(f.curCSS(this,"marginTop",true))||0,x=v+u+parseInt(f.curCSS(this,"marginRight",true))||0,y=r+q+parseInt(f.curCSS(this,"marginBottom",true))||0,w=f.extend({},j),p;
if(i.my[0]==="right"){w.left-=v}else{if(i.my[0]===a){w.left-=v/2}}if(i.my[1]==="bottom"){w.top-=r}else{if(i.my[1]===a){w.top-=r/2
}}w.left=parseInt(w.left);w.top=parseInt(w.top);p={left:w.left-u,top:w.top-q};f.each(["left","top"],function(A,z){if(f.ui.position[o[A]]){f.ui.position[o[A]][z](w,{targetWidth:k,targetHeight:h,elemWidth:v,elemHeight:r,collisionPosition:p,collisionWidth:x,collisionHeight:y,offset:n,my:i.my,at:i.at})
}});if(f.fn.bgiframe){s.bgiframe()}s.offset(f.extend(w,{using:i.using}))})};f.ui.position={fit:{left:function(h,i){var k=f(window),j=i.collisionPosition.left+i.collisionWidth-k.width()-k.scrollLeft();
h.left=j>0?h.left-j:Math.max(h.left-i.collisionPosition.left,h.left)},top:function(h,i){var k=f(window),j=i.collisionPosition.top+i.collisionHeight-k.height()-k.scrollTop();
h.top=j>0?h.top-j:Math.max(h.top-i.collisionPosition.top,h.top)}},flip:{left:function(i,k){if(k.at[0]===a){return}var m=f(window),l=k.collisionPosition.left+k.collisionWidth-m.width()-m.scrollLeft(),h=k.my[0]==="left"?-k.elemWidth:k.my[0]==="right"?k.elemWidth:0,j=k.at[0]==="left"?k.targetWidth:-k.targetWidth,n=-2*k.offset[0];
i.left+=k.collisionPosition.left<0?h+j+n:l>0?h+j+n:0},top:function(i,k){if(k.at[1]===a){return}var m=f(window),l=k.collisionPosition.top+k.collisionHeight-m.height()-m.scrollTop(),h=k.my[1]==="top"?-k.elemHeight:k.my[1]==="bottom"?k.elemHeight:0,j=k.at[1]==="top"?k.targetHeight:-k.targetHeight,n=-2*k.offset[1];
i.top+=k.collisionPosition.top<0?h+j+n:l>0?h+j+n:0}}};if(!f.offset.setOffset){f.offset.setOffset=function(l,i){if(/static/.test(f.curCSS(l,"position"))){l.style.position="relative"
}var k=f(l),n=k.offset(),h=parseInt(f.curCSS(l,"top",true),10)||0,m=parseInt(f.curCSS(l,"left",true),10)||0,j={top:(i.top-n.top)+h,left:(i.left-n.left)+m};
if("using" in i){i.using.call(l,j)}else{k.css(j)}};f.fn.offset=function(h){var i=this[0];if(!i||!i.ownerDocument){return null
}if(h){return this.each(function(){f.offset.setOffset(this,h)})}return c.call(this)}}}(jQuery));(function(a,b){a.widget("ui.draggable",a.ui.mouse,{widgetEventPrefix:"drag",options:{addClasses:true,appendTo:"parent",axis:false,connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false},_create:function(){if(this.options.helper=="original"&&!(/^(?:r|a|f)/).test(this.element.css("position"))){this.element[0].style.position="relative"
}(this.options.addClasses&&this.element.addClass("ui-draggable"));(this.options.disabled&&this.element.addClass("ui-draggable-disabled"));
this._mouseInit()},destroy:function(){if(!this.element.data("draggable")){return}this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");
this._mouseDestroy();return this},_mouseCapture:function(c){var d=this.options;if(this.helper||d.disabled||a(c.target).is(".ui-resizable-handle")){return false
}this.handle=this._getHandle(c);if(!this.handle){return false}return true},_mouseStart:function(c){var d=this.options;this.helper=this._createHelper(c);
this._cacheHelperProportions();if(a.ui.ddmanager){a.ui.ddmanager.current=this}this._cacheMargins();this.cssPosition=this.helper.css("position");
this.scrollParent=this.helper.scrollParent();this.offset=this.positionAbs=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};
a.extend(this.offset,{click:{left:c.pageX-this.offset.left,top:c.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});
this.originalPosition=this.position=this._generatePosition(c);this.originalPageX=c.pageX;this.originalPageY=c.pageY;(d.cursorAt&&this._adjustOffsetFromHelper(d.cursorAt));
if(d.containment){this._setContainment()}if(this._trigger("start",c)===false){this._clear();return false}this._cacheHelperProportions();
if(a.ui.ddmanager&&!d.dropBehaviour){a.ui.ddmanager.prepareOffsets(this,c)}this.helper.addClass("ui-draggable-dragging");
this._mouseDrag(c,true);return true},_mouseDrag:function(c,e){this.position=this._generatePosition(c);this.positionAbs=this._convertPositionTo("absolute");
if(!e){var d=this._uiHash();if(this._trigger("drag",c,d)===false){this._mouseUp({});return false}this.position=d.position
}if(!this.options.axis||this.options.axis!="y"){this.helper[0].style.left=this.position.left+"px"}if(!this.options.axis||this.options.axis!="x"){this.helper[0].style.top=this.position.top+"px"
}if(a.ui.ddmanager){a.ui.ddmanager.drag(this,c)}return false},_mouseStop:function(d){var e=false;if(a.ui.ddmanager&&!this.options.dropBehaviour){e=a.ui.ddmanager.drop(this,d)
}if(this.dropped){e=this.dropped;this.dropped=false}if(!this.element[0]||!this.element[0].parentNode){return false}if((this.options.revert=="invalid"&&!e)||(this.options.revert=="valid"&&e)||this.options.revert===true||(a.isFunction(this.options.revert)&&this.options.revert.call(this.element,e))){var c=this;
a(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){if(c._trigger("stop",d)!==false){c._clear()
}})}else{if(this._trigger("stop",d)!==false){this._clear()}}return false},cancel:function(){if(this.helper.is(".ui-draggable-dragging")){this._mouseUp({})
}else{this._clear()}return this},_getHandle:function(c){var d=!this.options.handle||!a(this.options.handle,this.element).length?true:false;
a(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==c.target){d=true}});return d},_createHelper:function(d){var e=this.options;
var c=a.isFunction(e.helper)?a(e.helper.apply(this.element[0],[d])):(e.helper=="clone"?this.element.clone():this.element);
if(!c.parents("body").length){c.appendTo((e.appendTo=="parent"?this.element[0].parentNode:e.appendTo))}if(c[0]!=this.element[0]&&!(/(fixed|absolute)/).test(c.css("position"))){c.css("position","absolute")
}return c},_adjustOffsetFromHelper:function(c){if(typeof c=="string"){c=c.split(" ")}if(a.isArray(c)){c={left:+c[0],top:+c[1]||0}
}if("left" in c){this.offset.click.left=c.left+this.margins.left}if("right" in c){this.offset.click.left=this.helperProportions.width-c.right+this.margins.left
}if("top" in c){this.offset.click.top=c.top+this.margins.top}if("bottom" in c){this.offset.click.top=this.helperProportions.height-c.bottom+this.margins.top
}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var c=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0])){c.left+=this.scrollParent.scrollLeft();
c.top+=this.scrollParent.scrollTop()}if((this.offsetParent[0]==document.body)||(this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&a.browser.msie)){c={top:0,left:0}
}return{top:c.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:c.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}
},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var c=this.element.position();return{top:c.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:c.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}
}else{return{top:0,left:0}}},_cacheMargins:function(){this.margins={left:(parseInt(this.element.css("marginLeft"),10)||0),top:(parseInt(this.element.css("marginTop"),10)||0)}
},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}
},_setContainment:function(){var f=this.options;if(f.containment=="parent"){f.containment=this.helper[0].parentNode}if(f.containment=="document"||f.containment=="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,a(f.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(a(f.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]
}if(!(/^(document|window|parent)$/).test(f.containment)&&f.containment.constructor!=Array){var d=a(f.containment)[0];if(!d){return
}var e=a(f.containment).offset();var c=(a(d).css("overflow")!="hidden");this.containment=[e.left+(parseInt(a(d).css("borderLeftWidth"),10)||0)+(parseInt(a(d).css("paddingLeft"),10)||0)-this.margins.left,e.top+(parseInt(a(d).css("borderTopWidth"),10)||0)+(parseInt(a(d).css("paddingTop"),10)||0)-this.margins.top,e.left+(c?Math.max(d.scrollWidth,d.offsetWidth):d.offsetWidth)-(parseInt(a(d).css("borderLeftWidth"),10)||0)-(parseInt(a(d).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,e.top+(c?Math.max(d.scrollHeight,d.offsetHeight):d.offsetHeight)-(parseInt(a(d).css("borderTopWidth"),10)||0)-(parseInt(a(d).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]
}else{if(f.containment.constructor==Array){this.containment=f.containment}}},_convertPositionTo:function(g,i){if(!i){i=this.position
}var e=g=="absolute"?1:-1;var f=this.options,c=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,h=(/(html|body)/i).test(c[0].tagName);
return{top:(i.top+this.offset.relative.top*e+this.offset.parent.top*e-(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(h?0:c.scrollTop()))*e)),left:(i.left+this.offset.relative.left*e+this.offset.parent.left*e-(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():h?0:c.scrollLeft())*e))}
},_generatePosition:function(f){var i=this.options,c=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,j=(/(html|body)/i).test(c[0].tagName);
var e=f.pageX;var d=f.pageY;if(this.originalPosition){if(this.containment){if(f.pageX-this.offset.click.left<this.containment[0]){e=this.containment[0]+this.offset.click.left
}if(f.pageY-this.offset.click.top<this.containment[1]){d=this.containment[1]+this.offset.click.top}if(f.pageX-this.offset.click.left>this.containment[2]){e=this.containment[2]+this.offset.click.left
}if(f.pageY-this.offset.click.top>this.containment[3]){d=this.containment[3]+this.offset.click.top}}if(i.grid){var h=this.originalPageY+Math.round((d-this.originalPageY)/i.grid[1])*i.grid[1];
d=this.containment?(!(h-this.offset.click.top<this.containment[1]||h-this.offset.click.top>this.containment[3])?h:(!(h-this.offset.click.top<this.containment[1])?h-i.grid[1]:h+i.grid[1])):h;
var g=this.originalPageX+Math.round((e-this.originalPageX)/i.grid[0])*i.grid[0];e=this.containment?(!(g-this.offset.click.left<this.containment[0]||g-this.offset.click.left>this.containment[2])?g:(!(g-this.offset.click.left<this.containment[0])?g-i.grid[0]:g+i.grid[0])):g
}}return{top:(d-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(j?0:c.scrollTop())))),left:(e-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():j?0:c.scrollLeft())))}
},_clear:function(){this.helper.removeClass("ui-draggable-dragging");if(this.helper[0]!=this.element[0]&&!this.cancelHelperRemoval){this.helper.remove()
}this.helper=null;this.cancelHelperRemoval=false},_trigger:function(c,d,e){e=e||this._uiHash();a.ui.plugin.call(this,c,[d,e]);
if(c=="drag"){this.positionAbs=this._convertPositionTo("absolute")}return a.Widget.prototype._trigger.call(this,c,d,e)},plugins:{},_uiHash:function(c){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}
}});a.extend(a.ui.draggable,{version:"1.8.6"});a.ui.plugin.add("draggable","connectToSortable",{start:function(d,f){var e=a(this).data("draggable"),g=e.options,c=a.extend({},f,{item:e.element});
e.sortables=[];a(g.connectToSortable).each(function(){var h=a.data(this,"sortable");if(h&&!h.options.disabled){e.sortables.push({instance:h,shouldRevert:h.options.revert});
h._refreshItems();h._trigger("activate",d,c)}})},stop:function(d,f){var e=a(this).data("draggable"),c=a.extend({},f,{item:e.element});
a.each(e.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;e.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;
if(this.shouldRevert){this.instance.options.revert=true}this.instance._mouseStop(d);this.instance.options.helper=this.instance.options._helper;
if(e.options.helper=="original"){this.instance.currentItem.css({top:"auto",left:"auto"})}}else{this.instance.cancelHelperRemoval=false;
this.instance._trigger("deactivate",d,c)}})},drag:function(d,g){var f=a(this).data("draggable"),c=this;var e=function(j){var p=this.offset.click.top,n=this.offset.click.left;
var h=this.positionAbs.top,l=this.positionAbs.left;var k=j.height,m=j.width;var q=j.top,i=j.left;return a.ui.isOver(h+p,l+n,q,i,k,m)
};a.each(f.sortables,function(h){this.instance.positionAbs=f.positionAbs;this.instance.helperProportions=f.helperProportions;
this.instance.offset.click=f.offset.click;if(this.instance._intersectsWith(this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=1;
this.instance.currentItem=a(c).clone().appendTo(this.instance.element).data("sortable-item",true);this.instance.options._helper=this.instance.options.helper;
this.instance.options.helper=function(){return g.helper[0]};d.target=this.instance.currentItem[0];this.instance._mouseCapture(d,true);
this.instance._mouseStart(d,true,true);this.instance.offset.click.top=f.offset.click.top;this.instance.offset.click.left=f.offset.click.left;
this.instance.offset.parent.left-=f.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=f.offset.parent.top-this.instance.offset.parent.top;
f._trigger("toSortable",d);f.dropped=this.instance.element;f.currentItem=f.element;this.instance.fromOutside=f}if(this.instance.currentItem){this.instance._mouseDrag(d)
}}else{if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;
this.instance._trigger("out",d,this.instance._uiHash(this.instance));this.instance._mouseStop(d,true);this.instance.options.helper=this.instance.options._helper;
this.instance.currentItem.remove();if(this.instance.placeholder){this.instance.placeholder.remove()}f._trigger("fromSortable",d);
f.dropped=false}}})}});a.ui.plugin.add("draggable","cursor",{start:function(d,e){var c=a("body"),f=a(this).data("draggable").options;
if(c.css("cursor")){f._cursor=c.css("cursor")}c.css("cursor",f.cursor)},stop:function(c,d){var e=a(this).data("draggable").options;
if(e._cursor){a("body").css("cursor",e._cursor)}}});a.ui.plugin.add("draggable","iframeFix",{start:function(c,d){var e=a(this).data("draggable").options;
a(e.iframeFix===true?"iframe":e.iframeFix).each(function(){a('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1000}).css(a(this).offset()).appendTo("body")
})},stop:function(c,d){a("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)})}});a.ui.plugin.add("draggable","opacity",{start:function(d,e){var c=a(e.helper),f=a(this).data("draggable").options;
if(c.css("opacity")){f._opacity=c.css("opacity")}c.css("opacity",f.opacity)},stop:function(c,d){var e=a(this).data("draggable").options;
if(e._opacity){a(d.helper).css("opacity",e._opacity)}}});a.ui.plugin.add("draggable","scroll",{start:function(d,e){var c=a(this).data("draggable");
if(c.scrollParent[0]!=document&&c.scrollParent[0].tagName!="HTML"){c.overflowOffset=c.scrollParent.offset()}},drag:function(e,f){var d=a(this).data("draggable"),g=d.options,c=false;
if(d.scrollParent[0]!=document&&d.scrollParent[0].tagName!="HTML"){if(!g.axis||g.axis!="x"){if((d.overflowOffset.top+d.scrollParent[0].offsetHeight)-e.pageY<g.scrollSensitivity){d.scrollParent[0].scrollTop=c=d.scrollParent[0].scrollTop+g.scrollSpeed
}else{if(e.pageY-d.overflowOffset.top<g.scrollSensitivity){d.scrollParent[0].scrollTop=c=d.scrollParent[0].scrollTop-g.scrollSpeed
}}}if(!g.axis||g.axis!="y"){if((d.overflowOffset.left+d.scrollParent[0].offsetWidth)-e.pageX<g.scrollSensitivity){d.scrollParent[0].scrollLeft=c=d.scrollParent[0].scrollLeft+g.scrollSpeed
}else{if(e.pageX-d.overflowOffset.left<g.scrollSensitivity){d.scrollParent[0].scrollLeft=c=d.scrollParent[0].scrollLeft-g.scrollSpeed
}}}}else{if(!g.axis||g.axis!="x"){if(e.pageY-a(document).scrollTop()<g.scrollSensitivity){c=a(document).scrollTop(a(document).scrollTop()-g.scrollSpeed)
}else{if(a(window).height()-(e.pageY-a(document).scrollTop())<g.scrollSensitivity){c=a(document).scrollTop(a(document).scrollTop()+g.scrollSpeed)
}}}if(!g.axis||g.axis!="y"){if(e.pageX-a(document).scrollLeft()<g.scrollSensitivity){c=a(document).scrollLeft(a(document).scrollLeft()-g.scrollSpeed)
}else{if(a(window).width()-(e.pageX-a(document).scrollLeft())<g.scrollSensitivity){c=a(document).scrollLeft(a(document).scrollLeft()+g.scrollSpeed)
}}}}if(c!==false&&a.ui.ddmanager&&!g.dropBehaviour){a.ui.ddmanager.prepareOffsets(d,e)}}});a.ui.plugin.add("draggable","snap",{start:function(d,e){var c=a(this).data("draggable"),f=c.options;
c.snapElements=[];a(f.snap.constructor!=String?(f.snap.items||":data(draggable)"):f.snap).each(function(){var h=a(this);var g=h.offset();
if(this!=c.element[0]){c.snapElements.push({item:this,width:h.outerWidth(),height:h.outerHeight(),top:g.top,left:g.left})
}})},drag:function(u,p){var g=a(this).data("draggable"),q=g.options;var y=q.snapTolerance;var x=p.offset.left,w=x+g.helperProportions.width,f=p.offset.top,e=f+g.helperProportions.height;
for(var v=g.snapElements.length-1;v>=0;v--){var s=g.snapElements[v].left,n=s+g.snapElements[v].width,m=g.snapElements[v].top,A=m+g.snapElements[v].height;
if(!((s-y<x&&x<n+y&&m-y<f&&f<A+y)||(s-y<x&&x<n+y&&m-y<e&&e<A+y)||(s-y<w&&w<n+y&&m-y<f&&f<A+y)||(s-y<w&&w<n+y&&m-y<e&&e<A+y))){if(g.snapElements[v].snapping){(g.options.snap.release&&g.options.snap.release.call(g.element,u,a.extend(g._uiHash(),{snapItem:g.snapElements[v].item})))
}g.snapElements[v].snapping=false;continue}if(q.snapMode!="inner"){var c=Math.abs(m-e)<=y;var z=Math.abs(A-f)<=y;var j=Math.abs(s-w)<=y;
var k=Math.abs(n-x)<=y;if(c){p.position.top=g._convertPositionTo("relative",{top:m-g.helperProportions.height,left:0}).top-g.margins.top
}if(z){p.position.top=g._convertPositionTo("relative",{top:A,left:0}).top-g.margins.top}if(j){p.position.left=g._convertPositionTo("relative",{top:0,left:s-g.helperProportions.width}).left-g.margins.left
}if(k){p.position.left=g._convertPositionTo("relative",{top:0,left:n}).left-g.margins.left}}var h=(c||z||j||k);if(q.snapMode!="outer"){var c=Math.abs(m-f)<=y;
var z=Math.abs(A-e)<=y;var j=Math.abs(s-x)<=y;var k=Math.abs(n-w)<=y;if(c){p.position.top=g._convertPositionTo("relative",{top:m,left:0}).top-g.margins.top
}if(z){p.position.top=g._convertPositionTo("relative",{top:A-g.helperProportions.height,left:0}).top-g.margins.top}if(j){p.position.left=g._convertPositionTo("relative",{top:0,left:s}).left-g.margins.left
}if(k){p.position.left=g._convertPositionTo("relative",{top:0,left:n-g.helperProportions.width}).left-g.margins.left}}if(!g.snapElements[v].snapping&&(c||z||j||k||h)){(g.options.snap.snap&&g.options.snap.snap.call(g.element,u,a.extend(g._uiHash(),{snapItem:g.snapElements[v].item})))
}g.snapElements[v].snapping=(c||z||j||k||h)}}});a.ui.plugin.add("draggable","stack",{start:function(d,e){var g=a(this).data("draggable").options;
var f=a.makeArray(a(g.stack)).sort(function(i,h){return(parseInt(a(i).css("zIndex"),10)||0)-(parseInt(a(h).css("zIndex"),10)||0)
});if(!f.length){return}var c=parseInt(f[0].style.zIndex)||0;a(f).each(function(h){this.style.zIndex=c+h});this[0].style.zIndex=c+f.length
}});a.ui.plugin.add("draggable","zIndex",{start:function(d,e){var c=a(e.helper),f=a(this).data("draggable").options;if(c.css("zIndex")){f._zIndex=c.css("zIndex")
}c.css("zIndex",f.zIndex)},stop:function(c,d){var e=a(this).data("draggable").options;if(e._zIndex){a(d.helper).css("zIndex",e._zIndex)
}}})})(jQuery);(function(a,b){a.widget("ui.droppable",{widgetEventPrefix:"drop",options:{accept:"*",activeClass:false,addClasses:true,greedy:false,hoverClass:false,scope:"default",tolerance:"intersect"},_create:function(){var d=this.options,c=d.accept;
this.isover=0;this.isout=1;this.accept=a.isFunction(c)?c:function(e){return e.is(c)};this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};
a.ui.ddmanager.droppables[d.scope]=a.ui.ddmanager.droppables[d.scope]||[];a.ui.ddmanager.droppables[d.scope].push(this);(d.addClasses&&this.element.addClass("ui-droppable"))
},destroy:function(){var c=a.ui.ddmanager.droppables[this.options.scope];for(var d=0;d<c.length;d++){if(c[d]==this){c.splice(d,1)
}}this.element.removeClass("ui-droppable ui-droppable-disabled").removeData("droppable").unbind(".droppable");return this
},_setOption:function(c,d){if(c=="accept"){this.accept=a.isFunction(d)?d:function(e){return e.is(d)}}a.Widget.prototype._setOption.apply(this,arguments)
},_activate:function(d){var c=a.ui.ddmanager.current;if(this.options.activeClass){this.element.addClass(this.options.activeClass)
}(c&&this._trigger("activate",d,this.ui(c)))},_deactivate:function(d){var c=a.ui.ddmanager.current;if(this.options.activeClass){this.element.removeClass(this.options.activeClass)
}(c&&this._trigger("deactivate",d,this.ui(c)))},_over:function(d){var c=a.ui.ddmanager.current;if(!c||(c.currentItem||c.element)[0]==this.element[0]){return
}if(this.accept.call(this.element[0],(c.currentItem||c.element))){if(this.options.hoverClass){this.element.addClass(this.options.hoverClass)
}this._trigger("over",d,this.ui(c))}},_out:function(d){var c=a.ui.ddmanager.current;if(!c||(c.currentItem||c.element)[0]==this.element[0]){return
}if(this.accept.call(this.element[0],(c.currentItem||c.element))){if(this.options.hoverClass){this.element.removeClass(this.options.hoverClass)
}this._trigger("out",d,this.ui(c))}},_drop:function(d,e){var c=e||a.ui.ddmanager.current;if(!c||(c.currentItem||c.element)[0]==this.element[0]){return false
}var f=false;this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function(){var g=a.data(this,"droppable");
if(g.options.greedy&&!g.options.disabled&&g.options.scope==c.options.scope&&g.accept.call(g.element[0],(c.currentItem||c.element))&&a.ui.intersect(c,a.extend(g,{offset:g.element.offset()}),g.options.tolerance)){f=true;
return false}});if(f){return false}if(this.accept.call(this.element[0],(c.currentItem||c.element))){if(this.options.activeClass){this.element.removeClass(this.options.activeClass)
}if(this.options.hoverClass){this.element.removeClass(this.options.hoverClass)}this._trigger("drop",d,this.ui(c));return this.element
}return false},ui:function(d){return{draggable:(d.currentItem||d.element),helper:d.helper,position:d.position,offset:d.positionAbs}
}});a.extend(a.ui.droppable,{version:"1.8.6"});a.ui.intersect=function(q,j,o){if(!j.offset){return false}var e=(q.positionAbs||q.position.absolute).left,d=e+q.helperProportions.width,n=(q.positionAbs||q.position.absolute).top,m=n+q.helperProportions.height;
var g=j.offset.left,c=g+j.proportions.width,p=j.offset.top,k=p+j.proportions.height;switch(o){case"fit":return(g<=e&&d<=c&&p<=n&&m<=k);
break;case"intersect":return(g<e+(q.helperProportions.width/2)&&d-(q.helperProportions.width/2)<c&&p<n+(q.helperProportions.height/2)&&m-(q.helperProportions.height/2)<k);
break;case"pointer":var h=((q.positionAbs||q.position.absolute).left+(q.clickOffset||q.offset.click).left),i=((q.positionAbs||q.position.absolute).top+(q.clickOffset||q.offset.click).top),f=a.ui.isOver(i,h,p,g,j.proportions.height,j.proportions.width);
return f;break;case"touch":return((n>=p&&n<=k)||(m>=p&&m<=k)||(n<p&&m>k))&&((e>=g&&e<=c)||(d>=g&&d<=c)||(e<g&&d>c));break;
default:return false;break}};a.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(f,h){var c=a.ui.ddmanager.droppables[f.options.scope]||[];
var g=h?h.type:null;var k=(f.currentItem||f.element).find(":data(droppable)").andSelf();droppablesLoop:for(var e=0;e<c.length;
e++){if(c[e].options.disabled||(f&&!c[e].accept.call(c[e].element[0],(f.currentItem||f.element)))){continue}for(var d=0;d<k.length;
d++){if(k[d]==c[e].element[0]){c[e].proportions.height=0;continue droppablesLoop}}c[e].visible=c[e].element.css("display")!="none";
if(!c[e].visible){continue}c[e].offset=c[e].element.offset();c[e].proportions={width:c[e].element[0].offsetWidth,height:c[e].element[0].offsetHeight};
if(g=="mousedown"){c[e]._activate.call(c[e],h)}}},drop:function(c,d){var e=false;a.each(a.ui.ddmanager.droppables[c.options.scope]||[],function(){if(!this.options){return
}if(!this.options.disabled&&this.visible&&a.ui.intersect(c,this,this.options.tolerance)){e=e||this._drop.call(this,d)}if(!this.options.disabled&&this.visible&&this.accept.call(this.element[0],(c.currentItem||c.element))){this.isout=1;
this.isover=0;this._deactivate.call(this,d)}});return e},drag:function(c,d){if(c.options.refreshPositions){a.ui.ddmanager.prepareOffsets(c,d)
}a.each(a.ui.ddmanager.droppables[c.options.scope]||[],function(){if(this.options.disabled||this.greedyChild||!this.visible){return
}var f=a.ui.intersect(c,this,this.options.tolerance);var h=!f&&this.isover==1?"isout":(f&&this.isover==0?"isover":null);if(!h){return
}var g;if(this.options.greedy){var e=this.element.parents(":data(droppable):eq(0)");if(e.length){g=a.data(e[0],"droppable");
g.greedyChild=(h=="isover"?1:0)}}if(g&&h=="isover"){g.isover=0;g.isout=1;g._out.call(g,d)}this[h]=1;this[h=="isout"?"isover":"isout"]=0;
this[h=="isover"?"_over":"_out"].call(this,d);if(g&&h=="isout"){g.isout=0;g.isover=1;g._over.call(g,d)}})}}})(jQuery);(function(c,d){c.widget("ui.resizable",c.ui.mouse,{widgetEventPrefix:"resize",options:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,containment:false,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1000},_create:function(){var f=this,k=this.options;
this.element.addClass("ui-resizable");c.extend(this,{_aspectRatio:!!(k.aspectRatio),aspectRatio:k.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:k.helper||k.ghost||k.animate?k.helper||"ui-resizable-helper":null});
if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)){if(/relative/.test(this.element.css("position"))&&c.browser.opera){this.element.css({position:"relative",top:"auto",left:"auto"})
}this.element.wrap(c('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")}));
this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});
this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle=this.originalElement.css("resize");
this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));
this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=k.handles||(!c(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"});
if(this.handles.constructor==String){if(this.handles=="all"){this.handles="n,e,s,w,se,sw,ne,nw"}var l=this.handles.split(",");
this.handles={};for(var g=0;g<l.length;g++){var j=c.trim(l[g]),e="ui-resizable-"+j;var h=c('<div class="ui-resizable-handle '+e+'"></div>');
if(/sw|se|ne|nw/.test(j)){h.css({zIndex:++k.zIndex})}if("se"==j){h.addClass("ui-icon ui-icon-gripsmall-diagonal-se")}this.handles[j]=".ui-resizable-"+j;
this.element.append(h)}}this._renderAxis=function(q){q=q||this.element;for(var n in this.handles){if(this.handles[n].constructor==String){this.handles[n]=c(this.handles[n],this.element).show()
}if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var o=c(this.handles[n],this.element),p=0;
p=/sw|ne|nw|se|n|s/.test(n)?o.outerHeight():o.outerWidth();var m=["padding",/ne|nw|n/.test(n)?"Top":/se|sw|s/.test(n)?"Bottom":/^e$/.test(n)?"Right":"Left"].join("");
q.css(m,p);this._proportionallyResize()}if(!c(this.handles[n]).length){continue}}};this._renderAxis(this.element);this._handles=c(".ui-resizable-handle",this.element).disableSelection();
this._handles.mouseover(function(){if(!f.resizing){if(this.className){var i=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)
}f.axis=i&&i[1]?i[1]:"se"}});if(k.autoHide){this._handles.hide();c(this.element).addClass("ui-resizable-autohide").hover(function(){c(this).removeClass("ui-resizable-autohide");
f._handles.show()},function(){if(!f.resizing){c(this).addClass("ui-resizable-autohide");f._handles.hide()}})}this._mouseInit()
},destroy:function(){this._mouseDestroy();var e=function(g){c(g).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()
};if(this.elementIsWrapper){e(this.element);var f=this.element;f.after(this.originalElement.css({position:f.css("position"),width:f.outerWidth(),height:f.outerHeight(),top:f.css("top"),left:f.css("left")})).remove()
}this.originalElement.css("resize",this.originalResizeStyle);e(this.originalElement);return this},_mouseCapture:function(f){var g=false;
for(var e in this.handles){if(c(this.handles[e])[0]==f.target){g=true}}return !this.options.disabled&&g},_mouseStart:function(g){var j=this.options,f=this.element.position(),e=this.element;
this.resizing=true;this.documentScroll={top:c(document).scrollTop(),left:c(document).scrollLeft()};if(e.is(".ui-draggable")||(/absolute/).test(e.css("position"))){e.css({position:"absolute",top:f.top,left:f.left})
}if(c.browser.opera&&(/relative/).test(e.css("position"))){e.css({position:"relative",top:"auto",left:"auto"})}this._renderProxy();
var k=b(this.helper.css("left")),h=b(this.helper.css("top"));if(j.containment){k+=c(j.containment).scrollLeft()||0;h+=c(j.containment).scrollTop()||0
}this.offset=this.helper.offset();this.position={left:k,top:h};this.size=this._helper?{width:e.outerWidth(),height:e.outerHeight()}:{width:e.width(),height:e.height()};
this.originalSize=this._helper?{width:e.outerWidth(),height:e.outerHeight()}:{width:e.width(),height:e.height()};this.originalPosition={left:k,top:h};
this.sizeDiff={width:e.outerWidth()-e.width(),height:e.outerHeight()-e.height()};this.originalMousePosition={left:g.pageX,top:g.pageY};
this.aspectRatio=(typeof j.aspectRatio=="number")?j.aspectRatio:((this.originalSize.width/this.originalSize.height)||1);var i=c(".ui-resizable-"+this.axis).css("cursor");
c("body").css("cursor",i=="auto"?this.axis+"-resize":i);e.addClass("ui-resizable-resizing");this._propagate("start",g);return true
},_mouseDrag:function(e){var h=this.helper,g=this.options,m={},q=this,j=this.originalMousePosition,n=this.axis;var r=(e.pageX-j.left)||0,p=(e.pageY-j.top)||0;
var i=this._change[n];if(!i){return false}var l=i.apply(this,[e,r,p]),k=c.browser.msie&&c.browser.version<7,f=this.sizeDiff;
if(this._aspectRatio||e.shiftKey){l=this._updateRatio(l,e)}l=this._respectSize(l,e);this._propagate("resize",e);h.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});
if(!this._helper&&this._proportionallyResizeElements.length){this._proportionallyResize()}this._updateCache(l);this._trigger("resize",e,this.ui());
return false},_mouseStop:function(h){this.resizing=false;var i=this.options,m=this;if(this._helper){var g=this._proportionallyResizeElements,e=g.length&&(/textarea/i).test(g[0].nodeName),f=e&&c.ui.hasScroll(g[0],"left")?0:m.sizeDiff.height,k=e?0:m.sizeDiff.width;
var n={width:(m.size.width-k),height:(m.size.height-f)},j=(parseInt(m.element.css("left"),10)+(m.position.left-m.originalPosition.left))||null,l=(parseInt(m.element.css("top"),10)+(m.position.top-m.originalPosition.top))||null;
if(!i.animate){this.element.css(c.extend(n,{top:l,left:j}))}m.helper.height(m.size.height);m.helper.width(m.size.width);if(this._helper&&!i.animate){this._proportionallyResize()
}}c("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",h);if(this._helper){this.helper.remove()
}return false},_updateCache:function(e){var f=this.options;this.offset=this.helper.offset();if(a(e.left)){this.position.left=e.left
}if(a(e.top)){this.position.top=e.top}if(a(e.height)){this.size.height=e.height}if(a(e.width)){this.size.width=e.width}},_updateRatio:function(h,g){var i=this.options,j=this.position,f=this.size,e=this.axis;
if(h.height){h.width=(f.height*this.aspectRatio)}else{if(h.width){h.height=(f.width/this.aspectRatio)}}if(e=="sw"){h.left=j.left+(f.width-h.width);
h.top=null}if(e=="nw"){h.top=j.top+(f.height-h.height);h.left=j.left+(f.width-h.width)}return h},_respectSize:function(l,g){var j=this.helper,i=this.options,r=this._aspectRatio||g.shiftKey,q=this.axis,u=a(l.width)&&i.maxWidth&&(i.maxWidth<l.width),m=a(l.height)&&i.maxHeight&&(i.maxHeight<l.height),h=a(l.width)&&i.minWidth&&(i.minWidth>l.width),s=a(l.height)&&i.minHeight&&(i.minHeight>l.height);
if(h){l.width=i.minWidth}if(s){l.height=i.minHeight}if(u){l.width=i.maxWidth}if(m){l.height=i.maxHeight}var f=this.originalPosition.left+this.originalSize.width,p=this.position.top+this.size.height;
var k=/sw|nw|w/.test(q),e=/nw|ne|n/.test(q);if(h&&k){l.left=f-i.minWidth}if(u&&k){l.left=f-i.maxWidth}if(s&&e){l.top=p-i.minHeight
}if(m&&e){l.top=p-i.maxHeight}var n=!l.width&&!l.height;if(n&&!l.left&&l.top){l.top=null}else{if(n&&!l.top&&l.left){l.left=null
}}return l},_proportionallyResize:function(){var k=this.options;if(!this._proportionallyResizeElements.length){return}var g=this.helper||this.element;
for(var f=0;f<this._proportionallyResizeElements.length;f++){var h=this._proportionallyResizeElements[f];if(!this.borderDif){var e=[h.css("borderTopWidth"),h.css("borderRightWidth"),h.css("borderBottomWidth"),h.css("borderLeftWidth")],j=[h.css("paddingTop"),h.css("paddingRight"),h.css("paddingBottom"),h.css("paddingLeft")];
this.borderDif=c.map(e,function(l,n){var m=parseInt(l,10)||0,o=parseInt(j[n],10)||0;return m+o})}if(c.browser.msie&&!(!(c(g).is(":hidden")||c(g).parents(":hidden").length))){continue
}h.css({height:(g.height()-this.borderDif[0]-this.borderDif[2])||0,width:(g.width()-this.borderDif[1]-this.borderDif[3])||0})
}},_renderProxy:function(){var f=this.element,i=this.options;this.elementOffset=f.offset();if(this._helper){this.helper=this.helper||c('<div style="overflow:hidden;"></div>');
var e=c.browser.msie&&c.browser.version<7,g=(e?1:0),h=(e?2:-1);this.helper.addClass(this._helper).css({width:this.element.outerWidth()+h,height:this.element.outerHeight()+h,position:"absolute",left:this.elementOffset.left-g+"px",top:this.elementOffset.top-g+"px",zIndex:++i.zIndex});
this.helper.appendTo("body").disableSelection()}else{this.helper=this.element}},_change:{e:function(g,f,e){return{width:this.originalSize.width+f}
},w:function(h,f,e){var j=this.options,g=this.originalSize,i=this.originalPosition;return{left:i.left+f,width:g.width-f}},n:function(h,f,e){var j=this.options,g=this.originalSize,i=this.originalPosition;
return{top:i.top+e,height:g.height-e}},s:function(g,f,e){return{height:this.originalSize.height+e}},se:function(g,f,e){return c.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[g,f,e]))
},sw:function(g,f,e){return c.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[g,f,e]))},ne:function(g,f,e){return c.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[g,f,e]))
},nw:function(g,f,e){return c.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[g,f,e]))}},_propagate:function(f,e){c.ui.plugin.call(this,f,[e,this.ui()]);
(f!="resize"&&this._trigger(f,e,this.ui()))},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}
}});c.extend(c.ui.resizable,{version:"1.8.6"});c.ui.plugin.add("resizable","alsoResize",{start:function(f,g){var e=c(this).data("resizable"),i=e.options;
var h=function(j){c(j).each(function(){var k=c(this);k.data("resizable-alsoresize",{width:parseInt(k.width(),10),height:parseInt(k.height(),10),left:parseInt(k.css("left"),10),top:parseInt(k.css("top"),10),position:k.css("position")})
})};if(typeof(i.alsoResize)=="object"&&!i.alsoResize.parentNode){if(i.alsoResize.length){i.alsoResize=i.alsoResize[0];h(i.alsoResize)
}else{c.each(i.alsoResize,function(j){h(j)})}}else{h(i.alsoResize)}},resize:function(g,i){var f=c(this).data("resizable"),j=f.options,h=f.originalSize,l=f.originalPosition;
var k={height:(f.size.height-h.height)||0,width:(f.size.width-h.width)||0,top:(f.position.top-l.top)||0,left:(f.position.left-l.left)||0},e=function(m,n){c(m).each(function(){var q=c(this),r=c(this).data("resizable-alsoresize"),p={},o=n&&n.length?n:q.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];
c.each(o,function(s,v){var u=(r[v]||0)+(k[v]||0);if(u&&u>=0){p[v]=u||null}});if(c.browser.opera&&/relative/.test(q.css("position"))){f._revertToRelativePosition=true;
q.css({position:"absolute",top:"auto",left:"auto"})}q.css(p)})};if(typeof(j.alsoResize)=="object"&&!j.alsoResize.nodeType){c.each(j.alsoResize,function(m,n){e(m,n)
})}else{e(j.alsoResize)}},stop:function(g,h){var f=c(this).data("resizable"),i=f.options;var e=function(j){c(j).each(function(){var k=c(this);
k.css({position:k.data("resizable-alsoresize").position})})};if(f._revertToRelativePosition){f._revertToRelativePosition=false;
if(typeof(i.alsoResize)=="object"&&!i.alsoResize.nodeType){c.each(i.alsoResize,function(j){e(j)})}else{e(i.alsoResize)}}c(this).removeData("resizable-alsoresize")
}});c.ui.plugin.add("resizable","animate",{stop:function(i,n){var p=c(this).data("resizable"),j=p.options;var h=p._proportionallyResizeElements,e=h.length&&(/textarea/i).test(h[0].nodeName),f=e&&c.ui.hasScroll(h[0],"left")?0:p.sizeDiff.height,l=e?0:p.sizeDiff.width;
var g={width:(p.size.width-l),height:(p.size.height-f)},k=(parseInt(p.element.css("left"),10)+(p.position.left-p.originalPosition.left))||null,m=(parseInt(p.element.css("top"),10)+(p.position.top-p.originalPosition.top))||null;
p.element.animate(c.extend(g,m&&k?{top:m,left:k}:{}),{duration:j.animateDuration,easing:j.animateEasing,step:function(){var o={width:parseInt(p.element.css("width"),10),height:parseInt(p.element.css("height"),10),top:parseInt(p.element.css("top"),10),left:parseInt(p.element.css("left"),10)};
if(h&&h.length){c(h[0]).css({width:o.width,height:o.height})}p._updateCache(o);p._propagate("resize",i)}})}});c.ui.plugin.add("resizable","containment",{start:function(f,r){var u=c(this).data("resizable"),j=u.options,l=u.element;
var g=j.containment,k=(g instanceof c)?g.get(0):(/parent/.test(g))?l.parent().get(0):g;if(!k){return}u.containerElement=c(k);
if(/document/.test(g)||g==document){u.containerOffset={left:0,top:0};u.containerPosition={left:0,top:0};u.parentData={element:c(document),left:0,top:0,width:c(document).width(),height:c(document).height()||document.body.parentNode.scrollHeight}
}else{var n=c(k),i=[];c(["Top","Right","Left","Bottom"]).each(function(p,o){i[p]=b(n.css("padding"+o))});u.containerOffset=n.offset();
u.containerPosition=n.position();u.containerSize={height:(n.innerHeight()-i[3]),width:(n.innerWidth()-i[1])};var q=u.containerOffset,e=u.containerSize.height,m=u.containerSize.width,h=(c.ui.hasScroll(k,"left")?k.scrollWidth:m),s=(c.ui.hasScroll(k)?k.scrollHeight:e);
u.parentData={element:k,left:q.left,top:q.top,width:h,height:s}}},resize:function(g,q){var u=c(this).data("resizable"),i=u.options,f=u.containerSize,p=u.containerOffset,m=u.size,n=u.position,r=u._aspectRatio||g.shiftKey,e={top:0,left:0},h=u.containerElement;
if(h[0]!=document&&(/static/).test(h.css("position"))){e=p}if(n.left<(u._helper?p.left:0)){u.size.width=u.size.width+(u._helper?(u.position.left-p.left):(u.position.left-e.left));
if(r){u.size.height=u.size.width/i.aspectRatio}u.position.left=i.helper?p.left:0}if(n.top<(u._helper?p.top:0)){u.size.height=u.size.height+(u._helper?(u.position.top-p.top):u.position.top);
if(r){u.size.width=u.size.height*i.aspectRatio}u.position.top=u._helper?p.top:0}u.offset.left=u.parentData.left+u.position.left;
u.offset.top=u.parentData.top+u.position.top;var l=Math.abs((u._helper?u.offset.left-e.left:(u.offset.left-e.left))+u.sizeDiff.width),s=Math.abs((u._helper?u.offset.top-e.top:(u.offset.top-p.top))+u.sizeDiff.height);
var k=u.containerElement.get(0)==u.element.parent().get(0),j=/relative|absolute/.test(u.containerElement.css("position"));
if(k&&j){l-=u.parentData.left}if(l+u.size.width>=u.parentData.width){u.size.width=u.parentData.width-l;if(r){u.size.height=u.size.width/u.aspectRatio
}}if(s+u.size.height>=u.parentData.height){u.size.height=u.parentData.height-s;if(r){u.size.width=u.size.height*u.aspectRatio
}}},stop:function(f,n){var q=c(this).data("resizable"),g=q.options,l=q.position,m=q.containerOffset,e=q.containerPosition,i=q.containerElement;
var j=c(q.helper),r=j.offset(),p=j.outerWidth()-q.sizeDiff.width,k=j.outerHeight()-q.sizeDiff.height;if(q._helper&&!g.animate&&(/relative/).test(i.css("position"))){c(this).css({left:r.left-e.left-m.left,width:p,height:k})
}if(q._helper&&!g.animate&&(/static/).test(i.css("position"))){c(this).css({left:r.left-e.left-m.left,width:p,height:k})}}});
c.ui.plugin.add("resizable","ghost",{start:function(g,h){var e=c(this).data("resizable"),i=e.options,f=e.size;e.ghost=e.originalElement.clone();
e.ghost.css({opacity:0.25,display:"block",position:"relative",height:f.height,width:f.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof i.ghost=="string"?i.ghost:"");
e.ghost.appendTo(e.helper)},resize:function(f,g){var e=c(this).data("resizable"),h=e.options;if(e.ghost){e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})
}},stop:function(f,g){var e=c(this).data("resizable"),h=e.options;if(e.ghost&&e.helper){e.helper.get(0).removeChild(e.ghost.get(0))
}}});c.ui.plugin.add("resizable","grid",{resize:function(e,m){var p=c(this).data("resizable"),h=p.options,k=p.size,i=p.originalSize,j=p.originalPosition,n=p.axis,l=h._aspectRatio||e.shiftKey;
h.grid=typeof h.grid=="number"?[h.grid,h.grid]:h.grid;var g=Math.round((k.width-i.width)/(h.grid[0]||1))*(h.grid[0]||1),f=Math.round((k.height-i.height)/(h.grid[1]||1))*(h.grid[1]||1);
if(/^(se|s|e)$/.test(n)){p.size.width=i.width+g;p.size.height=i.height+f}else{if(/^(ne)$/.test(n)){p.size.width=i.width+g;
p.size.height=i.height+f;p.position.top=j.top-f}else{if(/^(sw)$/.test(n)){p.size.width=i.width+g;p.size.height=i.height+f;
p.position.left=j.left-g}else{p.size.width=i.width+g;p.size.height=i.height+f;p.position.top=j.top-f;p.position.left=j.left-g
}}}}});var b=function(e){return parseInt(e,10)||0};var a=function(e){return !isNaN(parseInt(e,10))}})(jQuery);(function(a,b){a.widget("ui.selectable",a.ui.mouse,{options:{appendTo:"body",autoRefresh:true,distance:0,filter:"*",tolerance:"touch"},_create:function(){var c=this;
this.element.addClass("ui-selectable");this.dragged=false;var d;this.refresh=function(){d=a(c.options.filter,c.element[0]);
d.each(function(){var e=a(this);var f=e.offset();a.data(this,"selectable-item",{element:this,$element:e,left:f.left,top:f.top,right:f.left+e.outerWidth(),bottom:f.top+e.outerHeight(),startselected:false,selected:e.hasClass("ui-selected"),selecting:e.hasClass("ui-selecting"),unselecting:e.hasClass("ui-unselecting")})
})};this.refresh();this.selectees=d.addClass("ui-selectee");this._mouseInit();this.helper=a("<div class='ui-selectable-helper'></div>")
},destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item");this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable");
this._mouseDestroy();return this},_mouseStart:function(e){var c=this;this.opos=[e.pageX,e.pageY];if(this.options.disabled){return
}var d=this.options;this.selectees=a(d.filter,this.element[0]);this._trigger("start",e);a(d.appendTo).append(this.helper);
this.helper.css({left:e.clientX,top:e.clientY,width:0,height:0});if(d.autoRefresh){this.refresh()}this.selectees.filter(".ui-selected").each(function(){var f=a.data(this,"selectable-item");
f.startselected=true;if(!e.metaKey){f.$element.removeClass("ui-selected");f.selected=false;f.$element.addClass("ui-unselecting");
f.unselecting=true;c._trigger("unselecting",e,{unselecting:f.element})}});a(e.target).parents().andSelf().each(function(){var g=a.data(this,"selectable-item");
if(g){var f=!e.metaKey||!g.$element.hasClass("ui-selected");g.$element.removeClass(f?"ui-unselecting":"ui-selected").addClass(f?"ui-selecting":"ui-unselecting");
g.unselecting=!f;g.selecting=f;g.selected=f;if(f){c._trigger("selecting",e,{selecting:g.element})}else{c._trigger("unselecting",e,{unselecting:g.element})
}return false}})},_mouseDrag:function(j){var d=this;this.dragged=true;if(this.options.disabled){return}var f=this.options;
var e=this.opos[0],i=this.opos[1],c=j.pageX,h=j.pageY;if(e>c){var g=c;c=e;e=g}if(i>h){var g=h;h=i;i=g}this.helper.css({left:e,top:i,width:c-e,height:h-i});
this.selectees.each(function(){var k=a.data(this,"selectable-item");if(!k||k.element==d.element[0]){return}var l=false;if(f.tolerance=="touch"){l=(!(k.left>c||k.right<e||k.top>h||k.bottom<i))
}else{if(f.tolerance=="fit"){l=(k.left>e&&k.right<c&&k.top>i&&k.bottom<h)}}if(l){if(k.selected){k.$element.removeClass("ui-selected");
k.selected=false}if(k.unselecting){k.$element.removeClass("ui-unselecting");k.unselecting=false}if(!k.selecting){k.$element.addClass("ui-selecting");
k.selecting=true;d._trigger("selecting",j,{selecting:k.element})}}else{if(k.selecting){if(j.metaKey&&k.startselected){k.$element.removeClass("ui-selecting");
k.selecting=false;k.$element.addClass("ui-selected");k.selected=true}else{k.$element.removeClass("ui-selecting");k.selecting=false;
if(k.startselected){k.$element.addClass("ui-unselecting");k.unselecting=true}d._trigger("unselecting",j,{unselecting:k.element})
}}if(k.selected){if(!j.metaKey&&!k.startselected){k.$element.removeClass("ui-selected");k.selected=false;k.$element.addClass("ui-unselecting");
k.unselecting=true;d._trigger("unselecting",j,{unselecting:k.element})}}}});return false},_mouseStop:function(e){var c=this;
this.dragged=false;var d=this.options;a(".ui-unselecting",this.element[0]).each(function(){var f=a.data(this,"selectable-item");
f.$element.removeClass("ui-unselecting");f.unselecting=false;f.startselected=false;c._trigger("unselected",e,{unselected:f.element})
});a(".ui-selecting",this.element[0]).each(function(){var f=a.data(this,"selectable-item");f.$element.removeClass("ui-selecting").addClass("ui-selected");
f.selecting=false;f.selected=true;f.startselected=true;c._trigger("selected",e,{selected:f.element})});this._trigger("stop",e);
this.helper.remove();return false}});a.extend(a.ui.selectable,{version:"1.8.6"})})(jQuery);(function(a,b){a.widget("ui.sortable",a.ui.mouse,{widgetEventPrefix:"sort",options:{appendTo:"parent",axis:false,connectWith:false,containment:false,cursor:"auto",cursorAt:false,dropOnEmpty:true,forcePlaceholderSize:false,forceHelperSize:false,grid:false,handle:false,helper:"original",items:"> *",opacity:false,placeholder:false,revert:false,scroll:true,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1000},_create:function(){var c=this.options;
this.containerCache={};this.element.addClass("ui-sortable");this.refresh();this.floating=this.items.length?(/left|right/).test(this.items[0].item.css("float")):false;
this.offset=this.element.offset();this._mouseInit()},destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").removeData("sortable").unbind(".sortable");
this._mouseDestroy();for(var c=this.items.length-1;c>=0;c--){this.items[c].item.removeData("sortable-item")}return this},_setOption:function(c,d){if(c==="disabled"){this.options[c]=d;
this.widget()[d?"addClass":"removeClass"]("ui-sortable-disabled")}else{a.Widget.prototype._setOption.apply(this,arguments)
}},_mouseCapture:function(f,g){if(this.reverting){return false}if(this.options.disabled||this.options.type=="static"){return false
}this._refreshItems(f);var e=null,d=this,c=a(f.target).parents().each(function(){if(a.data(this,"sortable-item")==d){e=a(this);
return false}});if(a.data(f.target,"sortable-item")==d){e=a(f.target)}if(!e){return false}if(this.options.handle&&!g){var h=false;
a(this.options.handle,e).find("*").andSelf().each(function(){if(this==f.target){h=true}});if(!h){return false}}this.currentItem=e;
this._removeCurrentsFromItems();return true},_mouseStart:function(f,g,c){var h=this.options,d=this;this.currentContainer=this;
this.refreshPositions();this.helper=this._createHelper(f);this._cacheHelperProportions();this._cacheMargins();this.scrollParent=this.helper.scrollParent();
this.offset=this.currentItem.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};
this.helper.css("position","absolute");this.cssPosition=this.helper.css("position");a.extend(this.offset,{click:{left:f.pageX-this.offset.left,top:f.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});
this.originalPosition=this._generatePosition(f);this.originalPageX=f.pageX;this.originalPageY=f.pageY;(h.cursorAt&&this._adjustOffsetFromHelper(h.cursorAt));
this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};if(this.helper[0]!=this.currentItem[0]){this.currentItem.hide()
}this._createPlaceholder();if(h.containment){this._setContainment()}if(h.cursor){if(a("body").css("cursor")){this._storedCursor=a("body").css("cursor")
}a("body").css("cursor",h.cursor)}if(h.opacity){if(this.helper.css("opacity")){this._storedOpacity=this.helper.css("opacity")
}this.helper.css("opacity",h.opacity)}if(h.zIndex){if(this.helper.css("zIndex")){this._storedZIndex=this.helper.css("zIndex")
}this.helper.css("zIndex",h.zIndex)}if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){this.overflowOffset=this.scrollParent.offset()
}this._trigger("start",f,this._uiHash());if(!this._preserveHelperProportions){this._cacheHelperProportions()}if(!c){for(var e=this.containers.length-1;
e>=0;e--){this.containers[e]._trigger("activate",f,d._uiHash(this))}}if(a.ui.ddmanager){a.ui.ddmanager.current=this}if(a.ui.ddmanager&&!h.dropBehaviour){a.ui.ddmanager.prepareOffsets(this,f)
}this.dragging=true;this.helper.addClass("ui-sortable-helper");this._mouseDrag(f);return true},_mouseDrag:function(g){this.position=this._generatePosition(g);
this.positionAbs=this._convertPositionTo("absolute");if(!this.lastPositionAbs){this.lastPositionAbs=this.positionAbs}if(this.options.scroll){var h=this.options,c=false;
if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){if((this.overflowOffset.top+this.scrollParent[0].offsetHeight)-g.pageY<h.scrollSensitivity){this.scrollParent[0].scrollTop=c=this.scrollParent[0].scrollTop+h.scrollSpeed
}else{if(g.pageY-this.overflowOffset.top<h.scrollSensitivity){this.scrollParent[0].scrollTop=c=this.scrollParent[0].scrollTop-h.scrollSpeed
}}if((this.overflowOffset.left+this.scrollParent[0].offsetWidth)-g.pageX<h.scrollSensitivity){this.scrollParent[0].scrollLeft=c=this.scrollParent[0].scrollLeft+h.scrollSpeed
}else{if(g.pageX-this.overflowOffset.left<h.scrollSensitivity){this.scrollParent[0].scrollLeft=c=this.scrollParent[0].scrollLeft-h.scrollSpeed
}}}else{if(g.pageY-a(document).scrollTop()<h.scrollSensitivity){c=a(document).scrollTop(a(document).scrollTop()-h.scrollSpeed)
}else{if(a(window).height()-(g.pageY-a(document).scrollTop())<h.scrollSensitivity){c=a(document).scrollTop(a(document).scrollTop()+h.scrollSpeed)
}}if(g.pageX-a(document).scrollLeft()<h.scrollSensitivity){c=a(document).scrollLeft(a(document).scrollLeft()-h.scrollSpeed)
}else{if(a(window).width()-(g.pageX-a(document).scrollLeft())<h.scrollSensitivity){c=a(document).scrollLeft(a(document).scrollLeft()+h.scrollSpeed)
}}}if(c!==false&&a.ui.ddmanager&&!h.dropBehaviour){a.ui.ddmanager.prepareOffsets(this,g)}}this.positionAbs=this._convertPositionTo("absolute");
if(!this.options.axis||this.options.axis!="y"){this.helper[0].style.left=this.position.left+"px"}if(!this.options.axis||this.options.axis!="x"){this.helper[0].style.top=this.position.top+"px"
}for(var e=this.items.length-1;e>=0;e--){var f=this.items[e],d=f.item[0];var j=(this.options.tolerance=="card"&&this._intersectsWithCardSides(f))||this._intersectsWithPointer(f);
if(!j){continue}if(d!=this.currentItem[0]&&this.placeholder[j==1?"next":"prev"]()[0]!=d&&!a.ui.contains(this.placeholder[0],d)&&(this.options.type=="semi-dynamic"?!a.ui.contains(this.element[0],d):true)){this.direction=j==1?"down":"up";
if(this.options.tolerance=="pointer"||(this.options.tolerance=="intersect"&&this._intersectsWithSides(f))||(this.options.tolerance=="card"&&this._changeCards(f))){this._rearrange(g,f)
}else{break}this._trigger("change",g,this._uiHash());break}}this._contactContainers(g);if(a.ui.ddmanager){a.ui.ddmanager.drag(this,g)
}this._trigger("sort",g,this._uiHash());this.lastPositionAbs=this.positionAbs;return false},_mouseStop:function(d,e){if(!d){return
}if(a.ui.ddmanager&&!this.options.dropBehaviour){a.ui.ddmanager.drop(this,d)}if(this.options.revert){var c=this;var f=c.placeholder.offset();
c.reverting=true;a(this.helper).animate({left:f.left-this.offset.parent.left-c.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:f.top-this.offset.parent.top-c.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){c._clear(d)
})}else{this._clear(d,e)}return false},cancel:function(){var c=this;if(this.dragging){this._mouseUp();if(this.options.helper=="original"){this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")
}else{this.currentItem.show()}for(var d=this.containers.length-1;d>=0;d--){this.containers[d]._trigger("deactivate",null,c._uiHash(this));
if(this.containers[d].containerCache.over){this.containers[d]._trigger("out",null,c._uiHash(this));this.containers[d].containerCache.over=0
}}}if(this.placeholder[0].parentNode){this.placeholder[0].parentNode.removeChild(this.placeholder[0])}if(this.options.helper!="original"&&this.helper&&this.helper[0].parentNode){this.helper.remove()
}a.extend(this,{helper:null,dragging:false,reverting:false,_noFinalSort:null});if(this.domPosition.prev){a(this.domPosition.prev).after(this.currentItem)
}else{a(this.domPosition.parent).prepend(this.currentItem)}return this},serialize:function(e){var c=this._getItemsAsjQuery(e&&e.connected);
var d=[];e=e||{};a(c).each(function(){var f=(a(e.item||this).attr(e.attribute||"id")||"").match(e.expression||(/(.+)[-=_](.+)/));
if(f){d.push((e.key||f[1]+"[]")+"="+(e.key&&e.expression?f[1]:f[2]))}});if(!d.length&&e.key){d.push(e.key+"=")}return d.join("&")
},toArray:function(e){var c=this._getItemsAsjQuery(e&&e.connected);var d=[];e=e||{};c.each(function(){d.push(a(e.item||this).attr(e.attribute||"id")||"")
});return d},_intersectsWith:function(m){var e=this.positionAbs.left,d=e+this.helperProportions.width,k=this.positionAbs.top,j=k+this.helperProportions.height;
var f=m.left,c=f+m.width,n=m.top,i=n+m.height;var o=this.offset.click.top,h=this.offset.click.left;var g=(k+o)>n&&(k+o)<i&&(e+h)>f&&(e+h)<c;
if(this.options.tolerance=="pointer"||this.options.forcePointerForContainers||(this.options.tolerance!="pointer"&&this.helperProportions[this.floating?"width":"height"]>m[this.floating?"width":"height"])){return g
}else{return(f<e+(this.helperProportions.width/2)&&d-(this.helperProportions.width/2)<c&&n<k+(this.helperProportions.height/2)&&j-(this.helperProportions.height/2)<i)
}},_intersectsWithPointer:function(e){var f=a.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,e.top,e.height),d=a.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,e.left,e.width),h=f&&d,c=this._getDragVerticalDirection(),g=this._getDragHorizontalDirection();
if(!h){return false}return this.floating?(((g&&g=="right")||c=="down")?2:1):(c&&(c=="down"?2:1))},_intersectsWithSides:function(f){var d=a.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,f.top+(f.height/2),f.height),e=a.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,f.left+(f.width/2),f.width),c=this._getDragVerticalDirection(),g=this._getDragHorizontalDirection();
if(this.floating&&g){return((g=="right"&&e)||(g=="left"&&!e))}else{return c&&((c=="down"&&d)||(c=="up"&&!d))}},_intersectsWithCardSides:function(d){var g=this.positionAbs.left;
var c=this.positionAbs.top;var e=jQuery(d.item[0]).offset().top;verticalDirection=this._getDragVerticalDirection(),horizontalDirection=this._getDragHorizontalDirection();
var f=((d.left<g&&d.left+d.width>g)||(d.left>g&&d.left<g+d.width))&&((e<c&&e+d.height>c)||(e>c&&e<c+d.height));if(!f){return false
}return this.floating?(((horizontalDirection&&horizontalDirection=="right")||verticalDirection=="down")?2:1):(verticalDirection&&(verticalDirection=="down"?2:1))
},_changeCards:function(d){var c=this._getDragVerticalDirection(),e=this._getDragHorizontalDirection();if(this.floating&&e){if(e=="right"){return a.ui.isOverAxis(this.positionAbs.left+d.width,d.left+d.width/4,3*d.width/4)
}else{if(e=="left"){return a.ui.isOverAxis(this.positionAbs.left,d.left,3*d.width/4)}}return false}else{if(c){if(c=="down"){return a.ui.isOverAxis(this.positionAbs.top+d.height,d.top+d.height/3,2*d.height/3)
}else{if(c=="up"){return a.ui.isOverAxis(this.positionAbs.top,d.top,2*d.height/3)}}}return false}},_getDragVerticalDirection:function(){var c=this.positionAbs.top-this.lastPositionAbs.top;
return c!=0&&(c>0?"down":"up")},_getDragHorizontalDirection:function(){var c=this.positionAbs.left-this.lastPositionAbs.left;
return c!=0&&(c>0?"right":"left")},refresh:function(c){this._refreshItems(c);this.refreshPositions();return this},_connectWith:function(){var c=this.options;
return c.connectWith.constructor==String?[c.connectWith]:c.connectWith},_getItemsAsjQuery:function(c){var m=this;var h=[];
var f=[];var k=this._connectWith();if(k&&c){for(var e=k.length-1;e>=0;e--){var l=a(k[e]);for(var d=l.length-1;d>=0;d--){var g=a.data(l[d],"sortable");
if(g&&g!=this&&!g.options.disabled){f.push([a.isFunction(g.options.items)?g.options.items.call(g.element):a(g.options.items,g.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),g])
}}}}f.push([a.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):a(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]);
for(var e=f.length-1;e>=0;e--){f[e][0].each(function(){h.push(this)})}return a(h)},_removeCurrentsFromItems:function(){var e=this.currentItem.find(":data(sortable-item)");
for(var d=0;d<this.items.length;d++){for(var c=0;c<e.length;c++){if(e[c]==this.items[d].item[0]){this.items.splice(d,1)}}}},_refreshItems:function(c){this.items=[];
this.containers=[this];var k=this.items;var q=this;var g=[[a.isFunction(this.options.items)?this.options.items.call(this.element[0],c,{item:this.currentItem}):a(this.options.items,this.element),this]];
var m=this._connectWith();if(m){for(var f=m.length-1;f>=0;f--){var n=a(m[f]);for(var e=n.length-1;e>=0;e--){var h=a.data(n[e],"sortable");
if(h&&h!=this&&!h.options.disabled){g.push([a.isFunction(h.options.items)?h.options.items.call(h.element[0],c,{item:this.currentItem}):a(h.options.items,h.element),h]);
this.containers.push(h)}}}}for(var f=g.length-1;f>=0;f--){var l=g[f][1];var d=g[f][0];for(var e=0,o=d.length;e<o;e++){var p=a(d[e]);
p.data("sortable-item",l);k.push({item:p,instance:l,width:0,height:0,left:0,top:0})}}},refreshPositions:function(c){if(this.offsetParent&&this.helper){this.offset.parent=this._getParentOffset()
}for(var e=this.items.length-1;e>=0;e--){var f=this.items[e];var d=this.options.toleranceElement?a(this.options.toleranceElement,f.item):f.item;
if(!c){f.width=d.outerWidth();f.height=d.outerHeight()}var g=d.offset();f.left=g.left;f.top=g.top}if(this.options.custom&&this.options.custom.refreshContainers){this.options.custom.refreshContainers.call(this)
}else{for(var e=this.containers.length-1;e>=0;e--){var g=this.containers[e].element.offset();this.containers[e].containerCache.left=g.left;
this.containers[e].containerCache.top=g.top;this.containers[e].containerCache.width=this.containers[e].element.outerWidth();
this.containers[e].containerCache.height=this.containers[e].element.outerHeight()}}return this},_createPlaceholder:function(e){var c=e||this,f=c.options;
if(!f.placeholder||f.placeholder.constructor==String){var d=f.placeholder;f.placeholder={element:function(){var g=a(document.createElement(c.currentItem[0].nodeName)).addClass(d||c.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];
if(!d){g.style.visibility="hidden"}return g},update:function(g,h){if(d&&!f.forcePlaceholderSize){return}if(!h.height()){h.height(c.currentItem.innerHeight()-parseInt(c.currentItem.css("paddingTop")||0,10)-parseInt(c.currentItem.css("paddingBottom")||0,10))
}if(!h.width()){h.width(c.currentItem.innerWidth()-parseInt(c.currentItem.css("paddingLeft")||0,10)-parseInt(c.currentItem.css("paddingRight")||0,10))
}}}}c.placeholder=a(f.placeholder.element.call(c.element,c.currentItem));c.currentItem.after(c.placeholder);f.placeholder.update(c,c.placeholder)
},_contactContainers:function(c){var e=null,l=null;for(var g=this.containers.length-1;g>=0;g--){if(a.ui.contains(this.currentItem[0],this.containers[g].element[0])){continue
}if(this._intersectsWith(this.containers[g].containerCache)){if(e&&a.ui.contains(this.containers[g].element[0],e.element[0])){continue
}e=this.containers[g];l=g}else{if(this.containers[g].containerCache.over){this.containers[g]._trigger("out",c,this._uiHash(this));
this.containers[g].containerCache.over=0}}}if(!e){return}if(this.containers.length===1){this.containers[l]._trigger("over",c,this._uiHash(this));
this.containers[l].containerCache.over=1}else{if(this.currentContainer!=this.containers[l]){var k=10000;var h=null;var d=this.positionAbs[this.containers[l].floating?"left":"top"];
for(var f=this.items.length-1;f>=0;f--){if(!a.ui.contains(this.containers[l].element[0],this.items[f].item[0])){continue}var m=this.items[f][this.containers[l].floating?"left":"top"];
if(Math.abs(m-d)<k){k=Math.abs(m-d);h=this.items[f]}}if(!h&&!this.options.dropOnEmpty){return}this.currentContainer=this.containers[l];
h?this._rearrange(c,h,null,true):this._rearrange(c,null,this.containers[l].element,true);this._trigger("change",c,this._uiHash());
this.containers[l]._trigger("change",c,this._uiHash(this));this.options.placeholder.update(this.currentContainer,this.placeholder);
this.containers[l]._trigger("over",c,this._uiHash(this));this.containers[l].containerCache.over=1}}},_createHelper:function(d){var e=this.options;
var c=a.isFunction(e.helper)?a(e.helper.apply(this.element[0],[d,this.currentItem])):(e.helper=="clone"?this.currentItem.clone():this.currentItem);
if(!c.parents("body").length){a(e.appendTo!="parent"?e.appendTo:this.currentItem[0].parentNode)[0].appendChild(c[0])}if(c[0]==this.currentItem[0]){this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}
}if(c[0].style.width==""||e.forceHelperSize){c.width(this.currentItem.width())}if(c[0].style.height==""||e.forceHelperSize){c.height(this.currentItem.height())
}return c},_adjustOffsetFromHelper:function(c){if(typeof c=="string"){c=c.split(" ")}if(a.isArray(c)){c={left:+c[0],top:+c[1]||0}
}if("left" in c){this.offset.click.left=c.left+this.margins.left}if("right" in c){this.offset.click.left=this.helperProportions.width-c.right+this.margins.left
}if("top" in c){this.offset.click.top=c.top+this.margins.top}if("bottom" in c){this.offset.click.top=this.helperProportions.height-c.bottom+this.margins.top
}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var c=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0])){c.left+=this.scrollParent.scrollLeft();
c.top+=this.scrollParent.scrollTop()}if((this.offsetParent[0]==document.body)||(this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&a.browser.msie)){c={top:0,left:0}
}return{top:c.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:c.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}
},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var c=this.currentItem.position();return{top:c.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:c.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}
}else{return{top:0,left:0}}},_cacheMargins:function(){this.margins={left:(parseInt(this.currentItem.css("marginLeft"),10)||0),top:(parseInt(this.currentItem.css("marginTop"),10)||0)}
},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}
},_setContainment:function(){var f=this.options;if(f.containment=="parent"){f.containment=this.helper[0].parentNode}if(f.containment=="document"||f.containment=="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,a(f.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(a(f.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]
}if(!(/^(document|window|parent)$/).test(f.containment)){var d=a(f.containment)[0];var e=a(f.containment).offset();var c=(a(d).css("overflow")!="hidden");
this.containment=[e.left+(parseInt(a(d).css("borderLeftWidth"),10)||0)+(parseInt(a(d).css("paddingLeft"),10)||0)-this.margins.left,e.top+(parseInt(a(d).css("borderTopWidth"),10)||0)+(parseInt(a(d).css("paddingTop"),10)||0)-this.margins.top,e.left+(c?Math.max(d.scrollWidth,d.offsetWidth):d.offsetWidth)-(parseInt(a(d).css("borderLeftWidth"),10)||0)-(parseInt(a(d).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,e.top+(c?Math.max(d.scrollHeight,d.offsetHeight):d.offsetHeight)-(parseInt(a(d).css("borderTopWidth"),10)||0)-(parseInt(a(d).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]
}},_convertPositionTo:function(g,i){if(!i){i=this.position}var e=g=="absolute"?1:-1;var f=this.options,c=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,h=(/(html|body)/i).test(c[0].tagName);
return{top:(i.top+this.offset.relative.top*e+this.offset.parent.top*e-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(h?0:c.scrollTop()))*e)),left:(i.left+this.offset.relative.left*e+this.offset.parent.left*e-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():h?0:c.scrollLeft())*e))}
},_generatePosition:function(f){var i=this.options,c=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,j=(/(html|body)/i).test(c[0].tagName);
if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0])){this.offset.relative=this._getRelativeOffset()
}var e=f.pageX;var d=f.pageY;if(this.originalPosition){if(this.containment){if(f.pageX-this.offset.click.left<this.containment[0]){e=this.containment[0]+this.offset.click.left
}if(f.pageY-this.offset.click.top<this.containment[1]){d=this.containment[1]+this.offset.click.top}if(f.pageX-this.offset.click.left>this.containment[2]){e=this.containment[2]+this.offset.click.left
}if(f.pageY-this.offset.click.top>this.containment[3]){d=this.containment[3]+this.offset.click.top}}if(i.grid){var h=this.originalPageY+Math.round((d-this.originalPageY)/i.grid[1])*i.grid[1];
d=this.containment?(!(h-this.offset.click.top<this.containment[1]||h-this.offset.click.top>this.containment[3])?h:(!(h-this.offset.click.top<this.containment[1])?h-i.grid[1]:h+i.grid[1])):h;
var g=this.originalPageX+Math.round((e-this.originalPageX)/i.grid[0])*i.grid[0];e=this.containment?(!(g-this.offset.click.left<this.containment[0]||g-this.offset.click.left>this.containment[2])?g:(!(g-this.offset.click.left<this.containment[0])?g-i.grid[0]:g+i.grid[0])):g
}}return{top:(d-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(j?0:c.scrollTop())))),left:(e-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():j?0:c.scrollLeft())))}
},_rearrange:function(h,g,d,f){d?d[0].appendChild(this.placeholder[0]):g.item[0].parentNode.insertBefore(this.placeholder[0],(this.direction=="down"?g.item[0]:g.item[0].nextSibling));
this.counter=this.counter?++this.counter:1;var e=this,c=this.counter;window.setTimeout(function(){if(c==e.counter){e.refreshPositions(!f)
}},0)},_clear:function(e,f){this.reverting=false;var g=[],c=this;if(!this._noFinalSort&&this.currentItem[0].parentNode){this.placeholder.before(this.currentItem)
}this._noFinalSort=null;if(this.helper[0]==this.currentItem[0]){for(var d in this._storedCSS){if(this._storedCSS[d]=="auto"||this._storedCSS[d]=="static"){this._storedCSS[d]=""
}}this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else{this.currentItem.show()}if(this.fromOutside&&!f){g.push(function(h){this._trigger("receive",h,this._uiHash(this.fromOutside))
})}if((this.fromOutside||this.domPosition.prev!=this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!=this.currentItem.parent()[0])&&!f){g.push(function(h){this._trigger("update",h,this._uiHash())
})}if(!a.ui.contains(this.element[0],this.currentItem[0])){if(!f){g.push(function(h){this._trigger("remove",h,this._uiHash())
})}for(var d=this.containers.length-1;d>=0;d--){if(a.ui.contains(this.containers[d].element[0],this.currentItem[0])&&!f){g.push((function(h){return function(i){h._trigger("receive",i,this._uiHash(this))
}}).call(this,this.containers[d]));g.push((function(h){return function(i){h._trigger("update",i,this._uiHash(this))}}).call(this,this.containers[d]))
}}}for(var d=this.containers.length-1;d>=0;d--){if(!f){g.push((function(h){return function(i){h._trigger("deactivate",i,this._uiHash(this))
}}).call(this,this.containers[d]))}if(this.containers[d].containerCache.over){g.push((function(h){return function(i){h._trigger("out",i,this._uiHash(this))
}}).call(this,this.containers[d]));this.containers[d].containerCache.over=0}}if(this._storedCursor){a("body").css("cursor",this._storedCursor)
}if(this._storedOpacity){this.helper.css("opacity",this._storedOpacity)}if(this._storedZIndex){this.helper.css("zIndex",this._storedZIndex=="auto"?"":this._storedZIndex)
}this.dragging=false;if(this.cancelHelperRemoval){if(!f){this._trigger("beforeStop",e,this._uiHash());for(var d=0;d<g.length;
d++){g[d].call(this,e)}this._trigger("stop",e,this._uiHash())}return false}if(!f){this._trigger("beforeStop",e,this._uiHash())
}this.placeholder[0].parentNode.removeChild(this.placeholder[0]);if(this.helper[0]!=this.currentItem[0]){this.helper.remove()
}this.helper=null;if(!f){for(var d=0;d<g.length;d++){g[d].call(this,e)}this._trigger("stop",e,this._uiHash())}this.fromOutside=false;
return true},_trigger:function(){if(a.Widget.prototype._trigger.apply(this,arguments)===false){this.cancel()}},_uiHash:function(d){var c=d||this;
return{helper:c.helper,placeholder:c.placeholder||a([]),position:c.position,originalPosition:c.originalPosition,offset:c.positionAbs,item:c.currentItem,sender:d?d.element:null}
}});a.extend(a.ui.sortable,{version:"1.8.6"})})(jQuery);(function(a,b){a.widget("ui.accordion",{options:{active:0,animated:"slide",autoHeight:true,clearStyle:false,collapsible:false,event:"click",fillSpace:false,header:"> li > :first-child,> :not(li):even",icons:{header:"ui-icon-triangle-1-e",headerSelected:"ui-icon-triangle-1-s"},navigation:false,navigationFilter:function(){return this.href.toLowerCase()===location.href.toLowerCase()
}},_create:function(){var c=this,d=c.options;c.running=0;c.element.addClass("ui-accordion ui-widget ui-helper-reset").children("li").addClass("ui-accordion-li-fix");
c.headers=c.element.find(d.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion",function(){if(d.disabled){return
}a(this).addClass("ui-state-hover")}).bind("mouseleave.accordion",function(){if(d.disabled){return}a(this).removeClass("ui-state-hover")
}).bind("focus.accordion",function(){if(d.disabled){return}a(this).addClass("ui-state-focus")}).bind("blur.accordion",function(){if(d.disabled){return
}a(this).removeClass("ui-state-focus")});c.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom");
if(d.navigation){var e=c.element.find("a").filter(d.navigationFilter).eq(0);if(e.length){var f=e.closest(".ui-accordion-header");
if(f.length){c.active=f}else{c.active=e.closest(".ui-accordion-content").prev()}}}c.active=c._findActive(c.active||d.active).addClass("ui-state-default ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top");
c.active.next().addClass("ui-accordion-content-active");c._createIcons();c.resize();c.element.attr("role","tablist");c.headers.attr("role","tab").bind("keydown.accordion",function(g){return c._keydown(g)
}).next().attr("role","tabpanel");c.headers.not(c.active||"").attr({"aria-expanded":"false",tabIndex:-1}).next().hide();if(!c.active.length){c.headers.eq(0).attr("tabIndex",0)
}else{c.active.attr({"aria-expanded":"true",tabIndex:0})}if(!a.browser.safari){c.headers.find("a").attr("tabIndex",-1)}if(d.event){c.headers.bind(d.event.split(" ").join(".accordion ")+".accordion",function(g){c._clickHandler.call(c,g,this);
g.preventDefault()})}},_createIcons:function(){var c=this.options;if(c.icons){a("<span></span>").addClass("ui-icon "+c.icons.header).prependTo(this.headers);
this.active.children(".ui-icon").toggleClass(c.icons.header).toggleClass(c.icons.headerSelected);this.element.addClass("ui-accordion-icons")
}},_destroyIcons:function(){this.headers.children(".ui-icon").remove();this.element.removeClass("ui-accordion-icons")},destroy:function(){var c=this.options;
this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role");this.headers.unbind(".accordion").removeClass("ui-accordion-header ui-accordion-disabled ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("tabIndex");
this.headers.find("a").removeAttr("tabIndex");this._destroyIcons();var d=this.headers.next().css("display","").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-accordion-disabled ui-state-disabled");
if(c.autoHeight||c.fillHeight){d.css("height","")}return a.Widget.prototype.destroy.call(this)},_setOption:function(c,d){a.Widget.prototype._setOption.apply(this,arguments);
if(c=="active"){this.activate(d)}if(c=="icons"){this._destroyIcons();if(d){this._createIcons()}}if(c=="disabled"){this.headers.add(this.headers.next())[d?"addClass":"removeClass"]("ui-accordion-disabled ui-state-disabled")
}},_keydown:function(f){if(this.options.disabled||f.altKey||f.ctrlKey){return}var g=a.ui.keyCode,e=this.headers.length,c=this.headers.index(f.target),d=false;
switch(f.keyCode){case g.RIGHT:case g.DOWN:d=this.headers[(c+1)%e];break;case g.LEFT:case g.UP:d=this.headers[(c-1+e)%e];
break;case g.SPACE:case g.ENTER:this._clickHandler({target:f.target},f.target);f.preventDefault()}if(d){a(f.target).attr("tabIndex",-1);
a(d).attr("tabIndex",0);d.focus();return false}return true},resize:function(){var c=this.options,e;if(c.fillSpace){if(a.browser.msie){var d=this.element.parent().css("overflow");
this.element.parent().css("overflow","hidden")}e=this.element.parent().height();if(a.browser.msie){this.element.parent().css("overflow",d)
}this.headers.each(function(){e-=a(this).outerHeight(true)});this.headers.next().each(function(){a(this).height(Math.max(0,e-a(this).innerHeight()+a(this).height()))
}).css("overflow","auto")}else{if(c.autoHeight){e=0;this.headers.next().each(function(){e=Math.max(e,a(this).height("").height())
}).height(e)}}return this},activate:function(c){this.options.active=c;var d=this._findActive(c)[0];this._clickHandler({target:d},d);
return this},_findActive:function(c){return c?typeof c==="number"?this.headers.filter(":eq("+c+")"):this.headers.not(this.headers.not(c)):c===false?a([]):this.headers.filter(":eq(0)")
},_clickHandler:function(c,f){var k=this.options;if(k.disabled){return}if(!c.target){if(!k.collapsible){return}this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(k.icons.headerSelected).addClass(k.icons.header);
this.active.next().addClass("ui-accordion-content-active");var h=this.active.next(),e={options:k,newHeader:a([]),oldHeader:k.active,newContent:a([]),oldContent:h},d=(this.active=a([]));
this._toggle(d,h,e);return}var g=a(c.currentTarget||f),i=g[0]===this.active[0];k.active=k.collapsible&&i?false:this.headers.index(g);
if(this.running||(!k.collapsible&&i)){return}this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(k.icons.headerSelected).addClass(k.icons.header);
if(!i){g.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").children(".ui-icon").removeClass(k.icons.header).addClass(k.icons.headerSelected);
g.next().addClass("ui-accordion-content-active")}var d=g.next(),h=this.active.next(),e={options:k,newHeader:i&&k.collapsible?a([]):g,oldHeader:this.active,newContent:i&&k.collapsible?a([]):d,oldContent:h},j=this.headers.index(this.active[0])>this.headers.index(g[0]);
this.active=i?a([]):g;this._toggle(d,h,e,i,j);return},_toggle:function(c,i,g,j,k){var m=this,n=m.options;m.toShow=c;m.toHide=i;
m.data=g;var d=function(){if(!m){return}return m._completed.apply(m,arguments)};m._trigger("changestart",null,m.data);m.running=i.size()===0?c.size():i.size();
if(n.animated){var f={};if(n.collapsible&&j){f={toShow:a([]),toHide:i,complete:d,down:k,autoHeight:n.autoHeight||n.fillSpace}
}else{f={toShow:c,toHide:i,complete:d,down:k,autoHeight:n.autoHeight||n.fillSpace}}if(!n.proxied){n.proxied=n.animated}if(!n.proxiedDuration){n.proxiedDuration=n.duration
}n.animated=a.isFunction(n.proxied)?n.proxied(f):n.proxied;n.duration=a.isFunction(n.proxiedDuration)?n.proxiedDuration(f):n.proxiedDuration;
var l=a.ui.accordion.animations,e=n.duration,h=n.animated;if(h&&!l[h]&&!a.easing[h]){h="slide"}if(!l[h]){l[h]=function(o){this.slide(o,{easing:h,duration:e||700})
}}l[h](f)}else{if(n.collapsible&&j){c.toggle()}else{i.hide();c.show()}d(true)}i.prev().attr({"aria-expanded":"false",tabIndex:-1}).blur();
c.prev().attr({"aria-expanded":"true",tabIndex:0}).focus()},_completed:function(c){this.running=c?0:--this.running;if(this.running){return
}if(this.options.clearStyle){this.toShow.add(this.toHide).css({height:"",overflow:""})}this.toHide.removeClass("ui-accordion-content-active");
this._trigger("change",null,this.data)}});a.extend(a.ui.accordion,{version:"1.8.6",animations:{slide:function(k,i){k=a.extend({easing:"swing",duration:300},k,i);
if(!k.toHide.size()){k.toShow.animate({height:"show",paddingTop:"show",paddingBottom:"show"},k);return}if(!k.toShow.size()){k.toHide.animate({height:"hide",paddingTop:"hide",paddingBottom:"hide"},k);
return}var d=k.toShow.css("overflow"),h=0,e={},g={},f=["height","paddingTop","paddingBottom"],c;var j=k.toShow;c=j[0].style.width;
j.width(parseInt(j.parent().width(),10)-parseInt(j.css("paddingLeft"),10)-parseInt(j.css("paddingRight"),10)-(parseInt(j.css("borderLeftWidth"),10)||0)-(parseInt(j.css("borderRightWidth"),10)||0));
a.each(f,function(l,n){g[n]="hide";var m=(""+a.css(k.toShow[0],n)).match(/^([\d+-.]+)(.*)$/);e[n]={value:m[1],unit:m[2]||"px"}
});k.toShow.css({height:0,overflow:"hidden"}).show();k.toHide.filter(":hidden").each(k.complete).end().filter(":visible").animate(g,{step:function(l,m){if(m.prop=="height"){h=(m.end-m.start===0)?0:(m.now-m.start)/(m.end-m.start)
}k.toShow[0].style[m.prop]=(h*e[m.prop].value)+e[m.prop].unit},duration:k.duration,easing:k.easing,complete:function(){if(!k.autoHeight){k.toShow.css("height","")
}k.toShow.css({width:c,overflow:d});k.complete()}})},bounceslide:function(c){this.slide(c,{easing:c.down?"easeOutBounce":"swing",duration:c.down?1000:200})
}}})})(jQuery);(function(a,b){a.widget("ui.autocomplete",{options:{appendTo:"body",delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null},_create:function(){var c=this,e=this.element[0].ownerDocument,d;
this.element.addClass("ui-autocomplete-input").attr("autocomplete","off").attr({role:"textbox","aria-autocomplete":"list","aria-haspopup":"true"}).bind("keydown.autocomplete",function(f){if(c.options.disabled||c.element.attr("readonly")){return
}d=false;var g=a.ui.keyCode;switch(f.keyCode){case g.PAGE_UP:c._move("previousPage",f);break;case g.PAGE_DOWN:c._move("nextPage",f);
break;case g.UP:c._move("previous",f);f.preventDefault();break;case g.DOWN:c._move("next",f);f.preventDefault();break;case g.ENTER:case g.NUMPAD_ENTER:if(c.menu.active){d=true;
f.preventDefault()}case g.TAB:if(!c.menu.active){return}c.menu.select(f);break;case g.ESCAPE:c.element.val(c.term);c.close(f);
break;default:clearTimeout(c.searching);c.searching=setTimeout(function(){if(c.term!=c.element.val()){c.selectedItem=null;
c.search(null,f)}},c.options.delay);break}}).bind("keypress.autocomplete",function(f){if(d){d=false;f.preventDefault()}}).bind("focus.autocomplete",function(){if(c.options.disabled){return
}c.selectedItem=null;c.previous=c.element.val()}).bind("blur.autocomplete",function(f){if(c.options.disabled){return}clearTimeout(c.searching);
c.closing=setTimeout(function(){c.close(f);c._change(f)},150)});this._initSource();this.response=function(){return c._response.apply(c,arguments)
};this.menu=a("<ul></ul>").addClass("ui-autocomplete").appendTo(a(this.options.appendTo||"body",e)[0]).mousedown(function(f){var g=c.menu.element[0];
if(!a(f.target).closest(".ui-menu-item").length){setTimeout(function(){a(document).one("mousedown",function(h){if(h.target!==c.element[0]&&h.target!==g&&!a.ui.contains(g,h.target)){c.close()
}})},1)}setTimeout(function(){clearTimeout(c.closing)},13)}).menu({focus:function(g,h){var f=h.item.data("item.autocomplete");
if(false!==c._trigger("focus",g,{item:f})){if(/^key/.test(g.originalEvent.type)){c.element.val(f.value)}}},selected:function(h,i){var g=i.item.data("item.autocomplete"),f=c.previous;
if(c.element[0]!==e.activeElement){c.element.focus();c.previous=f;setTimeout(function(){c.previous=f},1)}if(false!==c._trigger("select",h,{item:g})){c.element.val(g.value)
}c.term=c.element.val();c.close(h);c.selectedItem=g},blur:function(f,g){if(c.menu.element.is(":visible")&&(c.element.val()!==c.term)){c.element.val(c.term)
}}}).zIndex(this.element.zIndex()+1).css({top:0,left:0}).hide().data("menu");if(a.fn.bgiframe){this.menu.element.bgiframe()
}},destroy:function(){this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete").removeAttr("role").removeAttr("aria-autocomplete").removeAttr("aria-haspopup");
this.menu.element.remove();a.Widget.prototype.destroy.call(this)},_setOption:function(c,d){a.Widget.prototype._setOption.apply(this,arguments);
if(c==="source"){this._initSource()}if(c==="appendTo"){this.menu.element.appendTo(a(d||"body",this.element[0].ownerDocument)[0])
}},_initSource:function(){var c=this,e,d;if(a.isArray(this.options.source)){e=this.options.source;this.source=function(g,f){f(a.ui.autocomplete.filter(e,g.term))
}}else{if(typeof this.options.source==="string"){d=this.options.source;this.source=function(g,f){if(c.xhr){c.xhr.abort()}c.xhr=a.getJSON(d,g,function(i,h,j){if(j===c.xhr){f(i)
}c.xhr=null})}}else{this.source=this.options.source}}},search:function(d,c){d=d!=null?d:this.element.val();this.term=this.element.val();
if(d.length<this.options.minLength){return this.close(c)}clearTimeout(this.closing);if(this._trigger("search",c)===false){return
}return this._search(d)},_search:function(c){this.element.addClass("ui-autocomplete-loading");this.source({term:c},this.response)
},_response:function(c){if(c&&c.length){c=this._normalize(c);this._suggest(c);this._trigger("open")}else{this.close()}this.element.removeClass("ui-autocomplete-loading")
},close:function(c){clearTimeout(this.closing);if(this.menu.element.is(":visible")){this._trigger("close",c);this.menu.element.hide();
this.menu.deactivate()}},_change:function(c){if(this.previous!==this.element.val()){this._trigger("change",c,{item:this.selectedItem})
}},_normalize:function(c){if(c.length&&c[0].label&&c[0].value){return c}return a.map(c,function(d){if(typeof d==="string"){return{label:d,value:d}
}return a.extend({label:d.label||d.value,value:d.value||d.label},d)})},_suggest:function(c){var d=this.menu.element.empty().zIndex(this.element.zIndex()+1);
this._renderMenu(d,c);this.menu.deactivate();this.menu.refresh();this.menu.element.show().position(a.extend({of:this.element},this.options.position));
this._resizeMenu()},_resizeMenu:function(){var c=this.menu.element;c.outerWidth(Math.max(c.width("").outerWidth(),this.element.outerWidth()))
},_renderMenu:function(e,d){var c=this;a.each(d,function(f,g){c._renderItem(e,g)})},_renderItem:function(c,d){return a("<li></li>").data("item.autocomplete",d).append(a("<a></a>").text(d.label)).appendTo(c)
},_move:function(d,c){if(!this.menu.element.is(":visible")){this.search(null,c);return}if(this.menu.first()&&/^previous/.test(d)||this.menu.last()&&/^next/.test(d)){this.element.val(this.term);
this.menu.deactivate();return}this.menu[d](c)},widget:function(){return this.menu.element}});a.extend(a.ui.autocomplete,{escapeRegex:function(c){return c.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")
},filter:function(e,c){var d=new RegExp(a.ui.autocomplete.escapeRegex(c),"i");return a.grep(e,function(f){return d.test(f.label||f.value||f)
})}})}(jQuery));(function(a){a.widget("ui.menu",{_create:function(){var b=this;this.element.addClass("ui-menu ui-widget ui-widget-content ui-corner-all").attr({role:"listbox","aria-activedescendant":"ui-active-menuitem"}).click(function(c){if(!a(c.target).closest(".ui-menu-item a").length){return
}c.preventDefault();b.select(c)});this.refresh()},refresh:function(){var c=this;var b=this.element.children("li:not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","menuitem");
b.children("a").addClass("ui-corner-all").attr("tabindex",-1).mouseenter(function(d){c.activate(d,a(this).parent())}).mouseleave(function(){c.deactivate()
})},activate:function(e,d){this.deactivate();if(this.hasScroll()){var f=d.offset().top-this.element.offset().top,b=this.element.attr("scrollTop"),c=this.element.height();
if(f<0){this.element.attr("scrollTop",b+f)}else{if(f>=c){this.element.attr("scrollTop",b+f-c+d.height())}}}this.active=d.eq(0).children("a").addClass("ui-state-hover").attr("id","ui-active-menuitem").end();
this._trigger("focus",e,{item:d})},deactivate:function(){if(!this.active){return}this.active.children("a").removeClass("ui-state-hover").removeAttr("id");
this._trigger("blur");this.active=null},next:function(b){this.move("next",".ui-menu-item:first",b)},previous:function(b){this.move("prev",".ui-menu-item:last",b)
},first:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},last:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length
},move:function(e,d,c){if(!this.active){this.activate(c,this.element.children(d));return}var b=this.active[e+"All"](".ui-menu-item").eq(0);
if(b.length){this.activate(c,b)}else{this.activate(c,this.element.children(d))}},nextPage:function(d){if(this.hasScroll()){if(!this.active||this.last()){this.activate(d,this.element.children(".ui-menu-item:first"));
return}var e=this.active.offset().top,c=this.element.height(),b=this.element.children(".ui-menu-item").filter(function(){var f=a(this).offset().top-e-c+a(this).height();
return f<10&&f>-10});if(!b.length){b=this.element.children(".ui-menu-item:last")}this.activate(d,b)}else{this.activate(d,this.element.children(".ui-menu-item").filter(!this.active||this.last()?":first":":last"))
}},previousPage:function(c){if(this.hasScroll()){if(!this.active||this.first()){this.activate(c,this.element.children(".ui-menu-item:last"));
return}var d=this.active.offset().top,b=this.element.height();result=this.element.children(".ui-menu-item").filter(function(){var e=a(this).offset().top-d+b-a(this).height();
return e<10&&e>-10});if(!result.length){result=this.element.children(".ui-menu-item:first")}this.activate(c,result)}else{this.activate(c,this.element.children(".ui-menu-item").filter(!this.active||this.first()?":last":":first"))
}},hasScroll:function(){return this.element.height()<this.element.attr("scrollHeight")},select:function(b){this._trigger("selected",b,{item:this.active})
}})}(jQuery));(function(e,h){var c,b="ui-button ui-widget ui-state-default ui-corner-all",g="ui-state-hover ui-state-active ",f="ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",d=function(i){e(":ui-button",i.target.form).each(function(){var j=e(this).data("button");
setTimeout(function(){j.refresh()},1)})},a=function(j){var i=j.name,k=j.form,l=e([]);if(i){if(k){l=e(k).find("[name='"+i+"']")
}else{l=e("[name='"+i+"']",j.ownerDocument).filter(function(){return !this.form})}}return l};e.widget("ui.button",{options:{disabled:null,text:true,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset.button").bind("reset.button",d);
if(typeof this.options.disabled!=="boolean"){this.options.disabled=this.element.attr("disabled")}this._determineButtonType();
this.hasTitle=!!this.buttonElement.attr("title");var i=this,k=this.options,l=this.type==="checkbox"||this.type==="radio",m="ui-state-hover"+(!l?" ui-state-active":""),j="ui-state-focus";
if(k.label===null){k.label=this.buttonElement.html()}if(this.element.is(":disabled")){k.disabled=true}this.buttonElement.addClass(b).attr("role","button").bind("mouseenter.button",function(){if(k.disabled){return
}e(this).addClass("ui-state-hover");if(this===c){e(this).addClass("ui-state-active")}}).bind("mouseleave.button",function(){if(k.disabled){return
}e(this).removeClass(m)}).bind("focus.button",function(){e(this).addClass(j)}).bind("blur.button",function(){e(this).removeClass(j)
});if(l){this.element.bind("change.button",function(){i.refresh()})}if(this.type==="checkbox"){this.buttonElement.bind("click.button",function(){if(k.disabled){return false
}e(this).toggleClass("ui-state-active");i.buttonElement.attr("aria-pressed",i.element[0].checked)})}else{if(this.type==="radio"){this.buttonElement.bind("click.button",function(){if(k.disabled){return false
}e(this).addClass("ui-state-active");i.buttonElement.attr("aria-pressed",true);var n=i.element[0];a(n).not(n).map(function(){return e(this).button("widget")[0]
}).removeClass("ui-state-active").attr("aria-pressed",false)})}else{this.buttonElement.bind("mousedown.button",function(){if(k.disabled){return false
}e(this).addClass("ui-state-active");c=this;e(document).one("mouseup",function(){c=null})}).bind("mouseup.button",function(){if(k.disabled){return false
}e(this).removeClass("ui-state-active")}).bind("keydown.button",function(n){if(k.disabled){return false}if(n.keyCode==e.ui.keyCode.SPACE||n.keyCode==e.ui.keyCode.ENTER){e(this).addClass("ui-state-active")
}}).bind("keyup.button",function(){e(this).removeClass("ui-state-active")});if(this.buttonElement.is("a")){this.buttonElement.keyup(function(n){if(n.keyCode===e.ui.keyCode.SPACE){e(this).click()
}})}}}this._setOption("disabled",k.disabled)},_determineButtonType:function(){if(this.element.is(":checkbox")){this.type="checkbox"
}else{if(this.element.is(":radio")){this.type="radio"}else{if(this.element.is("input")){this.type="input"}else{this.type="button"
}}}if(this.type==="checkbox"||this.type==="radio"){this.buttonElement=this.element.parents().last().find("label[for="+this.element.attr("id")+"]");
this.element.addClass("ui-helper-hidden-accessible");var i=this.element.is(":checked");if(i){this.buttonElement.addClass("ui-state-active")
}this.buttonElement.attr("aria-pressed",i)}else{this.buttonElement=this.element}},widget:function(){return this.buttonElement
},destroy:function(){this.element.removeClass("ui-helper-hidden-accessible");this.buttonElement.removeClass(b+" "+g+" "+f).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html());
if(!this.hasTitle){this.buttonElement.removeAttr("title")}e.Widget.prototype.destroy.call(this)},_setOption:function(i,j){e.Widget.prototype._setOption.apply(this,arguments);
if(i==="disabled"){if(j){this.element.attr("disabled",true)}else{this.element.removeAttr("disabled")}}this._resetButton()
},refresh:function(){var i=this.element.is(":disabled");if(i!==this.options.disabled){this._setOption("disabled",i)}if(this.type==="radio"){a(this.element[0]).each(function(){if(e(this).is(":checked")){e(this).button("widget").addClass("ui-state-active").attr("aria-pressed",true)
}else{e(this).button("widget").removeClass("ui-state-active").attr("aria-pressed",false)}})}else{if(this.type==="checkbox"){if(this.element.is(":checked")){this.buttonElement.addClass("ui-state-active").attr("aria-pressed",true)
}else{this.buttonElement.removeClass("ui-state-active").attr("aria-pressed",false)}}}},_resetButton:function(){if(this.type==="input"){if(this.options.label){this.element.val(this.options.label)
}return}var l=this.buttonElement.removeClass(f),k=e("<span></span>").addClass("ui-button-text").html(this.options.label).appendTo(l.empty()).text(),j=this.options.icons,i=j.primary&&j.secondary;
if(j.primary||j.secondary){l.addClass("ui-button-text-icon"+(i?"s":(j.primary?"-primary":"-secondary")));if(j.primary){l.prepend("<span class='ui-button-icon-primary ui-icon "+j.primary+"'></span>")
}if(j.secondary){l.append("<span class='ui-button-icon-secondary ui-icon "+j.secondary+"'></span>")}if(!this.options.text){l.addClass(i?"ui-button-icons-only":"ui-button-icon-only").removeClass("ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary");
if(!this.hasTitle){l.attr("title",k)}}}else{l.addClass("ui-button-text-only")}}});e.widget("ui.buttonset",{_create:function(){this.element.addClass("ui-buttonset")
},_init:function(){this.refresh()},_setOption:function(i,j){if(i==="disabled"){this.buttons.button("option",i,j)}e.Widget.prototype._setOption.apply(this,arguments)
},refresh:function(){this.buttons=this.element.find(":button, :submit, :reset, :checkbox, :radio, a, :data(button)").filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return e(this).button("widget")[0]
}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":visible").filter(":first").addClass("ui-corner-left").end().filter(":last").addClass("ui-corner-right").end().end().end()
},destroy:function(){this.element.removeClass("ui-buttonset");this.buttons.map(function(){return e(this).button("widget")[0]
}).removeClass("ui-corner-left ui-corner-right").end().button("destroy");e.Widget.prototype.destroy.call(this)}})}(jQuery));
(function(d,e){var b="ui-dialog ui-widget ui-widget-content ui-corner-all ",a={buttons:true,height:true,maxHeight:true,maxWidth:true,minHeight:true,minWidth:true,width:true},c={maxHeight:true,maxWidth:true,minHeight:true,minWidth:true};
d.widget("ui.dialog",{options:{autoOpen:true,buttons:{},closeOnEscape:true,closeText:"close",dialogClass:"",draggable:true,hide:null,height:"auto",maxHeight:false,maxWidth:false,minHeight:150,minWidth:150,modal:false,position:{my:"center",at:"center",of:window,collision:"fit",using:function(g){var f=d(this).css(g).offset().top;
if(f<0){d(this).css("top",g.top-f)}}},resizable:true,show:null,stack:true,title:"",width:300,zIndex:1000},_create:function(){this.originalTitle=this.element.attr("title");
if(typeof this.originalTitle!=="string"){this.originalTitle=""}this.options.title=this.options.title||this.originalTitle;
var n=this,o=n.options,l=o.title||"&#160;",g=d.ui.dialog.getTitleId(n.element),m=(n.uiDialog=d("<div></div>")).appendTo(document.body).hide().addClass(b+o.dialogClass).css({zIndex:o.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(p){if(o.closeOnEscape&&p.keyCode&&p.keyCode===d.ui.keyCode.ESCAPE){n.close(p);
p.preventDefault()}}).attr({role:"dialog","aria-labelledby":g}).mousedown(function(p){n.moveToTop(false,p)}),i=n.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(m),h=(n.uiDialogTitlebar=d("<div></div>")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(m),k=d('<a href="#"></a>').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){k.addClass("ui-state-hover")
},function(){k.removeClass("ui-state-hover")}).focus(function(){k.addClass("ui-state-focus")}).blur(function(){k.removeClass("ui-state-focus")
}).click(function(p){n.close(p);return false}).appendTo(h),j=(n.uiDialogTitlebarCloseText=d("<span></span>")).addClass("ui-icon ui-icon-closethick").text(o.closeText).appendTo(k),f=d("<span></span>").addClass("ui-dialog-title").attr("id",g).html(l).prependTo(h);
if(d.isFunction(o.beforeclose)&&!d.isFunction(o.beforeClose)){o.beforeClose=o.beforeclose}h.find("*").add(h).disableSelection();
if(o.draggable&&d.fn.draggable){n._makeDraggable()}if(o.resizable&&d.fn.resizable){n._makeResizable()}n._createButtons(o.buttons);
n._isOpen=false;if(d.fn.bgiframe){m.bgiframe()}},_init:function(){if(this.options.autoOpen){this.open()}},destroy:function(){var f=this;
if(f.overlay){f.overlay.destroy()}f.uiDialog.hide();f.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body");
f.uiDialog.remove();if(f.originalTitle){f.element.attr("title",f.originalTitle)}return f},widget:function(){return this.uiDialog
},close:function(h){var f=this,g;if(false===f._trigger("beforeClose",h)){return}if(f.overlay){f.overlay.destroy()}f.uiDialog.unbind("keypress.ui-dialog");
f._isOpen=false;if(f.options.hide){f.uiDialog.hide(f.options.hide,function(){f._trigger("close",h)})}else{f.uiDialog.hide();
f._trigger("close",h)}d.ui.dialog.overlay.resize();if(f.options.modal){g=0;d(".ui-dialog").each(function(){if(this!==f.uiDialog[0]){g=Math.max(g,d(this).css("z-index"))
}});d.ui.dialog.maxZ=g}return f},isOpen:function(){return this._isOpen},moveToTop:function(j,i){var f=this,h=f.options,g;
if((h.modal&&!j)||(!h.stack&&!h.modal)){return f._trigger("focus",i)}if(h.zIndex>d.ui.dialog.maxZ){d.ui.dialog.maxZ=h.zIndex
}if(f.overlay){d.ui.dialog.maxZ+=1;f.overlay.$el.css("z-index",d.ui.dialog.overlay.maxZ=d.ui.dialog.maxZ)}g={scrollTop:f.element.attr("scrollTop"),scrollLeft:f.element.attr("scrollLeft")};
d.ui.dialog.maxZ+=1;f.uiDialog.css("z-index",d.ui.dialog.maxZ);f.element.attr(g);f._trigger("focus",i);return f},open:function(){if(this._isOpen){return
}var g=this,h=g.options,f=g.uiDialog;g.overlay=h.modal?new d.ui.dialog.overlay(g):null;g._size();g._position(h.position);
f.show(h.show);g.moveToTop(true);if(h.modal){f.bind("keypress.ui-dialog",function(k){if(k.keyCode!==d.ui.keyCode.TAB){return
}var j=d(":tabbable",this),l=j.filter(":first"),i=j.filter(":last");if(k.target===i[0]&&!k.shiftKey){l.focus(1);return false
}else{if(k.target===l[0]&&k.shiftKey){i.focus(1);return false}}})}d(g.element.find(":tabbable").get().concat(f.find(".ui-dialog-buttonpane :tabbable").get().concat(f.get()))).eq(0).focus();
g._isOpen=true;g._trigger("open");return g},_createButtons:function(i){var h=this,f=false,g=d("<div></div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),j=d("<div></div>").addClass("ui-dialog-buttonset").appendTo(g);
h.uiDialog.find(".ui-dialog-buttonpane").remove();if(typeof i==="object"&&i!==null){d.each(i,function(){return !(f=true)})
}if(f){d.each(i,function(k,m){m=d.isFunction(m)?{click:m,text:k}:m;var l=d('<button type="button"></button>').attr(m,true).unbind("click").click(function(){m.click.apply(h.element[0],arguments)
}).appendTo(j);if(d.fn.button){l.button()}});g.appendTo(h.uiDialog)}},_makeDraggable:function(){var f=this,i=f.options,j=d(document),h;
function g(k){return{position:k.position,offset:k.offset}}f.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(k,l){h=i.height==="auto"?"auto":d(this).height();
d(this).height(d(this).height()).addClass("ui-dialog-dragging");f._trigger("dragStart",k,g(l))},drag:function(k,l){f._trigger("drag",k,g(l))
},stop:function(k,l){i.position=[l.position.left-j.scrollLeft(),l.position.top-j.scrollTop()];d(this).removeClass("ui-dialog-dragging").height(h);
f._trigger("dragStop",k,g(l));d.ui.dialog.overlay.resize()}})},_makeResizable:function(k){k=(k===e?this.options.resizable:k);
var g=this,j=g.options,f=g.uiDialog.css("position"),i=(typeof k==="string"?k:"n,e,s,w,se,sw,ne,nw");function h(l){return{originalPosition:l.originalPosition,originalSize:l.originalSize,position:l.position,size:l.size}
}g.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:g.element,maxWidth:j.maxWidth,maxHeight:j.maxHeight,minWidth:j.minWidth,minHeight:g._minHeight(),handles:i,start:function(l,m){d(this).addClass("ui-dialog-resizing");
g._trigger("resizeStart",l,h(m))},resize:function(l,m){g._trigger("resize",l,h(m))},stop:function(l,m){d(this).removeClass("ui-dialog-resizing");
j.height=d(this).height();j.width=d(this).width();g._trigger("resizeStop",l,h(m));d.ui.dialog.overlay.resize()}}).css("position",f).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")
},_minHeight:function(){var f=this.options;if(f.height==="auto"){return f.minHeight}else{return Math.min(f.minHeight,f.height)
}},_position:function(g){var h=[],i=[0,0],f;if(g){if(typeof g==="string"||(typeof g==="object"&&"0" in g)){h=g.split?g.split(" "):[g[0],g[1]];
if(h.length===1){h[1]=h[0]}d.each(["left","top"],function(k,j){if(+h[k]===h[k]){i[k]=h[k];h[k]=j}});g={my:h.join(" "),at:h.join(" "),offset:i.join(" ")}
}g=d.extend({},d.ui.dialog.prototype.options.position,g)}else{g=d.ui.dialog.prototype.options.position}f=this.uiDialog.is(":visible");
if(!f){this.uiDialog.show()}this.uiDialog.css({top:0,left:0}).position(g);if(!f){this.uiDialog.hide()}},_setOptions:function(i){var g=this,f={},h=false;
d.each(i,function(j,k){g._setOption(j,k);if(j in a){h=true}if(j in c){f[j]=k}});if(h){this._size()}if(this.uiDialog.is(":data(resizable)")){this.uiDialog.resizable("option",f)
}},_setOption:function(i,j){var g=this,f=g.uiDialog;switch(i){case"beforeclose":i="beforeClose";break;case"buttons":g._createButtons(j);
break;case"closeText":g.uiDialogTitlebarCloseText.text(""+j);break;case"dialogClass":f.removeClass(g.options.dialogClass).addClass(b+j);
break;case"disabled":if(j){f.addClass("ui-dialog-disabled")}else{f.removeClass("ui-dialog-disabled")}break;case"draggable":var h=f.is(":data(draggable)");
if(h&&!j){f.draggable("destroy")}if(!h&&j){g._makeDraggable()}break;case"position":g._position(j);break;case"resizable":var k=f.is(":data(resizable)");
if(k&&!j){f.resizable("destroy")}if(k&&typeof j==="string"){f.resizable("option","handles",j)}if(!k&&j!==false){g._makeResizable(j)
}break;case"title":d(".ui-dialog-title",g.uiDialogTitlebar).html(""+(j||"&#160;"));break}d.Widget.prototype._setOption.apply(g,arguments)
},_size:function(){var i=this.options,f,h;this.element.show().css({width:"auto",minHeight:0,height:0});if(i.minWidth>i.width){i.width=i.minWidth
}f=this.uiDialog.css({height:"auto",width:i.width}).height();h=Math.max(0,i.minHeight-f);if(i.height==="auto"){if(d.support.minHeight){this.element.css({minHeight:h,height:"auto"})
}else{this.uiDialog.show();var g=this.element.css("height","auto").height();this.uiDialog.hide();this.element.height(Math.max(g,h))
}}else{this.element.height(Math.max(i.height-f,0))}if(this.uiDialog.is(":data(resizable)")){this.uiDialog.resizable("option","minHeight",this._minHeight())
}}});d.extend(d.ui.dialog,{version:"1.8.6",uuid:0,maxZ:0,getTitleId:function(f){var g=f.attr("id");if(!g){this.uuid+=1;g=this.uuid
}return"ui-dialog-title-"+g},overlay:function(f){this.$el=d.ui.dialog.overlay.create(f)}});d.extend(d.ui.dialog.overlay,{instances:[],oldInstances:[],maxZ:0,events:d.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(f){return f+".dialog-overlay"
}).join(" "),create:function(g){if(this.instances.length===0){setTimeout(function(){if(d.ui.dialog.overlay.instances.length){d(document).bind(d.ui.dialog.overlay.events,function(h){if(d(h.target).zIndex()<d.ui.dialog.overlay.maxZ){return false
}})}},1);d(document).bind("keydown.dialog-overlay",function(h){if(g.options.closeOnEscape&&h.keyCode&&h.keyCode===d.ui.keyCode.ESCAPE){g.close(h);
h.preventDefault()}});d(window).bind("resize.dialog-overlay",d.ui.dialog.overlay.resize)}var f=(this.oldInstances.pop()||d("<div></div>").addClass("ui-widget-overlay")).appendTo(document.body).css({width:this.width(),height:this.height()});
if(d.fn.bgiframe){f.bgiframe()}this.instances.push(f);return f},destroy:function(f){this.oldInstances.push(this.instances.splice(d.inArray(f,this.instances),1)[0]);
if(this.instances.length===0){d([document,window]).unbind(".dialog-overlay")}f.remove();var g=0;d.each(this.instances,function(){g=Math.max(g,this.css("z-index"))
});this.maxZ=g},height:function(){var g,f;if(d.browser.msie&&d.browser.version<7){g=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);
f=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);if(g<f){return d(window).height()+"px"}else{return g+"px"
}}else{return d(document).height()+"px"}},width:function(){var f,g;if(d.browser.msie&&d.browser.version<7){f=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth);
g=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth);if(f<g){return d(window).width()+"px"}else{return f+"px"
}}else{return d(document).width()+"px"}},resize:function(){var f=d([]);d.each(d.ui.dialog.overlay.instances,function(){f=f.add(this)
});f.css({width:0,height:0}).css({width:d.ui.dialog.overlay.width(),height:d.ui.dialog.overlay.height()})}});d.extend(d.ui.dialog.overlay.prototype,{destroy:function(){d.ui.dialog.overlay.destroy(this.$el)
}})}(jQuery));(function(b,c){var a=5;b.widget("ui.slider",b.ui.mouse,{widgetEventPrefix:"slide",options:{animate:false,distance:0,max:100,min:0,orientation:"horizontal",range:false,step:1,value:0,values:null},_create:function(){var d=this,e=this.options;
this._keySliding=false;this._mouseSliding=false;this._animateOff=true;this._handleIndex=null;this._detectOrientation();this._mouseInit();
this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all");if(e.disabled){this.element.addClass("ui-slider-disabled ui-disabled")
}this.range=b([]);if(e.range){if(e.range===true){this.range=b("<div></div>");if(!e.values){e.values=[this._valueMin(),this._valueMin()]
}if(e.values.length&&e.values.length!==2){e.values=[e.values[0],e.values[0]]}}else{this.range=b("<div></div>")}this.range.appendTo(this.element).addClass("ui-slider-range");
if(e.range==="min"||e.range==="max"){this.range.addClass("ui-slider-range-"+e.range)}this.range.addClass("ui-widget-header")
}if(b(".ui-slider-handle",this.element).length===0){b("<a href='#'></a>").appendTo(this.element).addClass("ui-slider-handle")
}if(e.values&&e.values.length){while(b(".ui-slider-handle",this.element).length<e.values.length){b("<a href='#'></a>").appendTo(this.element).addClass("ui-slider-handle")
}}this.handles=b(".ui-slider-handle",this.element).addClass("ui-state-default ui-corner-all");this.handle=this.handles.eq(0);
this.handles.add(this.range).filter("a").click(function(f){f.preventDefault()}).hover(function(){if(!e.disabled){b(this).addClass("ui-state-hover")
}},function(){b(this).removeClass("ui-state-hover")}).focus(function(){if(!e.disabled){b(".ui-slider .ui-state-focus").removeClass("ui-state-focus");
b(this).addClass("ui-state-focus")}else{b(this).blur()}}).blur(function(){b(this).removeClass("ui-state-focus")});this.handles.each(function(f){b(this).data("index.ui-slider-handle",f)
});this.handles.keydown(function(k){var h=true,g=b(this).data("index.ui-slider-handle"),l,i,f,j;if(d.options.disabled){return
}switch(k.keyCode){case b.ui.keyCode.HOME:case b.ui.keyCode.END:case b.ui.keyCode.PAGE_UP:case b.ui.keyCode.PAGE_DOWN:case b.ui.keyCode.UP:case b.ui.keyCode.RIGHT:case b.ui.keyCode.DOWN:case b.ui.keyCode.LEFT:h=false;
if(!d._keySliding){d._keySliding=true;b(this).addClass("ui-state-active");l=d._start(k,g);if(l===false){return}}break}j=d.options.step;
if(d.options.values&&d.options.values.length){i=f=d.values(g)}else{i=f=d.value()}switch(k.keyCode){case b.ui.keyCode.HOME:f=d._valueMin();
break;case b.ui.keyCode.END:f=d._valueMax();break;case b.ui.keyCode.PAGE_UP:f=d._trimAlignValue(i+((d._valueMax()-d._valueMin())/a));
break;case b.ui.keyCode.PAGE_DOWN:f=d._trimAlignValue(i-((d._valueMax()-d._valueMin())/a));break;case b.ui.keyCode.UP:case b.ui.keyCode.RIGHT:if(i===d._valueMax()){return
}f=d._trimAlignValue(i+j);break;case b.ui.keyCode.DOWN:case b.ui.keyCode.LEFT:if(i===d._valueMin()){return}f=d._trimAlignValue(i-j);
break}d._slide(k,g,f);return h}).keyup(function(g){var f=b(this).data("index.ui-slider-handle");if(d._keySliding){d._keySliding=false;
d._stop(g,f);d._change(g,f);b(this).removeClass("ui-state-active")}});this._refreshValue();this._animateOff=false},destroy:function(){this.handles.remove();
this.range.remove();this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider");
this._mouseDestroy();return this},_mouseCapture:function(f){var g=this.options,j,l,e,h,n,k,m,i,d;if(g.disabled){return false
}this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();
j={x:f.pageX,y:f.pageY};l=this._normValueFromMouse(j);e=this._valueMax()-this._valueMin()+1;n=this;this.handles.each(function(o){var p=Math.abs(l-n.values(o));
if(e>p){e=p;h=b(this);k=o}});if(g.range===true&&this.values(1)===g.min){k+=1;h=b(this.handles[k])}m=this._start(f,k);if(m===false){return false
}this._mouseSliding=true;n._handleIndex=k;h.addClass("ui-state-active").focus();i=h.offset();d=!b(f.target).parents().andSelf().is(".ui-slider-handle");
this._clickOffset=d?{left:0,top:0}:{left:f.pageX-i.left-(h.width()/2),top:f.pageY-i.top-(h.height()/2)-(parseInt(h.css("borderTopWidth"),10)||0)-(parseInt(h.css("borderBottomWidth"),10)||0)+(parseInt(h.css("marginTop"),10)||0)};
this._slide(f,k,l);this._animateOff=true;return true},_mouseStart:function(d){return true},_mouseDrag:function(f){var d={x:f.pageX,y:f.pageY},e=this._normValueFromMouse(d);
this._slide(f,this._handleIndex,e);return false},_mouseStop:function(d){this.handles.removeClass("ui-state-active");this._mouseSliding=false;
this._stop(d,this._handleIndex);this._change(d,this._handleIndex);this._handleIndex=null;this._clickOffset=null;this._animateOff=false;
return false},_detectOrientation:function(){this.orientation=(this.options.orientation==="vertical")?"vertical":"horizontal"
},_normValueFromMouse:function(e){var d,h,g,f,i;if(this.orientation==="horizontal"){d=this.elementSize.width;h=e.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)
}else{d=this.elementSize.height;h=e.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}g=(h/d);if(g>1){g=1
}if(g<0){g=0}if(this.orientation==="vertical"){g=1-g}f=this._valueMax()-this._valueMin();i=this._valueMin()+g*f;return this._trimAlignValue(i)
},_start:function(f,e){var d={handle:this.handles[e],value:this.value()};if(this.options.values&&this.options.values.length){d.value=this.values(e);
d.values=this.values()}return this._trigger("start",f,d)},_slide:function(h,g,f){var d,e,i;if(this.options.values&&this.options.values.length){d=this.values(g?0:1);
if((this.options.values.length===2&&this.options.range===true)&&((g===0&&f>d)||(g===1&&f<d))){f=d}if(f!==this.values(g)){e=this.values();
e[g]=f;i=this._trigger("slide",h,{handle:this.handles[g],value:f,values:e});d=this.values(g?0:1);if(i!==false){this.values(g,f,true)
}}}else{if(f!==this.value()){i=this._trigger("slide",h,{handle:this.handles[g],value:f});if(i!==false){this.value(f)}}}},_stop:function(f,e){var d={handle:this.handles[e],value:this.value()};
if(this.options.values&&this.options.values.length){d.value=this.values(e);d.values=this.values()}this._trigger("stop",f,d)
},_change:function(f,e){if(!this._keySliding&&!this._mouseSliding){var d={handle:this.handles[e],value:this.value()};if(this.options.values&&this.options.values.length){d.value=this.values(e);
d.values=this.values()}this._trigger("change",f,d)}},value:function(d){if(arguments.length){this.options.value=this._trimAlignValue(d);
this._refreshValue();this._change(null,0)}return this._value()},values:function(e,h){var g,d,f;if(arguments.length>1){this.options.values[e]=this._trimAlignValue(h);
this._refreshValue();this._change(null,e)}if(arguments.length){if(b.isArray(arguments[0])){g=this.options.values;d=arguments[0];
for(f=0;f<g.length;f+=1){g[f]=this._trimAlignValue(d[f]);this._change(null,f)}this._refreshValue()}else{if(this.options.values&&this.options.values.length){return this._values(e)
}else{return this.value()}}}else{return this._values()}},_setOption:function(e,f){var d,g=0;if(b.isArray(this.options.values)){g=this.options.values.length
}b.Widget.prototype._setOption.apply(this,arguments);switch(e){case"disabled":if(f){this.handles.filter(".ui-state-focus").blur();
this.handles.removeClass("ui-state-hover");this.handles.attr("disabled","disabled");this.element.addClass("ui-disabled")}else{this.handles.removeAttr("disabled");
this.element.removeClass("ui-disabled")}break;case"orientation":this._detectOrientation();this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation);
this._refreshValue();break;case"value":this._animateOff=true;this._refreshValue();this._change(null,0);this._animateOff=false;
break;case"values":this._animateOff=true;this._refreshValue();for(d=0;d<g;d+=1){this._change(null,d)}this._animateOff=false;
break}},_value:function(){var d=this.options.value;d=this._trimAlignValue(d);return d},_values:function(d){var g,f,e;if(arguments.length){g=this.options.values[d];
g=this._trimAlignValue(g);return g}else{f=this.options.values.slice();for(e=0;e<f.length;e+=1){f[e]=this._trimAlignValue(f[e])
}return f}},_trimAlignValue:function(g){if(g<this._valueMin()){return this._valueMin()}if(g>this._valueMax()){return this._valueMax()
}var d=(this.options.step>0)?this.options.step:1,f=g%d,e=g-f;if(Math.abs(f)*2>=d){e+=(f>0)?d:(-d)}return parseFloat(e.toFixed(5))
},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var g=this.options.range,f=this.options,m=this,e=(!this._animateOff)?f.animate:false,h,d={},i,k,j,l;
if(this.options.values&&this.options.values.length){this.handles.each(function(o,n){h=(m.values(o)-m._valueMin())/(m._valueMax()-m._valueMin())*100;
d[m.orientation==="horizontal"?"left":"bottom"]=h+"%";b(this).stop(1,1)[e?"animate":"css"](d,f.animate);if(m.options.range===true){if(m.orientation==="horizontal"){if(o===0){m.range.stop(1,1)[e?"animate":"css"]({left:h+"%"},f.animate)
}if(o===1){m.range[e?"animate":"css"]({width:(h-i)+"%"},{queue:false,duration:f.animate})}}else{if(o===0){m.range.stop(1,1)[e?"animate":"css"]({bottom:(h)+"%"},f.animate)
}if(o===1){m.range[e?"animate":"css"]({height:(h-i)+"%"},{queue:false,duration:f.animate})}}}i=h})}else{k=this.value();j=this._valueMin();
l=this._valueMax();h=(l!==j)?(k-j)/(l-j)*100:0;d[m.orientation==="horizontal"?"left":"bottom"]=h+"%";this.handle.stop(1,1)[e?"animate":"css"](d,f.animate);
if(g==="min"&&this.orientation==="horizontal"){this.range.stop(1,1)[e?"animate":"css"]({width:h+"%"},f.animate)}if(g==="max"&&this.orientation==="horizontal"){this.range[e?"animate":"css"]({width:(100-h)+"%"},{queue:false,duration:f.animate})
}if(g==="min"&&this.orientation==="vertical"){this.range.stop(1,1)[e?"animate":"css"]({height:h+"%"},f.animate)}if(g==="max"&&this.orientation==="vertical"){this.range[e?"animate":"css"]({height:(100-h)+"%"},{queue:false,duration:f.animate})
}}}});b.extend(b.ui.slider,{version:"1.8.6"})}(jQuery));(function(d,f){var c=0,b=0;function e(){return ++c}function a(){return ++b
}d.widget("ui.tabs",{options:{add:null,ajaxOptions:null,cache:false,cookie:null,collapsible:false,disable:null,disabled:[],enable:null,event:"click",fx:null,idPrefix:"ui-tabs-",load:null,panelTemplate:"<div></div>",remove:null,select:null,show:null,spinner:"<em>Loading&#8230;</em>",tabTemplate:"<li><a href='#{href}'><span>#{label}</span></a></li>"},_create:function(){this._tabify(true)
},_setOption:function(g,h){if(g=="selected"){if(this.options.collapsible&&h==this.options.selected){return}this.select(h)
}else{this.options[g]=h;this._tabify()}},_tabId:function(g){return g.title&&g.title.replace(/\s/g,"_").replace(/[^\w\u00c0-\uFFFF-]/g,"")||this.options.idPrefix+e()
},_sanitizeSelector:function(g){return g.replace(/:/g,"\\:")},_cookie:function(){var g=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+a());
return d.cookie.apply(null,[g].concat(d.makeArray(arguments)))},_ui:function(h,g){return{tab:h,panel:g,index:this.anchors.index(h)}
},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var g=d(this);
g.html(g.data("label.tabs")).removeData("label.tabs")})},_tabify:function(u){var v=this,j=this.options,h=/^#.+/;this.list=this.element.find("ol,ul").eq(0);
this.lis=d(" > li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return d("a",this)[0]});this.panels=d([]);
this.anchors.each(function(x,o){var w=d(o).attr("href");var y=w.split("#")[0],z;if(y&&(y===location.toString().split("#")[0]||(z=d("base")[0])&&y===z.href)){w=o.hash;
o.href=w}if(h.test(w)){v.panels=v.panels.add(v._sanitizeSelector(w))}else{if(w&&w!=="#"){d.data(o,"href.tabs",w);d.data(o,"load.tabs",w.replace(/#.*$/,""));
var B=v._tabId(o);o.href="#"+B;var A=d("#"+B);if(!A.length){A=d(j.panelTemplate).attr("id",B).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(v.panels[x-1]||v.list);
A.data("destroy.tabs",true)}v.panels=v.panels.add(A)}else{j.disabled.push(x)}}});if(u){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(j.selected===f){if(location.hash){this.anchors.each(function(w,o){if(o.hash==location.hash){j.selected=w;
return false}})}if(typeof j.selected!=="number"&&j.cookie){j.selected=parseInt(v._cookie(),10)}if(typeof j.selected!=="number"&&this.lis.filter(".ui-tabs-selected").length){j.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))
}j.selected=j.selected||(this.lis.length?0:-1)}else{if(j.selected===null){j.selected=-1}}j.selected=((j.selected>=0&&this.anchors[j.selected])||j.selected<0)?j.selected:0;
j.disabled=d.unique(j.disabled.concat(d.map(this.lis.filter(".ui-state-disabled"),function(w,o){return v.lis.index(w)}))).sort();
if(d.inArray(j.selected,j.disabled)!=-1){j.disabled.splice(d.inArray(j.selected,j.disabled),1)}this.panels.addClass("ui-tabs-hide");
this.lis.removeClass("ui-tabs-selected ui-state-active");if(j.selected>=0&&this.anchors.length){d(v._sanitizeSelector(v.anchors[j.selected].hash)).removeClass("ui-tabs-hide");
this.lis.eq(j.selected).addClass("ui-tabs-selected ui-state-active");v.element.queue("tabs",function(){v._trigger("show",null,v._ui(v.anchors[j.selected],d(v._sanitizeSelector(v.anchors[j.selected].hash))))
});this.load(j.selected)}d(window).bind("unload",function(){v.lis.add(v.anchors).unbind(".tabs");v.lis=v.anchors=v.panels=null
})}else{j.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}this.element[j.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");
if(j.cookie){this._cookie(j.selected,j.cookie)}for(var m=0,s;(s=this.lis[m]);m++){d(s)[d.inArray(m,j.disabled)!=-1&&!d(s).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled")
}if(j.cache===false){this.anchors.removeData("cache.tabs")}this.lis.add(this.anchors).unbind(".tabs");if(j.event!=="mouseover"){var l=function(o,i){if(i.is(":not(.ui-state-disabled)")){i.addClass("ui-state-"+o)
}};var p=function(o,i){i.removeClass("ui-state-"+o)};this.lis.bind("mouseover.tabs",function(){l("hover",d(this))});this.lis.bind("mouseout.tabs",function(){p("hover",d(this))
});this.anchors.bind("focus.tabs",function(){l("focus",d(this).closest("li"))});this.anchors.bind("blur.tabs",function(){p("focus",d(this).closest("li"))
})}var g,n;if(j.fx){if(d.isArray(j.fx)){g=j.fx[0];n=j.fx[1]}else{g=n=j.fx}}function k(i,o){i.css("display","");if(!d.support.opacity&&o.opacity){i[0].style.removeAttribute("filter")
}}var q=n?function(i,o){d(i).closest("li").addClass("ui-tabs-selected ui-state-active");o.hide().removeClass("ui-tabs-hide").animate(n,n.duration||"normal",function(){k(o,n);
v._trigger("show",null,v._ui(i,o[0]))})}:function(i,o){d(i).closest("li").addClass("ui-tabs-selected ui-state-active");o.removeClass("ui-tabs-hide");
v._trigger("show",null,v._ui(i,o[0]))};var r=g?function(o,i){i.animate(g,g.duration||"normal",function(){v.lis.removeClass("ui-tabs-selected ui-state-active");
i.addClass("ui-tabs-hide");k(i,g);v.element.dequeue("tabs")})}:function(o,i,w){v.lis.removeClass("ui-tabs-selected ui-state-active");
i.addClass("ui-tabs-hide");v.element.dequeue("tabs")};this.anchors.bind(j.event+".tabs",function(){var o=this,x=d(o).closest("li"),i=v.panels.filter(":not(.ui-tabs-hide)"),w=d(v._sanitizeSelector(o.hash));
if((x.hasClass("ui-tabs-selected")&&!j.collapsible)||x.hasClass("ui-state-disabled")||x.hasClass("ui-state-processing")||v.panels.filter(":animated").length||v._trigger("select",null,v._ui(this,w[0]))===false){this.blur();
return false}j.selected=v.anchors.index(this);v.abort();if(j.collapsible){if(x.hasClass("ui-tabs-selected")){j.selected=-1;
if(j.cookie){v._cookie(j.selected,j.cookie)}v.element.queue("tabs",function(){r(o,i)}).dequeue("tabs");this.blur();return false
}else{if(!i.length){if(j.cookie){v._cookie(j.selected,j.cookie)}v.element.queue("tabs",function(){q(o,w)});v.load(v.anchors.index(this));
this.blur();return false}}}if(j.cookie){v._cookie(j.selected,j.cookie)}if(w.length){if(i.length){v.element.queue("tabs",function(){r(o,i)
})}v.element.queue("tabs",function(){q(o,w)});v.load(v.anchors.index(this))}else{throw"jQuery UI Tabs: Mismatching fragment identifier."
}if(d.browser.msie){this.blur()}});this.anchors.bind("click.tabs",function(){return false})},_getIndex:function(g){if(typeof g=="string"){g=this.anchors.index(this.anchors.filter("[href$="+g+"]"))
}return g},destroy:function(){var g=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 h=d.data(this,"href.tabs");
if(h){this.href=h}var i=d(this).unbind(".tabs");d.each(["href","load","cache"],function(j,k){i.removeData(k+".tabs")})});
this.lis.unbind(".tabs").add(this.panels).each(function(){if(d.data(this,"destroy.tabs")){d(this).remove()}else{d(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(g.cookie){this._cookie(null,g.cookie)}return this},add:function(j,i,h){if(h===f){h=this.anchors.length}var g=this,l=this.options,n=d(l.tabTemplate.replace(/#\{href\}/g,j).replace(/#\{label\}/g,i)),m=!j.indexOf("#")?j.replace("#",""):this._tabId(d("a",n)[0]);
n.addClass("ui-state-default ui-corner-top").data("destroy.tabs",true);var k=d("#"+m);if(!k.length){k=d(l.panelTemplate).attr("id",m).data("destroy.tabs",true)
}k.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");if(h>=this.lis.length){n.appendTo(this.list);
k.appendTo(this.list[0].parentNode)}else{n.insertBefore(this.lis[h]);k.insertBefore(this.panels[h])}l.disabled=d.map(l.disabled,function(p,o){return p>=h?++p:p
});this._tabify();if(this.anchors.length==1){l.selected=0;n.addClass("ui-tabs-selected ui-state-active");k.removeClass("ui-tabs-hide");
this.element.queue("tabs",function(){g._trigger("show",null,g._ui(g.anchors[0],g.panels[0]))});this.load(0)}this._trigger("add",null,this._ui(this.anchors[h],this.panels[h]));
return this},remove:function(g){g=this._getIndex(g);var i=this.options,j=this.lis.eq(g).remove(),h=this.panels.eq(g).remove();
if(j.hasClass("ui-tabs-selected")&&this.anchors.length>1){this.select(g+(g+1<this.anchors.length?1:-1))}i.disabled=d.map(d.grep(i.disabled,function(l,k){return l!=g
}),function(l,k){return l>=g?--l:l});this._tabify();this._trigger("remove",null,this._ui(j.find("a")[0],h[0]));return this
},enable:function(g){g=this._getIndex(g);var h=this.options;if(d.inArray(g,h.disabled)==-1){return}this.lis.eq(g).removeClass("ui-state-disabled");
h.disabled=d.grep(h.disabled,function(k,j){return k!=g});this._trigger("enable",null,this._ui(this.anchors[g],this.panels[g]));
return this},disable:function(h){h=this._getIndex(h);var g=this,i=this.options;if(h!=i.selected){this.lis.eq(h).addClass("ui-state-disabled");
i.disabled.push(h);i.disabled.sort();this._trigger("disable",null,this._ui(this.anchors[h],this.panels[h]))}return this},select:function(g){g=this._getIndex(g);
if(g==-1){if(this.options.collapsible&&this.options.selected!=-1){g=this.options.selected}else{return this}}this.anchors.eq(g).trigger(this.options.event+".tabs");
return this},load:function(j){j=this._getIndex(j);var h=this,l=this.options,g=this.anchors.eq(j)[0],i=d.data(g,"load.tabs");
this.abort();if(!i||this.element.queue("tabs").length!==0&&d.data(g,"cache.tabs")){this.element.dequeue("tabs");return}this.lis.eq(j).addClass("ui-state-processing");
if(l.spinner){var k=d("span",g);k.data("label.tabs",k.html()).html(l.spinner)}this.xhr=d.ajax(d.extend({},l.ajaxOptions,{url:i,success:function(n,m){d(h._sanitizeSelector(g.hash)).html(n);
h._cleanup();if(l.cache){d.data(g,"cache.tabs",true)}h._trigger("load",null,h._ui(h.anchors[j],h.panels[j]));try{l.ajaxOptions.success(n,m)
}catch(o){}},error:function(o,m,n){h._cleanup();h._trigger("load",null,h._ui(h.anchors[j],h.panels[j]));try{l.ajaxOptions.error(o,m,j,g)
}catch(n){}}}));h.element.dequeue("tabs");return this},abort:function(){this.element.queue([]);this.panels.stop(false,true);
this.element.queue("tabs",this.element.queue("tabs").splice(-2,2));if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup();
return this},url:function(h,g){this.anchors.eq(h).removeData("cache.tabs").data("load.tabs",g);return this},length:function(){return this.anchors.length
}});d.extend(d.ui.tabs,{version:"1.8.6"});d.extend(d.ui.tabs.prototype,{rotation:null,rotate:function(i,k){var g=this,l=this.options;
var h=g._rotate||(g._rotate=function(m){clearTimeout(g.rotation);g.rotation=setTimeout(function(){var n=l.selected;g.select(++n<g.anchors.length?n:0)
},i);if(m){m.stopPropagation()}});var j=g._unrotate||(g._unrotate=!k?function(m){if(m.clientX){g.rotate(null)}}:function(m){t=l.selected;
h()});if(i){this.element.bind("tabsshow",h);this.anchors.bind(l.event+".tabs",j);h()}else{clearTimeout(g.rotation);this.element.unbind("tabsshow",h);
this.anchors.unbind(l.event+".tabs",j);delete this._rotate;delete this._unrotate}return this}})})(jQuery);(function($,undefined){$.extend($.ui,{datepicker:{version:"1.8.6"}});
var PROP_NAME="datepicker";var dpuuid=new Date().getTime();function Datepicker(){this.debug=false;this._curInst=null;this._keyEvent=false;
this._disabledInputs=[];this._datepickerShowing=false;this._inDialog=false;this._mainDivId="ui-datepicker-div";this._inlineClass="ui-datepicker-inline";
this._appendClass="ui-datepicker-append";this._triggerClass="ui-datepicker-trigger";this._dialogClass="ui-datepicker-dialog";
this._disableClass="ui-datepicker-disabled";this._unselectableClass="ui-datepicker-unselectable";this._currentClass="ui-datepicker-current-day";
this._dayOverClass="ui-datepicker-days-cell-over";this.regional=[];this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:false,showMonthAfterYear:false,yearSuffix:""};
this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:false,hideIfNoPrevNext:false,navigationAsDateFormat:false,gotoCurrent:false,changeMonth:false,changeYear:false,yearRange:"c-10:c+10",showOtherMonths:false,selectOtherMonths:false,showWeek:false,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:true,showButtonPanel:false,autoSize:false};
$.extend(this._defaults,this.regional[""]);this.dpDiv=$('<div id="'+this._mainDivId+'" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all ui-helper-hidden-accessible"></div>')
}$.extend(Datepicker.prototype,{markerClassName:"hasDatepicker",log:function(){if(this.debug){console.log.apply("",arguments)
}},_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(settings){extendRemove(this._defaults,settings||{});
return this},_attachDatepicker:function(target,settings){var inlineSettings=null;for(var attrName in this._defaults){var attrValue=target.getAttribute("date:"+attrName);
if(attrValue){inlineSettings=inlineSettings||{};try{inlineSettings[attrName]=eval(attrValue)}catch(err){inlineSettings[attrName]=attrValue
}}}var nodeName=target.nodeName.toLowerCase();var inline=(nodeName=="div"||nodeName=="span");if(!target.id){this.uuid+=1;
target.id="dp"+this.uuid}var inst=this._newInst($(target),inline);inst.settings=$.extend({},settings||{},inlineSettings||{});
if(nodeName=="input"){this._connectDatepicker(target,inst)}else{if(inline){this._inlineDatepicker(target,inst)}}},_newInst:function(target,inline){var id=target[0].id.replace(/([^A-Za-z0-9_-])/g,"\\\\$1");
return{id:id,input:target,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:inline,dpDiv:(!inline?this.dpDiv:$('<div class="'+this._inlineClass+' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))}
},_connectDatepicker:function(target,inst){var input=$(target);inst.append=$([]);inst.trigger=$([]);if(input.hasClass(this.markerClassName)){return
}this._attachments(input,inst);input.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker",function(event,key,value){inst.settings[key]=value
}).bind("getData.datepicker",function(event,key){return this._get(inst,key)});this._autoSize(inst);$.data(target,PROP_NAME,inst)
},_attachments:function(input,inst){var appendText=this._get(inst,"appendText");var isRTL=this._get(inst,"isRTL");if(inst.append){inst.append.remove()
}if(appendText){inst.append=$('<span class="'+this._appendClass+'">'+appendText+"</span>");input[isRTL?"before":"after"](inst.append)
}input.unbind("focus",this._showDatepicker);if(inst.trigger){inst.trigger.remove()}var showOn=this._get(inst,"showOn");if(showOn=="focus"||showOn=="both"){input.focus(this._showDatepicker)
}if(showOn=="button"||showOn=="both"){var buttonText=this._get(inst,"buttonText");var buttonImage=this._get(inst,"buttonImage");
inst.trigger=$(this._get(inst,"buttonImageOnly")?$("<img/>").addClass(this._triggerClass).attr({src:buttonImage,alt:buttonText,title:buttonText}):$('<button type="button"></button>').addClass(this._triggerClass).html(buttonImage==""?buttonText:$("<img/>").attr({src:buttonImage,alt:buttonText,title:buttonText})));
input[isRTL?"before":"after"](inst.trigger);inst.trigger.click(function(){if($.datepicker._datepickerShowing&&$.datepicker._lastInput==input[0]){$.datepicker._hideDatepicker()
}else{$.datepicker._showDatepicker(input[0])}return false})}},_autoSize:function(inst){if(this._get(inst,"autoSize")&&!inst.inline){var date=new Date(2009,12-1,20);
var dateFormat=this._get(inst,"dateFormat");if(dateFormat.match(/[DM]/)){var findMax=function(names){var max=0;var maxI=0;
for(var i=0;i<names.length;i++){if(names[i].length>max){max=names[i].length;maxI=i}}return maxI};date.setMonth(findMax(this._get(inst,(dateFormat.match(/MM/)?"monthNames":"monthNamesShort"))));
date.setDate(findMax(this._get(inst,(dateFormat.match(/DD/)?"dayNames":"dayNamesShort")))+20-date.getDay())}inst.input.attr("size",this._formatDate(inst,date).length)
}},_inlineDatepicker:function(target,inst){var divSpan=$(target);if(divSpan.hasClass(this.markerClassName)){return}divSpan.addClass(this.markerClassName).append(inst.dpDiv).bind("setData.datepicker",function(event,key,value){inst.settings[key]=value
}).bind("getData.datepicker",function(event,key){return this._get(inst,key)});$.data(target,PROP_NAME,inst);this._setDate(inst,this._getDefaultDate(inst),true);
this._updateDatepicker(inst);this._updateAlternate(inst)},_dialogDatepicker:function(input,date,onSelect,settings,pos){var inst=this._dialogInst;
if(!inst){this.uuid+=1;var id="dp"+this.uuid;this._dialogInput=$('<input type="text" id="'+id+'" style="position: absolute; top: -100px; width: 0px; z-index: -10;"/>');
this._dialogInput.keydown(this._doKeyDown);$("body").append(this._dialogInput);inst=this._dialogInst=this._newInst(this._dialogInput,false);
inst.settings={};$.data(this._dialogInput[0],PROP_NAME,inst)}extendRemove(inst.settings,settings||{});date=(date&&date.constructor==Date?this._formatDate(inst,date):date);
this._dialogInput.val(date);this._pos=(pos?(pos.length?pos:[pos.pageX,pos.pageY]):null);if(!this._pos){var browserWidth=document.documentElement.clientWidth;
var browserHeight=document.documentElement.clientHeight;var scrollX=document.documentElement.scrollLeft||document.body.scrollLeft;
var scrollY=document.documentElement.scrollTop||document.body.scrollTop;this._pos=[(browserWidth/2)-100+scrollX,(browserHeight/2)-150+scrollY]
}this._dialogInput.css("left",(this._pos[0]+20)+"px").css("top",this._pos[1]+"px");inst.settings.onSelect=onSelect;this._inDialog=true;
this.dpDiv.addClass(this._dialogClass);this._showDatepicker(this._dialogInput[0]);if($.blockUI){$.blockUI(this.dpDiv)}$.data(this._dialogInput[0],PROP_NAME,inst);
return this},_destroyDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return
}var nodeName=target.nodeName.toLowerCase();$.removeData(target,PROP_NAME);if(nodeName=="input"){inst.append.remove();inst.trigger.remove();
$target.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)
}else{if(nodeName=="div"||nodeName=="span"){$target.removeClass(this.markerClassName).empty()}}},_enableDatepicker:function(target){var $target=$(target);
var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return}var nodeName=target.nodeName.toLowerCase();
if(nodeName=="input"){target.disabled=false;inst.trigger.filter("button").each(function(){this.disabled=false}).end().filter("img").css({opacity:"1.0",cursor:""})
}else{if(nodeName=="div"||nodeName=="span"){var inline=$target.children("."+this._inlineClass);inline.children().removeClass("ui-state-disabled")
}}this._disabledInputs=$.map(this._disabledInputs,function(value){return(value==target?null:value)})},_disableDatepicker:function(target){var $target=$(target);
var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return}var nodeName=target.nodeName.toLowerCase();
if(nodeName=="input"){target.disabled=true;inst.trigger.filter("button").each(function(){this.disabled=true}).end().filter("img").css({opacity:"0.5",cursor:"default"})
}else{if(nodeName=="div"||nodeName=="span"){var inline=$target.children("."+this._inlineClass);inline.children().addClass("ui-state-disabled")
}}this._disabledInputs=$.map(this._disabledInputs,function(value){return(value==target?null:value)});this._disabledInputs[this._disabledInputs.length]=target
},_isDisabledDatepicker:function(target){if(!target){return false}for(var i=0;i<this._disabledInputs.length;i++){if(this._disabledInputs[i]==target){return true
}}return false},_getInst:function(target){try{return $.data(target,PROP_NAME)}catch(err){throw"Missing instance data for this datepicker"
}},_optionDatepicker:function(target,name,value){var inst=this._getInst(target);if(arguments.length==2&&typeof name=="string"){return(name=="defaults"?$.extend({},$.datepicker._defaults):(inst?(name=="all"?$.extend({},inst.settings):this._get(inst,name)):null))
}var settings=name||{};if(typeof name=="string"){settings={};settings[name]=value}if(inst){if(this._curInst==inst){this._hideDatepicker()
}var date=this._getDateDatepicker(target,true);extendRemove(inst.settings,settings);this._attachments($(target),inst);this._autoSize(inst);
this._setDateDatepicker(target,date);this._updateDatepicker(inst)}},_changeDatepicker:function(target,name,value){this._optionDatepicker(target,name,value)
},_refreshDatepicker:function(target){var inst=this._getInst(target);if(inst){this._updateDatepicker(inst)}},_setDateDatepicker:function(target,date){var inst=this._getInst(target);
if(inst){this._setDate(inst,date);this._updateDatepicker(inst);this._updateAlternate(inst)}},_getDateDatepicker:function(target,noDefault){var inst=this._getInst(target);
if(inst&&!inst.inline){this._setDateFromField(inst,noDefault)}return(inst?this._getDate(inst):null)},_doKeyDown:function(event){var inst=$.datepicker._getInst(event.target);
var handled=true;var isRTL=inst.dpDiv.is(".ui-datepicker-rtl");inst._keyEvent=true;if($.datepicker._datepickerShowing){switch(event.keyCode){case 9:$.datepicker._hideDatepicker();
handled=false;break;case 13:var sel=$("td."+$.datepicker._dayOverClass,inst.dpDiv).add($("td."+$.datepicker._currentClass,inst.dpDiv));
if(sel[0]){$.datepicker._selectDay(event.target,inst.selectedMonth,inst.selectedYear,sel[0])}else{$.datepicker._hideDatepicker()
}return false;break;case 27:$.datepicker._hideDatepicker();break;case 33:$.datepicker._adjustDate(event.target,(event.ctrlKey?-$.datepicker._get(inst,"stepBigMonths"):-$.datepicker._get(inst,"stepMonths")),"M");
break;case 34:$.datepicker._adjustDate(event.target,(event.ctrlKey?+$.datepicker._get(inst,"stepBigMonths"):+$.datepicker._get(inst,"stepMonths")),"M");
break;case 35:if(event.ctrlKey||event.metaKey){$.datepicker._clearDate(event.target)}handled=event.ctrlKey||event.metaKey;
break;case 36:if(event.ctrlKey||event.metaKey){$.datepicker._gotoToday(event.target)}handled=event.ctrlKey||event.metaKey;
break;case 37:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,(isRTL?+1:-1),"D")}handled=event.ctrlKey||event.metaKey;
if(event.originalEvent.altKey){$.datepicker._adjustDate(event.target,(event.ctrlKey?-$.datepicker._get(inst,"stepBigMonths"):-$.datepicker._get(inst,"stepMonths")),"M")
}break;case 38:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,-7,"D")}handled=event.ctrlKey||event.metaKey;
break;case 39:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,(isRTL?-1:+1),"D")}handled=event.ctrlKey||event.metaKey;
if(event.originalEvent.altKey){$.datepicker._adjustDate(event.target,(event.ctrlKey?+$.datepicker._get(inst,"stepBigMonths"):+$.datepicker._get(inst,"stepMonths")),"M")
}break;case 40:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,+7,"D")}handled=event.ctrlKey||event.metaKey;
break;default:handled=false}}else{if(event.keyCode==36&&event.ctrlKey){$.datepicker._showDatepicker(this)}else{handled=false
}}if(handled){event.preventDefault();event.stopPropagation()}},_doKeyPress:function(event){var inst=$.datepicker._getInst(event.target);
if($.datepicker._get(inst,"constrainInput")){var chars=$.datepicker._possibleChars($.datepicker._get(inst,"dateFormat"));
var chr=String.fromCharCode(event.charCode==undefined?event.keyCode:event.charCode);return event.ctrlKey||(chr<" "||!chars||chars.indexOf(chr)>-1)
}},_doKeyUp:function(event){var inst=$.datepicker._getInst(event.target);if(inst.input.val()!=inst.lastVal){try{var date=$.datepicker.parseDate($.datepicker._get(inst,"dateFormat"),(inst.input?inst.input.val():null),$.datepicker._getFormatConfig(inst));
if(date){$.datepicker._setDateFromField(inst);$.datepicker._updateAlternate(inst);$.datepicker._updateDatepicker(inst)}}catch(event){$.datepicker.log(event)
}}return true},_showDatepicker:function(input){input=input.target||input;if(input.nodeName.toLowerCase()!="input"){input=$("input",input.parentNode)[0]
}if($.datepicker._isDisabledDatepicker(input)||$.datepicker._lastInput==input){return}var inst=$.datepicker._getInst(input);
if($.datepicker._curInst&&$.datepicker._curInst!=inst){$.datepicker._curInst.dpDiv.stop(true,true)}var beforeShow=$.datepicker._get(inst,"beforeShow");
extendRemove(inst.settings,(beforeShow?beforeShow.apply(input,[input,inst]):{}));inst.lastVal=null;$.datepicker._lastInput=input;
$.datepicker._setDateFromField(inst);if($.datepicker._inDialog){input.value=""}if(!$.datepicker._pos){$.datepicker._pos=$.datepicker._findPos(input);
$.datepicker._pos[1]+=input.offsetHeight}var isFixed=false;$(input).parents().each(function(){isFixed|=$(this).css("position")=="fixed";
return !isFixed});if(isFixed&&$.browser.opera){$.datepicker._pos[0]-=document.documentElement.scrollLeft;$.datepicker._pos[1]-=document.documentElement.scrollTop
}var offset={left:$.datepicker._pos[0],top:$.datepicker._pos[1]};$.datepicker._pos=null;inst.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});
$.datepicker._updateDatepicker(inst);offset=$.datepicker._checkOffset(inst,offset,isFixed);inst.dpDiv.css({position:($.datepicker._inDialog&&$.blockUI?"static":(isFixed?"fixed":"absolute")),display:"none",left:offset.left+"px",top:offset.top+"px"});
if(!inst.inline){var showAnim=$.datepicker._get(inst,"showAnim");var duration=$.datepicker._get(inst,"duration");var postProcess=function(){$.datepicker._datepickerShowing=true;
var borders=$.datepicker._getBorders(inst.dpDiv);inst.dpDiv.find("iframe.ui-datepicker-cover").css({left:-borders[0],top:-borders[1],width:inst.dpDiv.outerWidth(),height:inst.dpDiv.outerHeight()})
};inst.dpDiv.zIndex($(input).zIndex()+1);if($.effects&&$.effects[showAnim]){inst.dpDiv.show(showAnim,$.datepicker._get(inst,"showOptions"),duration,postProcess)
}else{inst.dpDiv[showAnim||"show"]((showAnim?duration:null),postProcess)}if(!showAnim||!duration){postProcess()}if(inst.input.is(":visible")&&!inst.input.is(":disabled")){inst.input.focus()
}$.datepicker._curInst=inst}},_updateDatepicker:function(inst){var self=this;var borders=$.datepicker._getBorders(inst.dpDiv);
inst.dpDiv.empty().append(this._generateHTML(inst)).find("iframe.ui-datepicker-cover").css({left:-borders[0],top:-borders[1],width:inst.dpDiv.outerWidth(),height:inst.dpDiv.outerHeight()}).end().find("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a").bind("mouseout",function(){$(this).removeClass("ui-state-hover");
if(this.className.indexOf("ui-datepicker-prev")!=-1){$(this).removeClass("ui-datepicker-prev-hover")}if(this.className.indexOf("ui-datepicker-next")!=-1){$(this).removeClass("ui-datepicker-next-hover")
}}).bind("mouseover",function(){if(!self._isDisabledDatepicker(inst.inline?inst.dpDiv.parent()[0]:inst.input[0])){$(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");
$(this).addClass("ui-state-hover");if(this.className.indexOf("ui-datepicker-prev")!=-1){$(this).addClass("ui-datepicker-prev-hover")
}if(this.className.indexOf("ui-datepicker-next")!=-1){$(this).addClass("ui-datepicker-next-hover")}}}).end().find("."+this._dayOverClass+" a").trigger("mouseover").end();
var numMonths=this._getNumberOfMonths(inst);var cols=numMonths[1];var width=17;if(cols>1){inst.dpDiv.addClass("ui-datepicker-multi-"+cols).css("width",(width*cols)+"em")
}else{inst.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("")}inst.dpDiv[(numMonths[0]!=1||numMonths[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi");
inst.dpDiv[(this._get(inst,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");if(inst==$.datepicker._curInst&&$.datepicker._datepickerShowing&&inst.input&&inst.input.is(":visible")&&!inst.input.is(":disabled")){inst.input.focus()
}},_getBorders:function(elem){var convert=function(value){return{thin:1,medium:2,thick:3}[value]||value};return[parseFloat(convert(elem.css("border-left-width"))),parseFloat(convert(elem.css("border-top-width")))]
},_checkOffset:function(inst,offset,isFixed){var dpWidth=inst.dpDiv.outerWidth();var dpHeight=inst.dpDiv.outerHeight();var inputWidth=inst.input?inst.input.outerWidth():0;
var inputHeight=inst.input?inst.input.outerHeight():0;var viewWidth=document.documentElement.clientWidth+$(document).scrollLeft();
var viewHeight=document.documentElement.clientHeight+$(document).scrollTop();offset.left-=(this._get(inst,"isRTL")?(dpWidth-inputWidth):0);
offset.left-=(isFixed&&offset.left==inst.input.offset().left)?$(document).scrollLeft():0;offset.top-=(isFixed&&offset.top==(inst.input.offset().top+inputHeight))?$(document).scrollTop():0;
offset.left-=Math.min(offset.left,(offset.left+dpWidth>viewWidth&&viewWidth>dpWidth)?Math.abs(offset.left+dpWidth-viewWidth):0);
offset.top-=Math.min(offset.top,(offset.top+dpHeight>viewHeight&&viewHeight>dpHeight)?Math.abs(dpHeight+inputHeight):0);return offset
},_findPos:function(obj){var inst=this._getInst(obj);var isRTL=this._get(inst,"isRTL");while(obj&&(obj.type=="hidden"||obj.nodeType!=1)){obj=obj[isRTL?"previousSibling":"nextSibling"]
}var position=$(obj).offset();return[position.left,position.top]},_hideDatepicker:function(input){var inst=this._curInst;
if(!inst||(input&&inst!=$.data(input,PROP_NAME))){return}if(this._datepickerShowing){var showAnim=this._get(inst,"showAnim");
var duration=this._get(inst,"duration");var postProcess=function(){$.datepicker._tidyDialog(inst);this._curInst=null};if($.effects&&$.effects[showAnim]){inst.dpDiv.hide(showAnim,$.datepicker._get(inst,"showOptions"),duration,postProcess)
}else{inst.dpDiv[(showAnim=="slideDown"?"slideUp":(showAnim=="fadeIn"?"fadeOut":"hide"))]((showAnim?duration:null),postProcess)
}if(!showAnim){postProcess()}var onClose=this._get(inst,"onClose");if(onClose){onClose.apply((inst.input?inst.input[0]:null),[(inst.input?inst.input.val():""),inst])
}this._datepickerShowing=false;this._lastInput=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});
if($.blockUI){$.unblockUI();$("body").append(this.dpDiv)}}this._inDialog=false}},_tidyDialog:function(inst){inst.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")
},_checkExternalClick:function(event){if(!$.datepicker._curInst){return}var $target=$(event.target);if($target[0].id!=$.datepicker._mainDivId&&$target.parents("#"+$.datepicker._mainDivId).length==0&&!$target.hasClass($.datepicker.markerClassName)&&!$target.hasClass($.datepicker._triggerClass)&&$.datepicker._datepickerShowing&&!($.datepicker._inDialog&&$.blockUI)){$.datepicker._hideDatepicker()
}},_adjustDate:function(id,offset,period){var target=$(id);var inst=this._getInst(target[0]);if(this._isDisabledDatepicker(target[0])){return
}this._adjustInstDate(inst,offset+(period=="M"?this._get(inst,"showCurrentAtPos"):0),period);this._updateDatepicker(inst)
},_gotoToday:function(id){var target=$(id);var inst=this._getInst(target[0]);if(this._get(inst,"gotoCurrent")&&inst.currentDay){inst.selectedDay=inst.currentDay;
inst.drawMonth=inst.selectedMonth=inst.currentMonth;inst.drawYear=inst.selectedYear=inst.currentYear}else{var date=new Date();
inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear()
}this._notifyChange(inst);this._adjustDate(target)},_selectMonthYear:function(id,select,period){var target=$(id);var inst=this._getInst(target[0]);
inst._selectingMonthYear=false;inst["selected"+(period=="M"?"Month":"Year")]=inst["draw"+(period=="M"?"Month":"Year")]=parseInt(select.options[select.selectedIndex].value,10);
this._notifyChange(inst);this._adjustDate(target)},_clickMonthYear:function(id){var target=$(id);var inst=this._getInst(target[0]);
if(inst.input&&inst._selectingMonthYear){setTimeout(function(){inst.input.focus()},0)}inst._selectingMonthYear=!inst._selectingMonthYear
},_selectDay:function(id,month,year,td){var target=$(id);if($(td).hasClass(this._unselectableClass)||this._isDisabledDatepicker(target[0])){return
}var inst=this._getInst(target[0]);inst.selectedDay=inst.currentDay=$("a",td).html();inst.selectedMonth=inst.currentMonth=month;
inst.selectedYear=inst.currentYear=year;this._selectDate(id,this._formatDate(inst,inst.currentDay,inst.currentMonth,inst.currentYear))
},_clearDate:function(id){var target=$(id);var inst=this._getInst(target[0]);this._selectDate(target,"")},_selectDate:function(id,dateStr){var target=$(id);
var inst=this._getInst(target[0]);dateStr=(dateStr!=null?dateStr:this._formatDate(inst));if(inst.input){inst.input.val(dateStr)
}this._updateAlternate(inst);var onSelect=this._get(inst,"onSelect");if(onSelect){onSelect.apply((inst.input?inst.input[0]:null),[dateStr,inst])
}else{if(inst.input){inst.input.trigger("change")}}if(inst.inline){this._updateDatepicker(inst)}else{this._hideDatepicker();
this._lastInput=inst.input[0];if(typeof(inst.input[0])!="object"){inst.input.focus()}this._lastInput=null}},_updateAlternate:function(inst){var altField=this._get(inst,"altField");
if(altField){var altFormat=this._get(inst,"altFormat")||this._get(inst,"dateFormat");var date=this._getDate(inst);var dateStr=this.formatDate(altFormat,date,this._getFormatConfig(inst));
$(altField).each(function(){$(this).val(dateStr)})}},noWeekends:function(date){var day=date.getDay();return[(day>0&&day<6),""]
},iso8601Week:function(date){var checkDate=new Date(date.getTime());checkDate.setDate(checkDate.getDate()+4-(checkDate.getDay()||7));
var time=checkDate.getTime();checkDate.setMonth(0);checkDate.setDate(1);return Math.floor(Math.round((time-checkDate)/86400000)/7)+1
},parseDate:function(format,value,settings){if(format==null||value==null){throw"Invalid arguments"}value=(typeof value=="object"?value.toString():value+"");
if(value==""){return null}var shortYearCutoff=(settings?settings.shortYearCutoff:null)||this._defaults.shortYearCutoff;var dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort;
var dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames;var monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort;
var monthNames=(settings?settings.monthNames:null)||this._defaults.monthNames;var year=-1;var month=-1;var day=-1;var doy=-1;
var literal=false;var lookAhead=function(match){var matches=(iFormat+1<format.length&&format.charAt(iFormat+1)==match);if(matches){iFormat++
}return matches};var getNumber=function(match){lookAhead(match);var size=(match=="@"?14:(match=="!"?20:(match=="y"?4:(match=="o"?3:2))));
var digits=new RegExp("^\\d{1,"+size+"}");var num=value.substring(iValue).match(digits);if(!num){throw"Missing number at position "+iValue
}iValue+=num[0].length;return parseInt(num[0],10)};var getName=function(match,shortNames,longNames){var names=(lookAhead(match)?longNames:shortNames);
for(var i=0;i<names.length;i++){if(value.substr(iValue,names[i].length).toLowerCase()==names[i].toLowerCase()){iValue+=names[i].length;
return i+1}}throw"Unknown name at position "+iValue};var checkLiteral=function(){if(value.charAt(iValue)!=format.charAt(iFormat)){throw"Unexpected literal at position "+iValue
}iValue++};var iValue=0;for(var iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)=="'"&&!lookAhead("'")){literal=false
}else{checkLiteral()}}else{switch(format.charAt(iFormat)){case"d":day=getNumber("d");break;case"D":getName("D",dayNamesShort,dayNames);
break;case"o":doy=getNumber("o");break;case"m":month=getNumber("m");break;case"M":month=getName("M",monthNamesShort,monthNames);
break;case"y":year=getNumber("y");break;case"@":var date=new Date(getNumber("@"));year=date.getFullYear();month=date.getMonth()+1;
day=date.getDate();break;case"!":var date=new Date((getNumber("!")-this._ticksTo1970)/10000);year=date.getFullYear();month=date.getMonth()+1;
day=date.getDate();break;case"'":if(lookAhead("'")){checkLiteral()}else{literal=true}break;default:checkLiteral()}}}if(year==-1){year=new Date().getFullYear()
}else{if(year<100){year+=new Date().getFullYear()-new Date().getFullYear()%100+(year<=shortYearCutoff?0:-100)}}if(doy>-1){month=1;
day=doy;do{var dim=this._getDaysInMonth(year,month-1);if(day<=dim){break}month++;day-=dim}while(true)}var date=this._daylightSavingAdjust(new Date(year,month-1,day));
if(date.getFullYear()!=year||date.getMonth()+1!=month||date.getDate()!=day){throw"Invalid date"}return date},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:(((1970-1)*365+Math.floor(1970/4)-Math.floor(1970/100)+Math.floor(1970/400))*24*60*60*10000000),formatDate:function(format,date,settings){if(!date){return""
}var dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort;var dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames;
var monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort;var monthNames=(settings?settings.monthNames:null)||this._defaults.monthNames;
var lookAhead=function(match){var matches=(iFormat+1<format.length&&format.charAt(iFormat+1)==match);if(matches){iFormat++
}return matches};var formatNumber=function(match,value,len){var num=""+value;if(lookAhead(match)){while(num.length<len){num="0"+num
}}return num};var formatName=function(match,value,shortNames,longNames){return(lookAhead(match)?longNames[value]:shortNames[value])
};var output="";var literal=false;if(date){for(var iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)=="'"&&!lookAhead("'")){literal=false
}else{output+=format.charAt(iFormat)}}else{switch(format.charAt(iFormat)){case"d":output+=formatNumber("d",date.getDate(),2);
break;case"D":output+=formatName("D",date.getDay(),dayNamesShort,dayNames);break;case"o":output+=formatNumber("o",(date.getTime()-new Date(date.getFullYear(),0,0).getTime())/86400000,3);
break;case"m":output+=formatNumber("m",date.getMonth()+1,2);break;case"M":output+=formatName("M",date.getMonth(),monthNamesShort,monthNames);
break;case"y":output+=(lookAhead("y")?date.getFullYear():(date.getYear()%100<10?"0":"")+date.getYear()%100);break;case"@":output+=date.getTime();
break;case"!":output+=date.getTime()*10000+this._ticksTo1970;break;case"'":if(lookAhead("'")){output+="'"}else{literal=true
}break;default:output+=format.charAt(iFormat)}}}}return output},_possibleChars:function(format){var chars="";var literal=false;
var lookAhead=function(match){var matches=(iFormat+1<format.length&&format.charAt(iFormat+1)==match);if(matches){iFormat++
}return matches};for(var iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)=="'"&&!lookAhead("'")){literal=false
}else{chars+=format.charAt(iFormat)}}else{switch(format.charAt(iFormat)){case"d":case"m":case"y":case"@":chars+="0123456789";
break;case"D":case"M":return null;case"'":if(lookAhead("'")){chars+="'"}else{literal=true}break;default:chars+=format.charAt(iFormat)
}}}return chars},_get:function(inst,name){return inst.settings[name]!==undefined?inst.settings[name]:this._defaults[name]
},_setDateFromField:function(inst,noDefault){if(inst.input.val()==inst.lastVal){return}var dateFormat=this._get(inst,"dateFormat");
var dates=inst.lastVal=inst.input?inst.input.val():null;var date,defaultDate;date=defaultDate=this._getDefaultDate(inst);
var settings=this._getFormatConfig(inst);try{date=this.parseDate(dateFormat,dates,settings)||defaultDate}catch(event){this.log(event);
dates=(noDefault?"":dates)}inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear();
inst.currentDay=(dates?date.getDate():0);inst.currentMonth=(dates?date.getMonth():0);inst.currentYear=(dates?date.getFullYear():0);
this._adjustInstDate(inst)},_getDefaultDate:function(inst){return this._restrictMinMax(inst,this._determineDate(inst,this._get(inst,"defaultDate"),new Date()))
},_determineDate:function(inst,date,defaultDate){var offsetNumeric=function(offset){var date=new Date();date.setDate(date.getDate()+offset);
return date};var offsetString=function(offset){try{return $.datepicker.parseDate($.datepicker._get(inst,"dateFormat"),offset,$.datepicker._getFormatConfig(inst))
}catch(e){}var date=(offset.toLowerCase().match(/^c/)?$.datepicker._getDate(inst):null)||new Date();var year=date.getFullYear();
var month=date.getMonth();var day=date.getDate();var pattern=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g;var matches=pattern.exec(offset);
while(matches){switch(matches[2]||"d"){case"d":case"D":day+=parseInt(matches[1],10);break;case"w":case"W":day+=parseInt(matches[1],10)*7;
break;case"m":case"M":month+=parseInt(matches[1],10);day=Math.min(day,$.datepicker._getDaysInMonth(year,month));break;case"y":case"Y":year+=parseInt(matches[1],10);
day=Math.min(day,$.datepicker._getDaysInMonth(year,month));break}matches=pattern.exec(offset)}return new Date(year,month,day)
};date=(date==null?defaultDate:(typeof date=="string"?offsetString(date):(typeof date=="number"?(isNaN(date)?defaultDate:offsetNumeric(date)):date)));
date=(date&&date.toString()=="Invalid Date"?defaultDate:date);if(date){date.setHours(0);date.setMinutes(0);date.setSeconds(0);
date.setMilliseconds(0)}return this._daylightSavingAdjust(date)},_daylightSavingAdjust:function(date){if(!date){return null
}date.setHours(date.getHours()>12?date.getHours()+2:0);return date},_setDate:function(inst,date,noChange){var clear=!(date);
var origMonth=inst.selectedMonth;var origYear=inst.selectedYear;date=this._restrictMinMax(inst,this._determineDate(inst,date,new Date()));
inst.selectedDay=inst.currentDay=date.getDate();inst.drawMonth=inst.selectedMonth=inst.currentMonth=date.getMonth();inst.drawYear=inst.selectedYear=inst.currentYear=date.getFullYear();
if((origMonth!=inst.selectedMonth||origYear!=inst.selectedYear)&&!noChange){this._notifyChange(inst)}this._adjustInstDate(inst);
if(inst.input){inst.input.val(clear?"":this._formatDate(inst))}},_getDate:function(inst){var startDate=(!inst.currentYear||(inst.input&&inst.input.val()=="")?null:this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));
return startDate},_generateHTML:function(inst){var today=new Date();today=this._daylightSavingAdjust(new Date(today.getFullYear(),today.getMonth(),today.getDate()));
var isRTL=this._get(inst,"isRTL");var showButtonPanel=this._get(inst,"showButtonPanel");var hideIfNoPrevNext=this._get(inst,"hideIfNoPrevNext");
var navigationAsDateFormat=this._get(inst,"navigationAsDateFormat");var numMonths=this._getNumberOfMonths(inst);var showCurrentAtPos=this._get(inst,"showCurrentAtPos");
var stepMonths=this._get(inst,"stepMonths");var isMultiMonth=(numMonths[0]!=1||numMonths[1]!=1);var currentDate=this._daylightSavingAdjust((!inst.currentDay?new Date(9999,9,9):new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));
var minDate=this._getMinMaxDate(inst,"min");var maxDate=this._getMinMaxDate(inst,"max");var drawMonth=inst.drawMonth-showCurrentAtPos;
var drawYear=inst.drawYear;if(drawMonth<0){drawMonth+=12;drawYear--}if(maxDate){var maxDraw=this._daylightSavingAdjust(new Date(maxDate.getFullYear(),maxDate.getMonth()-(numMonths[0]*numMonths[1])+1,maxDate.getDate()));
maxDraw=(minDate&&maxDraw<minDate?minDate:maxDraw);while(this._daylightSavingAdjust(new Date(drawYear,drawMonth,1))>maxDraw){drawMonth--;
if(drawMonth<0){drawMonth=11;drawYear--}}}inst.drawMonth=drawMonth;inst.drawYear=drawYear;var prevText=this._get(inst,"prevText");
prevText=(!navigationAsDateFormat?prevText:this.formatDate(prevText,this._daylightSavingAdjust(new Date(drawYear,drawMonth-stepMonths,1)),this._getFormatConfig(inst)));
var prev=(this._canAdjustMonth(inst,-1,drawYear,drawMonth)?'<a class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery_'+dpuuid+".datepicker._adjustDate('#"+inst.id+"', -"+stepMonths+", 'M');\" title=\""+prevText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"e":"w")+'">'+prevText+"</span></a>":(hideIfNoPrevNext?"":'<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+prevText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"e":"w")+'">'+prevText+"</span></a>"));
var nextText=this._get(inst,"nextText");nextText=(!navigationAsDateFormat?nextText:this.formatDate(nextText,this._daylightSavingAdjust(new Date(drawYear,drawMonth+stepMonths,1)),this._getFormatConfig(inst)));
var next=(this._canAdjustMonth(inst,+1,drawYear,drawMonth)?'<a class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery_'+dpuuid+".datepicker._adjustDate('#"+inst.id+"', +"+stepMonths+", 'M');\" title=\""+nextText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"w":"e")+'">'+nextText+"</span></a>":(hideIfNoPrevNext?"":'<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+nextText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"w":"e")+'">'+nextText+"</span></a>"));
var currentText=this._get(inst,"currentText");var gotoDate=(this._get(inst,"gotoCurrent")&&inst.currentDay?currentDate:today);
currentText=(!navigationAsDateFormat?currentText:this.formatDate(currentText,gotoDate,this._getFormatConfig(inst)));var controls=(!inst.inline?'<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="DP_jQuery_'+dpuuid+'.datepicker._hideDatepicker();">'+this._get(inst,"closeText")+"</button>":"");
var buttonPanel=(showButtonPanel)?'<div class="ui-datepicker-buttonpane ui-widget-content">'+(isRTL?controls:"")+(this._isInRange(inst,gotoDate)?'<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_jQuery_'+dpuuid+".datepicker._gotoToday('#"+inst.id+"');\">"+currentText+"</button>":"")+(isRTL?"":controls)+"</div>":"";
var firstDay=parseInt(this._get(inst,"firstDay"),10);firstDay=(isNaN(firstDay)?0:firstDay);var showWeek=this._get(inst,"showWeek");
var dayNames=this._get(inst,"dayNames");var dayNamesShort=this._get(inst,"dayNamesShort");var dayNamesMin=this._get(inst,"dayNamesMin");
var monthNames=this._get(inst,"monthNames");var monthNamesShort=this._get(inst,"monthNamesShort");var beforeShowDay=this._get(inst,"beforeShowDay");
var showOtherMonths=this._get(inst,"showOtherMonths");var selectOtherMonths=this._get(inst,"selectOtherMonths");var calculateWeek=this._get(inst,"calculateWeek")||this.iso8601Week;
var defaultDate=this._getDefaultDate(inst);var html="";for(var row=0;row<numMonths[0];row++){var group="";for(var col=0;col<numMonths[1];
col++){var selectedDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,inst.selectedDay));var cornerClass=" ui-corner-all";
var calender="";if(isMultiMonth){calender+='<div class="ui-datepicker-group';if(numMonths[1]>1){switch(col){case 0:calender+=" ui-datepicker-group-first";
cornerClass=" ui-corner-"+(isRTL?"right":"left");break;case numMonths[1]-1:calender+=" ui-datepicker-group-last";cornerClass=" ui-corner-"+(isRTL?"left":"right");
break;default:calender+=" ui-datepicker-group-middle";cornerClass="";break}}calender+='">'}calender+='<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix'+cornerClass+'">'+(/all|left/.test(cornerClass)&&row==0?(isRTL?next:prev):"")+(/all|right/.test(cornerClass)&&row==0?(isRTL?prev:next):"")+this._generateMonthYearHeader(inst,drawMonth,drawYear,minDate,maxDate,row>0||col>0,monthNames,monthNamesShort)+'</div><table class="ui-datepicker-calendar"><thead><tr>';
var thead=(showWeek?'<th class="ui-datepicker-week-col">'+this._get(inst,"weekHeader")+"</th>":"");for(var dow=0;dow<7;dow++){var day=(dow+firstDay)%7;
thead+="<th"+((dow+firstDay+6)%7>=5?' class="ui-datepicker-week-end"':"")+'><span title="'+dayNames[day]+'">'+dayNamesMin[day]+"</span></th>"
}calender+=thead+"</tr></thead><tbody>";var daysInMonth=this._getDaysInMonth(drawYear,drawMonth);if(drawYear==inst.selectedYear&&drawMonth==inst.selectedMonth){inst.selectedDay=Math.min(inst.selectedDay,daysInMonth)
}var leadDays=(this._getFirstDayOfMonth(drawYear,drawMonth)-firstDay+7)%7;var numRows=(isMultiMonth?6:Math.ceil((leadDays+daysInMonth)/7));
var printDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,1-leadDays));for(var dRow=0;dRow<numRows;dRow++){calender+="<tr>";
var tbody=(!showWeek?"":'<td class="ui-datepicker-week-col">'+this._get(inst,"calculateWeek")(printDate)+"</td>");for(var dow=0;
dow<7;dow++){var daySettings=(beforeShowDay?beforeShowDay.apply((inst.input?inst.input[0]:null),[printDate]):[true,""]);var otherMonth=(printDate.getMonth()!=drawMonth);
var unselectable=(otherMonth&&!selectOtherMonths)||!daySettings[0]||(minDate&&printDate<minDate)||(maxDate&&printDate>maxDate);
tbody+='<td class="'+((dow+firstDay+6)%7>=5?" ui-datepicker-week-end":"")+(otherMonth?" ui-datepicker-other-month":"")+((printDate.getTime()==selectedDate.getTime()&&drawMonth==inst.selectedMonth&&inst._keyEvent)||(defaultDate.getTime()==printDate.getTime()&&defaultDate.getTime()==selectedDate.getTime())?" "+this._dayOverClass:"")+(unselectable?" "+this._unselectableClass+" ui-state-disabled":"")+(otherMonth&&!showOtherMonths?"":" "+daySettings[1]+(printDate.getTime()==currentDate.getTime()?" "+this._currentClass:"")+(printDate.getTime()==today.getTime()?" ui-datepicker-today":""))+'"'+((!otherMonth||showOtherMonths)&&daySettings[2]?' title="'+daySettings[2]+'"':"")+(unselectable?"":' onclick="DP_jQuery_'+dpuuid+".datepicker._selectDay('#"+inst.id+"',"+printDate.getMonth()+","+printDate.getFullYear()+', this);return false;"')+">"+(otherMonth&&!showOtherMonths?"&#xa0;":(unselectable?'<span class="ui-state-default">'+printDate.getDate()+"</span>":'<a class="ui-state-default'+(printDate.getTime()==today.getTime()?" ui-state-highlight":"")+(printDate.getTime()==currentDate.getTime()?" ui-state-active":"")+(otherMonth?" ui-priority-secondary":"")+'" href="#">'+printDate.getDate()+"</a>"))+"</td>";
printDate.setDate(printDate.getDate()+1);printDate=this._daylightSavingAdjust(printDate)}calender+=tbody+"</tr>"}drawMonth++;
if(drawMonth>11){drawMonth=0;drawYear++}calender+="</tbody></table>"+(isMultiMonth?"</div>"+((numMonths[0]>0&&col==numMonths[1]-1)?'<div class="ui-datepicker-row-break"></div>':""):"");
group+=calender}html+=group}html+=buttonPanel+($.browser.msie&&parseInt($.browser.version,10)<7&&!inst.inline?'<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>':"");
inst._keyEvent=false;return html},_generateMonthYearHeader:function(inst,drawMonth,drawYear,minDate,maxDate,secondary,monthNames,monthNamesShort){var changeMonth=this._get(inst,"changeMonth");
var changeYear=this._get(inst,"changeYear");var showMonthAfterYear=this._get(inst,"showMonthAfterYear");var html='<div class="ui-datepicker-title">';
var monthHtml="";if(secondary||!changeMonth){monthHtml+='<span class="ui-datepicker-month">'+monthNames[drawMonth]+"</span>"
}else{var inMinYear=(minDate&&minDate.getFullYear()==drawYear);var inMaxYear=(maxDate&&maxDate.getFullYear()==drawYear);monthHtml+='<select class="ui-datepicker-month" onchange="DP_jQuery_'+dpuuid+".datepicker._selectMonthYear('#"+inst.id+"', this, 'M');\" onclick=\"DP_jQuery_"+dpuuid+".datepicker._clickMonthYear('#"+inst.id+"');\">";
for(var month=0;month<12;month++){if((!inMinYear||month>=minDate.getMonth())&&(!inMaxYear||month<=maxDate.getMonth())){monthHtml+='<option value="'+month+'"'+(month==drawMonth?' selected="selected"':"")+">"+monthNamesShort[month]+"</option>"
}}monthHtml+="</select>"}if(!showMonthAfterYear){html+=monthHtml+(secondary||!(changeMonth&&changeYear)?"&#xa0;":"")}if(secondary||!changeYear){html+='<span class="ui-datepicker-year">'+drawYear+"</span>"
}else{var years=this._get(inst,"yearRange").split(":");var thisYear=new Date().getFullYear();var determineYear=function(value){var year=(value.match(/c[+-].*/)?drawYear+parseInt(value.substring(1),10):(value.match(/[+-].*/)?thisYear+parseInt(value,10):parseInt(value,10)));
return(isNaN(year)?thisYear:year)};var year=determineYear(years[0]);var endYear=Math.max(year,determineYear(years[1]||""));
year=(minDate?Math.max(year,minDate.getFullYear()):year);endYear=(maxDate?Math.min(endYear,maxDate.getFullYear()):endYear);
html+='<select class="ui-datepicker-year" onchange="DP_jQuery_'+dpuuid+".datepicker._selectMonthYear('#"+inst.id+"', this, 'Y');\" onclick=\"DP_jQuery_"+dpuuid+".datepicker._clickMonthYear('#"+inst.id+"');\">";
for(;year<=endYear;year++){html+='<option value="'+year+'"'+(year==drawYear?' selected="selected"':"")+">"+year+"</option>"
}html+="</select>"}html+=this._get(inst,"yearSuffix");if(showMonthAfterYear){html+=(secondary||!(changeMonth&&changeYear)?"&#xa0;":"")+monthHtml
}html+="</div>";return html},_adjustInstDate:function(inst,offset,period){var year=inst.drawYear+(period=="Y"?offset:0);var month=inst.drawMonth+(period=="M"?offset:0);
var day=Math.min(inst.selectedDay,this._getDaysInMonth(year,month))+(period=="D"?offset:0);var date=this._restrictMinMax(inst,this._daylightSavingAdjust(new Date(year,month,day)));
inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear();
if(period=="M"||period=="Y"){this._notifyChange(inst)}},_restrictMinMax:function(inst,date){var minDate=this._getMinMaxDate(inst,"min");
var maxDate=this._getMinMaxDate(inst,"max");date=(minDate&&date<minDate?minDate:date);date=(maxDate&&date>maxDate?maxDate:date);
return date},_notifyChange:function(inst){var onChange=this._get(inst,"onChangeMonthYear");if(onChange){onChange.apply((inst.input?inst.input[0]:null),[inst.selectedYear,inst.selectedMonth+1,inst])
}},_getNumberOfMonths:function(inst){var numMonths=this._get(inst,"numberOfMonths");return(numMonths==null?[1,1]:(typeof numMonths=="number"?[1,numMonths]:numMonths))
},_getMinMaxDate:function(inst,minMax){return this._determineDate(inst,this._get(inst,minMax+"Date"),null)},_getDaysInMonth:function(year,month){return 32-new Date(year,month,32).getDate()
},_getFirstDayOfMonth:function(year,month){return new Date(year,month,1).getDay()},_canAdjustMonth:function(inst,offset,curYear,curMonth){var numMonths=this._getNumberOfMonths(inst);
var date=this._daylightSavingAdjust(new Date(curYear,curMonth+(offset<0?offset:numMonths[0]*numMonths[1]),1));if(offset<0){date.setDate(this._getDaysInMonth(date.getFullYear(),date.getMonth()))
}return this._isInRange(inst,date)},_isInRange:function(inst,date){var minDate=this._getMinMaxDate(inst,"min");var maxDate=this._getMinMaxDate(inst,"max");
return((!minDate||date.getTime()>=minDate.getTime())&&(!maxDate||date.getTime()<=maxDate.getTime()))},_getFormatConfig:function(inst){var shortYearCutoff=this._get(inst,"shortYearCutoff");
shortYearCutoff=(typeof shortYearCutoff!="string"?shortYearCutoff:new Date().getFullYear()%100+parseInt(shortYearCutoff,10));
return{shortYearCutoff:shortYearCutoff,dayNamesShort:this._get(inst,"dayNamesShort"),dayNames:this._get(inst,"dayNames"),monthNamesShort:this._get(inst,"monthNamesShort"),monthNames:this._get(inst,"monthNames")}
},_formatDate:function(inst,day,month,year){if(!day){inst.currentDay=inst.selectedDay;inst.currentMonth=inst.selectedMonth;
inst.currentYear=inst.selectedYear}var date=(day?(typeof day=="object"?day:this._daylightSavingAdjust(new Date(year,month,day))):this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));
return this.formatDate(this._get(inst,"dateFormat"),date,this._getFormatConfig(inst))}});function extendRemove(target,props){$.extend(target,props);
for(var name in props){if(props[name]==null||props[name]==undefined){target[name]=props[name]}}return target}function isArray(a){return(a&&(($.browser.safari&&typeof a=="object"&&a.length)||(a.constructor&&a.constructor.toString().match(/\Array\(\)/))))
}$.fn.datepicker=function(options){if(!$.datepicker.initialized){$(document).mousedown($.datepicker._checkExternalClick).find("body").append($.datepicker.dpDiv);
$.datepicker.initialized=true}var otherArgs=Array.prototype.slice.call(arguments,1);if(typeof options=="string"&&(options=="isDisabled"||options=="getDate"||options=="widget")){return $.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this[0]].concat(otherArgs))
}if(options=="option"&&arguments.length==2&&typeof arguments[1]=="string"){return $.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this[0]].concat(otherArgs))
}return this.each(function(){typeof options=="string"?$.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this].concat(otherArgs)):$.datepicker._attachDatepicker(this,options)
})};$.datepicker=new Datepicker();$.datepicker.initialized=false;$.datepicker.uuid=new Date().getTime();$.datepicker.version="1.8.6";
window["DP_jQuery_"+dpuuid]=$})(jQuery);(function(a,b){a.widget("ui.progressbar",{options:{value:0},min:0,max:100,_create:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min,"aria-valuemax":this.max,"aria-valuenow":this._value()});
this.valueDiv=a("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element);this._refreshValue()
},destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow");
this.valueDiv.remove();a.Widget.prototype.destroy.apply(this,arguments)},value:function(c){if(c===b){return this._value()
}this._setOption("value",c);return this},_setOption:function(c,d){if(c==="value"){this.options.value=d;this._refreshValue();
this._trigger("change");if(this._value()===this.max){this._trigger("complete")}}a.Widget.prototype._setOption.apply(this,arguments)
},_value:function(){var c=this.options.value;if(typeof c!=="number"){c=0}return Math.min(this.max,Math.max(this.min,c))},_refreshValue:function(){var c=this.value();
this.valueDiv.toggleClass("ui-corner-right",c===this.max).width(c+"%");this.element.attr("aria-valuenow",c)}});a.extend(a.ui.progressbar,{version:"1.8.6"})
})(jQuery);jQuery.effects||(function(h,e){h.effects={};h.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","borderColor","color","outlineColor"],function(n,m){h.fx.step[m]=function(o){if(!o.colorInit){o.start=l(o.elem,m);
o.end=j(o.end);o.colorInit=true}o.elem.style[m]="rgb("+Math.max(Math.min(parseInt((o.pos*(o.end[0]-o.start[0]))+o.start[0],10),255),0)+","+Math.max(Math.min(parseInt((o.pos*(o.end[1]-o.start[1]))+o.start[1],10),255),0)+","+Math.max(Math.min(parseInt((o.pos*(o.end[2]-o.start[2]))+o.start[2],10),255),0)+")"
}});function j(n){var m;if(n&&n.constructor==Array&&n.length==3){return n}if(m=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(n)){return[parseInt(m[1],10),parseInt(m[2],10),parseInt(m[3],10)]
}if(m=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(n)){return[parseFloat(m[1])*2.55,parseFloat(m[2])*2.55,parseFloat(m[3])*2.55]
}if(m=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(n)){return[parseInt(m[1],16),parseInt(m[2],16),parseInt(m[3],16)]
}if(m=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(n)){return[parseInt(m[1]+m[1],16),parseInt(m[2]+m[2],16),parseInt(m[3]+m[3],16)]
}if(m=/rgba\(0, 0, 0, 0\)/.exec(n)){return a.transparent}return a[h.trim(n).toLowerCase()]}function l(o,m){var n;do{n=h.curCSS(o,m);
if(n!=""&&n!="transparent"||h.nodeName(o,"body")){break}m="backgroundColor"}while(o=o.parentNode);return j(n)}var a={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]};
var f=["add","remove","toggle"],c={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};
function g(){var p=document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle,q={},n,o;if(p&&p.length&&p[0]&&p[p[0]]){var m=p.length;
while(m--){n=p[m];if(typeof p[n]=="string"){o=n.replace(/\-(\w)/g,function(r,s){return s.toUpperCase()});q[o]=p[n]}}}else{for(n in p){if(typeof p[n]==="string"){q[n]=p[n]
}}}return q}function b(n){var m,o;for(m in n){o=n[m];if(o==null||h.isFunction(o)||m in c||(/scrollbar/).test(m)||(!(/color/i).test(m)&&isNaN(parseFloat(o)))){delete n[m]
}}return n}function i(m,o){var p={_:0},n;for(n in o){if(m[n]!=o[n]){p[n]=o[n]}}return p}h.effects.animateClass=function(m,n,p,o){if(h.isFunction(p)){o=p;
p=null}return this.each(function(){var u=h(this),q=u.attr("style")||" ",v=b(g.call(this)),s,r=u.attr("className");h.each(f,function(w,x){if(m[x]){u[x+"Class"](m[x])
}});s=b(g.call(this));u.attr("className",r);u.animate(i(v,s),n,p,function(){h.each(f,function(w,x){if(m[x]){u[x+"Class"](m[x])
}});if(typeof u.attr("style")=="object"){u.attr("style").cssText="";u.attr("style").cssText=q}else{u.attr("style",q)}if(o){o.apply(this,arguments)
}})})};h.fn.extend({_addClass:h.fn.addClass,addClass:function(n,m,p,o){return m?h.effects.animateClass.apply(this,[{add:n},m,p,o]):this._addClass(n)
},_removeClass:h.fn.removeClass,removeClass:function(n,m,p,o){return m?h.effects.animateClass.apply(this,[{remove:n},m,p,o]):this._removeClass(n)
},_toggleClass:h.fn.toggleClass,toggleClass:function(o,n,m,q,p){if(typeof n=="boolean"||n===e){if(!m){return this._toggleClass(o,n)
}else{return h.effects.animateClass.apply(this,[(n?{add:o}:{remove:o}),m,q,p])}}else{return h.effects.animateClass.apply(this,[{toggle:o},n,m,q])
}},switchClass:function(m,o,n,q,p){return h.effects.animateClass.apply(this,[{add:o,remove:m},n,q,p])}});h.extend(h.effects,{version:"1.8.6",save:function(n,o){for(var m=0;
m<o.length;m++){if(o[m]!==null){n.data("ec.storage."+o[m],n[0].style[o[m]])}}},restore:function(n,o){for(var m=0;m<o.length;
m++){if(o[m]!==null){n.css(o[m],n.data("ec.storage."+o[m]))}}},setMode:function(m,n){if(n=="toggle"){n=m.is(":hidden")?"show":"hide"
}return n},getBaseline:function(n,o){var p,m;switch(n[0]){case"top":p=0;break;case"middle":p=0.5;break;case"bottom":p=1;break;
default:p=n[0]/o.height}switch(n[1]){case"left":m=0;break;case"center":m=0.5;break;case"right":m=1;break;default:m=n[1]/o.width
}return{x:m,y:p}},createWrapper:function(m){if(m.parent().is(".ui-effects-wrapper")){return m.parent()}var n={width:m.outerWidth(true),height:m.outerHeight(true),"float":m.css("float")},o=h("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0});
m.wrap(o);o=m.parent();if(m.css("position")=="static"){o.css({position:"relative"});m.css({position:"relative"})}else{h.extend(n,{position:m.css("position"),zIndex:m.css("z-index")});
h.each(["top","left","bottom","right"],function(p,q){n[q]=m.css(q);if(isNaN(parseInt(n[q],10))){n[q]="auto"}});m.css({position:"relative",top:0,left:0})
}return o.css(n).show()},removeWrapper:function(m){if(m.parent().is(".ui-effects-wrapper")){return m.parent().replaceWith(m)
}return m},setTransition:function(n,p,m,o){o=o||{};h.each(p,function(r,q){unit=n.cssUnit(q);if(unit[0]>0){o[q]=unit[0]*m+unit[1]
}});return o}});function d(n,m,o,p){if(typeof n=="object"){p=m;o=null;m=n;n=m.effect}if(h.isFunction(m)){p=m;o=null;m={}}if(typeof m=="number"||h.fx.speeds[m]){p=o;
o=m;m={}}if(h.isFunction(o)){p=o;o=null}m=m||{};o=o||m.duration;o=h.fx.off?0:typeof o=="number"?o:h.fx.speeds[o]||h.fx.speeds._default;
p=p||m.complete;return[n,m,o,p]}function k(m){if(!m||typeof m==="number"||h.fx.speeds[m]){return true}if(typeof m==="string"&&!h.effects[m]){return true
}return false}h.fn.extend({effect:function(p,o,r,u){var n=d.apply(this,arguments),q={options:n[1],duration:n[2],callback:n[3]},s=q.options.mode,m=h.effects[p];
if(h.fx.off||!m){if(s){return this[s](q.duration,q.callback)}else{return this.each(function(){if(q.callback){q.callback.call(this)
}})}}return m.call(this,q)},_show:h.fn.show,show:function(n){if(k(n)){return this._show.apply(this,arguments)}else{var m=d.apply(this,arguments);
m[1].mode="show";return this.effect.apply(this,m)}},_hide:h.fn.hide,hide:function(n){if(k(n)){return this._hide.apply(this,arguments)
}else{var m=d.apply(this,arguments);m[1].mode="hide";return this.effect.apply(this,m)}},__toggle:h.fn.toggle,toggle:function(n){if(k(n)||typeof n==="boolean"||h.isFunction(n)){return this.__toggle.apply(this,arguments)
}else{var m=d.apply(this,arguments);m[1].mode="toggle";return this.effect.apply(this,m)}},cssUnit:function(m){var n=this.css(m),o=[];
h.each(["em","px","%","pt"],function(p,q){if(n.indexOf(q)>0){o=[parseFloat(n),q]}});return o}});h.easing.jswing=h.easing.swing;
h.extend(h.easing,{def:"easeOutQuad",swing:function(n,o,m,q,p){return h.easing[h.easing.def](n,o,m,q,p)},easeInQuad:function(n,o,m,q,p){return q*(o/=p)*o+m
},easeOutQuad:function(n,o,m,q,p){return -q*(o/=p)*(o-2)+m},easeInOutQuad:function(n,o,m,q,p){if((o/=p/2)<1){return q/2*o*o+m
}return -q/2*((--o)*(o-2)-1)+m},easeInCubic:function(n,o,m,q,p){return q*(o/=p)*o*o+m},easeOutCubic:function(n,o,m,q,p){return q*((o=o/p-1)*o*o+1)+m
},easeInOutCubic:function(n,o,m,q,p){if((o/=p/2)<1){return q/2*o*o*o+m}return q/2*((o-=2)*o*o+2)+m},easeInQuart:function(n,o,m,q,p){return q*(o/=p)*o*o*o+m
},easeOutQuart:function(n,o,m,q,p){return -q*((o=o/p-1)*o*o*o-1)+m},easeInOutQuart:function(n,o,m,q,p){if((o/=p/2)<1){return q/2*o*o*o*o+m
}return -q/2*((o-=2)*o*o*o-2)+m},easeInQuint:function(n,o,m,q,p){return q*(o/=p)*o*o*o*o+m},easeOutQuint:function(n,o,m,q,p){return q*((o=o/p-1)*o*o*o*o+1)+m
},easeInOutQuint:function(n,o,m,q,p){if((o/=p/2)<1){return q/2*o*o*o*o*o+m}return q/2*((o-=2)*o*o*o*o+2)+m},easeInSine:function(n,o,m,q,p){return -q*Math.cos(o/p*(Math.PI/2))+q+m
},easeOutSine:function(n,o,m,q,p){return q*Math.sin(o/p*(Math.PI/2))+m},easeInOutSine:function(n,o,m,q,p){return -q/2*(Math.cos(Math.PI*o/p)-1)+m
},easeInExpo:function(n,o,m,q,p){return(o==0)?m:q*Math.pow(2,10*(o/p-1))+m},easeOutExpo:function(n,o,m,q,p){return(o==p)?m+q:q*(-Math.pow(2,-10*o/p)+1)+m
},easeInOutExpo:function(n,o,m,q,p){if(o==0){return m}if(o==p){return m+q}if((o/=p/2)<1){return q/2*Math.pow(2,10*(o-1))+m
}return q/2*(-Math.pow(2,-10*--o)+2)+m},easeInCirc:function(n,o,m,q,p){return -q*(Math.sqrt(1-(o/=p)*o)-1)+m},easeOutCirc:function(n,o,m,q,p){return q*Math.sqrt(1-(o=o/p-1)*o)+m
},easeInOutCirc:function(n,o,m,q,p){if((o/=p/2)<1){return -q/2*(Math.sqrt(1-o*o)-1)+m}return q/2*(Math.sqrt(1-(o-=2)*o)+1)+m
},easeInElastic:function(n,q,m,w,v){var r=1.70158;var u=0;var o=w;if(q==0){return m}if((q/=v)==1){return m+w}if(!u){u=v*0.3
}if(o<Math.abs(w)){o=w;var r=u/4}else{var r=u/(2*Math.PI)*Math.asin(w/o)}return -(o*Math.pow(2,10*(q-=1))*Math.sin((q*v-r)*(2*Math.PI)/u))+m
},easeOutElastic:function(n,q,m,w,v){var r=1.70158;var u=0;var o=w;if(q==0){return m}if((q/=v)==1){return m+w}if(!u){u=v*0.3
}if(o<Math.abs(w)){o=w;var r=u/4}else{var r=u/(2*Math.PI)*Math.asin(w/o)}return o*Math.pow(2,-10*q)*Math.sin((q*v-r)*(2*Math.PI)/u)+w+m
},easeInOutElastic:function(n,q,m,w,v){var r=1.70158;var u=0;var o=w;if(q==0){return m}if((q/=v/2)==2){return m+w}if(!u){u=v*(0.3*1.5)
}if(o<Math.abs(w)){o=w;var r=u/4}else{var r=u/(2*Math.PI)*Math.asin(w/o)}if(q<1){return -0.5*(o*Math.pow(2,10*(q-=1))*Math.sin((q*v-r)*(2*Math.PI)/u))+m
}return o*Math.pow(2,-10*(q-=1))*Math.sin((q*v-r)*(2*Math.PI)/u)*0.5+w+m},easeInBack:function(n,o,m,r,q,p){if(p==e){p=1.70158
}return r*(o/=q)*o*((p+1)*o-p)+m},easeOutBack:function(n,o,m,r,q,p){if(p==e){p=1.70158}return r*((o=o/q-1)*o*((p+1)*o+p)+1)+m
},easeInOutBack:function(n,o,m,r,q,p){if(p==e){p=1.70158}if((o/=q/2)<1){return r/2*(o*o*(((p*=(1.525))+1)*o-p))+m}return r/2*((o-=2)*o*(((p*=(1.525))+1)*o+p)+2)+m
},easeInBounce:function(n,o,m,q,p){return q-h.easing.easeOutBounce(n,p-o,0,q,p)+m},easeOutBounce:function(n,o,m,q,p){if((o/=p)<(1/2.75)){return q*(7.5625*o*o)+m
}else{if(o<(2/2.75)){return q*(7.5625*(o-=(1.5/2.75))*o+0.75)+m}else{if(o<(2.5/2.75)){return q*(7.5625*(o-=(2.25/2.75))*o+0.9375)+m
}else{return q*(7.5625*(o-=(2.625/2.75))*o+0.984375)+m}}}},easeInOutBounce:function(n,o,m,q,p){if(o<p/2){return h.easing.easeInBounce(n,o*2,0,q,p)*0.5+m
}return h.easing.easeOutBounce(n,o*2-p,0,q,p)*0.5+q*0.5+m}})})(jQuery);(function(a,b){a.effects.blind=function(c){return this.queue(function(){var e=a(this),d=["position","top","left"];
var i=a.effects.setMode(e,c.options.mode||"hide");var h=c.options.direction||"vertical";a.effects.save(e,d);e.show();var k=a.effects.createWrapper(e).css({overflow:"hidden"});
var f=(h=="vertical")?"height":"width";var j=(h=="vertical")?k.height():k.width();if(i=="show"){k.css(f,0)}var g={};g[f]=i=="show"?j:0;
k.animate(g,c.duration,c.options.easing,function(){if(i=="hide"){e.hide()}a.effects.restore(e,d);a.effects.removeWrapper(e);
if(c.callback){c.callback.apply(e[0],arguments)}e.dequeue()})})}})(jQuery);(function(a,b){a.effects.bounce=function(c){return this.queue(function(){var f=a(this),m=["position","top","left"];
var l=a.effects.setMode(f,c.options.mode||"effect");var o=c.options.direction||"up";var d=c.options.distance||20;var e=c.options.times||5;
var h=c.duration||250;if(/show|hide/.test(l)){m.push("opacity")}a.effects.save(f,m);f.show();a.effects.createWrapper(f);var g=(o=="up"||o=="down")?"top":"left";
var q=(o=="up"||o=="left")?"pos":"neg";var d=c.options.distance||(g=="top"?f.outerHeight({margin:true})/3:f.outerWidth({margin:true})/3);
if(l=="show"){f.css("opacity",0).css(g,q=="pos"?-d:d)}if(l=="hide"){d=d/(e*2)}if(l!="hide"){e--}if(l=="show"){var j={opacity:1};
j[g]=(q=="pos"?"+=":"-=")+d;f.animate(j,h/2,c.options.easing);d=d/2;e--}for(var k=0;k<e;k++){var p={},n={};p[g]=(q=="pos"?"-=":"+=")+d;
n[g]=(q=="pos"?"+=":"-=")+d;f.animate(p,h/2,c.options.easing).animate(n,h/2,c.options.easing);d=(l=="hide")?d*2:d/2}if(l=="hide"){var j={opacity:0};
j[g]=(q=="pos"?"-=":"+=")+d;f.animate(j,h/2,c.options.easing,function(){f.hide();a.effects.restore(f,m);a.effects.removeWrapper(f);
if(c.callback){c.callback.apply(this,arguments)}})}else{var p={},n={};p[g]=(q=="pos"?"-=":"+=")+d;n[g]=(q=="pos"?"+=":"-=")+d;
f.animate(p,h/2,c.options.easing).animate(n,h/2,c.options.easing,function(){a.effects.restore(f,m);a.effects.removeWrapper(f);
if(c.callback){c.callback.apply(this,arguments)}})}f.queue("fx",function(){f.dequeue()});f.dequeue()})}})(jQuery);(function(a,b){a.effects.clip=function(c){return this.queue(function(){var g=a(this),k=["position","top","left","height","width"];
var j=a.effects.setMode(g,c.options.mode||"hide");var l=c.options.direction||"vertical";a.effects.save(g,k);g.show();var d=a.effects.createWrapper(g).css({overflow:"hidden"});
var f=g[0].tagName=="IMG"?d:g;var h={size:(l=="vertical")?"height":"width",position:(l=="vertical")?"top":"left"};var e=(l=="vertical")?f.height():f.width();
if(j=="show"){f.css(h.size,0);f.css(h.position,e/2)}var i={};i[h.size]=j=="show"?e:0;i[h.position]=j=="show"?0:e/2;f.animate(i,{queue:false,duration:c.duration,easing:c.options.easing,complete:function(){if(j=="hide"){g.hide()
}a.effects.restore(g,k);a.effects.removeWrapper(g);if(c.callback){c.callback.apply(g[0],arguments)}g.dequeue()}})})}})(jQuery);
(function(a,b){a.effects.drop=function(c){return this.queue(function(){var f=a(this),e=["position","top","left","opacity"];
var j=a.effects.setMode(f,c.options.mode||"hide");var i=c.options.direction||"left";a.effects.save(f,e);f.show();a.effects.createWrapper(f);
var g=(i=="up"||i=="down")?"top":"left";var d=(i=="up"||i=="left")?"pos":"neg";var k=c.options.distance||(g=="top"?f.outerHeight({margin:true})/2:f.outerWidth({margin:true})/2);
if(j=="show"){f.css("opacity",0).css(g,d=="pos"?-k:k)}var h={opacity:j=="show"?1:0};h[g]=(j=="show"?(d=="pos"?"+=":"-="):(d=="pos"?"-=":"+="))+k;
f.animate(h,{queue:false,duration:c.duration,easing:c.options.easing,complete:function(){if(j=="hide"){f.hide()}a.effects.restore(f,e);
a.effects.removeWrapper(f);if(c.callback){c.callback.apply(this,arguments)}f.dequeue()}})})}})(jQuery);(function(a,b){a.effects.explode=function(c){return this.queue(function(){var l=c.options.pieces?Math.round(Math.sqrt(c.options.pieces)):3;
var f=c.options.pieces?Math.round(Math.sqrt(c.options.pieces)):3;c.options.mode=c.options.mode=="toggle"?(a(this).is(":visible")?"hide":"show"):c.options.mode;
var k=a(this).show().css("visibility","hidden");var m=k.offset();m.top-=parseInt(k.css("marginTop"),10)||0;m.left-=parseInt(k.css("marginLeft"),10)||0;
var h=k.outerWidth(true);var d=k.outerHeight(true);for(var g=0;g<l;g++){for(var e=0;e<f;e++){k.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-e*(h/f),top:-g*(d/l)}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:h/f,height:d/l,left:m.left+e*(h/f)+(c.options.mode=="show"?(e-Math.floor(f/2))*(h/f):0),top:m.top+g*(d/l)+(c.options.mode=="show"?(g-Math.floor(l/2))*(d/l):0),opacity:c.options.mode=="show"?0:1}).animate({left:m.left+e*(h/f)+(c.options.mode=="show"?0:(e-Math.floor(f/2))*(h/f)),top:m.top+g*(d/l)+(c.options.mode=="show"?0:(g-Math.floor(l/2))*(d/l)),opacity:c.options.mode=="show"?1:0},c.duration||500)
}}setTimeout(function(){c.options.mode=="show"?k.css({visibility:"visible"}):k.css({visibility:"visible"}).hide();if(c.callback){c.callback.apply(k[0])
}k.dequeue();a("div.ui-effects-explode").remove()},c.duration||500)})}})(jQuery);(function(a,b){a.effects.fade=function(c){return this.queue(function(){var d=a(this),e=a.effects.setMode(d,c.options.mode||"hide");
d.animate({opacity:e},{queue:false,duration:c.duration,easing:c.options.easing,complete:function(){(c.callback&&c.callback.apply(this,arguments));
d.dequeue()}})})}})(jQuery);(function(a,b){a.effects.fold=function(c){return this.queue(function(){var f=a(this),l=["position","top","left"];
var i=a.effects.setMode(f,c.options.mode||"hide");var p=c.options.size||15;var o=!(!c.options.horizFirst);var h=c.duration?c.duration/2:a.fx.speeds._default/2;
a.effects.save(f,l);f.show();var e=a.effects.createWrapper(f).css({overflow:"hidden"});var j=((i=="show")!=o);var g=j?["width","height"]:["height","width"];
var d=j?[e.width(),e.height()]:[e.height(),e.width()];var k=/([0-9]+)%/.exec(p);if(k){p=parseInt(k[1],10)/100*d[i=="hide"?0:1]
}if(i=="show"){e.css(o?{height:0,width:p}:{height:p,width:0})}var n={},m={};n[g[0]]=i=="show"?d[0]:p;m[g[1]]=i=="show"?d[1]:0;
e.animate(n,h,c.options.easing).animate(m,h,c.options.easing,function(){if(i=="hide"){f.hide()}a.effects.restore(f,l);a.effects.removeWrapper(f);
if(c.callback){c.callback.apply(f[0],arguments)}f.dequeue()})})}})(jQuery);(function(a,b){a.effects.highlight=function(c){return this.queue(function(){var e=a(this),d=["backgroundImage","backgroundColor","opacity"],g=a.effects.setMode(e,c.options.mode||"show"),f={backgroundColor:e.css("backgroundColor")};
if(g=="hide"){f.opacity=0}a.effects.save(e,d);e.show().css({backgroundImage:"none",backgroundColor:c.options.color||"#ffff99"}).animate(f,{queue:false,duration:c.duration,easing:c.options.easing,complete:function(){(g=="hide"&&e.hide());
a.effects.restore(e,d);(g=="show"&&!a.support.opacity&&this.style.removeAttribute("filter"));(c.callback&&c.callback.apply(this,arguments));
e.dequeue()}})})}})(jQuery);(function(a,b){a.effects.pulsate=function(c){return this.queue(function(){var e=a(this),f=a.effects.setMode(e,c.options.mode||"show");
times=((c.options.times||5)*2)-1;duration=c.duration?c.duration/2:a.fx.speeds._default/2,isVisible=e.is(":visible"),animateTo=0;
if(!isVisible){e.css("opacity",0).show();animateTo=1}if((f=="hide"&&isVisible)||(f=="show"&&!isVisible)){times--}for(var d=0;
d<times;d++){e.animate({opacity:animateTo},duration,c.options.easing);animateTo=(animateTo+1)%2}e.animate({opacity:animateTo},duration,c.options.easing,function(){if(animateTo==0){e.hide()
}(c.callback&&c.callback.apply(this,arguments))});e.queue("fx",function(){e.dequeue()}).dequeue()})}})(jQuery);(function(a,b){a.effects.puff=function(c){return this.queue(function(){var g=a(this),h=a.effects.setMode(g,c.options.mode||"hide"),f=parseInt(c.options.percent,10)||150,e=f/100,d={height:g.height(),width:g.width()};
a.extend(c.options,{fade:true,mode:h,percent:h=="hide"?f:100,from:h=="hide"?d:{height:d.height*e,width:d.width*e}});g.effect("scale",c.options,c.duration,c.callback);
g.dequeue()})};a.effects.scale=function(c){return this.queue(function(){var h=a(this);var e=a.extend(true,{},c.options);var k=a.effects.setMode(h,c.options.mode||"effect");
var i=parseInt(c.options.percent,10)||(parseInt(c.options.percent,10)==0?0:(k=="hide"?0:100));var j=c.options.direction||"both";
var d=c.options.origin;if(k!="effect"){e.origin=d||["middle","center"];e.restore=true}var g={height:h.height(),width:h.width()};
h.from=c.options.from||(k=="show"?{height:0,width:0}:g);var f={y:j!="horizontal"?(i/100):1,x:j!="vertical"?(i/100):1};h.to={height:g.height*f.y,width:g.width*f.x};
if(c.options.fade){if(k=="show"){h.from.opacity=0;h.to.opacity=1}if(k=="hide"){h.from.opacity=1;h.to.opacity=0}}e.from=h.from;
e.to=h.to;e.mode=k;h.effect("size",e,c.duration,c.callback);h.dequeue()})};a.effects.size=function(c){return this.queue(function(){var d=a(this),o=["position","top","left","width","height","overflow","opacity"];
var n=["position","top","left","overflow","opacity"];var k=["width","height","overflow"];var q=["fontSize"];var l=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"];
var g=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"];var h=a.effects.setMode(d,c.options.mode||"effect");
var j=c.options.restore||false;var f=c.options.scale||"both";var p=c.options.origin;var e={height:d.height(),width:d.width()};
d.from=c.options.from||e;d.to=c.options.to||e;if(p){var i=a.effects.getBaseline(p,e);d.from.top=(e.height-d.from.height)*i.y;
d.from.left=(e.width-d.from.width)*i.x;d.to.top=(e.height-d.to.height)*i.y;d.to.left=(e.width-d.to.width)*i.x}var m={from:{y:d.from.height/e.height,x:d.from.width/e.width},to:{y:d.to.height/e.height,x:d.to.width/e.width}};
if(f=="box"||f=="both"){if(m.from.y!=m.to.y){o=o.concat(l);d.from=a.effects.setTransition(d,l,m.from.y,d.from);d.to=a.effects.setTransition(d,l,m.to.y,d.to)
}if(m.from.x!=m.to.x){o=o.concat(g);d.from=a.effects.setTransition(d,g,m.from.x,d.from);d.to=a.effects.setTransition(d,g,m.to.x,d.to)
}}if(f=="content"||f=="both"){if(m.from.y!=m.to.y){o=o.concat(q);d.from=a.effects.setTransition(d,q,m.from.y,d.from);d.to=a.effects.setTransition(d,q,m.to.y,d.to)
}}a.effects.save(d,j?o:n);d.show();a.effects.createWrapper(d);d.css("overflow","hidden").css(d.from);if(f=="content"||f=="both"){l=l.concat(["marginTop","marginBottom"]).concat(q);
g=g.concat(["marginLeft","marginRight"]);k=o.concat(l).concat(g);d.find("*[width]").each(function(){child=a(this);if(j){a.effects.save(child,k)
}var r={height:child.height(),width:child.width()};child.from={height:r.height*m.from.y,width:r.width*m.from.x};child.to={height:r.height*m.to.y,width:r.width*m.to.x};
if(m.from.y!=m.to.y){child.from=a.effects.setTransition(child,l,m.from.y,child.from);child.to=a.effects.setTransition(child,l,m.to.y,child.to)
}if(m.from.x!=m.to.x){child.from=a.effects.setTransition(child,g,m.from.x,child.from);child.to=a.effects.setTransition(child,g,m.to.x,child.to)
}child.css(child.from);child.animate(child.to,c.duration,c.options.easing,function(){if(j){a.effects.restore(child,k)}})})
}d.animate(d.to,{queue:false,duration:c.duration,easing:c.options.easing,complete:function(){if(d.to.opacity===0){d.css("opacity",d.from.opacity)
}if(h=="hide"){d.hide()}a.effects.restore(d,j?o:n);a.effects.removeWrapper(d);if(c.callback){c.callback.apply(this,arguments)
}d.dequeue()}})})}})(jQuery);(function(a,b){a.effects.shake=function(c){return this.queue(function(){var f=a(this),m=["position","top","left"];
var l=a.effects.setMode(f,c.options.mode||"effect");var o=c.options.direction||"left";var d=c.options.distance||20;var e=c.options.times||3;
var h=c.duration||c.options.duration||140;a.effects.save(f,m);f.show();a.effects.createWrapper(f);var g=(o=="up"||o=="down")?"top":"left";
var q=(o=="up"||o=="left")?"pos":"neg";var j={},p={},n={};j[g]=(q=="pos"?"-=":"+=")+d;p[g]=(q=="pos"?"+=":"-=")+d*2;n[g]=(q=="pos"?"-=":"+=")+d*2;
f.animate(j,h,c.options.easing);for(var k=1;k<e;k++){f.animate(p,h,c.options.easing).animate(n,h,c.options.easing)}f.animate(p,h,c.options.easing).animate(j,h/2,c.options.easing,function(){a.effects.restore(f,m);
a.effects.removeWrapper(f);if(c.callback){c.callback.apply(this,arguments)}});f.queue("fx",function(){f.dequeue()});f.dequeue()
})}})(jQuery);(function(a,b){a.effects.slide=function(c){return this.queue(function(){var f=a(this),e=["position","top","left"];
var j=a.effects.setMode(f,c.options.mode||"show");var i=c.options.direction||"left";a.effects.save(f,e);f.show();a.effects.createWrapper(f).css({overflow:"hidden"});
var g=(i=="up"||i=="down")?"top":"left";var d=(i=="up"||i=="left")?"pos":"neg";var k=c.options.distance||(g=="top"?f.outerHeight({margin:true}):f.outerWidth({margin:true}));
if(j=="show"){f.css(g,d=="pos"?-k:k)}var h={};h[g]=(j=="show"?(d=="pos"?"+=":"-="):(d=="pos"?"-=":"+="))+k;f.animate(h,{queue:false,duration:c.duration,easing:c.options.easing,complete:function(){if(j=="hide"){f.hide()
}a.effects.restore(f,e);a.effects.removeWrapper(f);if(c.callback){c.callback.apply(this,arguments)}f.dequeue()}})})}})(jQuery);
(function(a,b){a.effects.transfer=function(c){return this.queue(function(){var g=a(this),i=a(c.options.to),f=i.offset(),h={top:f.top,left:f.left,height:i.innerHeight(),width:i.innerWidth()},e=g.offset(),d=a('<div class="ui-effects-transfer"></div>').appendTo(document.body).addClass(c.options.className).css({top:e.top,left:e.left,height:g.innerHeight(),width:g.innerWidth(),position:"absolute"}).animate(h,c.duration,c.options.easing,function(){d.remove();
(c.callback&&c.callback.apply(g[0],arguments));g.dequeue()})})}})(jQuery);var hoverBackgroundColor="#F3F3F3";function addGroupCard(j,r,o,m,v,e,t,i,x,g,w,h,c){var b=createDiv(null,"groupCardDiv",null);
var n=createDiv(null,"groupCardDataHeaderContainer",null);var A=createDiv(null,"groupCardDataHeaderLeftDiv",null);var z=createDiv(null,"groupCardDataHeaderRightDiv",null);
var y=createDiv(null,"groupCardDataNameDiv",o);A.appendChild(y);n.appendChild(A);n.appendChild(z);b.appendChild(n);if(m!=null){var f=createDiv(null,"groupCardDataFunctionDiv",m);
A.appendChild(f)}if(v!=null){var l=createDiv(null,"groupCardDataFunctionDiv",v);A.appendChild(l)}if(e!=null){var q=createDiv(null,"groupCardDataFunctionDiv",e);
A.appendChild(q)}if(t!=null){var a=createDiv(null,"groupCardDataMailDiv",t);b.appendChild(a)}if(w!=null){var s=createDiv(null,"groupCardDataCommonDiv",w);
b.appendChild(s)}if(i!=null){var p=createDiv(null,"groupCardDataCommonDiv",i);b.appendChild(p)}if(x!=null){var d=createDiv(null,"groupCardDataCommonDiv",x);
b.appendChild(d)}if(g!=null){var k=createDiv(null,"groupCardDataCommonDiv",g);b.appendChild(k)}if(c){var u=createDiv(null,"groupCardDataEditLinkDiv",h);
z.appendChild(u)}j.appendChild(b)}function addPersonCard(i,v,q,g,m,h,w,e,f,t,r){var o="cardDiv";if(r==1||r==3){o="cardDivOwn"
}var b=createDiv(null,o,null);b.style.display="none";var p=createDiv(null,"cardImageContainer","Img");var u=createDiv(null,"cardDataContainer",null);
var k=createDiv(null,"cardDataHeaderContainer",null);var A=createDiv(null,"cardDataHeaderLeftDiv",null);var y=createDiv(null,"cardDataHeaderRightDiv",null);
var x=createDiv(null,"cardDataOwnerDiv",q);A.appendChild(x);k.appendChild(A);k.appendChild(y);u.appendChild(k);b.appendChild(p);
b.appendChild(u);if(g!=null){var d=createDiv(null,"cardDataFunctionDiv",g);A.appendChild(d)}if(m!=null){var a=createDiv(null,"cardDataMailDiv",m);
u.appendChild(a)}if(h!=null){var l=createDiv(null,"cardDataCommonDiv",h);u.appendChild(l)}if(w!=null){var c=createDiv(null,"cardDataCommonDiv",w);
u.appendChild(c)}if(e!=null){var j=createDiv(null,"cardDataCommonDiv",e);u.appendChild(j)}if(t!=null){var s=createDiv(null,"cardDataStatusDiv",t);
u.appendChild(s)}var n=createDiv(null,"cardDataEditLinkDiv",f);var z=createElement("a",null,null,null);if(r==0){z.href="/my/editperson/fpid/"+v+"/mpid/"+i.split("_")[1]
}z.appendChild(n);y.appendChild(z);jQuery("#"+i).append(b);return b}function createDiv(a,b,f,e){var c=document.createElement("div");
if(b!=null){c.className=b}if(a!=null){c.id=a}if(f!=null){c.innerHTML=f}if(e!=null){for(var d in e){jQuery(c).css(d,e[d])}}return c
}function createInput(b,d,a,f,e){var c=document.createElement("input");c.type=e;if(b!=null){c.id=b}if(d!=null){c.name=d}if(a!=null){c.className=a
}if(f!=null){c.value=f}return c}function createElement(d,c,a,b){var e=document.createElement(d);if(a!=null){e.className=a
}if(c!=null){e.id=c}if(b!=null){e.innerHTML=b}return e}function createUploadProgressMeter(){var a=createDiv(null,"uploadProgressContainerDiv",null);
var c=createDiv(null,"uploadProgress100Div",null);var d=createDiv(null,"uploadProgressCurrentDiv",null);jQuery(c).append(jQuery(d));
var b=createDiv(null,"uploadProgressPerctDiv",null);jQuery(a).append(c).append(b);return new Array(a,d,b)}function setMessageStyle(a,b){$("#"+a).removeClass(b?"formok":"formerror").addClass(b?"formerror":"formok")
}function commonResendInvitation(a,d){var c=jQuery(a).closest(".cardDiv").attr("id");var b=c.split("_");if(b.length>1){c=b[1]
}jQuery.ajax({url:"/ajax/my/resendinvitation/m/"+encodeURIComponent(d)+"/rid/"+encodeURIComponent(c),type:"GET",dataType:"xml",error:function(){if(d=="m"){createApplicationMessage("error",doTexts.getText("my.resend.errorResendingProjectInvitation"))
}else{createApplicationMessage("error",doTexts.getText("my.resend.errorResendingColleagueRequest"))}},success:function(e){if(jQuery(e).find("status").text()=="1"){createApplicationMessage("info",jQuery(e).find("message").text())
}else{createApplicationMessage("error",jQuery(e).find("message").text())}}})}function setFieldMessage(b,e,c,a){var d=jQuery("#"+b);
d.removeClass(c?"formok":"formerror").addClass(c?"formerror":"formok");d.attr("innerHTML",e);if(a){d.fadeIn()}}function createNotificationDiv(e,a,d){var b=createDiv("userNotification_"+e,a,null);
b.style.display="none";var c=createDiv(null,"notificationText",d);b.appendChild(c);return b}function changeNotificationMessage(d,a,c){var b=jQuery("#"+d);
if(a!=null){jQuery(b).removeClass();jQuery(b).addClass(a)}jQuery(b).find(":nth-child(1)").attr("innerHTML",c)}function acceptInvitation(f,b,e,a,d){var c="/ajax/my/acceptinvitationajax/mode/"+encodeURIComponent(f)+"/nid/"+encodeURIComponent(b)+"/pid/"+encodeURIComponent(e)+"/fpid/"+encodeURIComponent(a)+"/h/"+encodeURIComponent(d);
jQuery.ajax({url:c,type:"GET",dataType:"xml",error:function(){alert("Unknown error.")},success:function(i){var g=jQuery("#userNotification_"+b);
if(jQuery(i).find("status").text()=="1"){if("friend"==f){var k=createNotificationDiv(jQuery(i).find("notificationId").text(),jQuery(i).find("notificationCss").text(),jQuery(i).find("notificationMsg").text());
k.style.display="none";jQuery("#notificationsDiv").append(k);var j=jQuery("#profileFriendsMainDiv_"+e);var h=null;if(j!=null){h=addPersonCard("profileFriendsMainDiv_"+e,a,jQuery(i).find("newFriendFullname").text(),jQuery(i).find("newFriendFunction").text(),jQuery(i).find("newFriendMail").text(),jQuery(i).find("newFriendPhone").text(),jQuery(i).find("newFriendFax").text(),jQuery(i).find("newFriendMobile").text(),jQuery(i).find("newFriendCardEditText").text(),null,0);
jQuery(h).attr("id","cardDiv_"+a)}if(h!=null){jQuery(h).show("slow")}if(g!=null){g.slideUp(function(){g.remove()})}jQuery(k).slideDown()
}}else{if(jQuery(i).find("status").text()=="-1"){if(g!=null){var l=document.getElementById("userNotification_"+b+"_error");
if(l!=null){changeNotificationMessage(jQuery("#userNotification_"+b+"_error"),null,jQuery(i).find("message").text())}else{l=createNotificationDiv(b+"_error","notificationError",jQuery(i).find("message").text());
l.style.display="none";jQuery("#notificationsDiv").append(l);jQuery(l).slideDown()}}else{alert(jQuery(i).find("message").text())
}}else{}}}})}function appendAndShowLoader(a,d,c,b){jQuery("#"+a).clone().attr("id",d).css("display","block").appendTo("#"+c);
if(b!=null){jQuery("#"+b).css("display","none");jQuery("#"+c).css("display","block");jQuery("#"+d).css("display","block")
}else{jQuery("#"+c).css("display","block");jQuery("#"+d).css("display","block")}}function hideAndDeleteLoader(c,b,a){jQuery("#"+c).hide(function(){jQuery(this).remove();
jQuery("#"+b).css("display","none");if(a!=null){jQuery("#"+a).css("display","block")}})}function createLoaderElement(b,c){var a=createElement("img",b,null,null);
jQuery(a).attr("src",(c!=null)?c:"/images/loader_def.gif").attr("border","0");return a}function createCommonSmallLoaderElement(b){var a=createElement("img",b,null,null);
a.loaderCreated=(new Date()).getTime();jQuery(a).attr("src","/images/loader_small.gif").attr("border","0");return a}function createFileLoaderElement(b){var a=createElement("img",b,null,null);
jQuery(a).attr("src","/images/loader_file.gif").attr("border","0");return a}function selectFirstNotDisabled(c){var b=0,a=false;
jQuery("#"+c).children().each(function(){if(jQuery(this).is("optgroup")){jQuery(this).children().each(function(){if(jQuery(this).attr("disabled")!=true){jQuery("#"+c).attr("selectedIndex",b);
a=true;return false}b++})}else{if(jQuery(this).attr("disabled")!=true){jQuery("#"+c).attr("selectedIndex",b);a=true;return false
}b++}});if(!a){jQuery("#"+c).attr("selectedIndex","-1")}}function selectFirstShownInSelect(b){var c=0,a=false;jQuery(b).children().each(function(){if(jQuery(this).is("optgroup")){jQuery(this).children().each(function(){if(jQuery(this).css("display")!="none"){jQuery(b).attr("selectedIndex",c);
a=true;return false}c++})}else{if(jQuery(this).css("display")!="none"){jQuery(b).attr("selectedIndex",c);a=true;return false
}c++}});if(!a){jQuery("#"+selectId).attr("selectedIndex","-1")}}function manageProjectInvitation(c,b,f,e,a){var d="/ajax/my/acceptprojectinvitation/pmid/"+encodeURIComponent(b)+"/h/"+encodeURIComponent(e)+(!a?("/r/true"):"");
if(f!=null){d+="/pid/"+encodeURIComponent(f)}jQuery.ajax({url:d,type:"GET",dataType:"xml",error:function(){alert("Unknown error.")
},success:function(h){var g=jQuery("#userNotification_"+c);if(jQuery(h).find("status").text()=="1"){jQuery(h).find("notification").each(function(){var i=createNotificationDiv(jQuery(this).find("notificationId").text(),jQuery(this).find("notificationCss").text(),jQuery(this).find("notificationMsg").text());
i.style.display="none";jQuery("#notificationsDiv").append(i);if(g!=null){g.slideUp(function(){g.remove()})}jQuery(i).slideDown()
})}else{alert(jQuery(h).find("message").text())}}})}function cancel(){document.forms[0].action+="/cancel/true/";document.forms[0].submit()
}function generateId(c){var a=Math.round(100000*Math.random());for(var b=0;b<10000;b++){if(document.getElementById(c+"_"+a)!=null){a=Math.round(100000*Math.random())
}else{break}if(b==9999){alert("Cannot generate new id. Possible explanation: universe has suddenly decided to obey logic.");
return -1}}return a}function createDateBoxGroup(d,b,c){var g=createInput(d,d,b,null,"text");var f=(c==true)?"%d.%m.%Y %H:%M":"%d.%m.%Y";
var e=createElement("button","b_"+d,"formbutton","...");var a=document.createElement("script");a.type="text/javascript";a.text='Calendar.setup({inputField     :    "'+d+'",ifFormat       :    "'+f+'",button         :    "'+e.id+'",firstDay       : 1,singleClick    :    true ,showsTime      :    '+c+",onClose        :    function(cal) { cal.hide();}})";
return new Array(g,e,a)}function assignPersonFromSelect(c,f,g,b,e,h,a){var d=jQuery("#"+c).val();d=d.substring(d.lastIndexOf("_")+1);
if(jQuery("#"+f+d).length>0){return}if((d=="-1"&&jQuery("[id^="+b+d+"]").length>0)||(d!="-1"&&jQuery("[id^=assignedDiv_"+b+d+"]").length==0)){jQuery("#"+g).slideUp(function(){jQuery("[id^=assignedDiv_"+milestoneNum+"]").remove();
if(d!="-1"){jQuery("#"+e).css("display","none");addSelectedPersonToAssignedList(milestoneNum,d)}else{jQuery("#"+e).css("display","block");
jQuery("[id^="+h+"]").attr("disabled","");jQuery("#"+a).attr("disabled","disabled")}jQuery(this).slideDown()})}else{if(d!="-1"){addSelectedPersonToAssignedList(milestoneNum,d)
}}}function addSelectedPersonToAssignedList(a,f,l,e,g,c,i,d){var b=createDiv(g+f,"common_div_floated100",null);var h=createElement("span",null,null,jQuery("#"+a+" option:selected").text()+" ");
var k=createElement("span",null,"cancelActionText",jQuery("#removeText").attr("innerHTML"));jQuery(k).bind("click",function(){removeSelectedPersonFromAssignedList(f,a,g,c,i,d)
});var j=createInput(l+f,l+f,null,null,"checkbox");jQuery(j).css("display","none").attr("checked","checked");jQuery(b).css("display","none");
jQuery(b).append(h).append(k).append(j);jQuery("#"+d).attr("disabled","");jQuery("#"+i+f).attr("disabled","disabled");jQuery("#"+e).append(b).css("padding-bottom","10px");
jQuery(b).slideDown();selectFirstNotDisabled(a)}function removeSelectedPersonFromAssignedList(a,e,d,f,g,b){var c=jQuery("[id^="+d+"]").length;
jQuery("[id^="+d+"_"+a+"]").slideUp(function(){jQuery(this).remove()});jQuery("[id^="+g+"_"+a+"]").attr("disabled","");if(c==1){jQuery("#"+f).slideDown();
jQuery("#"+b).attr("disabled","disabled");selectFirstNotDisabled(e)}}function idsStringToIds(a){if(a==null||a.trim().length==0){return null
}return a.split(",")}function showIntoViewIfNecesary(d,a){if(a==null){a=0}d=jQuery(d);var b=Math.max(document.body.scrollTop,document.documentElement.scrollTop);
var c=window.innerHeight;var e=getPosition(d.get(0))-c+d.height()+10+a;if(e>b){jQuery.scrollTo(e)}}function getPosition(a){var b=0;
while(a){b+=a.offsetTop;a=a.offsetParent}return b}function deleteUploadedPlainFile(a,b){jQuery.ajax({url:"/fileupload",data:({h:a,m:"rem",fid:b}),type:"GET",dataType:"xml"})
}function slideUpAndRemove(a){jQuery(a).slideUp(function(){jQuery(this).remove()})}function bindArguments(b){var a=[];for(var c=1;
c<arguments.length;c++){a.push(arguments[c])}return function(){return b.apply(this,a)}}function getFirstChild(a){return jQuery(a).children(":nth-child(1)")
}function extenssionToBackgroundColor(b){b=b.toLowerCase();var a="";if(b=="jpg"){a="blue"}else{if(b=="jpeg"){a="blue"}else{if(b=="gif"){a="blue"
}else{if(b=="png"){a="blue"}else{if(b=="bmp"){a="blue"}else{if(b=="psd"){a="#B3EBEF"}else{if(b=="pdf"){a="#DF0009"}else{if(b=="doc"){a="#371FFF"
}else{if(b=="xls"){a="#00AF18"}else{if(b=="txt"){a="#E6B3EF"}else{if(b=="rtf"){a="#77B9EF"}else{if(b=="ppt"){a="#FFA70F"}else{if(b=="zip"){a="#DFB700"
}else{if(b=="rar"){a="#DF00DA"}else{if(b=="mp3"){a="#DF6300"}else{if(b==""){a="#505050"}}}}}}}}}}}}}}}}return a}function changeInnerHTML(d,c,b){var a=jQuery(d).attr("innerHTML");
jQuery(d).attr("innerHTML",b?jQuery(c).attr("innerHTML").capitalize():jQuery(c).attr("innerHTML"));jQuery(c).attr("innerHTML",b?a.uncapitalize():a)
}function createApplicationMessage(e,d){var b="infomessage";if(e=="error"){b="errormessage"}var a=createDiv(null,null,null);
var c=createElement("span",null,b,d);var f=jQuery("#applicationMessageDiv");jQuery(f).empty();jQuery(c).bind("click",function(){jQuery(this).parent().fadeOut()
});jQuery(a).append(c).appendTo(f)}function createImagePreviewTag(b,c){var a=createElement("img",null,null,null);a.border="0";
a.alt=b;a.src=c;return a}function isEmptyString(a){return(a==null||a.toString().trim().length==0)}function isEmptyList(a){return(a==null||a.length==0)
}function sendFeedback(){var b=jQuery("#improveTextarea");if(isEmptyString(jQuery(b).val())){return}var a={};a.ra=jQuery(b).prev().val();
a.ih=jQuery(b).val();jQuery.ajax({url:"/ajax/my/sendfeedback",type:"POST",dataType:"xml",data:(a),error:function(){alert("Unknown error. TRANS")
},success:function(c){if(jQuery(c).find("status").text()=="1"){jQuery(b).val("");jQuery(getFirstChild(jQuery(b).parent().next())).attr("disabled","disabled")
}else{alert(jQuery(c).find("message").text())}}})}function textareaImproveFocus(a){if(a.alreadyFocused==true){return}a.alreadyFocused=true;
jQuery(a).css({width:"50%",height:"50px"});jQuery(a).parent().next().show()}function cancelImprovmentButtonClick(a){var b=jQuery(a).parent().prev().find("textarea").get(0);
b.alreadyFocused=false;jQuery(b).css({width:"20%",height:"20px"});jQuery(a).parent().hide()}function groupAllFilterSpans(a){var b=new Array();
jQuery(a).find("span").each(function(){var c=jQuery(this).get(0).filterValue;b[c]=jQuery(this).attr("innerHTML")});return b
}function assignFilterValuesToSpans(a,b){var c=0;jQuery(a).find("span").each(function(){jQuery(this).get(0).filterValue=b[c++]
})}function repositionCommonFilterSpans(a,e,b,f){var c=0;var d=0;jQuery(a).find("span").each(function(){if(c==0){jQuery(this).get(0).filterValue=e;
jQuery(this).attr("innerHTML",f[e])}else{var g=b[d];if(g==e){g=b[++d]}jQuery(this).get(0).filterValue=g;jQuery(this).attr("innerHTML",f[g]);
d++}c++})}function changeSpansInnerHtml(d,a,c){var b=jQuery(d).attr("innerHTML");jQuery(d).attr("innerHTML",c?jQuery(a).attr("innerHTML").trim().capitalize():jQuery(a).attr("innerHTML"));
jQuery(a).attr("innerHTML",c?b.uncapitalize():b)}function fillLogRequestArrayFromElements(b,c,e,f){var a={};a.h=e;a.mode=f;
a.day=jQuery(b).find("#timeLogDay_"+((((c!=null)?c:"")!=null)?((c!=null)?c:""):"")).val();a.month=jQuery(b).find("#timeLogMonth_"+((c!=null)?c:"")).val();
a.year=jQuery(b).find("#timeLogYear_"+((c!=null)?c:"")).val();a.desc=jQuery(b).find("#timeLogDescription_"+((c!=null)?c:"")).val();
a.hours=jQuery(b).find("#timeLogHours_"+((c!=null)?c:"")).val();a.minutes=jQuery(b).find("#timeLogMinutes_"+((c!=null)?c:"")).val();
var d=jQuery(b).find("#timeLogPerson_"+((c!=null)?c:""));if(jQuery(d).length>0){a.prid=jQuery(d).val()}return a}function fillMoneyLogRequestArrayFromElements(b,c,e,f){var a={};
a.h=e;a.mode=f;a.day=jQuery(b).find("#moneyLogDay_"+((((c!=null)?c:"")!=null)?((c!=null)?c:""):"")).val();a.month=jQuery(b).find("#moneyLogMonth_"+((c!=null)?c:"")).val();
a.year=jQuery(b).find("#moneyLogYear_"+((c!=null)?c:"")).val();a.desc=jQuery(b).find("#moneyLogDescription_"+((c!=null)?c:"")).val();
a.amount=jQuery(b).find("#moneyLogAmount_"+((c!=null)?c:"")).val();a.income=jQuery(b).find("#incomeBoolField_"+((c!=null)?c:"")).val();
var d=jQuery(b).find("#moneyLogPerson_"+((c!=null)?c:""));if(jQuery(d).length>0){a.prid=jQuery(d).val()}return a}function manageUpdatingLogErrors(c,a,b){errorRows=new Array();
jQuery(c).find("es:first").find("e").each(function(){var g=jQuery(this).attr("nm");var e=jQuery(this).text();var f=null;var d=null;
if(g=="hours"){d=jQuery(a).find("#timeLogHoursErrorRow_"+((b!=null)?b:""));f=jQuery(d).find("#timeLogHoursError_"+((b!=null)?b:""))
}else{if(g=="date"){d=jQuery(a).find("#timeLogDateErrorRow_"+((b!=null)?b:""));f=jQuery(d).find("#timeLogDateError_"+((b!=null)?b:""))
}}if(d!=null){jQuery(f).attr("innerHTML",e);errorRows.push(d)}});jQuery(a).find("[id$=ErrorRow_"+((b!=null)?b:"")+"]").hide();
jQuery.each(errorRows,function(){jQuery(this).show()})}function openCloseDataGroupCommon(c){var b=jQuery(c).closest(".tableRowCMSDiv").next();
var a=false;if(jQuery(b).is(":visible")){jQuery(c).addClass("contentTitleDivClosed").removeClass("contentTitleDiv")}else{jQuery(c).addClass("contentTitleDiv").removeClass("contentTitleDivClosed");
var a=true}if(a==true){jQuery(b).slideDown()}else{jQuery(b).slideUp()}return a}function remember(d,e,c,b){var a={};a.coid=e;
a.cos=c;a.h=b;a.mode=d;jQuery.ajax({url:"/ajax/my/remember",type:"GET",dataType:"xml",data:(a),error:function(){},success:function(f){}})
}function rememberProfile(c,b){var a={};a.cv=c;a.h=b;a.mode="chpr";jQuery.ajax({url:"/ajax/my/remember",type:"GET",dataType:"xml",data:(a),error:function(){},success:function(d){}})
}function rememberMembership(c,b,d){var a={};if(!isEmptyString(c)){a.cv=c}a.h=d;a.mode="chmbs";a.cp=b;jQuery.ajax({url:"/ajax/my/remember",type:"GET",dataType:"xml",data:(a),error:function(){},success:function(e){}})
}function onProfileSpanClickCommon(a){jQuery(getFirstChild(jQuery(a).parent().prev().prev())).attr("innerHTML",jQuery(a).attr("innerHTML"));
jQuery(a).parent().hide();jQuery(a).parent().children().show();jQuery(a).hide()}function inverseOnProfileSpanClickCommon(c){var b=jQuery("#profileSelectOptions");
if(isEmptyString(c)){onProfileSpanClickCommon(b.getFirstChild())}else{var a=b.children("#"+c);if(jQuery(a).length==0){a=b.children("[id^="+c+"]:first")
}if(jQuery(a).length>0){onProfileSpanClickCommon(a)}}}function rememberProfileWhole(a,c,b){rememberProfile(c,b);onProfileSpanClickCommon(a)
}function rememberMembershipWhole(b,c,a,d){rememberMembership(c,a,d);onProfileSpanClickCommon(b)}function applyMembershipChangeToMembershipSelectRow(c,b){var a=null;
if(isEmptyString(b)){jQuery(c).find(".profileSelectContainerDiv").each(function(){jQuery(this).find(".profileSelectNameDisplayDiv").css("padding-left","");
var d=jQuery(this).find("input:radio");if(d.attr("checked")!=true){jQuery(this).find(".profileSelectImageOuterDiv").removeClass("commonPictureSelectedDiv")
}d.show();jQuery(this).show()})}else{jQuery(c).find(".profileSelectContainerDiv").each(function(){var d=jQuery(this).find("input:radio").val().getRepresentedBasename();
var e=b.toString();if(e.indexOf("_")>0){e=e.getRepresentedBasename()}if(d==e){a=jQuery(this).find("input:radio").attr("checked","checked");
a.hide();jQuery(this).find(".profileSelectImageOuterDiv").addClass("commonPictureSelectedDiv");jQuery(this).find(".profileSelectNameDisplayDiv").css("padding-left","33px");
jQuery(this).show()}else{jQuery(this).hide()}})}return a}function commonSelectHashedOption(a,b){if(b.indexOf("_")>0){jQuery(a).find("option[value="+b+"]").attr("selected","selected")
}else{jQuery(a).find("option[value="+b+"],option[value^="+b+"_]").attr("selected","selected")}}function removeAllNonInListFromMembershipSelectRow(m,g,c,j){var f=null;
var a=null;if(g!=null){a=commonArrayToTable(g)}c=c==null?"":c.toString();if(c.indexOf("_")>0){c=c.getRepresentedBasename()
}var b=jQuery(m).find(".profileSelectContainerDiv");if(g==null){for(var e=0;e<b.length;e++){var h=b.eq(e);h.find(".profileSelectNameDisplayDiv").css("padding-left","33px");
var k=h.find("input:radio:first");if(f==null||c==k.val().getRepresentedBasename()){f=k;f.attr("checked","checked")}k.show();
b.show()}}else{var l=0;for(var e=0;e<b.length;e++){if(a[b.eq(e).find("input:radio:first").val().getRepresentedBasename()]==true){l++
}}for(var e=0;e<b.length;e++){var h=b.eq(e);var d=h.find("input:radio:first").val().getRepresentedBasename();if(a[d]==true){if(l==1){h.find(".profileSelectNameDisplayDiv").css("margin-left","");
f=h.find("input:radio").attr("checked","checked");f.hide();h.find(".profileSelectImageOuterDiv").addClass("commonPictureSelectedDiv")
}else{if(f==null||d==c){f=h.find("input:radio").attr("checked","checked")}else{h.find("input:radio").attr("checked","")}h.find(".profileSelectNameDisplayDiv").css("padding-left","33px")
}h.show()}else{if(j){h.hide();h.find(".profileSelectImageOuterDiv").removeClass("commonPictureSelectedDiv")}else{h.remove()
}}}}return f}function profileSelectInnerClick(a,b){var c=jQuery(a).parents(".profileSelectContainerDiv").last().find("input");
if(b==false&&lastSelectedProfileRadioValue==jQuery(c).val()){return false}jQuery(a).parents(".profileSelectContainerDiv").last().parent().find(".profileSelectImageOuterDiv").removeClass("commonPictureSelectedDiv");
jQuery(c).attr("checked","checked").next().addClass("commonPictureSelectedDiv");lastSelectedProfileRadioValue=jQuery(c).val();
return true}function profileLocalSelectInnerClick(a){var b=jQuery(a).parents(".profileSelectContainerDiv").last().find("input");
jQuery(a).parents(".profileSelectContainerDiv").last().parent().find(".profileSelectImageOuterDiv").removeClass("commonPictureSelectedDiv");
jQuery(b).attr("checked","checked").next().addClass("commonPictureSelectedDiv");return b}function bindBusinessCardsMouseMoveEvents(a){var b=(a!=null)?jQuery(a).children(".cardDiv,.cardDivOwn"):jQuery(".cardDiv,.cardDivOwn");
jQuery(b).mouseenter(function(){var c=jQuery(this);if(!c.hasClass("own")&&!c.isLoading()){c.getFirstChild().find("img").show()
}c.children(".commonSmallLoaderHeight").css("visibility","visible")}).mouseleave(function(){var c=jQuery(this);if(!c.hasClass("own")){c.getFirstChild().find("img").hide()
}c.children(".commonSmallLoaderHeight").css("visibility","hidden")}).find("[id^=cardMoveHandle_]").mouseenter(function(){businessCardOnMoveHandleMouseOver(this)
}).mouseleave(function(){businessCardOnMoveHandleMouseOut(this)})}function businessCardOnManageGroupLinkMouseOver(a,e){var c="",b="";
a=jQuery(a);if(e=="pr"){var d=jabox.getProjectGroup(a.closest("[id^=cardGroupDiv_]").getRepresentedId());c=d.getNormalColor();
b=d.getBackgroundHooverColor()}else{if(e=="ag"){var d=jabox.getGroup(a.closest("[id^=cardGroupDiv_]").getRepresentedId());
c=d.getNormalColor();b=d.getBackgroundHooverColor()}}jQuery(a).css({color:b,backgroundColor:c})}function businessCardOnManageGroupLinkMouseOut(a,d){var b="";
a=jQuery(a);if(d=="pr"){var c=jabox.getProjectGroup(a.closest("[id^=cardGroupDiv_]").getRepresentedId());b=c.getNormalColor()
}else{if(d=="ag"){var c=jabox.getGroup(a.closest("[id^=cardGroupDiv_]").getRepresentedId());b=c.getNormalColor()}}jQuery(a).css({color:b,backgroundColor:""})
}function businessCardOnMoveHandleMouseOver(a){jQuery(a).attr("src","/images/dragdrop_card_active.gif")}function businessCardOnMoveHandleMouseOut(a){jQuery(a).attr("src","/images/dragdrop_card.gif")
}function businessCardOnCardDropOK(b,m,l,j,h){var c=jQuery(l).attr("id");if((lastEnterededSortListId!=null&&lastEnterededSortListId==c)||lastEnterededSortListId==null){var o=createCommonSmallLoaderElement(null);
var d=m.item;var e=jQuery(d).find(".commonSmallLoaderDiv");jQuery(e).children().hide();jQuery(e).append(o);var p=jQuery(d).parent();
var g=jQuery(d).attr("id").split("_");var n={};n.h=h;n.coid=g[1];if(g.length>2){n.poid=jQuery(d).attr("id").split("_")[2]
}n.roid=jQuery(p).attr("id").getRepresentedId();n.m=j;var a=jQuery(p).children("[id^=cardDiv_]");for(var f=0;f<jQuery(a).length;
f++){var k=jQuery(a).eq(f).attr("id").split("_")[1];if(k!=null){n["cor_"+k]=f}}jQuery.ajax({url:"/ajax/my/savecardsorder",type:"GET",dataType:"xml",data:n,error:function(){if(j=="pr"){createApplicationMessage("error",doTexts.getText("my.projectPeople.errorChangingPeopleSortOrder"))
}else{createApplicationMessage("error",doTexts.getText("common.errorChangingGlobalPeopleSortOrder"))}jQuery(m.sender).sortable("cancel");
jQuery(o).remove()},success:function(i){if(jQuery(i).find("status").text()=="1"){if(g.length>2){jQuery(d).attr("id",g[0]+"_"+g[1]+"_"+n.roid)
}}else{if(jQuery(i).find("status").text()=="2"){createApplicationMessage("info",jQuery(i).find("message").text());jQuery(d).fadeOut(function(){jQuery(this).remove()
})}else{createApplicationMessage("error",jQuery(i).find("message").text());if(m.item.listToCancel==null){jQuery(m.item).parent().sortable("cancel")
}else{jQuery(m.item.listToCancel).sortable("cancel")}}}m.item.listToCancel=null;jQuery(o).remove()}});lastEnterededSortListId=null
}}function onVisibleMemberElementClick(a){var b=jQuery(a).closest(".groupVisibleMemberDiv").find("input:checkbox").get(0);
if(b.disabled==true){return}b.checked=!b.checked}function getMilis(){return(new Date()).getTime()}function rightColumnBoardOnTitleCommonClick(b){var a=jQuery(b).closest(".rightColumnBoardEntryGroupTitleContainer").next();
if(a.is(":visible")){a.slideUp();jQuery(b).addClass("closed")}else{a.slideDown();jQuery(b).removeClass("closed")}}function commonConfigureShowHideSpans(a){jQuery(a).find("[name^=showHideProjectSpan_]").each(function(){this.showOnGlobal=jQuery(this).attr("name").endsWith("_1");
var b=jQuery(this).attr("name").substring(0,jQuery(this).attr("name").lastIndexOf("_"));this.project=b.getRepresentedId();
jQuery(this).removeAttr("name")})}function commonManageChangeCompleteByDataResponse(b,a){if(jQuery(a).find("cmp").length>0){var c=b.find(".summedDiv:first");
if(c.prev().hasClass("completedByDiv")){c.prev().remove()}c.before(jQuery(a).find("cmp").text())}}function commonManageChangeCompleteByResponse(c,b,a,d){c.find("span:first").attr("innerHTML",jQuery(b).find("cmp").text()).next().show().next().remove();
if(a>0){jQuery(d).oneTime(a,function(){commonChangeCompleteByTimerExpand(this)})}else{jQuery(d).stopTime()}}function commonCreateChangeCompleteByPanel(l,h,b,c,a){var o=createElement("span","compChangeCP_"+l,"completedByChangeSelectInputCont");
var n=jQuery("<select></select>");jabox.getUserProjectMembershipsForProject(h);if(jsActionString=="all"){var k=(b==null)?jabox.getUserProjectMembershipsForProject(h):jabox.getUserProjectMembershipsForProjectAndProfile(h,b.toString().getRepresentedBasename());
for(var e=0;e<k.length;e++){var j=jabox.getProjectMembership(k[e]);if(a!=null){var m=false;for(var f in a){if(j.getId()==f){m=true;
break}}if(!m){continue}}jQuery(n).append('<option value="'+j.getId()+'" '+(c==j.getId()?'selected="selected"':"")+">"+j.getMembershipFullname()+"</option>")
}}else{for(var e=0;e<jabox.getUserProjectMemberships().length;e++){var j=jabox.getProjectMembership(jabox.getUserProjectMemberships()[e]);
if(a!=null){var m=false;for(var f in a){if(j.getId()==f){m=true;break}}if(!m){continue}}jQuery(n).append('<option value="'+j.getId()+'" '+(c==j.getId()?'selected="selected"':"")+">"+j.getMembershipFullname()+"</option>")
}}var g=jQuery('<input type="button" value="'+doTexts.getText("common.change")+'"/>');var d=createElement("span",null,"grayRedColorLink",doTexts.getText("common.cancel"));
jQuery(d).click(function(){var i=jQuery(d).parent();jQuery(i).hide();if(jQuery(i).get(0).expired==true){jQuery(i).prev().prev().find("span.meDiv").show();
jQuery(i).prev().remove();jQuery(i).remove()}else{jQuery(i).prev().show();jQuery(i).prev().prev().find("span.meDiv").show();
jQuery(i).remove()}});jQuery(o).append(n).append(g).append("<span> "+doTexts.getText("common.or")+" </span>").append(d);return o
}function commonChangeCompleteByTimerExpand(c,b){var f=b;if(f==null){f=c.id.getRepresentedId()}var a=jQuery(c).find("#changeCompl_"+f);
var e=jQuery(c).find("#compChangeCP_"+f);if(jQuery(e).length>0){var d=jQuery(e).find("input:button");jQuery(d).next().fadeOut(function(){jQuery(this).remove()
});jQuery(d).fadeOut(function(){jQuery(this).remove()});jQuery(e).get(0).expired=true}else{if(jQuery(a).length>0){jQuery(a).fadeOut(function(){jQuery(this).remove()
})}}}function commonManageCompleteByChangeSpan(h,f,a,b,j,d){var c=null;var i=null;var e=jQuery(f);if(b){c=e.find("#changeCompl_"+h);
i=e.find("#compChangeCP_"+h)}else{e=f.parent();c=e.find("#changeCompl_"+h);i=e.find("#compChangeCP_"+h)}if(!isEmptyString(a)){f.attr("innerHTML",a)
}var g=null;if(j<=0&&c.length>0){c.remove();i.remove()}else{if(j>0){if(!d&&i.length>0){e.find(".meDiv").hide()}if(!d&&c.length>0){if(b){f.append(c);
f.append(i)}}else{if(d&&c.length>0){if(b){f.append(c)}c.show();i.remove()}else{c=createElement("span","changeCompl_"+h,"blackColorLink",doTexts.getText("common.change"));
g=c;if(b){f.append(c)}else{f.after(c)}}}}}return g}function isEnterPressed(a){return(a.which=="13")}function isCtrlEnterPressed(a){return(a.ctrlKey&&a.which=="13")
}function isShiftEnterPressed(a){return(a.shiftKey&&a.which=="13")}function isCtrlOrShiftEnterPressed(a){return(a.which=="13"&&(a.shiftKey||a.ctrlKey))
}function businessCardOnFlipSpanClicked(d){var a=jQuery(d).closest(".cardDiv ").children(".dataDiv");if(a.length<2){return
}var b,c;if(a.eq(0).is(":visible")){b=a.eq(0);c=a.eq(1)}else{b=a.eq(1);c=a.eq(0)}b.hide();c.show()}function commonOnDateElementSelectChange(e){var j=jQuery(e).parent().children("select[id^=years_]");
var g=jQuery(e).parent().children("select[id^=months_]");var i=jQuery(e).parent().children("select[id^=days_]");j.get(0).preMode=null;
g.get(0).preMode=null;i.get(0).preMode=null;var f=parseInt(j.val());var c=parseInt(g.val())-1;var k=parseInt(i.val());var l=jQuery(e).nextAll("span[id^=setToday_]:first");
var b=jQuery(e).nextAll("span[id^=setFirstLog_]:first");var a=jQuery(e).nextAll("span[id^=setLastLog_]:first");var d=new Date(f,c,k,0,0,0,0);
if(d.getDate()!=k||d.getMonth()!=c||d.getFullYear()!=f){jQuery(e).nextAll("span.wrongDateMessage").fadeIn();l.fadeIn();b.fadeIn();
a.fadeIn()}else{jQuery(e).nextAll("span.wrongDateMessage").fadeOut();if(l.length>0){var h=new Date();if(h.getDate()!=k||h.getMonth()!=c||h.getFullYear()!=f){l.fadeIn()
}else{l.fadeOut()}}if(a.length>0){if(d.print("%I")==lastAvailableLogDate.print("%I")){a.fadeOut()}else{a.fadeIn()}}if(b.length>0){if(d.print("%I")==firstAvailableLogDate.print("%I")){b.fadeOut()
}else{b.fadeIn()}}}}function commonSetDateElementsToDate(c,e,g){var b=e;if(b==null){b=new Date()}var d=jQuery(c).parent().children("select[id^=years_]");
d.val(b.getFullYear());var a=jQuery(c).parent().children("select[id^=months_]");a.val(b.getMonth()+1);var f=jQuery(c).parent().children("select[id^=days_]");
f.val(b.getDate()).trigger("change");if(!isEmptyString(g)){d.get(0).preMode=g;a.get(0).preMode=g;f.get(0).preMode=g}}function commonPutDateParametersToArray(a,h,c){var g=a.children("select[id^=years_]");
var e=a.children("select[id^=months_]");var f=a.children("select[id^=days_]");if(isEmptyString(g.get(0).preMode)){var d=g.val();
var b=e.val();var i=f.val();if(c==null){c=""}if(b.length<2){b="0"+b}if(i.length<2){i="0"+i}h[COMMON_FILTER_DATE_PARAMETER+c]=d+""+b+""+i
}else{h[COMMON_FILTER_DATE_PARAMETER+c]=g.get(0).preMode}}function commonGetDateFromDropdowns(g){var e=g.children("select[id^=years_]");
var b=g.children("select[id^=months_]");var f=g.children("select[id^=days_]");var c=parseInt(e.val());var a=parseInt(b.val())-1;
var h=parseInt(f.val());var d=new Date(c,a,h,0,0,0,0);if(d.getDate()!=h||d.getMonth()!=a||d.getFullYear()!=c){return null
}else{return d}}function commonInitDateDropdowns(e,d){var b=e.children("select[id^=years_]");var a=e.children("select[id^=months_]");
var c=e.children("select[id^=days_]");if(!isEmptyString(d)){b.get(0).preMode=d;a.get(0).preMode=d;c.get(0).preMode=d}else{b.get(0).preMode=null;
a.get(0).preMode=null;c.get(0).preMode=null}}function commonOnSummedHoursDivMouseOver(){jQuery(this).find("a").css("color","#505050").find("img").attr("src","/images/app/time_hoover.png")
}function commonOnSummedHoursDivMouseLeave(){jQuery(this).find("a").css("color","").find("img").attr("src","/images/app/time.png")
}function commonOnSummedFilesDivMouseOver(){jQuery(this).find("a").css("color","#505050").find("img").attr("src","/images/app/file_hoover.png")
}function commonOnSummedFilesDivMouseLeave(){jQuery(this).find("a").css("color","").find("img").attr("src","/images/app/file.png")
}function commonOnSummedMoneyDivMouseOver(){jQuery(this).find("a").css("color","#505050").find("img").attr("src",MONEY_IMG_HOOVER_SRC)
}function commonOnSummedMoneyDivMouseLeave(){jQuery(this).find("a").css("color","").find("img").attr("src",MONEY_IMG_NORMAL_SRC)
}function commonOnSummedCommentsDivMouseOver(){var a=jQuery(this).getFirstChild();if(this.newComments==null){this.newComments=(a.find(".newComments").length>0);
this.hasComments=a.find(".noComments").length==0}a.css("color","#505050");if(this.hasComments==false){a.find("img").attr("src","/images/app/comment_none_hoover.png")
}else{if(this.newComments==true){a.find("img").attr("src","/images/app/comment_new_hoover.png")}else{a.find("img").attr("src","/images/app/comment_hoover.png")
}}}function commonOnSummedCommentsDivMouseLeave(){var a=jQuery(this).getFirstChild();if(this.newComments==null){this.newComments=(a.find(".newComments").length>0);
this.hasComments=a.find(".noComments").length==0}a.css("color","");if(this.hasComments==false){a.find("img").attr("src","/images/app/comment_none.png")
}else{if(this.newComments==true){a.find("img").attr("src","/images/app/comment_new.png")}else{a.find("img").attr("src","/images/app/comment.png")
}}}function commonHideSummedComments(a){var b=jQuery(a).find(".commentsDiv:first");if(b.find(".noComments").length>0){b.css("visibility","hidden")
}}function commonUpdateSummedDiv(b,c,a){b=jQuery(b);if(a==null||isEmptyString(a.toString())||a.toString()=="0"){b.hide()}else{b.getFirstChild().attr("href",c).find("span").attr("innerHTML",a);
b.show()}}function commonUpdateSummedCommentsDiv(e,g,f,d,b){e=jQuery(e);var a=e.getFirstChild().attr("href",g);if(f>0){var c=a.getFirstChild().next().attr("innerHTML",f);
if(d>0){c.next().attr("src","/images/app/comment_new.png");c.nextAll("span").attr("innerHTML",d)}else{c.next().attr("src","/images/app/comment.png");
c.nextAll("span").remove()}}else{if(a.children().length>2){a.find(".newComments").remove()}a.find("img").attr("src","/images/app/comment_none.png");
a.find("span:last").removeClass("newComments").addClass("noComments").attr("innerHTML",doTexts.getText("common.commentLinkText"))
}e.show();if(b==true&&f==0){e.css("visibility","hidden")}}function commonArrayToTable(b){if(b==null){return null}if(b instanceof Array){var c={};
for(var a=0;a<b.length;a++){c[b[a]]=true}return c}return b}function commonHideSelectOptionsNotInTable(a,b){a=jQuery(a);b=commonArrayToTable(b);
var c=a.children("optgroup");if(c.length>0){c.each(function(){var d=0;jQuery(this).children().each(function(){if(b!=null&&b[this.value]!=true&&b[this.value.getRepresentedBasename()]!=true){jQuery(this).hide()
}else{jQuery(this).show();d++}});if(d==0){jQuery(this).hide()}else{jQuery(this).show()}})}else{a.children().each(function(){if(!isEmptyString(this.value)){if(b!=null&&b[this.value]!=true&&b[this.value.getRepresentedBasename()]!=true){jQuery(this).hide()
}else{jQuery(this).show()}}})}}function commonGetSelectedActionPerformerValue(c){var a=jQuery(c).find("input:radio");if(a.length==1){return a.eq(0).val()
}else{for(var b=0;b<a.length;b++){if(a.eq(b).get(0).checked==true){return a.eq(b).val()}}return null}}function commonManageUpdatingTimeLogErrors(b,a){var c=a.getRepresentedId();
jQuery(b).find("es:first").children().each(function(){var d=jQuery(this).attr("nm");if(d=="date"){var f=a.find("#logDateInputDiv_"+c);
var e=f.find(".wrongDateMessage");e.attr("innerHTML",jQuery(this).text());e.show()}else{if(d=="hours"){commonShowFormError(a,"logTimeInputDiv_"+c,"logTimeErrorInputDiv_"+c,jQuery(this).text())
}else{if(d=="for"){commonShowFormError(a,"logForDiv_"+c,"logForErrorDiv_"+c,jQuery(this).text())}else{if(d=="files"){commonShowFormError(a,"logFilesDiv_"+c,"logForFilesDiv_"+c,jQuery(this).text())
}else{if(d=="task"){commonShowFormError(a,"logForTaskDiv_"+c,"logForTaskErrorDiv_"+c,jQuery(this).text())}}}}}})}function commonShowFormError(b,a,e,c){var d=b.find("#"+a);
var f=d.nextAll("#"+e);if(f.length==0){f=jQuery(createDiv(e,"formerror",c));d.after(f)}else{f.attr("innerHTML",c);f.css("visibility","visible")
}}function commonClearEditTimeLogErrors(a){jQuery(a).find(".wrongDateMessage").hide();jQuery(a).find(".formerror").css("visibility","hidden")
}function commonClearEditMoneyLogErrors(a){jQuery(a).find(".wrongDateMessage").hide();jQuery(a).find(".formerror").css("visibility","hidden")
}function commonOnMarkManualSelectChange(){jQuery(this).get(0).manChanged=true}function commonMarkManualSelectReset(a){jQuery(a).get(0).manChanged=false
}function commonHasMarkManualSelectBeenChanged(a){return(a.get(0).manChanged==null||a.get(0).manChanged==true)}function commonFillArrayWithTimeLogData(c,f){var e=f.getRepresentedId();
c.selm=commonGetSelectedActionPerformerValue(f).getRepresentedBasename();var d=f.find("#logDateInputDiv_"+e);commonPutDateParametersToArray(d,c,null);
c.desc=f.find("#logDescription_"+e).val();var b=f.find("#logFor_"+e);if(b.length>0){c.prid=b.val()}var a=f.find("#logTask_"+e);
if(a.length>0){c.tid=a.val()}var g=f.find("#logTimeInputDiv_"+e);c.hlog=g.find("#hoursTimeText_"+e).val();c.mlog=g.find("#minutesTimeText_"+e).val();
if(typeof filterGroupByMode!=="undefined"){c.gpd=(filterGroupByMode=="h")?"1":"0"}}function commonFillArrayWithMoneyLogData(c,f){var e=f.getRepresentedId();
c.selm=commonGetSelectedActionPerformerValue(f).getRepresentedBasename();var d=f.find("#logDateInputDiv_"+e);commonPutDateParametersToArray(d,c,null);
c.desc=f.find("#logDescription_"+e).val();var b=f.find("#logFor_"+e);if(b.length>0){c.prid=b.val()}var a=f.find("#logTask_"+e);
if(a.length>0){c.tid=a.val()}c.am=f.find("#amountMoneyText_"+e).val();if(typeof filterGroupByMode!=="undefined"){c.gpd=(filterGroupByMode=="h")?"1":"0"
}c.inc=f.find("#logIncomeField_"+e).val();f.find("#logFilesDiv_"+e).getFirstChild().children().each(function(){var h=null;
var i=null,g=null;if(this.uploadedFileId!=null){h=this.uploadedFileId;i="ddfl_";g="ddfdsc_"}else{h=this.newFileId;i="dfil_";
g="dfdsc_"}c[i+h]=jQuery(this).find("input:hidden").val();c[g+h]=jQuery(this).find("textarea").val()})}function commonManageUpdatingMoneyLogErrors(b,a){var c=a.getRepresentedId();
jQuery(b).find("es:first").children().each(function(){var d=jQuery(this).attr("nm");if(d=="date"){var f=a.find("#logDateInputDiv_"+c);
var e=f.find(".wrongDateMessage");e.attr("innerHTML",jQuery(this).text());e.show()}else{if(d=="amount"){commonShowFormError(a,"logAmountInputDiv_"+c,"logAmountErrorInputDiv_"+c,jQuery(this).text())
}else{if(d=="for"){commonShowFormError(a,"logForDiv_"+c,"logForErrorDiv_"+c,jQuery(this).text())}else{if(d=="files"){commonShowFormError(a,"logFilesDiv_"+c,"logFilesErrorDiv_"+c,jQuery(this).text())
}else{if(d=="task"){commonShowFormError(a,"logForTaskDiv_"+c,"logForTaskErrorDiv_"+c,jQuery(this).text())}}}}}})}function commonOnAttachFileSpanClick(a){jQuery(a).parent().hide().closest(".tableRowCMSDiv").next().show();
jQuery(a).parent().remove()}function commonOnAddDescriptionSpanClick(b){var a=jQuery(b).closest(".tableRowCMSDiv");var c=a.next();
a.hide().remove();c.show(0,function(){jQuery(this).find("textarea:visible").focus()})}function commonOnChangeIncomeExpenseTitleSpanClick(c){var b=jQuery(c).closest(".tableRowCMSDiv").nextAll("[id^=logAmountRow_]");
var a=b.find("[id^=logIncomeField_]");if(a.val()=="1"){a.val("0");b.getFirstChild().attr("innerHTML",doTexts.getText("my.projectMoney.amountCellExpenseCaption"))
}else{a.val("1");b.getFirstChild().attr("innerHTML",doTexts.getText("my.projectMoney.amountCellIncomeCaption"))}changeSpansInnerHtml(c,jQuery(c).parent().prev(),false)
}function commonSetMoneyFileEvents(a){var d=a.find("[id^=logFilesDiv_]:first").children(":last").find(".title").find("span.grayColorLink");
d.click(function(){addFileToContentOnChangeTypeSpanClick(this)}).get(0).lastMode="p";var c=d.closest(".title").next().find("select");
c.change(function(){commonOnMoneyFileSelectChange(this)});var b=d.closest(".title").nextAll(".new:first").find("input:button");
if(isXhr2()){commonCreateMoneyFilesAjaxUpload2(b)}else{commonCreateMoneyFilesAjaxUpload(b)}}function commonCreateMoneyFilesAjaxUpload(a){var b=new PPRandom();
var c=b.nextId("newFileTemplateDiv_");new AjaxUpload(a,{mode:AjaxUploadMode.RELATED_CONTENT,name:"fileInput_"+c,action:"/fileupload",data:{qid:c,m:"m",h:filesUploadHash},autoSubmit:true,onNotSuccess:function(){},onComplete:function(e,d){this.commonOnComplete(d)
},onSubmit:function(e,f){this.setProgressHash(filesProgressHash);var d=this.getButton();commonOnMoneyFilesAjaxUploadSubmit(this,e);
commonCreateMoneyFilesAjaxUpload(d)}})}function commonCreateMoneyFilesAjaxUpload2(a){var b=commonInitializeStuffForXhr2Upload(a,true);
b.change(function(c){commonOnXhr2MoneyFileChange(this)})}function commonOnXhr2MoneyFileChange(f){var e=new PPRandom();var b=f.files;
for(var d=0;d<b.length;d++){var c=b[d];var a=new AjaxUpload2(f,c,{qid:e.nextId("newFileTemplateDiv_"),uploadHash:filesUploadHash,m:"m"});
commonOnMoneyFilesAjaxUploadSubmit(a,c)}}function commonOnMoneyFilesAjaxUploadSubmit(c,d){var b=jQuery(c.getButton()).closest(".addingToContentFileTypeChoosing").prev();
var a=showFileTemplate.clone();a.get(0).newFileId=c.getQid();uploadFileFillUploadinDivInnerStructure(a);c.setLoaderDiv(a.get(0));
c.setContentDiv(a.get(0));if(isXhr2()){c.startUpload()}else{c.commonOnSubmit(d)}jQuery(a).appendTo(b)}function commonOnMoneyFileSelectChange(c){var e=c.value;
if(isEmptyString(e)){return}var b=jabox.getDofile(e);var a=showFileTemplate.clone();uploadFileFillUploadinDivInnerStructure(a);
fillAlreadyUploadedFileDivWithFileData(a,b,"t");jQuery(c).find('option[value="'+e+'"]').each(function(){if(jQuery(this).parent().children(":visible").length==1){jQuery(this).parent().hide()
}jQuery(this).hide()});jQuery(c).val("");var d=jQuery(c).closest(".addingToContentFileTypeChoosing").prev();a.hide().appendTo(d).slideDown()
}function commonUpdateRelatedMoneyAmount(e,d,a,b){if((d==null&&a==null)||e.length==0){return}if(actionTaskId!=null){var c=jabox.getTask(actionTaskId);
if(b){if(a!=null){c.addToMoneySum(-a)}if(d!=null){c.addToMoneySum(d)}}else{c.addAdditionalMoney(d!=null?d:-a)}commonUpdateSummedDiv(e.find(".moneySpentDiv:first"),c.getMoneyLink(),c.getMoneySum()!=null?formatAmountInCentsToMoney(c.getTotalMoney(),true):null)
}else{if(actionTasklistId!=null){var f=jabox.getTasklist(actionTasklistId);if(b){if(a!=null){f.addToMoneySum(-a)}if(d!=null){f.addToMoneySum(d)
}}else{f.addAdditionalMoney(d!=null?d:-a)}commonUpdateSummedDiv(e.find(".moneySpentDiv:first"),f.getMoneyLink(),f.getMoneySum()!=null?formatAmountInCentsToMoney(f.getTotalMoney(),true):null)
}}}function commonGetMoneyInCentsFromMoneyInputText(b,c){var g=b.lastIndexOf(".");if(g<0){g=b.length+1}var e=b.lastIndexOf(",");
if(e<0){e=b.length+1}var a=Math.min(g,e);if(a>b.length){return parseInt(b)*100}else{var d=b.substring(0,a).replace(/[,.]/g,"");
var f=b.substring(a+1);if(f.length==0){f="00"}else{if(f.length==1){f+="0"}else{if(f.length>2){f=f.substring(0,2)}}}return parseInt(d+f)
}}function commonGetDecimalFromInputText(b,c){if(isEmptyString(b)){return c}var g=b.lastIndexOf(".");if(g<0){g=b.length+1
}var e=b.lastIndexOf(",");if(e<0){e=b.length+1}var a=Math.min(g,e);if(a>b.length){return parseInt(b)}else{var d=b.substring(0,a).replace(/[,.]/g,"");
if(d.length==0){d="0"}var f=b.substring(a+1);if(f.length==0){f="00"}else{if(f.length==1){f+="0"}else{if(f.length>2){f=f.substring(0,2)
}}}return parseFloat(d+"."+f)}}function commonInputFocusAndSelect(a){jQuery(a).focus().select()}function unescapeJsInString(a){if(a==null){return null
}return a.unescapeJs()}function unescapeJsToHtmlInString(a){if(a==null){return null}return a.unescapeJsToHtml()}function isXhr2(){if(XHR2==null){XHR2=("withCredentials" in new XMLHttpRequest()&&!(jQuery.browser.mozilla&&jQuery.browser.version.slice(0,3)=="1.9"))
}return XHR2}function longToFilesizeString(a){var b="";if(a<1024){b=" B"}else{if(a<1048576){b=" KB";a/=1024}else{if(a<1073741824){b=" MB";
a/=1048576}else{b=" GB";a/=1073741824}}}return Math.round(a)+b}function commonOpenTopMenuNavigation(e,d){var a=jQuery(d).closest("li");
var b=null;if(a.attr("id")=="tn_allLinks"){b="tn_allLinks_panel"}else{if(a.attr("id")=="tn_account"){b="tn_account_panel"
}else{if(a.attr("id")=="tn_projects"){b="tn_projects_panel"}}}if(b!=null){var c=a.find("#"+b);if(!c.is(":visible")){commonShowGivenDivAndCloseOthers(c);
c.show();a.addClass("opened")}else{c.hide();a.removeClass("opened")}}e.stopPropagation()}function commonOpenProfileRoleChooser(c,b){var a=jQuery(b).closest(".header_bottom_top_profile_name_inner").nextAll("#profileSelectOptions");
if(!a.is(":visible")){commonShowGivenDivAndCloseOthers(a);a.show()}else{a.hide()}c.stopPropagation()}function commonShowGivenDivAndCloseOthers(a){if(CLOSE_ON_CLICK!=null){var b=jQuery(CLOSE_ON_CLICK).attr("id");
if(b=="tn_allLinks_panel"||b=="tn_account_panel"||b=="tn_projects_panel"){jQuery(CLOSE_ON_CLICK).closest("li").removeClass("opened")
}jQuery(CLOSE_ON_CLICK).hide()}CLOSE_ON_CLICK=a}function commonSubmitClosestForm(a,c){var b=jQuery("<input />").attr("type","hidden").attr("name",isEmptyString(c)?"submitFrm":c).attr("value","submit");
jQuery(a).closest("form").append(b)[0].submit();return false}function commonOnUsernameInputFocus(a){commonCheckUsernameAvail(a)
}function commonOnUsernameInputBlur(a){if(checkedTid!=null){clearTimeout(checkedTid);checkedTid=null}}function commonCheckUsernameAvail(b){var d=jQuery(b).nextAll("#usernameStatusMessage");
var c=jQuery(b).nextAll("#checking");if(b.value==lastCheckedValue){checkedTid=setTimeout(function(){commonCheckUsernameAvail(b)
},500);return}else{if(isEmptyString(b.value)){lastCheckedValue=b.value;d.hide().removeClass("formerror").attr("innerHTML","");
checkedTid=setTimeout(function(){commonCheckUsernameAvail(b)},500);return}}lastCheckedValue=b.value;if(lastCheckSend!=null){lastCheckSend.abort()
}d.hide();c.show();var a={};a.nm=b.value;lastCheckSend=jQuery.ajax({url:"/ajax/my/checkusername",data:(a),type:"GET",dataType:"xml",statusDiv:d.get(0),checkingDiv:c.get(0),error:function(){c.hide();
jQuery(this.statusDiv).addClass("formerror").attr("innerHTML",doTexts.getText("signup.errorCheckingForUsername")).show();
lastCheckSend=null},success:function(f){var e=jQuery(f).find("status").text();jQuery(this.checkingDiv).hide();if(e=="1"){jQuery(this.statusDiv).removeClass("formerror").attr("innerHTML",doTexts.getText("signup.usernameCheckingOK")).show()
}else{jQuery(this.statusDiv).addClass("formerror").attr("innerHTML",jQuery(f).find("message").text()).show()}lastCheckSend=null
}});checkedTid=setTimeout(function(){commonCheckUsernameAvail(b)},500)};var doTexts=new function DoboxTexts(){var a={"common.cancel":"Cancel","common.change":"Change","common.commentLinkText":"Comment","common.commentNewCommentsLinkPartText":"NEW","common.confirm":"Confirm","common.delete":"Delete","common.edit":"Edit","common.errorChangingGlobalPeopleSortOrder":"Sorry, an error occured while changing sort order.","common.errorSwitchingProfiles":"Sorry, an error occured while switching profiles.","common.anyone":"Anyone","common.everyone":"Everyone","common.from":"from","common.hide":"Hide","common.or":"or","common.remove":"Remove","common.save":"Save","common.show":"Show","commonBoardAction.errorShowHideProject":"Sorry, an error has occured while trying to change project settings.","formfields.File.addExistingFileText":"Add uploaded file","formfields.File.addFileDescriptionText":"Add description","formfields.File.addNewFileText":"add a new file","formfields.File.attachNewFileText":"Attach file","formfields.File.browseButtonText":"Browse for new file","formfields.File.cancelUploadText":"Cancel","formfields.File.errorGettingFileData":"Sorry, but there has been an error while adding selected file.","formfields.File.errorUploadingFile":"Sorry, but there has been an error while uploading file.","formfields.File.existingFileSelectText":"Select file","formfields.File.removeFileAndDescriptionText":"Remove file and description","formfields.File.removeFileText":"Remove this file","formfields.File.sizeLimitText":"File size limit is 15MB.","lib.backlink.backToAllContributors":"Back to all contributors","lib.backlink.backToAllProjectModels":"Back to all project models","lib.backlink.backToCommentedProjectModels":"Back to #pp#name#'s commented project models","lib.backlink.backToContributorFollowers":"Back to #pp#name#'s followers","lib.backlink.backToContributorFollowing":"Back to people #pp#name# is following","lib.backlink.backToContributorInspired":"Back to people #pp#name# has inspired","lib.backlink.backToCreatedProjectModels":"Back to #pp#name#'s created project models","lib.backlink.backToLikedProjectModels":"Back to #pp#name#'s liked project models","lib.backlink.backToProjectModel":"Back to project model #pp#name#","lib.backlink.backToSavedProjectModels":"Back to #pp#name#'s saved project models","lib.contributor.commentedFilterString":"Models #pp#name# has commented sorted by #pp#sort#.","lib.contributor.contributorsFilterPopularityOptionText":"popularity","lib.contributor.contributorsFilterTimeCommentedOptionText":"time commented","lib.contributor.contributorsFilterTimeFollowedOptionText":"followed time","lib.contributor.contributorsFilterTimeInspiredOptionText":"inspired time","lib.contributor.contributorsFilterTimeLikedOptionText":"time liked","lib.contributor.contributorsFilterTimeOptionText":"time","lib.contributor.contributorsFilterTimeSavedOptionText":"time saved","lib.contributor.createdFilterString":"Models created by #pp#name# sorted by #pp#sort#.","lib.contributor.followersFilterString":"#pp#name#'s followers sorted by #pp#sort#.","lib.contributor.followingFilterString":"People #pp#name# is following sorted by #pp#sort#.","lib.contributor.inspiredFilterString":"People #pp#name# has ispired sorted by #pp#sort#.","lib.contributor.likedFilterString":"Models liked by #pp#name# sorted by #pp#sort#.","lib.contributor.savedFilterString":"Models saved by #pp#name# sorted by #pp#sort#.","lib.contributor.topNavTitleCommented":"Commented project models by #pp#name#","lib.contributor.topNavTitleCreatedModels":"#pp#name#'s project models","lib.contributor.topNavTitleFollowers":"#pp#name#'s followers","lib.contributor.topNavTitleFollowing":"People #pp#name# is following","lib.contributor.topNavTitleInspired":"People inspired by #pp#name#","lib.contributor.topNavTitleLikedModels":"Project models liked by #pp#name#","lib.contributor.topNavTitleProjectModel":"Project model","lib.contributor.topNavTitleSaved":"Saved project models by #pp#name#","lib.deleteProjectModelWarning":"Are you sure you wan't to delete project model '#pp#name#'.\n\nThis action cannot be undone, so think twice.","lib.errorDeletingProjectModel":"Sorry, an error has occured while tryign to delete project model '#pp#name#'.","lib.errorFollowingContributorMessage":"Sorry, an error has occured while trying to follow contributor.","lib.errorLikingModelMessage":"Sorry, an error has occured while trying to like selected model.","lib.errorLoadingContributors":"Sorry, an error occured while trying to load contributors.","lib.errorLoadingModels":"Sorry, an error occured while trying to load models.","lib.errorLoadingMoreContributors":"Sorry, an error occured while trying to load more contributors.","lib.errorLoadingMoreCreatedModels":"Sorry, an error occured while trying to load more created models.","lib.errorLoadingMoreFollowers":"Sorry, an error occured while trying to load more followers.","lib.errorLoadingMoreFollowing":"Sorry, an error occured while trying to load more following profiles.","lib.errorLoadingMoreLikedModels":"Sorry, an error occured while trying to load more liked models.","lib.errorLoadingMoreModels":"Sorry, an error occured while trying to load models.","lib.errorPostingModelComment":"Sorry, an error occured while trying to post your comment.","lib.errorReportingModelMessage":"Sorry, an error has occured while trying to report selected model.","lib.errorSavingModelMessage":"Sorry, an error has occured while trying to save selected model.","lib.errorUnlikingModelMessage":"Sorry, an error has occured while trying to unlike selected model.","lib.errorUnsavingModelMessage":"Sorry, an error has occured while trying to unsave selected model.","lib.followContributorButtonText":"Follow","lib.followingContributorButtonText":"Following","lib.likeModelLinkText":"Like","lib.modelHasBeenSuccessfulyReported":"Model was successfuly reported. Thank you for making do[box] better.","lib.saveModelLinkText":"Save","lib.unlikeModelLinkText":"Unlike","lib.unsaveModelLinkText":"Unsave","my.activities.errorLoadingActivities":"Sorry, an error occured while trying to load activities.","my.activities.errorLoadingCurrentActivities":"Sorry, an error occured while trying to load more current activities.","my.activities.errorLoadingLateActivities":"Sorry, an error occured while trying to load late activities.","my.activities.errorLoadingPastDailyActivities":"Sorry, an error occured while trying to load past daily activities.","my.activities.errorLoadingPastDaysActivities":"Sorry, an error occured while trying to load activities in prevoius days.","my.activities.errorLoadingUpcomingActivities":"Sorry, an error occured while trying to load more upcoming activities.","my.activities.errorSharingCurrentStatus":"Sorry, an error occured while trying to share your current activity.","my.addToGroup.addExistingPersonExplanation":"Only people from your #pp#name# profile are listed. You can only add people from this profile.","my.addToGroup.addExistingPersonNoMoreExplanation":'All people from your "#pp#name#" profile are already members of this group.',"my.addToGroup.addExistingPersonNoMorePeopleExplanation":'Only people from your "#pp#name#" profile are listed. You can only add people from this profile, but they are all already in this group.',"my.addToPeople.existingPeopleDetailsSubtitleText":"Add existing people from your network","my.addToPeople.existingPersonDetailsSubtitleText":"Add existing person from your network","my.addToPeople.newPeopleRowTitle":"Invite new people","my.addToPeople.newPersonRowTitle":"Invite new person","my.addToProfile.addAsExplanationPeople":"This people will be added to all your profiles. But, you have to choose with which profile would you like to send the invitation.","my.addToProfile.addAsExplanationPerson":"This person will be added to all your profiles. But, you have to choose with which profile would you like to send the invitation.","my.addToProfile.invitationMailDescriptionPeople":"<div>As soon as you click add this people button at the bottom of this form, each of them will receive a friendly invitation in your name with a link to create their own account. Beside that, this persons's ID card will be added to your contacts and you can immediately add this person to as many groups and projects you like, even before they will create their accounts.</div><br/><div>Below you can see how invitation email will look like. You can also include a personal message.</div>","my.addToProfile.invitationMailDescriptionPerson":"<div>As soon as you click add this person button at the bottom of this form, this person will receive a friendly invitation in your name with a link to create their own account. Beside that, this persons's ID card will be added to your contacts and you can immediately add this person to as many groups and projects you like, even before they will create their accounts.</div><br/><div>Below you can see how invitation email will look like. You can also include a personal message.</div>","my.addToProfile.invitationMailFooter":"If you have any questions regarding this invitation don't reply, contact me directly at #pp#mail#.","my.addToProfile.inviteNewPeopleToAllProfilesTitle":"Add new people to all your profiles","my.addToProfile.inviteNewPeopleToSingleProfileTitle":"Add a New Person to Ordo Group [New York City] Profile","my.addToProfile.inviteNewPersonToAllProfilesTitle":"Add a new person to all your profiles","my.addToProfile.inviteNewPersonToSingleProfileTitle":"Add a new person to your #pp#name# profile","my.addToProfile.peopleDetailsSubtitleText":"PEOPLE DETAILS","my.addToProfile.peopleDetailsTitle":"People details","my.addToProfile.personDetailsSubtitleText":"PERSON DETAILS","my.addToProfile.personDetailsTitle":"Person details","my.addToProfile.submitPeopleButtonText":"Add this people","my.addToProfile.submitPersonButtonText":"Add this person","my.addToProject.addAsExplanationPeople":"This people will be added to this project. But, you have to choose with which profile would you like to send the invitation.","my.addToProject.addAsExplanationPerson":"This person will be added to this project. But, you have to choose with which profile would you like to send the invitation.","my.addToProject.addExistingPersonExplanation":'Selected person will be added to the group and project invitation will be sent to them. All people from your"#pp#name#"profile are listed except those already in the group.',"my.addToProject.addExistingPersonNoMoreExplanation":'All people from your"#pp#name#"profile are already members of this project group.',"my.addToProject.addExistingProjectPersonChooseProjectGroupFirst":"You have to select project group first. After that you will be able to select people you wan't to add to project.","my.addToProject.invitationMailDescriptionPeople":"As soon as you click add this person button at the bottom of this form, this people will receive a friendly invitation in your name with a link to create their own account. Beside that, this peoples' ID card will be added to your contacts and you can immediately add this people to as many groups and projects you like, even before they will create their accounts.<br/><br/>Below you can see how invitation email will look like. You can also include a personal message.","my.addToProject.invitationMailDescriptionPerson":"As soon as you click add this person button at the bottom of this form, this person will receive a friendly invitation in your name with a link to create their own account. Beside that, this persons's ID card will be added to your contacts and you can immediately add this person to as many groups and projects you like, even before they will create their accounts.<br/><br/>Below you can see how invitation email will look like. You can also include a personal message.","my.addToProject.peopleDetailsNoGroupSubtitleText":"ADD ANOTHER PEOPLE TO THIS PROJECT","my.addToProject.peopleDetailsSubtitleText":'ADD ANOTHER PEOPLE TO GROUP"#pp#name#"',"my.addToProject.peopleDetailsTitle":"Invite new people to this project","my.addToProject.personDetailsNoGroupSubtitleText":"ADD ANOTHER PERSON TO THIS PROJECT","my.addToProject.personDetailsSubtitleText":'ADD ANOTHER PERSON TO GROUP"#pp#name#"',"my.addToProject.personDetailsTitle":"Invite new person to this project","my.addToProject.submitPeopleButtonText":"Add this people","my.addToProject.submitPersonButtonText":"Add this person","my.allMessages.colleagueRequestsAllProfilesTitle":"All Colleague Requests for All Your Profiles","my.allMessages.colleagueRequestsSingleProfileTitle":"All Colleague Requests for Your #pp#name# Profile","my.allMessages.errorLoadingMessages":"Sorry, an error occured while trying to load messages.","my.allMessages.errorProcessingColleagueRequest":"Sorry, an error occured while processing your request.","my.allMessages.noColleagueRequests":"You have no colleague requests.","my.allMessages.noRecievedMessages":"You have no recieved messages.","my.allMessages.noSentMessages":"You have no sent messages.","my.allMessages.projectInvitationsAllProfilesTitle":"All Project Invitations for All Your Profiles","my.allMessages.projectInvitationsSingleProfileTitle":"Your Project Invitations for #pp#name# profile","my.allMessages.projectModelSuggestionsAllProfilesTitle":"All Project Model Suggestions across all your profiles","my.allMessages.projectModelSuggestionsSingleProfileTitle":"All Project Model Suggestions for Your #pp#name# Profile","my.allMessages.recievedMessagesAllProfilesTitle":"All your received messages to all your profiles","my.allMessages.recievedMessagesSingleProfileTitle":"All received messages to your #pp#name# profile","my.allMessages.sentMessagesAllProfilesTitle":"All your send messages from all your profiles","my.allMessages.sentMessagesSingleProfileTitle":"All your send messages from profile #pp#name#","my.allProjects.errorLoadingProjectBoard":"Sorry, an error occured while loading projects.","my.allProjects.errorProcessingShowHideRequest":"Sorry, an error occured while processing your request.@DEPR@DEPR","my.allProjects.hideHiddenProjectsInProgressText":"Minimize list@DEPR","my.allProjects.hideProjectText":"Hide@DEPR","my.allProjects.showingAllOfProjectsText":"Showing all #pp#all# projects in progress.@DEPR","my.allProjects.showingSomeOfProjectsText":"Showing #pp#shown# of #pp#all# projects in progress.@DEPR","my.allProjects.showMoreProjectsInProgressText":"Show all@DEPR","my.allProjects.showProjectText":"Show@DEPR","my.conversation.errorDeletingMessage":"Sorry, there has been an error while deleting your message.","my.conversation.errorProcessingReply":"Sorry, there has been an error while processing your reply.","my.conversation.liveChatOff":"Live chat is off.","my.conversation.liveChatOn":"Live chat is on.","my.conversation.newMessagePluralText":"#pp#number# new messages.","my.conversation.newMessageSingleText":"1 new message.","my.discussions.deleteDiscussionWarning":"Are you sure you want to delete discussion '#pp#name#'?","my.discussions.errorDeletingDiscussion":"Sorry, an error has occured while trying to delete discussion '#pp#name#'.","my.discussions.errorLoadingDiscussionBoard":"Sorry, an error has occured while trying to load discussions.","my.discussions.errorLoadingRCDiscussions":"Sorry, an error has occured while trying to load discussions.","my.editDiscussion.removeFileWarning":'Are you sure you wan\'t to remove file "#pp#filename#" from this discussion?',"my.editFileGroup.deleteFileGroupWarningText":"Are you sure you want to delete file group '#pp#folderName#'?","my.editGroup.deleteGroupWarningText":"Are you sure you want to remove this group?","my.editProjectGroup.existingGroupLeftColumnText":"GROUP","my.editProjectGroup.newGroupLeftColumnText":"NAME","my.editProjectGroup.updateButtonAddProjectGroupCaption":"Create this project group","my.editProjectGroup.updateButtonCopyProjectGroupCaption":"Create copy of selected group","my.editProjectMilestone.addMilestoneButtonText":"Create this milestone","my.editProjectMilestone.addMilestonesButtonText":"Create this milestones","my.editProjectMilestone.createMilestonesSubtitle":"CREATE NEW MILESTONES FOR THIS PROJECT","my.editProjectMilestone.createMilestoneSubtitle":"CREATE NEW MILESTONE FOR THIS PROJECT","my.editProjectRoles.addAnotherProjectRoleLinkText":"Add another project role","my.editProjectRoles.addFirstProjectRoleLinkText":"Add first project role","my.groups.deleteGroupMessageConfirmation":"Are you sure, you want to delete group #pp#name#.\n\nNo people from this group will be deleted from your account.","my.groups.deletePersonFromGroupMessageConfirmation":"Are you sure, you want to remove #pp#name# from group #pp#gname#.\n\nYou will still keep #pp#name# in all other groups and in your global people.","my.groups.errorDeletingGroupMessage":"Sorry, there was an error while trying to delete group #pp#name#.","my.groups.errorDeletingPersonFromGroupMessage":"Sorry, there was an error while trying to delete #pp#name# from group #pp#gname#.","my.milestones.errorChangingCompletedBy":"Sorry, an error has occured while trying to change profile with which you have completed miletone #pp#name#.","my.milestones.errorCompletingMilestone":"Sorry, an error occured while you were trying to complete milestone.","my.milestones.errorUncompletingMilestone":"Sorry, an error occured while you were trying to uncomplete milestone.","my.milestones.milestoneDaysLateDate":"#pp#number# days late","my.milestones.milestoneOneDayLateDate":"1 day late","my.milestones.showLateMilestoneLinkText":"Show one late milestone","my.milestones.showLateMilestonesLinkText":"Show all #pp#number# late milestones","my.money.errorLoadingMoneyBoardMessage":"Sorry an error has occured while trying to load money data.","my.profile.errorCheckingForLibraryProfile":"Sorry, an error has occured.","my.profile.libraryProfileCheckingNO":"Sorry, this address is already taken.","my.profile.libraryProfileCheckingOK":"You are go for launch!","my.projectDiscussions.deleteDiscussionWarning":"Are you sure you want to delete discussion '#pp#discussionName#'?","my.projectFiles.areYouSureYouWantToDeleteAllFileVersions":"Are you sure you want to delete file '#pp#name#' and all it's versions? This action cannot be undone!","my.projectFiles.areYouSureYouWantToDeleteFile":"Are you sure you want to delete file '#pp#name#'? This action cannot be undone!","my.projectFiles.errorDeletingFile":"Sorry, there was an error while trying to delete file '#pp#name#'.","my.projectFiles.errorDeletingGeneralFileGroup":"Sorry, there was an error while deleting file group '#pp#name#'","my.projectFiles.errorLoadingBoardMessage":"Sorry, there was an error while trying to load files.","my.projectFiles.errorSavingFile":"Sorry, there was an error while trying to save file.","my.projectMilestones.completedMilestoneLateText":"completed #pp#numdays# days over the date, on #pp#date#.","my.projectMilestones.connectedTasklistDueText":"DUE TASK LIST","my.projectMilestones.connectedTasklistStartDueText":"START/DUE TASK LIST","my.projectMilestones.connectedTasklistStartText":"START TASK LIST","my.projectMilestones.errorChangingMilestone":"Sorry, an error occured while trying to change milestone.","my.projectMilestones.errorDeletingMilestone":"Sorry, an error occured while trying to delete milestone.","my.projectMilestones.errorLoadingMilestoneBoard":"Sorry, an error occured while trying to load milestones.","my.projectMilestones.milestoneDaysOverText":"#pp#numdays# days late","my.projectMilestones.milestoneDeleteWarning":'Are you sure you want to delete milestone "#pp#name#"?\nThis action cannot be undone, so think twice, before you roll the dice.',"my.projectMilestones.milestoneSuccessfulyDeleted":'Milestone "#pp#name#" has been successfully deleted.',"my.projectMilestones.saveCompletedByChangesButtonText":"Save","my.projectMoney.amountCellExpenseCaption":"EXPENSE","my.projectMoney.amountCellIncomeCaption":"INCOME","my.projectMoney.deleteLogWarning":"Are you sure you wan't to delete this money log?","my.projectMoney.editExpenseLogTitle":'Edit your <span>expense</span><span class="descriptionText" style="font-weight: normal;"> (or <span class="grayColorLink" onclick="commonOnChangeIncomeExpenseTitleSpanClick(this);">income</span>)</span>',"my.projectMoney.editIncomeLogTitle":'Edit your <span>income</span><span class="descriptionText" style="font-weight: normal;"> (or <span class="grayColorLink" onclick="commonOnChangeIncomeExpenseTitleSpanClick(this);">expense</span>).</span>',"my.projectMoney.editLogSaveChangesButtonText":"Save changes@DEPR","my.projectMoney.editLogTitle":"Edit money logged@DEPR","my.projectMoney.errorAddingMoneyLog":"Sorry, an error occured while trying to add your money log.","my.projectMoney.errorChangingMoneyLog":"Sorry, an error has occured while trying to save changes for money log.","my.projectMoney.errorDeletingMoneyLog":"Sorry, an error has occured while trying to delete money log.","my.projectMoney.newlyAddedOtherTitle":"Newly added logs for other people.","my.projectMoney.newlyAddedOutsideDateOtherTitle":"Newly added logs for other people or outside selected date span.","my.projectMoney.newlyAddedOutsideDateTitle":"Newly added logs outside selected date span.","my.projectMoney.newlyAddedTitle":"Newly added logs","my.projectMoney.removeLogWarning":"Are you sure you wan't to remove this log from project?@DEPR","my.projectPeople.errorChangingPeopleSortOrder":"Sorry, an error has occured while switching sorting mode.","my.projectPermissions.errorSavingMembershipData":"Sorry, an error has occured while saving data about #pp#name#.","my.projectPermissions.manageMembershipLinkText":"Manage","my.projectPermissions.selectRoleOptionText":"Select a role ...","my.projectTasklists.addAnotherTaskLinkText":"Add another task","my.projectTasklists.addFirstTaskLinkText":"Add first task","my.projecttasklists.addTaskTitleText":"Add another task @DEPR","my.projectTaskLists.deleteTasklistWarning":'Are you sure you want to delete tasklist "#pp#name#" and all it\'s tasks?\nThis action cannot be undone, so think wisely.',"my.projectTaskLists.dragTaskIconTitle":"Move task @DEPR","my.projectTasklists.editTaskDivTitle":"Edit task","my.projectTasklists.editTaskSaveButton":"Save changes","my.projecttasklists.editTaskTitleText":"Edit task @DEPR","my.projectTasklists.errorAddingTask":"Sorry, an error occured while trying to add new task.","my.projectTasklists.errorCompletingTask":"Sorry, an error occured while trying to complete task.","my.projectTasklists.errorDeletingTask":"Sorry, an error occured while trying to delete selected task.","my.projectTasklists.errorDeletingTasklist":'Sorry, an error occured while trying to delete tasklist "#pp#name#".',"my.projectTasklists.errorLoadingTasklistBoard":"Sorry, an error occured while trying to load tasklists.","my.projectTasklists.errorSortingTask":"Sorry, an error occured while trying to save task order.","my.projectTasklists.errorUncompletingTask":"Sorry, an error occured while trying to uncomplete task.","my.projectTaskLists.removeFileFromTaskWarning":'Are you sure you wan\'t to remove file "#pp#filename#" from this task? @DEPR',"my.projecttasklists.removeTaskWarningMessage":"Are you sure you want to delete this task? @DEPR","my.projecttasklists.saveExistingButtonText":"Save changes @DEPR","my.projecttasklists.saveNewButtonText":"Create this task and add another @DEPR","my.projecttasklists.taskAssignToText":"ASSIGN TO @DEPR","my.projecttasklists.taskDescriptionText":"DESCRIPTION @DEPR","my.projectTaskLists.taskFileSingleLinkText":"1 file @DEPR","my.projectTaskLists.taskFilesLinkText":"#pp#number# files @DEPR","my.projecttasklists.taskFilesText":"FILES @DEPR","my.projectTasklists.taskMultipleFilesLinkText":"#pp#number# files","my.projectTasklists.taskSingleFileLinkText":"1 file","my.projecttasklists.taskTitleText":"TITLE @DEPR","my.projectTaskLists.viewReportCaption":"View report @DEPR","my.projectTime.deleteLogWarning":"Are you sure you wan't to delete this time log?","my.projectTime.editLogSaveChangesButtonText":"Save changes@DEPR","my.projectTime.editLogTitle":"Edit time logged@DEPR","my.projectTime.errorAddingTimeLog":"Sorry, an error has occured while trying to add your time log.","my.projectTime.errorChangingTimeLog":"Sorry, an error has occured while trying to save changes for time log.","my.projectTime.errorDeletingTimeLog":"Sorry, an error has occured while trying to delete time log.","my.projectTime.newlyAddedOtherTitle":"Newly added logs for other people.","my.projectTime.newlyAddedOutsideDateOtherTitle":"Newly added logs for other people or outside selected date span.","my.projectTime.newlyAddedOutsideDateTitle":"Newly added logs outside selected date span.","my.projectTime.newlyAddedTitle":"Newly added logs","my.projectTime.removeLogWarning":"Are you sure you wan't to remove this log from project?@DEPR","my.projectTime.taskCaption":"TASK@DEPR","my.reorderTasklists.hideHiddenListsLinkText":"Hide not filtered tasklists","my.reorderTasklists.showHiddenListsLinkText":"Show all tasklists","my.resend.errorResendingColleagueRequest":"Sorry, an error has occured while trying to resend colleague request.","my.resend.errorResendingProjectInvitation":"Sorry, an error has occured while trying to resend project invitation.","my.tasklists.errorChangingCompletedBy":"Sorry, an error has occured while trying to change profile with which you have completed task #pp#name#.","my.time.errorChangingBillableMessage":"Sorry an error has occured while trying to change billable status.","my.time.errorLoadingTimeBoardMessage":"Sorry an error has occured while trying to load time data.","my.uploadFile.fileTooBigError":"Your file is too big. Maximum allowed size is 15MB.","my.uploadFile.fileUploadUnknownError":"Sorry, an unexpected error occured while trying to upload selected file.","my.uploadFile.notAllowedFiletypeError":"We do not accept this file type.","my.uploadFile.submitButtonMultipleText":"Upload this files","my.uploadFile.submitButtonSingleText":"Upload this file","my.viewDiscussion.addFileToComment":"Attach file to this comment @DEPR @DEPR","my.viewDiscussion.addNewCommentTitleText":"Have your say... @DEPR","my.viewDiscussion.changeCommentButtonText":"Change this comment @DEPR","my.viewDiscussion.deleteCommentAjaxError":"Sorry, but there was an error deleting your file. @DEPR","my.viewDiscussion.deletePostWarning":"This post with all files and it's comments will be deleted. Are you sure you wan't to proceed? @DEPR","my.viewDiscussion.editCommentTitleText":"Editing comment @DEPR","my.viewDiscussion.errorChangingProfile":"Sorry, an error has occured while trying to change your selected membership.","my.viewDiscussion.errorDeletingComment":"Sorry, an error has occured while trying to delete this comment.","my.viewDiscussion.errorPublishingComment":"Sorry, an error has occured while publishing your comment.","my.viewDiscussion.errorUploadingNewVersion":"Sorry, an error has occured while trying to publish new version.","my.viewDiscussion.liveChatOffText":"Live chat is off. Leaving cursor inside the input field will enable live chat.","my.viewDiscussion.liveChatOnText":"Live chat is on. Press Ctrl+Enter to publish your message.","my.viewDiscussion.manyCommentsFomOtherDiscussionsText":"COMMENTS FROM OTHER DISCUSSIONS","my.viewDiscussion.manyNewFileVersionsLoadLinkText":"#pp#number# new versions","my.viewDiscussion.manyNewPostsLoadLinkText":"#pp#number# new posts","my.viewDiscussion.newPostsMsg_C_M":"#pp#cpcount# posts from other discussions has been changed @DEPR","my.viewDiscussion.newPostsMsg_C_S":"1 post from other discussion has been changed @DEPR","my.viewDiscussion.newPostsMsg_CD":"#pp#cpcount# changed and #pp#dpcount# deleted posts from other discussions @DEPR","my.viewDiscussion.newPostsMsg_D_M":"#pp#dpcount# posts from other discussion has been deleted @DEPR","my.viewDiscussion.newPostsMsg_D_S":"1 post from other discussion has been deleted @DEPR","my.viewDiscussion.newPostsMsg_N_M":"#pp#npcount# new posts from other discussions @DEPR","my.viewDiscussion.newPostsMsg_N_S":"1 new post from other discussion @DEPR","my.viewDiscussion.newPostsMsg_NC":"#pp#npcount# new and #pp#cpcount# changed posts from other discussions @DEPR","my.viewDiscussion.newPostsMsg_NCD":"#pp#npcount# changed, #pp#cpcount# changed and #pp#dpcount# deleted posts from other discussions @DEPR","my.viewDiscussion.newPostsMsg_ND":"#pp#npcount# new and #pp#dpcount# deleted posts from other discussions @DEPR","my.viewDiscussion.numberOfFileCommentsText":"#pp#number# comments","my.viewDiscussion.oneCommentFomOtherDiscussionText":"COMMENT FROM OTHER DISCUSSION","my.viewDiscussion.oneFileCommentText":"1 comment","my.viewDiscussion.oneNewFileVersionLoadLinkText":"1 new version","my.viewDiscussion.oneNewPostLoadLinkText":"1 new post","my.viewDiscussion.postAnotherCommentText":"Post new comment @DEPR","my.viewDiscussion.postCommentAjaxError":"Sorry, but an error occured when posting your comment. @DEPR","my.viewDiscussion.publishCommentButtonText":"Publish this comment @DEPR","my.viewDiscussion.removeFileFromPostWarning":'Are you sure you wan\'t to remove file "#pp#filename#" from this post? @DEPR',"my.viewDiscussion.showPreviousCommentsLinkText":"Show previous comments","signup.errorCheckingForUsername":"Unknown error.","signup.usernameCheckingOK":"Available","userGlobalProjectsData.hideSingleProjectForProfile":"Hide","userGlobalProjectsData.minimizeList":"Minimize list","userGlobalProjectsData.showAllProjects":"Show all","userGlobalProjectsData.showSingleProjectForProfile":"Show"};
this.getText=function(c,b){var d=a[c];return d+(b==false?+"":getTd(d,c))};this.getLocale=function(){return"en"}};function Docal(a){this.today=a.today!=null?Date.parseDate(a.today,"%I"):(new Date());this.selectedDate=a.selectedDate!=null?Date.parseDate(a.selectedDate,"%I"):this.today;
this.startSelectedDate=this.selectedDate;this.shownMonth=this.selectedDate.getFirstInMonth();this.containerId=a.containerId;
this.containerElement=null;this.inputName=a.inputName;this.inputElement=null;this.calendarDiv=null;this.displayDateDiv=null;
this.displayMonthDiv=null;this.calendarTable=null;this.onSelectedDateChange=a.onDateChanged;this.createCalendar=function(){this.setContainerElement();
if(this.containerElement==null){return}this.createCalendarHtml()};this.setContainerElement=function(){if(isEmptyString(this.containerId)||isEmptyString(this.inputName)){return
}var b=jQuery("#"+this.containerId);if(jQuery(b).length==0){return}this.containerElement=b;jQuery(this.containerElement).get(0).calendar=this
};this.createCalendarHtml=function(){var b=this;this.calendarDiv=createDiv(null,"docalCalendarDiv",null);this.displayDateDiv=createDiv(null,"docalDayDisplayDiv",this.selectedDate.print("%A, %B %d, %Y"),null);
var c=createDiv(null,"docalDayArrowsDiv",'<div class="docalArrowImgLeft"></div><div class="docalMonthDisplayDiv">'+this.shownMonth.print("<b>%B %Y</b>")+'</div><div class="docalArrowImgRight"></div><div class="cb"/></div>');
this.displayMonthDiv=jQuery(c).children(".docalMonthDisplayDiv:first").get(0);jQuery(c).children(".docalArrowImgLeft").click(function(){b.changeMonth(-1)
});jQuery(c).children(".docalArrowImgRight").click(function(){b.changeMonth(1)});this.createCalendarTable();this.inputElement=createInput(null,this.inputName,null,this.selectedDate.print("%d.%m.%Y"),"text");
jQuery(this.inputElement).css("display","none");jQuery(this.calendarDiv).append(this.displayDateDiv).append(c).append(this.calendarTable).append(this.inputElement);
jQuery(c).children(".docalArrowImgLeft").mousewheel(function(d,e){return b.onMouseWheelChange(d,e)});jQuery(c).children(".docalArrowImgRight").mousewheel(function(d,e){return b.onMouseWheelChange(d,e)
});jQuery(this.containerElement).append(this.calendarDiv)};this.createCalendarTable=function(){var d=this;this.calendarTable=jQuery('<table class="docalCalendarTable"></table>');
var c=this.shownMonth.getFirstInWeek();for(var f=0;f<7;f++){var h=jQuery("<tr></tr>");jQuery(this.calendarTable).append(h);
for(var e=0;e<7;e++){if(f==0){jQuery(h).append('<th width="14%">'+docalLang._SDN[Math.abs(e+docalLang._FD)%7]+"</th>")}else{var b=jQuery("<td></td>");
var g=jQuery('<div class="'+this.getDateClass(c)+'">'+c.getDate()+"</div>").get(0);g.rdate=c.print("%I");jQuery(g).click(function(){d.selectDate(jQuery(this).get(0).rdate,true)
});jQuery(b).append(g).appendTo(h);c=c.addDays(1)}}}};this.getDateClass=function(c){if(this.shownMonth.getMonth()==c.getMonth()){var b=c.toDateString();
if(b==this.selectedDate.toDateString()){return"selected"}else{if(b==this.today.toDateString()){return"today"}}}else{return"difmon"
}};this.onMouseWheelChange=function(b,d){var c=d>0;this.changeMonth(c?1:-1);return false};this.changeMonth=function(d){var c=this;
this.shownMonth.setMonth(this.shownMonth.getMonth()+d);var b=this.shownMonth.getFirstInWeek();jQuery(this.calendarTable).find("td").each(function(){var e=jQuery(this).children(":first").get(0);
jQuery(e).removeClass().addClass(c.getDateClass(b)).attr("innerHTML",b.getDate());e.rdate=b.print("%I");b=b.addDays(1)});
jQuery(this.displayMonthDiv).attr("innerHTML",this.shownMonth.print("<b>%B %Y</b>"))};this.selectDate=function(c,g){if(this.selectedDate.print("%I")==c){return
}var b=this;var e=Date.parseDate(c,"%I");if(!g&&!e.inSameMonth(this.selectedDate)){this.changeMonth(parseInt(this.date.print("%y%m"))-parseInt(this.selectedDate.print("%y%m")))
}var h=this.selectedDate;this.selectedDate=e;var d=jQuery(this.calendarTable).find("div[rdate="+h.print("%I")+"]");if(jQuery(d).length>0){jQuery(d).removeClass().addClass(b.getDateClass(h))
}var f=jQuery(this.calendarTable).find("div[rdate="+this.selectedDate.print("%I")+"]");jQuery(f).removeClass().addClass("selected");
jQuery(this.displayDateDiv).attr("innerHTML",this.selectedDate.print("%A, <b>%B %d</b>, %Y"));jQuery(this.inputElement).val(this.selectedDate.print("%d.%m.%Y"));
if(b.onSelectedDateChange!=null){b.onSelectedDateChange.call(this)}};this.getSelectedDate=function(){return this.selectedDate
};this.getSelectedDateSortStr=function(){return this.selectedDate.print("%I")};this.getStartSelectedDate=function(){return this.startSelectedDate
};this.getContainerElement=function(){return this.containerElement}};var docalLang=new function DocalLang(){this._DN=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];
this._SDN=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];this._FD=1;this._MN=["January","February","March","April","May","June","July","August","September","October","November","December"];
this._SMN=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]};function StringBuffer(){this.buffer=[]}StringBuffer.prototype.append=function append(a){this.buffer[this.buffer.length]=a;
return this};StringBuffer.prototype.toString=function toString(){return this.buffer.join("")};String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")
};String.prototype.getRepresentedId=function(){var a=this.lastIndexOf("_");if(a>=0){return this.substr(a+1)}return null};
String.prototype.getRepresentedBasename=function(){var a=this.lastIndexOf("_");if(a>=0){return this.substr(0,a)}return""};
String.prototype.getRepresentedIdFront=function(){var a=this.indexOf("_");if(a>=0){return this.substr(0,a)}return""};String.prototype.getRepresentedIdFrontStable=function(){var a=this.indexOf("_");
if(a>=0){return this.substr(0,a)}return this};String.prototype.startsWith=function(a){return(this.match("^"+a)==a)};String.prototype.endsWith=function(a){return(this.match(a+"$")==a)
};String.prototype.capitalize=function(){return this.charAt(0).toUpperCase()+this.slice(1)};String.prototype.uncapitalize=function(){return this.charAt(0).toLowerCase()+this.slice(1)
};String.prototype.getExtenssion=function(){var a=this.lastIndexOf(".");if(a>=0){return this.substr(a+1)}return"FILE"};String.prototype.deescapeXml=function(){return this.replace(/&lt;/g,"<").replace(/&gt;/g,">")
};String.prototype.unescapeJs=function(){var a=/(\\n)|(\')/g;var b={"\\n":"\n","'":"'"};return this.replace(a,function(c){return b[c]
})};String.prototype.unescapeJsToHtml=function(){var a=/(\n)|(\')/g;var b={"\n":"<br/>","'":"'"};return this.replace(a,function(c){return b[c]
})};String.prototype.equalsForValue=function(b,a){return(this===b||(a?(this.getRepresentedIdFront()===b):(this.getRepresentedBasename()===b)))
};function ValuePair(b,a){this.value1=b;this.value2=a}Date.prototype.calculateDaySpan=function(c){var d=this.getTime();var b=c.getTime();
var a=d-b;return Math.round(a/(1000*60*60*24))};Date._MD=new Array(31,28,31,30,31,30,31,31,30,31,30,31);Date.SECOND=1000;
Date.MINUTE=60*Date.SECOND;Date.HOUR=60*Date.MINUTE;Date.DAY=24*Date.HOUR;Date.WEEK=7*Date.DAY;Date.parseDate=function(l,c){var n=new Date();
var o=0;var e=-1;var k=0;var q=l.split(/\W+/);var p=c.match(/%./g);var h=0,g=0;var r=0;var f=0;for(h=0;h<q.length;++h){if(!q[h]){continue
}switch(p[h]){case"%d":case"%e":k=parseInt(q[h],10);break;case"%m":e=parseInt(q[h],10)-1;break;case"%Y":break;case"%y":o=parseInt(q[h],10);
(o<100)&&(o+=(o>29)?1900:2000);break;case"%b":case"%B":for(g=0;g<12;++g){if(Calendar._MN[g].substr(0,q[h].length).toLowerCase()==q[h].toLowerCase()){e=g;
break}}break;case"%H":case"%I":o=parseInt(q[h].substring(0,4),10);e=parseInt(q[h].substring(4,6),10)-1;k=parseInt(q[h].substring(6,8),10);
break;case"%k":case"%l":r=parseInt(q[h],10);break;case"%P":case"%p":if(/pm/i.test(q[h])&&r<12){r+=12}else{if(/am/i.test(q[h])&&r>=12){r-=12
}}break;case"%M":f=parseInt(q[h],10);break}}if(isNaN(o)){o=n.getFullYear()}if(isNaN(e)){e=n.getMonth()}if(isNaN(k)){k=n.getDate()
}if(isNaN(r)){r=n.getHours()}if(isNaN(f)){f=n.getMinutes()}if(o!=0&&e!=-1&&k!=0){return new Date(o,e,k,r,f,0)}o=0;e=-1;k=0;
for(h=0;h<q.length;++h){if(q[h].search(/[a-zA-Z]+/)!=-1){var s=-1;for(g=0;g<12;++g){if(Calendar._MN[g].substr(0,q[h].length).toLowerCase()==q[h].toLowerCase()){s=g;
break}}if(s!=-1){if(e!=-1){k=e+1}e=s}}else{if(parseInt(q[h],10)<=12&&e==-1){e=q[h]-1}else{if(parseInt(q[h],10)>31&&o==0){o=parseInt(q[h],10);
(o<100)&&(o+=(o>29)?1900:2000)}else{if(k==0){k=q[h]}}}}}if(o==0){o=n.getFullYear()}if(e!=-1&&k!=0){return new Date(o,e,k,r,f,0)
}return n};Date.prototype.getFirstInMonth=function(){var a=new Date(this);a.setDate(1);a.setFullYear(this.getFullYear());
a.setMonth(this.getMonth());a.setHours(0);a.setMinutes(0);a.setSeconds(0);a.setMilliseconds(0);return a};Date.prototype.getFirstInWeek=function(a){var b=this.getDay();
var c=(a==true)?b:((b-docalLang._FD+7)%7);return this.addDays(-c)};Date.prototype.addDays=function(b){var a=new Date(this);
a.setDate(a.getDate()+b);return a};Date.prototype.getMonthDays=function(b){var a=this.getFullYear();if(typeof b=="undefined"){b=this.getMonth()
}if(((0==(a%4))&&((0!=(a%100))||(0==(a%400))))&&b==1){return 29}else{return Date._MD[b]}};Date.prototype.getDayOfYear=function(){var a=new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0);
var c=new Date(this.getFullYear(),0,0,0,0,0);var b=a-c;return Math.floor(b/Date.DAY)};Date.prototype.getWeekNumber=function(){var c=new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0);
var b=c.getDay();c.setDate(c.getDate()-(b+6)%7+3);var a=c.valueOf();c.setMonth(0);c.setDate(4);return Math.round((a-c.valueOf())/(7*86400000))+1
};Date.prototype.equalsTo=function(a){return((this.getFullYear()==a.getFullYear())&&(this.getMonth()==a.getMonth())&&(this.getDate()==a.getDate())&&(this.getHours()==a.getHours())&&(this.getMinutes()==a.getMinutes()))
};Date.prototype.inSameMonth=function(a){return((this.getFullYear()==a.getFullYear())&&(this.getMonth()==a.getMonth()))};
Date.prototype.setDateOnly=function(a){var b=new Date(a);this.setDate(1);this.setFullYear(b.getFullYear());this.setMonth(b.getMonth());
this.setDate(b.getDate())};Date.prototype.getWeekNumber=function(){var c=new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0);
var b=c.getDay();c.setDate(c.getDate()-(b+6)%7+3);var a=c.valueOf();c.setMonth(0);c.setDate(4);return Math.round((a-c.valueOf())/(7*86400000))+1
};Date.prototype.print=function(l){var b=this.getMonth();var k=this.getDate();var n=this.getFullYear();var p=this.getWeekNumber();
var q=this.getDay();var v={};var r=this.getHours();var c=(r>=12);var h=(c)?(r-12):r;var u=this.getDayOfYear();if(h==0){h=12
}var e=this.getMinutes();var j=this.getSeconds();v["%a"]=docalLang._SDN[q];v["%A"]=docalLang._DN[q];v["%b"]=docalLang._SMN[b];
v["%B"]=docalLang._MN[b];v["%C"]=1+Math.floor(n/100);v["%d"]=(k<10)?("0"+k):k;v["%D"]=((b<9)?("0"+(1+b)):(1+b))+"/"+((k<10)?("0"+k):k)+"/"+n;
v["%e"]=k;v["%H"]=(r<10)?("0"+r):r;v["%h"]=(h<10)?("0"+h):h;v["%I"]=n+""+((b<9)?("0"+(1+b)):(1+b))+""+((k<10)?("0"+k):k);
v["%j"]=(u<100)?((u<10)?("00"+u):("0"+u)):u;v["%k"]=r;v["%l"]=h;v["%m"]=(b<9)?("0"+(1+b)):(1+b);v["%M"]=(e<10)?("0"+e):e;
v["%n"]="\n";v["%p"]=c?"PM":"AM";v["%P"]=c?"pm":"am";v["%R"]=((r<10)?("0"+r):r)+":"+((e<10)?("0"+e):e);v["%s"]=Math.floor(this.getTime()/1000);
v["%S"]=(j<10)?("0"+j):j;v["%t"]="\t";v["%T"]=((r<10)?("0"+r):r)+":"+((e<10)?("0"+e):e)+":"+(j<10)?("0"+j):j;v["%U"]=v["%W"]=v["%V"]=(p<10)?("0"+p):p;
v["%u"]=q+1;v["%w"]=q;v["%y"]=(""+n).substr(2,2);v["%Y"]=n;v["%%"]="%";var t=/%./g;var o=l.match(t);for(var g=0;g<o.length;
g++){var f=v[o[g]];if(f){t=new RegExp(o[g],"g");l=l.replace(t,f)}}return l};function PPRandom(){}PPRandom.prototype.getInteger=function(b,a){return(Math.round((a-b)*Math.random()+b))
};PPRandom.prototype.nextId=function(c){var a=Math.round(100000*Math.random());for(var b=0;b<10000;b++){if(jQuery("#"+c+a).length>0){a=Math.round(100000*Math.random())
}else{break}if(b>=9999){alert("Cannot generate new id. Possible explanation: universe has suddenly decided to obey logic.");
return -1}}return a};Object.size=function(c){var b=0,a;for(a in c){if(c.hasOwnProperty(a)){b++}}return b};jQuery.fn.isChildOf=function(a){var c=this.parents();
for(var d=0;d<c.length;d++){if(c[d]==a){return true}}return false};jQuery.fn.extend({getRepresentedId:function(){return this.attr("id").getRepresentedId()
},getFirstChild:function(){return this.children(":nth-child(1)")},isLoading:function(){var a=null;if(jQuery(this).hasClass("canLoad")){a=jQuery(this)
}else{a=jQuery(this).find(".canLoad:first")}if(a.length==0){return false}return a.get(0).loaderCreated!=null},getLoader:function(){var a=null;
if(jQuery(this).hasClass("canLoad")){a=jQuery(this)}else{a=jQuery(this).find(".canLoad:first")}if(a.length==0){return[]}if(a.get(0).loaderCreated!=null){return a
}return[]},addSmallLoader:function(){var a=null;if(jQuery(this).hasClass("canLoad")){a=jQuery(this)}else{a=jQuery(this).find(".canLoad:first")
}if(a.length==0){return null}if(a.get(0).loaderCreated==null){a.addClass("loading");a.get(0).loaderCreated=(new Date()).getTime()
}else{if(a.get(0).areq!=null){a.get(0).areq.loaderAborted=true;a.get(0).areq.abort()}}return a},removeLoaders:function(){var a=null;
if(jQuery(this).hasClass("canLoad")){a=jQuery(this)}else{a=jQuery(this).find(".canLoad:first")}if(a.length==0){return false
}a.each(function(){if(this.loaderCreated!=null){jQuery(this).removeClass("loading");this.loaderCreated=null;this.areq=null
}})},setLoaderRequest:function(b){var a=jQuery(this).getLoader();if(a.length>0){a=a.get(0);if(a.areq!=null){a.areq.loaderAborted=true;
a.areq.abort()}a.areq=b}},abortLoaderRequest:function(){var a=jQuery(this).getLoader();if(a.length>0&&a.get(0).areq!=null){a.get(0).areq.loaderAborted=true;
a.get(0).areq.abort()}},isLoaderAborted:function(){var a=jQuery(this).getLoader();if(a.length>0&&a.get(0).areq!=null){return(typeof a.get(0).areq.loaderAborted!=="undefined"&&a.get(0).areq.loaderAborted==true)
}return false},fadeOutAndRemove:function(){jQuery(this).fadeOut(function(){jQuery(this).remove()})},slideUpAndRemove:function(){jQuery(this).slideUp(function(){jQuery(this).remove()
})},getCssClassWhichStartsWith:function(c){var b=jQuery(this).attr("class").split(" ");for(var a=0;a<b.length;a++){if(b[a].startsWith(c)){return b[a]
}}return null}});jQuery.fn.makeNumberInput=function(a){var b=jQuery.extend({timeInput:false,moneyInput:false,allowDecimal:false,onEnterPressed:function(){}},a);
this.keypress(function(d){var c=d.charCode||d.keyCode||0;if((c==99||c==118||c==67||c==86)&&d.ctrlKey){}else{if(c>=48&&c<=57){}else{if(c!=8&&c!=46&&c!=37&&c!=39&&c!=9){if(c==CHARCODES_ENTER){b.onEnterPressed.call(this,this);
d.preventDefault()}else{if(b.moneyInput==true){if(c!=CHARCODES_COMMA&&c!=CHARCODES_PERIOD&&c!=CHARCODES_PLUS&&c!=CHARCODES_MINUS){d.preventDefault()
}}else{if(b.timeInput==true){if(c!=CHARCODES_COMMA&&c!=CHARCODES_PERIOD&&c!=CHARCODES_COLON){d.preventDefault()}}else{if(b.allowDecimal==true){if(c!=CHARCODES_COMMA&&c!=CHARCODES_PERIOD){d.preventDefault()
}}}}}}else{}}}});return this};jQuery.fn.makeHidable=function(d){var b=[];var c=false;var a=this;this.filter("select").each(function(){jQuery(this).children().each(function(){b[b.length]=jQuery(this).clone().get(0);
if(jQuery(this).is("optgroup")){c=true}});this.hideOptions=function(e){var f=commonArrayToTable(e);a.empty();a.append(jQuery(b).clone());
a.find("option").each(function(){var g=f!=null&&(f[this.value]!=null||f[this.value.getRepresentedIdFront()]!=null);if(!isEmptyString(this.value)&&g){jQuery(this).remove()
}});this.hideEmptyOptGroups();a.val("");return a};this.hideEmptyOptGroups=function(){if(c){a.find("optgroup").each(function(){if(jQuery(this).children().length==0){jQuery(this).remove()
}})}};this.hideOption=function(f){var e=null;a.find('option[value="'+f+'"],option[value^="'+f+'_"]').each(function(){if(c){e=jQuery(this).parent()
}jQuery(this).remove()});if(e!=null&&e.children().length==0){jQuery(e).remove()}a.val("");return a};this.showOptions=function(f,g){var h={};
if(f!=null){if(g){a.find("option").each(function(){if(!isEmptyString(this.value)){h[this.value.getRepresentedIdFrontStable()]=true
}})}f=commonArrayToTable(f);for(var e in f){h[e.getRepresentedIdFrontStable()]=true}}a.empty();a.append(jQuery(b).clone());
if(f!=null){a.find("option").each(function(){if(!jQuery(this).val().startsWith("g")){var i=h[this.value]==null&&h[this.value.getRepresentedIdFront()]==null;
if(!isEmptyString(this.value)&&i){jQuery(this).remove()}this.selected=false}})}this.hideEmptyOptGroups()};this.showOption=function(e){this.showOptions([e],true)
};this.getOriginalOptions=function(){return b};this.replaceOriginalOptions=function(e,f){if(!f&&b.length>0){e.splice(0,0,b[0])
}b=e;a.empty();a.append(jQuery(b).clone())};a.hideOptions=function(e){a.get(0).hideOptions(e);return a};a.hideOption=function(e){a.get(0).hideOption(e);
return a};a.showOptions=function(e,f){a.get(0).showOptions(e,f);return a};a.showOption=function(e){a.get(0).showOption(e);
return a};a.getOriginalOptions=function(){a.get(0).getOriginalOptions();return a};a.replaceOriginalOptions=function(e){a.get(0).replaceOriginalOptions(e);
return a}});return this};function myAllProjectsFillCommonBoardActionDataArray(){var a={};a.selm=lastProfileSelected==null?null:lastProfileSelected.getRepresentedBasename();
a.sa=lastShowAllStatus;a.mm=lastMainMode;a.sm=lastSortMode;a.h=boardActionHash;a.m="lb";return a}function myAllProjectsProfileChange(c){var b=jQuery(c).attr("id");
onProfileSpanClickCommon(c);var a=myAllProjectsFillCommonBoardActionDataArray();a.selm=b.getRepresentedBasename();jQuery.ajax({url:"/ajax/my/projectboardaction",type:"GET",data:(a),dataType:"xml",error:function(){createApplicationMessage("error",doTexts.getText("common.errorSwitchingProfiles"));
inverseOnProfileSpanClickCommon(lastProfileSelected)},success:function(d){if(jQuery(d).find("status").text()=="1"){var e=jQuery("#projectsDiv");
myAllProjectsManageBoardResponse(d);jQuery("#topNavigationTitle").attr("innerHTML",jQuery(d).find("ttl").text());myAllProjectsManageNumbersFromXmlResponse(d);
lastProfileSelected=b}else{createApplicationMessage("error",jQuery(d).find("message").text());inverseOnProfileSpanClickCommon(lastProfileSelected)
}}})}function myAllProjectsManageNumbersFromXmlResponse(b){var a=jQuery(b).find("numbers");distinctInProgress=parseInt(jQuery(a).attr("dp"));
distinctVisible=parseInt(jQuery(a).attr("dv"));distinctArchive=parseInt(jQuery(a).attr("da"));distinctUserOwns=parseInt(jQuery(a).attr("do"));
allProjectsNumber=parseInt(jQuery(a).attr("apn"));shownProjectsNumber=parseInt(jQuery(a).attr("spn"));jQuery("#projectsDiv").next().find(".commonNextToSmallLoaderDiv").attr("innerHTML",jQuery(b).find("bin").text());
var c=jQuery("#summaryDiv");jQuery(c).find("#distinctInProgressNum").attr("innerHTML",distinctInProgress);jQuery(c).find("#distinctVisibleNum").attr("innerHTML",distinctVisible);
jQuery(c).find("#distinctArchiveNum").attr("innerHTML",distinctArchive);jQuery(c).children(":last").attr("innerHTML",jQuery(b).find("bsin").text())
}function myAllProjectsHideSpanClick(c){var b=jQuery(c).closest("[id^=projectEntry_]");b.addSmallLoader();var a={};a.pid=c.project;
a.h=boardActionHash;a.vis=!c.showOnGlobal;a.m="shp";b.setLoaderRequest(jQuery.ajax({url:"/ajax/my/projectboardaction/",type:"GET",dataType:"xml",data:(a),error:function(){if(b.isLoaderAborted()){return
}createApplicationMessage("error",doTexts.getText("my.allProjects.errorProcessingShowHideRequest"));b.removeLoaders()},success:function(d){if(b.isLoaderAborted()){return
}if(jQuery(d).find("status").text()!="1"){createApplicationMessage("error",jQuery(d).find("message").text())}else{if(c.showOnGlobal==true&&lastShowAllStatus=="0"){b.fadeOut(function(){jQuery(this).remove()
})}else{jQuery(c).attr("innerHTML",doTexts.getText(c.showOnGlobal==true?"common.show":"common.hide"));c.showOnGlobal=!c.showOnGlobal
}myAllProjectsManageNumbersFromXmlResponse(d)}b.removeLoaders()}}))}function myAllProjectsShowAllSpanClick(c){var b=jQuery(c).closest(".canLoad");
b.addSmallLoader();var a=myAllProjectsFillCommonBoardActionDataArray();a.sa=lastShowAllStatus=="1"?"0":"1";b.setLoaderRequest(jQuery.ajax({url:"/ajax/my/projectboardaction",type:"GET",data:(a),dataType:"xml",error:function(){if(b.isLoaderAborted()){return
}createApplicationMessage("error",doTexts.getText("my.allProjects.errorLoadingProjectBoard"));b.removeLoaders()},success:function(d){if(b.isLoaderAborted()){return
}if(jQuery(d).find("status").text()=="1"){myAllProjectsManageBoardResponse(d);jQuery(c).parent().attr("innerHTML",jQuery(d).find("bin").text());
lastShowAllStatus=a.sa}else{createApplicationMessage("error",jQuery(d).find("message").text())}b.removeLoaders()}}))}function myAllProjectsSortProjectsSelectChange(c){if(lastSortMode==c.value){return
}var b=jQuery(c).closest(".canLoad");b.addSmallLoader();var a=myAllProjectsFillCommonBoardActionDataArray();a.sm=c.value;
b.setLoaderRequest(jQuery.ajax({url:"/ajax/my/projectboardaction",type:"GET",data:(a),dataType:"xml",error:function(){if(b.isLoaderAborted()){return
}createApplicationMessage("error",doTexts.getText("my.allProjects.errorLoadingProjectBoard"));jQuery(c).val(lastSortMode);
b.removeLoaders()},success:function(d){if(b.isLoaderAborted()){return}if(jQuery(d).find("status").text()=="1"){myAllProjectsManageBoardResponse(d);
lastSortMode=c.value}else{createApplicationMessage("error",jQuery(d).find("message").text())}b.removeLoaders()}}))}function myAllProjectsManageBoardResponse(xml){var projectsDiv=jQuery("#projectsDiv");
eval(jQuery(xml).find("jb").text());jQuery(projectsDiv).attr("innerHTML",jQuery(xml).find("bhtml").text());commonConfigureShowHideSpans(projectsDiv)
}function myAllProjectsRemoveLoader(a){if(a!=null){jQuery(a).remove();a=null}};var jabox=new function Jabox(){var n={};var u={};var a={};var k={};var p={};var s={};var e={};var i={};var m={};var t={};
var c={};var j={};var d={};var g={};var f=[];var b={};var q=[];var l={};var o=[];var r={};var h={};this.getMilestone=function(w){if(w==null){return null
}var v=n[w.toString()];if(v==null){this.onNonExistingEntity()}return v};this.addMilestone=function(v){n[v.getId().toString()]=v
};this.removeMilestone=function(v){delete n[v]};this.getDofile=function(w){if(w==null){return null}var v=u[w.toString()];
if(v==null){this.onNonExistingEntity()}return v};this.addDofile=function(v){u[v.getId().toString()]=v};this.removeDofile=function(v){delete u[v]
};this.getDisfile=function(w){if(w==null){return null}var v=a[w.toString()];if(v==null){this.onNonExistingEntity()}return v
};this.addDisfile=function(v){a[v.getId().toString()]=v};this.removeDisfile=function(v){delete a[v]};this.getMoney=function(w){if(w==null){return null
}var v=k[w.toString()];if(v==null){this.onNonExistingEntity()}return v};this.addMoney=function(v){k[v.getId().toString()]=v
};this.removeMoney=function(v){delete k[v]};this.getTask=function(w){if(w==null){return null}var v=p[w.toString()];if(v==null){this.onNonExistingEntity()
}return v};this.addTask=function(v){p[v.getId().toString()]=v};this.removeTask=function(v){delete p[v]};this.getTasklist=function(w){if(w==null){return null
}var v=s[w.toString()];if(v==null){this.onNonExistingEntity()}return v};this.addTasklist=function(v){s[v.getId().toString()]=v
};this.removeTasklist=function(v){delete s[v]};this.getTime=function(w){if(w==null){return null}var v=e[w.toString()];if(v==null){this.onNonExistingEntity()
}return v};this.addTime=function(v){e[v.getId().toString()]=v};this.removeTime=function(v){delete e[v]};this.getProfile=function(w){if(w==null){return null
}var v=i[w.toString()];if(v==null){this.onNonExistingEntity()}return v};this.getProfiles=function(){return i};this.addProfile=function(v){i[v.getId().toString()]=v
};this.doesProfileExist=function(v){return(i[v]!=null)};this.removeProfile=function(v){delete i[v]};this.getColleague=function(w){if(w==null){return null
}var v=m[w.toString()];if(v==null){this.onNonExistingEntity()}return v};this.getColleagues=function(){return m};this.addColleague=function(v){m[v.getId().toString()]=v
};this.removeColleague=function(v){delete m[v]};this.getGroup=function(w){if(w==null){return null}var v=t[w.toString()];if(v==null){this.onNonExistingEntity()
}return v};this.addGroup=function(v){t[v.getId().toString()]=v};this.removeGroup=function(v){delete t[v]};this.getProject=function(w){if(w==null){return null
}var v=j[w.toString()];if(v==null){this.onNonExistingEntity()}return v};this.getProjects=function(){return j};this.addProject=function(v){j[v.getId().toString()]=v
};this.removeProject=function(v){delete j[v]};this.getProjectMembership=function(w){if(w==null){return null}var v=d[w.toString()];
if(v==null){this.onNonExistingEntity()}return v};this.addProjectMembership=function(v){d[v.getId().toString()]=v};this.removeProjectMembership=function(v){delete d[v]
};this.getProjectGroup=function(w){if(w==null){return null}var v=g[w.toString()];if(v==null){this.onNonExistingEntity()}return v
};this.addProjectGroup=function(v){g[v.getId().toString()]=v};this.removeProjectGroup=function(v){delete g[v]};this.getProjectRole=function(w){if(w==null){return null
}var v=b[w.toString()];if(v==null){this.onNonExistingEntity()}return v};this.addProjectRole=function(v){b[v.getId().toString()]=v
};this.removeProjectRole=function(v){delete b[v]};this.getFileGroup=function(w){if(w==null){return null}var v=l[w.toString()];
if(v==null){this.onNonExistingEntity()}return v};this.addFileGroup=function(v){l[v.getId().toString()]=v};this.removeFileGroup=function(v){delete l[v]
};this.getFileGroups=function(){return l};this.addPost=function(v){c[v.getId().toString()]=v};this.removePost=function(v){delete c[v]
};this.getPost=function(w){if(w==null){return null}var v=c[w.toString()];if(v==null){this.onNonExistingEntity()}return v};
this.getProjectGroupsSorted=function(){return f};this.addSortedProjectGroup=function(v){f[f.length]=v};this.getProjectRolesSorted=function(){return q
};this.addSortedProjectRole=function(v){q[q.length]=v};this.getUserProjectMemberships=function(){return o};this.addUserProjectMembership=function(v){o[o.length]=v
};this.getUserAdminProjectMemberships=function(){var w=[];if(o!=null){for(var v=0;v<o.length;v++){if(this.getProjectMembership(o[v]).getAdmin()==true){w[w.length]=o[v]
}}}return w};this.getUserProjectMembershipsForProject=function(w){var v=r[w];if(v==null){return[]}return v};this.clearUserProjectMembershipsForProjects=function(){r={}
};this.addUserProjectMembershipsForProject=function(w,x){var v=r[w];if(v==null){v=[];r[w]=v}v[v.length]=x};this.clearUserProjectMembershipsForProjectsAndProfiles=function(){h={}
};this.getUserProjectMembershipsForProjectAndProfile=function(v,x){var y=h[v];if(y==null){return[]}var w=y[x];if(w==null){return[]
}return w};this.addUserProjectMembershipsForProjectAndProfile=function(v,y,x){var z=h[v];if(z==null){z={};h[v]=z}var w=z[y];
if(w==null){w=[];z[y]=w}w[w.length]=x};this.onNonExistingEntity=function(){alert("Ooops, entity does not exist.")}};function DoboxFileData(a){this.id=a.id;this.filename=a.fname;this.filelink=a.flink;this.previewlink=a.plink;this.uploadNewVersionlink=a.unvlink;
this.previewSource=a.psrc;this.previewMode=a.pmode;this.extenssion=a.ext;this.size=a.size;this.description=a.desc;this.uploadedBy=a.upb;
this.customHash=a.ch;this.visibleToMembershipIds={};this.commentsLink=a.clink;this.numberOfComments=a.numComments;this.taskGroupsIds=[];
this.discussionGroupsIds=[];this.generalGroupsIds=[];this.versionIds=[]}DoboxFileData.prototype.getId=function(){return this.id
};DoboxFileData.prototype.setId=function(a){this.id=a};DoboxFileData.prototype.getFilename=function(){return this.filename
};DoboxFileData.prototype.setFilename=function(a){this.filename=a};DoboxFileData.prototype.getFilelink=function(){return this.filelink
};DoboxFileData.prototype.setFilelink=function(a){this.filelink=a};DoboxFileData.prototype.getPreviewlink=function(){return this.previewlink
};DoboxFileData.prototype.setPreviewlink=function(a){this.previewlink=a};DoboxFileData.prototype.getPreviewSource=function(){return this.previewSource
};DoboxFileData.prototype.getPreviewMode=function(){return this.previewMode};DoboxFileData.prototype.isPreviewType=function(){return !isEmptyString(this.previewSource)
};DoboxFileData.prototype.setPreviewMode=function(a){this.previewMode=a;if(!isEmptyString(this.previewSource)){this.previewSource=this.previewSource.replace(/\/prm\/\w*[\/,$]/,"/prm/"+this.previewMode+"/")
}};DoboxFileData.prototype.getExtenssion=function(){return this.extenssion};DoboxFileData.prototype.getUNVLink=function(){return this.uploadNewVersionlink
};DoboxFileData.prototype.setUNVLink=function(a){this.uploadNewVersionlink=a};DoboxFileData.prototype.getSize=function(){return this.size
};DoboxFileData.prototype.setSize=function(a){this.size=a};DoboxFileData.prototype.getDescription=function(){return this.description
};DoboxFileData.prototype.getDescriptionU=function(){return unescapeJsInString(this.description)};DoboxFileData.prototype.setDescription=function(a){this.description=a
};DoboxFileData.prototype.getUploadedBy=function(){return this.uploadedBy};DoboxFileData.prototype.setUploadedBy=function(a){this.uploadedBy=a
};DoboxFileData.prototype.getCustomHash=function(){return this.customHash};DoboxFileData.prototype.setCustomHash=function(a){this.customHash=a
};DoboxFileData.prototype.getTaskGroupsIds=function(){return this.taskGroupsIds};DoboxFileData.prototype.getTaskGroups=function(){var a=[];
if(this.taskGroupsIds==null){return a}for(var b=0;b<this.taskGroupsIds.length;b++){a[a.length]=jabox.getFileGroup(this.taskGroupsIds[b])
}return a};DoboxFileData.prototype.setTaskGroupsIds=function(a){this.taskGroupsIds=a};DoboxFileData.prototype.getDiscussionGroupsIds=function(){return this.discussionGroupsIds
};DoboxFileData.prototype.getDiscussionGroups=function(){var a=[];if(this.discussionGroupsIds==null){return a}for(var b=0;
b<this.discussionGroupsIds.length;b++){a[a.length]=jabox.getFileGroup(this.discussionGroupsIds[b])}return a};DoboxFileData.prototype.setDiscussionGroupsIds=function(a){this.discussionGroupsIds=a
};DoboxFileData.prototype.getGeneralGroupsIds=function(){return this.generalGroupsIds};DoboxFileData.prototype.getGeneralGroups=function(){var a=[];
if(this.generalGroupsIds==null){return a}for(var b=0;b<this.generalGroupsIds.length;b++){a[a.length]=jabox.getFileGroup(this.generalGroupsIds[b])
}return a};DoboxFileData.prototype.setGeneralGroupsIds=function(a){this.generalGroupsIds=a};DoboxFileData.prototype.addVersionId=function(a){this.versionIds[this.versionIds.length]=a
};DoboxFileData.prototype.getVersionIds=function(){return this.versionIds};DoboxFileData.prototype.getVersions=function(){var b=[];
for(var a=0;a<this.versionIds.length;a++){b[b.length]=jabox.getDofile(this.versionIds[a])}return b};DoboxFileData.prototype.setVersionIds=function(a){this.versionIds=a
};DoboxFileData.prototype.getVisibleToMembershipIds=function(){return this.visibleToMembershipIds};DoboxFileData.prototype.setVisibleToMembershipIds=function(a){this.visibleToMembershipIds=a
};DoboxFileData.prototype.isVisibleToMembershipViaGroups=function(b){for(var a=0;a<this.getGeneralGroupsIds().length;a++){var c=jabox.getFileGroup(this.getGeneralGroupsIds()[a]);
if(c.isVisibleToUserMembership(b)){return true}}for(var a=0;a<this.getTaskGroupsIds().length;a++){var c=jabox.getFileGroup(this.getTaskGroupsIds()[a]);
if(c.isVisibleToUserMembership(b)){return true}}for(var a=0;a<this.getDiscussionGroupsIds().length;a++){var c=jabox.getFileGroup(this.getDiscussionGroupsIds()[a]);
if(c.isVisibleToUserMembership(b)){return true}}};DoboxFileData.prototype.getNumberOfComments=function(){return this.numberOfComments
};DoboxFileData.prototype.setNumberOfComments=function(a){this.numberOfComments=a};DoboxFileData.prototype.getCommentslink=function(){return this.commentsLink
};DoboxFileData.prototype.setCommentslink=function(a){this.commentsLink=a};DoboxFileData.prototype.getOptionId=function(){return this.id+"_"+this.customHash
};function jaboxUpdateFileDataFromResponse(fileId,jbx){var fileData=jabox.getDofile(fileId);var numComments=fileData.getNumberOfComments();
eval(jbx);fileData=jabox.getDofile(fileId);fileData.setNumberOfComments(numComments);return fileData};function DiscussionFileData(a){this.id=a.id;this.fileId=a.fid;this.customHash=a.h}DiscussionFileData.prototype.getId=function(){return this.id
};DiscussionFileData.prototype.setId=function(a){this.id=a};DiscussionFileData.prototype.getFileId=function(){return this.fileId
};DiscussionFileData.prototype.getFile=function(){return jabox.getDofile(this.fileId)};DiscussionFileData.prototype.setFileId=function(a){this.fileId=a
};DiscussionFileData.prototype.getOptionId=function(){return this.id+"_"+this.customHash};function FileGroupData(a){this.id=a.id;this.name=a.name;this.customHash=a.hash;this.visibleToEveryone=a.vte;this.generalFileGroup=a.gen;
this.userMembershipsVisible=a.userMem}FileGroupData.prototype.getId=function(){return this.id};FileGroupData.prototype.setId=function(a){this.id=a
};FileGroupData.prototype.getName=function(){return this.name};FileGroupData.prototype.setName=function(a){this.name=a};FileGroupData.prototype.getCustomHash=function(){return this.customHash
};FileGroupData.prototype.setCustomHash=function(a){this.customHash=a};FileGroupData.prototype.getVisibleToEveryone=function(){return this.visibleToEveryone
};FileGroupData.prototype.setVisibleToEveryone=function(a){this.visibleToEveryone=a};FileGroupData.prototype.getGeneralFileGroup=function(){return this.generalFileGroup
};FileGroupData.prototype.setGeneralFileGroup=function(a){this.generalFileGroup=a};FileGroupData.prototype.isVisibleToUserMembership=function(a){if(this.visibleToEveryone==true){return true
}if(this.userMembershipsVisible==null){return false}return(this.userMembershipsVisible[a]==true)};FileGroupData.prototype.fillSelectedGroupDiv=function(b){var a=jQuery(b).find("input[name^=dffold_]");
a.val(this.id+"_"+this.customHash);a.prev().attr("innerHTML",this.name)};/** Milestone data object **/
function MilestoneData(dataTable) {
this.id = dataTable['id'];
this.title = dataTable['title'];
this.milestoneDateData = new ValuePair(dataTable['milestoneDateId'], dataTable['milestoneDateString']);
this.completedData = new ValuePair(dataTable['completed'] != true?false:true, dataTable['completedDate']);
this.dateDiff = dataTable['dateDiff'];
this.late = dataTable['late'] != true?false:true;
this.description = dataTable['description'];
if(this.getCompleted()) {
this.completedByData = new ValuePair(dataTable['completedById'], dataTable['completedByString']);
}
this.assignedData = new ValuePair(dataTable['assignedToId'], dataTable['assignedToString']);
this.assignedToUser = dataTable['assToUser'];
this.startLists = dataTable['startLists'];
this.startEndLists = dataTable['startEndLists'];
this.endLists = dataTable['endLists'];
this.numberOfComments = dataTable['numberOfComments'];
this.float = dataTable['float'] != true?false:true;
this.sendReminders = dataTable['rem'] != true?false:true;
this.milisecondsUntilChangeExpires = dataTable['mue'];
this.hash = dataTable['h'];
this.timezoneString = dataTable['tzs'];

this.projectId = dataTable['projectId'];
}

MilestoneData.prototype.getId = function () {
return this.id;
};
MilestoneData.prototype.setId = function(id) {
this.id = id;
};

MilestoneData.prototype.getTitle = function () {
return this.title;
};
MilestoneData.prototype.getTitleU = function () {
return unescapeJsInString(this.title);
};
MilestoneData.prototype.setTitle = function(title) {
this.title = title;
};

MilestoneData.prototype.getMilestoneDate = function () {
return this.milestoneDateData.value1;
};
MilestoneData.prototype.setMilestoneDate = function(milestoneDate) {
this.milestoneDateData.value1 = milestoneDate;
};

MilestoneData.prototype.getMilestoneDateString = function () {
return this.milestoneDateData.value2;
};
MilestoneData.prototype.setMilestoneDateString = function(milestoneDateString) {
this.milestoneDateData.value2 = milestoneDateString;
};

MilestoneData.prototype.getCompleted = function () {
return this.completedData.value1;
};
MilestoneData.prototype.setCompleted = function(completed) {
this.completedData.value1 = completed;
};

MilestoneData.prototype.getCompletedDateString = function () {
return this.completedData.value2;
};
MilestoneData.prototype.setCompletedDateString = function(completedDateString) {
this.completedData.value2 = completedString;
};

MilestoneData.prototype.getDateDiff = function () {
return this.dateDiff;
};
MilestoneData.prototype.setDateDiff = function(dateDiff) {
this.dateDiff = dateDiff;
};

MilestoneData.prototype.getDescription = function () {
return this.description;
};
MilestoneData.prototype.getDescriptionU = function () {
return unescapeJsInString(this.description);
};
MilestoneData.prototype.setDescription = function(description) {
this.description = description;
};

MilestoneData.prototype.getFloat = function () {
return this.float;
};
MilestoneData.prototype.setFloat = function(float) {
this.float = float;
};

MilestoneData.prototype.getLate = function () {
return this.late;
};
MilestoneData.prototype.setLate = function(late) {
this.late = late;
};

MilestoneData.prototype.getSendReminders = function () {
return this.sendReminders;
};
MilestoneData.prototype.setSendReminder = function(sendReminders) {
this.sendReminders = sendReminders;
};

MilestoneData.prototype.getHash = function () {
return this.hash;
};
MilestoneData.prototype.setHash = function(hash) {
this.hash = hash;
};

MilestoneData.prototype.getCompletedById = function () {
if(this.completedByData == null)
this.completedByData = new ValuePair();
return this.completedByData.value1;
};
MilestoneData.prototype.setCompletedById = function(completedById) {
if(this.completedByData == null)
this.completedByData = new ValuePair();
this.completedByData.value1 = completedById;
};

MilestoneData.prototype.getCompletedByString = function () {
if(this.completedByData == null)
this.completedByData = new ValuePair();
return this.completedByData.value2;
};
MilestoneData.prototype.setCompletedByString = function(completedByString) {
if(this.completedByData == null)
this.completedByData = new ValuePair();
this.completedByData.value2 = completedByString;
};

MilestoneData.prototype.isAssignedToUser = function () {
return this.assignedToUser;
};

MilestoneData.prototype.getAssignedToId = function () {
if(this.assignedData == null)
this.assignedData = new ValuePair();
return this.assignedData.value1;
};
MilestoneData.prototype.setAssignedDataId = function(assignedDataId) {
if(this.assignedData == null)
this.assignedData = new ValuePair();
this.assignedData.value1 = assignedDataId;
};

MilestoneData.prototype.getAssignedToString = function () {
if(this.assignedData == null)
this.assignedData = new ValuePair();
return this.assignedData.value2;
};
MilestoneData.prototype.setAssignedDataString = function(assignedDataString) {
if(this.assignedData == null)
this.assignedData = new ValuePair();
this.assignedData.value2 = assignedDataString;
};

MilestoneData.prototype.getStartLists = function () {
if(this.startLists == null)
this.startLists = new Array();
return this.startLists;
};
MilestoneData.prototype.setStartLists = function(startLists) {
this.startLists = startLists;
};

MilestoneData.prototype.getEndLists = function () {
if(this.endLists == null)
this.endLists = new Array();
return this.endLists;
};
MilestoneData.prototype.setEndLists = function(endLists) {
this.endLists = endLists;
};

MilestoneData.prototype.getStartListsObjects = function () {
var objArray = new Array();
for(var i=0; i<this.getStartLists().length; i++)
objArray[i] = jabox.getTasklist(this.startLists[i]);
return objArray;
};
MilestoneData.prototype.setStartListsObjects = function(startListsObjects) {
this.setStartLists(new Array());
if(startListsObjects == null)
return;
for(var i=0; i<startListsObjects.length; i++) {
this.startLists[i] = startListsObjects[i].id;
}
};

MilestoneData.prototype.getEndListsObjects = function () {
var objArray = new Array();
for(var i=0; i<this.getEndLists().length; i++)
objArray[i] = jabox.getTasklist(this.endLists[i]);
return objArray;
};
MilestoneData.prototype.setEndListsObjects = function(endListsObjects) {
this.setEndLists(new Array());
if(endListsObjects == null)
return;
for(var i=0; i<endListsObjects.length; i++) {
this.endLists[i] = endListsObjects[i].id;
}
};

MilestoneData.prototype.getStartEndLists = function () {
if(this.startEndLists == null)
this.startEndLists = new Array();
return this.startEndLists;
};
MilestoneData.prototype.setStartEndLists = function(startEndLists) {
this.startEndLists = startEndLists;
};

MilestoneData.prototype.getStartEndListsObjects = function () {
var objArray = new Array();
for(var i=0; i<this.getStartEndLists().length; i++)
objArray[i] = jabox.getTasklist(this.startEndLists[i]);
return objArray;
};
MilestoneData.prototype.setStartEndListsObjects = function(startEndListsObjects) {
this.setStartEndLists(new Array());
if(startEndListsObjects == null)
return;
for(var i=0; i<startEndListsObjects.length; i++) {
this.startEndLists[i] = startEndListsObjects[i].id;
}
};

MilestoneData.prototype.getMilisecondsUntilChangeExpires = function () {
return this.milisecondsUntilChangeExpires;
};
MilestoneData.prototype.setMilisecondsUntilChangeExpires = function(milisecondsUntilChangeExpires) {
this.milisecondsUntilChangeExpires = milisecondsUntilChangeExpires;
};

MilestoneData.prototype.getProjectId = function() {
return this.projectId;
};
MilestoneData.prototype.setProjectId = function(projectId) {
this.projectId=projectId;
};

/**
* Fills data array with appropriate id and hash data and with given mode.
* @param mode Mode for which we are filling array ('e', 'c', 'd')
* @return array, filled with data.
*/
MilestoneData.prototype.fillManageDataArray = function(mode) {
var dataArray = {};
dataArray['mid'] = this.id;
dataArray['h'] = this.hash;
dataArray['m'] = mode;
return dataArray;
};

/**
* Returns inner html for date element.
* @return
*/
MilestoneData.prototype.getDayInnerHTML = function(appendIcons) {
var _self = this;
if(appendIcons == null) {
appendIcons = true;
}
var htmlText = _self.getMilestoneDateString();
if(_self.getCompleted()&&_self.dateDiff!=0) {
/*htmlText += _self.getCompletedDateString();*/
} else if(_self.getLate()) {
htmlText = htmlText.replace(/#pp#number#/g, Math.abs(_self.dateDiff));
}

if(appendIcons) {
htmlText += this.getIconsHTML();
}

return htmlText;
};

/**
* Returns html for necessary icons (float & timezone).
* @return
*/
MilestoneData.prototype.getIconsHTML = function() {
var htmlText = '';
if(!isEmptyString(this.timezoneString)) {
htmlText += '<img style="margin-left:5px;" src="/images/app/timezone.png" border="0" alt="tz.gif"/><span>'+this.timezoneString+'</span>';
}
if(this.float) {
htmlText += '<img style="margin-left:5px;" src="/images/app/locker.gif" border="0" alt="locked.gif"/>';
}
return htmlText;
};

/**
* Refreshes shown data.
* If called given container is null, it is setted via jquery getter.
* If completition change is true, then refreshing after completing/uncompleting/change completed by action.
* @deprecated Don't need to use it any more
*/
MilestoneData.prototype.refreshShownData = function(milestoneContainer, completitionChange) {
var _self = this;
if(milestoneContainer == null) {
milestoneContainer = jQuery("#milestoneDiv_"+_self.id);
}

jQuery(milestoneContainer).find("#milestoneTitle_"+_self.id).attr('innerHTML', _self.getTitle()).removeClass().addClass(_self.getCompleted()?'milestoneBoardEntryComplMilestoneTitle':'milestoneBoardEntryMilestoneTitle');
jQuery(milestoneContainer).find("#milestoneTitle_"+_self.id).prev().attr('checked', _self.getCompleted()?'checked':'');
jQuery(milestoneContainer).find("#milestoneDesc_"+_self.id).attr('innerHTML', _self.getDescription());
var respDiv = jQuery(milestoneContainer).find("#milestoneResp_"+_self.id);
var respChangeSpan = commonManageCompleteByChangeSpan(_self.id, respDiv, _self.getCompleted()?_self.getCompletedByString():_self.getAssignedToString(), true, _self.milisecondsUntilChangeExpires, completitionChange);
if(respChangeSpan != null) {
bindMilestoneChangeTimer(_self.getId(), _self.getMilisecondsUntilChangeExpires());
}

jQuery(milestoneContainer).find("#milestoneDate_"+_self.id).attr('innerHTML', _self.getDayInnerHTML());

//Tasklists
if(completitionChange == false) {
var tasklistsCont = jQuery(milestoneContainer).find("#milestoneLists_"+_self.id);
tasklistsCont.empty();
var slists = _self.getStartListsObjects();
var sdlists = _self.getStartEndListsObjects();
var dlists = _self.getEndListsObjects();

for(var i=0; i<dlists.length; i++) {
var tdata = dlists[i];
var connectedDiv = connectedTasklistTemplate.clone();
_self.fillConnectedTasklistData(connectedDiv, tdata, false, true);
tasklistsCont.append(connectedDiv);
}

for(var i=0; i<sdlists.length; i++) {
var tdata = sdlists[i];
var connectedDiv = connectedTasklistTemplate.clone();
_self.fillConnectedTasklistData(connectedDiv, tdata, true, true);
tasklistsCont.append(connectedDiv);
}

for(var i=0; i<slists.length; i++) {
var tdata = slists[i];
var connectedDiv = connectedTasklistTemplate.clone();
_self.fillConnectedTasklistData(connectedDiv, tdata, true, false);
tasklistsCont.append(connectedDiv);
}

if(dlists.length + slists.length + sdlists.length > 0) {
tasklistsCont.show();
} else {
tasklistsCont.hide();
}
}
};

/**
* Fills given connected tasklist div with data.
*/
MilestoneData.prototype.fillConnectedTasklistData = function(connectedDiv, tasklistData, isStart, isEnd) {
var captionDiv = jQuery(connectedDiv).getFirstChild();
if(isStart && isEnd) {
captionDiv.attr('innerHTML', doTexts.getText('my.projectMilestones.connectedTasklistStartDueText'));
} else if(isStart) {
captionDiv.attr('innerHTML', doTexts.getText('my.projectMilestones.connectedTasklistStartText'));
} else {
captionDiv.attr('innerHTML', doTexts.getText('my.projectMilestones.connectedTasklistDueText'));
}
captionDiv.next().find('a').attr('href', tasklistData.getViewLink()).attr('innerHTML', tasklistData.getTitle());
};

/**
* Refreshes data in edit container (call when refresh of edited data is needed)..
* Given container should not be null!
*/
MilestoneData.prototype.refreshEditedData = function(editContainer) {
var _self = this;
if(editContainer == null || editContainer.length==0) {
return;
}

jQuery(editContainer).find('#milestoneCalendar_'+_self.getId()).get(0).calendar.selectDate(_self.getMilestoneDate());
jQuery(editContainer).find('#mname_'+_self.getId()).val(_self.title);
jQuery(editContainer).find('#mdesc_'+_self.getId()).val(_self.description);
jQuery(editContainer).find('#mrem_'+_self.getId()).get(0).checked=_self.sendReminders;
if(_self.getAssignedToId() != null) {
jQuery(editContainer).find('#mass_'+_self.getId()).find('option[val^='+_self.getAssignedToId()+']').attr('selected', 'selected');
} else {
jQuery(editContainer).find('#mass_'+_self.getId()).find('option:first').attr('selected', 'selected');
}
jQuery(editContainer).find('#mflt_'+_self.getId()).get(0).checked=_self.float;
if(_self.float) {
jQuery(editContainer).find('#mshft_'+_self.getId()).attr('checked', 'checked').attr('disabled', 'disabled');
} else {
jQuery(editContainer).find('#mshft_'+_self.getId()).get(0).checked = false;
}
};
/** End milestone data object **/
function MoneyLogData(a){this.id=a.id;this.amount=a.am;this.income=a.inc;this.description=a.desc;this.responsibleId=a.rid;
this.date=a.date;this.taskId=a.tid;this.hash=a.h;this.filesIds=a.fls}MoneyLogData.prototype.getId=function(){return this.id
};MoneyLogData.prototype.setId=function(a){this.id=a};MoneyLogData.prototype.getAmount=function(){return this.amount};MoneyLogData.prototype.setAmount=function(a){this.amount=a
};MoneyLogData.prototype.isIncome=function(){return this.income};MoneyLogData.prototype.setIncome=function(a){this.income=a
};MoneyLogData.prototype.getDescription=function(){return this.description};MoneyLogData.prototype.getDescriptionU=function(){return unescapeJsInString(this.description)
};MoneyLogData.prototype.setDescription=function(a){this.description=a};MoneyLogData.prototype.getResponsibleId=function(){return this.responsibleId
};MoneyLogData.prototype.setResponsibleId=function(a){this.responsibleId=a};MoneyLogData.prototype.getDate=function(){return this.date
};MoneyLogData.prototype.setDate=function(a){this.date=a};MoneyLogData.prototype.getHash=function(){return this.hash};MoneyLogData.prototype.setHash=function(a){this.hash=a
};MoneyLogData.prototype.getTaskId=function(){return this.taskId};MoneyLogData.prototype.getTask=function(){if(this.taskId==null){return null
}return jabox.getTask(this.taskId)};MoneyLogData.prototype.setTaskId=function(a){this.taskId=a};MoneyLogData.prototype.getFilesIds=function(){return this.filesIds
};MoneyLogData.prototype.setFilesIds=function(a){this.filesIds=a};MoneyLogData.prototype.formatAmountToMoney=function(a){return formatAmountInCentsToMoney(this.amount,a)
};function formatAmountInCentsToMoney(b,d){var e=b<0?"-":"";b=Math.abs(b);var c=b.toString();if(c.length==1){return"0"+DECIMAL_SEPARATOR+"0"+c
}else{if(c.length==2){return"0"+DECIMAL_SEPARATOR+c}else{var f=c.substring(c.length-2);c=c.substring(0,c.length-2);if(d){var a=/(\d+)(\d{3})/;
while(a.test(c)){c=c.replace(a,"$1"+GROUPPING_SEPARATOR+"$2")}}return e+c+DECIMAL_SEPARATOR+f}}};function ProfileData(a){this.id=a.id;this.name=a.name;this.mail=a.mail;this.phone=a.phone;this.mobile=a.mobile;this.fax=a.fax;
this.functionStr=a.functionStr;this.address=a.address;this.city=a.city;this.state=a.state;this.zipCode=a.zipCode;this.company=a.company;
this.fullname=a.fullname;this.imnum=a.im;this.cardImageStr=a.cardImgStr;this.globalHash=a.globHash;this.colleagues=a.colleagues;
this.groups=a.groups}ProfileData.prototype.getId=function(){return this.id};ProfileData.prototype.setId=function(a){this.id=a
};ProfileData.prototype.getName=function(){return this.name};ProfileData.prototype.setName=function(a){this.name=a};ProfileData.prototype.getMail=function(){return this.mail
};ProfileData.prototype.setMail=function(a){this.mail=a};ProfileData.prototype.getPhone=function(){return this.phone};ProfileData.prototype.setPhone=function(a){this.phone=a
};ProfileData.prototype.getMobile=function(){return this.mobile};ProfileData.prototype.setMobile=function(a){this.mobile=a
};ProfileData.prototype.getFax=function(){return this.fax};ProfileData.prototype.setFax=function(a){this.fax=a};ProfileData.prototype.getFunction=function(){return this.functionStr
};ProfileData.prototype.setFunction=function(a){this.functionStr=a};ProfileData.prototype.getAddress=function(){return this.address
};ProfileData.prototype.setAddress=function(a){this.address=a};ProfileData.prototype.getCity=function(){return this.city};
ProfileData.prototype.setCity=function(a){this.city=a};ProfileData.prototype.getState=function(){return this.state};ProfileData.prototype.setState=function(a){this.state=a
};ProfileData.prototype.getZipCode=function(){return this.zipCode};ProfileData.prototype.setZipCode=function(a){this.zipCode=a
};ProfileData.prototype.getCompany=function(){return this.company};ProfileData.prototype.setCompany=function(a){this.company=a
};ProfileData.prototype.getFullname=function(){return this.fullname};ProfileData.prototype.setFullname=function(a){this.fullname=a
};ProfileData.prototype.getCardImageStr=function(){return this.cardImageStr};ProfileData.prototype.setCardImageStr=function(a){this.cardImageStr=a
};ProfileData.prototype.getGlobalHash=function(){return this.globalHash};ProfileData.prototype.setGlobalHash=function(a){this.globalHash=a
};ProfileData.prototype.getColleagues=function(){if(this.colleagues==null){this.colleagues=[]}return this.colleagues};ProfileData.prototype.setColleagues=function(a){this.colleagues=a
};ProfileData.prototype.addColleague=function(a){this.getColleagues()[this.colleagues.length]=a};ProfileData.prototype.getGroups=function(){if(this.groups==null){this.groups=[]
}return this.groups};ProfileData.prototype.setGroups=function(a){this.groups=a};ProfileData.prototype.addGroup=function(a){this.getGroups()[this.groups.length]=a
};ProfileData.prototype.fillCardWithData=function(c){var b=this;if(isEmptyString(c.getRepresentedId())){c.attr("id","cardDiv_"+b.id)
}var a=c.getRepresentedId();c.find("[id$=_]").each(function(){this.id+=a});jQuery(c).find("#cardName_"+a).attr("innerHTML",this.fullname);
jQuery(c).find("#cardFunction_"+a).attr("innerHTML",this.functionStr);jQuery(c).find("#cardPicture_"+a).attr("innerHTML",this.cardImageStr);
b._fillCardRowFromData(c,"cardMobileRow_"+a,"cardMobile_"+a,b.mobile);b._fillCardRowFromData(c,"cardPhoneRow_"+a,"cardPhone_"+a,b.phone);
b._fillCardRowFromData(c,"cardFaxRow_"+a,"cardFax_"+a,b.fax);b._fillCardRowFromData(c,"cardMailRow_"+a,"cardMail_"+a,b.mail);
b._fillCardRowFromData(c,"cardImRow_"+a,"cardIm_"+a,b.imnum)};ProfileData.prototype._fillCardRowFromData=function(b,d,a,c){if(isEmptyString(c)){b.find("#"+d).css("display","none")
}else{b.find("#"+a).attr("innerHTML",c)}};function QuasiMemberData(a){this.baseId=a.bid;this.optionValue=a.oval;this.optionDisplay=a.odis}QuasiMemberData.prototype.getBaseId=function(){return this.baseId
};QuasiMemberData.prototype.setBaseId=function(a){this.baseId=a};QuasiMemberData.prototype.getOptionValue=function(){return this.optionValue
};QuasiMemberData.prototype.setOptionValue=function(a){this.optionValue=a};QuasiMemberData.prototype.getOptionDisplay=function(){return this.optionDisplay
};QuasiMemberData.prototype.setOptionDisplay=function(a){this.optionDisplay=a};function TaskData(a){this.id=a.id;this.title=a.ttl;this.parentListId=a.plid;this.completed=a.cmpl;this.completedById=a.cmplbyid;
this.filesIds=a.fls;this.assignedToId=a.ass;this.assignedToString=a.assStr;this.milisecondsUntilChangeExpires=a.mue;this.timeLink=a.tlink;
this.timeSum=a.tsum;this.timeHash=a.thash;this.filesLink=a.flink;this.filesNum=a.fnum;this.commentsLink=a.clink;this.commentsNum=a.cnum;
this.newCommentsNum=a.ncnum;this.moneyLink=a.mlink;this.moneySum=a.msum;this.additionalMinutes=0;this.additionalMoney=0}TaskData.prototype.getId=function(){return this.id
};TaskData.prototype.setId=function(a){this.id=a};TaskData.prototype.getParentListId=function(){return this.parentListId};
TaskData.prototype.getParentList=function(){return jabox.getTasklist(this.parentListId)};TaskData.prototype.setParentListId=function(a){this.parentListId=a
};TaskData.prototype.getTitle=function(){return this.title};TaskData.prototype.getTitleU=function(){return unescapeJsInString(this.title)
};TaskData.prototype.setTitle=function(a){this.title=a};TaskData.prototype.getCompleted=function(){return this.completed};
TaskData.prototype.setCompleted=function(a){this.completed=a};TaskData.prototype.getCompletedById=function(){return this.completedById
};TaskData.prototype.setCompletedById=function(a){this.completedById=a};TaskData.prototype.getFilesIds=function(){return this.filesIds
};TaskData.prototype.setFilesIds=function(a){this.filesIds=a};TaskData.prototype.getNumberOfComments=function(){return this.numberOfComments
};TaskData.prototype.setNumberOfComments=function(a){this.numberOfComments=a};TaskData.prototype.getAssignedToId=function(){return this.assignedToId
};TaskData.prototype.setAssignedToId=function(a){this.assignedToId=a};TaskData.prototype.getAssignedToString=function(){return this.assignedToString
};TaskData.prototype.setAssignedToString=function(a){this.assignedToString=a};TaskData.prototype.getMilisecondsUntilChangeExpires=function(){return this.milisecondsUntilChangeExpires
};TaskData.prototype.setMilisecondsUntilChangeExpires=function(a){this.milisecondsUntilChangeExpires=a};TaskData.prototype.getTimeLink=function(){return this.timeLink
};TaskData.prototype.setTimeLink=function(a){this.timeLink=a};TaskData.prototype.getTimeSum=function(){return this.timeSum
};TaskData.prototype.setTimeSum=function(a){this.timeSum=a};TaskData.prototype.addToTimeSum=function(a){if(this.timeSum==null){this.timeSum=0
}this.timeSum+=a};TaskData.prototype.getFilesLink=function(){return this.filesLink};TaskData.prototype.setFilesLink=function(a){this.filesLink=a
};TaskData.prototype.getFilesNum=function(){return this.filesNum};TaskData.prototype.setFilesNum=function(a){this.filesNum=a
};TaskData.prototype.getCommentsLink=function(){return this.commentsLink};TaskData.prototype.setCommentsLink=function(a){this.commentsLink=a
};TaskData.prototype.getCommentsNum=function(){return this.commentsNum};TaskData.prototype.setCommentsNum=function(a){this.commentsNum=a
};TaskData.prototype.getNewCommentsNum=function(){return this.newCommentsNum};TaskData.prototype.setNewCommentsNum=function(a){this.newCommentsNum=a
};TaskData.prototype.getMoneyLink=function(){return this.moneyLink};TaskData.prototype.setMoneyLink=function(a){this.moneyLink=a
};TaskData.prototype.getMoneySum=function(){return this.moneySum};TaskData.prototype.setMoneySum=function(a){this.moneySum=a
};TaskData.prototype.addToMoneySum=function(a){if(this.moneySum==null){this.moneySum=0}this.moneySum+=a};TaskData.prototype.getAdditionalMinutes=function(){return this.additionalMinutes
};TaskData.prototype.addAdditionalMinutes=function(a){this.additionalMinutes+=a};TaskData.prototype.getTotalMinutes=function(){return this.timeSum+this.additionalMinutes
};TaskData.prototype.getAdditionalMoney=function(){return this.additionalMoney};TaskData.prototype.addAdditionalMoney=function(a){if(this.moneySum==null){this.moneySum=0
}this.additionalMoney+=a};TaskData.prototype.getTotalMoney=function(){if(this.moneySum==null){this.moneySum=0}return this.moneySum+this.additionalMoney
};function jaboxUpdateTaskDataFromResponse(taskId,jbx){var taskData=jabox.getTask(taskId);var pComments=taskData.getCommentsNum();
var pnComments=taskData.getNewCommentsNum();var ptime=taskData.timeSum;var pmoney=taskData.moneySum;eval(jbx);taskData=jabox.getTask(taskId);
taskData.setCommentsNum(pComments);taskData.setNewCommentsNum(pnComments);taskData.setTimeSum(ptime);taskData.setMoneySum(pmoney);
return taskData};function TasklistData(a){this.id=a.id;this.title=a.ttl;this.description=a.dsc;this.visibleToEveryone=(a.vte==true)?true:false;
this.visibleToIds=a.visTo;this.responsibleString=a.rsStr;this.projectId=a.pid;this.viewLink=a.vl;this.editLink=a.el;this.hasTime=a.tm;
this.assignedToUser=a.assToUser;this.startMilestoneId=a.sm;this.dueMilestoneId=a.dm;this.timeLink=a.tlink;this.timeSum=a.tsum;
this.moneyLink=a.mlink;this.moneySum=a.msum;this.additionalMinutes=0;this.additionalMoney=0}TasklistData.prototype.getId=function(){return this.id
};TasklistData.prototype.setId=function(a){this.id=a};TasklistData.prototype.getTitle=function(){return this.title};TasklistData.prototype.setTitle=function(a){this.title=a
};TasklistData.prototype.getDescription=function(){return this.description};TasklistData.prototype.setDescription=function(a){this.description=a
};TasklistData.prototype.getResponsibleString=function(){return this.responsibleString};TasklistData.prototype.isVisibleToEveryone=function(){return this.visibleToEveryone
};TasklistData.prototype.setVisibleToEveryone=function(a){this.visibleToEveryone=a};TasklistData.prototype.getVisibleToIds=function(){if(this.visibleToIds==null){this.visibleToIds={}
}return this.visibleToIds};TasklistData.prototype.setVisibleToIds=function(a){this.visibleToIds=a};TasklistData.prototype.getVisibleToMembers=function(){var a=[];
for(var b in this.getVisibleToIds()){a[a.length]=jabox.getProjectMembership(b)}return a};TasklistData.prototype.getProjectId=function(){return this.projectId
};TasklistData.prototype.setProjectId=function(a){this.projectId=a};TasklistData.prototype.getViewLink=function(){return this.viewLink
};TasklistData.prototype.setViewLink=function(a){this.viewLink=a};TasklistData.prototype.getEditLink=function(){return this.editLink
};TasklistData.prototype.setEditLink=function(a){this.editLink=a};TasklistData.prototype.getHasTime=function(){return this.hasTime
};TasklistData.prototype.getMoneyLink=function(){return this.moneyLink};TasklistData.prototype.setMoneyLink=function(a){this.moneyLink=a
};TasklistData.prototype.getMoneySum=function(){return this.moneySum};TasklistData.prototype.setMoneySum=function(a){this.moneySum=a
};TasklistData.prototype.addToMoneySum=function(a){if(this.moneySum==null){this.moneySum=0}this.moneySum+=a};TasklistData.prototype.getTimeLink=function(){return this.timeLink
};TasklistData.prototype.setTimeLink=function(a){this.timeLink=a};TasklistData.prototype.getTimeSum=function(){return this.timeSum
};TasklistData.prototype.setTimeSum=function(a){this.timeSum=a};TasklistData.prototype.addToTimeSum=function(a){if(this.timeSum==null){this.timeSum=0
}this.timeSum+=a};TasklistData.prototype.getAdditionalMinutes=function(){return this.additionalMinutes};TasklistData.prototype.addAdditionalMinutes=function(a){this.additionalMinutes+=a
};TasklistData.prototype.getTotalMinutes=function(){return this.timeSum+this.additionalMinutes};TasklistData.prototype.getAdditionalMoney=function(){return this.additionalMoney
};TasklistData.prototype.addAdditionalMoney=function(a){if(this.moneySum==null){this.moneySum=0}this.additionalMoney+=a};
TasklistData.prototype.getTotalMoney=function(){if(this.moneySum==null){this.moneySum=0}return this.moneySum+this.additionalMoney
};TasklistData.prototype.getStartMilestoneId=function(){return this.startMilestoneId};TasklistData.prototype.getStartMilestone=function(){if(this.startMilestoneId==null){return null
}return jabox.getMilestone(this.startMilestoneId)};TasklistData.prototype.setStartMilestoneId=function(a){this.startMilestoneId=a
};TasklistData.prototype.getDueMilestoneId=function(){return this.dueMilestoneId};TasklistData.prototype.getDueMilestone=function(){if(this.dueMilestoneId==null){return null
}return jabox.getMilestone(this.dueMilestoneId)};TasklistData.prototype.setDueMilestoneId=function(a){this.dueMilestoneId=a
};TasklistData.prototype.isAssignedToUser=function(){return this.assignedToUser};function TimeLogData(a){this.id=a.id;this.hours=a.hrs;this.minutes=a.min;this.description=a.desc;this.personId=a.pid;this.date=a.date;
this.dateStr=a.dateStr;this.origin=a.orig;this.originText=a.origText;this.taskId=a.tid;this.hash=a.h;this.amount=a.am;this.billable=a.bil=="1"?true:false
}TimeLogData.prototype.getId=function(){return this.id};TimeLogData.prototype.setId=function(a){this.id=a};TimeLogData.prototype.getHours=function(){return this.hours
};TimeLogData.prototype.setHours=function(a){this.hours=a};TimeLogData.prototype.getMinutes=function(){return this.minutes
};TimeLogData.prototype.setMinutes=function(a){this.minutes=a};TimeLogData.prototype.getDescription=function(){return this.description
};TimeLogData.prototype.getDescriptionU=function(){return unescapeJsInString(this.description)};TimeLogData.prototype.setDescription=function(a){this.description=a
};TimeLogData.prototype.getPersonId=function(){return this.personId};TimeLogData.prototype.setPersonId=function(a){this.personId=a
};TimeLogData.prototype.getDate=function(){return this.date};TimeLogData.prototype.setDate=function(a){this.date=a};TimeLogData.prototype.getHash=function(){return this.hash
};TimeLogData.prototype.setHash=function(a){this.hash=a};TimeLogData.prototype.getDateStr=function(){return this.dateStr};
TimeLogData.prototype.setDateStr=function(a){this.dateStr=a};TimeLogData.prototype.getTotalMinutes=function(){return this.hours*60+this.minutes
};TimeLogData.prototype.getOrigin=function(){return this.origin};TimeLogData.prototype.setOrigin=function(a){this.origin=a
};TimeLogData.prototype.getOriginText=function(){return this.originText};TimeLogData.prototype.setOriginText=function(a){this.originText=a
};TimeLogData.prototype.getBillable=function(){return this.billable};TimeLogData.prototype.setBillable=function(a){this.billable=a
};TimeLogData.prototype.getTaskId=function(){return this.taskId};TimeLogData.prototype.getTask=function(){if(this.taskId==null){return null
}return jabox.getTask(this.taskId)};TimeLogData.prototype.setTaskId=function(a){this.taskId=a};TimeLogData.prototype.getAmount=function(){return this.amount
};TimeLogData.prototype.setAmount=function(a){this.amount=a};function timeLogDataFormatDuration(a,b){if(a==null&&b==null){a=this.hours;
b=this.minutes}else{if(a==null){a=Math.floor(b/60);b-=(a*60)}}return a+":"+((b<10)?"0":"")+b};function ColleagueData(a){this.id=a.id;this.upId=a.up;this.name=a.name;this.hash=a.hash;this.status=a.status;this.imgStr=a.imgStr;
this.profileData=null;if(a.profile!=null){this.profileData=new ProfileData(a.profile)}}ColleagueData.prototype.getId=function(){return this.id
};ColleagueData.prototype.setId=function(a){this.id=a};ColleagueData.prototype.getUpId=function(){return this.upId};ColleagueData.prototype.getName=function(){return this.name
};ColleagueData.prototype.setName=function(a){this.name=a};ColleagueData.prototype.getImgStr=function(){return this.imgStr
};ColleagueData.prototype.setImgStr=function(a){this.imgStr=a};ColleagueData.prototype.getHash=function(){return this.hash
};ColleagueData.prototype.setHash=function(a){this.hash=a};ColleagueData.prototype.getProfile=function(){return this.profileData
};ColleagueData.prototype.setProfile=function(a){this.profileData=a};ColleagueData.prototype.getStatus=function(){return this.status
};ColleagueData.prototype.setStatus=function(a){this.status=a};ColleagueData.prototype.fillCardWithData=function(b){var a=this;
if(a.id<0){b.addClass("own")}b.attr("id","cardDiv_"+a.id);b.find("[id$=_]").each(function(){this.id+=a.id});a.profileData.fillCardWithData(b);
if(!isEmptyString(this.status)){b.find("#cardStatus_"+a.profileData.getId()).attr("innerHTML",this.status)}};function DoboxGroupData(a){this.id=a.id;this.name=a.name;this.hash=a.hash;this.picture=a.pic;this.normalColor=a.norc;this.backgroundHooverColor=a.bghc
}DoboxGroupData.prototype.getId=function(){return this.id};DoboxGroupData.prototype.setId=function(a){this.id=a};DoboxGroupData.prototype.getName=function(){return this.name
};DoboxGroupData.prototype.setName=function(a){this.name=a};DoboxGroupData.prototype.getHash=function(){return this.hash};
DoboxGroupData.prototype.setHash=function(a){this.hash=a};DoboxGroupData.prototype.getPicture=function(){return this.picture
};DoboxGroupData.prototype.setPicture=function(a){this.picture=a};DoboxGroupData.prototype.getNormalColor=function(){return this.normalColor
};DoboxGroupData.prototype.getBackgroundHooverColor=function(){return this.backgroundHooverColor};DoboxGroupData.prototype.fillSelectDiv=function(a){jQuery(a).find("input").attr("name","groupId").val(this.getId()+"_"+this.getHash()).click(function(){myEditProjectGroupSelectInnerClick(this)
});jQuery(a).find(".groupSelectImageInnerDiv").attr("innerHTML",this.getPicture());jQuery(a).children(".groupSelectImageOuterDiv").click(function(){myEditProjectGroupSelectInnerClick(this)
});jQuery(a).find(".groupSelectNameDisplayDiv :first-child").attr("innerHTML",this.getName()).click(function(){myEditProjectGroupSelectInnerClick(this)
})};function PostData(a){this.id=a.id;this.content=a.cnt;this.deleted=a.del;this.filesIds=a.fls;this.authorId=a.aid}PostData.prototype.getId=function(){return this.id
};PostData.prototype.setId=function(a){this.id=a};PostData.prototype.getContent=function(){return this.content};PostData.prototype.setContent=function(a){this.content=a
};PostData.prototype.isDeleted=function(){return this.deleted};PostData.prototype.setDeleted=function(a){this.deleted=a};
PostData.prototype.getFilesIds=function(){return this.filesIds};PostData.prototype.setFilesIds=function(a){this.filesIds=a
};PostData.prototype.getAuthorId=function(){return this.authorId};PostData.prototype.setAuthorId=function(a){this.authorId=a
};function DoboxProjectData(a){this.id=a.id;this.name=a.name;this.description=a.description;this.ownerStr=a.ownerStr;this.userMemberships=a.umem;
this.memberships=a.mem}DoboxProjectData.prototype.getId=function(){return this.id};DoboxProjectData.prototype.setId=function(a){this.id=a
};DoboxProjectData.prototype.getName=function(){return this.name};DoboxProjectData.prototype.setName=function(a){this.name=a
};DoboxProjectData.prototype.getDescription=function(){return this.description};DoboxProjectData.prototype.setDescription=function(a){this.description=a
};DoboxProjectData.prototype.getOwnerStr=function(){return this.ownerStr};DoboxProjectData.prototype.setOwnerStr=function(a){this.ownerStr=a
};DoboxProjectData.prototype.getUserMemberships=function(){return this.userMemberships};DoboxProjectData.prototype.setUserMemberships=function(a){this.userMemberships=a
};DoboxProjectData.prototype.addUserMembership=function(a){if(this.userMemberships==null){this.userMemberships=[]}this.userMemberships[this.userMemberships.length]=a
};DoboxProjectData.prototype.getMemberships=function(){return this.memberships};DoboxProjectData.prototype.setMemberships=function(a){this.memberships=a
};function ProjectMembershipData(a){this.id=a.id;this.profileId=a.profileId;this.projectId=a.projectId;this.groupId=a.groupId;
this.status=a.status;this.shown=a.shown;this.owner=a.owner;this.admin=a.admin;this.canSeeMoney=a.money;this.payment=a.payment;
this.roleId=a.roleId;this.customHash=a.customHash;this.invateeFullname=a.invateeFullname;this.invateeMobile=a.invateeMobile;
this.invateePhone=a.invateePhone;this.invateeFax=a.invateeFax;this.invateeMail=a.invateeMail;this.invateeFunction=a.invateeFunction
}ProjectMembershipData.prototype.getId=function(){return this.id};ProjectMembershipData.prototype.setId=function(a){this.id=a
};ProjectMembershipData.prototype.getProfileId=function(){return this.profileId};ProjectMembershipData.prototype.setProfileId=function(a){this.profileId=a
};ProjectMembershipData.prototype.getProfile=function(){return jabox.getProfile(this.profileId)};ProjectMembershipData.prototype.setProfile=function(a){this.profileId=a.getId()
};ProjectMembershipData.prototype.getProjectId=function(){return this.projectId};ProjectMembershipData.prototype.setProjectId=function(a){this.projectId=a
};ProjectMembershipData.prototype.getProject=function(){return jabox.getProject(this.projectId)};ProjectMembershipData.prototype.setProject=function(a){this.projectId=a.getId()
};ProjectMembershipData.prototype.getGroupId=function(){return this.groupId};ProjectMembershipData.prototype.setGroupId=function(a){this.groupId=a
};ProjectMembershipData.prototype.getGroup=function(){if(this.groupId==null){return null}return jabox.getProjectGroup(this.groupId)
};ProjectMembershipData.prototype.setGroup=function(a){this.groupId=a.getId()};ProjectMembershipData.prototype.getStatus=function(){return this.status
};ProjectMembershipData.prototype.setStatus=function(a){this.status=a};ProjectMembershipData.prototype.getShown=function(){return this.shown
};ProjectMembershipData.prototype.setShown=function(a){this.shown=a};ProjectMembershipData.prototype.getOwner=function(){return this.owner
};ProjectMembershipData.prototype.setOwner=function(a){this.owner=a};ProjectMembershipData.prototype.getAdmin=function(){return this.admin
};ProjectMembershipData.prototype.setAdmin=function(a){this.admin=a};ProjectMembershipData.prototype.isCanSeeMoney=function(){return this.canSeeMoney
};ProjectMembershipData.prototype.setCanSeeMoney=function(a){this.canSeeMoney=a};ProjectMembershipData.prototype.getPayment=function(){return this.payment
};ProjectMembershipData.prototype.setPayment=function(a){this.payment=a};ProjectMembershipData.prototype.getCustomHash=function(){return this.customHash
};ProjectMembershipData.prototype.setCustomHash=function(a){this.customHash=a};ProjectMembershipData.prototype.getRoleId=function(){return this.roleId
};ProjectMembershipData.prototype.setRoleId=function(a){this.roleId=a};ProjectMembershipData.prototype.getRole=function(){if(this.roleId==null){return null
}return jabox.getProjectRole(this.roleId)};ProjectMembershipData.prototype.setRole=function(a){this.roleId=a.getId()};ProjectMembershipData.prototype.getInvateeFullname=function(){return this.invateeFullname
};ProjectMembershipData.prototype.setInvateeFullname=function(a){this.invateeFullname=a};ProjectMembershipData.prototype.getInvateeMobile=function(){return this.invateeMobile
};ProjectMembershipData.prototype.setInvateeMobile=function(a){this.invateeMobile=a};ProjectMembershipData.prototype.getInvateePhone=function(){return this.invateePhone
};ProjectMembershipData.prototype.setInvateePhone=function(a){this.invateePhone=a};ProjectMembershipData.prototype.getInvateeFax=function(){return this.invateeFax
};ProjectMembershipData.prototype.setInvateeFax=function(a){this.invateeFax=a};ProjectMembershipData.prototype.getInvateeMail=function(){return this.invateeMail
};ProjectMembershipData.prototype.setInvateeMail=function(a){this.invateeMail=a};ProjectMembershipData.prototype.getInvateeFunction=function(){return this.invateeFunction
};ProjectMembershipData.prototype.setInvateeFunction=function(a){this.invateeFunction=a};ProjectMembershipData.prototype.getMembershipFullname=function(){return(this.profileId==null)?this.invateeFullname:this.getProfile().getFullname()
};ProjectMembershipData.prototype.getMembershipMobile=function(){return(this.profileId==null)?this.invateeMobile:this.getProfile().getMobile()
};ProjectMembershipData.prototype.getMembershipPhone=function(){return(this.profileId==null)?this.invateePhone:this.getProfile().getPhone()
};ProjectMembershipData.prototype.getMembershipFax=function(){return(this.profileId==null)?this.invateeFax:this.getProfile().getFax()
};ProjectMembershipData.prototype.getMembershipMail=function(){return(this.profileId==null)?this.invateeMail:this.getProfile().getMail()
};ProjectMembershipData.prototype.getMembershipFunction=function(){return(this.profileId==null)?this.invateeFunction:this.getProfile().getFunction()
};function ProjectGroupData(a){this.id=a.id;this.name=a.name;this.hash=a.hash;this.picture=a.pic;this.members=a.members;this.normalColor=a.norc;
this.backgroundHooverColor=a.bghc}ProjectGroupData.prototype.getId=function(){return this.id};ProjectGroupData.prototype.setId=function(a){this.id=a
};ProjectGroupData.prototype.getName=function(){return this.name};ProjectGroupData.prototype.setName=function(a){this.name=a
};ProjectGroupData.prototype.getHash=function(){return this.hash};ProjectGroupData.prototype.setHash=function(a){this.hash=a
};ProjectGroupData.prototype.getPicture=function(){return this.picture};ProjectGroupData.prototype.setPicture=function(a){this.picture=a
};ProjectGroupData.prototype.getMembers=function(){if(this.members==null){this.members=[]}return this.members};ProjectGroupData.prototype.setMembers=function(a){this.members=a
};ProjectGroupData.prototype.addMember=function(a){this.getMembers()[this.members.length]=a};ProjectGroupData.prototype.getNormalColor=function(){return this.normalColor
};ProjectGroupData.prototype.getBackgroundHooverColor=function(){return this.backgroundHooverColor};function ProjectRoleData(a){this.id=a.id;this.role=a.role;this.hash=a.hash}ProjectRoleData.prototype.getId=function(){return this.id
};ProjectRoleData.prototype.setId=function(a){this.id=a};ProjectRoleData.prototype.getRole=function(){return this.role};ProjectRoleData.prototype.setRole=function(a){this.role=a
};ProjectRoleData.prototype.getHash=function(){return this.hash};ProjectRoleData.prototype.setHash=function(a){this.hash=a
};ProjectRoleData.prototype.getIdHash=function(){return this.id+"_"+this.hash};(function(d){var a=location.href.replace(/#.*/,"");var c=d.localScroll=function(e){d("body").localScroll(e)};c.defaults={duration:1000,axis:"y",event:"click",stop:true,target:window,reset:true};
c.hash=function(f){if(location.hash){f=d.extend({},c.defaults,f);f.hash=false;if(f.reset){var g=f.duration;delete f.duration;
d(f.target).scrollTo(0,f);f.duration=g}b(0,location,f)}};d.fn.localScroll=function(e){e=d.extend({},c.defaults,e);return e.lazy?this.bind(e.event,function(g){var h=d([g.target,g.target.parentNode]).filter(f)[0];
if(h){b(g,h,e)}}):this.find("a,area").filter(f).bind(e.event,function(g){b(g,this,e)}).end().end();function f(){return !!this.href&&!!this.hash&&this.href.replace(this.hash,"")==a&&(!e.filter||d(this).is(e.filter))
}};function b(i,p,g){var q=p.hash.slice(1),o=document.getElementById(q)||document.getElementsByName(q)[0];if(!o){return}if(i){i.preventDefault()
}var n=d(g.target);if(g.lock&&n.is(":animated")||g.onBefore&&g.onBefore.call(g,i,o,n)===false){return}if(g.stop){n.stop(true)
}if(g.hash){var m=o.id==q?"id":"name",l=d("<a> </a>").attr(m,q).css({position:"absolute",top:d(window).scrollTop(),left:d(window).scrollLeft()});
o[m]="";d("body").prepend(l);location=p.hash;l.remove();o[m]=q}n.scrollTo(o,g).trigger("notify.serialScroll",[o])}})(jQuery);(function(c){var a=c.scrollTo=function(d,f,g){c(window).scrollTo(d,f,g)};a.defaults={axis:"xy",duration:parseFloat(c.fn.jquery)>=1.3?0:1};
a.window=function(d){return c(window)._scrollable()};c.fn._scrollable=function(){return this.map(function(){var d=this,f=!d.nodeName||c.inArray(d.nodeName.toLowerCase(),["iframe","#document","html","body"])!=-1;
if(!f){return d}var g=(d.contentWindow||d).document||d.ownerDocument||d;return c.browser.safari||g.compatMode=="BackCompat"?g.body:g.documentElement
})};c.fn.scrollTo=function(f,e,d){if(typeof e=="object"){d=e;e=0}if(typeof d=="function"){d={onAfter:d}}if(f=="max"){f=9000000000
}d=c.extend({},a.defaults,d);e=e||d.speed||d.duration;d.queue=d.queue&&d.axis.length>1;if(d.queue){e/=2}d.offset=b(d.offset);
d.over=b(d.over);return this._scrollable().each(function(){var n=this,l=c(n),m=f,j,k={},h=l.is("html,body");switch(typeof m){case"number":case"string":if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(m)){m=b(m);
break}m=c(m,this);case"object":if(m.is||m.style){j=(m=c(m)).offset()}}c.each(d.axis.split(""),function(q,r){var t=r=="x"?"Left":"Top",s=t.toLowerCase(),v="scroll"+t,p=n[v],g=a.max(n,r);
if(j){k[v]=j[s]+(h?0:p-l.offset()[s]);if(d.margin){k[v]-=parseInt(m.css("margin"+t))||0;k[v]-=parseInt(m.css("border"+t+"Width"))||0
}k[v]+=d.offset[s]||0;if(d.over[s]){k[v]+=m[r=="x"?"width":"height"]()*d.over[s]}}else{var u=m[s];k[v]=u.slice&&u.slice(-1)=="%"?parseFloat(u)/100*g:u
}if(/^\d+$/.test(k[v])){k[v]=k[v]<=0?0:Math.min(k[v],g)}if(!q&&d.queue){if(p!=k[v]){i(d.onAfterFirst)}delete k[v]}});i(d.onAfter);
function i(g){l.animate(k,e,d.easing,g&&function(){g.call(this,f,d)})}}).end()};a.max=function(g,j){var n=j=="x"?"Width":"Height",k="scroll"+n;
if(!c(g).is("html,body")){return g[k]-c(g)[n.toLowerCase()]()}var o="client"+n,f=g.ownerDocument.documentElement,d=g.ownerDocument.body;
return Math.max(f[k],d[k])-Math.min(f[o],d[o])};function b(d){return typeof d=="object"?d:{top:d,left:d}}})(jQuery);(function(d){var c=d.serialScroll=function(a){return d(window).serialScroll(a)};c.defaults={duration:1000,axis:"x",event:"click",start:0,step:1,lock:!0,cycle:!0,constant:!0};
d.fn.serialScroll=function(a){return this.each(function(){var v=d.extend({},c.defaults,a),w=v.event,G=v.step,x=v.lazy,K=v.target?this:document,b=d(v.target||this,K),z=b[0],C=v.items,H=v.start,I=v.interval,E=v.navigation,D;
if(!x){C=L()}if(v.force){J({},H)}d(v.prev||[],K).bind(w,-G,y);d(v.next||[],K).bind(w,G,y);if(!z.ssbound){b.bind("prev.serialScroll",-G,y).bind("next.serialScroll",G,y).bind("goto.serialScroll",J)
}if(I){b.bind("start.serialScroll",function(e){if(!I){A();I=!0;B()}}).bind("stop.serialScroll",function(){A();I=!1})}b.bind("notify.serialScroll",function(e,f){var g=F(f);
if(g>-1){H=g}});z.ssbound=!0;if(v.jump){(x?b:L()).bind(w,function(e){J(e,F(e.target))})}if(E){E=d(E,K).bind(w,function(e){e.data=Math.round(L().length/E.length)*E.index(this);
J(e,this)})}function y(e){e.data+=H;J(e,this)}function J(g,i){if(!isNaN(i)){g.data=i;i=z}var f=g.data,m,e=g.type,h=v.exclude?L().slice(0,-v.exclude):L(),j=h.length,l=h[f],k=v.duration;
if(e){g.preventDefault()}if(I){A();D=setTimeout(B,v.interval)}if(!l){m=f<0?0:j-1;if(H!=m){f=m}else{if(!v.cycle){return}else{f=j-m-1
}}l=h[f]}if(!l||v.lock&&b.is(":animated")||e&&v.onBefore&&v.onBefore(g,l,b,L(),f)===!1){return}if(v.stop){b.queue("fx",[]).stop()
}if(v.constant){k=Math.abs(k/G*(H-f))}b.scrollTo(l,k,v).trigger("notify.serialScroll",[f])}function B(){b.trigger("next.serialScroll")
}function A(){clearTimeout(D)}function L(){return d(C,z)}function F(f){if(!isNaN(f)){return f}var e=L(),g;while((g=e.index(f))==-1&&f!=z){f=f.parentNode
}return g}})}})(jQuery);jQuery.fn.extend({everyTime:function(a,b,c,d){return this.each(function(){jQuery.timer.add(this,a,b,c,d)})},oneTime:function(a,b,c){return this.each(function(){jQuery.timer.add(this,a,b,c,1)
})},stopTime:function(a,b){return this.each(function(){jQuery.timer.remove(this,a,b)})}});jQuery.extend({timer:{global:[],guid:1,dataKey:"jQuery.timer",regex:/^([0-9]+(?:\.[0-9]*)?)\s*(.*s)?$/,powers:{ms:1,cs:10,ds:100,s:1000,das:10000,hs:100000,ks:1000000},timeParse:function(c){if(c==undefined||c==null){return null
}var a=this.regex.exec(jQuery.trim(c.toString()));if(a[2]){var b=parseFloat(a[1]);var d=this.powers[a[2]]||1;return b*d}else{return c
}},add:function(d,b,c,f,h){var a=0;if(jQuery.isFunction(c)){if(!h){h=f}f=c;c=b}b=jQuery.timer.timeParse(b);if(typeof b!="number"||isNaN(b)||b<0){return
}if(typeof h!="number"||isNaN(h)||h<0){h=0}h=h||0;var g=jQuery.data(d,this.dataKey)||jQuery.data(d,this.dataKey,{});if(!g[c]){g[c]={}
}f.timerID=f.timerID||this.guid++;var e=function(){if((++a>h&&h!==0)||f.call(d,a)===false){jQuery.timer.remove(d,c,f)}};e.timerID=f.timerID;
if(!g[c][f.timerID]){g[c][f.timerID]=window.setInterval(e,b)}this.global.push(d)},remove:function(c,b,d){var e=jQuery.data(c,this.dataKey),a;
if(e){if(!b){for(b in e){this.remove(c,b,d)}}else{if(e[b]){if(d){if(d.timerID){window.clearInterval(e[b][d.timerID]);delete e[b][d.timerID]
}}else{for(var d in e[b]){window.clearInterval(e[b][d]);delete e[b][d]}}for(a in e[b]){break}if(!a){a=null;delete e[b]}}}for(a in e){break
}if(!a){jQuery.removeData(c,this.dataKey)}}}}});jQuery(window).bind("unload",function(){jQuery.each(jQuery.timer.global,function(a,b){jQuery.timer.remove(b)
})});jQuery.fn.autoResize=function(a){var b=jQuery.extend({maxHeight:0},a);var c=20;this.filter("textarea").each(function(){var e=jQuery(this).css({resize:"none","overflow-y":"hidden"}),g=e.height(),h=(function(){var i=["height","width","lineHeight","textDecoration","letterSpacing"];
var j={};jQuery.each(i,function(k,l){j[l]=e.css(l)});return e.clone().removeAttr("id").removeAttr("name").removeAttr("width").css({position:"absolute",top:0,left:-9999}).css(j).attr("tabIndex","-1").insertBefore(e)
})(),f=g,d=function(){if(g==0){g=e.height();f=g}h.height(0).val(jQuery(this).val()).scrollTop(10000);h.width(e.width());var j=Math.max(h.scrollTop(),g)+c;
var i=jQuery(this).add(h);if(f===j){return}f=j;if(b.maxHeight>0&&j>=b.maxHeight){jQuery(this).css("overflow-y","");return
}i.height(j)};e.unbind(".doresize").bind("keyup.doresize",d).bind("keydown.doresize",d).bind("change.doresize",d).bind("focus.doresize",d)
});return this};(function(){var g=document,k=window;function b(d){if(typeof d=="string"){d=g.getElementById(d)}return d}var c=function(){var d=g.createElement("div");
return function(o){d.innerHTML=o;var p=d.childNodes[0];d.removeChild(p);return p}}();function e(o,d){return o.className.match(new RegExp("(\\s|^)"+d+"(\\s|$)"))
}function f(o,d){if(!e(o,d)){o.className+=" "+d}}function l(p,d){var o=new RegExp("(\\s|^)"+d+"(\\s|$)");p.className=p.className.replace(o," ")
}if(document.documentElement.getBoundingClientRect){var m=function(d){var s=d.getBoundingClientRect(),w=d.ownerDocument,t=w.body,o=w.documentElement,r=o.clientTop||t.clientTop||0,u=o.clientLeft||t.clientLeft||0,x=1;
if(t.getBoundingClientRect){var q=t.getBoundingClientRect();x=(q.right-q.left)/t.clientWidth}if(x>1){r=0;u=0}var v=s.top/x+(window.pageYOffset||o&&o.scrollTop/x||t.scrollTop/x)-r,p=s.left/x+(window.pageXOffset||o&&o.scrollLeft/x||t.scrollLeft/x)-u;
return{top:v,left:p}}}else{var m=function(d){if(k.jQuery){return jQuery(d).offset()}var p=0,o=0;do{p+=d.offsetTop||0;o+=d.offsetLeft||0
}while(d=d.offsetParent);return{left:o,top:p}}}function a(p){var r,o,q,d;var s=m(p);r=s.left;q=s.top;o=r+p.offsetWidth;d=q+p.offsetHeight;
return{left:r,right:o,top:q,bottom:d}}function i(q){if(!q.pageX&&q.clientX){var p=1;var d=document.body;if(d.getBoundingClientRect){var o=d.getBoundingClientRect();
p=(o.right-o.left)/d.clientWidth}return{x:q.clientX/p+g.body.scrollLeft+g.documentElement.scrollLeft,y:q.clientY/p+g.body.scrollTop+g.documentElement.scrollTop}
}return{x:q.pageX,y:q.pageY}}var h=function(){var d=0;return function(){return"DoboxFileUpload"+d++}}();function n(d){return d.replace(/.*(\/|\\)/,"")
}function j(d){return(/[.]/.exec(d))?/[^.]+$/.exec(d.toLowerCase()):""}Ajax_upload=AjaxUpload=function(p,d){if(p.jquery){p=p[0]
}else{if(typeof p=="string"&&/^#.*/.test(p)){p=p.slice(1)}}p=b(p);this._input=null;this._button=p;this._disabled=false;this._started=false;
this._completed=false;this._errorUploading=false;this._justClicked=false;this._parentDialog=g.body;this._canceled=true;this._loaderDiv=null;
this._contentDiv=null;this._prorgessHash=null;if(window.jQuery&&jQuery.ui&&jQuery.ui.dialog){var q=jQuery(this._button).parents(".ui-dialog");
if(q.length){this._parentDialog=q[0]}}this._settings={action:"",name:"userfile",data:{},autoSubmit:true,responseType:false,onChange:function(r,s){},onSubmit:function(r,s){},onNotSuccess:function(){},onComplete:function(s,r){},mode:AjaxUploadMode.UPLOAD_FILE};
for(var o in d){this._settings[o]=d[o]}this._createInput();this._rerouteClicks()};AjaxUpload.prototype={setData:function(d){this._settings.data=d
},getMode:function(){return this._settings.mode},setLoaderDiv:function(d){this._loaderDiv=d},getLoaderDiv:function(){return this._loaderDiv
},setContentDiv:function(d){this._contentDiv=d},getContentDiv:function(){return this._contentDiv},getQid:function(){return this._settings.data.qid
},getProgressHash:function(){return this._prorgessHash},setProgressHash:function(d){this._prorgessHash=d},getButton:function(){return this._button
},disable:function(){this._disabled=true},enable:function(){this._disabled=false},destroy:function(){this.disposeInput()},_createInput:function(){var o=this;
var d=jQuery('<input type="file" name="'+this._settings.name+'"/>');var q={};if(jQuery.browser.opera){q={position:"absolute",padding:0,width:"132px",height:"21px",fontSize:"14px",opacity:0,cursor:"pointer",display:"block",zIndex:2147483583}
}else{if(jQuery.browser.msie&&jQuery.browser.version.substring(0,2)=="8."){q={position:"absolute",margin:"-5px 0 0 -75px",padding:0,width:"132px",height:"21px",fontSize:"14px",opacity:0,cursor:"pointer",display:"none",zIndex:2147483583}
}else{q={position:"absolute",margin:"-5px 0 0 -22px",padding:0,width:"132px",height:"21px",fontSize:"14px",opacity:0,cursor:"pointer",display:"none",zIndex:2147483583}
}}d=d.get(0);for(var p in q){d.style[p]=q[p]}if(!(d.style.opacity==="0")){d.style.filter="alpha(opacity=0)"}this._parentDialog.appendChild(d);
this._bindInputEvents(this,d);this._input=d},_bindInputEvents:function(p,o){var d=this;jQuery(o).bind("change",function(){var q=n(o.value);
if(p._settings.onChange.call(p,q,j(q))==false){return}if(p._settings.autoSubmit){p.submit()}});jQuery(o).bind("click",function(){p.justClicked=true;
setTimeout(function(){p.justClicked=false},3000);if(d.getMode()==AjaxUploadMode.RELATED_CONTENT_DISC_POST){}})},_rerouteClicks:function(){var o=this;
var p,d={top:0,left:0},q=false;jQuery(o._button).bind("mouseover",function(r){if(!o._input||q){return}q=true;p=a(o._button);
if(o._parentDialog!=g.body){d=m(o._parentDialog)}});jQuery(document).bind("mousemove.fupl"+o.getQid(),function(s){var r=o._input;
if(!r||!q){return}if(o._disabled){l(o._button,"hover");r.style.display="none";return}var t=i(s);if((t.x>=p.left)&&(t.x<=p.right)&&(t.y>=p.top)&&(t.y<=p.bottom)){r.style.top=t.y-d.top+"px";
r.style.left=t.x-d.left+"px";r.style.display="block";f(o._button,"hover")}else{q=false;if(!o.justClicked){r.style.display="none"
}l(o._button,"hover")}})},_releaseButtonEvents:function(){var d=this;jQuery(d._button).unbind("mouseover");jQuery(document).unbind("mousemove.fupl"+d._settings.data.qid)
},_createIframe:function(){var o=h();var d=c('<iframe src="javascript:false;" name="'+o+'" />');d.id=o;d.style.display="none";
g.body.appendChild(d);return d},submit:function(){var d=this,q=this._settings;if(d._input.value===""){return false}var o=n(d._input.value);
d._canceled=false;d._started=true;d._errorUploading=false;if(!(q.onSubmit.call(this,o,j(o))==false)){this.lastIframe=this._createIframe();
var p=this.lastIframe;var s=this._createForm(p);s.appendChild(this._input);s.submit();g.body.removeChild(s);s=null;this._input=null;
this._createInput();var r=false;jQuery(p).bind("load",function(v){if(p.src=="javascript:'%3Chtml%3E%3C/html%3E';"||p.src=="javascript:'<html></html>';"){if(r){setTimeout(function(){g.body.removeChild(p)
},0)}return}var u=p.contentDocument?p.contentDocument:frames[p.id].document;if(u.readyState&&u.readyState!="complete"){return
}if(u.body&&u.body.innerHTML=="false"){return}var t;if(u.XMLDocument){t=u.XMLDocument}else{if(u.body){t=u.body.innerHTML;
if(q.responseType&&q.responseType.toLowerCase()=="json"){if(u.body.firstChild&&u.body.firstChild.nodeName.toUpperCase()=="PRE"){t=u.body.firstChild.firstChild.nodeValue
}if(t){t=window["eval"]("("+t+")")}else{t={}}}}else{var t=u}}d._completed=true;q.onComplete.call(d,o,t);r=true;p.src="javascript:'<html></html>';"
})}else{g.body.removeChild(this._input);this._input=null;this._createInput()}},_createForm:function(p){var o=this._settings;
var q=c('<form method="post" name="Form_'+p.name+'" enctype="multipart/form-data"></form>');q.style.display="none";q.action=o.action;
q.target=p.name;g.body.appendChild(q);for(var r in o.data){var d=g.createElement("input");d.type="hidden";d.name=r;d.value=o.data[r];
q.appendChild(d)}return q},disposeInput:function(){if(this._input){jQuery(this._input).remove();this._input=null}},setInput:function(d){d.name=this._settings.name;
jQuery(d).unbind("change");jQuery(d).unbind("click");this._bindInputEvents(this,d);this._input=d;this._rerouteClicks()},cancelUpload:function(){this._canceled=true;
this.lastIframe.src="blank.html"},changeButton:function(d){if(d==null){this._button=null}else{if(d.jquery){d=d[0]}else{if(typeof d=="string"&&/^#.*/.test(d)){d=d.slice(1)
}}}this._button=b(d);this._rerouteClicks()},setUploadedPercentage:function(){var d=this;if(d._started==false||d._canceled==true||d._errorUploading==true){setUploadPerctentageLoader(d.getLoaderDiv().loaderDiv,0);
jQuery(d.getLoaderDiv()).stopTime("perctCheck")}else{if(d._completed==true){jQuery(d.getLoaderDiv()).stopTime("perctCheck");
setUploadPerctentageLoader(d.getLoaderDiv().loaderDiv,100)}else{jQuery.ajax({url:"/fileupload",data:({h:d.getProgressHash(),m:"p",qid:d.getQid()}),type:"GET",dataType:"xml",error:function(){if(d._canceled||d._completed){return
}jQuery(d.getLoaderDiv()).oneTime("1s","perctCheck",function(){d.setUploadedPercentage()})},success:function(o){if(d._canceled||d._completed){return
}if(jQuery(o).find("status").text()=="1"){var p=parseInt(jQuery(o).find("message").text());setUploadPerctentageLoader(d.getLoaderDiv().loaderDiv,p)
}jQuery(d.getLoaderDiv()).oneTime("1s","perctCheck",function(){d.setUploadedPercentage()})}})}}},commonOnError:function(p){var o=this;
var d=o.getLoaderDiv();jQuery(d.loaderDiv).hide();jQuery(d.errorSpan).attr("innerHTML",p).show();jQuery(d.retrySpan).unbind().click(function(){alert("Have to resubmit form. Not sure if even possible.")
});jQuery(d.cancelSpan).unbind().attr("innerHTML",doTexts.getText("common.remove")).click(function(){o.removeContentDiv()
})},commonOnComplete:function(q){var p=this;var o=p.getLoaderDiv();if(jQuery(q).find("status").text()=="1"){jQuery(o.filesizeSpan).attr("innerHTML",jQuery(q).find("fsize").text());
jQuery(o.inputEl).val(jQuery(q).find("fid").text());if(jQuery(q).find("pTag").length>0){jQuery(o.previewDiv).empty().append(jQuery(q).find("pTag").text())
}jQuery(o.cancelSpan).unbind().attr("innerHTML",doTexts.getText("common.remove")).click(function(){var s=jQuery(q).find("fid").text().split("_");
deleteUploadedPlainFile(s[1],s[0]);p._settings.onNotSuccess.call(p);p.removeContentDiv()});if(p.getMode()==AjaxUploadMode.RELATED_CONTENT_DISC_POST){myViewDiscussionSetCommonLiveChatMouseEvents(o.cancelSpan)
}jQuery(o).stopTime("perctCheck");jQuery(p.getLoaderDiv().loaderDiv).hide().empty()}else{var r=jQuery(q).find("message").text();
jQuery(o.inputEl).val("");var d=doTexts.getText("my.uploadFile.fileUploadUnknownError");if(r=="-3"){alert(doTexts.getText("my.uploadFile.fileTooBigError"))
}else{if(r=="-4"){alert(doTexts.getText("my.uploadFile.notAllowedFiletypeError"))}}p._errorUploading=true;jQuery(o).stopTime("perctCheck");
p.commonOnError(d)}},commonOnSubmit:function(q){var p=this;p._releaseButtonEvents();var o=q.getExtenssion();var d=p.getLoaderDiv();
jQuery(d.filenameSpan).attr("innerHTML",q);jQuery(d.filesizeSpan).attr("innerHTML","");getFirstChild(jQuery(d.previewDiv)).attr("innerHTML",o.toUpperCase()).css("background-color",extenssionToBackgroundColor(o));
jQuery(d.cancelSpan).click(function(){p.cancelUpload();p._settings.onNotSuccess.call(p);p.removeContentDiv()});var r=jQuery(d.loaderDiv).next().getFirstChild().find("span").unbind();
r.click(function(){uploadFileOnAddDescriptionSpanClick(this)});if(p.getMode()==AjaxUploadMode.RELATED_CONTENT_DISC_POST){myViewDiscussionSetCommonLiveChatMouseEvents(d.cancelSpan);
myViewDiscussionSetCommonLiveChatMouseEvents(r);myViewDiscussionSetCommonLiveChatFocusEvents(r.parent().next().find("textarea"))
}jQuery(d.loaderDiv).show();jQuery(d.errorSpan).hide();jQuery(d.retrySpan).hide();jQuery(d).oneTime("1s","perctCheck",function(){p.setUploadedPercentage()
})},removeContentDiv:function(){var d=this;if(d.getMode()==AjaxUploadMode.UPLOAD_FILE){jQuery(d.getContentDiv()).remove()
}else{if(d.getMode()==AjaxUploadMode.RELATED_CONTENT_DISC_POST){jQuery(d.getContentDiv()).closest("[id^=postCommentDiv_]").get(0).publishButton.focus()
}jQuery(d.getContentDiv()).slideUp(function(){jQuery(this).remove()})}}};AjaxUpload2=function(q,p,d){this._canceled=true;
this._loaderDiv=null;this._contentDiv=null;this._button=jQuery(q).is("input:button")?jQuery(q).get(0):jQuery(q).next().get(0);
this._settings={data:{},onSuccess:function(){},onNotSuccess:function(){},onRemoveFile:function(){},mode:AjaxUploadMode.UPLOAD_FILE};
for(var o in d){if(o=="mode"){this._settings.mode=d[o]}else{if(o=="onSuccess"){this._settings.onSuccess=d[o]}else{if(o=="onNotSuccess"){this._settings.onNotSuccess=d[o]
}else{if(o=="onRemoveFile"){this._settings.onRemoveFile=d[o]}else{this._settings.data[o]=d[o]}}}}}this._xhr=new XMLHttpRequest();
this._upload=this._xhr.upload;this._file=p};AjaxUpload2.prototype={setData:function(d){this._settings.data=d},getMode:function(){return this._settings.mode
},setLoaderDiv:function(d){this._loaderDiv=d},getLoaderDiv:function(){return this._loaderDiv},setContentDiv:function(d){this._contentDiv=d
},getContentDiv:function(){return this._contentDiv},getButton:function(){return this._button},getQid:function(){return this._settings.data.qid
},getUploadHash:function(){return this._settings.data.uploadHash},getUploadMode:function(){return this._settings.data.m},createUploadActionString:function(){return"/fileupload/h="+this.getUploadHash()+"/m="+this.getUploadMode()
},destroy:function(){},commonOnComplete:function(r){var q=this;var p=q.getLoaderDiv();if(q.getMode()!=AjaxUploadMode.MY_PROFILE){if(jQuery(r).find("status").text()=="1"){q._settings.onSuccess.call(q);
jQuery(p.inputEl).val(jQuery(r).find("fid").text());if(jQuery(r).find("pTag").length>0){jQuery(p.previewDiv).empty().append(jQuery(r).find("pTag").text())
}jQuery(p.cancelSpan).unbind().attr("innerHTML",doTexts.getText("common.remove")).click(function(){var v=jQuery(r).find("fid").text().split("_");
q._settings.onRemoveFile.call(q);deleteUploadedPlainFile(v[1],v[0]);q.removeContentDiv()});if(q.getMode()==AjaxUploadMode.RELATED_CONTENT_DISC_POST){myViewDiscussionSetCommonLiveChatMouseEvents(p.cancelSpan)
}jQuery(q.getLoaderDiv().loaderDiv).hide().empty()}else{var t=jQuery(r).find("message").text();jQuery(p.inputEl).val("");
var o=doTexts.getText("my.uploadFile.fileUploadUnknownError");if(t=="-3"){alert(doTexts.getText("my.uploadFile.fileTooBigError"))
}else{if(t=="-4"){alert(doTexts.getText("my.uploadFile.notAllowedFiletypeError"))}}q.commonOnError(o)}}else{if(jQuery(r).find("status").text()=="1"){var d=jQuery(q.getButton()).closest(".profImgClass").find(".filePreviewMyProfileDiv:first");
var s=jQuery(q.getButton()).parent().parent().find("[name="+(q.getQid().startsWith("l")?"libImageId":"imageId")+"]");if(!isEmptyString(s.val())){var u=s.val().split("_");
deleteUploadedPlainFile(u[1],u[0])}s.val(jQuery(r).find("fid").text());if(jQuery(r).find("pTag").length>0){d.attr("innerHTML",jQuery(r).find("pTag").text())
}jQuery(q.getButton()).nextAll("#remPicDiv,#remLibPicDiv").show()}else{if(jQuery(r).find("message").text()=="-4"){createApplicationMessage("error",doTexts.getText("my.uploadFile.notAllowedFiletypeError"))
}else{if(jQuery(r).find("message").text()=="-3"){createApplicationMessage("error",doTexts.getText("my.uploadFile.fileTooBigError"))
}else{createApplicationMessage("error",doTexts.getText("my.uploadFile.fileUploadUnknownError"))}}}jQuery(q.getLoaderDiv()).hide();
jQuery(q.getLoaderDiv()).prev().show()}},commonOnError:function(p){var o=this;var d=o.getLoaderDiv();o._settings.onNotSuccess.call(o);
jQuery(d.loaderDiv).hide();jQuery(d.retrySpan).show();jQuery(d.errorSpan).attr("innerHTML",p).show();jQuery(d.retrySpan).unbind().click(function(){o.startUpload()
});jQuery(d.cancelSpan).unbind().attr("innerHTML",doTexts.getText("common.remove")).click(function(){o.removeContentDiv()
})},startUpload:function(){var p=this;var o=p.getLoaderDiv();var d=p._file.name.getExtenssion();if(p.getMode()!=AjaxUploadMode.MY_PROFILE){jQuery(o.filenameSpan).attr("innerHTML",p._file.name);
jQuery(o.filesizeSpan).attr("innerHTML",longToFilesizeString(p._file.size));jQuery(o.previewDiv).getFirstChild().attr("innerHTML",d.toUpperCase()).css("background-color",extenssionToBackgroundColor(d));
jQuery(o.cancelSpan).unbind().click(function(){p._xhr.abort();p.removeContentDiv()});var r=jQuery(o.loaderDiv).next().getFirstChild().find("span").unbind();
r.click(function(){uploadFileOnAddDescriptionSpanClick(this)});if(p.getMode()==AjaxUploadMode.RELATED_CONTENT_DISC_POST){myViewDiscussionSetCommonLiveChatMouseEvents(o.cancelSpan);
myViewDiscussionSetCommonLiveChatMouseEvents(r);myViewDiscussionSetCommonLiveChatFocusEvents(r.parent().next().find("textarea"))
}}p._upload.addEventListener("progress",function(u){if(u.lengthComputable){var s=u.position||u.loaded;var t=u.totalSize||u.total;
setUploadPerctentageLoader(p.getLoaderDiv().loaderDiv,(s/t)*100)}},false);p._xhr.addEventListener("load",function(s){if(this.status!=200){p.commonOnError(doTexts.getText("my.uploadFile.fileUploadUnknownError"))
}else{p.commonOnComplete(this.responseXML)}},false);p._xhr.addEventListener("error",function(s){if(this.status!=0){p.commonOnError(doTexts.getText("my.uploadFile.fileUploadUnknownError"))
}},false);jQuery(o.loaderDiv).show();if(p.getMode()!=AjaxUploadMode.MY_PROFILE){jQuery(o.errorSpan).hide();jQuery(o.retrySpan).hide()
}var q=new FormData();q.append("m",p.getUploadMode());q.append("h",p.getUploadHash());q.append("qid",p.getQid());q.append("ff",p._file);
p._xhr.open("POST",p.createUploadActionString());p._xhr.send(q)},removeContentDiv:function(){var d=this;if(d.getMode()==AjaxUploadMode.UPLOAD_FILE){jQuery(d.getContentDiv()).remove()
}else{if(d.getMode()==AjaxUploadMode.RELATED_CONTENT_DISC_POST){jQuery(d.getContentDiv()).closest("[id^=postCommentDiv_]").get(0).publishButton.focus()
}jQuery(d.getContentDiv()).slideUp(function(){jQuery(this).remove()})}}}})();var AjaxUploadMode={UPLOAD_FILE:"uf",RELATED_CONTENT:"rc",MY_PROFILE:"mp",RELATED_CONTENT_DISC_POST:"rcdp"};
function fillAlreadyUploadedFileDivWithFileData(d,c,e){d=jQuery(d).get(0);d.uploadedFileId=c.getId();jQuery(d.filenameSpan).attr("innerHTML",c.getFilename());
jQuery(d.filesizeSpan).attr("innerHTML",c.getSize());jQuery(d.inputEl).val(c.getOptionId());if(isEmptyString(c.getPreviewSource())){jQuery(d.previewDiv).find(".filePreviewExtenssionDiv").attr("innerHTML",c.getExtenssion())
}else{jQuery(d.previewDiv).empty().append(jQuery('<a href=""><img border="0" alt="Image_'+c.getId()+'" src="'+c.getPreviewSource()+'"/></a>'))
}jQuery(d.cancelSpan).unbind().attr("innerHTML",doTexts.getText("common.remove"));jQuery(d.loaderDiv).empty().addClass("descriptionText").attr("innerHTML",c.getUploadedBy());
var b=jQuery(d.loaderDiv).next();if(isEmptyString(c.getDescription())){var a=b.getFirstChild().find("span").unbind();a.click(function(){uploadFileOnAddDescriptionSpanClick(this)
});if(e=="dp"){myViewDiscussionSetCommonLiveChatMouseEvents(a);myViewDiscussionSetCommonLiveChatFocusEvents(a.parent().next().find("textarea"))
}}else{b.getFirstChild().remove();b.getFirstChild().attr("innerHTML",c.getDescription()).show()}jQuery(d.retrySpan).remove();
jQuery(d.cancelSpan).click(function(){alreadyUploadedFileOnRemoveSpanClick(this,e)})}function alreadyUploadedFileOnRemoveSpanClick(b,g){var c=jQuery(b).closest(".fileUploadingDiv");
var a=c.get(0).inputEl.value.getRepresentedBasename();var f=c.parent().next().find("select");c.slideUp(function(){jQuery(this).remove()
});jQuery(f).find('option[value="'+a+'"]').each(function(){if(jQuery(this).parent().is(":visible")==false){jQuery(this).parent().show()
}jQuery(this).show()});if(g=="d"){myEditDiscussionRemoveFileFromMemHistory(c.closest(".contentChunksContainer"),c)}else{if(g=="t"){myProjectTasklistsRemoveFileFromMemHistory(c.closest("[id^=addTask_],[id^=editTask_]"),c)
}else{if(g=="dp"){var e=jQuery(b).closest(".postCommentDiv,[id^=editDiv_]");var d=e.attr("id").startsWith("editDiv_");myViewDiscussionRemoveFileFromMemHistory(e,c);
if(!d){e.get(0).publishButton.focus()}}}}}function uploadFileOnAddDescriptionSpanClick(a){var b=jQuery(a).parent();b.slideUp(function(){jQuery(this).remove()
});b.next().slideDown(function(){jQuery(this).find("textarea").autoResize().focus()})}function uploadFileFillUploadinDivInnerStructure(c){c=jQuery(c);
var e=c.children(".filePreviewMediumDiv");var a=e.next();var g=getFirstChild(getFirstChild(a).find(".title"));var j=g.next();
var b=g.parent().next().find("[id^=fucan_]:first");var h=b.parent().find("[id^=furtr_]:first");var d=h.prev();var i=b.parent().next();
var f=getFirstChild(a).next();c=c.get(0);c.previewDiv=e.get(0);c.filenameSpan=g.get(0);c.filesizeSpan=j.get(0);c.cancelSpan=b.get(0);
c.retrySpan=h.get(0);c.errorSpan=d.get(0);c.inputEl=i.get(0);c.loaderDiv=f.get(0)}function setUploadPerctentageLoader(d,c){var a=jQuery(d);
if(!a.hasClass("fileLoaderOuterDiv")){a=getFirstChild(d)}if(a.length>0&&a.hasClass("fileLoaderOuterDiv")){var b=parseInt(a.css("width"));
getFirstChild(a).css("width",(b*c/100)+"px")}}function addFileToContentOnChangeTypeSpanClick(c){var b=jQuery(c).parent().parent().getFirstChild().get(0);
changeSpansInnerHtml(b,c,true);var d=jQuery(c).closest(".title").next();var a=d.nextAll(":last");if(c.lastMode!=null&&c.lastMode!="p"){a.hide();
d.show();c.lastMode="p"}else{d.hide();a.show();c.lastMode="n"}}function replaceSelectFileOptions(a,b){a.each(function(){var f=[];
jQuery(this).find("option").each(function(){if(!isEmptyString(this.value)&&jQuery(this).css("display")=="none"){f[f.length]=this.value
}});this.innerHTML=b;for(var e=0;e<f.length;e++){var d=jQuery(this).find("option[value="+f[e]+"]:first");if(d.parent().is("select")){d.hide()
}else{var c=0;d.parent().children().each(function(){if(jQuery(this).css("display")!="none"){c++}if(c>=2){return false}});
if(c>=2){d.hide()}else{d.parent().hide()}}}})}function commonInitializeStuffForXhr2Upload(a,b){var c=jQuery('<input class="multipleUploadInput" type="file" '+(b?'multiple="true"':"")+"/>");
a.parent().before(c);a.click(function(d){jQuery(this).closest(".fuCont,.addingToContentFileTypeChoosing,.uploadNewVersionDiv,.profImgClass").find(".multipleUploadInput:first").get(0).click()
});return c}function commonShowFilesFromHistory(b,h,a){var e={};jQuery(b).children().each(function(){if(this.uploadedFileId!=null){e[this.uploadedFileId]=this
}});var d=null;for(var f=0;f<h.length;f++){var c=h[f];if(c.uploadedFileId!=null){a[c.uploadedFileId+""]=true;if(e[c.uploadedFileId]!=null){delete e[c.uploadedFileId]
}else{}}else{}if(d==null){jQuery(b).prepend(c)}else{jQuery(d).after(c)}d=c}for(var g in e){jQuery(e[g]).detach()}};function libOnFollowContributorButtonClick(c){var b=!jQuery(c).hasClass("fwd");var a={};a.pid=lastSelectedProfile;a.fid=c.id.getRepresentedId();
a.f=b;jQuery.ajax({url:"/ajax/lib/follow",data:(a),type:"GET",dataType:"xml",error:function(){createApplicationMessage("error",doTexts.getText("lib.errorFollowingContributorMessage"))
},success:function(e){var d=jQuery(e).find("status").text();if(d=="1"){if(b){jQuery(c).addClass("fwd").attr("innerHTML",doTexts.getText("lib.followingContributorButtonText"))
}else{jQuery(c).removeClass("fwd").attr("innerHTML",doTexts.getText("lib.followContributorButtonText"))}}else{createApplicationMessage("error",jQuery(e).find("message").text())
}}})}function libOnLikeModelLinkClick(b){var c=!jQuery(b).hasClass("lk");var a={};a.pid=lastSelectedProfile;a.mid=jQuery(b).closest("[id^=mdiv_]").getRepresentedId();
a.l=c;jQuery.ajax({url:"/ajax/lib/likemodel",data:(a),type:"GET",dataType:"xml",error:function(){createApplicationMessage("error",doTexts.getText(c?"lib.errorLikingModelMessage":"lib.errorUnlikingModelMessage"))
},success:function(e){var d=jQuery(e).find("status").text();if(d=="1"){if(c){jQuery(b).addClass("lk").attr("innerHTML",doTexts.getText("lib.unlikeModelLinkText"))
}else{jQuery(b).removeClass("lk").attr("innerHTML",doTexts.getText("lib.likeModelLinkText"))}}else{createApplicationMessage("error",jQuery(e).find("message").text())
}}})}function libOnSaveModelLinkClick(b){var c=!jQuery(b).hasClass("sv");var a={};a.pid=lastSelectedProfile;a.mid=jQuery(b).closest("[id^=mdiv_]").getRepresentedId();
a.s=c;jQuery.ajax({url:"/ajax/lib/savemodel",data:(a),type:"GET",dataType:"xml",error:function(){createApplicationMessage("error",doTexts.getText(like?"lib.errorSavingModelMessage":"lib.errorUnsavingModelMessage"))
},success:function(e){var d=jQuery(e).find("status").text();if(d=="1"){if(c){jQuery(b).addClass("sv").attr("innerHTML",doTexts.getText("lib.unsaveModelLinkText"))
}else{jQuery(b).removeClass("sv").attr("innerHTML",doTexts.getText("lib.saveModelLinkText"))}}else{createApplicationMessage("error",jQuery(e).find("message").text())
}}})}function libOnReportModelLinkClick(b){var a={};a.pid=lastSelectedProfile;a.mid=jQuery(b).closest("[id^=mdiv_]").getRepresentedId();
a.r="";jQuery.ajax({url:"/ajax/lib/reportmodel",data:(a),type:"POST",dataType:"xml",error:function(){createApplicationMessage("error",doTexts.getText("lib.errorReportingModelMessage"))
},success:function(d){var c=jQuery(d).find("status").text();if(c=="1"){createApplicationMessage("info",doTexts.getText("lib.modelHasBeenSuccessfulyReported"))
}else{createApplicationMessage("error",jQuery(d).find("message").text())}}})}function libOnShowMoreContributorsClick(a){var c=[];
jQuery(a).closest("#contributorsBoard").children("[id^=cont_]").each(function(){c[c.length]=this.id.getRepresentedId()});
HA.setShow(libCalculateNewShownNumber(c.length));HA.setUrl();var b=HA.getAjaxActionParameters();b.ign=c;jQuery.ajax({url:boardLoadAction,data:(b),type:"POST",dataType:"xml",error:function(){createApplicationMessage("error",doTexts.getText("lib.errorLoadingMoreContributors"))
},success:function(e){var d=jQuery(e).find("status").text();if(d=="1"){var f=jQuery(a).closest(".lib_morecs");if(jQuery(e).find("mc").text()!="1"){f.hide()
}f.before(jQuery(jQuery(e).find("bhtml").text()))}else{createApplicationMessage("error",jQuery(e).find("message").text())
}}})}function libOnShowMoreModelsClick(sender){var alreadyShown=[];jQuery(sender).closest(".lib_pms,#projectModels").children("[id^=mdiv_]").each(function(){alreadyShown[alreadyShown.length]=this.id.getRepresentedId()
});HA.setShow(libCalculateNewShownNumber(alreadyShown.length));HA.setUrl();var data=HA.getAjaxActionParameters();data.ign=alreadyShown;
jQuery.ajax({url:boardLoadAction,data:(data),type:"POST",dataType:"xml",error:function(){createApplicationMessage("error",doTexts.getText("lib.errorLoadingMoreModels"))
},success:function(xml){var status=jQuery(xml).find("status").text();if(status=="1"){var senderPar=jQuery(sender).closest(".lib_morepms");
if(jQuery(xml).find("mc").text()!="1"){senderPar.hide()}senderPar.before(jQuery(jQuery(xml).find("bhtml").text()));eval(jQuery(xml).find("jlb").text())
}else{createApplicationMessage("error",jQuery(xml).find("message").text())}}})}function libCalculateNewShownNumber(a){return a+Math.max(PROJECT_MODELS_TO_LOAD,Math.min(Math.round(0.75*a),100))
}function libOnModelsSortSelectChange(a){HA.setSort(a.value);libOnModelsBoardFilterChange()}function libOnContributorsSortSelectChange(a){HA.setSort(a.value);
libOnContributorsBoardFilterChange()}function libOnModelDivMouseOver(a){jQuery(a).addClass("hover").find(".commentsDiv").css("visibility","visible")
}function libOnModelDivMouseLeave(a){jQuery(a).removeClass("hover");commonHideSummedComments(jQuery(a))}function libOnContributorDivMouseOver(a){jQuery(a).addClass("hover")
}function libOnContributorDivMouseLeave(a){jQuery(a).removeClass("hover")}function libOnGlobalProfileSelectChange(sender){var selectedValue=jQuery(sender).attr("id");
if(!isEmptyString(selectedValue)){HA.setSelectedProfile(selectedValue.getRepresentedBasename())}else{HA.setSelectedProfile(null)
}onProfileSpanClickCommon(sender);jQuery.ajax({url:boardLoadAction,type:"POST",data:(HA.getAjaxActionParameters()),dataType:"xml",error:function(){createApplicationMessage("error",doTexts.getText("lib.errorLoadingModels"));
inverseOnProfileSpanClickCommon(selectedValue)},success:function(xml){var status=jQuery(xml).find("status").text();if(status=="1"){if(jsAction=="pms"){jQuery("#projectModels").empty().attr("innerHTML",jQuery(xml).find("bhtml").text());
jalib.clearModels();eval(jQuery(xml).find("jlb").text())}else{if(jsAction=="cs"){jQuery("#contributorsBoard").empty().attr("innerHTML",jQuery(xml).find("bhtml").text())
}else{if(jsAction=="c"){jQuery("#contributorContent").empty().attr("innerHTML",jQuery(xml).find("bhtml").text());jalib.clearModels();
eval(jQuery(xml).find("jlb").text());var cnt=jQuery(xml).find("cnts:first");if(cnt.length>0){var createdCount=jQuery("#createdCount").attr("innerHTML",cnt.find("cr").attr("cnt"));
var searchInside=createdCount.closest(".lib_rightColumn_contributor");searchInside.find("#likedCount").attr("innerHTML",cnt.find("lk").attr("cnt"));
searchInside.find("#savedCount").attr("innerHTML",cnt.find("sv").attr("cnt"));searchInside.find("#commentedCount").attr("innerHTML",cnt.find("cm").attr("cnt"));
searchInside.find("#followingCount").attr("innerHTML",cnt.find("fl").attr("cnt"));searchInside.find("#followedCount").attr("innerHTML",cnt.find("fw").attr("cnt"));
searchInside.find("#inspiredCount").attr("innerHTML",cnt.find("in").attr("cnt"))}if(HA.getAction()=="comments"||isEmptyString(HA.getAction())){applyMembershipChangeToMembershipSelectRow(jQuery("#postAsDiv"),HA.getSelectedProfileString())
}}}}}else{createApplicationMessage("error",jQuery(xml).find("message").text());inverseOnProfileSpanClickCommon(selectedValue)
}}})}function libOnContributorCreatedLinkClick(a){HA.setAction("");HA.removeModel();libOnContributorBoardModeChange();return false
}function libOnContributorLikedLinkClick(a){HA.setAction("liked");HA.removeModel();libOnContributorBoardModeChange();return false
}function libOnContributorFollowersLinkClick(a){HA.setAction("followers");HA.removeFilters();HA.removeModel();libOnContributorBoardModeChange();
return false}function libOnContributorFollowingLinkClick(a){HA.setAction("following");HA.removeFilters();HA.removeModel();
libOnContributorBoardModeChange();return false}function libOnContributorInspiredLinkClick(a){HA.setAction("inspired");HA.removeFilters();
HA.removeModel();libOnContributorBoardModeChange();return false}function libOnContributorSavedLinkClick(a){HA.setAction("saved");
HA.removeFilters();HA.removeModel();libOnContributorBoardModeChange();return false}function libOnContributorCommentedLinkClick(a){HA.setAction("commented");
HA.removeFilters();HA.removeModel();libOnContributorBoardModeChange();return false}function libOnProjectModelDeleteLinkClick(d){var a=jQuery(d).closest("[id^=mdiv_]");
var c=jalib.getModel(a.getRepresentedId());if(!confirm(doTexts.getText("lib.deleteProjectModelWarning").replace(/#pp#name#/g,c.getName()))){return
}if(HA.hasModel()){}else{a.addSmallLoader()}var b=typeof selectedContributorId!="undefined"&&selectedContributorId==c.getAuthorId();
jQuery.ajax({url:"/ajax/lib/managemodel/m/del/mid/"+c.getId()+"/h/"+c.getHash()+"/lc/"+(b?"1":"0"),type:"GET",dataType:"xml",error:function(){createApplicationMessage("error",doTexts.getText("lib.errorDeletingProjectModel").replace(/#pp#name#/g,c.getName()));
if(!HA.hasModel()){a.removeLoaders()}},success:function(f){var e=jQuery(f).find("status").text();if(e=="1"){if(HA.hasModel()){}else{jQuery(d).closest("[id^=mdiv_]").fadeOutAndRemove();
if(b){libChangeNumberInElement("#createdCount",false);if(jQuery(f).find("hc").text()=="1"){libChangeNumberInElement("#commentedCount",false)
}}}}else{createApplicationMessage("error",jQuery(f).find("message").text());if(!HA.hasModel()){a.removeLoaders()}}}})}function libChangeNumberInElement(a,d){var c=jQuery(a);
var b=parseInt(c.text());if(d){b++}else{b--}c.text(b)}function libOnContributorModelClick(a){HA.setModel(jQuery(a).closest("[id^=mdiv_]").getRepresentedId());
libOnContributorBoardModeChange();return false}function libOnProjectModelSubnavigationClick(sender){if(sender.id=="modelSubNavComments"){if(HA.getAction()=="comments"){return
}HA.setAction("comments")}else{if(sender.id=="modelSubNavInspirations"){if(HA.getAction()=="inspirations"){return}HA.setAction("inspirations")
}else{if(sender.id=="modelSubNavRoots"){if(HA.getAction()=="roots"){return}HA.setAction("roots")}else{return}}}HA.setUrl();
var data=HA.getAjaxActionParameters();data["do"]="1";var loadDiv=jQuery(sender).closest("#contributorContent").prev();loadDiv.setLoaderRequest(jQuery.ajax({url:boardLoadAction,type:"POST",data:(data),dataType:"xml",loaderElement:loadDiv,error:function(){if(this.loaderElement.isLoaderAborted()){return
}createApplicationMessage("error",doTexts.getText("lib.errorLoadingModels"));this.loaderElement.removeLoaders()},success:function(xml){if(this.loaderElement.isLoaderAborted()){return
}var status=jQuery(xml).find("status").text();if(status=="1"){jQuery(sender).siblings().removeClass("selected");jQuery(sender).addClass("selected");
jQuery(sender).closest(".lib_pm_subnav").next().empty().attr("innerHTML",jQuery(xml).find("shtml").text());jalib.clearModels();
eval(jQuery(xml).find("jlb").text())}else{createApplicationMessage("error",jQuery(xml).find("message").text())}}}));return false
}function libOnFilterTopicClick(a,c){var b=jalib.getTopic(a.id.getRepresentedId());a=jQuery(a);if(a.hasClass("selected")){a.removeClass("selected");
HA.removeFilter(b.getIdname())}else{a.addClass("selected");HA.addFilter(b.getIdname())}if(c==LibraryBasicMode.CONTRIBUTOR){if(HA.hasModel()){HA.setAction(null)
}HA.removeModel();libOnContributorBoardModeChange()}else{if(c==LibraryBasicMode.PROJECT_MODELS){libOnModelsBoardFilterChange()
}else{if(c==LibraryBasicMode.CONTRIBUTORS){libOnContributorsBoardFilterChange()}}}return false}function libOnPageLoadSetFilters(c){var b=HA.getFilterTopicsIds();
if(b.length>0){if(c==LibraryBasicMode.CONTRIBUTOR){libSelectTopicsInDiv("#contributorTopics",b)}else{if(c==LibraryBasicMode.PROJECT_MODELS){libSelectTopicsInDiv("#popularTopics",b)
}else{if(c==LibraryBasicMode.CONTRIBUTORS){libSelectTopicsInDiv("#popularTopics",b)}}}}if(c==LibraryBasicMode.PROJECT_MODELS||c==LibraryBasicMode.CONTRIBUTORS){var a=jQuery("#topSortSelect");
if(c==LibraryBasicMode.PROJECT_MODELS){if(HA.getSort()=="time"){a.val("time")}else{a.val("popularity")}a.change(function(){libOnModelsSortSelectChange(this)
})}else{if(HA.getSort()=="time"){a.val("time")}else{a.val("popularity")}a.change(function(){libOnContributorsBoardFilterChange(this)
})}}}function libSelectTopicsInDiv(d,a){var c="";for(var b=0;b<a.length;b++){c+="[id$=_"+a[b]+"]"+(b<a.length-1?",":"")}jQuery(d).find(c).addClass("selected")
}function libOnContributorBoardModeChange(){var contentCss="lib_pms",titleTextkey="lib.contributor.topNavTitleCreatedModels";
var newMode=HA.getAction();if(newMode=="following"){contentCss="lib_contributors";titleTextkey="lib.contributor.topNavTitleFollowing"
}else{if(newMode=="followers"){contentCss="lib_contributors";titleTextkey="lib.contributor.topNavTitleFollowers"}else{if(newMode=="liked"){contentCss="lib_pms";
titleTextkey="lib.contributor.topNavTitleLikedModels";HA.markBackAction()}else{if(newMode=="inspired"){contentCss="lib_contributors";
titleTextkey="lib.contributor.topNavTitleInspired"}else{if(newMode=="saved"){titleTextkey="lib.contributor.topNavTitleSaved";
HA.markBackAction()}else{if(newMode=="commented"){titleTextkey="lib.contributor.topNavTitleCommented";HA.markBackAction()
}else{if(HA.hasModel()){contentCss="lib_pm";titleTextkey="lib.contributor.topNavTitleProjectModel";if(newMode!="inspirations"&&newMode!="roots"){newMode="comments"
}}else{newMode="";HA.markBackAction()}}}}}}}var contentDiv=jQuery("#contributorContent");var loadDiv=contentDiv.prev();loadDiv.addSmallLoader();
HA.setUrl();loadDiv.setLoaderRequest(jQuery.ajax({url:boardLoadAction,type:"POST",data:(HA.getAjaxActionParameters()),dataType:"xml",loaderElement:loadDiv,error:function(){if(this.loaderElement.isLoaderAborted()){return
}createApplicationMessage("error",doTexts.getText("lib.errorLoadingContributors"));this.loaderElement.removeLoaders()},success:function(xml){if(this.loaderElement.isLoaderAborted()){return
}var status=jQuery(xml).find("status").text();if(status=="1"){jQuery("#topNavigationTitle").attr("innerHTML",doTexts.getText(titleTextkey).replace(/#pp#name#/g,selectedContributorName));
jQuery("#contributorContent").empty().removeClass().addClass(contentCss).attr("innerHTML",jQuery(xml).find("bhtml").text());
if(newMode=="comments"){var carea=jQuery("#postComment");carea.keydown(function(e){libOnPostModelCommentAreaKeydown(this,e)
});carea.autoResize()}HA.adjustBackToLink();HA.adjustContributorFilterString();jalib.clearModels();eval(jQuery(xml).find("jlb").text())
}else{createApplicationMessage("error",jQuery(xml).find("message").text())}this.loaderElement.removeLoaders()}}))}function libOnBackLinkClick(a){HA.revertAction();
libOnContributorBoardModeChange();return false}function libOnModelsBoardFilterChange(){var contentDiv=jQuery("#projectModels");
var loadDiv=contentDiv.prev();loadDiv.addSmallLoader();HA.setUrl();var data=HA.getAjaxActionParameters();loadDiv.setLoaderRequest(jQuery.ajax({url:boardLoadAction,type:"POST",data:(data),dataType:"xml",loaderElement:loadDiv,error:function(){if(this.loaderElement.isLoaderAborted()){return
}createApplicationMessage("error",doTexts.getText("lib.errorLoadingModels"));this.loaderElement.removeLoaders()},success:function(xml){if(this.loaderElement.isLoaderAborted()){return
}var status=jQuery(xml).find("status").text();if(status=="1"){jQuery("#projectModels").empty().attr("innerHTML",jQuery(xml).find("bhtml").text());
jalib.clearModels();eval(jQuery(xml).find("jlb").text())}else{createApplicationMessage("error",jQuery(xml).find("message").text())
}this.loaderElement.removeLoaders()}}))}function libOnContributorsBoardFilterChange(){var b=jQuery("#contributorsBoard");
var a=b.prev();a.addSmallLoader();HA.setUrl();a.setLoaderRequest(jQuery.ajax({url:boardLoadAction,type:"POST",data:(HA.getAjaxActionParameters()),dataType:"xml",loaderElement:a,error:function(){if(this.loaderElement.isLoaderAborted()){return
}createApplicationMessage("error",doTexts.getText("lib.errorLoadingContributors"));this.loaderElement.removeLoaders()},success:function(d){if(this.loaderElement.isLoaderAborted()){return
}var c=jQuery(d).find("status").text();if(c=="1"){jQuery("#contributorsBoard").empty().attr("innerHTML",jQuery(d).find("bhtml").text())
}else{createApplicationMessage("error",jQuery(d).find("message").text())}this.loaderElement.removeLoaders()}}))}function libOnContributorBoardSortSelectChange(sender){var contentDiv=jQuery("#contributorContent");
var loadDiv=contentDiv.prev();loadDiv.addSmallLoader();HA.setSort(sender.value);HA.setUrl();loadDiv.setLoaderRequest(jQuery.ajax({url:boardLoadAction,type:"POST",data:(HA.getAjaxActionParameters()),dataType:"xml",loaderElement:loadDiv,error:function(){if(this.loaderElement.isLoaderAborted()){return
}createApplicationMessage("error",doTexts.getText("lib.errorLoadingContributors"));this.loaderElement.removeLoaders()},success:function(xml){if(this.loaderElement.isLoaderAborted()){return
}var status=jQuery(xml).find("status").text();if(status=="1"){jQuery("#contributorContent").empty().attr("innerHTML",jQuery(xml).find("bhtml").text());
jalib.clearModels();eval(jQuery(xml).find("jlb").text())}else{createApplicationMessage("error",jQuery(xml).find("message").text())
}this.loaderElement.removeLoaders()}}))}function libOnWindowHashChange(a){if(!HA.wasHashClicked()){HA._init();if(jsAction=="pms"){libOnModelsBoardFilterChange()
}else{if(jsAction=="cs"){libOnContributorsBoardFilterChange()}else{if(jsAction=="c"){libOnContributorBoardModeChange()}}}}}function libOnPostModelCommentAreaKeydown(a,b){if(isCtrlOrShiftEnterPressed(b)){jQuery(a).closest("#postCommentDiv").find("#postCommentButton").trigger("click")
}}function libOnPostModelCommentButtonClick(c){var b=jQuery(c).closest("#postCommentDiv");var e=b.find("#postComment");if(b.isLoading()||isEmptyString(e.val())){return
}var f=b.find("#postCommentError").hide();var d=b.find("#postCommentButton").attr("disabled","disabled");b.addSmallLoader();
var a={};a.cnt=e.val();a.lcid=b.prev().length==0?"":b.prev().getRepresentedId();a.mid=HA.getModelId();a.postAs=commonGetSelectedActionPerformerValue(b);
jQuery.ajax({url:"/ajax/lib/postcomment",type:"POST",data:(a),dataType:"xml",loaderElement:b,error:function(){f.attr("innerHTML",doTexts.getText("lib.errorPostingModelComment")).show();
b.removeLoaders();d.attr("disabled","")},success:function(h){var g=jQuery(h).find("status").text();if(g=="1"){var j=jQuery(jQuery(h).find("nc").text());
j.hide();b.before(j);j.fadeIn();e.val("");var l=parseInt(jQuery(h).find("ncn").text());var k=b.closest("#subcontentDiv").prev().find("#modelSubNavComments");
var i=parseInt(/\d+/.exec(k.text()));if(i!=null){k.text(k.text().replace(/\d+/,(i+l)))}showIntoViewIfNecesary(b)}else{f.attr("innerHTML",jQuery(h).find("message").text()).show()
}b.removeLoaders();d.attr("disabled","")}})};function HashAction(a){this.parameters={};this.filters={};this.backToAction=null;this.basicBackLink=null;this.basicBackName=null;
this.selectedProfileId=null;this.lastClickedHash=null;if(typeof a==="object"){this.basicBackLink=a[0];this.basicBackName=a[1];
this._init()}else{if(typeof a==="boolean"&&a==true){}else{this._init()}}}HashAction.prototype._init=function(e){e=this._windowHashToParameter(e);
this.parameters={};this.filters={};if(e.startsWith("pm=")){var c=e.indexOf("&",3);var m=e.indexOf("=",3);var k=e.lastIndexOf("/");
if(k<0){}else{if(c>=0||m>=0){var l=e.substring(3,k);l=l.replace(/&/g,"#ppand#").replace(/=/g,"#ppeq#");e="pm="+l+e.substring(k)
}}}var b=e.split("&");for(var g=0;g<b.length;g++){if(isEmptyString(b[g])){continue}var a=b[g].split("=");if(g<2&&a.length<2){if(this._isParameterNameAction(b[g])){this.setAction(b[g])
}else{var h=b[g].split("-");for(var f=0;f<h.length;f++){this.addFilter(h[f])}}}else{if(a.length==2){if(g==0&&this._isParameterProjectModelAction(a[0])){a[1]=a[1].trim();
var d=a[1].lastIndexOf("/");if(d<=0||d==a[1].length){continue}this._setModelWithName(a[1].substring(d+1),a[1].substring(0,d).replace(/#ppand#/g,"&").replace(/#ppeq#/g,"="))
}else{this.parameters[a[0]]=a[1]}}}}};HashAction.prototype.markBackAction=function(){if(this.backToAction==null){this.backToAction=new HashAction(true)
}else{this.backToAction.parameters={};this.backToAction.filters={}}for(var b in this.parameters){this.backToAction.parameters[b]=this.parameters[b]
}for(var a in this.filters){this.backToAction.filters[a]=this.filters[a]}};HashAction.prototype.revertAction=function(){this.parameters={};
this.filters={};if(this.backToAction==null){return}for(var b in this.backToAction.parameters){this.parameters[b]=this.backToAction.parameters[b]
}for(var a in this.backToAction.filters){this.filters[a]=this.backToAction.filters[a]}this.backToAction=null};HashAction.prototype.setAction=function(b,a){this.parameters.action=b;
if(a==true){this.setUrl()}};HashAction.prototype.getAction=function(){return this.parameters.action};HashAction.prototype.addFilter=function(a,b){this.filters[a]=true;
if(b==true){this.setUrl()}};HashAction.prototype.removeFilter=function(b,a){delete this.filters[b];if(a==true){this.setUrl()
}};HashAction.prototype.removeFilters=function(a){this.filters={};if(a==true){this.setUrl()}};HashAction.prototype.setSort=function(a){this.parameters.sort=a
};HashAction.prototype.getSort=function(){return this.parameters.sort};HashAction.prototype.setShow=function(a){this.parameters.show=a
};HashAction.prototype.getShow=function(){return this.parameters.show};HashAction.prototype.wasHashClicked=function(){return(this.lastClickedHash===window.location.hash)
};HashAction.prototype.setModel=function(a){this.markBackAction();this.parameters.modelId=a;this.parameters.modelName=jalib.getModel(a).getName();
delete this.parameters.action;delete this.parameters.show;delete this.parameters.sort};HashAction.prototype._setModelWithName=function(b,a){this.parameters.modelId=b;
this.parameters.modelName=a};HashAction.prototype.removeModel=function(){delete this.parameters.modelId;delete this.parameters.modelName
};HashAction.prototype.hasModel=function(){return !isEmptyString(this.parameters.modelId)};HashAction.prototype.getModelId=function(){return this.parameters.modelId
};HashAction.prototype.getModel=function(){if(isEmptyString(this.parameters.modelId)){return null}return jalib.getModel(this.parameters.modelId)
};HashAction.prototype.getSelectedProfileString=function(){if(isEmptyString(this.selectedProfileId)){return""}var a=jabox.getProfile(this.selectedProfileId);
return a.getGlobalHash()};HashAction.prototype.setSelectedProfile=function(a){this.selectedProfileId=a};HashAction.prototype.getFilterTopicsIds=function(){var a=[];
for(var b in this.filters){a[a.length]=jalib.getTopic(b).getId()}return a};HashAction.prototype._isParameterNameAction=function(a){return"liked"==a||"following"==a||"followers"==a||"inspired"==a||"comments"==a||"roots"==a||"inspirations"==a
};HashAction.prototype._isParameterProjectModelAction=function(a){return"pm"==a};HashAction.prototype._windowHashToParameter=function(a){if(a==null){a=window.location.hash
}if(isEmptyString(a)){return""}else{if(a.startsWith("#!")){return a.substring(2)}else{if(a.startsWith("#")){return a.substring(1)
}else{return a}}}};HashAction.prototype.setUrl=function(){this.lastClickedHash=this._toData(false);window.location.hash=this.lastClickedHash
};HashAction.prototype._toData=function(b){var i=new StringBuffer();var e={};i.append("#!");paramDelim="&";valueDelim="=";
if(this.hasModel()){var g,c;if(isEmptyString(this.parameters.modelName)){var h=this.getModel();g=h.getId();c=h.getUrlName()
}else{g=this.parameters.modelId;c=this.parameters.modelName}if(b){e.mid=g;e.mnm=c}else{i.append("pm").append(valueDelim).append(c).append("/").append(g).append(paramDelim)
}}if(!isEmptyString(this.parameters.action)){var a=this.parameters.action;if(b){e.a=this.parameters.action}else{i.append(this.parameters.action).append(paramDelim)
}}var d=[];for(var f in this.filters){if(b){d[d.length]=jalib.getTopic(f).getId()}else{d[d.length]=f}}if(d.length>0){if(b){e.t=d
}else{d.sort();i.append(d.join("-")).append(paramDelim)}}for(var f in this.paramaters){if(f!="action"&&f!="sort"&&f!="show"&&f!="t"){if(b){e[f]=this.parameters[f]
}else{i.append(f).append(valueDelim).append(this.parameters[f]).append(paramDelim)}}}if(!isEmptyString(this.parameters.sort)){if(b){e.sort=this.parameters.sort
}else{i.append("sort").append(valueDelim).append(this.parameters.sort).append(paramDelim)}}if(!isEmptyString(this.parameters.show)){if(b){e.show=this.parameters.show
}else{i.append("show").append(valueDelim).append(this.parameters.show).append(paramDelim)}}if(b){e.selp=this.getSelectedProfileString();
return e}else{i=i.toString();if(!isEmptyString(i)&&i.endsWith(paramDelim)){i=i.substring(0,i.length-paramDelim.length)}return i
}};HashAction.prototype.getAjaxActionParameters=function(){return this._toData(true)};HashAction.prototype.adjustBackToLink=function(){var b=jQuery("#backToLink");
if(this.hasModel()&&this.backToAction!=null){b.unbind();var a=this.backToAction;b.attr("href",a._toData(false));a._adjustBackToLinkText(b);
b.click(function(){return libOnBackLinkClick(this)})}else{b.unbind();if(isEmptyString(this.basicBackLink)){b.attr("href","/library");
b.attr("innerHTML",doTexts.getText("lib.backlink.backToAllProjectModels"))}else{b.attr("href",this.basicBackLink);this._adjustBackToLinkText(b,this.basicBackLink)
}}b.show()};HashAction.prototype._adjustBackToLinkText=function(a,b){if(!isEmptyString(b)){if(b.startsWith("/library/cns")){a.attr("innerHTML",doTexts.getText("lib.backlink.backToAllContributors"))
}else{if(b.indexOf("#!followers")>=0||b.indexOf("&followers")>=0){a.attr("innerHTML",doTexts.getText("lib.backlink.backToContributorFollowers").replace(/#pp#name#/g,this.basicBackName))
}else{if(b.indexOf("#!following")>=0||b.indexOf("&following")>=0){a.attr("innerHTML",doTexts.getText("lib.backlink.backToContributorFollowing").replace(/#pp#name#/g,this.basicBackName))
}else{if(b.indexOf("#!inspired")>=0||b.indexOf("&inspired")>=0){a.attr("innerHTML",doTexts.getText("lib.backlink.backToContributorInspired").replace(/#pp#name#/g,this.basicBackName))
}else{if(b.indexOf("#!pm=")>=0){a.attr("innerHTML",doTexts.getText("lib.backlink.backToProjectModel").replace(/#pp#name#/g,this.basicBackName))
}else{if(b.indexOf("#!saved")>=0||b.indexOf("&saved")>=0){a.attr("innerHTML",doTexts.getText("lib.backlink.backToSavedProjectModels").replace(/#pp#name#/g,this.basicBackName))
}else{if(b.indexOf("#!liked")>=0||b.indexOf("&liked")>=0){a.attr("innerHTML",doTexts.getText("lib.backlink.backToLikedProjectModels").replace(/#pp#name#/g,this.basicBackName))
}else{if(b.indexOf("#!commented")>=0||b.indexOf("&commented")>=0){a.attr("innerHTML",doTexts.getText("lib.backlink.backToCommentedProjectModels").replace(/#pp#name#/g,this.basicBackName))
}else{if(b.match(/\/library\/\S{3,}#!/)){a.attr("innerHTML",doTexts.getText("lib.backlink.backToCreatedProjectModels").replace(/#pp#name#/g,this.basicBackName))
}else{a.attr("innerHTML",doTexts.getText("lib.backlink.backToAllProjectModels"))}}}}}}}}}}else{var c=this.getAction();if(this.hasModel()){a.attr("innerHTML",doTexts.getText("lib.backlink.backToProjectModel").replace(/#pp#name#/g,this.parameters.modelName))
}else{if(c=="saved"){a.attr("innerHTML",doTexts.getText("lib.backlink.backToSavedProjectModels").replace(/#pp#name#/g,selectedContributorName))
}else{if(c=="liked"){a.attr("innerHTML",doTexts.getText("lib.backlink.backToLikedProjectModels").replace(/#pp#name#/g,selectedContributorName))
}else{if(c=="commented"){a.attr("innerHTML",doTexts.getText("lib.backlink.backToCommentedProjectModels").replace(/#pp#name#/g,selectedContributorName))
}else{if(isEmptyString(c)||c=="created"){a.attr("innerHTML",doTexts.getText("lib.backlink.backToCreatedProjectModels").replace(/#pp#name#/g,selectedContributorName))
}}}}}}};HashAction.prototype.adjustContributorFilterString=function(){var d=this.getAction();var b=jQuery("<select></select>");
var c=null;if(d=="followers"||d=="following"||d=="inspired"){b.append('<option value="time">'+doTexts.getText("lib.contributor.contributorsFilterTimeOptionText")+"</option>");
b.append('<option value="popularity" selected="selected">'+doTexts.getText("lib.contributor.contributorsFilterPopularityOptionText")+"</option>");
if(d=="following"){c="lib.contributor.followingFilterString";b.append('<option value="timeFollowed">'+doTexts.getText("lib.contributor.contributorsFilterTimeFollowedOptionText")+"</option>")
}else{if(d=="followers"){c="lib.contributor.followersFilterString";b.append('<option value="timeFollowed">'+doTexts.getText("lib.contributor.contributorsFilterTimeFollowedOptionText")+"</option>")
}else{if(d=="inspired"){c="lib.contributor.inspiredFilterString"}}}}else{if((!this.hasModel()&&isEmptyString(d))||d=="liked"){b.append('<option value="time">'+doTexts.getText("lib.contributor.contributorsFilterTimeOptionText")+"</option>");
b.append('<option value="popularity" selected="selected">'+doTexts.getText("lib.contributor.contributorsFilterPopularityOptionText")+"</option>");
if(d=="liked"){c="lib.contributor.likedFilterString";if(userOwnsProfile){b.append('<option value="likedDate">'+doTexts.getText("lib.contributor.contributorsFilterTimeLikedOptionText")+"</option>")
}}else{c="lib.contributor.createdFilterString"}}else{if(d=="saved"||d=="commented"){b.append('<option value="time">'+doTexts.getText("lib.contributor.contributorsFilterTimeOptionText")+"</option>");
b.append('<option value="popularity" selected="selected">'+doTexts.getText("lib.contributor.contributorsFilterPopularityOptionText")+"</option>");
if(d=="saved"){c="lib.contributor.savedFilterString";b.append('<option value="savedDate">'+doTexts.getText("lib.contributor.contributorsFilterTimeSavedOptionText")+"</option>")
}else{c="lib.contributor.commentedFilterString";b.append('<option value="commentedDate">'+doTexts.getText("lib.contributor.contributorsFilterTimeCommentedOptionText")+"</option>")
}}}}var a=jQuery("#filterDiv");if(!this.hasModel()&&!isEmptyString(c)){a.attr("innerHTML",doTexts.getText(c).replace(/#pp#name#/g,selectedContributorName).replace(/#pp#sort#/g,"<select>"+b.html()+"</select>"));
b=a.find("select");b.val(this.getSort());b.change(function(){libOnContributorBoardSortSelectChange(this)});a.show()}else{a.hide()
}};var jalib=new function Jalib(){var a={};var c={};var b={};this.getTopic=function(e){if(e==null){return null}var d=a[e.toString()];
if(d==null){this.onNonExistingEntity()}return d};this.addTopic=function(d){a[d.getId().toString()]=d;a[d.getIdname().toString()]=d
};this.getModel=function(e){if(e==null){return null}var d=c[e.toString()];if(d==null){this.onNonExistingEntity()}return d
};this.addModel=function(d){c[d.getId().toString()]=d};this.removeModel=function(d){delete c[d]};this.clearModels=function(){c={}
};this.getModelElements=function(e){if(e==null){return null}var d=b[e.toString()];if(d==null){this.onNonExistingEntity()}return d
};this.addModelElements=function(d){b[d.getModelId().toString()]=d};this.removeModelElements=function(d){delete b[d]};this.onNonExistingEntity=function(){alert("Ooops, entity does not exist.")
}};function ModelTopic(a){this.id=a.id;this.idname=a.idname}ModelTopic.prototype.getId=function(){return this.id};ModelTopic.prototype.setId=function(a){this.id=a
};ModelTopic.prototype.getIdname=function(){return this.idname};ModelTopic.prototype.setIdname=function(a){this.idname=a};function ProjectModel(a){this.id=a.id;this.authorId=a.aid;this.name=a.name;this.uname=a.uname;this.hash=a.h}ProjectModel.prototype.getId=function(){return this.id
};ProjectModel.prototype.setId=function(a){this.id=a};ProjectModel.prototype.getAuthorId=function(){return this.authorId};
ProjectModel.prototype.setAuthorId=function(a){this.authorId=a};ProjectModel.prototype.getName=function(){return this.name
};ProjectModel.prototype.setName=function(a){this.name=a};ProjectModel.prototype.getUrlName=function(){return this.uname};
ProjectModel.prototype.setUrlName=function(a){this.uname=a};ProjectModel.prototype.getHash=function(){return this.hash};ProjectModel.prototype.setHash=function(a){this.hash=a
};function ProjectModelElements(a){this.modelId=a.mid;this.duration=a.dur;this.milestones=a.mil;this.tasklists=a.tl;this.tasks=a.tsk;
this.files=a.fls;this.roles=a.rls;this.time=a.tm;this.expense=a.exp;this.income=a.inc;this.numberOfDaysShown=a.nds;this.milestoneOffsets=a.mof;
this.tasklistsList=a.tls}ProjectModelElements.prototype.getModelId=function(){return this.modelId};ProjectModelElements.prototype.getDuration=function(){return this.duration
};ProjectModelElements.prototype.getMilestones=function(){return this.milestones};ProjectModelElements.prototype.getTasklists=function(){return this.tasklists
};ProjectModelElements.prototype.getTasks=function(){return this.tasks};ProjectModelElements.prototype.getFiles=function(){return this.files
};ProjectModelElements.prototype.getRoles=function(){return this.roles};ProjectModelElements.prototype.getTime=function(){return this.time
};ProjectModelElements.prototype.getExpense=function(){return this.expense};ProjectModelElements.prototype.getIncome=function(){return this.income
};ProjectModelElements.prototype.fillModelDivWithData=function(b){var h=b.find("#durationSpan");h.attr("innerHTML",h.attr("innerHTML").replace(/\d+/,this.duration));
var f=b.find("#gantTable");f.empty();var a=jQuery("<tr></tr>");for(var e=0;e<=this.numberOfDaysShown;e++){var d=jQuery('<td style="padding: 1px 0; height:10px;"></td>');
if(this.milestoneOffsets[e]!=null){d.append('<div style="background-color:#838383; height:8px;"></div>')}a.append(d)}f.append(a);
for(var e=0;e<this.tasklistsList.length;e++){var c=this.tasklistsList[e];var g=jQuery("<tr></tr>");if(c[0]>0){g.append('<td colspan="'+c[0]+'"></td>')
}if(c[1]>0){g.append('<td colspan="'+c[1]+'" style="padding: 1px 0; height:10px;"><div style="background-color:#CCCCCC; height:8px;"></div></td>')
}if(c[2]>0){g.append('<td colspan="'+c[2]+'"></td>')}f.append(g)}this.fillModelValue(b.find("#milNum"),this.milestones,this.milestones==0);
this.fillModelValue(b.find("#tlNum"),this.tasklists,this.tasklists==0);this.fillModelValue(b.find("#tskNum"),this.tasks,this.tasks==0);
this.fillModelValue(b.find("#flsNum"),this.files,this.files==0);this.fillModelValue(b.find("#rlsNum"),this.roles,this.roles==0);
this.fillModelValue(b.find("#tmNum"),this.time,isEmptyString(this.time));this.fillModelValue(b.find("#expNum"),this.expense,isEmptyString(this.expense));
this.fillModelValue(b.find("#incNum"),this.income,isEmptyString(this.income))};ProjectModelElements.prototype.fillModelValue=function(a,c,b){a.attr("innerHTML",c);
if(b){a.parent().hide()}else{a.parent().show()}};
