var qcodo={initialize:function(){this.isBrowser=function(intBrowserType){return(intBrowserType&qcodo._intBrowserType)};this.IE=1;this.IE_6_0=2;this.IE_7_0=4;this.FIREFOX=8;this.FIREFOX_1_0=16;this.FIREFOX_1_5=32;this.FIREFOX_2_0=64;this.SAFARI=128;this.SAFARI_2_0=256;this.SAFARI_3_0=512;this.MACINTOSH=1024;this.UNSUPPORTED=2048;if(navigator.userAgent.toLowerCase().indexOf("msie")>=0){this._intBrowserType=this.IE;if(navigator.userAgent.toLowerCase().indexOf("msie 6.0")>=0){this._intBrowserType=this._intBrowserType|this.IE_6_0}else{if(navigator.userAgent.toLowerCase().indexOf("msie 7.0")>=0){this._intBrowserType=this._intBrowserType|this.IE_7_0}else{this._intBrowserType=this._intBrowserType|this.UNSUPPORTED}}}else{if((navigator.userAgent.toLowerCase().indexOf("firefox")>=0)||(navigator.userAgent.toLowerCase().indexOf("iceweasel")>=0)){this._intBrowserType=this.FIREFOX;var strUserAgent=navigator.userAgent.toLowerCase();strUserAgent=strUserAgent.replace("iceweasel/","firefox/");if(strUserAgent.indexOf("firefox/1.0")>=0){this._intBrowserType=this._intBrowserType|this.FIREFOX_1_0}else{if(strUserAgent.indexOf("firefox/1.5")>=0){this._intBrowserType=this._intBrowserType|this.FIREFOX_1_5}else{if(strUserAgent.indexOf("firefox/2.0")>=0){this._intBrowserType=this._intBrowserType|this.FIREFOX_2_0}else{this._intBrowserType=this._intBrowserType|this.UNSUPPORTED}}}}else{if(navigator.userAgent.toLowerCase().indexOf("safari")>=0){this._intBrowserType=this.SAFARI;if(navigator.userAgent.toLowerCase().indexOf("safari/41")>=0){this._intBrowserType=this._intBrowserType|this.SAFARI_2_0}else{if(navigator.userAgent.toLowerCase().indexOf("safari/52")>=0){this._intBrowserType=this._intBrowserType|this.SAFARI_3_0}else{this._intBrowserType=this._intBrowserType|this.UNSUPPORTED}}}else{this._intBrowserType=this.UNSUPPORTED}}}if(navigator.userAgent.toLowerCase().indexOf("macintosh")>=0){this._intBrowserType=this._intBrowserType|this.MACINTOSH}this.loadJavaScriptFile=function(strScript,objCallback){strScript=qc.jsAssets+"/"+strScript;var objNewScriptInclude=document.createElement("script");objNewScriptInclude.setAttribute("type","text/javascript");objNewScriptInclude.setAttribute("src",strScript);document.getElementById(document.getElementById("Qform__FormId").value).appendChild(objNewScriptInclude);if(qc.isBrowser(qcodo.IE)){objNewScriptInclude.callOnLoad=objCallback;objNewScriptInclude.onreadystatechange=function(){if((this.readyState=="complete")||(this.readyState=="loaded")){if(this.callOnLoad){this.callOnLoad()}}}}else{objNewScriptInclude.onload=objCallback}};this.loadStyleSheetFile=function(strStyleSheetFile,strMediaType){strStyleSheetFile=qc.cssAssets+"/"+strStyleSheetFile;if(qc.isBrowser(qcodo.IE)){var objNewScriptInclude=document.createStyleSheet(strStyleSheetFile)}else{var objNewScriptInclude=document.createElement("style");objNewScriptInclude.setAttribute("type","text/css");objNewScriptInclude.setAttribute("media",strMediaType);objNewScriptInclude.innerHTML='@import "'+strStyleSheetFile+'";';document.body.appendChild(objNewScriptInclude)}};this.registerForm=function(){var strFormId=document.getElementById("Qform__FormId").value;this.registerFormHiddenElement("Qform__FormControl",strFormId);this.registerFormHiddenElement("Qform__FormEvent",strFormId);this.registerFormHiddenElement("Qform__FormParameter",strFormId);this.registerFormHiddenElement("Qform__FormCallType",strFormId);this.registerFormHiddenElement("Qform__FormUpdates",strFormId);this.registerFormHiddenElement("Qform__FormCheckableControls",strFormId)};this.registerFormHiddenElement=function(strId,strFormId){var objHiddenElement=document.createElement("input");objHiddenElement.type="hidden";objHiddenElement.id=strId;objHiddenElement.name=strId;document.getElementById(strFormId).appendChild(objHiddenElement)};this.wrappers=new Array();this.enableMouseDrag=function(){document.onmousedown=qcodo.handleMouseDown;document.onmousemove=qcodo.handleMouseMove;document.onmouseup=qcodo.handleMouseUp};this.handleMouseDown=function(objEvent){objEvent=qcodo.handleEvent(objEvent);var objHandle=qcodo.target;if(!objHandle){return true}var objWrapper=objHandle.wrapper;if(!objWrapper){return true}if(qcodo.mouse.left){if(objWrapper.handleMouseDown){if(objHandle.setCapture){objHandle.setCapture()}objHandle.onmouseout=null;if(document.selection){document.selection.empty()}qcodo.currentMouseHandleControl=objWrapper;return objWrapper.handleMouseDown(objEvent,objHandle)}}qcodo.currentMouseHandleControl=null;return true};this.handleMouseMove=function(objEvent){objEvent=qcodo.handleEvent(objEvent);if(qcodo.currentMouseHandleControl){var objWrapper=qcodo.currentMouseHandleControl;var objHandle=objWrapper.handle;if(document.selection){document.selection.empty()}if(objWrapper.handleMouseMove){return objWrapper.handleMouseMove(objEvent,objHandle)}}return true};this.handleMouseUp=function(objEvent){objEvent=qcodo.handleEvent(objEvent);if(qcodo.currentMouseHandleControl){var objWrapper=qcodo.currentMouseHandleControl;var objHandle=objWrapper.handle;if(document.selection){document.selection.empty()}if(objHandle.releaseCapture){objHandle.releaseCapture();objHandle.onmouseout=function(){this.releaseCapture()}}qcodo.currentMouseHandleControl=null;if(objWrapper.handleMouseUp){return objWrapper.handleMouseUp(objEvent,objHandle)}}return true};this.unloadFlag=false;this.handleUnload=function(){qcodo.unloadFlag=true};window.onunload=this.handleUnload;this.beforeUnloadFlag=false;this.handleBeforeUnload=function(){qcodo.beforeUnloadFlag=true};window.onbeforeunload=this.handleBeforeUnload;this.colorRgbValues=function(strColor){strColor=strColor.replace("#","");try{if(strColor.length==3){return new Array(eval("0x"+strColor.substring(0,1)),eval("0x"+strColor.substring(1,2)),eval("0x"+strColor.substring(2,3)))}else{if(strColor.length==6){return new Array(eval("0x"+strColor.substring(0,2)),eval("0x"+strColor.substring(2,4)),eval("0x"+strColor.substring(4,6)))}}}catch(Exception){}return new Array(0,0,0)};this.hexFromInt=function(intNumber){intNumber=(intNumber>255)?255:((intNumber<0)?0:intNumber);intFirst=Math.floor(intNumber/16);intSecond=intNumber%16;return intFirst.toString(16)+intSecond.toString(16)};this.colorRgbString=function(intRgbArray){return"#"+qcodo.hexFromInt(intRgbArray[0])+qcodo.hexFromInt(intRgbArray[1])+qcodo.hexFromInt(intRgbArray[2])}}};var qc=qcodo;qc.initialize();qcodo.logMessage=function(f,e,d){var a=qcodo.getControl("Qform_Logger");if(!a){var a=document.createElement("div");a.id="Qform_Logger";a.style.display="none";a.style.width="400px";a.style.backgroundColor="#dddddd";a.style.fontSize="10px";a.style.fontFamily="lucida console, courier, monospaced";a.style.padding="6px";a.style.overflow="auto";if(qcodo.isBrowser(qcodo.IE)){a.style.filter="alpha(opacity=50)"}else{a.style.opacity=0.5}document.body.appendChild(a)}if(!d){if(f.replace){f=f.replace(/</g,"&lt;")}}var c="fixed";var b="0px";var h="0px";if(qcodo.isBrowser(qcodo.IE)){c="absolute";b=qcodo.scroll.y+"px";h=qcodo.scroll.x+"px"}a.style.position=c;a.style.top=b;a.style.left=h;a.style.height=(qcodo.client.height-100)+"px";a.style.display="inline";var g='<a href="javascript:qcodo.logRemove()">Remove</a><br/><br/>';if(e){a.innerHTML=g+f+"<br/>"}else{if(a.innerHTML==""){a.innerHTML=g+f+"<br/>"}else{a.innerHTML+=f+"<br/>"}}};qcodo.logRemove=function(){var a=qcodo.getControl("Qform_Logger");if(a){a.style.display="none"}};qcodo.logEventStats=function(a){a=qcodo.handleEvent(a);var b="";b+="scroll (x, y): "+qcodo.scroll.x+", "+qcodo.scroll.y+"<br/>";b+="scroll (width, height): "+qcodo.scroll.width+", "+qcodo.scroll.height+"<br/>";b+="client (x, y): "+qcodo.client.x+", "+qcodo.client.y+"<br/>";b+="client (width, height): "+qcodo.client.width+", "+qcodo.client.height+"<br/>";b+="page (x, y): "+qcodo.page.x+", "+qcodo.page.y+"<br/>";b+="page (width, height): "+qcodo.page.width+", "+qcodo.page.height+"<br/>";b+="mouse (x, y): "+qcodo.mouse.x+", "+qcodo.mouse.y+"<br/>";b+="mouse (left, middle, right): "+qcodo.mouse.left+", "+qcodo.mouse.middle+", "+qcodo.mouse.right+"<br/>";b+="key (alt, shift, control, code): "+qcodo.key.alt+", "+qcodo.key.shift+", "+qcodo.key.control+", "+qcodo.key.code;qcodo.logMessage("Event Stats",true);qcodo.logMessage(b,false,true)};qcodo.logObject=function(a){var d="";for(var c in a){var b=a[c];d+=c+": ";if(typeof b=="function"){d+="&lt;FUNCTION&gt;"}else{if(typeof b=="object"){d+="&lt;OBJECT&gt;"}else{if((c=="outerText")||(c=="innerText")||(c=="outerHTML")||(c=="innerHTML")){d+="&lt;TEXT&gt;"}else{d+=b}}}d+="<br/>"}qcodo.logMessage("Object Stats",true);qcodo.logMessage(d,false,true)};qcodo._objTimers=new Object();qcodo.clearTimeout=function(a){if(qcodo._objTimers[a]){clearTimeout(qcodo._objTimers[a]);qcodo._objTimers[a]=null}};qcodo.setTimeout=function(b,c,a){qcodo.clearTimeout(b);qcodo._objTimers[b]=setTimeout(c,a)};qcodo.handleEvent=function(a){a=(a)?a:((typeof(event)=="object")?event:null);if(a){if(typeof(a.clientX)!="undefined"){if(qcodo.isBrowser(qcodo.SAFARI)){qcodo.mouse.x=a.clientX-window.document.body.scrollLeft;qcodo.mouse.y=a.clientY-window.document.body.scrollTop;qcodo.client.x=a.clientX-window.document.body.scrollLeft;qcodo.client.y=a.clientY-window.document.body.scrollTop}else{qcodo.mouse.x=a.clientX;qcodo.mouse.y=a.clientY;qcodo.client.x=a.clientX;qcodo.client.y=a.clientY}}if(qcodo.isBrowser(qcodo.IE)){qcodo.mouse.left=((a.button&1)?true:false);qcodo.mouse.right=((a.button&2)?true:false);qcodo.mouse.middle=((a.button&4)?true:false)}else{if(qcodo.isBrowser(qcodo.SAFARI)){qcodo.mouse.left=((a.button&&!a.ctrlKey)?true:false);qcodo.mouse.right=((a.button&&a.ctrlKey)?true:false);qcodo.mouse.middle=false}else{qcodo.mouse.left=(a.button==0);qcodo.mouse.right=(a.button==2);qcodo.mouse.middle=(a.button==1)}}qcodo.key.alt=(a.altKey)?true:false;qcodo.key.control=(a.ctrlKey)?true:false;qcodo.key.shift=(a.shiftKey)?true:false;qcodo.key.code=(a.keyCode)?(a.keyCode):0;if(a.originalTarget){qcodo.target=a.originalTarget}else{if(a.srcElement){qcodo.target=a.srcElement}else{qcodo.target=null}}}if(window.document.compatMode=="BackCompat"){qcodo.client.width=(qcodo.isBrowser(qcodo.SAFARI))?window.innerWidth:window.document.body.clientWidth;qcodo.client.height=(qcodo.isBrowser(qcodo.SAFARI))?window.innerHeight:window.document.body.clientHeight;qcodo.page.width=Math.max(window.document.body.scrollWidth,qcodo.client.width);qcodo.page.height=Math.max(window.document.body.scrollHeight,qcodo.client.height);qcodo.scroll.x=window.scrollX||window.document.body.scrollLeft;qcodo.scroll.y=window.scrollY||window.document.body.scrollTop}else{if(qcodo.isBrowser(qcodo.SAFARI)){qcodo.client.width=window.innerWidth;qcodo.client.height=window.innerHeight;qcodo.page.width=Math.max(window.document.body.scrollWidth,qcodo.client.width);qcodo.page.height=Math.max(window.document.body.scrollHeight,qcodo.client.height);qcodo.scroll.x=window.scrollX||window.document.body.scrollLeft;qcodo.scroll.y=window.scrollY||window.document.body.scrollTop}else{if(qcodo.isBrowser(qcodo.IE)){qcodo.client.width=window.document.documentElement.offsetWidth;qcodo.client.height=window.document.documentElement.offsetHeight;qcodo.page.width=Math.max(window.document.documentElement.scrollWidth,qcodo.client.width);qcodo.page.height=Math.max(window.document.documentElement.scrollHeight,qcodo.client.height);qcodo.scroll.x=window.document.documentElement.scrollLeft;qcodo.scroll.y=window.document.documentElement.scrollTop}else{if(window.scrollMaxY){qcodo.client.width=window.innerWidth-15}else{qcodo.client.width=window.innerWidth}if(window.scrollMaxX){qcodo.client.height=window.innerHeight-15}else{qcodo.client.height=window.innerHeight}qcodo.page.width=window.scrollMaxX+qcodo.client.width;qcodo.page.height=window.scrollMaxY+qcodo.client.height;qcodo.scroll.x=window.scrollX;qcodo.scroll.y=window.scrollY}}}qcodo.page.x=qcodo.mouse.x+qcodo.scroll.x;qcodo.page.y=qcodo.mouse.y+qcodo.scroll.y;qcodo.scroll.width=qcodo.page.width-qcodo.client.width;qcodo.scroll.height=qcodo.page.height-qcodo.client.height;return a};qcodo.terminateEvent=function(a){a=qcodo.handleEvent(a);if(a){if(a.preventDefault){a.preventDefault()}if(a.stopPropagation){a.stopPropagation()}a.cancelBubble=true;a.returnValue=false}return false};qcodo.key={control:false,alt:false,shift:false,code:null};qcodo.mouse={x:0,y:0,left:false,middle:false,right:false};qcodo.client={x:null,y:null,width:null,height:null};qcodo.page={x:null,y:null,width:null,height:null};qcodo.scroll={x:window.scrollX||(window.document.body)?window.document.body.scrollLeft:null,y:window.scrollY||(window.document.body)?window.document.body.scrollTop:null,width:(window.document.body)?(window.document.body.scrollWidth-qcodo.client.width):null,height:(window.document.body)?(window.document.body.scrollHeight-qcodo.client.height):null};qcodo.prePost=function(){if(CKEDITOR&&CKEDITOR.instances){$("textarea").each(function(){var b=$(this).attr("name");if(CKEDITOR.instances[b]){try{CKEDITOR.instances[b].updateElement()}catch(a){}}})}};qcodo.postBack=function(c,e,b,a){var d=document.getElementById(c);d.Qform__FormControl.value=e;d.Qform__FormEvent.value=b;d.Qform__FormParameter.value=a;d.Qform__FormCallType.value="Server";d.Qform__FormUpdates.value=this.formUpdates();d.Qform__FormCheckableControls.value=this.formCheckableControls(c,"Server");qcodo.prePost();d.submit()};qcodo.formUpdates=function(){var b="";for(var c in qcodo.controlModifications){for(var a in qcodo.controlModifications[c]){b+=c+" "+a+" "+qcodo.controlModifications[c][a]+"\n"}}qcodo.controlModifications=new Object;return b};qcodo.formCheckableControls=function(d,c){var e=document.getElementById(d);var b="";for(var a=0;a<e.elements.length;a++){if(((e.elements[a].type=="checkbox")||(e.elements[a].type=="radio"))&&((c=="Ajax")||(!e.elements[a].disabled))){if(e.elements[a].id.indexOf("[")>=0){if(e.elements[a].id.indexOf("[0]")>=0){b+=" "+e.elements[a].id.substring(0,e.elements[a].id.length-3)}}else{if(e.elements[a].id.indexOf("_")>=0){if(e.elements[a].id.indexOf("_0")>=0){b+=" "+e.elements[a].id.substring(0,e.elements[a].id.length-2)}}else{b+=" "+e.elements[a].id}}}}if(b.length>0){return b.substring(1)}else{return""}};qcodo.ajaxQueue=new Array();qcodo.postAjax=function(e,f,d,c,b){if(!qc.unloadFlag){if(qc.beforeUnloadFlag){qc.beforeUnloadFlag=false}var a=false;if(qcodo.ajaxQueue.length==0){a=true}qcodo.ajaxQueue.push(new Array(e,f,d,c,b));if(a){qcodo.dequeueAjaxQueue()}}};qcodo.clearAjaxQueue=function(){qcodo.ajaxQueue=new Array()};qcodo.objAjaxWaitIcon=null;qcodo.dequeueAjaxQueue=function(){if(qcodo.ajaxQueue.length>0){strForm=this.ajaxQueue[0][0];strControl=this.ajaxQueue[0][1];strEvent=this.ajaxQueue[0][2];strParameter=this.ajaxQueue[0][3];strWaitIconControlId=this.ajaxQueue[0][4];if(strWaitIconControlId){this.objAjaxWaitIcon=this.getWrapper(strWaitIconControlId);if(this.objAjaxWaitIcon){this.objAjaxWaitIcon.style.display="inline"}}var objForm=document.getElementById(strForm);objForm.Qform__FormControl.value=strControl;objForm.Qform__FormEvent.value=strEvent;objForm.Qform__FormParameter.value=strParameter;objForm.Qform__FormCallType.value="Ajax";objForm.Qform__FormUpdates.value=qcodo.formUpdates();objForm.Qform__FormCheckableControls.value=this.formCheckableControls(strForm,"Ajax");qcodo.prePost();var strPostData="";for(var i=0;i<objForm.elements.length;i++){switch(objForm.elements[i].type){case"checkbox":case"radio":if(objForm.elements[i].checked){var strTestName=objForm.elements[i].name+"_";if(objForm.elements[i].id.substring(0,strTestName.length)==strTestName){strPostData+="&"+objForm.elements[i].name+"="+objForm.elements[i].id.substring(strTestName.length)}else{strPostData+="&"+objForm.elements[i].id+"="+objForm.elements[i].value}}break;case"select-multiple":var blnOneSelected=false;for(var intIndex=0;intIndex<objForm.elements[i].options.length;intIndex++){if(objForm.elements[i].options[intIndex].selected){strPostData+="&"+objForm.elements[i].name+"=";strPostData+=objForm.elements[i].options[intIndex].value}}break;default:strPostData+="&"+objForm.elements[i].id+"=";var strPostValue=objForm.elements[i].value;if(strPostValue){strPostValue=strPostValue.replace(/\%/g,"%25");strPostValue=strPostValue.replace(/&/g,escape("&"));strPostValue=strPostValue.replace(/\+/g,"%2B")}strPostData+=strPostValue;break}}var strUri=objForm.action;var objRequest;if(window.XMLHttpRequest){objRequest=new XMLHttpRequest()}else{if(typeof ActiveXObject!="undefined"){objRequest=new ActiveXObject("Microsoft.XMLHTTP")}}if(objRequest){objRequest.open("POST",strUri,true);objRequest.setRequestHeader("Method","POST "+strUri+" HTTP/1.1");objRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");objRequest.onreadystatechange=function(){if(objRequest.readyState==4){if(!qcodo.beforeUnloadFlag){try{var objXmlDoc=objRequest.responseXML;if(!objXmlDoc){alert("An error occurred during AJAX Response parsing.\r\n\r\nThe error response will appear in a new popup.");var objErrorWindow=window.open("about:blank","qcodo_error","menubar=no,toolbar=no,location=no,status=no,scrollbars=yes,resizable=yes,width=1000,height=700,left=50,top=50");if(objErrorWindow!=null){objErrorWindow.focus();objErrorWindow.document.write(objRequest.responseText)}else{alert("Unable to display error window. If you have a pop-up blocker enabled, please disable it.")}return}else{if(typeof $=="function"){$(".tooltip").add("a.helpbtn").each(function(){if(typeof $(this).data("qtip")=="object"){$(this).qtip("hide")}})}var intLength=0;var objXmlControls=objXmlDoc.getElementsByTagName("control");intLength=objXmlControls.length;for(var intIndex=0;intIndex<intLength;intIndex++){var strControlId=objXmlControls[intIndex].attributes.getNamedItem("id").nodeValue;var strControlHtml="";if(objXmlControls[intIndex].textContent){strControlHtml=objXmlControls[intIndex].textContent}else{if(objXmlControls[intIndex].firstChild){strControlHtml=objXmlControls[intIndex].firstChild.nodeValue}}if(strControlId=="Qform__FormState"){var objFormState=document.getElementById(strControlId);objFormState.value=strControlHtml}else{var objSpan=document.getElementById(strControlId+"_ctl");if(objSpan){objSpan.innerHTML=strControlHtml}}}var objXmlCommands=objXmlDoc.getElementsByTagName("command");intLength=objXmlCommands.length;for(var intIndex=0;intIndex<intLength;intIndex++){if(objXmlCommands[intIndex]&&objXmlCommands[intIndex].firstChild){var strCommand="";intChildLength=objXmlCommands[intIndex].childNodes.length;for(var intChildIndex=0;intChildIndex<intChildLength;intChildIndex++){strCommand+=objXmlCommands[intIndex].childNodes[intChildIndex].nodeValue}eval(strCommand)}}}}catch(objExc){alert(objExc.message+"\r\non line number "+objExc.lineNumber+"\r\nin file "+objExc.fileName);alert("An error occurred during AJAX Response handling.\r\n\r\nThe error response will appear in a new popup.");var objErrorWindow=window.open("about:blank","qcodo_error","menubar=no,toolbar=no,location=no,status=no,scrollbars=yes,resizable=yes,width=1000,height=700,left=50,top=50");objErrorWindow.focus();objErrorWindow.document.write(objRequest.responseText);return}}qcodo.ajaxQueue.shift();if(qcodo.objAjaxWaitIcon){qcodo.objAjaxWaitIcon.style.display="none"}if(qcodo.ajaxQueue.length>0){qcodo.dequeueAjaxQueue()}}};objRequest.send(strPostData)}}};qc.pB=qcodo.postBack;qc.pA=qcodo.postAjax;qcodo.getControl=function(a){if(typeof(a)=="string"){return document.getElementById(a)}else{return a}};qcodo.getWrapper=function(b){var a;if(!(a=qcodo.getControl(b))){return}if(a){return this.getControl(a.id+"_ctl")}else{return null}};qcodo.controlModifications=new Object;qcodo.javascriptStyleToQcodo=new Object;qcodo.javascriptStyleToQcodo.backgroundColor="BackColor";qcodo.javascriptStyleToQcodo.borderColor="BorderColor";qcodo.javascriptStyleToQcodo.borderStyle="BorderStyle";qcodo.javascriptStyleToQcodo.border="BorderWidth";qcodo.javascriptStyleToQcodo.height="Height";qcodo.javascriptStyleToQcodo.width="Width";qcodo.javascriptStyleToQcodo.text="Text";qcodo.javascriptWrapperStyleToQcodo=new Object;qcodo.javascriptWrapperStyleToQcodo.position="Position";qcodo.javascriptWrapperStyleToQcodo.top="Top";qcodo.javascriptWrapperStyleToQcodo.left="Left";qcodo.recordControlModification=function(c,a,b){if(!qcodo.controlModifications[c]){qcodo.controlModifications[c]=new Object}qcodo.controlModifications[c][a]=b};qcodo.registerControl=function(b){var a;if(!(a=qcodo.getControl(b))){return}var c=this.getWrapper(a);a.wrapper=c;c.control=a;qcodo.wrappers[c.id]=c;c.updateStyle=function(f,e){var d=this.control;switch(f){case"className":d.className=e;qcodo.recordControlModification(d.id,"CssClass",e);break;case"parent":if(e){var g=qcodo.getControl(e);g.appendChild(this);qcodo.recordControlModification(d.id,"Parent",e)}else{var h=this.parentNode;h.removeChild(this);qcodo.recordControlModification(d.id,"Parent","")}break;case"displayStyle":d.style.display=e;qcodo.recordControlModification(d.id,"DisplayStyle",e);break;case"display":if(e){c.style.display="inline";qcodo.recordControlModification(d.id,"Display","1")}else{c.style.display="none";qcodo.recordControlModification(d.id,"Display","0")}break;case"enabled":if(e){c.control.disabled=false;qcodo.recordControlModification(d.id,"Enabled","1")}else{c.control.disabled=true;qcodo.recordControlModification(d.id,"Enabled","0")}break;case"width":case"height":d.style[f]=e;if(qcodo.javascriptStyleToQcodo[f]){qcodo.recordControlModification(d.id,qcodo.javascriptStyleToQcodo[f],e)}if(c.handle){c.updateHandle()}break;case"text":d.innerHTML=e;qcodo.recordControlModification(d.id,"Text",e);break;default:if(qcodo.javascriptWrapperStyleToQcodo[f]){this.style[f]=e;qcodo.recordControlModification(d.id,qcodo.javascriptWrapperStyleToQcodo[f],e)}else{d.style[f]=e;if(qcodo.javascriptStyleToQcodo[f]){qcodo.recordControlModification(d.id,qcodo.javascriptStyleToQcodo[f],e)}}break}};c.getAbsolutePosition=function(){var f=0;var e=0;var d=this.control;while(d){if((d.wrapper)&&(d.wrapper.style.position=="relative")){}else{f+=d.offsetLeft;e+=d.offsetTop}d=d.offsetParent}return{x:f,y:e}};c.setAbsolutePosition=function(g,f,e){var d=this.offsetParent;while(d){g-=d.offsetLeft;f-=d.offsetTop;d=d.offsetParent}if(e){if(this.parentNode.nodeName.toLowerCase()!="form"){g=Math.max(g,0);f=Math.max(f,0);g=Math.min(g,this.offsetParent.offsetWidth-this.offsetWidth);f=Math.min(f,this.offsetParent.offsetHeight-this.offsetHeight)}}this.updateStyle("left",g+"px");this.updateStyle("top",f+"px")};c.setDropZoneMaskAbsolutePosition=function(f,e,d){this.dropZoneMask.style.left=f+"px";this.dropZoneMask.style.top=e+"px"};c.setMaskOffset=function(e,d){var f=this.getAbsolutePosition();this.mask.style.left=(f.x+e)+"px";this.mask.style.top=(f.y+d)+"px"};c.containsPoint=function(e,d){var f=this.getAbsolutePosition();if((e>=f.x)&&(e<=f.x+this.control.offsetWidth)&&(d>=f.y)&&(d<=f.y+this.control.offsetHeight)){return true}else{return false}};c.toggleDisplay=function(d){if(d){if(d=="show"){this.updateStyle("display",true)}else{this.updateStyle("display",false)}}else{this.updateStyle("display",(this.style.display=="none")?true:false)}};c.toggleEnabled=function(d){if(d){if(d=="enable"){this.updateStyle("enabled",true)}else{this.updateStyle("enabled",false)}}else{this.updateStyle("enabled",(this.control.disabled)?true:false)}};c.registerClickPosition=function(d){d=(d)?d:((typeof(event)=="object")?event:null);qcodo.handleEvent(d);var f=qcodo.mouse.x-this.getAbsolutePosition().x+qcodo.scroll.x;var e=qcodo.mouse.y-this.getAbsolutePosition().y+qcodo.scroll.y;if(qcodo.isBrowser(qcodo.IE)){f=f-2;e=e-2}document.getElementById(this.control.id+"_x").value=f;document.getElementById(this.control.id+"_y").value=e};c.focus=function(){if(this.control.focus){if(qcodo.isBrowser(qcodo.IE)&&(typeof(this.control.focus)=="object")){this.control.focus()}else{if(typeof(this.control.focus)=="function"){this.control.focus()}}}};c.select=function(){if(this.control.select){this.control.select()}};c.blink=function(e,d){c.defaultBackgroundColor=c.control.style.backgroundColor;c.blinkStart=qcodo.colorRgbValues(e);c.blinkEnd=qcodo.colorRgbValues(d);c.blinkStep=new Array(Math.round((c.blinkEnd[0]-c.blinkStart[0])/12.5),Math.round((c.blinkEnd[1]-c.blinkStart[1])/12.5),Math.round((c.blinkEnd[2]-c.blinkStart[2])/12.5));c.blinkDown=new Array((c.blinkStep[0]<0)?true:false,(c.blinkStep[1]<0)?true:false,(c.blinkStep[2]<0)?true:false);c.blinkCurrent=c.blinkStart;this.control.style.backgroundColor=qcodo.colorRgbString(c.blinkCurrent);qcodo.setTimeout(c.id,"qc.getC('"+c.id+"').blinkHelper()",20)};c.blinkHelper=function(){c.blinkCurrent[0]+=c.blinkStep[0];c.blinkCurrent[1]+=c.blinkStep[1];c.blinkCurrent[2]+=c.blinkStep[2];if(((c.blinkDown[0])&&(c.blinkCurrent[0]<c.blinkEnd[0]))||((!c.blinkDown[0])&&(c.blinkCurrent[0]>c.blinkEnd[0]))){c.blinkCurrent[0]=c.blinkEnd[0]}if(((c.blinkDown[1])&&(c.blinkCurrent[1]<c.blinkEnd[1]))||((!c.blinkDown[1])&&(c.blinkCurrent[1]>c.blinkEnd[1]))){c.blinkCurrent[1]=c.blinkEnd[1]}if(((c.blinkDown[2])&&(c.blinkCurrent[2]<c.blinkEnd[2]))||((!c.blinkDown[2])&&(c.blinkCurrent[2]>c.blinkEnd[2]))){c.blinkCurrent[2]=c.blinkEnd[2]}this.control.style.backgroundColor=qcodo.colorRgbString(c.blinkCurrent);if((c.blinkCurrent[0]==c.blinkEnd[0])&&(c.blinkCurrent[1]==c.blinkEnd[1])&&(c.blinkCurrent[2]==c.blinkEnd[2])){this.control.style.backgroundColor=c.defaultBackgroundColor}else{qcodo.setTimeout(c.id,"qc.getC('"+c.id+"').blinkHelper()",20)}}};qcodo.registerControlArray=function(b){var c=b.length;for(var a=0;a<c;a++){qcodo.registerControl(b[a])}};qc.getC=qcodo.getControl;qc.getW=qcodo.getWrapper;qc.regC=qcodo.registerControl;qc.regCA=qcodo.registerControlArray;qcodo.monthNames=new Array("January","February","March","April","May","June","July","August","September","October","November","December");qcodo.monthNamesAbbreviated=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");qcodo.dayNames=new Array("Su","Mo","Tu","We","Th","Fr","Sa");qcodo.registerCalendar=function(b,d){qcodo.handleEvent();var a;if(!(a=qcodo.getControl(b))){return}var c=a.wrapper;a.dateTimeTextBox=qcodo.getControl(d);a.calendarPane=document.getElementById(a.id+"_cal");a.calendarPane.style.display="none";a.showCalendar=function(){var e=this.wrapper.getAbsolutePosition();this.calendarPane.style.left=e.x+"px";this.calendarPane.style.top=e.y+"px";this.calendarPane.style.position="absolute";this.calendarPane.style.zIndex=10;this.calendarPane.style.display="block";this.drawCalendar(0,0)};a.setDate=function(e,f,g){this.dateTimeTextBox.value=qcodo.monthNamesAbbreviated[f]+" "+g+" "+e;this.hideCalendar()};a.setToToday=function(){var e=new Date();this.setDate(e.getFullYear(),e.getMonth(),e.getDate())};a.drawCalendar=function(o,y){var h;if(this.dateTimeTextBox.value){h=new Date(this.dateTimeTextBox.value)}var l=new Date();var g;if(o){g=new Date(o,y,1)}else{if(!h||h=="Invalid Date"){g=new Date()}else{g=new Date(h)}}g.setDate(1);var u=g.getMonth();var f=g.getFullYear();var m='<table border="0" cellspacing="0"><thead><tr>';for(var e=0;e<qcodo.dayNames.length;++e){m+="<th>"+qcodo.dayNames[e]+"</th>"}m+="</tr></thead>";for(var D=g.getDay();D>0;D--){g.setDate(g.getDate()-1)}for(var w=0;w<6;w++){m+="<tr>";for(var e=0;e<7;e++){var E=(w==5)?"lastRow ":"";if((g.getDate()==l.getDate())&&(g.getMonth()==l.getMonth())&&(g.getFullYear()==l.getFullYear())){E+="today "}if(h&&(g.getDate()==h.getDate())&&(g.getMonth()==h.getMonth())&&(g.getFullYear()==h.getFullYear())){E+="selected "}if(g.getMonth()!=u){E+="nonMonth"}if(E){E=' class="'+E+'"'}m+="<td"+E+'><a href="#" onclick="qc.getC(\''+this.id+"').setDate("+g.getFullYear()+","+g.getMonth()+","+g.getDate()+');return false;">'+g.getDate()+"</a></td>";g.setDate(g.getDate()+1)}m+="</tr>"}m+="</table>";var q=u-1;var v=f;if(q==-1){q=11;v--}var C=v+","+q;var B=u+1;var p=f;if(B==12){B=0;p++}var r=p+","+B;var z=(f-1)+","+u;var j=(f+1)+","+u;var A='<div class="navigator">';A+='<div class="left"><a href="#" onclick="qc.getC(\''+this.id+"').drawCalendar("+C+');return false;">&laquo;</a></div>';A+='<div class="month">'+qcodo.monthNames[u]+"</div>";A+='<div class="left"><a href="#" onclick="qc.getC(\''+this.id+"').drawCalendar("+r+');return false;">&raquo;</a></div>';A+='<div class="year"><a href="#" onclick="qc.getC(\''+this.id+"').drawCalendar("+z+');return false;">&laquo;</a>';A+="<span>"+f+"</span>";A+='<a href="#" onclick="qc.getC(\''+this.id+"').drawCalendar("+j+');return false;">&raquo;</a></div>';A+="</div>";var n='<div class="options">';n+='<a href="#" onclick="qc.getC(\''+this.id+"').setToToday(); return false;\">&quot;Today&quot;</a> &nbsp; &nbsp; ";n+='<a href="#" onclick="qc.getC(\''+this.id+"').hideCalendar(); return false;\">Cancel</a></div>";this.calendarPane.innerHTML=A+m+n};a.hideCalendar=function(){this.calendarPane.style.display="none"};a.onclick=a.showCalendar};qc.regCAL=qcodo.registerCalendar;function __calendar(b,a){popCal=window.open(qc.phpAssets+"/_core/calendar.php?strFormId="+b+"&strId="+a+"&intTimestamp="+document.forms[b].elements[a+"_intTimestamp"].value,"popCal","width=165,height=228,left=200,top=250");if(window.focus){popCal.focus()}}function __resetCalendar(b,a){document.forms[b].elements[a+"_intTimestamp"].value="";document.forms[b].elements[a].value="";if(document.forms[b].elements[a].onchange){document.forms[b].elements[a].onchange()}}qcodo.registerDialogBox=function(f,d,g,c,h){qcodo.handleEvent();var j;if(!(j=qcodo.getControl(f))){return}var e=j.wrapper;objForm=document.getElementById(document.getElementById("Qform__FormId").value);for(x=0;objForm.childNodes[x];x++){if(objForm.childNodes[x].id==e.id&&objForm.childNodes[x]!=e){objForm.removeChild(objForm.childNodes[x]);break}}objForm.appendChild(e);e.dbBg=document.getElementById(e.id+"dbbg");var a=e.dbBg;if(!a){var a=document.createElement("div");a.id=e.id+"dbbg";document.getElementById(document.getElementById("Qform__FormId").value).appendChild(a);e.dbBg=a;a.wrapper=e;if(qcodo.isBrowser(qcodo.IE)){var b=document.createElement("iframe");b.id=e.id+"dbbgframe";b.style.left="0px";b.style.top="0px";b.style.position="absolute";b.style.filter="alpha(opacity=0)";b.src="javascript: false;";b.frameBorder=0;b.scrolling="no";b.style.zIndex=990;b.display="none";document.getElementById(document.getElementById("Qform__FormId").value).appendChild(b);e.dbBgFrame=b}}e.handleResize=function(m){m=qcodo.handleEvent(m);if(m.target){if((m.target.nodeName.toLowerCase()=="div")||(m.target.nodeName.toLowerCase()=="span")){return}}var n=qcodo.activeDialogBox;var l=n.dbBg;var r=n.dbBgFrame;n.style.display="none";l.style.display="none";if(r){r.style.display="none"}qcodo.handleEvent(m);n.style.display="inline";l.style.display="block";if(r){r.style.display="block"}l.style.width=Math.max(qcodo.page.width,qcodo.client.width)+"px";l.style.height=Math.max(qcodo.page.height,qcodo.client.height)+"px";if(r){r.style.width=Math.max(qcodo.page.width,qcodo.client.width)+"px";r.style.height=Math.max(qcodo.page.height,qcodo.client.height)+"px"}var q=n.offsetWidth;var o=n.offsetHeight;var p=Math.round((qcodo.client.height-o)/2)+qcodo.scroll.y;var u=Math.round((qcodo.client.width-q)/2)+qcodo.scroll.x;n.setAbsolutePosition(u,p);return true};e.handleKeyPress=function(l){l=qcodo.handleEvent(l);qcodo.terminateEvent(l);var m=qcodo.activeDialogBox;m.hideDialogBox();return false};e.showDialogBox=function(){var l=this.dbBg;var p=this.dbBgFrame;e.style.display="none";l.style.display="none";if(p){p.style.display="none"}qcodo.handleEvent();l.style.display="block";if(p){p.style.display="block"}this.toggleDisplay("show");l.style.width=Math.max(qcodo.page.width,qcodo.client.width)+"px";l.style.height=Math.max(qcodo.page.height,qcodo.client.height)+"px";if(p){p.style.width=Math.max(qcodo.page.width,qcodo.client.width)+"px";p.style.height=Math.max(qcodo.page.height,qcodo.client.height)+"px"}var o=e.offsetWidth;var m=e.offsetHeight;var n=Math.round((qcodo.client.height-m)/2)+qcodo.scroll.y;var q=Math.round((qcodo.client.width-o)/2)+qcodo.scroll.x;e.setAbsolutePosition(q,n);window.onresize=this.handleResize;window.onscroll=this.handleResize;qcodo.activeDialogBox=this;if(e.anyKeyCloses){document.body.onkeypress=this.handleKeyPress;e.control.focus()}};e.hideDialogBox=function(){var l=this;if(this.id.indexOf("_ctldbbg")>0){l=this.wrapper}l.dbBg.style.display="none";if(l.dbBgFrame){l.dbBgFrame.style.display="none"}l.toggleDisplay("hide");window.onresize=null;window.onscroll=null;document.body.onkeypress=null;qcodo.activeDialogBox=null};e.style.zIndex=999;e.position="absolute";e.anyKeyCloses=h;a.style.position="absolute";a.style.zIndex=998;a.style.top="0px";a.style.left="0px";if(qcodo.isBrowser(qcodo.IE)){a.style.overflow="auto"}else{a.style.overflow="hide"}if(c){a.style.cursor="pointer";a.onclick=e.hideDialogBox}else{a.style.cursor="url("+qc.imageAssets+"/_core/move_nodrop.cur), auto";a.onclick=null}a.style.backgroundColor=d;if(qcodo.isBrowser(qcodo.IE)){a.style.filter="alpha(opacity="+g+")"}else{a.style.opacity=g/100}a.style.fontSize="1px";a.innerHTML="&nbsp;";if(e.style.display=="none"){e.hideDialogBox()}else{e.showDialogBox()}};qc.regDB=qcodo.registerDialogBox;qcodo.registerControlHandle=function(b,e){var a;if(!(a=qcodo.getControl(b))){return}var c=a.wrapper;if(!c.handle){var d=document.createElement("span");d.id=c.id+"handle";c.parentNode.appendChild(d);c.handle=d;d.wrapper=c;if(!c.style.position){d.style.width=c.control.style.width;d.style.height=c.control.style.height;d.style.top=c.control.offsetTop+"px";d.style.left=c.control.offsetLeft+"px"}else{d.style.width=c.offsetWidth+"px";d.style.height=c.offsetHeight+"px";d.style.top=c.offsetTop+"px";d.style.left=c.offsetLeft+"px"}d.style.cursor=e;d.style.zIndex=999;d.style.backgroundColor="white";if(qcodo.isBrowser(qcodo.IE)){d.style.filter="alpha(opacity=0)"}else{d.style.opacity=0}d.style.position="absolute";d.style.fontSize="1px";d.innerHTML="."}c.updateHandle=function(h,g){var f=this.handle;if(h){this.parentNode.appendChild(f)}f.style.top=this.offsetTop+"px";f.style.left=this.offsetLeft+"px";f.style.width=this.offsetWidth+"px";f.style.height=this.offsetHeight+"px";if(g){f.style.cursor=g}}};qc.regCH=qcodo.registerControlHandle;qcodo.registerControlMoveable=function(b){var a;if(!(a=qcodo.getControl(b))){return}var c=a.wrapper;c.moveable=true;c.mask=qcodo.getControl(c.id+"mask");if(!c.mask){var d=document.createElement("span");d.id=c.id+"mask";d.style.position="absolute";document.getElementById(document.getElementById("Qform__FormId").value).appendChild(d);c.mask=d}c.mask.wrapper=c;objMask=c.mask;objMask.style.position="absolute";objMask.style.zIndex=998;if(qcodo.isBrowser(qcodo.IE)){objMask.style.filter="alpha(opacity=50)"}else{objMask.style.opacity=0.5}objMask.style.display="none";objMask.innerHTML="";objMask.handleAnimateComplete=function(e){this.style.display="none"}};qcodo.registerControlDropZoneTarget=function(b){var a;if(!(a=qcodo.getControl(b))){return}var c=a.wrapper;c.dropZoneMask=qcodo.getControl(c.id+"dzmask");if(!c.dropZoneMask){var d=document.createElement("span");d.id=c.id+"dzmask";d.style.position="absolute";var e=document.createElement("span");e.style.fontSize="1px";e.innerHTML="&nbsp;";d.appendChild(e);document.getElementById(document.getElementById("Qform__FormId").value).appendChild(d);c.dropZoneMask=d;c.dropZoneMask.wrapper=c;objMask=c.dropZoneMask;objMask.style.position="absolute";objMask.style.top="0px";objMask.style.left="0px";objMask.style.borderColor="#bb3399";objMask.style.borderStyle="solid";objMask.style.borderWidth="3px";objMask.style.display="none"}c.addToDropZoneGrouping=function(h,g,f){if(!qcodo.dropZoneGrouping[h]){qcodo.dropZoneGrouping[h]=new Object}qcodo.dropZoneGrouping[h][this.control.id]=this;qcodo.dropZoneGrouping[h]["__allowSelf"]=(g)?true:false;qcodo.dropZoneGrouping[h]["__allowSelfParent"]=(f)?true:false;qcodo.registerControlDropZoneTarget(this.control)};c.removeFromDropZoneGrouping=function(f){if(!qcodo.dropZoneGrouping[f]){qcodo.dropZoneGrouping[f]=new Object}else{qcodo.dropZoneGrouping[f][this.control.id]=false}};c.a2DZG=c.addToDropZoneGrouping;c.rfDZG=c.removeFromDropZoneGrouping};qcodo.dropZoneGrouping=new Object;qcodo.registerControlMoveHandle=function(mixControl){var objControl;if(!(objControl=qcodo.getControl(mixControl))){return}var objWrapper=objControl.wrapper;if(!objWrapper.handle){qcodo.registerControlHandle(objControl,"move");qcodo.enableMouseDrag();objWrapper.handleMouseDown=function(objEvent,objHandle){this.setupBoundingBox();this.offsetX=qcodo.page.x-this.boundingBox.x;this.offsetY=qcodo.page.y-this.boundingBox.y;this.startDragX=qcodo.page.x;this.startDragY=qcodo.page.y;if(qcodo.moveHandleReset){qcodo.moveHandleReset.resetMasksCancel()}for(var strKey in this.moveControls){var objMoveControl=this.moveControls[strKey];var objMask=objMoveControl.mask;var objAbsolutePosition=objMoveControl.getAbsolutePosition();objMask.style.display="block";objMask.style.top=objAbsolutePosition.y+"px";objMask.style.left=objAbsolutePosition.x+"px";objMask.innerHTML=""}return qcodo.terminateEvent(objEvent)};objWrapper.handleMouseMove=function(objEvent,objHandle){if((qcodo.client.x<=30)||(qcodo.client.y>=(qcodo.client.height-30))||(qcodo.client.y<=30)||(qcodo.client.x>=(qcodo.client.width-30))){qcodo.scrollMoveHandle=this;qcodo.handleScroll()}else{qcodo.clearTimeout(objWrapper.id);this.moveMasks()}return qcodo.terminateEvent(objEvent)};objWrapper.handleMouseUp=function(objEvent,objHandle){var objMoveDelta=this.calculateMoveDelta();var intDeltaX=objMoveDelta.x;var intDeltaY=objMoveDelta.y;qcodo.clearTimeout(this.id);var objDropControl;if((intDeltaX==0)&&(intDeltaY==0)){objDropControl=null}else{objDropControl=this.getDropTarget()}if(objDropControl){for(var strKey in this.moveControls){var objWrapper=this.moveControls[strKey];var objMask=objWrapper.mask;objMask.style.display="none";objMask.style.cursor=null;objWrapper.updateStyle("position","absolute");var objAbsolutePosition=objWrapper.getAbsolutePosition();if(objDropControl.nodeName.toLowerCase()=="form"){if(objWrapper.parentNode!=objDropControl){objWrapper.updateStyle("parent",objDropControl.id)}}else{if(objDropControl.id!=objWrapper.parentNode.parentNode.id){objWrapper.updateStyle("parent",objDropControl.control.id)}}objWrapper.setAbsolutePosition(objAbsolutePosition.x+intDeltaX,objAbsolutePosition.y+intDeltaY,true);if(objWrapper.updateHandle){objWrapper.updateHandle(true,"move")}if(objWrapper.control.getAttribute("onqcodomove")){objWrapper.control.qcodomove=function(strOnMoveCommand){eval(strOnMoveCommand)};objWrapper.control.qcodomove(objWrapper.control.getAttribute("onqcodomove"))}}}else{for(var strKey in this.moveControls){var objWrapper=this.moveControls[strKey];var objMask=objWrapper.mask;objMask.style.cursor=null}if(objWrapper.updateHandle){objWrapper.updateHandle(false,"move")}if(qcodo.isBrowser(this.IE)){this.resetMasks(intDeltaX,intDeltaY,25)}else{this.resetMasks(intDeltaX,intDeltaY,50)}}if((intDeltaX==0)&&(intDeltaY==0)){if(this.control.onclick){return this.control.onclick(objEvent)}else{return true}}else{return qcodo.terminateEvent(objEvent)}};objWrapper.moveControls=new Object();objWrapper.registerMoveTarget=function(mixControl){if(mixControl==null){mixControl=this.control}var objControl;if(!(objControl=qcodo.getControl(mixControl))){return}var objTargetWrapper=objControl.wrapper;if(objTargetWrapper){this.moveControls[objControl.id]=objTargetWrapper}};objWrapper.unregisterMoveTarget=function(mixControl){var objControl;if(!(objControl=qcodo.getControl(mixControl))){return}if(objControl.id){this.moveControls[objControl.id]=null}};objWrapper.clearMoveTargets=function(){this.moveControls=new Object()};objWrapper.registerDropZone=function(mixControl){var objControl;if(!(objControl=qcodo.getControl(mixControl))){return}if(objControl.wrapper){qcodo.registerControlDropZoneTarget(objControl);this.dropControls[objControl.id]=objControl.wrapper}else{this.dropControls[objControl.id]=objControl}};objWrapper.unregisterDropZone=function(mixControl){var objControl;if(!(objControl=qcodo.getControl(mixControl))){return}this.dropControls[objControl.id]=null};objWrapper.clearDropZones=function(){this.dropControls=new Object()};objWrapper.clearDropZones();objWrapper.registerDropZoneGrouping=function(strGroupingId){if(!qcodo.dropZoneGrouping[strGroupingId]){qcodo.dropZoneGrouping[strGroupingId]=new Object}this.dropGroupings[strGroupingId]=true};objWrapper.clearDropZoneGroupings=function(){this.dropGroupings=new Object()};objWrapper.clearDropZoneGroupings();objWrapper.calculateMoveDelta=function(){var intDeltaX=qcodo.page.x-this.startDragX;var intDeltaY=qcodo.page.y-this.startDragY;intDeltaX=Math.min(Math.max(intDeltaX,-1*this.boundingBox.x),qcodo.page.width-this.boundingBox.boundX);intDeltaY=Math.min(Math.max(intDeltaY,-1*this.boundingBox.y),qcodo.page.height-this.boundingBox.boundY);return{x:intDeltaX,y:intDeltaY}};objWrapper.setupBoundingBox=function(){var intMinX=null;var intMinY=null;var intMaxX=null;var intMaxY=null;for(var strKey in this.moveControls){var objMoveControl=this.moveControls[strKey];var objAbsolutePosition=objMoveControl.getAbsolutePosition();if(intMinX==null){intMinX=objAbsolutePosition.x;intMinY=objAbsolutePosition.y;intMaxX=objAbsolutePosition.x+objMoveControl.offsetWidth;intMaxY=objAbsolutePosition.y+objMoveControl.offsetHeight}else{intMinX=Math.min(intMinX,objAbsolutePosition.x);intMinY=Math.min(intMinY,objAbsolutePosition.y);intMaxX=Math.max(intMaxX,objAbsolutePosition.x+objMoveControl.offsetWidth);intMaxY=Math.max(intMaxY,objAbsolutePosition.y+objMoveControl.offsetHeight)}}if(!this.boundingBox){this.boundingBox=new Object()}this.boundingBox.x=intMinX;this.boundingBox.y=intMinY;this.boundingBox.boundX=intMaxX;this.boundingBox.boundY=intMaxY;this.boundingBox.width=intMaxX-intMinX;this.boundingBox.height=intMaxY-intMinY};objWrapper.updateBoundingBox=function(){var intMinX=null;var intMinY=null;var intMaxX=null;var intMaxY=null;for(var strKey in this.moveControls){var objMoveControl=this.moveControls[strKey];var objAbsolutePosition=objMoveControl.getAbsolutePosition();if(intMinX==null){intMinX=objAbsolutePosition.x;intMinY=objAbsolutePosition.y;intMaxX=objAbsolutePosition.x+objMoveControl.mask.offsetWidth;intMaxY=objAbsolutePosition.y+objMoveControl.mask.offsetHeight}else{intMinX=Math.min(intMinX,objAbsolutePosition.x);intMinY=Math.min(intMinY,objAbsolutePosition.y);intMaxX=Math.max(intMaxX,objAbsolutePosition.x+objMoveControl.mask.offsetWidth);intMaxY=Math.max(intMaxY,objAbsolutePosition.y+objMoveControl.mask.offsetHeight)}}this.boundingBox.x=intMinX;this.boundingBox.y=intMinY;this.boundingBox.boundX=intMaxX;this.boundingBox.boundY=intMaxY;this.boundingBox.width=intMaxX-intMinX;this.boundingBox.height=intMaxY-intMinY};objWrapper.moveMasks=function(){var objMoveDelta=this.calculateMoveDelta();var intDeltaX=objMoveDelta.x;var intDeltaY=objMoveDelta.y;var blnValidDropZone=this.validateDropZone();if(blnValidDropZone){this.handle.style.cursor="url("+qc.imageAssets+"/_core/move_drop.cur), auto"}else{this.handle.style.cursor="url("+qc.imageAssets+"/_core/move_nodrop.cur), auto"}for(var strKey in this.moveControls){var objWrapper=this.moveControls[strKey];var objMask=objWrapper.mask;if(objMask.innerHTML==""){objMask.innerHTML="."}if(objMask.innerHTML=="."){objMask.innerHTML=objWrapper.innerHTML.replace(' id="',' id="invalid_mask_')}this.updateBoundingBox();objWrapper.setMaskOffset(intDeltaX,intDeltaY);if(blnValidDropZone){objMask.style.cursor="url("+qc.imageAssets+"/_core/move_drop.cur), auto"}else{objMask.style.cursor="url("+qc.imageAssets+"/_core/move_nodrop.cur), auto"}}};objWrapper.getDropZoneControlWrappers=function(){var arrayToReturn=new Object;for(var strDropKey in this.dropControls){var objDropWrapper=this.dropControls[strDropKey];if(objDropWrapper){arrayToReturn[strDropKey]=objDropWrapper}}for(var strGroupingId in this.dropGroupings){if(this.dropGroupings[strGroupingId]){for(var strControlId in qcodo.dropZoneGrouping[strGroupingId]){if(strControlId.substring(0,1)!="_"){var objDropWrapper=qcodo.dropZoneGrouping[strGroupingId][strControlId];if(objDropWrapper){if(objDropWrapper.control.id==objWrapper.control.id){if(qcodo.dropZoneGrouping[strGroupingId]["__allowSelf"]){arrayToReturn[strControlId]=objDropWrapper}}else{if(objDropWrapper.control.id==objWrapper.parentNode.id){if(qcodo.dropZoneGrouping[strGroupingId]["__allowSelfParent"]){arrayToReturn[strControlId]=objDropWrapper}}else{arrayToReturn[strControlId]=objDropWrapper}}}}}}}return arrayToReturn};objWrapper.validateDropZone=function(){var blnFoundTarget=false;var blnFormOkay=false;var dropControls=this.getDropZoneControlWrappers();for(var strDropKey in dropControls){var objDropWrapper=dropControls[strDropKey];if(objDropWrapper){if(objDropWrapper.nodeName.toLowerCase()=="form"){blnFormOkay=true}else{if(objDropWrapper.containsPoint(qcodo.page.x,qcodo.page.y)){if(blnFoundTarget){objDropWrapper.dropZoneMask.style.display="none"}else{objDropWrapper.dropZoneMask.style.display="block";var objAbsolutePosition=objDropWrapper.getAbsolutePosition();if(qcodo.isBrowser(qcodo.IE)&&(window.document.compatMode=="BackCompat")){objDropWrapper.dropZoneMask.style.width=Math.max(7,objDropWrapper.control.offsetWidth)+"px";objDropWrapper.dropZoneMask.style.height=Math.max(7,objDropWrapper.control.offsetHeight)+"px";var objAbsolutePosition=objDropWrapper.getAbsolutePosition();objDropWrapper.setDropZoneMaskAbsolutePosition(objAbsolutePosition.x,objAbsolutePosition.y)}else{objDropWrapper.dropZoneMask.style.width=Math.max(1,objDropWrapper.control.offsetWidth-6)+"px";objDropWrapper.dropZoneMask.style.height=Math.max(1,objDropWrapper.control.offsetHeight-6)+"px";var objAbsolutePosition=objDropWrapper.getAbsolutePosition();objDropWrapper.setDropZoneMaskAbsolutePosition(objAbsolutePosition.x,objAbsolutePosition.y)}blnFoundTarget=true}}else{objDropWrapper.dropZoneMask.style.display="none"}}}}return(blnFoundTarget||blnFormOkay)};objWrapper.getDropTarget=function(){var objForm=null;var objToReturn=null;var dropControls=this.getDropZoneControlWrappers();for(var strDropKey in dropControls){var objDropWrapper=dropControls[strDropKey];if(objDropWrapper){if(objDropWrapper.nodeName.toLowerCase()=="form"){objForm=objDropWrapper}else{if(objDropWrapper.containsPoint(qcodo.page.x,qcodo.page.y)){objDropWrapper.dropZoneMask.style.display="none";if(!objToReturn){objToReturn=objDropWrapper}}}}}if(objToReturn){return objToReturn}if(objForm){return objForm}return null};objWrapper.resetMasks=function(intDeltaX,intDeltaY,intSpeed){qcodo.moveHandleReset=this;if(intDeltaX||intDeltaY){this.resetCurrentOffsetX=intDeltaX*1;this.resetCurrentOffsetY=intDeltaY*1;var fltTotalMove=Math.sqrt(Math.pow(intDeltaX,2)+Math.pow(intDeltaY,2));var fltRatio=(intSpeed*1)/fltTotalMove;this.resetStepX=fltRatio*intDeltaX;this.resetStepY=fltRatio*intDeltaY;qcodo.setTimeout("move_mask_return","qcodo.wrappers['"+this.id+"'].resetMaskHelper()",10)}};objWrapper.resetMaskHelper=function(){if(this.resetCurrentOffsetX<0){this.resetCurrentOffsetX=Math.min(this.resetCurrentOffsetX-this.resetStepX,0)}else{this.resetCurrentOffsetX=Math.max(this.resetCurrentOffsetX-this.resetStepX,0)}if(this.resetCurrentOffsetY<0){this.resetCurrentOffsetY=Math.min(this.resetCurrentOffsetY-this.resetStepY,0)}else{this.resetCurrentOffsetY=Math.max(this.resetCurrentOffsetY-this.resetStepY,0)}for(var strKey in this.moveControls){var objWrapper=this.moveControls[strKey];objWrapper.setMaskOffset(this.resetCurrentOffsetX,this.resetCurrentOffsetY);if((this.resetCurrentOffsetX==0)&&(this.resetCurrentOffsetY==0)){objWrapper.mask.style.display="none"}}if((this.resetCurrentOffsetX!=0)||(this.resetCurrentOffsetY!=0)){qcodo.setTimeout("move_mask_return","qcodo.wrappers['"+this.id+"'].resetMaskHelper()",10)}else{qcodo.moveHandleReset=null}};objWrapper.resetMasksCancel=function(){qcodo.clearTimeout("move_mask_return");qcodo.moveHandleReset=null;for(var strKey in this.moveControls){var objWrapper=this.moveControls[strKey];objWrapper.mask.style.display="none"}};objWrapper.regMT=objWrapper.registerMoveTarget;objWrapper.regDZ=objWrapper.registerDropZone;objWrapper.regDZG=objWrapper.registerDropZoneGrouping}else{objWrapper.updateHandle()}};qcodo.animateMove=function(e,c,a,b){var j;if(!(j=qcodo.getControl(e))){return}j.destinationX=c;j.destinationY=a;var d=qcodo.getAbsolutePosition(j);j.currentX=d.x*1;j.currentY=d.y*1;var f=Math.sqrt(Math.pow(j.destinationY-j.currentY,2)+Math.pow(j.destinationX-j.currentX,2));var h=(j.destinationX*1)-j.currentX;var g=(j.destinationY*1)-j.currentY;j.stepMoveX=((b*1)/f)*h;j.stepMoveY=((b*1)/f)*g;qcodo.setTimeout(j,"qcodo.handleAnimateMove('"+j.id+"');",10)};qcodo.handleAnimateMove=function(b){var a;if(!(a=qcodo.getControl(b))){return}if(a.stepMoveX<0){a.currentX=Math.max(a.destinationX,a.currentX+a.stepMoveX)}else{a.currentX=Math.min(a.destinationX,a.currentX+a.stepMoveX)}if(a.stepMoveY<0){a.currentY=Math.max(a.destinationY,a.currentY+a.stepMoveY)}else{a.currentY=Math.min(a.destinationY,a.currentY+a.stepMoveY)}qcodo.setAbsolutePosition(a,Math.round(a.currentX),Math.round(a.currentY));if((Math.round(a.currentX)==a.destinationX)&&(Math.round(a.currentY)==a.destinationY)){if(a.handleAnimateComplete){a.handleAnimateComplete(a)}}else{qcodo.setTimeout(a,"qcodo.handleAnimateMove('"+a.id+"');",10)}};qcodo.handleScroll=function(){var c=qcodo.scrollMoveHandle;qcodo.clearTimeout(c.id);var b=0;var a=0;if(qcodo.client.y<=30){var d=(qcodo.isBrowser(qcodo.IE))?1.5:3;a=Math.round((qcodo.client.y-30)/d)}else{if(qcodo.client.y>=(qcodo.client.height-30)){var d=(qcodo.isBrowser(qcodo.IE))?1.5:3;a=Math.round((qcodo.client.y-(qcodo.client.height-30))/d)}}if(qcodo.client.x<=30){var d=(qcodo.isBrowser(qcodo.IE))?1:2;b=Math.round((qcodo.client.x-30)/d)}else{if(qcodo.client.x>=(qcodo.client.width-30)){var d=(qcodo.isBrowser(qcodo.IE))?1:2;b=Math.round((qcodo.client.x-(qcodo.client.width-30))/d)}}if(b<0){b=Math.max(b,0-qcodo.scroll.x)}else{if(b>0){b=Math.min(b,qcodo.scroll.width-qcodo.scroll.x)}}if(a<0){a=Math.max(a,0-qcodo.scroll.y)}else{if(a>0){a=Math.min(a,qcodo.scroll.height-qcodo.scroll.y)}}window.scrollBy(b,a);qcodo.handleEvent(null);c.offsetX-=b;c.offsetY-=a;c.moveMasks();if(b||a){qcodo.setTimeout(c.id,"qcodo.handleScroll()",25)}};qc.regCM=qcodo.registerControlMoveable;qc.regCMH=qcodo.registerControlMoveHandle;qcodo.registerControlResizeHandle=function(mixControl,blnVertical){var objControl;if(!(objControl=qcodo.getControl(mixControl))){return}var objWrapper=objControl.wrapper;objWrapper.resizeHandle=true;objWrapper.resizeDirectionVertical=blnVertical;objWrapper.resizeUpperControls=new Array();objWrapper.resizeLowerControls=new Array();if(!objWrapper.handle){if(qcodo.isBrowser(qcodo.SAFARI)){qcodo.registerControlHandle(objControl,"move")}else{if(qcodo.isBrowser(qcodo.IE)){if(objWrapper.resizeDirectionVertical){qcodo.registerControlHandle(objControl,"row-resize")}else{qcodo.registerControlHandle(objControl,"col-resize")}}else{if(objWrapper.resizeDirectionVertical){qcodo.registerControlHandle(objControl,"ns-resize")}else{qcodo.registerControlHandle(objControl,"ew-resize")}}}qcodo.enableMouseDrag();objWrapper.handleMouseDown=function(objEvent,objHandle){this.startUpperSizes=new Array();this.startLowerSizes=new Array();this.startLowerPositions=new Array();if(this.resizeDirectionVertical){this.offsetY=qcodo.page.y-this.getAbsolutePosition().y;this.startDragY=qcodo.page.y;for(var intIndex=0;intIndex<this.resizeUpperControls.length;intIndex++){var objUpperControl=this.resizeUpperControls[intIndex];this.startUpperSizes[intIndex]=eval(objUpperControl.control.style.height.replace(/px/,""))}for(var intIndex=0;intIndex<this.resizeLowerControls.length;intIndex++){var objLowerControl=this.resizeLowerControls[intIndex];this.startLowerPositions[intIndex]=objLowerControl.getAbsolutePosition().y;this.startLowerSizes[intIndex]=eval(objLowerControl.control.style.height.replace(/px/,""))}if(this.resizeMinimum!=null){this.resizeMinimumY=this.getAbsolutePosition().y-(this.offsetTop-this.resizeMinimum)}else{this.resizeMinimumY=null}if(this.resizeMaximum!=null){this.resizeMaximumY=this.getAbsolutePosition().y-(this.offsetTop-this.resizeMaximum)}else{this.resizeMaximumY=null}}else{this.offsetX=qcodo.page.x-this.getAbsolutePosition().x;this.startDragX=qcodo.page.x;for(var intIndex=0;intIndex<this.resizeUpperControls.length;intIndex++){var objUpperControl=this.resizeUpperControls[intIndex];this.startUpperSizes[intIndex]=eval(objUpperControl.control.style.width.replace(/px/,""))}for(var intIndex=0;intIndex<this.resizeLowerControls.length;intIndex++){var objLowerControl=this.resizeLowerControls[intIndex];this.startLowerPositions[intIndex]=objLowerControl.getAbsolutePosition().x;this.startLowerSizes[intIndex]=eval(objLowerControl.control.style.width.replace(/px/,""))}if(this.resizeMinimum!=null){this.resizeMinimumX=this.getAbsolutePosition().x-(this.offsetLeft-this.resizeMinimum)}else{this.resizeMinimumX=null}if(this.resizeMaximum!=null){this.resizeMaximumX=this.getAbsolutePosition().x-(this.offsetLeft-this.resizeMaximum)}else{this.resizeMaximumX=null}}return qcodo.terminateEvent(objEvent)};objWrapper.handleMouseMove=function(objEvent,objHandle){if(this.resizeDirectionVertical){var intNewY=qcodo.page.y-this.offsetY;if(this.resizeMinimumY!=null){intNewY=Math.max(intNewY,this.resizeMinimumY)}if(this.resizeMaximumY!=null){intNewY=Math.min(intNewY,this.resizeMaximumY)}var intDeltaY=intNewY-this.startDragY+this.offsetY;this.setAbsolutePosition(this.getAbsolutePosition().x,intNewY);for(var intIndex=0;intIndex<this.resizeUpperControls.length;intIndex++){var objUpperControl=this.resizeUpperControls[intIndex];objUpperControl.updateStyle("height",this.startUpperSizes[intIndex]+intDeltaY+"px")}for(var intIndex=0;intIndex<this.resizeLowerControls.length;intIndex++){var objLowerControl=this.resizeLowerControls[intIndex];objLowerControl.setAbsolutePosition(objLowerControl.getAbsolutePosition().x,this.startLowerPositions[intIndex]+intDeltaY);objLowerControl.updateStyle("height",this.startLowerSizes[intIndex]-intDeltaY+"px")}}else{var intNewX=qcodo.page.x-this.offsetX;if(this.resizeMinimumX!=null){intNewX=Math.max(intNewX,this.resizeMinimumX)}if(this.resizeMaximumX!=null){intNewX=Math.min(intNewX,this.resizeMaximumX)}var intDeltaX=intNewX-this.startDragX+this.offsetX;this.setAbsolutePosition(intNewX,this.getAbsolutePosition().y);for(var intIndex=0;intIndex<this.resizeUpperControls.length;intIndex++){var objUpperControl=this.resizeUpperControls[intIndex];objUpperControl.updateStyle("width",this.startUpperSizes[intIndex]+intDeltaX+"px")}for(var intIndex=0;intIndex<this.resizeLowerControls.length;intIndex++){var objLowerControl=this.resizeLowerControls[intIndex];objLowerControl.setAbsolutePosition(this.startLowerPositions[intIndex]+intDeltaX,objLowerControl.getAbsolutePosition().y);objLowerControl.updateStyle("width",this.startLowerSizes[intIndex]-intDeltaX+"px")}}this.updateHandle(false);return qcodo.terminateEvent(objEvent)};objWrapper.handleMouseUp=function(objEvent,objHandle){var blnResized=true;if(this.resizeDirectionVertical){if(this.startDragY==qcodo.page.y){blnResized=false}}else{if(this.startDragX==qcodo.page.x){blnResized=false}}if(blnResized){this.updateHandle(true);if(this.control.getAttribute("onqcodoresize")){this.control.qcodoresize=function(strOnResizeCommand){eval(strOnResizeCommand)};this.control.qcodoresize(this.control.getAttribute("onqcodoresize"))}return qcodo.terminateEvent(objEvent)}else{if(this.control.onclick){return this.control.onclick(objEvent)}else{return true}}};objWrapper.setUpperControl=function(mixControl){var objControl;if(!(objControl=qcodo.getControl(mixControl))){return}var objWrapper=objControl.wrapper;this.resizeUpperControls[this.resizeUpperControls.length]=objWrapper};objWrapper.setLowerControl=function(mixControl){var objControl;if(!(objControl=qcodo.getControl(mixControl))){return}var objWrapper=objControl.wrapper;this.resizeLowerControls[this.resizeLowerControls.length]=objWrapper};objWrapper.resizeMinimum=null;objWrapper.resizeMaximum=null;objWrapper.setResizeMinimum=function(intMinimum){this.resizeMinimum=intMinimum};objWrapper.setResizeMaximum=function(intMaximum){this.resizeMaximum=intMaximum};objWrapper.setUC=objWrapper.setUpperControl;objWrapper.setLC=objWrapper.setLowerControl;objWrapper.setReMi=objWrapper.setResizeMinimum;objWrapper.setReMa=objWrapper.setResizeMaximum}else{objWrapper.updateHandle()}};qc.regCRH=qcodo.registerControlResizeHandle;qcodo.registerImageRollover=function(c,d,b,g){qcodo.handleEvent();var a;if(!(a=qcodo.getControl(c))){return}var f=a.wrapper;f.standardImageSource=d;f.hoverImageSource=b;if(g){f.imageElement=qcodo.getControl(a.id+"_img")}else{f.imageElement=a}f.handleMouseOver=function(j){j=qcodo.handleEvent(j);var h=this;var l=h.wrapper;var n=l.imageElement;var o=n.width;var m=n.height;n.src=l.hoverImageSource;n.width=o;n.height=m};f.handleMouseOut=function(j){j=qcodo.handleEvent(j);var h=this;var l=h.wrapper;var m=l.imageElement;m.src=l.standardImageSource};var e=document.createElement("img");e.src=b;a.onmouseover=f.handleMouseOver;a.onmouseout=f.handleMouseOut};qc.regIR=qcodo.registerImageRollover;function Qcodo__DateTimePicker_Change(e,h){var d=document.getElementById(e+"_lstMonth");var f=document.getElementById(e+"_lstDay");var b=document.getElementById(e+"_lstYear");if(h.options[h.selectedIndex].value==""){d.selectedIndex=0;b.selectedIndex=0;while(f.options.length){f.options[f.options.length-1]=null}f.options[0]=new Option("--","");f.selectedIndex=0}else{if((h==d)||((h==b)&&(d.options[d.selectedIndex].value==2))){var m=f.options[f.selectedIndex].value;var n=f.options[f.options.length-1].value;var g=0;var c=d.options[d.selectedIndex].value;var l=new Number(b.options[b.selectedIndex].value);if(!l){l=2000}switch(c){case"1":case"3":case"5":case"7":case"8":case"10":case"12":g=31;break;case"4":case"6":case"9":case"11":g=30;break;case"2":if((l%4)!=0){g=28}else{if((l%1000)==0){g=29}else{if((l%100)==0){g=28}else{g=29}}}break}if(g!=n){var j=true;if(f.options[0].value==""){j=false}while(f.options.length){f.options[f.options.length-1]=null}if(!j){f.options[0]=new Option("--","")}for(var a=1;a<=g;a++){f.options[f.options.length]=new Option(a,a)}m=Math.min(m,g);if(j){f.options[m-1].selected=true}else{f.options[m].selected=true}}}}}function __resetListBox(c,b){var a=document.forms[c].elements[b];a.selectedIndex=-1;if(a.onchange){a.onchange()}}function treenavToggleImage(d){var c=treenavToggleDisplay(d+"_sub",null,"block");var b=document.getElementById(d+"_image");var e=qc.imageAssets+"/treenav_expanded.png";var a=qc.imageAssets+"/treenav_not_expanded.png";if(c){b.src=e}else{b.src=a}strActualControlId=d.substr(0,d.indexOf("_"));qcodo.recordControlModification(strActualControlId,"ItemExpanded",d+((c)?" 1":" 0"))}function treenavToggleDisplay(c,b,d){var a;if(!(a=qcodo.getControl(c))){return}if(b){if(b=="show"){a.style.display=d;return true}else{a.style.display="none";return false}}else{if(a.style.display=="none"){a.style.display=d;return true}else{a.style.display="none";return false}}}function treenavItemUnselect(c,b){var a=document.getElementById(c);a.className=b;a.onmouseout=function(){treenavItemSetStyle(c,b)}}function treenavItemSetStyle(c,b){var a=document.getElementById(c);a.className=b}function treenavRedrawElement(b,a){document.getElementById(b).innerHTML=a}
/*
 * jQuery JavaScript Library v1.3.2
 * http://jquery.com/
 *
 * Copyright (c) 2009 John Resig
 * Dual licensed under the MIT and GPL licenses.
 * http://docs.jquery.com/License
 *
 * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009)
 * Revision: 6246
 */
(function(){var n=this,g,D=n.jQuery,r=n.$,q=n.jQuery=n.$=function(J,K){return new q.fn.init(J,K)},I=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;q.fn=q.prototype={init:function(J,M){J=J||document;if(J.nodeType){this[0]=J;this.length=1;this.context=J;return this}if(typeof J==="string"){var L=I.exec(J);if(L&&(L[1]||!M)){if(L[1]){J=q.clean([L[1]],M)}else{var N=document.getElementById(L[3]);if(N&&N.id!=L[3]){return q().find(J)}var K=q(N||[]);K.context=document;K.selector=J;return K}}else{return q(M).find(J)}}else{if(q.isFunction(J)){return q(document).ready(J)}}if(J.selector&&J.context){this.selector=J.selector;this.context=J.context}return this.setArray(q.isArray(J)?J:q.makeArray(J))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(J){return J===g?Array.prototype.slice.call(this):this[J]},pushStack:function(K,M,J){var L=q(K);L.prevObject=this;L.context=this.context;if(M==="find"){L.selector=this.selector+(this.selector?" ":"")+J}else{if(M){L.selector=this.selector+"."+M+"("+J+")"}}return L},setArray:function(J){this.length=0;Array.prototype.push.apply(this,J);return this},each:function(K,J){return q.each(this,K,J)},index:function(J){return q.inArray(J&&J.jquery?J[0]:J,this)},attr:function(K,M,L){var J=K;if(typeof K==="string"){if(M===g){return this[0]&&q[L||"attr"](this[0],K)}else{J={};J[K]=M}}return this.each(function(N){for(K in J){q.attr(L?this.style:this,K,q.prop(this,J[K],L,N,K))}})},css:function(J,K){if((J=="width"||J=="height")&&parseFloat(K)<0){K=g}return this.attr(J,K,"curCSS")},text:function(K){if(typeof K!=="object"&&K!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(K))}var J="";q.each(K||this,function(){q.each(this.childNodes,function(){if(this.nodeType!=8){J+=this.nodeType!=1?this.nodeValue:q.fn.text([this])}})});return J},wrapAll:function(J){if(this[0]){var K=q(J,this[0].ownerDocument).clone();if(this[0].parentNode){K.insertBefore(this[0])}K.map(function(){var L=this;while(L.firstChild){L=L.firstChild}return L}).append(this)}return this},wrapInner:function(J){return this.each(function(){q(this).contents().wrapAll(J)})},wrap:function(J){return this.each(function(){q(this).wrapAll(J)})},append:function(){return this.domManip(arguments,true,function(J){if(this.nodeType==1){this.appendChild(J)}})},prepend:function(){return this.domManip(arguments,true,function(J){if(this.nodeType==1){this.insertBefore(J,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(J){this.parentNode.insertBefore(J,this)})},after:function(){return this.domManip(arguments,false,function(J){this.parentNode.insertBefore(J,this.nextSibling)})},end:function(){return this.prevObject||q([])},push:[].push,sort:[].sort,splice:[].splice,find:function(J){if(this.length===1){var K=this.pushStack([],"find",J);K.length=0;q.find(J,this[0],K);return K}else{return this.pushStack(q.unique(q.map(this,function(L){return q.find(J,L)})),"find",J)}},clone:function(L){var J=this.map(function(){if(!q.support.noCloneEvent&&!q.isXMLDoc(this)){var N=this.outerHTML;if(!N){var O=this.ownerDocument.createElement("div");O.appendChild(this.cloneNode(true));N=O.innerHTML}return q.clean([N.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]}else{return this.cloneNode(true)}});if(L===true){var M=this.find("*").andSelf(),K=0;J.find("*").andSelf().each(function(){if(this.nodeName!==M[K].nodeName){return}var N=q.data(M[K],"events");for(var P in N){for(var O in N[P]){q.event.add(this,P,N[P][O],N[P][O].data)}}K++})}return J},filter:function(J){return this.pushStack(q.isFunction(J)&&q.grep(this,function(L,K){return J.call(L,K)})||q.multiFilter(J,q.grep(this,function(K){return K.nodeType===1})),"filter",J)},closest:function(J){var L=q.expr.match.POS.test(J)?q(J):null,K=0;return this.map(function(){var M=this;while(M&&M.ownerDocument){if(L?L.index(M)>-1:q(M).is(J)){q.data(M,"closest",K);return M}M=M.parentNode;K++}})},not:function(J){if(typeof J==="string"){if(f.test(J)){return this.pushStack(q.multiFilter(J,this,true),"not",J)}else{J=q.multiFilter(J,this)}}var K=J.length&&J[J.length-1]!==g&&!J.nodeType;return this.filter(function(){return K?q.inArray(this,J)<0:this!=J})},add:function(J){return this.pushStack(q.unique(q.merge(this.get(),typeof J==="string"?q(J):q.makeArray(J))))},is:function(J){return !!J&&q.multiFilter(J,this).length>0},hasClass:function(J){return !!J&&this.is("."+J)},val:function(P){if(P===g){var J=this[0];if(J){if(q.nodeName(J,"option")){return(J.attributes.value||{}).specified?J.value:J.text}if(q.nodeName(J,"select")){var N=J.selectedIndex,Q=[],R=J.options,M=J.type=="select-one";if(N<0){return null}for(var K=M?N:0,O=M?N+1:R.length;K<O;K++){var L=R[K];if(L.selected){P=q(L).val();if(M){return P}Q.push(P)}}return Q}return(J.value||"").replace(/\r/g,"")}return g}if(typeof P==="number"){P+=""}return this.each(function(){if(this.nodeType!=1){return}if(q.isArray(P)&&/radio|checkbox/.test(this.type)){this.checked=(q.inArray(this.value,P)>=0||q.inArray(this.name,P)>=0)}else{if(q.nodeName(this,"select")){var S=q.makeArray(P);q("option",this).each(function(){this.selected=(q.inArray(this.value,S)>=0||q.inArray(this.text,S)>=0)});if(!S.length){this.selectedIndex=-1}}else{this.value=P}}})},html:function(J){return J===g?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(J)},replaceWith:function(J){return this.after(J).remove()},eq:function(J){return this.slice(J,+J+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(J){return this.pushStack(q.map(this,function(L,K){return J.call(L,K,L)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(O,R,Q){if(this[0]){var N=(this[0].ownerDocument||this[0]).createDocumentFragment(),K=q.clean(O,(this[0].ownerDocument||this[0]),N),M=N.firstChild;if(M){for(var L=0,J=this.length;L<J;L++){Q.call(P(this[L],M),this.length>1||L>0?N.cloneNode(true):N)}}if(K){q.each(K,E)}}return this;function P(S,T){return R&&q.nodeName(S,"table")&&q.nodeName(T,"tr")?(S.getElementsByTagName("tbody")[0]||S.appendChild(S.ownerDocument.createElement("tbody"))):S}}};q.fn.init.prototype=q.fn;function E(J,K){if(K.src){q.ajax({url:K.src,async:false,dataType:"script"})}else{q.globalEval(K.text||K.textContent||K.innerHTML||"")}if(K.parentNode){K.parentNode.removeChild(K)}}function e(){return +new Date}q.extend=q.fn.extend=function(){var O=arguments[0]||{},M=1,N=arguments.length,J=false,L;if(typeof O==="boolean"){J=O;O=arguments[1]||{};M=2}if(typeof O!=="object"&&!q.isFunction(O)){O={}}if(N==M){O=this;--M}for(;M<N;M++){if((L=arguments[M])!=null){for(var K in L){var P=O[K],Q=L[K];if(O===Q){continue}if(J&&Q&&typeof Q==="object"&&!Q.nodeType){O[K]=q.extend(J,P||(Q.length!=null?[]:{}),Q)}else{if(Q!==g){O[K]=Q}}}}}return O};var b=/z-?index|font-?weight|opacity|zoom|line-?height/i,u=document.defaultView||{},w=Object.prototype.toString;q.extend({noConflict:function(J){n.$=r;if(J){n.jQuery=D}return q},isFunction:function(J){return w.call(J)==="[object Function]"},isArray:function(J){return w.call(J)==="[object Array]"},isXMLDoc:function(J){return J.nodeType===9&&J.documentElement.nodeName!=="HTML"||!!J.ownerDocument&&q.isXMLDoc(J.ownerDocument)},globalEval:function(L){if(L&&/\S/.test(L)){var K=document.getElementsByTagName("head")[0]||document.documentElement,J=document.createElement("script");J.type="text/javascript";if(q.support.scriptEval){J.appendChild(document.createTextNode(L))}else{J.text=L}K.insertBefore(J,K.firstChild);K.removeChild(J)}},nodeName:function(K,J){return K.nodeName&&K.nodeName.toUpperCase()==J.toUpperCase()},each:function(L,P,K){var J,M=0,N=L.length;if(K){if(N===g){for(J in L){if(P.apply(L[J],K)===false){break}}}else{for(;M<N;){if(P.apply(L[M++],K)===false){break}}}}else{if(N===g){for(J in L){if(P.call(L[J],J,L[J])===false){break}}}else{for(var O=L[0];M<N&&P.call(O,M,O)!==false;O=L[++M]){}}}return L},prop:function(M,N,L,K,J){if(q.isFunction(N)){N=N.call(M,K)}return typeof N==="number"&&L=="curCSS"&&!b.test(J)?N+"px":N},className:{add:function(J,K){q.each((K||"").split(/\s+/),function(L,M){if(J.nodeType==1&&!q.className.has(J.className,M)){J.className+=(J.className?" ":"")+M}})},remove:function(J,K){if(J.nodeType==1){J.className=K!==g?q.grep(J.className.split(/\s+/),function(L){return !q.className.has(K,L)}).join(" "):""}},has:function(K,J){return K&&q.inArray(J,(K.className||K).toString().split(/\s+/))>-1}},swap:function(M,L,N){var J={};for(var K in L){J[K]=M.style[K];M.style[K]=L[K]}N.call(M);for(var K in L){M.style[K]=J[K]}},css:function(M,K,O,J){if(K=="width"||K=="height"){var Q,L={position:"absolute",visibility:"hidden",display:"block"},P=K=="width"?["Left","Right"]:["Top","Bottom"];function N(){Q=K=="width"?M.offsetWidth:M.offsetHeight;if(J==="border"){return}q.each(P,function(){if(!J){Q-=parseFloat(q.curCSS(M,"padding"+this,true))||0}if(J==="margin"){Q+=parseFloat(q.curCSS(M,"margin"+this,true))||0}else{Q-=parseFloat(q.curCSS(M,"border"+this+"Width",true))||0}})}if(M.offsetWidth!==0){N()}else{q.swap(M,L,N)}return Math.max(0,Math.round(Q))}return q.curCSS(M,K,O)},curCSS:function(N,K,L){var Q,J=N.style;if(K=="opacity"&&!q.support.opacity){Q=q.attr(J,"opacity");return Q==""?"1":Q}if(K.match(/float/i)){K=B}if(!L&&J&&J[K]){Q=J[K]}else{if(u.getComputedStyle){if(K.match(/float/i)){K="float"}K=K.replace(/([A-Z])/g,"-$1").toLowerCase();var R=u.getComputedStyle(N,null);if(R){Q=R.getPropertyValue(K)}if(K=="opacity"&&Q==""){Q="1"}}else{if(N.currentStyle){var O=K.replace(/\-(\w)/g,function(S,T){return T.toUpperCase()});Q=N.currentStyle[K]||N.currentStyle[O];if(!/^\d+(px)?$/i.test(Q)&&/^\d/.test(Q)){var M=J.left,P=N.runtimeStyle.left;N.runtimeStyle.left=N.currentStyle.left;J.left=Q||0;Q=J.pixelLeft+"px";J.left=M;N.runtimeStyle.left=P}}}}return Q},clean:function(K,P,N){P=P||document;if(typeof P.createElement==="undefined"){P=P.ownerDocument||P[0]&&P[0].ownerDocument||document}if(!N&&K.length===1&&typeof K[0]==="string"){var M=/^<(\w+)\s*\/?>$/.exec(K[0]);if(M){return[P.createElement(M[1])]}}var L=[],J=[],Q=P.createElement("div");q.each(K,function(U,X){if(typeof X==="number"){X+=""}if(!X){return}if(typeof X==="string"){X=X.replace(/(<(\w+)[^>]*?)\/>/g,function(Z,aa,Y){return Y.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?Z:aa+"></"+Y+">"});var T=X.replace(/^\s+/,"").substring(0,10).toLowerCase();var V=!T.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!T.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||T.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!T.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!T.indexOf("<td")||!T.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!T.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!q.support.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];Q.innerHTML=V[1]+X+V[2];while(V[0]--){Q=Q.lastChild}if(!q.support.tbody){var W=/<tbody/i.test(X),S=!T.indexOf("<table")&&!W?Q.firstChild&&Q.firstChild.childNodes:V[1]=="<table>"&&!W?Q.childNodes:[];for(var R=S.length-1;R>=0;--R){if(q.nodeName(S[R],"tbody")&&!S[R].childNodes.length){S[R].parentNode.removeChild(S[R])}}}if(!q.support.leadingWhitespace&&/^\s/.test(X)){Q.insertBefore(P.createTextNode(X.match(/^\s*/)[0]),Q.firstChild)}X=q.makeArray(Q.childNodes)}if(X.nodeType){L.push(X)}else{L=q.merge(L,X)}});if(N){for(var O=0;L[O];O++){if(q.nodeName(L[O],"script")&&(!L[O].type||L[O].type.toLowerCase()==="text/javascript")){J.push(L[O].parentNode?L[O].parentNode.removeChild(L[O]):L[O])}else{if(L[O].nodeType===1){L.splice.apply(L,[O+1,0].concat(q.makeArray(L[O].getElementsByTagName("script"))))}N.appendChild(L[O])}}return J}return L},attr:function(O,L,P){if(!O||O.nodeType==3||O.nodeType==8){return g}var M=!q.isXMLDoc(O),Q=P!==g;L=M&&q.props[L]||L;if(O.tagName){var K=/href|src|style/.test(L);if(L=="selected"&&O.parentNode){O.parentNode.selectedIndex}if(L in O&&M&&!K){if(Q){if(L=="type"&&q.nodeName(O,"input")&&O.parentNode){throw"type property can't be changed"}O[L]=P}if(q.nodeName(O,"form")&&O.getAttributeNode(L)){return O.getAttributeNode(L).nodeValue}if(L=="tabIndex"){var N=O.getAttributeNode("tabIndex");return N&&N.specified?N.value:O.nodeName.match(/(button|input|object|select|textarea)/i)?0:O.nodeName.match(/^(a|area)$/i)&&O.href?0:g}return O[L]}if(!q.support.style&&M&&L=="style"){return q.attr(O.style,"cssText",P)}if(Q){O.setAttribute(L,""+P)}var J=!q.support.hrefNormalized&&M&&K?O.getAttribute(L,2):O.getAttribute(L);return J===null?g:J}if(!q.support.opacity&&L=="opacity"){if(Q){O.zoom=1;O.filter=(O.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(P)+""=="NaN"?"":"alpha(opacity="+P*100+")")}return O.filter&&O.filter.indexOf("opacity=")>=0?(parseFloat(O.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}L=L.replace(/-([a-z])/ig,function(R,S){return S.toUpperCase()});if(Q){O[L]=P}return O[L]},trim:function(J){return(J||"").replace(/^\s+|\s+$/g,"")},makeArray:function(L){var J=[];if(L!=null){var K=L.length;if(K==null||typeof L==="string"||q.isFunction(L)||L.setInterval){J[0]=L}else{while(K){J[--K]=L[K]}}}return J},inArray:function(L,M){for(var J=0,K=M.length;J<K;J++){if(M[J]===L){return J}}return -1},merge:function(M,J){var K=0,L,N=M.length;if(!q.support.getAll){while((L=J[K++])!=null){if(L.nodeType!=8){M[N++]=L}}}else{while((L=J[K++])!=null){M[N++]=L}}return M},unique:function(P){var K=[],J={};try{for(var L=0,M=P.length;L<M;L++){var O=q.data(P[L]);if(!J[O]){J[O]=true;K.push(P[L])}}}catch(N){K=P}return K},grep:function(K,O,J){var L=[];for(var M=0,N=K.length;M<N;M++){if(!J!=!O(K[M],M)){L.push(K[M])}}return L},map:function(J,O){var K=[];for(var L=0,M=J.length;L<M;L++){var N=O(J[L],L);if(N!=null){K[K.length]=N}}return K.concat.apply([],K)}});var H=navigator.userAgent.toLowerCase();q.browser={version:(H.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],safari:/webkit/.test(H),opera:/opera/.test(H),msie:/msie/.test(H)&&!/opera/.test(H),mozilla:/mozilla/.test(H)&&!/(compatible|webkit)/.test(H)};q.each({parent:function(J){return J.parentNode},parents:function(J){return q.dir(J,"parentNode")},next:function(J){return q.nth(J,2,"nextSibling")},prev:function(J){return q.nth(J,2,"previousSibling")},nextAll:function(J){return q.dir(J,"nextSibling")},prevAll:function(J){return q.dir(J,"previousSibling")},siblings:function(J){return q.sibling(J.parentNode.firstChild,J)},children:function(J){return q.sibling(J.firstChild)},contents:function(J){return q.nodeName(J,"iframe")?J.contentDocument||J.contentWindow.document:q.makeArray(J.childNodes)}},function(J,K){q.fn[J]=function(L){var M=q.map(this,K);if(L&&typeof L=="string"){M=q.multiFilter(L,M)}return this.pushStack(q.unique(M),J,L)}});q.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(J,K){q.fn[J]=function(L){var O=[],Q=q(L);for(var P=0,M=Q.length;P<M;P++){var N=(P>0?this.clone(true):this).get();q.fn[K].apply(q(Q[P]),N);O=O.concat(N)}return this.pushStack(O,J,L)}});q.each({removeAttr:function(J){q.attr(this,J,"");if(this.nodeType==1){this.removeAttribute(J)}},addClass:function(J){q.className.add(this,J)},removeClass:function(J){q.className.remove(this,J)},toggleClass:function(K,J){if(typeof J!=="boolean"){J=!q.className.has(this,K)}q.className[J?"add":"remove"](this,K)},remove:function(J){if(!J||q.filter(J,[this]).length){q("*",this).add([this]).each(function(){q.event.remove(this);q.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){q(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(J,K){q.fn[J]=function(){return this.each(K,arguments)}});function l(J,K){return J[0]&&parseInt(q.curCSS(J[0],K,true),10)||0}var h="jQuery"+e(),A=0,F={};q.extend({cache:{},data:function(K,J,L){K=K==n?F:K;var M=K[h];if(!M){M=K[h]=++A}if(J&&!q.cache[M]){q.cache[M]={}}if(L!==g){q.cache[M][J]=L}return J?q.cache[M][J]:M},removeData:function(K,J){K=K==n?F:K;var M=K[h];if(J){if(q.cache[M]){delete q.cache[M][J];J="";for(J in q.cache[M]){break}if(!J){q.removeData(K)}}}else{try{delete K[h]}catch(L){if(K.removeAttribute){K.removeAttribute(h)}}delete q.cache[M]}},queue:function(K,J,M){if(K){J=(J||"fx")+"queue";var L=q.data(K,J);if(!L||q.isArray(M)){L=q.data(K,J,q.makeArray(M))}else{if(M){L.push(M)}}}return L},dequeue:function(M,L){var J=q.queue(M,L),K=J.shift();if(!L||L==="fx"){K=J[0]}if(K!==g){K.call(M)}}});q.fn.extend({data:function(J,L){var M=J.split(".");M[1]=M[1]?"."+M[1]:"";if(L===g){var K=this.triggerHandler("getData"+M[1]+"!",[M[0]]);if(K===g&&this.length){K=q.data(this[0],J)}return K===g&&M[1]?this.data(M[0]):K}else{return this.trigger("setData"+M[1]+"!",[M[0],L]).each(function(){q.data(this,J,L)})}},removeData:function(J){return this.each(function(){q.removeData(this,J)})},queue:function(J,K){if(typeof J!=="string"){K=J;J="fx"}if(K===g){return q.queue(this[0],J)}return this.each(function(){var L=q.queue(this,J,K);if(J=="fx"&&L.length==1){L[0].call(this)}})},dequeue:function(J){return this.each(function(){q.dequeue(this,J)})}});
/*
 * Sizzle CSS Selector Engine - v0.9.3
 *  Copyright 2009, The Dojo Foundation
 *  Released under the MIT, BSD, and GPL Licenses.
 *  More information: http://sizzlejs.com/
 */
(function(){var W=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,Q=0,M=Object.prototype.toString;var K=function(ad,Z,ag,ah){ag=ag||[];Z=Z||document;if(Z.nodeType!==1&&Z.nodeType!==9){return[]}if(!ad||typeof ad!=="string"){return ag}var ae=[],ab,ak,an,Y,ai,aa,ac=true;W.lastIndex=0;while((ab=W.exec(ad))!==null){ae.push(ab[1]);if(ab[2]){aa=RegExp.rightContext;break}}if(ae.length>1&&R.exec(ad)){if(ae.length===2&&N.relative[ae[0]]){ak=O(ae[0]+ae[1],Z)}else{ak=N.relative[ae[0]]?[Z]:K(ae.shift(),Z);while(ae.length){ad=ae.shift();if(N.relative[ad]){ad+=ae.shift()}ak=O(ad,ak)}}}else{var aj=ah?{expr:ae.pop(),set:J(ah)}:K.find(ae.pop(),ae.length===1&&Z.parentNode?Z.parentNode:Z,V(Z));ak=K.filter(aj.expr,aj.set);if(ae.length>0){an=J(ak)}else{ac=false}while(ae.length){var am=ae.pop(),al=am;if(!N.relative[am]){am=""}else{al=ae.pop()}if(al==null){al=Z}N.relative[am](an,al,V(Z))}}if(!an){an=ak}if(!an){throw"Syntax error, unrecognized expression: "+(am||ad)}if(M.call(an)==="[object Array]"){if(!ac){ag.push.apply(ag,an)}else{if(Z.nodeType===1){for(var af=0;an[af]!=null;af++){if(an[af]&&(an[af]===true||an[af].nodeType===1&&P(Z,an[af]))){ag.push(ak[af])}}}else{for(var af=0;an[af]!=null;af++){if(an[af]&&an[af].nodeType===1){ag.push(ak[af])}}}}}else{J(an,ag)}if(aa){K(aa,Z,ag,ah);if(L){hasDuplicate=false;ag.sort(L);if(hasDuplicate){for(var af=1;af<ag.length;af++){if(ag[af]===ag[af-1]){ag.splice(af--,1)}}}}}return ag};K.matches=function(Y,Z){return K(Y,null,null,Z)};K.find=function(af,Y,ag){var ae,ac;if(!af){return[]}for(var ab=0,aa=N.order.length;ab<aa;ab++){var ad=N.order[ab],ac;if((ac=N.match[ad].exec(af))){var Z=RegExp.leftContext;if(Z.substr(Z.length-1)!=="\\"){ac[1]=(ac[1]||"").replace(/\\/g,"");ae=N.find[ad](ac,Y,ag);if(ae!=null){af=af.replace(N.match[ad],"");break}}}}if(!ae){ae=Y.getElementsByTagName("*")}return{set:ae,expr:af}};K.filter=function(ai,ah,al,ab){var aa=ai,an=[],af=ah,ad,Y,ae=ah&&ah[0]&&V(ah[0]);while(ai&&ah.length){for(var ag in N.filter){if((ad=N.match[ag].exec(ai))!=null){var Z=N.filter[ag],am,ak;Y=false;if(af==an){an=[]}if(N.preFilter[ag]){ad=N.preFilter[ag](ad,af,al,an,ab,ae);if(!ad){Y=am=true}else{if(ad===true){continue}}}if(ad){for(var ac=0;(ak=af[ac])!=null;ac++){if(ak){am=Z(ak,ad,ac,af);var aj=ab^!!am;if(al&&am!=null){if(aj){Y=true}else{af[ac]=false}}else{if(aj){an.push(ak);Y=true}}}}}if(am!==g){if(!al){af=an}ai=ai.replace(N.match[ag],"");if(!Y){return[]}break}}}if(ai==aa){if(Y==null){throw"Syntax error, unrecognized expression: "+ai}else{break}}aa=ai}return af};var N=K.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(Y){return Y.getAttribute("href")}},relative:{"+":function(af,Y,ae){var ac=typeof Y==="string",ag=ac&&!/\W/.test(Y),ad=ac&&!ag;if(ag&&!ae){Y=Y.toUpperCase()}for(var ab=0,aa=af.length,Z;ab<aa;ab++){if((Z=af[ab])){while((Z=Z.previousSibling)&&Z.nodeType!==1){}af[ab]=ad||Z&&Z.nodeName===Y?Z||false:Z===Y}}if(ad){K.filter(Y,af,true)}},">":function(ae,Z,af){var ac=typeof Z==="string";if(ac&&!/\W/.test(Z)){Z=af?Z:Z.toUpperCase();for(var aa=0,Y=ae.length;aa<Y;aa++){var ad=ae[aa];if(ad){var ab=ad.parentNode;ae[aa]=ab.nodeName===Z?ab:false}}}else{for(var aa=0,Y=ae.length;aa<Y;aa++){var ad=ae[aa];if(ad){ae[aa]=ac?ad.parentNode:ad.parentNode===Z}}if(ac){K.filter(Z,ae,true)}}},"":function(ab,Z,ad){var aa=Q++,Y=X;if(!Z.match(/\W/)){var ac=Z=ad?Z:Z.toUpperCase();Y=U}Y("parentNode",Z,aa,ab,ac,ad)},"~":function(ab,Z,ad){var aa=Q++,Y=X;if(typeof Z==="string"&&!Z.match(/\W/)){var ac=Z=ad?Z:Z.toUpperCase();Y=U}Y("previousSibling",Z,aa,ab,ac,ad)}},find:{ID:function(Z,aa,ab){if(typeof aa.getElementById!=="undefined"&&!ab){var Y=aa.getElementById(Z[1]);return Y?[Y]:[]}},NAME:function(aa,ad,ae){if(typeof ad.getElementsByName!=="undefined"){var Z=[],ac=ad.getElementsByName(aa[1]);for(var ab=0,Y=ac.length;ab<Y;ab++){if(ac[ab].getAttribute("name")===aa[1]){Z.push(ac[ab])}}return Z.length===0?null:Z}},TAG:function(Y,Z){return Z.getElementsByTagName(Y[1])}},preFilter:{CLASS:function(ab,Z,aa,Y,ae,af){ab=" "+ab[1].replace(/\\/g,"")+" ";if(af){return ab}for(var ac=0,ad;(ad=Z[ac])!=null;ac++){if(ad){if(ae^(ad.className&&(" "+ad.className+" ").indexOf(ab)>=0)){if(!aa){Y.push(ad)}}else{if(aa){Z[ac]=false}}}}return false},ID:function(Y){return Y[1].replace(/\\/g,"")},TAG:function(Z,Y){for(var aa=0;Y[aa]===false;aa++){}return Y[aa]&&V(Y[aa])?Z[1]:Z[1].toUpperCase()},CHILD:function(Y){if(Y[1]=="nth"){var Z=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(Y[2]=="even"&&"2n"||Y[2]=="odd"&&"2n+1"||!/\D/.test(Y[2])&&"0n+"+Y[2]||Y[2]);Y[2]=(Z[1]+(Z[2]||1))-0;Y[3]=Z[3]-0}Y[0]=Q++;return Y},ATTR:function(ac,Z,aa,Y,ad,ae){var ab=ac[1].replace(/\\/g,"");if(!ae&&N.attrMap[ab]){ac[1]=N.attrMap[ab]}if(ac[2]==="~="){ac[4]=" "+ac[4]+" "}return ac},PSEUDO:function(ac,Z,aa,Y,ad){if(ac[1]==="not"){if(ac[3].match(W).length>1||/^\w/.test(ac[3])){ac[3]=K(ac[3],null,null,Z)}else{var ab=K.filter(ac[3],Z,aa,true^ad);if(!aa){Y.push.apply(Y,ab)}return false}}else{if(N.match.POS.test(ac[0])||N.match.CHILD.test(ac[0])){return true}}return ac},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){Y.parentNode.selectedIndex;return Y.selected===true},parent:function(Y){return !!Y.firstChild},empty:function(Y){return !Y.firstChild},has:function(aa,Z,Y){return !!K(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.toUpperCase()==="BUTTON"},input:function(Y){return/input|select|textarea|button/i.test(Y.nodeName)}},setFilters:{first:function(Z,Y){return Y===0},last:function(aa,Z,Y,ab){return Z===ab.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(ae,aa,ab,af){var Z=aa[1],ac=N.filters[Z];if(ac){return ac(ae,ab,aa,af)}else{if(Z==="contains"){return(ae.textContent||ae.innerText||"").indexOf(aa[3])>=0}else{if(Z==="not"){var ad=aa[3];for(var ab=0,Y=ad.length;ab<Y;ab++){if(ad[ab]===ae){return false}}return true}}}},CHILD:function(Y,ab){var ae=ab[1],Z=Y;switch(ae){case"only":case"first":while(Z=Z.previousSibling){if(Z.nodeType===1){return false}}if(ae=="first"){return true}Z=Y;case"last":while(Z=Z.nextSibling){if(Z.nodeType===1){return false}}return true;case"nth":var aa=ab[2],ah=ab[3];if(aa==1&&ah==0){return true}var ad=ab[0],ag=Y.parentNode;if(ag&&(ag.sizcache!==ad||!Y.nodeIndex)){var ac=0;for(Z=ag.firstChild;Z;Z=Z.nextSibling){if(Z.nodeType===1){Z.nodeIndex=++ac}}ag.sizcache=ad}var af=Y.nodeIndex-ah;if(aa==0){return af==0}else{return(af%aa==0&&af/aa>=0)}}},ID:function(Z,Y){return Z.nodeType===1&&Z.getAttribute("id")===Y},TAG:function(Z,Y){return(Y==="*"&&Z.nodeType===1)||Z.nodeName===Y},CLASS:function(Z,Y){return(" "+(Z.className||Z.getAttribute("class"))+" ").indexOf(Y)>-1},ATTR:function(ad,ab){var aa=ab[1],Y=N.attrHandle[aa]?N.attrHandle[aa](ad):ad[aa]!=null?ad[aa]:ad.getAttribute(aa),ae=Y+"",ac=ab[2],Z=ab[4];return Y==null?ac==="!=":ac==="="?ae===Z:ac==="*="?ae.indexOf(Z)>=0:ac==="~="?(" "+ae+" ").indexOf(Z)>=0:!Z?ae&&Y!==false:ac==="!="?ae!=Z:ac==="^="?ae.indexOf(Z)===0:ac==="$="?ae.substr(ae.length-Z.length)===Z:ac==="|="?ae===Z||ae.substr(0,Z.length+1)===Z+"-":false},POS:function(ac,Z,aa,ad){var Y=Z[2],ab=N.setFilters[Y];if(ab){return ab(ac,aa,Z,ad)}}}};var R=N.match.POS;for(var T in N.match){N.match[T]=RegExp(N.match[T].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var J=function(Z,Y){Z=Array.prototype.slice.call(Z);if(Y){Y.push.apply(Y,Z);return Y}return Z};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(S){J=function(ac,ab){var Z=ab||[];if(M.call(ac)==="[object Array]"){Array.prototype.push.apply(Z,ac)}else{if(typeof ac.length==="number"){for(var aa=0,Y=ac.length;aa<Y;aa++){Z.push(ac[aa])}}else{for(var aa=0;ac[aa];aa++){Z.push(ac[aa])}}}return Z}}var L;if(document.documentElement.compareDocumentPosition){L=function(Z,Y){var aa=Z.compareDocumentPosition(Y)&4?-1:Z===Y?0:1;if(aa===0){hasDuplicate=true}return aa}}else{if("sourceIndex" in document.documentElement){L=function(Z,Y){var aa=Z.sourceIndex-Y.sourceIndex;if(aa===0){hasDuplicate=true}return aa}}else{if(document.createRange){L=function(ab,Z){var aa=ab.ownerDocument.createRange(),Y=Z.ownerDocument.createRange();aa.selectNode(ab);aa.collapse(true);Y.selectNode(Z);Y.collapse(true);var ac=aa.compareBoundaryPoints(Range.START_TO_END,Y);if(ac===0){hasDuplicate=true}return ac}}}}(function(){var Z=document.createElement("form"),aa="script"+(new Date).getTime();Z.innerHTML="<input name='"+aa+"'/>";var Y=document.documentElement;Y.insertBefore(Z,Y.firstChild);if(!!document.getElementById(aa)){N.find.ID=function(ac,ad,ae){if(typeof ad.getElementById!=="undefined"&&!ae){var ab=ad.getElementById(ac[1]);return ab?ab.id===ac[1]||typeof ab.getAttributeNode!=="undefined"&&ab.getAttributeNode("id").nodeValue===ac[1]?[ab]:g:[]}};N.filter.ID=function(ad,ab){var ac=typeof ad.getAttributeNode!=="undefined"&&ad.getAttributeNode("id");return ad.nodeType===1&&ac&&ac.nodeValue===ab}}Y.removeChild(Z)})();(function(){var Y=document.createElement("div");Y.appendChild(document.createComment(""));if(Y.getElementsByTagName("*").length>0){N.find.TAG=function(Z,ad){var ac=ad.getElementsByTagName(Z[1]);if(Z[1]==="*"){var ab=[];for(var aa=0;ac[aa];aa++){if(ac[aa].nodeType===1){ab.push(ac[aa])}}ac=ab}return ac}}Y.innerHTML="<a href='#'></a>";if(Y.firstChild&&typeof Y.firstChild.getAttribute!=="undefined"&&Y.firstChild.getAttribute("href")!=="#"){N.attrHandle.href=function(Z){return Z.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var Y=K,Z=document.createElement("div");Z.innerHTML="<p class='TEST'></p>";if(Z.querySelectorAll&&Z.querySelectorAll(".TEST").length===0){return}K=function(ad,ac,aa,ab){ac=ac||document;if(!ab&&ac.nodeType===9&&!V(ac)){try{return J(ac.querySelectorAll(ad),aa)}catch(ae){}}return Y(ad,ac,aa,ab)};K.find=Y.find;K.filter=Y.filter;K.selectors=Y.selectors;K.matches=Y.matches})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var Y=document.createElement("div");Y.innerHTML="<div class='test e'></div><div class='test'></div>";if(Y.getElementsByClassName("e").length===0){return}Y.lastChild.className="e";if(Y.getElementsByClassName("e").length===1){return}N.order.splice(1,0,"CLASS");N.find.CLASS=function(Z,aa,ab){if(typeof aa.getElementsByClassName!=="undefined"&&!ab){return aa.getElementsByClassName(Z[1])}}})()}function U(Z,ae,ad,ai,af,ah){var ag=Z=="previousSibling"&&!ah;for(var ab=0,aa=ai.length;ab<aa;ab++){var Y=ai[ab];if(Y){if(ag&&Y.nodeType===1){Y.sizcache=ad;Y.sizset=ab}Y=Y[Z];var ac=false;while(Y){if(Y.sizcache===ad){ac=ai[Y.sizset];break}if(Y.nodeType===1&&!ah){Y.sizcache=ad;Y.sizset=ab}if(Y.nodeName===ae){ac=Y;break}Y=Y[Z]}ai[ab]=ac}}}function X(Z,ae,ad,ai,af,ah){var ag=Z=="previousSibling"&&!ah;for(var ab=0,aa=ai.length;ab<aa;ab++){var Y=ai[ab];if(Y){if(ag&&Y.nodeType===1){Y.sizcache=ad;Y.sizset=ab}Y=Y[Z];var ac=false;while(Y){if(Y.sizcache===ad){ac=ai[Y.sizset];break}if(Y.nodeType===1){if(!ah){Y.sizcache=ad;Y.sizset=ab}if(typeof ae!=="string"){if(Y===ae){ac=true;break}}else{if(K.filter(ae,[Y]).length>0){ac=Y;break}}}Y=Y[Z]}ai[ab]=ac}}}var P=document.compareDocumentPosition?function(Z,Y){return Z.compareDocumentPosition(Y)&16}:function(Z,Y){return Z!==Y&&(Z.contains?Z.contains(Y):true)};var V=function(Y){return Y.nodeType===9&&Y.documentElement.nodeName!=="HTML"||!!Y.ownerDocument&&V(Y.ownerDocument)};var O=function(Y,af){var ab=[],ac="",ad,aa=af.nodeType?[af]:af;while((ad=N.match.PSEUDO.exec(Y))){ac+=ad[0];Y=Y.replace(N.match.PSEUDO,"")}Y=N.relative[Y]?Y+"*":Y;for(var ae=0,Z=aa.length;ae<Z;ae++){K(Y,aa[ae],ab)}return K.filter(ac,ab)};q.find=K;q.filter=K.filter;q.expr=K.selectors;q.expr[":"]=q.expr.filters;K.selectors.filters.hidden=function(Y){return Y.offsetWidth===0||Y.offsetHeight===0};K.selectors.filters.visible=function(Y){return Y.offsetWidth>0||Y.offsetHeight>0};K.selectors.filters.animated=function(Y){return q.grep(q.timers,function(Z){return Y===Z.elem}).length};q.multiFilter=function(aa,Y,Z){if(Z){aa=":not("+aa+")"}return K.matches(aa,Y)};q.dir=function(aa,Z){var Y=[],ab=aa[Z];while(ab&&ab!=document){if(ab.nodeType==1){Y.push(ab)}ab=ab[Z]}return Y};q.nth=function(ac,Y,aa,ab){Y=Y||1;var Z=0;for(;ac;ac=ac[aa]){if(ac.nodeType==1&&++Z==Y){break}}return ac};q.sibling=function(aa,Z){var Y=[];for(;aa;aa=aa.nextSibling){if(aa.nodeType==1&&aa!=Z){Y.push(aa)}}return Y};return;n.Sizzle=K})();q.event={add:function(N,K,M,P){if(N.nodeType==3||N.nodeType==8){return}if(N.setInterval&&N!=n){N=n}if(!M.guid){M.guid=this.guid++}if(P!==g){var L=M;M=this.proxy(L);M.data=P}var J=q.data(N,"events")||q.data(N,"events",{}),O=q.data(N,"handle")||q.data(N,"handle",function(){return typeof q!=="undefined"&&!q.event.triggered?q.event.handle.apply(arguments.callee.elem,arguments):g});O.elem=N;q.each(K.split(/\s+/),function(R,S){var T=S.split(".");S=T.shift();M.type=T.slice().sort().join(".");var Q=J[S];if(q.event.specialAll[S]){q.event.specialAll[S].setup.call(N,P,T)}if(!Q){Q=J[S]={};if(!q.event.special[S]||q.event.special[S].setup.call(N,P,T)===false){if(N.addEventListener){N.addEventListener(S,O,false)}else{if(N.attachEvent){N.attachEvent("on"+S,O)}}}}Q[M.guid]=M;q.event.global[S]=true});N=null},guid:1,global:{},remove:function(P,M,O){if(P.nodeType==3||P.nodeType==8){return}var L=q.data(P,"events"),K,J;if(L){if(M===g||(typeof M==="string"&&M.charAt(0)==".")){for(var N in L){this.remove(P,N+(M||""))}}else{if(M.type){O=M.handler;M=M.type}q.each(M.split(/\s+/),function(R,T){var V=T.split(".");T=V.shift();var S=RegExp("(^|\\.)"+V.slice().sort().join(".*\\.")+"(\\.|$)");if(L[T]){if(O){delete L[T][O.guid]}else{for(var U in L[T]){if(S.test(L[T][U].type)){delete L[T][U]}}}if(q.event.specialAll[T]){q.event.specialAll[T].teardown.call(P,V)}for(K in L[T]){break}if(!K){if(!q.event.special[T]||q.event.special[T].teardown.call(P,V)===false){if(P.removeEventListener){P.removeEventListener(T,q.data(P,"handle"),false)}else{if(P.detachEvent){P.detachEvent("on"+T,q.data(P,"handle"))}}}K=null;delete L[T]}}})}for(K in L){break}if(!K){var Q=q.data(P,"handle");if(Q){Q.elem=null}q.removeData(P,"events");q.removeData(P,"handle")}}},trigger:function(N,P,M,J){var L=N.type||N;if(!J){N=typeof N==="object"?N[h]?N:q.extend(q.Event(L),N):q.Event(L);if(L.indexOf("!")>=0){N.type=L=L.slice(0,-1);N.exclusive=true}if(!M){N.stopPropagation();if(this.global[L]){q.each(q.cache,function(){if(this.events&&this.events[L]){q.event.trigger(N,P,this.handle.elem)}})}}if(!M||M.nodeType==3||M.nodeType==8){return g}N.result=g;N.target=M;P=q.makeArray(P);P.unshift(N)}N.currentTarget=M;var O=q.data(M,"handle");if(O){O.apply(M,P)}if((!M[L]||(q.nodeName(M,"a")&&L=="click"))&&M["on"+L]&&M["on"+L].apply(M,P)===false){N.result=false}if(!J&&M[L]&&!N.isDefaultPrevented()&&!(q.nodeName(M,"a")&&L=="click")){this.triggered=true;try{M[L]()}catch(Q){}}this.triggered=false;if(!N.isPropagationStopped()){var K=M.parentNode||M.ownerDocument;if(K){q.event.trigger(N,P,K,true)}}},handle:function(P){var O,J;P=arguments[0]=q.event.fix(P||n.event);P.currentTarget=this;var Q=P.type.split(".");P.type=Q.shift();O=!Q.length&&!P.exclusive;var N=RegExp("(^|\\.)"+Q.slice().sort().join(".*\\.")+"(\\.|$)");J=(q.data(this,"events")||{})[P.type];for(var L in J){var M=J[L];if(O||N.test(M.type)){P.handler=M;P.data=M.data;var K=M.apply(this,arguments);if(K!==g){P.result=K;if(K===false){P.preventDefault();P.stopPropagation()}}if(P.isImmediatePropagationStopped()){break}}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(M){if(M[h]){return M}var K=M;M=q.Event(K);for(var L=this.props.length,O;L;){O=this.props[--L];M[O]=K[O]}if(!M.target){M.target=M.srcElement||document}if(M.target.nodeType==3){M.target=M.target.parentNode}if(!M.relatedTarget&&M.fromElement){M.relatedTarget=M.fromElement==M.target?M.toElement:M.fromElement}if(M.pageX==null&&M.clientX!=null){var N=document.documentElement,J=document.body;M.pageX=M.clientX+(N&&N.scrollLeft||J&&J.scrollLeft||0)-(N.clientLeft||0);M.pageY=M.clientY+(N&&N.scrollTop||J&&J.scrollTop||0)-(N.clientTop||0)}if(!M.which&&((M.charCode||M.charCode===0)?M.charCode:M.keyCode)){M.which=M.charCode||M.keyCode}if(!M.metaKey&&M.ctrlKey){M.metaKey=M.ctrlKey}if(!M.which&&M.button){M.which=(M.button&1?1:(M.button&2?3:(M.button&4?2:0)))}return M},proxy:function(K,J){J=J||function(){return K.apply(this,arguments)};J.guid=K.guid=K.guid||J.guid||this.guid++;return J},special:{ready:{setup:G,teardown:function(){}}},specialAll:{live:{setup:function(J,K){q.event.add(this,K[0],c)},teardown:function(L){if(L.length){var J=0,K=RegExp("(^|\\.)"+L[0]+"(\\.|$)");q.each((q.data(this,"events").live||{}),function(){if(K.test(this.type)){J++}});if(J<1){q.event.remove(this,L[0],c)}}}}}};q.Event=function(J){if(!this.preventDefault){return new q.Event(J)}if(J&&J.type){this.originalEvent=J;this.type=J.type}else{this.type=J}this.timeStamp=e();this[h]=true};function m(){return false}function z(){return true}q.Event.prototype={preventDefault:function(){this.isDefaultPrevented=z;var J=this.originalEvent;if(!J){return}if(J.preventDefault){J.preventDefault()}J.returnValue=false},stopPropagation:function(){this.isPropagationStopped=z;var J=this.originalEvent;if(!J){return}if(J.stopPropagation){J.stopPropagation()}J.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=z;this.stopPropagation()},isDefaultPrevented:m,isPropagationStopped:m,isImmediatePropagationStopped:m};var a=function(K){var J=K.relatedTarget;while(J&&J!=this){try{J=J.parentNode}catch(L){J=this}}if(J!=this){K.type=K.data;q.event.handle.apply(this,arguments)}};q.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(K,J){q.event.special[J]={setup:function(){q.event.add(this,K,a,J)},teardown:function(){q.event.remove(this,K,a)}}});q.fn.extend({bind:function(K,L,J){return K=="unload"?this.one(K,L,J):this.each(function(){q.event.add(this,K,J||L,J&&L)})},one:function(L,M,K){var J=q.event.proxy(K||M,function(N){q(this).unbind(N,J);return(K||M).apply(this,arguments)});return this.each(function(){q.event.add(this,L,J,K&&M)})},unbind:function(K,J){return this.each(function(){q.event.remove(this,K,J)})},trigger:function(J,K){return this.each(function(){q.event.trigger(J,K,this)})},triggerHandler:function(J,L){if(this[0]){var K=q.Event(J);K.preventDefault();K.stopPropagation();q.event.trigger(K,L,this[0]);return K.result}},toggle:function(L){var J=arguments,K=1;while(K<J.length){q.event.proxy(L,J[K++])}return this.click(q.event.proxy(L,function(M){this.lastToggle=(this.lastToggle||0)%K;M.preventDefault();return J[this.lastToggle++].apply(this,arguments)||false}))},hover:function(J,K){return this.mouseenter(J).mouseleave(K)},ready:function(J){G();if(q.isReady){J.call(document,q)}else{q.readyList.push(J)}return this},live:function(L,K){var J=q.event.proxy(K);J.guid+=this.selector+L;q(document).bind(j(L,this.selector),this.selector,J);return this},die:function(K,J){q(document).unbind(j(K,this.selector),J?{guid:J.guid+this.selector+K}:null);return this}});function c(M){var J=RegExp("(^|\\.)"+M.type+"(\\.|$)"),L=true,K=[];q.each(q.data(this,"events").live||[],function(N,O){if(J.test(O.type)){var P=q(M.target).closest(O.data)[0];if(P){K.push({elem:P,fn:O})}}});K.sort(function(O,N){return q.data(O.elem,"closest")-q.data(N.elem,"closest")});q.each(K,function(){if(this.fn.call(this.elem,M,this.fn.data)===false){return(L=false)}});return L}function j(K,J){return["live",K,J.replace(/\./g,"`").replace(/ /g,"|")].join(".")}q.extend({isReady:false,readyList:[],ready:function(){if(!q.isReady){q.isReady=true;if(q.readyList){q.each(q.readyList,function(){this.call(document,q)});q.readyList=null}q(document).triggerHandler("ready")}}});var C=false;function G(){if(C){return}C=true;if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false);q.ready()},false)}else{if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);q.ready()}});if(document.documentElement.doScroll&&n==n.top){(function(){if(q.isReady){return}try{document.documentElement.doScroll("left")}catch(J){setTimeout(arguments.callee,0);return}q.ready()})()}}}q.event.add(n,"load",q.ready)}q.each(("blur,focus,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave,change,select,submit,keydown,keypress,keyup,error").split(","),function(K,J){q.fn[J]=function(L){return L?this.bind(J,L):this.trigger(J)}});q(n).bind("unload",function(){for(var J in q.cache){if(J!=1&&q.cache[J].handle){q.event.remove(q.cache[J].handle.elem)}}});(function(){q.support={};var K=document.documentElement,L=document.createElement("script"),P=document.createElement("div"),O="script"+(new Date).getTime();P.style.display="none";P.innerHTML='   <link/><table></table><a href="/a" style="color:red;float:left;opacity:.5;">a</a><select><option>text</option></select><object><param/></object>';var M=P.getElementsByTagName("*"),J=P.getElementsByTagName("a")[0];if(!M||!M.length||!J){return}q.support={leadingWhitespace:P.firstChild.nodeType==3,tbody:!P.getElementsByTagName("tbody").length,objectAll:!!P.getElementsByTagName("object")[0].getElementsByTagName("*").length,htmlSerialize:!!P.getElementsByTagName("link").length,style:/red/.test(J.getAttribute("style")),hrefNormalized:J.getAttribute("href")==="/a",opacity:J.style.opacity==="0.5",cssFloat:!!J.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};L.type="text/javascript";try{L.appendChild(document.createTextNode("window."+O+"=1;"))}catch(N){}K.insertBefore(L,K.firstChild);if(n[O]){q.support.scriptEval=true;delete n[O]}K.removeChild(L);if(P.attachEvent&&P.fireEvent){P.attachEvent("onclick",function(){q.support.noCloneEvent=false;P.detachEvent("onclick",arguments.callee)});P.cloneNode(true).fireEvent("onclick")}q(function(){var Q=document.createElement("div");Q.style.width=Q.style.paddingLeft="1px";document.body.appendChild(Q);q.boxModel=q.support.boxModel=Q.offsetWidth===2;document.body.removeChild(Q).style.display="none"})})();var B=q.support.cssFloat?"cssFloat":"styleFloat";q.props={"for":"htmlFor","class":"className","float":B,cssFloat:B,styleFloat:B,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",tabindex:"tabIndex"};q.fn.extend({_load:q.fn.load,load:function(L,O,P){if(typeof L!=="string"){return this._load(L)}var N=L.indexOf(" ");if(N>=0){var J=L.slice(N,L.length);L=L.slice(0,N)}var M="GET";if(O){if(q.isFunction(O)){P=O;O=null}else{if(typeof O==="object"){O=q.param(O);M="POST"}}}var K=this;q.ajax({url:L,type:M,dataType:"html",data:O,complete:function(R,Q){if(Q=="success"||Q=="notmodified"){K.html(J?q("<div/>").append(R.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(J):R.responseText)}if(P){K.each(P,[R.responseText,Q,R])}}});return this},serialize:function(){return q.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?q.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|search/i.test(this.type))}).map(function(J,K){var L=q(this).val();return L==null?null:q.isArray(L)?q.map(L,function(N,M){return{name:K.name,value:N}}):{name:K.name,value:L}}).get()}});q.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(J,K){q.fn[K]=function(L){return this.bind(K,L)}});var v=e();q.extend({get:function(J,L,M,K){if(q.isFunction(L)){M=L;L=null}return q.ajax({type:"GET",url:J,data:L,success:M,dataType:K})},getScript:function(J,K){return q.get(J,null,K,"script")},getJSON:function(J,K,L){return q.get(J,K,L,"json")},post:function(J,L,M,K){if(q.isFunction(L)){M=L;L={}}return q.ajax({type:"POST",url:J,data:L,success:M,dataType:K})},ajaxSetup:function(J){q.extend(q.ajaxSettings,J)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return n.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(R){R=q.extend(true,R,q.extend(true,{},q.ajaxSettings,R));var ab,K=/=\?(&|$)/g,W,aa,L=R.type.toUpperCase();if(R.data&&R.processData&&typeof R.data!=="string"){R.data=q.param(R.data)}if(R.dataType=="jsonp"){if(L=="GET"){if(!R.url.match(K)){R.url+=(R.url.match(/\?/)?"&":"?")+(R.jsonp||"callback")+"=?"}}else{if(!R.data||!R.data.match(K)){R.data=(R.data?R.data+"&":"")+(R.jsonp||"callback")+"=?"}}R.dataType="json"}if(R.dataType=="json"&&(R.data&&R.data.match(K)||R.url.match(K))){ab="jsonp"+v++;if(R.data){R.data=(R.data+"").replace(K,"="+ab+"$1")}R.url=R.url.replace(K,"="+ab+"$1");R.dataType="script";n[ab]=function(ac){aa=ac;N();Q();n[ab]=g;try{delete n[ab]}catch(ad){}if(M){M.removeChild(Y)}}}if(R.dataType=="script"&&R.cache==null){R.cache=false}if(R.cache===false&&L=="GET"){var J=e();var Z=R.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+J+"$2");R.url=Z+((Z==R.url)?(R.url.match(/\?/)?"&":"?")+"_="+J:"")}if(R.data&&L=="GET"){R.url+=(R.url.match(/\?/)?"&":"?")+R.data;R.data=null}if(R.global&&!q.active++){q.event.trigger("ajaxStart")}var V=/^(\w+:)?\/\/([^\/?#]+)/.exec(R.url);if(R.dataType=="script"&&L=="GET"&&V&&(V[1]&&V[1]!=location.protocol||V[2]!=location.host)){var M=document.getElementsByTagName("head")[0];var Y=document.createElement("script");Y.src=R.url;if(R.scriptCharset){Y.charset=R.scriptCharset}if(!ab){var T=false;Y.onload=Y.onreadystatechange=function(){if(!T&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){T=true;N();Q();Y.onload=Y.onreadystatechange=null;M.removeChild(Y)}}}M.appendChild(Y);return g}var P=false;var O=R.xhr();if(R.username){O.open(L,R.url,R.async,R.username,R.password)}else{O.open(L,R.url,R.async)}try{if(R.data){O.setRequestHeader("Content-Type",R.contentType)}if(R.ifModified){O.setRequestHeader("If-Modified-Since",q.lastModified[R.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}O.setRequestHeader("X-Requested-With","XMLHttpRequest");O.setRequestHeader("Accept",R.dataType&&R.accepts[R.dataType]?R.accepts[R.dataType]+", */*":R.accepts._default)}catch(X){}if(R.beforeSend&&R.beforeSend(O,R)===false){if(R.global&&!--q.active){q.event.trigger("ajaxStop")}O.abort();return false}if(R.global){q.event.trigger("ajaxSend",[O,R])}var S=function(ac){if(O.readyState==0){if(U){clearInterval(U);U=null;if(R.global&&!--q.active){q.event.trigger("ajaxStop")}}}else{if(!P&&O&&(O.readyState==4||ac=="timeout")){P=true;if(U){clearInterval(U);U=null}W=ac=="timeout"?"timeout":!q.httpSuccess(O)?"error":R.ifModified&&q.httpNotModified(O,R.url)?"notmodified":"success";if(W=="success"){try{aa=q.httpData(O,R.dataType,R)}catch(ae){W="parsererror"}}if(W=="success"){var ad;try{ad=O.getResponseHeader("Last-Modified")}catch(ae){}if(R.ifModified&&ad){q.lastModified[R.url]=ad}if(!ab){N()}}else{q.handleError(R,O,W)}Q();if(ac){O.abort()}if(R.async){O=null}}}};if(R.async){var U=setInterval(S,13);if(R.timeout>0){setTimeout(function(){if(O&&!P){S("timeout")}},R.timeout)}}try{O.send(R.data)}catch(X){q.handleError(R,O,null,X)}if(!R.async){S()}function N(){if(R.success){R.success(aa,W)}if(R.global){q.event.trigger("ajaxSuccess",[O,R])}}function Q(){if(R.complete){R.complete(O,W)}if(R.global){q.event.trigger("ajaxComplete",[O,R])}if(R.global&&!--q.active){q.event.trigger("ajaxStop")}}return O},handleError:function(K,M,J,L){if(K.error){K.error(M,J,L)}if(K.global){q.event.trigger("ajaxError",[M,K,L])}},active:0,httpSuccess:function(K){try{return !K.status&&location.protocol=="file:"||(K.status>=200&&K.status<300)||K.status==304||K.status==1223}catch(J){}return false},httpNotModified:function(L,J){try{var M=L.getResponseHeader("Last-Modified");return L.status==304||M==q.lastModified[J]}catch(K){}return false},httpData:function(O,M,L){var K=O.getResponseHeader("content-type"),J=M=="xml"||!M&&K&&K.indexOf("xml")>=0,N=J?O.responseXML:O.responseText;if(J&&N.documentElement.tagName=="parsererror"){throw"parsererror"}if(L&&L.dataFilter){N=L.dataFilter(N,M)}if(typeof N==="string"){if(M=="script"){q.globalEval(N)}if(M=="json"){N=n["eval"]("("+N+")")}}return N},param:function(J){var L=[];function M(N,O){L[L.length]=encodeURIComponent(N)+"="+encodeURIComponent(O)}if(q.isArray(J)||J.jquery){q.each(J,function(){M(this.name,this.value)})}else{for(var K in J){if(q.isArray(J[K])){q.each(J[K],function(){M(K,this)})}else{M(K,q.isFunction(J[K])?J[K]():J[K])}}}return L.join("&").replace(/%20/g,"+")}});var o={},p,d=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function y(K,J){var L={};q.each(d.concat.apply([],d.slice(0,J)),function(){L[this]=K});return L}q.fn.extend({show:function(O,Q){if(O){return this.animate(y("show",3),O,Q)}else{for(var M=0,K=this.length;M<K;M++){var J=q.data(this[M],"olddisplay");this[M].style.display=J||"";if(q.css(this[M],"display")==="none"){var L=this[M].tagName,P;if(o[L]){P=o[L]}else{var N=q("<"+L+" />").appendTo("body");P=N.css("display");if(P==="none"){P="block"}N.remove();o[L]=P}q.data(this[M],"olddisplay",P)}}for(var M=0,K=this.length;M<K;M++){this[M].style.display=q.data(this[M],"olddisplay")||""}return this}},hide:function(M,N){if(M){return this.animate(y("hide",3),M,N)}else{for(var L=0,K=this.length;L<K;L++){var J=q.data(this[L],"olddisplay");if(!J&&J!=="none"){q.data(this[L],"olddisplay",q.css(this[L],"display"))}}for(var L=0,K=this.length;L<K;L++){this[L].style.display="none"}return this}},_toggle:q.fn.toggle,toggle:function(L,K){var J=typeof L==="boolean";return q.isFunction(L)&&q.isFunction(K)?this._toggle.apply(this,arguments):L==null||J?this.each(function(){var M=J?L:q(this).is(":hidden");q(this)[M?"show":"hide"]()}):this.animate(y("toggle",3),L,K)},fadeTo:function(J,L,K){return this.animate({opacity:L},J,K)},animate:function(N,K,M,L){var J=q.speed(K,M,L);return this[J.queue===false?"each":"queue"](function(){var P=q.extend({},J),R,Q=this.nodeType==1&&q(this).is(":hidden"),O=this;for(R in N){if(N[R]=="hide"&&Q||N[R]=="show"&&!Q){return P.complete.call(this)}if((R=="height"||R=="width")&&this.style){P.display=q.css(this,"display");P.overflow=this.style.overflow}}if(P.overflow!=null){this.style.overflow="hidden"}P.curAnim=q.extend({},N);q.each(N,function(T,X){var W=new q.fx(O,P,T);if(/toggle|show|hide/.test(X)){W[X=="toggle"?Q?"show":"hide":X](N)}else{var V=X.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),Y=W.cur(true)||0;if(V){var S=parseFloat(V[2]),U=V[3]||"px";if(U!="px"){O.style[T]=(S||1)+U;Y=((S||1)/W.cur(true))*Y;O.style[T]=Y+U}if(V[1]){S=((V[1]=="-="?-1:1)*S)+Y}W.custom(Y,S,U)}else{W.custom(Y,X,"")}}});return true})},stop:function(K,J){var L=q.timers;if(K){this.queue([])}this.each(function(){for(var M=L.length-1;M>=0;M--){if(L[M].elem==this){if(J){L[M](true)}L.splice(M,1)}}});if(!J){this.dequeue()}return this}});q.each({slideDown:y("show",1),slideUp:y("hide",1),slideToggle:y("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(J,K){q.fn[J]=function(L,M){return this.animate(K,L,M)}});q.extend({speed:function(L,M,K){var J=typeof L==="object"?L:{complete:K||!K&&M||q.isFunction(L)&&L,duration:L,easing:K&&M||M&&!q.isFunction(M)&&M};J.duration=q.fx.off?0:typeof J.duration==="number"?J.duration:q.fx.speeds[J.duration]||q.fx.speeds._default;J.old=J.complete;J.complete=function(){if(J.queue!==false){q(this).dequeue()}if(q.isFunction(J.old)){J.old.call(this)}};return J},easing:{linear:function(L,M,J,K){return J+K*L},swing:function(L,M,J,K){return((-Math.cos(L*Math.PI)/2)+0.5)*K+J}},timers:[],fx:function(K,J,L){this.options=J;this.elem=K;this.prop=L;if(!J.orig){J.orig={}}}});q.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(q.fx.step[this.prop]||q.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(K){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var J=parseFloat(q.css(this.elem,this.prop,K));return J&&J>-10000?J:parseFloat(q.curCSS(this.elem,this.prop))||0},custom:function(N,M,L){if(q.browser.msie){if(!N){N=1}if(!M){M=1}}this.startTime=e();this.start=N;this.end=M;this.unit=L||this.unit||"px";this.now=this.start;this.pos=this.state=0;var J=this;function K(O){return J.step(O)}K.elem=this.elem;if(K()&&q.timers.push(K)&&!p){p=setInterval(function(){var P=q.timers;for(var O=0;O<P.length;O++){if(!P[O]()){P.splice(O--,1)}}if(!P.length){clearInterval(p);p=g}},13)}},show:function(){this.options.orig[this.prop]=q.attr(this.elem.style,this.prop);this.options.show=true;this.custom(this.prop=="width"||this.prop=="height"?1:0,this.cur());q(this.elem).show()},hide:function(){this.options.orig[this.prop]=q.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(M){var L=e();if(M||L>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var J=true;for(var K in this.options.curAnim){if(this.options.curAnim[K]!==true){J=false}}if(J){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(q.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){q(this.elem).hide()}if(this.options.hide||this.options.show){for(var N in this.options.curAnim){q.attr(this.elem.style,N,this.options.orig[N])}}this.options.complete.call(this.elem)}return false}else{var O=L-this.startTime;this.state=O/this.options.duration;this.pos=q.easing[this.options.easing||(q.easing.swing?"swing":"linear")](this.state,O,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};q.extend(q.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(J){q.attr(J.elem.style,"opacity",J.now)},_default:function(J){if(J.elem.style&&J.elem.style[J.prop]!=null){J.elem.style[J.prop]=J.now+J.unit}else{J.elem[J.prop]=J.now}}}});if(document.documentElement.getBoundingClientRect){q.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return q.offset.bodyOffset(this[0])}var L=this[0].getBoundingClientRect(),O=this[0].ownerDocument,K=O.body,J=O.documentElement,Q=J.clientTop||K.clientTop||0,P=J.clientLeft||K.clientLeft||0,N=L.top+(self.pageYOffset||q.boxModel&&J.scrollTop||K.scrollTop)-Q,M=L.left+(self.pageXOffset||q.boxModel&&J.scrollLeft||K.scrollLeft)-P;return{top:N,left:M}}}else{q.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return q.offset.bodyOffset(this[0])}q.offset.initialized||q.offset.initialize();var O=this[0],L=O.offsetParent,K=O,T=O.ownerDocument,R,M=T.documentElement,P=T.body,Q=T.defaultView,J=Q.getComputedStyle(O,null),S=O.offsetTop,N=O.offsetLeft;while((O=O.parentNode)&&O!==P&&O!==M){R=Q.getComputedStyle(O,null);S-=O.scrollTop,N-=O.scrollLeft;if(O===L){S+=O.offsetTop,N+=O.offsetLeft;if(q.offset.doesNotAddBorder&&!(q.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(O.tagName))){S+=parseInt(R.borderTopWidth,10)||0,N+=parseInt(R.borderLeftWidth,10)||0}K=L,L=O.offsetParent}if(q.offset.subtractsBorderForOverflowNotVisible&&R.overflow!=="visible"){S+=parseInt(R.borderTopWidth,10)||0,N+=parseInt(R.borderLeftWidth,10)||0}J=R}if(J.position==="relative"||J.position==="static"){S+=P.offsetTop,N+=P.offsetLeft}if(J.position==="fixed"){S+=Math.max(M.scrollTop,P.scrollTop),N+=Math.max(M.scrollLeft,P.scrollLeft)}return{top:S,left:N}}}q.offset={initialize:function(){if(this.initialized){return}var Q=document.body,K=document.createElement("div"),M,L,S,N,R,J,O=Q.style.marginTop,P='<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>';R={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(J in R){K.style[J]=R[J]}K.innerHTML=P;Q.insertBefore(K,Q.firstChild);M=K.firstChild,L=M.firstChild,N=M.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(L.offsetTop!==5);this.doesAddBorderForTableAndCells=(N.offsetTop===5);M.style.overflow="hidden",M.style.position="relative";this.subtractsBorderForOverflowNotVisible=(L.offsetTop===-5);Q.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(Q.offsetTop===0);Q.style.marginTop=O;Q.removeChild(K);this.initialized=true},bodyOffset:function(J){q.offset.initialized||q.offset.initialize();var L=J.offsetTop,K=J.offsetLeft;if(q.offset.doesNotIncludeMarginInBodyOffset){L+=parseInt(q.curCSS(J,"marginTop",true),10)||0,K+=parseInt(q.curCSS(J,"marginLeft",true),10)||0}return{top:L,left:K}}};q.fn.extend({position:function(){var N=0,M=0,K;if(this[0]){var L=this.offsetParent(),O=this.offset(),J=/^body|html$/i.test(L[0].tagName)?{top:0,left:0}:L.offset();O.top-=l(this,"marginTop");O.left-=l(this,"marginLeft");J.top+=l(L,"borderTopWidth");J.left+=l(L,"borderLeftWidth");K={top:O.top-J.top,left:O.left-J.left}}return K},offsetParent:function(){var J=this[0].offsetParent||document.body;while(J&&(!/^body|html$/i.test(J.tagName)&&q.css(J,"position")=="static")){J=J.offsetParent}return q(J)}});q.each(["Left","Top"],function(K,J){var L="scroll"+J;q.fn[L]=function(M){if(!this[0]){return null}return M!==g?this.each(function(){this==n||this==document?n.scrollTo(!K?M:q(n).scrollLeft(),K?M:q(n).scrollTop()):this[L]=M}):this[0]==n||this[0]==document?self[K?"pageYOffset":"pageXOffset"]||q.boxModel&&document.documentElement[L]||document.body[L]:this[0][L]}});q.each(["Height","Width"],function(N,L){var J=N?"Left":"Top",M=N?"Right":"Bottom",K=L.toLowerCase();q.fn["inner"+L]=function(){return this[0]?q.css(this[0],K,false,"padding"):null};q.fn["outer"+L]=function(P){return this[0]?q.css(this[0],K,false,P?"margin":"border"):null};var O=L.toLowerCase();q.fn[O]=function(P){return this[0]==n?document.compatMode=="CSS1Compat"&&document.documentElement["client"+L]||document.body["client"+L]:this[0]==document?Math.max(document.documentElement["client"+L],document.body["scroll"+L],document.documentElement["scroll"+L],document.body["offset"+L],document.documentElement["offset"+L]):P===g?(this.length?q.css(this[0],O):null):this.css(O,typeof P==="string"?P:P+"px")}})})();jQuery.ui||(function(c){var j=c.fn.remove,d=c.browser.mozilla&&(parseFloat(c.browser.version)<1.9);c.ui={version:"1.7.2",plugin:{add:function(m,n,p){var o=c.ui[m].prototype;for(var l in p){o.plugins[l]=o.plugins[l]||[];o.plugins[l].push([n,p[l]])}},call:function(l,n,m){var p=l.plugins[n];if(!p||!l.element[0].parentNode){return}for(var o=0;o<p.length;o++){if(l.options[p[o][0]]){p[o][1].apply(l.element,m)}}}},contains:function(m,l){return document.compareDocumentPosition?m.compareDocumentPosition(l)&16:m!==l&&m.contains(l)},hasScroll:function(o,m){if(c(o).css("overflow")=="hidden"){return false}var l=(m&&m=="left")?"scrollLeft":"scrollTop",n=false;if(o[l]>0){return true}o[l]=1;n=(o[l]>0);o[l]=0;return n},isOverAxis:function(m,l,n){return(m>l)&&(m<(l+n))},isOver:function(q,m,p,o,l,n){return c.ui.isOverAxis(q,p,l)&&c.ui.isOverAxis(m,o,n)},keyCode:{BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38}};if(d){var f=c.attr,e=c.fn.removeAttr,h="http://www.w3.org/2005/07/aaa",a=/^aria-/,b=/^wairole:/;c.attr=function(m,l,n){var o=n!==undefined;return(l=="role"?(o?f.call(this,m,l,"wairole:"+n):(f.apply(this,arguments)||"").replace(b,"")):(a.test(l)?(o?m.setAttributeNS(h,l.replace(a,"aaa:"),n):f.call(this,m,l.replace(a,"aaa:"))):f.apply(this,arguments)))};c.fn.removeAttr=function(l){return(a.test(l)?this.each(function(){this.removeAttributeNS(h,l.replace(a,""))}):e.call(this,l))}}c.fn.extend({remove:function(){c("*",this).add(this).each(function(){c(this).triggerHandler("remove")});return j.apply(this,arguments)},enableSelection:function(){return this.attr("unselectable","off").css("MozUserSelect","").unbind("selectstart.ui")},disableSelection:function(){return this.attr("unselectable","on").css("MozUserSelect","none").bind("selectstart.ui",function(){return false})},scrollParent:function(){var l;if((c.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){l=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test(c.curCSS(this,"position",1))&&(/(auto|scroll)/).test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0)}else{l=this.parents().filter(function(){return(/(auto|scroll)/).test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0)}return(/fixed/).test(this.css("position"))||!l.length?c(document):l}});c.extend(c.expr[":"],{data:function(n,m,l){return !!c.data(n,l[3])},focusable:function(m){var n=m.nodeName.toLowerCase(),l=c.attr(m,"tabindex");return(/input|select|textarea|button|object/.test(n)?!m.disabled:"a"==n||"area"==n?m.href||!isNaN(l):!isNaN(l))&&!c(m)["area"==n?"parents":"closest"](":hidden").length},tabbable:function(m){var l=c.attr(m,"tabindex");return(isNaN(l)||l>=0)&&c(m).is(":focusable")}});function g(o,p,q,n){function m(u){var r=c[o][p][u]||[];return(typeof r=="string"?r.split(/,?\s+/):r)}var l=m("getter");if(n.length==1&&typeof n[0]=="string"){l=l.concat(m("getterSetter"))}return(c.inArray(q,l)!=-1)}c.widget=function(m,l){var n=m.split(".")[0];m=m.split(".")[1];c.fn[m]=function(r){var p=(typeof r=="string"),q=Array.prototype.slice.call(arguments,1);if(p&&r.substring(0,1)=="_"){return this}if(p&&g(n,m,r,q)){var o=c.data(this[0],m);return(o?o[r].apply(o,q):undefined)}return this.each(function(){var u=c.data(this,m);(!u&&!p&&c.data(this,m,new c[n][m](this,r))._init());(u&&p&&c.isFunction(u[r])&&u[r].apply(u,q))})};c[n]=c[n]||{};c[n][m]=function(q,p){var o=this;this.namespace=n;this.widgetName=m;this.widgetEventPrefix=c[n][m].eventPrefix||m;this.widgetBaseClass=n+"-"+m;this.options=c.extend({},c.widget.defaults,c[n][m].defaults,c.metadata&&c.metadata.get(q)[m],p);this.element=c(q).bind("setData."+m,function(u,r,v){if(u.target==q){return o._setData(r,v)}}).bind("getData."+m,function(u,r){if(u.target==q){return o._getData(r)}}).bind("remove",function(){return o.destroy()})};c[n][m].prototype=c.extend({},c.widget.prototype,l);c[n][m].getterSetter="option"};c.widget.prototype={_init:function(){},destroy:function(){this.element.removeData(this.widgetName).removeClass(this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").removeAttr("aria-disabled")},option:function(n,o){var m=n,l=this;if(typeof n=="string"){if(o===undefined){return this._getData(n)}m={};m[n]=o}c.each(m,function(p,q){l._setData(p,q)})},_getData:function(l){return this.options[l]},_setData:function(l,m){this.options[l]=m;if(l=="disabled"){this.element[m?"addClass":"removeClass"](this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").attr("aria-disabled",m)}},enable:function(){this._setData("disabled",false)},disable:function(){this._setData("disabled",true)},_trigger:function(n,o,p){var r=this.options[n],l=(n==this.widgetEventPrefix?n:this.widgetEventPrefix+n);o=c.Event(o);o.type=l;if(o.originalEvent){for(var m=c.event.props.length,q;m;){q=c.event.props[--m];o[q]=o.originalEvent[q]}}this.element.trigger(o,p);return !(c.isFunction(r)&&r.call(this.element[0],o,p)===false||o.isDefaultPrevented())}};c.widget.defaults={disabled:false};c.ui.mouse={_mouseInit:function(){var l=this;this.element.bind("mousedown."+this.widgetName,function(m){return l._mouseDown(m)}).bind("click."+this.widgetName,function(m){if(l._preventClickEvent){l._preventClickEvent=false;m.stopImmediatePropagation();return false}});if(c.browser.msie){this._mouseUnselectable=this.element.attr("unselectable");this.element.attr("unselectable","on")}this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName);(c.browser.msie&&this.element.attr("unselectable",this._mouseUnselectable))},_mouseDown:function(n){n.originalEvent=n.originalEvent||{};if(n.originalEvent.mouseHandled){return}(this._mouseStarted&&this._mouseUp(n));this._mouseDownEvent=n;var m=this,o=(n.which==1),l=(typeof this.options.cancel=="string"?c(n.target).parents().add(n.target).filter(this.options.cancel).length:false);if(!o||l||!this._mouseCapture(n)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){m.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(n)&&this._mouseDelayMet(n)){this._mouseStarted=(this._mouseStart(n)!==false);if(!this._mouseStarted){n.preventDefault();return true}}this._mouseMoveDelegate=function(p){return m._mouseMove(p)};this._mouseUpDelegate=function(p){return m._mouseUp(p)};c(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);(c.browser.safari||n.preventDefault());n.originalEvent.mouseHandled=true;return true},_mouseMove:function(l){if(c.browser.msie&&!l.button){return this._mouseUp(l)}if(this._mouseStarted){this._mouseDrag(l);return l.preventDefault()}if(this._mouseDistanceMet(l)&&this._mouseDelayMet(l)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,l)!==false);(this._mouseStarted?this._mouseDrag(l):this._mouseUp(l))}return !this._mouseStarted},_mouseUp:function(l){c(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=(l.target==this._mouseDownEvent.target);this._mouseStop(l)}return false},_mouseDistanceMet:function(l){return(Math.max(Math.abs(this._mouseDownEvent.pageX-l.pageX),Math.abs(this._mouseDownEvent.pageY-l.pageY))>=this.options.distance)},_mouseDelayMet:function(l){return this.mouseDelayMet},_mouseStart:function(l){},_mouseDrag:function(l){},_mouseStop:function(l){},_mouseCapture:function(l){return true}};c.ui.mouse.defaults={cancel:null,distance:1,delay:0}})(jQuery);(function(a){a.widget("ui.draggable",a.extend({},a.ui.mouse,{_init:function(){if(this.options.helper=="original"&&!(/^(?:r|a|f)/).test(this.element.css("position"))){this.element[0].style.position="relative"}(this.options.addClasses&&this.element.addClass("ui-draggable"));(this.options.disabled&&this.element.addClass("ui-draggable-disabled"));this._mouseInit()},destroy:function(){if(!this.element.data("draggable")){return}this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy()},_mouseCapture:function(b){var c=this.options;if(this.helper||c.disabled||a(b.target).is(".ui-resizable-handle")){return false}this.handle=this._getHandle(b);if(!this.handle){return false}return true},_mouseStart:function(b){var c=this.options;this.helper=this._createHelper(b);this._cacheHelperProportions();if(a.ui.ddmanager){a.ui.ddmanager.current=this}this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};a.extend(this.offset,{click:{left:b.pageX-this.offset.left,top:b.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(b);this.originalPageX=b.pageX;this.originalPageY=b.pageY;if(c.cursorAt){this._adjustOffsetFromHelper(c.cursorAt)}if(c.containment){this._setContainment()}this._trigger("start",b);this._cacheHelperProportions();if(a.ui.ddmanager&&!c.dropBehaviour){a.ui.ddmanager.prepareOffsets(this,b)}this.helper.addClass("ui-draggable-dragging");this._mouseDrag(b,true);return true},_mouseDrag:function(b,d){this.position=this._generatePosition(b);this.positionAbs=this._convertPositionTo("absolute");if(!d){var c=this._uiHash();this._trigger("drag",b,c);this.position=c.position}if(!this.options.axis||this.options.axis!="y"){this.helper[0].style.left=this.position.left+"px"}if(!this.options.axis||this.options.axis!="x"){this.helper[0].style.top=this.position.top+"px"}if(a.ui.ddmanager){a.ui.ddmanager.drag(this,b)}return false},_mouseStop:function(c){var d=false;if(a.ui.ddmanager&&!this.options.dropBehaviour){d=a.ui.ddmanager.drop(this,c)}if(this.dropped){d=this.dropped;this.dropped=false}if((this.options.revert=="invalid"&&!d)||(this.options.revert=="valid"&&d)||this.options.revert===true||(a.isFunction(this.options.revert)&&this.options.revert.call(this.element,d))){var b=this;a(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){b._trigger("stop",c);b._clear()})}else{this._trigger("stop",c);this._clear()}return false},_getHandle:function(b){var c=!this.options.handle||!a(this.options.handle,this.element).length?true:false;a(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==b.target){c=true}});return c},_createHelper:function(c){var d=this.options;var b=a.isFunction(d.helper)?a(d.helper.apply(this.element[0],[c])):(d.helper=="clone"?this.element.clone():this.element);if(!b.parents("body").length){b.appendTo((d.appendTo=="parent"?this.element[0].parentNode:d.appendTo))}if(b[0]!=this.element[0]&&!(/(fixed|absolute)/).test(b.css("position"))){b.css("position","absolute")}return b},_adjustOffsetFromHelper:function(b){if(b.left!=undefined){this.offset.click.left=b.left+this.margins.left}if(b.right!=undefined){this.offset.click.left=this.helperProportions.width-b.right+this.margins.left}if(b.top!=undefined){this.offset.click.top=b.top+this.margins.top}if(b.bottom!=undefined){this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var b=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0])){b.left+=this.scrollParent.scrollLeft();b.top+=this.scrollParent.scrollTop()}if((this.offsetParent[0]==document.body)||(this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&a.browser.msie)){b={top:0,left:0}}return{top:b.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:b.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var b=this.element.position();return{top:b.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:b.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else{return{top:0,left:0}}},_cacheMargins:function(){this.margins={left:(parseInt(this.element.css("marginLeft"),10)||0),top:(parseInt(this.element.css("marginTop"),10)||0)}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e=this.options;if(e.containment=="parent"){e.containment=this.helper[0].parentNode}if(e.containment=="document"||e.containment=="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,a(e.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(a(e.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]}if(!(/^(document|window|parent)$/).test(e.containment)&&e.containment.constructor!=Array){var c=a(e.containment)[0];if(!c){return}var d=a(e.containment).offset();var b=(a(c).css("overflow")!="hidden");this.containment=[d.left+(parseInt(a(c).css("borderLeftWidth"),10)||0)+(parseInt(a(c).css("paddingLeft"),10)||0)-this.margins.left,d.top+(parseInt(a(c).css("borderTopWidth"),10)||0)+(parseInt(a(c).css("paddingTop"),10)||0)-this.margins.top,d.left+(b?Math.max(c.scrollWidth,c.offsetWidth):c.offsetWidth)-(parseInt(a(c).css("borderLeftWidth"),10)||0)-(parseInt(a(c).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,d.top+(b?Math.max(c.scrollHeight,c.offsetHeight):c.offsetHeight)-(parseInt(a(c).css("borderTopWidth"),10)||0)-(parseInt(a(c).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}else{if(e.containment.constructor==Array){this.containment=e.containment}}},_convertPositionTo:function(f,h){if(!h){h=this.position}var c=f=="absolute"?1:-1;var e=this.options,b=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,g=(/(html|body)/i).test(b[0].tagName);return{top:(h.top+this.offset.relative.top*c+this.offset.parent.top*c-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(g?0:b.scrollTop()))*c)),left:(h.left+this.offset.relative.left*c+this.offset.parent.left*c-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():g?0:b.scrollLeft())*c))}},_generatePosition:function(e){var h=this.options,b=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,j=(/(html|body)/i).test(b[0].tagName);if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0])){this.offset.relative=this._getRelativeOffset()}var d=e.pageX;var c=e.pageY;if(this.originalPosition){if(this.containment){if(e.pageX-this.offset.click.left<this.containment[0]){d=this.containment[0]+this.offset.click.left}if(e.pageY-this.offset.click.top<this.containment[1]){c=this.containment[1]+this.offset.click.top}if(e.pageX-this.offset.click.left>this.containment[2]){d=this.containment[2]+this.offset.click.left}if(e.pageY-this.offset.click.top>this.containment[3]){c=this.containment[3]+this.offset.click.top}}if(h.grid){var g=this.originalPageY+Math.round((c-this.originalPageY)/h.grid[1])*h.grid[1];c=this.containment?(!(g-this.offset.click.top<this.containment[1]||g-this.offset.click.top>this.containment[3])?g:(!(g-this.offset.click.top<this.containment[1])?g-h.grid[1]:g+h.grid[1])):g;var f=this.originalPageX+Math.round((d-this.originalPageX)/h.grid[0])*h.grid[0];d=this.containment?(!(f-this.offset.click.left<this.containment[0]||f-this.offset.click.left>this.containment[2])?f:(!(f-this.offset.click.left<this.containment[0])?f-h.grid[0]:f+h.grid[0])):f}}return{top:(c-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(j?0:b.scrollTop())))),left:(d-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():j?0:b.scrollLeft())))}},_clear:function(){this.helper.removeClass("ui-draggable-dragging");if(this.helper[0]!=this.element[0]&&!this.cancelHelperRemoval){this.helper.remove()}this.helper=null;this.cancelHelperRemoval=false},_trigger:function(b,c,d){d=d||this._uiHash();a.ui.plugin.call(this,b,[c,d]);if(b=="drag"){this.positionAbs=this._convertPositionTo("absolute")}return a.widget.prototype._trigger.call(this,b,c,d)},plugins:{},_uiHash:function(b){return{helper:this.helper,position:this.position,absolutePosition:this.positionAbs,offset:this.positionAbs}}}));a.extend(a.ui.draggable,{version:"1.7.2",eventPrefix:"drag",defaults:{addClasses:true,appendTo:"parent",axis:false,cancel:":input,option",connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,delay:0,distance:1,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false}});a.ui.plugin.add("draggable","connectToSortable",{start:function(c,e){var d=a(this).data("draggable"),f=d.options,b=a.extend({},e,{item:d.element});d.sortables=[];a(f.connectToSortable).each(function(){var g=a.data(this,"sortable");if(g&&!g.options.disabled){d.sortables.push({instance:g,shouldRevert:g.options.revert});g._refreshItems();g._trigger("activate",c,b)}})},stop:function(c,e){var d=a(this).data("draggable"),b=a.extend({},e,{item:d.element});a.each(d.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;d.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert){this.instance.options.revert=true}this.instance._mouseStop(c);this.instance.options.helper=this.instance.options._helper;if(d.options.helper=="original"){this.instance.currentItem.css({top:"auto",left:"auto"})}}else{this.instance.cancelHelperRemoval=false;this.instance._trigger("deactivate",c,b)}})},drag:function(c,f){var e=a(this).data("draggable"),b=this;var d=function(j){var q=this.offset.click.top,p=this.offset.click.left;var g=this.positionAbs.top,m=this.positionAbs.left;var l=j.height,n=j.width;var r=j.top,h=j.left;return a.ui.isOver(g+q,m+p,r,h,l,n)};a.each(e.sortables,function(g){this.instance.positionAbs=e.positionAbs;this.instance.helperProportions=e.helperProportions;this.instance.offset.click=e.offset.click;if(this.instance._intersectsWith(this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=a(b).clone().appendTo(this.instance.element).data("sortable-item",true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return f.helper[0]};c.target=this.instance.currentItem[0];this.instance._mouseCapture(c,true);this.instance._mouseStart(c,true,true);this.instance.offset.click.top=e.offset.click.top;this.instance.offset.click.left=e.offset.click.left;this.instance.offset.parent.left-=e.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=e.offset.parent.top-this.instance.offset.parent.top;e._trigger("toSortable",c);e.dropped=this.instance.element;e.currentItem=e.element;this.instance.fromOutside=e}if(this.instance.currentItem){this.instance._mouseDrag(c)}}else{if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance._trigger("out",c,this.instance._uiHash(this.instance));this.instance._mouseStop(c,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();if(this.instance.placeholder){this.instance.placeholder.remove()}e._trigger("fromSortable",c);e.dropped=false}}})}});a.ui.plugin.add("draggable","cursor",{start:function(c,d){var b=a("body"),e=a(this).data("draggable").options;if(b.css("cursor")){e._cursor=b.css("cursor")}b.css("cursor",e.cursor)},stop:function(b,c){var d=a(this).data("draggable").options;if(d._cursor){a("body").css("cursor",d._cursor)}}});a.ui.plugin.add("draggable","iframeFix",{start:function(b,c){var d=a(this).data("draggable").options;a(d.iframeFix===true?"iframe":d.iframeFix).each(function(){a('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1000}).css(a(this).offset()).appendTo("body")})},stop:function(b,c){a("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)})}});a.ui.plugin.add("draggable","opacity",{start:function(c,d){var b=a(d.helper),e=a(this).data("draggable").options;if(b.css("opacity")){e._opacity=b.css("opacity")}b.css("opacity",e.opacity)},stop:function(b,c){var d=a(this).data("draggable").options;if(d._opacity){a(c.helper).css("opacity",d._opacity)}}});a.ui.plugin.add("draggable","scroll",{start:function(c,d){var b=a(this).data("draggable");if(b.scrollParent[0]!=document&&b.scrollParent[0].tagName!="HTML"){b.overflowOffset=b.scrollParent.offset()}},drag:function(d,e){var c=a(this).data("draggable"),f=c.options,b=false;if(c.scrollParent[0]!=document&&c.scrollParent[0].tagName!="HTML"){if(!f.axis||f.axis!="x"){if((c.overflowOffset.top+c.scrollParent[0].offsetHeight)-d.pageY<f.scrollSensitivity){c.scrollParent[0].scrollTop=b=c.scrollParent[0].scrollTop+f.scrollSpeed}else{if(d.pageY-c.overflowOffset.top<f.scrollSensitivity){c.scrollParent[0].scrollTop=b=c.scrollParent[0].scrollTop-f.scrollSpeed}}}if(!f.axis||f.axis!="y"){if((c.overflowOffset.left+c.scrollParent[0].offsetWidth)-d.pageX<f.scrollSensitivity){c.scrollParent[0].scrollLeft=b=c.scrollParent[0].scrollLeft+f.scrollSpeed}else{if(d.pageX-c.overflowOffset.left<f.scrollSensitivity){c.scrollParent[0].scrollLeft=b=c.scrollParent[0].scrollLeft-f.scrollSpeed}}}}else{if(!f.axis||f.axis!="x"){if(d.pageY-a(document).scrollTop()<f.scrollSensitivity){b=a(document).scrollTop(a(document).scrollTop()-f.scrollSpeed)}else{if(a(window).height()-(d.pageY-a(document).scrollTop())<f.scrollSensitivity){b=a(document).scrollTop(a(document).scrollTop()+f.scrollSpeed)}}}if(!f.axis||f.axis!="y"){if(d.pageX-a(document).scrollLeft()<f.scrollSensitivity){b=a(document).scrollLeft(a(document).scrollLeft()-f.scrollSpeed)}else{if(a(window).width()-(d.pageX-a(document).scrollLeft())<f.scrollSensitivity){b=a(document).scrollLeft(a(document).scrollLeft()+f.scrollSpeed)}}}}if(b!==false&&a.ui.ddmanager&&!f.dropBehaviour){a.ui.ddmanager.prepareOffsets(c,d)}}});a.ui.plugin.add("draggable","snap",{start:function(c,d){var b=a(this).data("draggable"),e=b.options;b.snapElements=[];a(e.snap.constructor!=String?(e.snap.items||":data(draggable)"):e.snap).each(function(){var g=a(this);var f=g.offset();if(this!=b.element[0]){b.snapElements.push({item:this,width:g.outerWidth(),height:g.outerHeight(),top:f.top,left:f.left})}})},drag:function(w,q){var g=a(this).data("draggable"),u=g.options;var B=u.snapTolerance;var A=q.offset.left,z=A+g.helperProportions.width,f=q.offset.top,e=f+g.helperProportions.height;for(var y=g.snapElements.length-1;y>=0;y--){var v=g.snapElements[y].left,p=v+g.snapElements[y].width,n=g.snapElements[y].top,D=n+g.snapElements[y].height;if(!((v-B<A&&A<p+B&&n-B<f&&f<D+B)||(v-B<A&&A<p+B&&n-B<e&&e<D+B)||(v-B<z&&z<p+B&&n-B<f&&f<D+B)||(v-B<z&&z<p+B&&n-B<e&&e<D+B))){if(g.snapElements[y].snapping){(g.options.snap.release&&g.options.snap.release.call(g.element,w,a.extend(g._uiHash(),{snapItem:g.snapElements[y].item})))}g.snapElements[y].snapping=false;continue}if(u.snapMode!="inner"){var c=Math.abs(n-e)<=B;var C=Math.abs(D-f)<=B;var j=Math.abs(v-z)<=B;var m=Math.abs(p-A)<=B;if(c){q.position.top=g._convertPositionTo("relative",{top:n-g.helperProportions.height,left:0}).top-g.margins.top}if(C){q.position.top=g._convertPositionTo("relative",{top:D,left:0}).top-g.margins.top}if(j){q.position.left=g._convertPositionTo("relative",{top:0,left:v-g.helperProportions.width}).left-g.margins.left}if(m){q.position.left=g._convertPositionTo("relative",{top:0,left:p}).left-g.margins.left}}var h=(c||C||j||m);if(u.snapMode!="outer"){var c=Math.abs(n-f)<=B;var C=Math.abs(D-e)<=B;var j=Math.abs(v-A)<=B;var m=Math.abs(p-z)<=B;if(c){q.position.top=g._convertPositionTo("relative",{top:n,left:0}).top-g.margins.top}if(C){q.position.top=g._convertPositionTo("relative",{top:D-g.helperProportions.height,left:0}).top-g.margins.top}if(j){q.position.left=g._convertPositionTo("relative",{top:0,left:v}).left-g.margins.left}if(m){q.position.left=g._convertPositionTo("relative",{top:0,left:p-g.helperProportions.width}).left-g.margins.left}}if(!g.snapElements[y].snapping&&(c||C||j||m||h)){(g.options.snap.snap&&g.options.snap.snap.call(g.element,w,a.extend(g._uiHash(),{snapItem:g.snapElements[y].item})))}g.snapElements[y].snapping=(c||C||j||m||h)}}});a.ui.plugin.add("draggable","stack",{start:function(b,c){var e=a(this).data("draggable").options;var d=a.makeArray(a(e.stack.group)).sort(function(g,f){return(parseInt(a(g).css("zIndex"),10)||e.stack.min)-(parseInt(a(f).css("zIndex"),10)||e.stack.min)});a(d).each(function(f){this.style.zIndex=e.stack.min+f});this[0].style.zIndex=e.stack.min+d.length}});a.ui.plugin.add("draggable","zIndex",{start:function(c,d){var b=a(d.helper),e=a(this).data("draggable").options;if(b.css("zIndex")){e._zIndex=b.css("zIndex")}b.css("zIndex",e.zIndex)},stop:function(b,c){var d=a(this).data("draggable").options;if(d._zIndex){a(c.helper).css("zIndex",d._zIndex)}}})})(jQuery);(function(a){a.widget("ui.droppable",{_init:function(){var c=this.options,b=c.accept;this.isover=0;this.isout=1;this.options.accept=this.options.accept&&a.isFunction(this.options.accept)?this.options.accept:function(e){return e.is(b)};this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};a.ui.ddmanager.droppables[this.options.scope]=a.ui.ddmanager.droppables[this.options.scope]||[];a.ui.ddmanager.droppables[this.options.scope].push(this);(this.options.addClasses&&this.element.addClass("ui-droppable"))},destroy:function(){var b=a.ui.ddmanager.droppables[this.options.scope];for(var c=0;c<b.length;c++){if(b[c]==this){b.splice(c,1)}}this.element.removeClass("ui-droppable ui-droppable-disabled").removeData("droppable").unbind(".droppable")},_setData:function(b,c){if(b=="accept"){this.options.accept=c&&a.isFunction(c)?c:function(e){return e.is(c)}}else{a.widget.prototype._setData.apply(this,arguments)}},_activate:function(c){var b=a.ui.ddmanager.current;if(this.options.activeClass){this.element.addClass(this.options.activeClass)}(b&&this._trigger("activate",c,this.ui(b)))},_deactivate:function(c){var b=a.ui.ddmanager.current;if(this.options.activeClass){this.element.removeClass(this.options.activeClass)}(b&&this._trigger("deactivate",c,this.ui(b)))},_over:function(c){var b=a.ui.ddmanager.current;if(!b||(b.currentItem||b.element)[0]==this.element[0]){return}if(this.options.accept.call(this.element[0],(b.currentItem||b.element))){if(this.options.hoverClass){this.element.addClass(this.options.hoverClass)}this._trigger("over",c,this.ui(b))}},_out:function(c){var b=a.ui.ddmanager.current;if(!b||(b.currentItem||b.element)[0]==this.element[0]){return}if(this.options.accept.call(this.element[0],(b.currentItem||b.element))){if(this.options.hoverClass){this.element.removeClass(this.options.hoverClass)}this._trigger("out",c,this.ui(b))}},_drop:function(c,d){var b=d||a.ui.ddmanager.current;if(!b||(b.currentItem||b.element)[0]==this.element[0]){return false}var e=false;this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function(){var f=a.data(this,"droppable");if(f.options.greedy&&a.ui.intersect(b,a.extend(f,{offset:f.element.offset()}),f.options.tolerance)){e=true;return false}});if(e){return false}if(this.options.accept.call(this.element[0],(b.currentItem||b.element))){if(this.options.activeClass){this.element.removeClass(this.options.activeClass)}if(this.options.hoverClass){this.element.removeClass(this.options.hoverClass)}this._trigger("drop",c,this.ui(b));return this.element}return false},ui:function(b){return{draggable:(b.currentItem||b.element),helper:b.helper,position:b.position,absolutePosition:b.positionAbs,offset:b.positionAbs}}});a.extend(a.ui.droppable,{version:"1.7.2",eventPrefix:"drop",defaults:{accept:"*",activeClass:false,addClasses:true,greedy:false,hoverClass:false,scope:"default",tolerance:"intersect"}});a.ui.intersect=function(v,m,q){if(!m.offset){return false}var e=(v.positionAbs||v.position.absolute).left,d=e+v.helperProportions.width,p=(v.positionAbs||v.position.absolute).top,o=p+v.helperProportions.height;var g=m.offset.left,c=g+m.proportions.width,u=m.offset.top,n=u+m.proportions.height;switch(q){case"fit":return(g<e&&d<c&&u<p&&o<n);break;case"intersect":return(g<e+(v.helperProportions.width/2)&&d-(v.helperProportions.width/2)<c&&u<p+(v.helperProportions.height/2)&&o-(v.helperProportions.height/2)<n);break;case"pointer":var h=((v.positionAbs||v.position.absolute).left+(v.clickOffset||v.offset.click).left),j=((v.positionAbs||v.position.absolute).top+(v.clickOffset||v.offset.click).top),f=a.ui.isOver(j,h,u,g,m.proportions.height,m.proportions.width);return f;break;case"touch":return((p>=u&&p<=n)||(o>=u&&o<=n)||(p<u&&o>n))&&((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(e,g){var b=a.ui.ddmanager.droppables[e.options.scope];var f=g?g.type:null;var h=(e.currentItem||e.element).find(":data(droppable)").andSelf();droppablesLoop:for(var d=0;d<b.length;d++){if(b[d].options.disabled||(e&&!b[d].options.accept.call(b[d].element[0],(e.currentItem||e.element)))){continue}for(var c=0;c<h.length;c++){if(h[c]==b[d].element[0]){b[d].proportions.height=0;continue droppablesLoop}}b[d].visible=b[d].element.css("display")!="none";if(!b[d].visible){continue}b[d].offset=b[d].element.offset();b[d].proportions={width:b[d].element[0].offsetWidth,height:b[d].element[0].offsetHeight};if(f=="mousedown"){b[d]._activate.call(b[d],g)}}},drop:function(b,c){var d=false;a.each(a.ui.ddmanager.droppables[b.options.scope],function(){if(!this.options){return}if(!this.options.disabled&&this.visible&&a.ui.intersect(b,this,this.options.tolerance)){d=this._drop.call(this,c)}if(!this.options.disabled&&this.visible&&this.options.accept.call(this.element[0],(b.currentItem||b.element))){this.isout=1;this.isover=0;this._deactivate.call(this,c)}});return d},drag:function(b,c){if(b.options.refreshPositions){a.ui.ddmanager.prepareOffsets(b,c)}a.each(a.ui.ddmanager.droppables[b.options.scope],function(){if(this.options.disabled||this.greedyChild||!this.visible){return}var e=a.ui.intersect(b,this,this.options.tolerance);var g=!e&&this.isover==1?"isout":(e&&this.isover==0?"isover":null);if(!g){return}var f;if(this.options.greedy){var d=this.element.parents(":data(droppable):eq(0)");if(d.length){f=a.data(d[0],"droppable");f.greedyChild=(g=="isover"?1:0)}}if(f&&g=="isover"){f.isover=0;f.isout=1;f._out.call(f,c)}this[g]=1;this[g=="isout"?"isover":"isout"]=0;this[g=="isover"?"_over":"_out"].call(this,c);if(f&&g=="isout"){f.isout=0;f.isover=1;f._over.call(f,c)}})}}})(jQuery);(function(c){c.widget("ui.resizable",c.extend({},c.ui.mouse,{_init:function(){var e=this,j=this.options;this.element.addClass("ui-resizable");c.extend(this,{_aspectRatio:!!(j.aspectRatio),aspectRatio:j.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:j.helper||j.ghost||j.animate?j.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=j.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 f=0;f<l.length;f++){var h=c.trim(l[f]),d="ui-resizable-"+h;var g=c('<div class="ui-resizable-handle '+d+'"></div>');if(/sw|se|ne|nw/.test(h)){g.css({zIndex:++j.zIndex})}if("se"==h){g.addClass("ui-icon ui-icon-gripsmall-diagonal-se")}this.handles[h]=".ui-resizable-"+h;this.element.append(g)}}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(!e.resizing){if(this.className){var m=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)}e.axis=m&&m[1]?m[1]:"se"}});if(j.autoHide){this._handles.hide();c(this.element).addClass("ui-resizable-autohide").hover(function(){c(this).removeClass("ui-resizable-autohide");e._handles.show()},function(){if(!e.resizing){c(this).addClass("ui-resizable-autohide");e._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy();var d=function(f){c(f).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){d(this.element);var e=this.element;e.parent().append(this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")})).end().remove()}this.originalElement.css("resize",this.originalResizeStyle);d(this.originalElement)},_mouseCapture:function(e){var f=false;for(var d in this.handles){if(c(this.handles[d])[0]==e.target){f=true}}return this.options.disabled||!!f},_mouseStart:function(f){var j=this.options,e=this.element.position(),d=this.element;this.resizing=true;this.documentScroll={top:c(document).scrollTop(),left:c(document).scrollLeft()};if(d.is(".ui-draggable")||(/absolute/).test(d.css("position"))){d.css({position:"absolute",top:e.top,left:e.left})}if(c.browser.opera&&(/relative/).test(d.css("position"))){d.css({position:"relative",top:"auto",left:"auto"})}this._renderProxy();var l=b(this.helper.css("left")),g=b(this.helper.css("top"));if(j.containment){l+=c(j.containment).scrollLeft()||0;g+=c(j.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:l,top:g};this.size=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalSize=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalPosition={left:l,top:g};this.sizeDiff={width:d.outerWidth()-d.width(),height:d.outerHeight()-d.height()};this.originalMousePosition={left:f.pageX,top:f.pageY};this.aspectRatio=(typeof j.aspectRatio=="number")?j.aspectRatio:((this.originalSize.width/this.originalSize.height)||1);var h=c(".ui-resizable-"+this.axis).css("cursor");c("body").css("cursor",h=="auto"?this.axis+"-resize":h);d.addClass("ui-resizable-resizing");this._propagate("start",f);return true},_mouseDrag:function(d){var g=this.helper,f=this.options,n={},r=this,j=this.originalMousePosition,p=this.axis;var u=(d.pageX-j.left)||0,q=(d.pageY-j.top)||0;var h=this._change[p];if(!h){return false}var m=h.apply(this,[d,u,q]),l=c.browser.msie&&c.browser.version<7,e=this.sizeDiff;if(this._aspectRatio||d.shiftKey){m=this._updateRatio(m,d)}m=this._respectSize(m,d);this._propagate("resize",d);g.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(m);this._trigger("resize",d,this.ui());return false},_mouseStop:function(g){this.resizing=false;var h=this.options,n=this;if(this._helper){var f=this._proportionallyResizeElements,d=f.length&&(/textarea/i).test(f[0].nodeName),e=d&&c.ui.hasScroll(f[0],"left")?0:n.sizeDiff.height,l=d?0:n.sizeDiff.width;var p={width:(n.size.width-l),height:(n.size.height-e)},j=(parseInt(n.element.css("left"),10)+(n.position.left-n.originalPosition.left))||null,m=(parseInt(n.element.css("top"),10)+(n.position.top-n.originalPosition.top))||null;if(!h.animate){this.element.css(c.extend(p,{top:m,left:j}))}n.helper.height(n.size.height);n.helper.width(n.size.width);if(this._helper&&!h.animate){this._proportionallyResize()}}c("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",g);if(this._helper){this.helper.remove()}return false},_updateCache:function(d){var e=this.options;this.offset=this.helper.offset();if(a(d.left)){this.position.left=d.left}if(a(d.top)){this.position.top=d.top}if(a(d.height)){this.size.height=d.height}if(a(d.width)){this.size.width=d.width}},_updateRatio:function(g,f){var h=this.options,j=this.position,e=this.size,d=this.axis;if(g.height){g.width=(e.height*this.aspectRatio)}else{if(g.width){g.height=(e.width/this.aspectRatio)}}if(d=="sw"){g.left=j.left+(e.width-g.width);g.top=null}if(d=="nw"){g.top=j.top+(e.height-g.height);g.left=j.left+(e.width-g.width)}return g},_respectSize:function(m,f){var j=this.helper,h=this.options,u=this._aspectRatio||f.shiftKey,r=this.axis,w=a(m.width)&&h.maxWidth&&(h.maxWidth<m.width),n=a(m.height)&&h.maxHeight&&(h.maxHeight<m.height),g=a(m.width)&&h.minWidth&&(h.minWidth>m.width),v=a(m.height)&&h.minHeight&&(h.minHeight>m.height);if(g){m.width=h.minWidth}if(v){m.height=h.minHeight}if(w){m.width=h.maxWidth}if(n){m.height=h.maxHeight}var e=this.originalPosition.left+this.originalSize.width,q=this.position.top+this.size.height;var l=/sw|nw|w/.test(r),d=/nw|ne|n/.test(r);if(g&&l){m.left=e-h.minWidth}if(w&&l){m.left=e-h.maxWidth}if(v&&d){m.top=q-h.minHeight}if(n&&d){m.top=q-h.maxHeight}var p=!m.width&&!m.height;if(p&&!m.left&&m.top){m.top=null}else{if(p&&!m.top&&m.left){m.left=null}}return m},_proportionallyResize:function(){var j=this.options;if(!this._proportionallyResizeElements.length){return}var f=this.helper||this.element;for(var e=0;e<this._proportionallyResizeElements.length;e++){var g=this._proportionallyResizeElements[e];if(!this.borderDif){var d=[g.css("borderTopWidth"),g.css("borderRightWidth"),g.css("borderBottomWidth"),g.css("borderLeftWidth")],h=[g.css("paddingTop"),g.css("paddingRight"),g.css("paddingBottom"),g.css("paddingLeft")];this.borderDif=c.map(d,function(l,n){var m=parseInt(l,10)||0,o=parseInt(h[n],10)||0;return m+o})}if(c.browser.msie&&!(!(c(f).is(":hidden")||c(f).parents(":hidden").length))){continue}g.css({height:(f.height()-this.borderDif[0]-this.borderDif[2])||0,width:(f.width()-this.borderDif[1]-this.borderDif[3])||0})}},_renderProxy:function(){var e=this.element,h=this.options;this.elementOffset=e.offset();if(this._helper){this.helper=this.helper||c('<div style="overflow:hidden;"></div>');var d=c.browser.msie&&c.browser.version<7,f=(d?1:0),g=(d?2:-1);this.helper.addClass(this._helper).css({width:this.element.outerWidth()+g,height:this.element.outerHeight()+g,position:"absolute",left:this.elementOffset.left-f+"px",top:this.elementOffset.top-f+"px",zIndex:++h.zIndex});this.helper.appendTo("body").disableSelection()}else{this.helper=this.element}},_change:{e:function(f,e,d){return{width:this.originalSize.width+e}},w:function(g,e,d){var j=this.options,f=this.originalSize,h=this.originalPosition;return{left:h.left+e,width:f.width-e}},n:function(g,e,d){var j=this.options,f=this.originalSize,h=this.originalPosition;return{top:h.top+d,height:f.height-d}},s:function(f,e,d){return{height:this.originalSize.height+d}},se:function(f,e,d){return c.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[f,e,d]))},sw:function(f,e,d){return c.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[f,e,d]))},ne:function(f,e,d){return c.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[f,e,d]))},nw:function(f,e,d){return c.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[f,e,d]))}},_propagate:function(e,d){c.ui.plugin.call(this,e,[d,this.ui()]);(e!="resize"&&this._trigger(e,d,this.ui()))},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}));c.extend(c.ui.resizable,{version:"1.7.2",eventPrefix:"resize",defaults:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,cancel:":input,option",containment:false,delay:0,distance:1,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1000}});c.ui.plugin.add("resizable","alsoResize",{start:function(e,f){var d=c(this).data("resizable"),g=d.options;_store=function(h){c(h).each(function(){c(this).data("resizable-alsoresize",{width:parseInt(c(this).width(),10),height:parseInt(c(this).height(),10),left:parseInt(c(this).css("left"),10),top:parseInt(c(this).css("top"),10)})})};if(typeof(g.alsoResize)=="object"&&!g.alsoResize.parentNode){if(g.alsoResize.length){g.alsoResize=g.alsoResize[0];_store(g.alsoResize)}else{c.each(g.alsoResize,function(h,j){_store(h)})}}else{_store(g.alsoResize)}},resize:function(f,h){var e=c(this).data("resizable"),j=e.options,g=e.originalSize,m=e.originalPosition;var l={height:(e.size.height-g.height)||0,width:(e.size.width-g.width)||0,top:(e.position.top-m.top)||0,left:(e.position.left-m.left)||0},d=function(n,o){c(n).each(function(){var r=c(this),u=c(this).data("resizable-alsoresize"),q={},p=o&&o.length?o:["width","height","top","left"];c.each(p||["width","height","top","left"],function(v,y){var w=(u[y]||0)+(l[y]||0);if(w&&w>=0){q[y]=w||null}});if(/relative/.test(r.css("position"))&&c.browser.opera){e._revertToRelativePosition=true;r.css({position:"absolute",top:"auto",left:"auto"})}r.css(q)})};if(typeof(j.alsoResize)=="object"&&!j.alsoResize.nodeType){c.each(j.alsoResize,function(n,o){d(n,o)})}else{d(j.alsoResize)}},stop:function(e,f){var d=c(this).data("resizable");if(d._revertToRelativePosition&&c.browser.opera){d._revertToRelativePosition=false;el.css({position:"relative"})}c(this).removeData("resizable-alsoresize-start")}});c.ui.plugin.add("resizable","animate",{stop:function(h,p){var q=c(this).data("resizable"),j=q.options;var g=q._proportionallyResizeElements,d=g.length&&(/textarea/i).test(g[0].nodeName),e=d&&c.ui.hasScroll(g[0],"left")?0:q.sizeDiff.height,m=d?0:q.sizeDiff.width;var f={width:(q.size.width-m),height:(q.size.height-e)},l=(parseInt(q.element.css("left"),10)+(q.position.left-q.originalPosition.left))||null,n=(parseInt(q.element.css("top"),10)+(q.position.top-q.originalPosition.top))||null;q.element.animate(c.extend(f,n&&l?{top:n,left:l}:{}),{duration:j.animateDuration,easing:j.animateEasing,step:function(){var o={width:parseInt(q.element.css("width"),10),height:parseInt(q.element.css("height"),10),top:parseInt(q.element.css("top"),10),left:parseInt(q.element.css("left"),10)};if(g&&g.length){c(g[0]).css({width:o.width,height:o.height})}q._updateCache(o);q._propagate("resize",h)}})}});c.ui.plugin.add("resizable","containment",{start:function(e,u){var w=c(this).data("resizable"),j=w.options,m=w.element;var f=j.containment,l=(f instanceof c)?f.get(0):(/parent/.test(f))?m.parent().get(0):f;if(!l){return}w.containerElement=c(l);if(/document/.test(f)||f==document){w.containerOffset={left:0,top:0};w.containerPosition={left:0,top:0};w.parentData={element:c(document),left:0,top:0,width:c(document).width(),height:c(document).height()||document.body.parentNode.scrollHeight}}else{var q=c(l),h=[];c(["Top","Right","Left","Bottom"]).each(function(p,o){h[p]=b(q.css("padding"+o))});w.containerOffset=q.offset();w.containerPosition=q.position();w.containerSize={height:(q.innerHeight()-h[3]),width:(q.innerWidth()-h[1])};var r=w.containerOffset,d=w.containerSize.height,n=w.containerSize.width,g=(c.ui.hasScroll(l,"left")?l.scrollWidth:n),v=(c.ui.hasScroll(l)?l.scrollHeight:d);w.parentData={element:l,left:r.left,top:r.top,width:g,height:v}}},resize:function(f,r){var w=c(this).data("resizable"),h=w.options,e=w.containerSize,q=w.containerOffset,n=w.size,p=w.position,u=w._aspectRatio||f.shiftKey,d={top:0,left:0},g=w.containerElement;if(g[0]!=document&&(/static/).test(g.css("position"))){d=q}if(p.left<(w._helper?q.left:0)){w.size.width=w.size.width+(w._helper?(w.position.left-q.left):(w.position.left-d.left));if(u){w.size.height=w.size.width/h.aspectRatio}w.position.left=h.helper?q.left:0}if(p.top<(w._helper?q.top:0)){w.size.height=w.size.height+(w._helper?(w.position.top-q.top):w.position.top);if(u){w.size.width=w.size.height*h.aspectRatio}w.position.top=w._helper?q.top:0}w.offset.left=w.parentData.left+w.position.left;w.offset.top=w.parentData.top+w.position.top;var m=Math.abs((w._helper?w.offset.left-d.left:(w.offset.left-d.left))+w.sizeDiff.width),v=Math.abs((w._helper?w.offset.top-d.top:(w.offset.top-q.top))+w.sizeDiff.height);var l=w.containerElement.get(0)==w.element.parent().get(0),j=/relative|absolute/.test(w.containerElement.css("position"));if(l&&j){m-=w.parentData.left}if(m+w.size.width>=w.parentData.width){w.size.width=w.parentData.width-m;if(u){w.size.height=w.size.width/w.aspectRatio}}if(v+w.size.height>=w.parentData.height){w.size.height=w.parentData.height-v;if(u){w.size.width=w.size.height*w.aspectRatio}}},stop:function(e,p){var r=c(this).data("resizable"),f=r.options,m=r.position,n=r.containerOffset,d=r.containerPosition,g=r.containerElement;var j=c(r.helper),u=j.offset(),q=j.outerWidth()-r.sizeDiff.width,l=j.outerHeight()-r.sizeDiff.height;if(r._helper&&!f.animate&&(/relative/).test(g.css("position"))){c(this).css({left:u.left-d.left-n.left,width:q,height:l})}if(r._helper&&!f.animate&&(/static/).test(g.css("position"))){c(this).css({left:u.left-d.left-n.left,width:q,height:l})}}});c.ui.plugin.add("resizable","ghost",{start:function(f,g){var d=c(this).data("resizable"),h=d.options,e=d.size;d.ghost=d.originalElement.clone();d.ghost.css({opacity:0.25,display:"block",position:"relative",height:e.height,width:e.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof h.ghost=="string"?h.ghost:"");d.ghost.appendTo(d.helper)},resize:function(e,f){var d=c(this).data("resizable"),g=d.options;if(d.ghost){d.ghost.css({position:"relative",height:d.size.height,width:d.size.width})}},stop:function(e,f){var d=c(this).data("resizable"),g=d.options;if(d.ghost&&d.helper){d.helper.get(0).removeChild(d.ghost.get(0))}}});c.ui.plugin.add("resizable","grid",{resize:function(d,n){var q=c(this).data("resizable"),g=q.options,l=q.size,h=q.originalSize,j=q.originalPosition,p=q.axis,m=g._aspectRatio||d.shiftKey;g.grid=typeof g.grid=="number"?[g.grid,g.grid]:g.grid;var f=Math.round((l.width-h.width)/(g.grid[0]||1))*(g.grid[0]||1),e=Math.round((l.height-h.height)/(g.grid[1]||1))*(g.grid[1]||1);if(/^(se|s|e)$/.test(p)){q.size.width=h.width+f;q.size.height=h.height+e}else{if(/^(ne)$/.test(p)){q.size.width=h.width+f;q.size.height=h.height+e;q.position.top=j.top-e}else{if(/^(sw)$/.test(p)){q.size.width=h.width+f;q.size.height=h.height+e;q.position.left=j.left-f}else{q.size.width=h.width+f;q.size.height=h.height+e;q.position.top=j.top-e;q.position.left=j.left-f}}}}});var b=function(d){return parseInt(d,10)||0};var a=function(d){return !isNaN(parseInt(d,10))}})(jQuery);(function(c){var b={dragStart:"start.draggable",drag:"drag.draggable",dragStop:"stop.draggable",maxHeight:"maxHeight.resizable",minHeight:"minHeight.resizable",maxWidth:"maxWidth.resizable",minWidth:"minWidth.resizable",resizeStart:"start.resizable",resize:"drag.resizable",resizeStop:"stop.resizable"},a="ui-dialog ui-widget ui-widget-content ui-corner-all ";c.widget("ui.dialog",{_init:function(){this.originalTitle=this.element.attr("title");var n=this,o=this.options,l=o.title||this.originalTitle||"&nbsp;",e=c.ui.dialog.getTitleId(this.element),m=(this.uiDialog=c("<div/>")).appendTo(document.body).hide().addClass(a+o.dialogClass).css({position:"absolute",overflow:"hidden",zIndex:o.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(p){(o.closeOnEscape&&p.keyCode&&p.keyCode==c.ui.keyCode.ESCAPE&&n.close(p))}).attr({role:"dialog","aria-labelledby":e}).mousedown(function(p){n.moveToTop(false,p)}),g=this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(m),f=(this.uiDialogTitlebar=c("<div></div>")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(m),j=c('<a href="#"/>').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){j.addClass("ui-state-hover")},function(){j.removeClass("ui-state-hover")}).focus(function(){j.addClass("ui-state-focus")}).blur(function(){j.removeClass("ui-state-focus")}).mousedown(function(p){p.stopPropagation()}).click(function(p){n.close(p);return false}).appendTo(f),h=(this.uiDialogTitlebarCloseText=c("<span/>")).addClass("ui-icon ui-icon-closethick").text(o.closeText).appendTo(j),d=c("<span/>").addClass("ui-dialog-title").attr("id",e).html(l).prependTo(f);f.find("*").add(f).disableSelection();(o.draggable&&c.fn.draggable&&this._makeDraggable());(o.resizable&&c.fn.resizable&&this._makeResizable());this._createButtons(o.buttons);this._isOpen=false;(o.bgiframe&&c.fn.bgiframe&&m.bgiframe());(o.autoOpen&&this.open())},destroy:function(){(this.overlay&&this.overlay.destroy());this.uiDialog.hide();this.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body");this.uiDialog.remove();(this.originalTitle&&this.element.attr("title",this.originalTitle))},close:function(f){var d=this;if(false===d._trigger("beforeclose",f)){return}(d.overlay&&d.overlay.destroy());d.uiDialog.unbind("keypress.ui-dialog");(d.options.hide?d.uiDialog.hide(d.options.hide,function(){d._trigger("close",f)}):d.uiDialog.hide()&&d._trigger("close",f));c.ui.dialog.overlay.resize();d._isOpen=false;if(d.options.modal){var e=0;c(".ui-dialog").each(function(){if(this!=d.uiDialog[0]){e=Math.max(e,c(this).css("z-index"))}});c.ui.dialog.maxZ=e}},isOpen:function(){return this._isOpen},moveToTop:function(f,e){if((this.options.modal&&!f)||(!this.options.stack&&!this.options.modal)){return this._trigger("focus",e)}if(this.options.zIndex>c.ui.dialog.maxZ){c.ui.dialog.maxZ=this.options.zIndex}(this.overlay&&this.overlay.$el.css("z-index",c.ui.dialog.overlay.maxZ=++c.ui.dialog.maxZ));var d={scrollTop:this.element.attr("scrollTop"),scrollLeft:this.element.attr("scrollLeft")};this.uiDialog.css("z-index",++c.ui.dialog.maxZ);this.element.attr(d);this._trigger("focus",e)},open:function(){if(this._isOpen){return}var e=this.options,d=this.uiDialog;this.overlay=e.modal?new c.ui.dialog.overlay(this):null;(d.next().length&&d.appendTo("body"));this._size();this._position(e.position);d.show(e.show);this.moveToTop(true);(e.modal&&d.bind("keypress.ui-dialog",function(h){if(h.keyCode!=c.ui.keyCode.TAB){return}var g=c(":tabbable",this),j=g.filter(":first")[0],f=g.filter(":last")[0];if(h.target==f&&!h.shiftKey){setTimeout(function(){j.focus()},1)}else{if(h.target==j&&h.shiftKey){setTimeout(function(){f.focus()},1)}}}));c([]).add(d.find(".ui-dialog-content :tabbable:first")).add(d.find(".ui-dialog-buttonpane :tabbable:first")).add(d).filter(":first").focus();this._trigger("open");this._isOpen=true},_createButtons:function(g){var f=this,d=false,e=c("<div></div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix");this.uiDialog.find(".ui-dialog-buttonpane").remove();(typeof g=="object"&&g!==null&&c.each(g,function(){return !(d=true)}));if(d){c.each(g,function(h,j){c('<button type="button"></button>').addClass("ui-state-default ui-corner-all").text(h).click(function(){j.apply(f.element[0],arguments)}).hover(function(){c(this).addClass("ui-state-hover")},function(){c(this).removeClass("ui-state-hover")}).focus(function(){c(this).addClass("ui-state-focus")}).blur(function(){c(this).removeClass("ui-state-focus")}).appendTo(e)});e.appendTo(this.uiDialog)}},_makeDraggable:function(){var d=this,f=this.options,e;this.uiDialog.draggable({cancel:".ui-dialog-content",handle:".ui-dialog-titlebar",containment:"document",start:function(){e=f.height;c(this).height(c(this).height()).addClass("ui-dialog-dragging");(f.dragStart&&f.dragStart.apply(d.element[0],arguments))},drag:function(){(f.drag&&f.drag.apply(d.element[0],arguments))},stop:function(){c(this).removeClass("ui-dialog-dragging").height(e);(f.dragStop&&f.dragStop.apply(d.element[0],arguments));c.ui.dialog.overlay.resize()}})},_makeResizable:function(g){g=(g===undefined?this.options.resizable:g);var d=this,f=this.options,e=typeof g=="string"?g:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",alsoResize:this.element,maxWidth:f.maxWidth,maxHeight:f.maxHeight,minWidth:f.minWidth,minHeight:f.minHeight,start:function(){c(this).addClass("ui-dialog-resizing");(f.resizeStart&&f.resizeStart.apply(d.element[0],arguments))},resize:function(){(f.resize&&f.resize.apply(d.element[0],arguments))},handles:e,stop:function(){c(this).removeClass("ui-dialog-resizing");f.height=c(this).height();f.width=c(this).width();(f.resizeStop&&f.resizeStop.apply(d.element[0],arguments));c.ui.dialog.overlay.resize()}}).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_position:function(j){var e=c(window),f=c(document),g=f.scrollTop(),d=f.scrollLeft(),h=g;if(c.inArray(j,["center","top","right","bottom","left"])>=0){j=[j=="right"||j=="left"?j:"center",j=="top"||j=="bottom"?j:"middle"]}if(j.constructor!=Array){j=["center","middle"]}if(j[0].constructor==Number){d+=j[0]}else{switch(j[0]){case"left":d+=0;break;case"right":d+=e.width()-this.uiDialog.outerWidth();break;default:case"center":d+=(e.width()-this.uiDialog.outerWidth())/2}}if(j[1].constructor==Number){g+=j[1]}else{switch(j[1]){case"top":g+=0;break;case"bottom":g+=e.height()-this.uiDialog.outerHeight();break;default:case"middle":g+=(e.height()-this.uiDialog.outerHeight())/2}}g=Math.max(g,h);this.uiDialog.css({top:g,left:d})},_setData:function(e,f){(b[e]&&this.uiDialog.data(b[e],f));switch(e){case"buttons":this._createButtons(f);break;case"closeText":this.uiDialogTitlebarCloseText.text(f);break;case"dialogClass":this.uiDialog.removeClass(this.options.dialogClass).addClass(a+f);break;case"draggable":(f?this._makeDraggable():this.uiDialog.draggable("destroy"));break;case"height":this.uiDialog.height(f);break;case"position":this._position(f);break;case"resizable":var d=this.uiDialog,g=this.uiDialog.is(":data(resizable)");(g&&!f&&d.resizable("destroy"));(g&&typeof f=="string"&&d.resizable("option","handles",f));(g||this._makeResizable(f));break;case"title":c(".ui-dialog-title",this.uiDialogTitlebar).html(f||"&nbsp;");break;case"width":this.uiDialog.width(f);break}c.widget.prototype._setData.apply(this,arguments)},_size:function(){var e=this.options;this.element.css({height:0,minHeight:0,width:"auto"});var d=this.uiDialog.css({height:"auto",width:e.width}).height();this.element.css({minHeight:Math.max(e.minHeight-d,0),height:e.height=="auto"?"auto":Math.max(e.height-d,0)})}});c.extend(c.ui.dialog,{version:"1.7.2",defaults:{autoOpen:true,bgiframe:false,buttons:{},closeOnEscape:true,closeText:"close",dialogClass:"",draggable:true,hide:null,height:"auto",maxHeight:false,maxWidth:false,minHeight:150,minWidth:150,modal:false,position:"center",resizable:true,show:null,stack:true,title:"",width:300,zIndex:1000},getter:"isOpen",uuid:0,maxZ:0,getTitleId:function(d){return"ui-dialog-title-"+(d.attr("id")||++this.uuid)},overlay:function(d){this.$el=c.ui.dialog.overlay.create(d)}});c.extend(c.ui.dialog.overlay,{instances:[],maxZ:0,events:c.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(d){return d+".dialog-overlay"}).join(" "),create:function(e){if(this.instances.length===0){setTimeout(function(){if(c.ui.dialog.overlay.instances.length){c(document).bind(c.ui.dialog.overlay.events,function(f){var g=c(f.target).parents(".ui-dialog").css("zIndex")||0;return(g>c.ui.dialog.overlay.maxZ)})}},1);c(document).bind("keydown.dialog-overlay",function(f){(e.options.closeOnEscape&&f.keyCode&&f.keyCode==c.ui.keyCode.ESCAPE&&e.close(f))});c(window).bind("resize.dialog-overlay",c.ui.dialog.overlay.resize)}var d=c("<div></div>").appendTo(document.body).addClass("ui-widget-overlay").css({width:this.width(),height:this.height()});(e.options.bgiframe&&c.fn.bgiframe&&d.bgiframe());this.instances.push(d);return d},destroy:function(d){this.instances.splice(c.inArray(this.instances,d),1);if(this.instances.length===0){c([document,window]).unbind(".dialog-overlay")}d.remove();var e=0;c.each(this.instances,function(){e=Math.max(e,this.css("z-index"))});this.maxZ=e},height:function(){if(c.browser.msie&&c.browser.version<7){var e=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);var d=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);if(e<d){return c(window).height()+"px"}else{return e+"px"}}else{return c(document).height()+"px"}},width:function(){if(c.browser.msie&&c.browser.version<7){var d=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth);var e=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth);if(d<e){return c(window).width()+"px"}else{return d+"px"}}else{return c(document).width()+"px"}},resize:function(){var d=c([]);c.each(c.ui.dialog.overlay.instances,function(){d=d.add(this)});d.css({width:0,height:0}).css({width:c.ui.dialog.overlay.width(),height:c.ui.dialog.overlay.height()})}});c.extend(c.ui.dialog.overlay.prototype,{destroy:function(){c.ui.dialog.overlay.destroy(this.$el)}})})(jQuery);(function($){$.extend($.ui,{datepicker:{version:"1.7.2"}});var PROP_NAME="datepicker";function Datepicker(){this.debug=false;this._curInst=null;this._keyEvent=false;this._disabledInputs=[];this._datepickerShowing=false;this._inDialog=false;this._mainDivId="ui-datepicker-div";this._inlineClass="ui-datepicker-inline";this._appendClass="ui-datepicker-append";this._triggerClass="ui-datepicker-trigger";this._dialogClass="ui-datepicker-dialog";this._disableClass="ui-datepicker-disabled";this._unselectableClass="ui-datepicker-unselectable";this._currentClass="ui-datepicker-current-day";this._dayOverClass="ui-datepicker-days-cell-over";this.regional=[];this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],dateFormat:"mm/dd/yy",firstDay:0,isRTL:false};this._defaults={showOn:"focus",showAnim:"show",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:false,hideIfNoPrevNext:false,navigationAsDateFormat:false,gotoCurrent:false,changeMonth:false,changeYear:false,showMonthAfterYear:false,yearRange:"-10:+10",showOtherMonths:false,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"normal",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:true,showButtonPanel:false};$.extend(this._defaults,this.regional[""]);this.dpDiv=$('<div id="'+this._mainDivId+'" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all ui-helper-hidden-accessible"></div>')}$.extend(Datepicker.prototype,{markerClassName:"hasDatepicker",log:function(){if(this.debug){console.log.apply("",arguments)}},setDefaults:function(settings){extendRemove(this._defaults,settings||{});return this},_attachDatepicker:function(target,settings){var inlineSettings=null;for(var attrName in this._defaults){var attrValue=target.getAttribute("date:"+attrName);if(attrValue){inlineSettings=inlineSettings||{};try{inlineSettings[attrName]=eval(attrValue)}catch(err){inlineSettings[attrName]=attrValue}}}var nodeName=target.nodeName.toLowerCase();var inline=(nodeName=="div"||nodeName=="span");if(!target.id){target.id="dp"+(++this.uuid)}var inst=this._newInst($(target),inline);inst.settings=$.extend({},settings||{},inlineSettings||{});if(nodeName=="input"){this._connectDatepicker(target,inst)}else{if(inline){this._inlineDatepicker(target,inst)}}},_newInst:function(target,inline){var id=target[0].id.replace(/([:\[\]\.])/g,"\\\\$1");return{id:id,input:target,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:inline,dpDiv:(!inline?this.dpDiv:$('<div class="'+this._inlineClass+' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))}},_connectDatepicker:function(target,inst){var input=$(target);inst.append=$([]);inst.trigger=$([]);if(input.hasClass(this.markerClassName)){return}var appendText=this._get(inst,"appendText");var isRTL=this._get(inst,"isRTL");if(appendText){inst.append=$('<span class="'+this._appendClass+'">'+appendText+"</span>");input[isRTL?"before":"after"](inst.append)}var showOn=this._get(inst,"showOn");if(showOn=="focus"||showOn=="both"){input.focus(this._showDatepicker)}if(showOn=="button"||showOn=="both"){var buttonText=this._get(inst,"buttonText");var buttonImage=this._get(inst,"buttonImage");inst.trigger=$(this._get(inst,"buttonImageOnly")?$("<img/>").addClass(this._triggerClass).attr({src:buttonImage,alt:buttonText,title:buttonText}):$('<button type="button"></button>').addClass(this._triggerClass).html(buttonImage==""?buttonText:$("<img/>").attr({src:buttonImage,alt:buttonText,title:buttonText})));input[isRTL?"before":"after"](inst.trigger);inst.trigger.click(function(){if($.datepicker._datepickerShowing&&$.datepicker._lastInput==target){$.datepicker._hideDatepicker()}else{$.datepicker._showDatepicker(target)}return false})}input.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).bind("setData.datepicker",function(event,key,value){inst.settings[key]=value}).bind("getData.datepicker",function(event,key){return this._get(inst,key)});$.data(target,PROP_NAME,inst)},_inlineDatepicker:function(target,inst){var divSpan=$(target);if(divSpan.hasClass(this.markerClassName)){return}divSpan.addClass(this.markerClassName).append(inst.dpDiv).bind("setData.datepicker",function(event,key,value){inst.settings[key]=value}).bind("getData.datepicker",function(event,key){return this._get(inst,key)});$.data(target,PROP_NAME,inst);this._setDate(inst,this._getDefaultDate(inst));this._updateDatepicker(inst);this._updateAlternate(inst)},_dialogDatepicker:function(input,dateText,onSelect,settings,pos){var inst=this._dialogInst;if(!inst){var id="dp"+(++this.uuid);this._dialogInput=$('<input type="text" id="'+id+'" size="1" style="position: absolute; top: -100px;"/>');this._dialogInput.keydown(this._doKeyDown);$("body").append(this._dialogInput);inst=this._dialogInst=this._newInst(this._dialogInput,false);inst.settings={};$.data(this._dialogInput[0],PROP_NAME,inst)}extendRemove(inst.settings,settings||{});this._dialogInput.val(dateText);this._pos=(pos?(pos.length?pos:[pos.pageX,pos.pageY]):null);if(!this._pos){var browserWidth=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;var browserHeight=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;var scrollX=document.documentElement.scrollLeft||document.body.scrollLeft;var scrollY=document.documentElement.scrollTop||document.body.scrollTop;this._pos=[(browserWidth/2)-100+scrollX,(browserHeight/2)-150+scrollY]}this._dialogInput.css("left",this._pos[0]+"px").css("top",this._pos[1]+"px");inst.settings.onSelect=onSelect;this._inDialog=true;this.dpDiv.addClass(this._dialogClass);this._showDatepicker(this._dialogInput[0]);if($.blockUI){$.blockUI(this.dpDiv)}$.data(this._dialogInput[0],PROP_NAME,inst);return this},_destroyDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return}var nodeName=target.nodeName.toLowerCase();$.removeData(target,PROP_NAME);if(nodeName=="input"){inst.append.remove();inst.trigger.remove();$target.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress)}else{if(nodeName=="div"||nodeName=="span"){$target.removeClass(this.markerClassName).empty()}}},_enableDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return}var nodeName=target.nodeName.toLowerCase();if(nodeName=="input"){target.disabled=false;inst.trigger.filter("button").each(function(){this.disabled=false}).end().filter("img").css({opacity:"1.0",cursor:""})}else{if(nodeName=="div"||nodeName=="span"){var inline=$target.children("."+this._inlineClass);inline.children().removeClass("ui-state-disabled")}}this._disabledInputs=$.map(this._disabledInputs,function(value){return(value==target?null:value)})},_disableDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return}var nodeName=target.nodeName.toLowerCase();if(nodeName=="input"){target.disabled=true;inst.trigger.filter("button").each(function(){this.disabled=true}).end().filter("img").css({opacity:"0.5",cursor:"default"})}else{if(nodeName=="div"||nodeName=="span"){var inline=$target.children("."+this._inlineClass);inline.children().addClass("ui-state-disabled")}}this._disabledInputs=$.map(this._disabledInputs,function(value){return(value==target?null:value)});this._disabledInputs[this._disabledInputs.length]=target},_isDisabledDatepicker:function(target){if(!target){return false}for(var i=0;i<this._disabledInputs.length;i++){if(this._disabledInputs[i]==target){return true}}return false},_getInst:function(target){try{return $.data(target,PROP_NAME)}catch(err){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(target,name,value){var inst=this._getInst(target);if(arguments.length==2&&typeof name=="string"){return(name=="defaults"?$.extend({},$.datepicker._defaults):(inst?(name=="all"?$.extend({},inst.settings):this._get(inst,name)):null))}var settings=name||{};if(typeof name=="string"){settings={};settings[name]=value}if(inst){if(this._curInst==inst){this._hideDatepicker(null)}var date=this._getDateDatepicker(target);extendRemove(inst.settings,settings);this._setDateDatepicker(target,date);this._updateDatepicker(inst)}},_changeDatepicker:function(target,name,value){this._optionDatepicker(target,name,value)},_refreshDatepicker:function(target){var inst=this._getInst(target);if(inst){this._updateDatepicker(inst)}},_setDateDatepicker:function(target,date,endDate){var inst=this._getInst(target);if(inst){this._setDate(inst,date,endDate);this._updateDatepicker(inst);this._updateAlternate(inst)}},_getDateDatepicker:function(target){var inst=this._getInst(target);if(inst&&!inst.inline){this._setDateFromField(inst)}return(inst?this._getDate(inst):null)},_doKeyDown:function(event){var inst=$.datepicker._getInst(event.target);var handled=true;var isRTL=inst.dpDiv.is(".ui-datepicker-rtl");inst._keyEvent=true;if($.datepicker._datepickerShowing){switch(event.keyCode){case 9:$.datepicker._hideDatepicker(null,"");break;case 13:var sel=$("td."+$.datepicker._dayOverClass+", td."+$.datepicker._currentClass,inst.dpDiv);if(sel[0]){$.datepicker._selectDay(event.target,inst.selectedMonth,inst.selectedYear,sel[0])}else{$.datepicker._hideDatepicker(null,$.datepicker._get(inst,"duration"))}return false;break;case 27:$.datepicker._hideDatepicker(null,$.datepicker._get(inst,"duration"));break;case 33:$.datepicker._adjustDate(event.target,(event.ctrlKey?-$.datepicker._get(inst,"stepBigMonths"):-$.datepicker._get(inst,"stepMonths")),"M");break;case 34:$.datepicker._adjustDate(event.target,(event.ctrlKey?+$.datepicker._get(inst,"stepBigMonths"):+$.datepicker._get(inst,"stepMonths")),"M");break;case 35:if(event.ctrlKey||event.metaKey){$.datepicker._clearDate(event.target)}handled=event.ctrlKey||event.metaKey;break;case 36:if(event.ctrlKey||event.metaKey){$.datepicker._gotoToday(event.target)}handled=event.ctrlKey||event.metaKey;break;case 37:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,(isRTL?+1:-1),"D")}handled=event.ctrlKey||event.metaKey;if(event.originalEvent.altKey){$.datepicker._adjustDate(event.target,(event.ctrlKey?-$.datepicker._get(inst,"stepBigMonths"):-$.datepicker._get(inst,"stepMonths")),"M")}break;case 38:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,-7,"D")}handled=event.ctrlKey||event.metaKey;break;case 39:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,(isRTL?-1:+1),"D")}handled=event.ctrlKey||event.metaKey;if(event.originalEvent.altKey){$.datepicker._adjustDate(event.target,(event.ctrlKey?+$.datepicker._get(inst,"stepBigMonths"):+$.datepicker._get(inst,"stepMonths")),"M")}break;case 40:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,+7,"D")}handled=event.ctrlKey||event.metaKey;break;default:handled=false}}else{if(event.keyCode==36&&event.ctrlKey){$.datepicker._showDatepicker(this)}else{handled=false}}if(handled){event.preventDefault();event.stopPropagation()}},_doKeyPress:function(event){var inst=$.datepicker._getInst(event.target);if($.datepicker._get(inst,"constrainInput")){var chars=$.datepicker._possibleChars($.datepicker._get(inst,"dateFormat"));var chr=String.fromCharCode(event.charCode==undefined?event.keyCode:event.charCode);return event.ctrlKey||(chr<" "||!chars||chars.indexOf(chr)>-1)}},_showDatepicker:function(input){input=input.target||input;if(input.nodeName.toLowerCase()!="input"){input=$("input",input.parentNode)[0]}if($.datepicker._isDisabledDatepicker(input)||$.datepicker._lastInput==input){return}var inst=$.datepicker._getInst(input);var beforeShow=$.datepicker._get(inst,"beforeShow");extendRemove(inst.settings,(beforeShow?beforeShow.apply(input,[input,inst]):{}));$.datepicker._hideDatepicker(null,"");$.datepicker._lastInput=input;$.datepicker._setDateFromField(inst);if($.datepicker._inDialog){input.value=""}if(!$.datepicker._pos){$.datepicker._pos=$.datepicker._findPos(input);$.datepicker._pos[1]+=input.offsetHeight}var isFixed=false;$(input).parents().each(function(){isFixed|=$(this).css("position")=="fixed";return !isFixed});if(isFixed&&$.browser.opera){$.datepicker._pos[0]-=document.documentElement.scrollLeft;$.datepicker._pos[1]-=document.documentElement.scrollTop}var offset={left:$.datepicker._pos[0],top:$.datepicker._pos[1]};$.datepicker._pos=null;inst.rangeStart=null;inst.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});$.datepicker._updateDatepicker(inst);offset=$.datepicker._checkOffset(inst,offset,isFixed);inst.dpDiv.css({position:($.datepicker._inDialog&&$.blockUI?"static":(isFixed?"fixed":"absolute")),display:"none",left:offset.left+"px",top:offset.top+"px"});if(!inst.inline){var showAnim=$.datepicker._get(inst,"showAnim")||"show";var duration=$.datepicker._get(inst,"duration");var postProcess=function(){$.datepicker._datepickerShowing=true;if($.browser.msie&&parseInt($.browser.version,10)<7){$("iframe.ui-datepicker-cover").css({width:inst.dpDiv.width()+4,height:inst.dpDiv.height()+4})}};if($.effects&&$.effects[showAnim]){inst.dpDiv.show(showAnim,$.datepicker._get(inst,"showOptions"),duration,postProcess)}else{inst.dpDiv[showAnim](duration,postProcess)}if(duration==""){postProcess()}if(inst.input[0].type!="hidden"){inst.input[0].focus()}$.datepicker._curInst=inst}},_updateDatepicker:function(inst){var dims={width:inst.dpDiv.width()+4,height:inst.dpDiv.height()+4};var self=this;inst.dpDiv.empty().append(this._generateHTML(inst)).find("iframe.ui-datepicker-cover").css({width:dims.width,height:dims.height}).end().find("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a").bind("mouseout",function(){$(this).removeClass("ui-state-hover");if(this.className.indexOf("ui-datepicker-prev")!=-1){$(this).removeClass("ui-datepicker-prev-hover")}if(this.className.indexOf("ui-datepicker-next")!=-1){$(this).removeClass("ui-datepicker-next-hover")}}).bind("mouseover",function(){if(!self._isDisabledDatepicker(inst.inline?inst.dpDiv.parent()[0]:inst.input[0])){$(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");$(this).addClass("ui-state-hover");if(this.className.indexOf("ui-datepicker-prev")!=-1){$(this).addClass("ui-datepicker-prev-hover")}if(this.className.indexOf("ui-datepicker-next")!=-1){$(this).addClass("ui-datepicker-next-hover")}}}).end().find("."+this._dayOverClass+" a").trigger("mouseover").end();var numMonths=this._getNumberOfMonths(inst);var cols=numMonths[1];var width=17;if(cols>1){inst.dpDiv.addClass("ui-datepicker-multi-"+cols).css("width",(width*cols)+"em")}else{inst.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("")}inst.dpDiv[(numMonths[0]!=1||numMonths[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi");inst.dpDiv[(this._get(inst,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");if(inst.input&&inst.input[0].type!="hidden"&&inst==$.datepicker._curInst){$(inst.input[0]).focus()}},_checkOffset:function(inst,offset,isFixed){var dpWidth=inst.dpDiv.outerWidth();var dpHeight=inst.dpDiv.outerHeight();var inputWidth=inst.input?inst.input.outerWidth():0;var inputHeight=inst.input?inst.input.outerHeight():0;var viewWidth=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)+$(document).scrollLeft();var viewHeight=(window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)+$(document).scrollTop();offset.left-=(this._get(inst,"isRTL")?(dpWidth-inputWidth):0);offset.left-=(isFixed&&offset.left==inst.input.offset().left)?$(document).scrollLeft():0;offset.top-=(isFixed&&offset.top==(inst.input.offset().top+inputHeight))?$(document).scrollTop():0;offset.left-=(offset.left+dpWidth>viewWidth&&viewWidth>dpWidth)?Math.abs(offset.left+dpWidth-viewWidth):0;offset.top-=(offset.top+dpHeight>viewHeight&&viewHeight>dpHeight)?Math.abs(offset.top+dpHeight+inputHeight*2-viewHeight):0;return offset},_findPos:function(obj){while(obj&&(obj.type=="hidden"||obj.nodeType!=1)){obj=obj.nextSibling}var position=$(obj).offset();return[position.left,position.top]},_hideDatepicker:function(input,duration){var inst=this._curInst;if(!inst||(input&&inst!=$.data(input,PROP_NAME))){return}if(inst.stayOpen){this._selectDate("#"+inst.id,this._formatDate(inst,inst.currentDay,inst.currentMonth,inst.currentYear))}inst.stayOpen=false;if(this._datepickerShowing){duration=(duration!=null?duration:this._get(inst,"duration"));var showAnim=this._get(inst,"showAnim");var postProcess=function(){$.datepicker._tidyDialog(inst)};if(duration!=""&&$.effects&&$.effects[showAnim]){inst.dpDiv.hide(showAnim,$.datepicker._get(inst,"showOptions"),duration,postProcess)}else{inst.dpDiv[(duration==""?"hide":(showAnim=="slideDown"?"slideUp":(showAnim=="fadeIn"?"fadeOut":"hide")))](duration,postProcess)}if(duration==""){this._tidyDialog(inst)}var onClose=this._get(inst,"onClose");if(onClose){onClose.apply((inst.input?inst.input[0]:null),[(inst.input?inst.input.val():""),inst])}this._datepickerShowing=false;this._lastInput=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});if($.blockUI){$.unblockUI();$("body").append(this.dpDiv)}}this._inDialog=false}this._curInst=null},_tidyDialog:function(inst){inst.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(event){if(!$.datepicker._curInst){return}var $target=$(event.target);if(($target.parents("#"+$.datepicker._mainDivId).length==0)&&!$target.hasClass($.datepicker.markerClassName)&&!$target.hasClass($.datepicker._triggerClass)&&$.datepicker._datepickerShowing&&!($.datepicker._inDialog&&$.blockUI)){$.datepicker._hideDatepicker(null,"")}},_adjustDate:function(id,offset,period){var target=$(id);var inst=this._getInst(target[0]);if(this._isDisabledDatepicker(target[0])){return}this._adjustInstDate(inst,offset+(period=="M"?this._get(inst,"showCurrentAtPos"):0),period);this._updateDatepicker(inst)},_gotoToday:function(id){var target=$(id);var inst=this._getInst(target[0]);if(this._get(inst,"gotoCurrent")&&inst.currentDay){inst.selectedDay=inst.currentDay;inst.drawMonth=inst.selectedMonth=inst.currentMonth;inst.drawYear=inst.selectedYear=inst.currentYear}else{var date=new Date();inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear()}this._notifyChange(inst);this._adjustDate(target)},_selectMonthYear:function(id,select,period){var target=$(id);var inst=this._getInst(target[0]);inst._selectingMonthYear=false;inst["selected"+(period=="M"?"Month":"Year")]=inst["draw"+(period=="M"?"Month":"Year")]=parseInt(select.options[select.selectedIndex].value,10);this._notifyChange(inst);this._adjustDate(target)},_clickMonthYear:function(id){var target=$(id);var inst=this._getInst(target[0]);if(inst.input&&inst._selectingMonthYear&&!$.browser.msie){inst.input[0].focus()}inst._selectingMonthYear=!inst._selectingMonthYear},_selectDay:function(id,month,year,td){var target=$(id);if($(td).hasClass(this._unselectableClass)||this._isDisabledDatepicker(target[0])){return}var inst=this._getInst(target[0]);inst.selectedDay=inst.currentDay=$("a",td).html();inst.selectedMonth=inst.currentMonth=month;inst.selectedYear=inst.currentYear=year;if(inst.stayOpen){inst.endDay=inst.endMonth=inst.endYear=null}this._selectDate(id,this._formatDate(inst,inst.currentDay,inst.currentMonth,inst.currentYear));if(inst.stayOpen){inst.rangeStart=this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay));this._updateDatepicker(inst)}},_clearDate:function(id){var target=$(id);var inst=this._getInst(target[0]);inst.stayOpen=false;inst.endDay=inst.endMonth=inst.endYear=inst.rangeStart=null;this._selectDate(target,"")},_selectDate:function(id,dateStr){var target=$(id);var inst=this._getInst(target[0]);dateStr=(dateStr!=null?dateStr:this._formatDate(inst));if(inst.input){inst.input.val(dateStr)}this._updateAlternate(inst);var onSelect=this._get(inst,"onSelect");if(onSelect){onSelect.apply((inst.input?inst.input[0]:null),[dateStr,inst])}else{if(inst.input){inst.input.trigger("change")}}if(inst.inline){this._updateDatepicker(inst)}else{if(!inst.stayOpen){this._hideDatepicker(null,this._get(inst,"duration"));this._lastInput=inst.input[0];if(typeof(inst.input[0])!="object"){inst.input[0].focus()}this._lastInput=null}}},_updateAlternate:function(inst){var altField=this._get(inst,"altField");if(altField){var altFormat=this._get(inst,"altFormat")||this._get(inst,"dateFormat");var date=this._getDate(inst);dateStr=this.formatDate(altFormat,date,this._getFormatConfig(inst));$(altField).each(function(){$(this).val(dateStr)})}},noWeekends:function(date){var day=date.getDay();return[(day>0&&day<6),""]},iso8601Week:function(date){var checkDate=new Date(date.getFullYear(),date.getMonth(),date.getDate());var firstMon=new Date(checkDate.getFullYear(),1-1,4);var firstDay=firstMon.getDay()||7;firstMon.setDate(firstMon.getDate()+1-firstDay);if(firstDay<4&&checkDate<firstMon){checkDate.setDate(checkDate.getDate()-3);return $.datepicker.iso8601Week(checkDate)}else{if(checkDate>new Date(checkDate.getFullYear(),12-1,28)){firstDay=new Date(checkDate.getFullYear()+1,1-1,4).getDay()||7;if(firstDay>4&&(checkDate.getDay()||7)<firstDay-3){return 1}}}return Math.floor(((checkDate-firstMon)/86400000)/7)+1},parseDate:function(format,value,settings){if(format==null||value==null){throw"Invalid arguments"}value=(typeof value=="object"?value.toString():value+"");if(value==""){return null}var shortYearCutoff=(settings?settings.shortYearCutoff:null)||this._defaults.shortYearCutoff;var dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort;var dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames;var monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort;var monthNames=(settings?settings.monthNames:null)||this._defaults.monthNames;var year=-1;var month=-1;var day=-1;var doy=-1;var literal=false;var lookAhead=function(match){var matches=(iFormat+1<format.length&&format.charAt(iFormat+1)==match);if(matches){iFormat++}return matches};var getNumber=function(match){lookAhead(match);var origSize=(match=="@"?14:(match=="y"?4:(match=="o"?3:2)));var size=origSize;var num=0;while(size>0&&iValue<value.length&&value.charAt(iValue)>="0"&&value.charAt(iValue)<="9"){num=num*10+parseInt(value.charAt(iValue++),10);size--}if(size==origSize){throw"Missing number at position "+iValue}return num};var getName=function(match,shortNames,longNames){var names=(lookAhead(match)?longNames:shortNames);var size=0;for(var j=0;j<names.length;j++){size=Math.max(size,names[j].length)}var name="";var iInit=iValue;while(size>0&&iValue<value.length){name+=value.charAt(iValue++);for(var i=0;i<names.length;i++){if(name==names[i]){return i+1}}size--}throw"Unknown name at position "+iInit};var checkLiteral=function(){if(value.charAt(iValue)!=format.charAt(iFormat)){throw"Unexpected literal at position "+iValue}iValue++};var iValue=0;for(var iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)=="'"&&!lookAhead("'")){literal=false}else{checkLiteral()}}else{switch(format.charAt(iFormat)){case"d":day=getNumber("d");break;case"D":getName("D",dayNamesShort,dayNames);break;case"o":doy=getNumber("o");break;case"m":month=getNumber("m");break;case"M":month=getName("M",monthNamesShort,monthNames);break;case"y":year=getNumber("y");break;case"@":var date=new Date(getNumber("@"));year=date.getFullYear();month=date.getMonth()+1;day=date.getDate();break;case"'":if(lookAhead("'")){checkLiteral()}else{literal=true}break;default:checkLiteral()}}}if(year==-1){year=new Date().getFullYear()}else{if(year<100){year+=new Date().getFullYear()-new Date().getFullYear()%100+(year<=shortYearCutoff?0:-100)}}if(doy>-1){month=1;day=doy;do{var dim=this._getDaysInMonth(year,month-1);if(day<=dim){break}month++;day-=dim}while(true)}var date=this._daylightSavingAdjust(new Date(year,month-1,day));if(date.getFullYear()!=year||date.getMonth()+1!=month||date.getDate()!=day){throw"Invalid date"}return date},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TIMESTAMP:"@",W3C:"yy-mm-dd",formatDate:function(format,date,settings){if(!date){return""}var dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort;var dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames;var monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort;var monthNames=(settings?settings.monthNames:null)||this._defaults.monthNames;var lookAhead=function(match){var matches=(iFormat+1<format.length&&format.charAt(iFormat+1)==match);if(matches){iFormat++}return matches};var formatNumber=function(match,value,len){var num=""+value;if(lookAhead(match)){while(num.length<len){num="0"+num}}return num};var formatName=function(match,value,shortNames,longNames){return(lookAhead(match)?longNames[value]:shortNames[value])};var output="";var literal=false;if(date){for(var iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)=="'"&&!lookAhead("'")){literal=false}else{output+=format.charAt(iFormat)}}else{switch(format.charAt(iFormat)){case"d":output+=formatNumber("d",date.getDate(),2);break;case"D":output+=formatName("D",date.getDay(),dayNamesShort,dayNames);break;case"o":var doy=date.getDate();for(var m=date.getMonth()-1;m>=0;m--){doy+=this._getDaysInMonth(date.getFullYear(),m)}output+=formatNumber("o",doy,3);break;case"m":output+=formatNumber("m",date.getMonth()+1,2);break;case"M":output+=formatName("M",date.getMonth(),monthNamesShort,monthNames);break;case"y":output+=(lookAhead("y")?date.getFullYear():(date.getYear()%100<10?"0":"")+date.getYear()%100);break;case"@":output+=date.getTime();break;case"'":if(lookAhead("'")){output+="'"}else{literal=true}break;default:output+=format.charAt(iFormat)}}}}return output},_possibleChars:function(format){var chars="";var literal=false;for(var iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)=="'"&&!lookAhead("'")){literal=false}else{chars+=format.charAt(iFormat)}}else{switch(format.charAt(iFormat)){case"d":case"m":case"y":case"@":chars+="0123456789";break;case"D":case"M":return null;case"'":if(lookAhead("'")){chars+="'"}else{literal=true}break;default:chars+=format.charAt(iFormat)}}}return chars},_get:function(inst,name){return inst.settings[name]!==undefined?inst.settings[name]:this._defaults[name]},_setDateFromField:function(inst){var dateFormat=this._get(inst,"dateFormat");var dates=inst.input?inst.input.val():null;inst.endDay=inst.endMonth=inst.endYear=null;var date=defaultDate=this._getDefaultDate(inst);var settings=this._getFormatConfig(inst);try{date=this.parseDate(dateFormat,dates,settings)||defaultDate}catch(event){this.log(event);date=defaultDate}inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear();inst.currentDay=(dates?date.getDate():0);inst.currentMonth=(dates?date.getMonth():0);inst.currentYear=(dates?date.getFullYear():0);this._adjustInstDate(inst)},_getDefaultDate:function(inst){var date=this._determineDate(this._get(inst,"defaultDate"),new Date());var minDate=this._getMinMaxDate(inst,"min",true);var maxDate=this._getMinMaxDate(inst,"max");date=(minDate&&date<minDate?minDate:date);date=(maxDate&&date>maxDate?maxDate:date);return date},_determineDate:function(date,defaultDate){var offsetNumeric=function(offset){var date=new Date();date.setDate(date.getDate()+offset);return date};var offsetString=function(offset,getDaysInMonth){var date=new Date();var year=date.getFullYear();var month=date.getMonth();var day=date.getDate();var pattern=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g;var matches=pattern.exec(offset);while(matches){switch(matches[2]||"d"){case"d":case"D":day+=parseInt(matches[1],10);break;case"w":case"W":day+=parseInt(matches[1],10)*7;break;case"m":case"M":month+=parseInt(matches[1],10);day=Math.min(day,getDaysInMonth(year,month));break;case"y":case"Y":year+=parseInt(matches[1],10);day=Math.min(day,getDaysInMonth(year,month));break}matches=pattern.exec(offset)}return new Date(year,month,day)};date=(date==null?defaultDate:(typeof date=="string"?offsetString(date,this._getDaysInMonth):(typeof date=="number"?(isNaN(date)?defaultDate:offsetNumeric(date)):date)));date=(date&&date.toString()=="Invalid Date"?defaultDate:date);if(date){date.setHours(0);date.setMinutes(0);date.setSeconds(0);date.setMilliseconds(0)}return this._daylightSavingAdjust(date)},_daylightSavingAdjust:function(date){if(!date){return null}date.setHours(date.getHours()>12?date.getHours()+2:0);return date},_setDate:function(inst,date,endDate){var clear=!(date);var origMonth=inst.selectedMonth;var origYear=inst.selectedYear;date=this._determineDate(date,new Date());inst.selectedDay=inst.currentDay=date.getDate();inst.drawMonth=inst.selectedMonth=inst.currentMonth=date.getMonth();inst.drawYear=inst.selectedYear=inst.currentYear=date.getFullYear();if(origMonth!=inst.selectedMonth||origYear!=inst.selectedYear){this._notifyChange(inst)}this._adjustInstDate(inst);if(inst.input){inst.input.val(clear?"":this._formatDate(inst))}},_getDate:function(inst){var startDate=(!inst.currentYear||(inst.input&&inst.input.val()=="")?null:this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));return startDate},_generateHTML:function(inst){var today=new Date();today=this._daylightSavingAdjust(new Date(today.getFullYear(),today.getMonth(),today.getDate()));var isRTL=this._get(inst,"isRTL");var showButtonPanel=this._get(inst,"showButtonPanel");var hideIfNoPrevNext=this._get(inst,"hideIfNoPrevNext");var navigationAsDateFormat=this._get(inst,"navigationAsDateFormat");var numMonths=this._getNumberOfMonths(inst);var showCurrentAtPos=this._get(inst,"showCurrentAtPos");var stepMonths=this._get(inst,"stepMonths");var stepBigMonths=this._get(inst,"stepBigMonths");var isMultiMonth=(numMonths[0]!=1||numMonths[1]!=1);var currentDate=this._daylightSavingAdjust((!inst.currentDay?new Date(9999,9,9):new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));var minDate=this._getMinMaxDate(inst,"min",true);var maxDate=this._getMinMaxDate(inst,"max");var drawMonth=inst.drawMonth-showCurrentAtPos;var drawYear=inst.drawYear;if(drawMonth<0){drawMonth+=12;drawYear--}if(maxDate){var maxDraw=this._daylightSavingAdjust(new Date(maxDate.getFullYear(),maxDate.getMonth()-numMonths[1]+1,maxDate.getDate()));maxDraw=(minDate&&maxDraw<minDate?minDate:maxDraw);while(this._daylightSavingAdjust(new Date(drawYear,drawMonth,1))>maxDraw){drawMonth--;if(drawMonth<0){drawMonth=11;drawYear--}}}inst.drawMonth=drawMonth;inst.drawYear=drawYear;var prevText=this._get(inst,"prevText");prevText=(!navigationAsDateFormat?prevText:this.formatDate(prevText,this._daylightSavingAdjust(new Date(drawYear,drawMonth-stepMonths,1)),this._getFormatConfig(inst)));var prev=(this._canAdjustMonth(inst,-1,drawYear,drawMonth)?'<a class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery.datepicker._adjustDate(\'#'+inst.id+"', -"+stepMonths+", 'M');\" title=\""+prevText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"e":"w")+'">'+prevText+"</span></a>":(hideIfNoPrevNext?"":'<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+prevText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"e":"w")+'">'+prevText+"</span></a>"));var nextText=this._get(inst,"nextText");nextText=(!navigationAsDateFormat?nextText:this.formatDate(nextText,this._daylightSavingAdjust(new Date(drawYear,drawMonth+stepMonths,1)),this._getFormatConfig(inst)));var next=(this._canAdjustMonth(inst,+1,drawYear,drawMonth)?'<a class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery.datepicker._adjustDate(\'#'+inst.id+"', +"+stepMonths+", 'M');\" title=\""+nextText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"w":"e")+'">'+nextText+"</span></a>":(hideIfNoPrevNext?"":'<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+nextText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"w":"e")+'">'+nextText+"</span></a>"));var currentText=this._get(inst,"currentText");var gotoDate=(this._get(inst,"gotoCurrent")&&inst.currentDay?currentDate:today);currentText=(!navigationAsDateFormat?currentText:this.formatDate(currentText,gotoDate,this._getFormatConfig(inst)));var controls=(!inst.inline?'<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="DP_jQuery.datepicker._hideDatepicker();">'+this._get(inst,"closeText")+"</button>":"");var buttonPanel=(showButtonPanel)?'<div class="ui-datepicker-buttonpane ui-widget-content">'+(isRTL?controls:"")+(this._isInRange(inst,gotoDate)?'<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_jQuery.datepicker._gotoToday(\'#'+inst.id+"');\">"+currentText+"</button>":"")+(isRTL?"":controls)+"</div>":"";var firstDay=parseInt(this._get(inst,"firstDay"),10);firstDay=(isNaN(firstDay)?0:firstDay);var dayNames=this._get(inst,"dayNames");var dayNamesShort=this._get(inst,"dayNamesShort");var dayNamesMin=this._get(inst,"dayNamesMin");var monthNames=this._get(inst,"monthNames");var monthNamesShort=this._get(inst,"monthNamesShort");var beforeShowDay=this._get(inst,"beforeShowDay");var showOtherMonths=this._get(inst,"showOtherMonths");var calculateWeek=this._get(inst,"calculateWeek")||this.iso8601Week;var endDate=inst.endDay?this._daylightSavingAdjust(new Date(inst.endYear,inst.endMonth,inst.endDay)):currentDate;var defaultDate=this._getDefaultDate(inst);var html="";for(var row=0;row<numMonths[0];row++){var group="";for(var col=0;col<numMonths[1];col++){var selectedDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,inst.selectedDay));var cornerClass=" ui-corner-all";var calender="";if(isMultiMonth){calender+='<div class="ui-datepicker-group ui-datepicker-group-';switch(col){case 0:calender+="first";cornerClass=" ui-corner-"+(isRTL?"right":"left");break;case numMonths[1]-1:calender+="last";cornerClass=" ui-corner-"+(isRTL?"left":"right");break;default:calender+="middle";cornerClass="";break}calender+='">'}calender+='<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix'+cornerClass+'">'+(/all|left/.test(cornerClass)&&row==0?(isRTL?next:prev):"")+(/all|right/.test(cornerClass)&&row==0?(isRTL?prev:next):"")+this._generateMonthYearHeader(inst,drawMonth,drawYear,minDate,maxDate,selectedDate,row>0||col>0,monthNames,monthNamesShort)+'</div><table class="ui-datepicker-calendar"><thead><tr>';var thead="";for(var dow=0;dow<7;dow++){var day=(dow+firstDay)%7;thead+="<th"+((dow+firstDay+6)%7>=5?' class="ui-datepicker-week-end"':"")+'><span title="'+dayNames[day]+'">'+dayNamesMin[day]+"</span></th>"}calender+=thead+"</tr></thead><tbody>";var daysInMonth=this._getDaysInMonth(drawYear,drawMonth);if(drawYear==inst.selectedYear&&drawMonth==inst.selectedMonth){inst.selectedDay=Math.min(inst.selectedDay,daysInMonth)}var leadDays=(this._getFirstDayOfMonth(drawYear,drawMonth)-firstDay+7)%7;var numRows=(isMultiMonth?6:Math.ceil((leadDays+daysInMonth)/7));var printDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,1-leadDays));for(var dRow=0;dRow<numRows;dRow++){calender+="<tr>";var tbody="";for(var dow=0;dow<7;dow++){var daySettings=(beforeShowDay?beforeShowDay.apply((inst.input?inst.input[0]:null),[printDate]):[true,""]);var otherMonth=(printDate.getMonth()!=drawMonth);var unselectable=otherMonth||!daySettings[0]||(minDate&&printDate<minDate)||(maxDate&&printDate>maxDate);tbody+='<td class="'+((dow+firstDay+6)%7>=5?" ui-datepicker-week-end":"")+(otherMonth?" ui-datepicker-other-month":"")+((printDate.getTime()==selectedDate.getTime()&&drawMonth==inst.selectedMonth&&inst._keyEvent)||(defaultDate.getTime()==printDate.getTime()&&defaultDate.getTime()==selectedDate.getTime())?" "+this._dayOverClass:"")+(unselectable?" "+this._unselectableClass+" ui-state-disabled":"")+(otherMonth&&!showOtherMonths?"":" "+daySettings[1]+(printDate.getTime()>=currentDate.getTime()&&printDate.getTime()<=endDate.getTime()?" "+this._currentClass:"")+(printDate.getTime()==today.getTime()?" ui-datepicker-today":""))+'"'+((!otherMonth||showOtherMonths)&&daySettings[2]?' title="'+daySettings[2]+'"':"")+(unselectable?"":" onclick=\"DP_jQuery.datepicker._selectDay('#"+inst.id+"',"+drawMonth+","+drawYear+', this);return false;"')+">"+(otherMonth?(showOtherMonths?printDate.getDate():"&#xa0;"):(unselectable?'<span class="ui-state-default">'+printDate.getDate()+"</span>":'<a class="ui-state-default'+(printDate.getTime()==today.getTime()?" ui-state-highlight":"")+(printDate.getTime()>=currentDate.getTime()&&printDate.getTime()<=endDate.getTime()?" ui-state-active":"")+'" href="#">'+printDate.getDate()+"</a>"))+"</td>";printDate.setDate(printDate.getDate()+1);printDate=this._daylightSavingAdjust(printDate)}calender+=tbody+"</tr>"}drawMonth++;if(drawMonth>11){drawMonth=0;drawYear++}calender+="</tbody></table>"+(isMultiMonth?"</div>"+((numMonths[0]>0&&col==numMonths[1]-1)?'<div class="ui-datepicker-row-break"></div>':""):"");group+=calender}html+=group}html+=buttonPanel+($.browser.msie&&parseInt($.browser.version,10)<7&&!inst.inline?'<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>':"");inst._keyEvent=false;return html},_generateMonthYearHeader:function(inst,drawMonth,drawYear,minDate,maxDate,selectedDate,secondary,monthNames,monthNamesShort){minDate=(inst.rangeStart&&minDate&&selectedDate<minDate?selectedDate:minDate);var changeMonth=this._get(inst,"changeMonth");var changeYear=this._get(inst,"changeYear");var showMonthAfterYear=this._get(inst,"showMonthAfterYear");var html='<div class="ui-datepicker-title">';var monthHtml="";if(secondary||!changeMonth){monthHtml+='<span class="ui-datepicker-month">'+monthNames[drawMonth]+"</span> "}else{var inMinYear=(minDate&&minDate.getFullYear()==drawYear);var inMaxYear=(maxDate&&maxDate.getFullYear()==drawYear);monthHtml+='<select class="ui-datepicker-month" onchange="DP_jQuery.datepicker._selectMonthYear(\'#'+inst.id+"', this, 'M');\" onclick=\"DP_jQuery.datepicker._clickMonthYear('#"+inst.id+"');\">";for(var month=0;month<12;month++){if((!inMinYear||month>=minDate.getMonth())&&(!inMaxYear||month<=maxDate.getMonth())){monthHtml+='<option value="'+month+'"'+(month==drawMonth?' selected="selected"':"")+">"+monthNamesShort[month]+"</option>"}}monthHtml+="</select>"}if(!showMonthAfterYear){html+=monthHtml+((secondary||changeMonth||changeYear)&&(!(changeMonth&&changeYear))?"&#xa0;":"")}if(secondary||!changeYear){html+='<span class="ui-datepicker-year">'+drawYear+"</span>"}else{var years=this._get(inst,"yearRange").split(":");var year=0;var endYear=0;if(years.length!=2){year=drawYear-10;endYear=drawYear+10}else{if(years[0].charAt(0)=="+"||years[0].charAt(0)=="-"){year=drawYear+parseInt(years[0],10);endYear=drawYear+parseInt(years[1],10)}else{year=parseInt(years[0],10);endYear=parseInt(years[1],10)}}year=(minDate?Math.max(year,minDate.getFullYear()):year);endYear=(maxDate?Math.min(endYear,maxDate.getFullYear()):endYear);html+='<select class="ui-datepicker-year" onchange="DP_jQuery.datepicker._selectMonthYear(\'#'+inst.id+"', this, 'Y');\" onclick=\"DP_jQuery.datepicker._clickMonthYear('#"+inst.id+"');\">";for(;year<=endYear;year++){html+='<option value="'+year+'"'+(year==drawYear?' selected="selected"':"")+">"+year+"</option>"}html+="</select>"}if(showMonthAfterYear){html+=(secondary||changeMonth||changeYear?"&#xa0;":"")+monthHtml}html+="</div>";return html},_adjustInstDate:function(inst,offset,period){var year=inst.drawYear+(period=="Y"?offset:0);var month=inst.drawMonth+(period=="M"?offset:0);var day=Math.min(inst.selectedDay,this._getDaysInMonth(year,month))+(period=="D"?offset:0);var date=this._daylightSavingAdjust(new Date(year,month,day));var minDate=this._getMinMaxDate(inst,"min",true);var maxDate=this._getMinMaxDate(inst,"max");date=(minDate&&date<minDate?minDate:date);date=(maxDate&&date>maxDate?maxDate:date);inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear();if(period=="M"||period=="Y"){this._notifyChange(inst)}},_notifyChange:function(inst){var onChange=this._get(inst,"onChangeMonthYear");if(onChange){onChange.apply((inst.input?inst.input[0]:null),[inst.selectedYear,inst.selectedMonth+1,inst])}},_getNumberOfMonths:function(inst){var numMonths=this._get(inst,"numberOfMonths");return(numMonths==null?[1,1]:(typeof numMonths=="number"?[1,numMonths]:numMonths))},_getMinMaxDate:function(inst,minMax,checkRange){var date=this._determineDate(this._get(inst,minMax+"Date"),null);return(!checkRange||!inst.rangeStart?date:(!date||inst.rangeStart>date?inst.rangeStart:date))},_getDaysInMonth:function(year,month){return 32-new Date(year,month,32).getDate()},_getFirstDayOfMonth:function(year,month){return new Date(year,month,1).getDay()},_canAdjustMonth:function(inst,offset,curYear,curMonth){var numMonths=this._getNumberOfMonths(inst);var date=this._daylightSavingAdjust(new Date(curYear,curMonth+(offset<0?offset:numMonths[1]),1));if(offset<0){date.setDate(this._getDaysInMonth(date.getFullYear(),date.getMonth()))}return this._isInRange(inst,date)},_isInRange:function(inst,date){var newMinDate=(!inst.rangeStart?null:this._daylightSavingAdjust(new Date(inst.selectedYear,inst.selectedMonth,inst.selectedDay)));newMinDate=(newMinDate&&inst.rangeStart<newMinDate?inst.rangeStart:newMinDate);var minDate=newMinDate||this._getMinMaxDate(inst,"min");var maxDate=this._getMinMaxDate(inst,"max");return((!minDate||date>=minDate)&&(!maxDate||date<=maxDate))},_getFormatConfig:function(inst){var shortYearCutoff=this._get(inst,"shortYearCutoff");shortYearCutoff=(typeof shortYearCutoff!="string"?shortYearCutoff:new Date().getFullYear()%100+parseInt(shortYearCutoff,10));return{shortYearCutoff:shortYearCutoff,dayNamesShort:this._get(inst,"dayNamesShort"),dayNames:this._get(inst,"dayNames"),monthNamesShort:this._get(inst,"monthNamesShort"),monthNames:this._get(inst,"monthNames")}},_formatDate:function(inst,day,month,year){if(!day){inst.currentDay=inst.selectedDay;inst.currentMonth=inst.selectedMonth;inst.currentYear=inst.selectedYear}var date=(day?(typeof day=="object"?day:this._daylightSavingAdjust(new Date(year,month,day))):this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));return this.formatDate(this._get(inst,"dateFormat"),date,this._getFormatConfig(inst))}});function extendRemove(target,props){$.extend(target,props);for(var name in props){if(props[name]==null||props[name]==undefined){target[name]=props[name]}}return target}function isArray(a){return(a&&(($.browser.safari&&typeof a=="object"&&a.length)||(a.constructor&&a.constructor.toString().match(/\Array\(\)/))))}$.fn.datepicker=function(options){if(!$.datepicker.initialized){$(document).mousedown($.datepicker._checkExternalClick).find("body").append($.datepicker.dpDiv);$.datepicker.initialized=true}var otherArgs=Array.prototype.slice.call(arguments,1);if(typeof options=="string"&&(options=="isDisabled"||options=="getDate")){return $.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this[0]].concat(otherArgs))}if(options=="option"&&arguments.length==2&&typeof arguments[1]=="string"){return $.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this[0]].concat(otherArgs))}return this.each(function(){typeof options=="string"?$.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this].concat(otherArgs)):$.datepicker._attachDatepicker(this,options)})};$.datepicker=new Datepicker();$.datepicker.initialized=false;$.datepicker.uuid=new Date().getTime();$.datepicker.version="1.7.2";window.DP_jQuery=$})(jQuery);(function(a){a.widget("ui.tabs",{_init:function(){if(this.options.deselectable!==undefined){this.options.collapsible=this.options.deselectable}this._tabify(true)},_setData:function(b,c){if(b=="selected"){if(this.options.collapsible&&c==this.options.selected){return}this.select(c)}else{this.options[b]=c;if(b=="deselectable"){this.options.collapsible=c}this._tabify()}},_tabId:function(b){return b.title&&b.title.replace(/\s/g,"_").replace(/[^A-Za-z0-9\-_:\.]/g,"")||this.options.idPrefix+a.data(b)},_sanitizeSelector:function(b){return b.replace(/:/g,"\\:")},_cookie:function(){var b=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+a.data(this.list[0]));return a.cookie.apply(null,[b].concat(a.makeArray(arguments)))},_ui:function(c,b){return{tab:c,panel:b,index:this.anchors.index(c)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var b=a(this);b.html(b.data("label.tabs")).removeData("label.tabs")})},_tabify:function(p){this.list=this.element.children("ul:first");this.lis=a("li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return a("a",this)[0]});this.panels=a([]);var q=this,d=this.options;var c=/^#.+/;this.anchors.each(function(u,o){var r=a(o).attr("href");var v=r.split("#")[0],w;if(v&&(v===location.toString().split("#")[0]||(w=a("base")[0])&&v===w.href)){r=o.hash;o.href=r}if(c.test(r)){q.panels=q.panels.add(q._sanitizeSelector(r))}else{if(r!="#"){a.data(o,"href.tabs",r);a.data(o,"load.tabs",r.replace(/#.*$/,""));var z=q._tabId(o);o.href="#"+z;var y=a("#"+z);if(!y.length){y=a(d.panelTemplate).attr("id",z).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(q.panels[u-1]||q.list);y.data("destroy.tabs",true)}q.panels=q.panels.add(y)}else{d.disabled.push(u)}}});if(p){this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all");this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.lis.addClass("ui-state-default ui-corner-top");this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom");if(d.selected===undefined){if(location.hash){this.anchors.each(function(r,o){if(o.hash==location.hash){d.selected=r;return false}})}if(typeof d.selected!="number"&&d.cookie){d.selected=parseInt(q._cookie(),10)}if(typeof d.selected!="number"&&this.lis.filter(".ui-tabs-selected").length){d.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}d.selected=d.selected||0}else{if(d.selected===null){d.selected=-1}}d.selected=((d.selected>=0&&this.anchors[d.selected])||d.selected<0)?d.selected:0;d.disabled=a.unique(d.disabled.concat(a.map(this.lis.filter(".ui-state-disabled"),function(r,o){return q.lis.index(r)}))).sort();if(a.inArray(d.selected,d.disabled)!=-1){d.disabled.splice(a.inArray(d.selected,d.disabled),1)}this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active");if(d.selected>=0&&this.anchors.length){this.panels.eq(d.selected).removeClass("ui-tabs-hide");this.lis.eq(d.selected).addClass("ui-tabs-selected ui-state-active");q.element.queue("tabs",function(){q._trigger("show",null,q._ui(q.anchors[d.selected],q.panels[d.selected]))});this.load(d.selected)}a(window).bind("unload",function(){q.lis.add(q.anchors).unbind(".tabs");q.lis=q.anchors=q.panels=null})}else{d.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}this.element[d.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");if(d.cookie){this._cookie(d.selected,d.cookie)}for(var g=0,n;(n=this.lis[g]);g++){a(n)[a.inArray(g,d.disabled)!=-1&&!a(n).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled")}if(d.cache===false){this.anchors.removeData("cache.tabs")}this.lis.add(this.anchors).unbind(".tabs");if(d.event!="mouseover"){var f=function(r,o){if(o.is(":not(.ui-state-disabled)")){o.addClass("ui-state-"+r)}};var j=function(r,o){o.removeClass("ui-state-"+r)};this.lis.bind("mouseover.tabs",function(){f("hover",a(this))});this.lis.bind("mouseout.tabs",function(){j("hover",a(this))});this.anchors.bind("focus.tabs",function(){f("focus",a(this).closest("li"))});this.anchors.bind("blur.tabs",function(){j("focus",a(this).closest("li"))})}var b,h;if(d.fx){if(a.isArray(d.fx)){b=d.fx[0];h=d.fx[1]}else{b=h=d.fx}}function e(o,r){o.css({display:""});if(a.browser.msie&&r.opacity){o[0].style.removeAttribute("filter")}}var l=h?function(o,r){a(o).closest("li").removeClass("ui-state-default").addClass("ui-tabs-selected ui-state-active");r.hide().removeClass("ui-tabs-hide").animate(h,h.duration||"normal",function(){e(r,h);q._trigger("show",null,q._ui(o,r[0]))})}:function(o,r){a(o).closest("li").removeClass("ui-state-default").addClass("ui-tabs-selected ui-state-active");r.removeClass("ui-tabs-hide");q._trigger("show",null,q._ui(o,r[0]))};var m=b?function(r,o){o.animate(b,b.duration||"normal",function(){q.lis.removeClass("ui-tabs-selected ui-state-active").addClass("ui-state-default");o.addClass("ui-tabs-hide");e(o,b);q.element.dequeue("tabs")})}:function(r,o,u){q.lis.removeClass("ui-tabs-selected ui-state-active").addClass("ui-state-default");o.addClass("ui-tabs-hide");q.element.dequeue("tabs")};this.anchors.bind(d.event+".tabs",function(){var r=this,v=a(this).closest("li"),o=q.panels.filter(":not(.ui-tabs-hide)"),u=a(q._sanitizeSelector(this.hash));if((v.hasClass("ui-tabs-selected")&&!d.collapsible)||v.hasClass("ui-state-disabled")||v.hasClass("ui-state-processing")||q._trigger("select",null,q._ui(this,u[0]))===false){this.blur();return false}d.selected=q.anchors.index(this);q.abort();if(d.collapsible){if(v.hasClass("ui-tabs-selected")){d.selected=-1;if(d.cookie){q._cookie(d.selected,d.cookie)}q.element.queue("tabs",function(){m(r,o)}).dequeue("tabs");this.blur();return false}else{if(!o.length){if(d.cookie){q._cookie(d.selected,d.cookie)}q.element.queue("tabs",function(){l(r,u)});q.load(q.anchors.index(this));this.blur();return false}}}if(d.cookie){q._cookie(d.selected,d.cookie)}if(u.length){if(o.length){q.element.queue("tabs",function(){m(r,o)})}q.element.queue("tabs",function(){l(r,u)});q.load(q.anchors.index(this))}else{throw"jQuery UI Tabs: Mismatching fragment identifier."}if(a.browser.msie){this.blur()}});this.anchors.bind("click.tabs",function(){return false})},destroy:function(){var b=this.options;this.abort();this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs");this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.anchors.each(function(){var c=a.data(this,"href.tabs");if(c){this.href=c}var d=a(this).unbind(".tabs");a.each(["href","load","cache"],function(e,f){d.removeData(f+".tabs")})});this.lis.unbind(".tabs").add(this.panels).each(function(){if(a.data(this,"destroy.tabs")){a(this).remove()}else{a(this).removeClass(["ui-state-default","ui-corner-top","ui-tabs-selected","ui-state-active","ui-state-hover","ui-state-focus","ui-state-disabled","ui-tabs-panel","ui-widget-content","ui-corner-bottom","ui-tabs-hide"].join(" "))}});if(b.cookie){this._cookie(null,b.cookie)}},add:function(e,d,c){if(c===undefined){c=this.anchors.length}var b=this,g=this.options,j=a(g.tabTemplate.replace(/#\{href\}/g,e).replace(/#\{label\}/g,d)),h=!e.indexOf("#")?e.replace("#",""):this._tabId(a("a",j)[0]);j.addClass("ui-state-default ui-corner-top").data("destroy.tabs",true);var f=a("#"+h);if(!f.length){f=a(g.panelTemplate).attr("id",h).data("destroy.tabs",true)}f.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");if(c>=this.lis.length){j.appendTo(this.list);f.appendTo(this.list[0].parentNode)}else{j.insertBefore(this.lis[c]);f.insertBefore(this.panels[c])}g.disabled=a.map(g.disabled,function(m,l){return m>=c?++m:m});this._tabify();if(this.anchors.length==1){j.addClass("ui-tabs-selected ui-state-active");f.removeClass("ui-tabs-hide");this.element.queue("tabs",function(){b._trigger("show",null,b._ui(b.anchors[0],b.panels[0]))});this.load(0)}this._trigger("add",null,this._ui(this.anchors[c],this.panels[c]))},remove:function(b){var d=this.options,e=this.lis.eq(b).remove(),c=this.panels.eq(b).remove();if(e.hasClass("ui-tabs-selected")&&this.anchors.length>1){this.select(b+(b+1<this.anchors.length?1:-1))}d.disabled=a.map(a.grep(d.disabled,function(g,f){return g!=b}),function(g,f){return g>=b?--g:g});this._tabify();this._trigger("remove",null,this._ui(e.find("a")[0],c[0]))},enable:function(b){var c=this.options;if(a.inArray(b,c.disabled)==-1){return}this.lis.eq(b).removeClass("ui-state-disabled");c.disabled=a.grep(c.disabled,function(e,d){return e!=b});this._trigger("enable",null,this._ui(this.anchors[b],this.panels[b]))},disable:function(c){var b=this,d=this.options;if(c!=d.selected){this.lis.eq(c).addClass("ui-state-disabled");d.disabled.push(c);d.disabled.sort();this._trigger("disable",null,this._ui(this.anchors[c],this.panels[c]))}},select:function(b){if(typeof b=="string"){b=this.anchors.index(this.anchors.filter("[href$="+b+"]"))}else{if(b===null){b=-1}}if(b==-1&&this.options.collapsible){b=this.options.selected}this.anchors.eq(b).trigger(this.options.event+".tabs")},load:function(e){var c=this,g=this.options,b=this.anchors.eq(e)[0],d=a.data(b,"load.tabs");this.abort();if(!d||this.element.queue("tabs").length!==0&&a.data(b,"cache.tabs")){this.element.dequeue("tabs");return}this.lis.eq(e).addClass("ui-state-processing");if(g.spinner){var f=a("span",b);f.data("label.tabs",f.html()).html(g.spinner)}this.xhr=a.ajax(a.extend({},g.ajaxOptions,{url:d,success:function(j,h){a(c._sanitizeSelector(b.hash)).html(j);c._cleanup();if(g.cache){a.data(b,"cache.tabs",true)}c._trigger("load",null,c._ui(c.anchors[e],c.panels[e]));try{g.ajaxOptions.success(j,h)}catch(l){}c.element.dequeue("tabs")}}))},abort:function(){this.element.queue([]);this.panels.stop(false,true);if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup()},url:function(c,b){this.anchors.eq(c).removeData("cache.tabs").data("load.tabs",b)},length:function(){return this.anchors.length}});a.extend(a.ui.tabs,{version:"1.7.2",getter:"length",defaults:{ajaxOptions:null,cache:false,cookie:null,collapsible:false,disabled:[],event:"click",fx:null,idPrefix:"ui-tabs-",panelTemplate:"<div></div>",spinner:"<em>Loading&#8230;</em>",tabTemplate:'<li><a href="#{href}"><span>#{label}</span></a></li>'}});a.extend(a.ui.tabs.prototype,{rotation:null,rotate:function(d,f){var b=this,g=this.options;var c=b._rotate||(b._rotate=function(h){clearTimeout(b.rotation);b.rotation=setTimeout(function(){var j=g.selected;b.select(++j<b.anchors.length?j:0)},d);if(h){h.stopPropagation()}});var e=b._unrotate||(b._unrotate=!f?function(h){if(h.clientX){b.rotate(null)}}:function(h){t=g.selected;c()});if(d){this.element.bind("tabsshow",c);this.anchors.bind(g.event+".tabs",e);c()}else{clearTimeout(b.rotation);this.element.unbind("tabsshow",c);this.anchors.unbind(g.event+".tabs",e);delete this._rotate;delete this._unrotate}}})})(jQuery);
/*
 * jquery.qtip. The jQuery tooltip plugin
 *
 * Copyright (c) 2009 Craig Thompson
 * http://craigsworks.com
 *
 * Licensed under MIT
 * http://www.opensource.org/licenses/mit-license.php
 *
 * Launch  : February 2009
 * Version : 1.0.0-rc3
 * Released: Tuesday 12th May, 2009 - 00:00
 * Debug: jquery.qtip.debug.js
 */
(function(f){f.fn.qtip=function(F,y){var C,w,E,v,B,A,z,D;if(typeof F=="string"){if(typeof f(this).data("qtip")!=="object"){f.fn.qtip.log.error.call(self,1,f.fn.qtip.constants.NO_TOOLTIP_PRESENT,false)}if(F=="api"){return f(this).data("qtip").interfaces[f(this).data("qtip").current]}else{if(F=="interfaces"){return f(this).data("qtip").interfaces}}}else{if(!F){F={}}if(typeof F.content!=="object"||(F.content.jquery&&F.content.length>0)){F.content={text:F.content}}if(typeof F.content.title!=="object"){F.content.title={text:F.content.title}}if(typeof F.position!=="object"){F.position={corner:F.position}}if(typeof F.position.corner!=="object"){F.position.corner={target:F.position.corner,tooltip:F.position.corner}}if(typeof F.show!=="object"){F.show={when:F.show}}if(typeof F.show.when!=="object"){F.show.when={event:F.show.when}}if(typeof F.show.effect!=="object"){F.show.effect={type:F.show.effect}}if(typeof F.hide!=="object"){F.hide={when:F.hide}}if(typeof F.hide.when!=="object"){F.hide.when={event:F.hide.when}}if(typeof F.hide.effect!=="object"){F.hide.effect={type:F.hide.effect}}if(typeof F.style!=="object"){F.style={name:F.style}}F.style=c(F.style);v=f.extend(true,{},f.fn.qtip.defaults,F);v.style=a.call({options:v},v.style);v.user=f.extend(true,{},F)}return f(this).each(function(){if(typeof F=="string"){A=F.toLowerCase();E=f(this).qtip("interfaces");if(typeof E=="object"){if(y===true&&A=="destroy"){while(E.length>0){E[E.length-1].destroy()}}else{if(y!==true){E=[f(this).qtip("api")]}for(C=0;C<E.length;C++){if(A=="destroy"){E[C].destroy()}else{if(E[C].status.rendered===true){if(A=="show"){E[C].show()}else{if(A=="hide"){E[C].hide()}else{if(A=="focus"){E[C].focus()}else{if(A=="disable"){E[C].disable(true)}else{if(A=="enable"){E[C].disable(false)}}}}}}}}}}}else{z=f.extend(true,{},v);z.hide.effect.length=v.hide.effect.length;z.show.effect.length=v.show.effect.length;if(z.position.container===false){z.position.container=f(document.body)}if(z.position.target===false){z.position.target=f(this)}if(z.show.when.target===false){z.show.when.target=f(this)}if(z.hide.when.target===false){z.hide.when.target=f(this)}w=f.fn.qtip.interfaces.length;for(C=0;C<w;C++){if(typeof f.fn.qtip.interfaces[C]=="undefined"){w=C;break}}B=new d(f(this),z,w);f.fn.qtip.interfaces[w]=B;if(typeof f(this).data("qtip")=="object"){if(typeof f(this).attr("qtip")==="undefined"){f(this).data("qtip").current=f(this).data("qtip").interfaces.length}f(this).data("qtip").interfaces.push(B)}else{f(this).data("qtip",{current:0,interfaces:[B]})}if(z.content.prerender===false&&z.show.when.event!==false&&z.show.ready!==true){z.show.when.target.bind(z.show.when.event+".qtip-"+w+"-create",{qtip:w},function(G){D=f.fn.qtip.interfaces[G.data.qtip];D.options.show.when.target.unbind(D.options.show.when.event+".qtip-"+G.data.qtip+"-create");D.cache.mouse={x:G.pageX,y:G.pageY};q.call(D);D.options.show.when.target.trigger(D.options.show.when.event)})}else{B.cache.mouse={x:z.show.when.target.offset().left,y:z.show.when.target.offset().top};q.call(B)}}})};function d(y,w,z){var v=this;v.id=z;v.options=w;v.status={animated:false,rendered:false,disabled:false,focused:false};v.elements={target:y.addClass(v.options.style.classes.target),tooltip:null,wrapper:null,content:null,contentWrapper:null,title:null,button:null,tip:null,bgiframe:null};v.cache={mouse:{},position:{},toggle:0};v.timers={};f.extend(v,v.options.api,{show:function(C){var B,D;if(!v.status.rendered){return f.fn.qtip.log.error.call(v,2,f.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"show")}if(v.elements.tooltip.css("display")!=="none"){return v}v.elements.tooltip.stop(true,false);B=v.beforeShow.call(v,C);if(B===false){return v}function A(){if(v.options.position.type!=="static"){v.focus()}v.onShow.call(v,C);if(f.browser.msie){v.elements.tooltip.get(0).style.removeAttribute("filter")}}v.cache.toggle=1;if(v.options.position.type!=="static"){v.updatePosition(C,(v.options.show.effect.length>0))}if(typeof v.options.show.solo=="object"){D=f(v.options.show.solo)}else{if(v.options.show.solo===true){D=f("div.qtip").not(v.elements.tooltip)}}if(D){D.each(function(){if(f(this).qtip("api").status.rendered===true){f(this).qtip("api").hide()}})}if(typeof v.options.show.effect.type=="function"){v.options.show.effect.type.call(v.elements.tooltip,v.options.show.effect.length);v.elements.tooltip.queue(function(){A();f(this).dequeue()})}else{switch(v.options.show.effect.type.toLowerCase()){case"fade":v.elements.tooltip.fadeIn(v.options.show.effect.length,A);break;case"slide":v.elements.tooltip.slideDown(v.options.show.effect.length,function(){A();if(v.options.position.type!=="static"){v.updatePosition(C,true)}});break;case"grow":v.elements.tooltip.show(v.options.show.effect.length,A);break;default:v.elements.tooltip.show(null,A);break}v.elements.tooltip.addClass(v.options.style.classes.active)}return f.fn.qtip.log.error.call(v,1,f.fn.qtip.constants.EVENT_SHOWN,"show")},hide:function(C){var B;if(!v.status.rendered){return f.fn.qtip.log.error.call(v,2,f.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"hide")}else{if(v.elements.tooltip.css("display")==="none"){return v}}clearTimeout(v.timers.show);v.elements.tooltip.stop(true,false);B=v.beforeHide.call(v,C);if(B===false){return v}function A(){v.onHide.call(v,C)}v.cache.toggle=0;if(typeof v.options.hide.effect.type=="function"){v.options.hide.effect.type.call(v.elements.tooltip,v.options.hide.effect.length);v.elements.tooltip.queue(function(){A();f(this).dequeue()})}else{switch(v.options.hide.effect.type.toLowerCase()){case"fade":v.elements.tooltip.fadeOut(v.options.hide.effect.length,A);break;case"slide":v.elements.tooltip.slideUp(v.options.hide.effect.length,A);break;case"grow":v.elements.tooltip.hide(v.options.hide.effect.length,A);break;default:v.elements.tooltip.hide(null,A);break}v.elements.tooltip.removeClass(v.options.style.classes.active)}return f.fn.qtip.log.error.call(v,1,f.fn.qtip.constants.EVENT_HIDDEN,"hide")},updatePosition:function(A,B){var G,K,P,N,L,I,C,M,F,H,O,E,J,D;if(!v.status.rendered){return f.fn.qtip.log.error.call(v,2,f.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"updatePosition")}else{if(v.options.position.type=="static"){return f.fn.qtip.log.error.call(v,1,f.fn.qtip.constants.CANNOT_POSITION_STATIC,"updatePosition")}}K={position:{left:0,top:0},dimensions:{height:0,width:0},corner:v.options.position.corner.target};P={position:v.getPosition(),dimensions:v.getDimensions(),corner:v.options.position.corner.tooltip};if(v.options.position.target!=="mouse"){if(v.options.position.target.get(0).nodeName.toLowerCase()=="area"){N=v.options.position.target.attr("coords").split(",");for(G=0;G<N.length;G++){N[G]=parseInt(N[G])}L=v.options.position.target.parent("map").attr("name");I=f('img[usemap="#'+L+'"]:first').offset();K.position={left:Math.floor(I.left+N[0]),top:Math.floor(I.top+N[1])};switch(v.options.position.target.attr("shape").toLowerCase()){case"rect":K.dimensions={width:Math.ceil(Math.abs(N[2]-N[0])),height:Math.ceil(Math.abs(N[3]-N[1]))};break;case"circle":K.dimensions={width:N[2]+1,height:N[2]+1};break;case"poly":K.dimensions={width:N[0],height:N[1]};for(G=0;G<N.length;G++){if(G%2==0){if(N[G]>K.dimensions.width){K.dimensions.width=N[G]}if(N[G]<N[0]){K.position.left=Math.floor(I.left+N[G])}}else{if(N[G]>K.dimensions.height){K.dimensions.height=N[G]}if(N[G]<N[1]){K.position.top=Math.floor(I.top+N[G])}}}K.dimensions.width=K.dimensions.width-(K.position.left-I.left);K.dimensions.height=K.dimensions.height-(K.position.top-I.top);break;default:return f.fn.qtip.log.error.call(v,4,f.fn.qtip.constants.INVALID_AREA_SHAPE,"updatePosition");break}K.dimensions.width-=2;K.dimensions.height-=2}else{if(v.options.position.target.add(document.body).length===1){K.position={left:f(document).scrollLeft(),top:f(document).scrollTop()};K.dimensions={height:f(window).height(),width:f(window).width()}}else{if(typeof v.options.position.target.attr("qtip")!=="undefined"){K.position=v.options.position.target.qtip("api").cache.position}else{K.position=v.options.position.target.offset()}K.dimensions={height:v.options.position.target.outerHeight(),width:v.options.position.target.outerWidth()}}}C=f.extend({},K.position);if(K.corner.search(/right/i)!==-1){C.left+=K.dimensions.width}if(K.corner.search(/bottom/i)!==-1){C.top+=K.dimensions.height}if(K.corner.search(/((top|bottom)Middle)|center/)!==-1){C.left+=(K.dimensions.width/2)}if(K.corner.search(/((left|right)Middle)|center/)!==-1){C.top+=(K.dimensions.height/2)}}else{K.position=C={left:v.cache.mouse.x,top:v.cache.mouse.y};K.dimensions={height:1,width:1}}if(P.corner.search(/right/i)!==-1){C.left-=P.dimensions.width}if(P.corner.search(/bottom/i)!==-1){C.top-=P.dimensions.height}if(P.corner.search(/((top|bottom)Middle)|center/)!==-1){C.left-=(P.dimensions.width/2)}if(P.corner.search(/((left|right)Middle)|center/)!==-1){C.top-=(P.dimensions.height/2)}M=(f.browser.msie)?1:0;F=(f.browser.msie&&parseInt(f.browser.version.charAt(0))===6)?1:0;if(v.options.style.border.radius>0){if(P.corner.search(/Left/)!==-1){C.left-=v.options.style.border.radius}else{if(P.corner.search(/Right/)!==-1){C.left+=v.options.style.border.radius}}if(P.corner.search(/Top/)!==-1){C.top-=v.options.style.border.radius}else{if(P.corner.search(/Bottom/)!==-1){C.top+=v.options.style.border.radius}}}if(M){if(P.corner.search(/top/)!==-1){C.top-=M}else{if(P.corner.search(/bottom/)!==-1){C.top+=M}}if(P.corner.search(/left/)!==-1){C.left-=M}else{if(P.corner.search(/right/)!==-1){C.left+=M}}if(P.corner.search(/leftMiddle|rightMiddle/)!==-1){C.top-=1}}if(v.options.position.adjust.screen===true){C=p.call(v,C,K,P)}if(v.options.position.target==="mouse"&&v.options.position.adjust.mouse===true){if(v.options.position.adjust.screen===true&&v.elements.tip){O=v.elements.tip.attr("rel")}else{O=v.options.position.corner.tooltip}C.left+=(O.search(/right/i)!==-1)?-6:6;C.top+=(O.search(/bottom/i)!==-1)?-6:6}if(!v.elements.bgiframe&&f.browser.msie&&parseInt(f.browser.version.charAt(0))==6){f("select, object").each(function(){E=f(this).offset();E.bottom=E.top+f(this).height();E.right=E.left+f(this).width();if(C.top+P.dimensions.height>=E.top&&C.left+P.dimensions.width>=E.left){l.call(v)}})}C.left+=v.options.position.adjust.x;C.top+=v.options.position.adjust.y;J=v.getPosition();if(C.left!=J.left||C.top!=J.top){D=v.beforePositionUpdate.call(v,A);if(D===false){return v}v.cache.position=C;if(B===true){v.status.animated=true;v.elements.tooltip.animate(C,200,"swing",function(){v.status.animated=false})}else{v.elements.tooltip.css(C)}v.onPositionUpdate.call(v,A);if(typeof A!=="undefined"&&A.type&&A.type!=="mousemove"){f.fn.qtip.log.error.call(v,1,f.fn.qtip.constants.EVENT_POSITION_UPDATED,"updatePosition")}}return v},updateWidth:function(A){var B;if(!v.status.rendered){return f.fn.qtip.log.error.call(v,2,f.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"updateWidth")}else{if(A&&typeof A!=="number"){return f.fn.qtip.log.error.call(v,2,"newWidth must be of type number","updateWidth")}}B=v.elements.contentWrapper.siblings().add(v.elements.tip).add(v.elements.button);if(!A){if(typeof v.options.style.width.value=="number"){A=v.options.style.width.value}else{v.elements.tooltip.css({width:"auto"});B.hide();if(f.browser.msie){v.elements.wrapper.add(v.elements.contentWrapper.children()).css({zoom:"normal"})}A=v.getDimensions().width+1;if(!v.options.style.width.value){if(A>v.options.style.width.max){A=v.options.style.width.max}if(A<v.options.style.width.min){A=v.options.style.width.min}}}}if(A%2!==0){A-=1}v.elements.tooltip.width(A);B.show();if(v.options.style.border.radius){v.elements.tooltip.find(".qtip-betweenCorners").each(function(C){f(this).width(A-(v.options.style.border.radius*2))})}if(f.browser.msie){v.elements.wrapper.add(v.elements.contentWrapper.children()).css({zoom:"1"});v.elements.wrapper.width(A);if(v.elements.bgiframe){v.elements.bgiframe.width(A).height(v.getDimensions.height)}}return f.fn.qtip.log.error.call(v,1,f.fn.qtip.constants.EVENT_WIDTH_UPDATED,"updateWidth")},updateStyle:function(A){var D,E,B,C,F;if(!v.status.rendered){return f.fn.qtip.log.error.call(v,2,f.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"updateStyle")}else{if(typeof A!=="string"||!f.fn.qtip.styles[A]){return f.fn.qtip.log.error.call(v,2,f.fn.qtip.constants.STYLE_NOT_DEFINED,"updateStyle")}}v.options.style=a.call(v,f.fn.qtip.styles[A],v.options.user.style);v.elements.content.css(r(v.options.style));if(v.options.content.title.text!==false){v.elements.title.css(r(v.options.style.title,true))}v.elements.contentWrapper.css({borderColor:v.options.style.border.color});if(v.options.style.tip.corner!==false){if(f("<canvas>").get(0).getContext){D=v.elements.tooltip.find(".qtip-tip canvas:first");B=D.get(0).getContext("2d");B.clearRect(0,0,300,300);C=D.parent("div[rel]:first").attr("rel");F=b(C,v.options.style.tip.size.width,v.options.style.tip.size.height);h.call(v,D,F,v.options.style.tip.color||v.options.style.border.color)}else{if(f.browser.msie){D=v.elements.tooltip.find('.qtip-tip [nodeName="shape"]');D.attr("fillcolor",v.options.style.tip.color||v.options.style.border.color)}}}if(v.options.style.border.radius>0){v.elements.tooltip.find(".qtip-betweenCorners").css({backgroundColor:v.options.style.border.color});if(f("<canvas>").get(0).getContext){E=g(v.options.style.border.radius);v.elements.tooltip.find(".qtip-wrapper canvas").each(function(){B=f(this).get(0).getContext("2d");B.clearRect(0,0,300,300);C=f(this).parent("div[rel]:first").attr("rel");u.call(v,f(this),E[C],v.options.style.border.radius,v.options.style.border.color)})}else{if(f.browser.msie){v.elements.tooltip.find('.qtip-wrapper [nodeName="arc"]').each(function(){f(this).attr("fillcolor",v.options.style.border.color)})}}}return f.fn.qtip.log.error.call(v,1,f.fn.qtip.constants.EVENT_STYLE_UPDATED,"updateStyle")},updateContent:function(E,C){var D,B,A;if(!v.status.rendered){return f.fn.qtip.log.error.call(v,2,f.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"updateContent")}else{if(!E){return f.fn.qtip.log.error.call(v,2,f.fn.qtip.constants.NO_CONTENT_PROVIDED,"updateContent")}}D=v.beforeContentUpdate.call(v,E);if(typeof D=="string"){E=D}else{if(D===false){return}}if(f.browser.msie){v.elements.contentWrapper.children().css({zoom:"normal"})}if(E.jquery&&E.length>0){E.clone(true).appendTo(v.elements.content).show()}else{v.elements.content.html(E)}B=v.elements.content.find("img[complete=false]");if(B.length>0){A=0;B.each(function(G){f('<img src="'+f(this).attr("src")+'" />').load(function(){if(++A==B.length){F()}})})}else{F()}function F(){v.updateWidth();if(C!==false){if(v.options.position.type!=="static"){v.updatePosition(v.elements.tooltip.is(":visible"),true)}if(v.options.style.tip.corner!==false){o.call(v)}}}v.onContentUpdate.call(v);return f.fn.qtip.log.error.call(v,1,f.fn.qtip.constants.EVENT_CONTENT_UPDATED,"loadContent")},loadContent:function(A,D,E){var C;if(!v.status.rendered){return f.fn.qtip.log.error.call(v,2,f.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"loadContent")}C=v.beforeContentLoad.call(v);if(C===false){return v}if(E=="post"){f.post(A,D,B)}else{f.get(A,D,B)}function B(F){v.onContentLoad.call(v);f.fn.qtip.log.error.call(v,1,f.fn.qtip.constants.EVENT_CONTENT_LOADED,"loadContent");v.updateContent(F)}return v},updateTitle:function(A){if(!v.status.rendered){return f.fn.qtip.log.error.call(v,2,f.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"updateTitle")}else{if(!A){return f.fn.qtip.log.error.call(v,2,f.fn.qtip.constants.NO_CONTENT_PROVIDED,"updateTitle")}}returned=v.beforeTitleUpdate.call(v);if(returned===false){return v}if(v.elements.button){v.elements.button=v.elements.button.clone(true)}v.elements.title.html(A);if(v.elements.button){v.elements.title.prepend(v.elements.button)}v.onTitleUpdate.call(v);return f.fn.qtip.log.error.call(v,1,f.fn.qtip.constants.EVENT_TITLE_UPDATED,"updateTitle")},focus:function(E){var C,B,A,D;if(!v.status.rendered){return f.fn.qtip.log.error.call(v,2,f.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"focus")}else{if(v.options.position.type=="static"){return f.fn.qtip.log.error.call(v,1,f.fn.qtip.constants.CANNOT_FOCUS_STATIC,"focus")}}C=parseInt(v.elements.tooltip.css("z-index"));B=6000+f("div.qtip[qtip]").length-1;if(!v.status.focused&&C!==B){D=v.beforeFocus.call(v,E);if(D===false){return v}f("div.qtip[qtip]").not(v.elements.tooltip).each(function(){if(f(this).qtip("api").status.rendered===true){A=parseInt(f(this).css("z-index"));if(typeof A=="number"&&A>-1){f(this).css({zIndex:parseInt(f(this).css("z-index"))-1})}f(this).qtip("api").status.focused=false}});v.elements.tooltip.css({zIndex:B});v.status.focused=true;v.onFocus.call(v,E);f.fn.qtip.log.error.call(v,1,f.fn.qtip.constants.EVENT_FOCUSED,"focus")}return v},disable:function(A){if(!v.status.rendered){return f.fn.qtip.log.error.call(v,2,f.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"disable")}if(A){if(!v.status.disabled){v.status.disabled=true;f.fn.qtip.log.error.call(v,1,f.fn.qtip.constants.EVENT_DISABLED,"disable")}else{f.fn.qtip.log.error.call(v,1,f.fn.qtip.constants.TOOLTIP_ALREADY_DISABLED,"disable")}}else{if(v.status.disabled){v.status.disabled=false;f.fn.qtip.log.error.call(v,1,f.fn.qtip.constants.EVENT_ENABLED,"disable")}else{f.fn.qtip.log.error.call(v,1,f.fn.qtip.constants.TOOLTIP_ALREADY_ENABLED,"disable")}}return v},destroy:function(){var A,B,C;B=v.beforeDestroy.call(v);if(B===false){return v}if(v.status.rendered){v.options.show.when.target.unbind("mousemove.qtip",v.updatePosition);v.options.show.when.target.unbind("mouseout.qtip",v.hide);v.options.show.when.target.unbind(v.options.show.when.event+".qtip");v.options.hide.when.target.unbind(v.options.hide.when.event+".qtip");v.elements.tooltip.unbind(v.options.hide.when.event+".qtip");v.elements.tooltip.unbind("mouseover.qtip",v.focus);v.elements.tooltip.remove()}else{v.options.show.when.target.unbind(v.options.show.when.event+".qtip-create")}if(typeof v.elements.target.data("qtip")=="object"){C=v.elements.target.data("qtip").interfaces;if(typeof C=="object"&&C.length>0){for(A=0;A<C.length-1;A++){if(C[A].id==v.id){C.splice(A,1)}}}}delete f.fn.qtip.interfaces[v.id];if(typeof C=="object"&&C.length>0){v.elements.target.data("qtip").current=C.length-1}else{v.elements.target.removeData("qtip")}v.onDestroy.call(v);f.fn.qtip.log.error.call(v,1,f.fn.qtip.constants.EVENT_DESTROYED,"destroy");return v.elements.target},getPosition:function(){var A,B;if(!v.status.rendered){return f.fn.qtip.log.error.call(v,2,f.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"getPosition")}A=(v.elements.tooltip.css("display")!=="none")?false:true;if(A){v.elements.tooltip.css({visiblity:"hidden"}).show()}B=v.elements.tooltip.offset();if(A){v.elements.tooltip.css({visiblity:"visible"}).hide()}return B},getDimensions:function(){var A,B;if(!v.status.rendered){return f.fn.qtip.log.error.call(v,2,f.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"getDimensions")}A=(!v.elements.tooltip.is(":visible"))?true:false;if(A){v.elements.tooltip.css({visiblity:"hidden"}).show()}B={height:v.elements.tooltip.outerHeight(),width:v.elements.tooltip.outerWidth()};if(A){v.elements.tooltip.css({visiblity:"visible"}).hide()}return B}})}function q(){var v,A,y,w,z,C,B;v=this;v.beforeRender.call(v);v.status.rendered=true;v.elements.tooltip='<div qtip="'+v.id+'" class="qtip '+(v.options.style.classes.tooltip||v.options.style)+'"style="display:none; -moz-border-radius:0; -webkit-border-radius:0; border-radius:0;position:'+v.options.position.type+';">  <div class="qtip-wrapper" style="position:relative; overflow:hidden; text-align:left;">    <div class="qtip-contentWrapper" style="overflow:hidden;">       <div class="qtip-content '+v.options.style.classes.content+'"></div></div></div></div>';v.elements.tooltip=f(v.elements.tooltip);v.elements.tooltip.appendTo(v.options.position.container);v.elements.tooltip.data("qtip",{current:0,interfaces:[v]});v.elements.wrapper=v.elements.tooltip.children("div:first");v.elements.contentWrapper=v.elements.wrapper.children("div:first").css({background:v.options.style.background});v.elements.content=v.elements.contentWrapper.children("div:first").css(r(v.options.style));if(f.browser.msie){v.elements.wrapper.add(v.elements.content).css({zoom:1})}if(v.options.hide.when.event=="unfocus"){v.elements.tooltip.attr("unfocus",true)}if(typeof v.options.style.width.value=="number"){v.updateWidth()}if(f("<canvas>").get(0).getContext||f.browser.msie){if(v.options.style.border.radius>0){n.call(v)}else{v.elements.contentWrapper.css({border:v.options.style.border.width+"px solid "+v.options.style.border.color})}if(v.options.style.tip.corner!==false){e.call(v)}}else{v.elements.contentWrapper.css({border:v.options.style.border.width+"px solid "+v.options.style.border.color});v.options.style.border.radius=0;v.options.style.tip.corner=false;f.fn.qtip.log.error.call(v,2,f.fn.qtip.constants.CANVAS_VML_NOT_SUPPORTED,"render")}if((typeof v.options.content.text=="string"&&v.options.content.text.length>0)||(v.options.content.text.jquery&&v.options.content.text.length>0)){y=v.options.content.text}else{if(typeof v.elements.target.attr("title")=="string"&&v.elements.target.attr("title").length>0){y=v.elements.target.attr("title").replace("\\n","<br />");v.elements.target.attr("title","")}else{if(typeof v.elements.target.attr("alt")=="string"&&v.elements.target.attr("alt").length>0){y=v.elements.target.attr("alt").replace("\\n","<br />");v.elements.target.attr("alt","")}else{y=" ";f.fn.qtip.log.error.call(v,1,f.fn.qtip.constants.NO_VALID_CONTENT,"render")}}}if(v.options.content.title.text!==false){j.call(v)}v.updateContent(y);m.call(v);if(v.options.show.ready===true){v.show()}if(v.options.content.url!==false){w=v.options.content.url;z=v.options.content.data;C=v.options.content.method||"get";v.loadContent(w,z,C)}v.onRender.call(v);f.fn.qtip.log.error.call(v,1,f.fn.qtip.constants.EVENT_RENDERED,"render")}function n(){var J,D,w,F,B,I,y,K,H,C,A,G,E,v,z;J=this;J.elements.wrapper.find(".qtip-borderBottom, .qtip-borderTop").remove();w=J.options.style.border.width;F=J.options.style.border.radius;B=J.options.style.border.color||J.options.style.tip.color;I=g(F);y={};for(D in I){y[D]='<div rel="'+D+'" style="'+((D.search(/Left/)!==-1)?"left":"right")+":0; position:absolute; height:"+F+"px; width:"+F+'px; overflow:hidden; line-height:0.1px; font-size:1px">';if(f("<canvas>").get(0).getContext){y[D]+='<canvas height="'+F+'" width="'+F+'" style="vertical-align: top"></canvas>'}else{if(f.browser.msie){K=F*2+3;y[D]+='<v:arc stroked="false" fillcolor="'+B+'" startangle="'+I[D][0]+'" endangle="'+I[D][1]+'" style="width:'+K+"px; height:"+K+"px; margin-top:"+((D.search(/bottom/)!==-1)?-2:-1)+"px; margin-left:"+((D.search(/Right/)!==-1)?I[D][2]-3.5:-1)+'px; vertical-align:top; display:inline-block; behavior:url(#default#VML)"></v:arc>'}}y[D]+="</div>"}H=J.getDimensions().width-(Math.max(w,F)*2);C='<div class="qtip-betweenCorners" style="height:'+F+"px; width:"+H+"px; overflow:hidden; background-color:"+B+'; line-height:0.1px; font-size:1px;">';A='<div class="qtip-borderTop" dir="ltr" style="height:'+F+"px; margin-left:"+F+'px; line-height:0.1px; font-size:1px; padding:0;">'+y.topLeft+y.topRight+C;J.elements.wrapper.prepend(A);G='<div class="qtip-borderBottom" dir="ltr" style="height:'+F+"px; margin-left:"+F+'px; line-height:0.1px; font-size:1px; padding:0;">'+y.bottomLeft+y.bottomRight+C;J.elements.wrapper.append(G);if(f("<canvas>").get(0).getContext){J.elements.wrapper.find("canvas").each(function(){E=I[f(this).parent("[rel]:first").attr("rel")];u.call(J,f(this),E,F,B)})}else{if(f.browser.msie){J.elements.tooltip.append('<v:image style="behavior:url(#default#VML);"></v:image>')}}v=Math.max(F,(F+(w-F)));z=Math.max(w-F,0);J.elements.contentWrapper.css({border:"0px solid "+B,borderWidth:z+"px "+v+"px"})}function u(y,A,v,w){var z=y.get(0).getContext("2d");z.fillStyle=w;z.beginPath();z.arc(A[0],A[1],v,0,Math.PI*2,false);z.fill()}function e(z){var w,v,B,y,A;w=this;if(w.elements.tip!==null){w.elements.tip.remove()}v=w.options.style.tip.color||w.options.style.border.color;if(w.options.style.tip.corner===false){return}else{if(!z){z=w.options.style.tip.corner}}B=b(z,w.options.style.tip.size.width,w.options.style.tip.size.height);w.elements.tip='<div class="'+w.options.style.classes.tip+'" dir="ltr" rel="'+z+'" style="position:absolute; height:'+w.options.style.tip.size.height+"px; width:"+w.options.style.tip.size.width+'px; margin:0 auto; line-height:0.1px; font-size:1px;">';if(f("<canvas>").get(0).getContext){w.elements.tip+='<canvas height="'+w.options.style.tip.size.height+'" width="'+w.options.style.tip.size.width+'"></canvas>'}else{if(f.browser.msie){y=w.options.style.tip.size.width+","+w.options.style.tip.size.height;A="m"+B[0][0]+","+B[0][1];A+=" l"+B[1][0]+","+B[1][1];A+=" "+B[2][0]+","+B[2][1];A+=" xe";w.elements.tip+='<v:shape fillcolor="'+v+'" stroked="false" filled="true" path="'+A+'" coordsize="'+y+'" style="width:'+w.options.style.tip.size.width+"px; height:"+w.options.style.tip.size.height+"px; line-height:0.1px; display:inline-block; behavior:url(#default#VML); vertical-align:"+((z.search(/top/)!==-1)?"bottom":"top")+'"></v:shape>';w.elements.tip+='<v:image style="behavior:url(#default#VML);"></v:image>';w.elements.contentWrapper.css("position","relative")}}w.elements.tooltip.prepend(w.elements.tip+"</div>");w.elements.tip=w.elements.tooltip.find("."+w.options.style.classes.tip).eq(0);if(f("<canvas>").get(0).getContext){h.call(w,w.elements.tip.find("canvas:first"),B,v)}if(z.search(/top/)!==-1&&f.browser.msie&&parseInt(f.browser.version.charAt(0))===6){w.elements.tip.css({marginTop:-4})}o.call(w,z)}function h(w,z,v){var y=w.get(0).getContext("2d");y.fillStyle=v;y.beginPath();y.moveTo(z[0][0],z[0][1]);y.lineTo(z[1][0],z[1][1]);y.lineTo(z[2][0],z[2][1]);y.fill()}function o(y){var w,A,v,B,z;w=this;if(w.options.style.tip.corner===false||!w.elements.tip){return}if(!y){y=w.elements.tip.attr("rel")}A=positionAdjust=(f.browser.msie)?1:0;w.elements.tip.css(y.match(/left|right|top|bottom/)[0],0);if(y.search(/top|bottom/)!==-1){if(f.browser.msie){if(parseInt(f.browser.version.charAt(0))===6){positionAdjust=(y.search(/top/)!==-1)?-3:1}else{positionAdjust=(y.search(/top/)!==-1)?1:2}}if(y.search(/Middle/)!==-1){w.elements.tip.css({left:"50%",marginLeft:-(w.options.style.tip.size.width/2)})}else{if(y.search(/Left/)!==-1){w.elements.tip.css({left:w.options.style.border.radius-A})}else{if(y.search(/Right/)!==-1){w.elements.tip.css({right:w.options.style.border.radius+A})}}}if(y.search(/top/)!==-1){w.elements.tip.css({top:-positionAdjust})}else{w.elements.tip.css({bottom:positionAdjust})}}else{if(y.search(/left|right/)!==-1){if(f.browser.msie){positionAdjust=(parseInt(f.browser.version.charAt(0))===6)?1:((y.search(/left/)!==-1)?1:2)}if(y.search(/Middle/)!==-1){w.elements.tip.css({top:"50%",marginTop:-(w.options.style.tip.size.height/2)})}else{if(y.search(/Top/)!==-1){w.elements.tip.css({top:w.options.style.border.radius-A})}else{if(y.search(/Bottom/)!==-1){w.elements.tip.css({bottom:w.options.style.border.radius+A})}}}if(y.search(/left/)!==-1){w.elements.tip.css({left:-positionAdjust})}else{w.elements.tip.css({right:positionAdjust})}}}v="padding-"+y.match(/left|right|top|bottom/)[0];B=w.options.style.tip.size[(v.search(/left|right/)!==-1)?"width":"height"];w.elements.tooltip.css("padding",0);w.elements.tooltip.css(v,B);if(f.browser.msie&&parseInt(f.browser.version.charAt(0))==6){z=parseInt(w.elements.tip.css("margin-top"))||0;z+=parseInt(w.elements.content.css("margin-top"))||0;w.elements.tip.css({marginTop:z})}}function j(){var v=this;if(v.elements.title!==null){v.elements.title.remove()}v.elements.title=f('<div class="'+v.options.style.classes.title+'">').css(r(v.options.style.title,true)).css({zoom:(f.browser.msie)?1:0}).prependTo(v.elements.contentWrapper);if(v.options.content.title.text){v.updateTitle.call(v,v.options.content.title.text)}if(v.options.content.title.button!==false&&typeof v.options.content.title.button=="string"){v.elements.button=f('<a class="'+v.options.style.classes.button+'" style="float:right; position: relative"></a>').css(r(v.options.style.button,true)).html(v.options.content.title.button).prependTo(v.elements.title).click(function(w){if(!v.status.disabled){v.hide(w)}})}}function m(){var w,z,y,v;w=this;z=w.options.show.when.target;y=w.options.hide.when.target;if(w.options.hide.fixed){y=y.add(w.elements.tooltip)}if(w.options.hide.when.event=="inactive"){v=["click","dblclick","mousedown","mouseup","mousemove","mouseout","mouseenter","mouseleave","mouseover"];function C(D){if(w.status.disabled===true){return}clearTimeout(w.timers.inactive);w.timers.inactive=setTimeout(function(){f(v).each(function(){y.unbind(this+".qtip-inactive");w.elements.content.unbind(this+".qtip-inactive")});w.hide(D)},w.options.hide.delay)}}else{if(w.options.hide.fixed===true){w.elements.tooltip.bind("mouseover.qtip",function(){if(w.status.disabled===true){return}clearTimeout(w.timers.hide)})}}function B(D){if(w.status.disabled===true){return}if(w.options.hide.when.event=="inactive"){f(v).each(function(){y.bind(this+".qtip-inactive",C);w.elements.content.bind(this+".qtip-inactive",C)});C()}clearTimeout(w.timers.show);clearTimeout(w.timers.hide);w.timers.show=setTimeout(function(){w.show(D)},w.options.show.delay)}function A(D){if(w.status.disabled===true){return}if(w.options.hide.fixed===true&&w.options.hide.when.event.search(/mouse(out|leave)/i)!==-1&&f(D.relatedTarget).parents("div.qtip[qtip]").length>0){D.stopPropagation();D.preventDefault();clearTimeout(w.timers.hide);return false}clearTimeout(w.timers.show);clearTimeout(w.timers.hide);w.elements.tooltip.stop(true,true);w.timers.hide=setTimeout(function(){w.hide(D)},w.options.hide.delay)}if((w.options.show.when.target.add(w.options.hide.when.target).length===1&&w.options.show.when.event==w.options.hide.when.event&&w.options.hide.when.event!=="inactive")||w.options.hide.when.event=="unfocus"){w.cache.toggle=0;z.bind(w.options.show.when.event+".qtip",function(D){if(w.cache.toggle==0){B(D)}else{A(D)}})}else{z.bind(w.options.show.when.event+".qtip",B);if(w.options.hide.when.event!=="inactive"){y.bind(w.options.hide.when.event+".qtip",A)}}if(w.options.position.type.search(/(fixed|absolute)/)!==-1){w.elements.tooltip.bind("mouseover.qtip",w.focus)}if(w.options.position.target==="mouse"&&w.options.position.type!=="static"){z.bind("mousemove.qtip",function(D){w.cache.mouse={x:D.pageX,y:D.pageY};if(w.status.disabled===false&&w.options.position.adjust.mouse===true&&w.options.position.type!=="static"&&w.elements.tooltip.css("display")!=="none"){w.updatePosition(D)}})}}function p(y,z,E){var D,v,B,C,w,A;D=this;if(E.corner=="center"){return z.position}v=f.extend({},y);C={x:false,y:false};w={left:(v.left<f.fn.qtip.cache.screen.scroll.left),right:(v.left+E.dimensions.width+2>=f.fn.qtip.cache.screen.width+f.fn.qtip.cache.screen.scroll.left),top:(v.top<f.fn.qtip.cache.screen.scroll.top),bottom:(v.top+E.dimensions.height+2>=f.fn.qtip.cache.screen.height+f.fn.qtip.cache.screen.scroll.top)};B={left:(w.left&&(E.corner.search(/right/i)!=-1||(E.corner.search(/right/i)==-1&&!w.right))),right:(w.right&&(E.corner.search(/left/i)!=-1||(E.corner.search(/left/i)==-1&&!w.left))),top:(w.top&&E.corner.search(/top/i)==-1),bottom:(w.bottom&&E.corner.search(/bottom/i)==-1)};if(B.left){if(D.options.position.target!=="mouse"){v.left=z.position.left+z.dimensions.width}else{v.left=D.cache.mouse.x}C.x="Left"}else{if(B.right){if(D.options.position.target!=="mouse"){v.left=z.position.left-E.dimensions.width}else{v.left=D.cache.mouse.x-E.dimensions.width}C.x="Right"}}if(B.top){if(D.options.position.target!=="mouse"){v.top=z.position.top+z.dimensions.height}else{v.top=D.cache.mouse.y}C.y="top"}else{if(B.bottom){if(D.options.position.target!=="mouse"){v.top=z.position.top-E.dimensions.height}else{v.top=D.cache.mouse.y-E.dimensions.height}C.y="bottom"}}if(v.left<0){v.left=y.left;C.x=false}if(v.top<0){v.top=y.top;C.y=false}if(D.options.style.tip.corner!==false){v.corner=new String(E.corner);if(C.x!==false){v.corner=v.corner.replace(/Left|Right|Middle/,C.x)}if(C.y!==false){v.corner=v.corner.replace(/top|bottom/,C.y)}if(v.corner!==D.elements.tip.attr("rel")){e.call(D,v.corner)}}return v}function r(y,w){var z,v;z=f.extend(true,{},y);for(v in z){if(w===true&&v.search(/(tip|classes)/i)!==-1){delete z[v]}else{if(!w&&v.search(/(width|border|tip|title|classes|user)/i)!==-1){delete z[v]}}}return z}function c(v){if(typeof v.tip!=="object"){v.tip={corner:v.tip}}if(typeof v.tip.size!=="object"){v.tip.size={width:v.tip.size,height:v.tip.size}}if(typeof v.border!=="object"){v.border={width:v.border}}if(typeof v.width!=="object"){v.width={value:v.width}}if(typeof v.width.max=="string"){v.width.max=parseInt(v.width.max.replace(/([0-9]+)/i,"$1"))}if(typeof v.width.min=="string"){v.width.min=parseInt(v.width.min.replace(/([0-9]+)/i,"$1"))}if(typeof v.tip.size.x=="number"){v.tip.size.width=v.tip.size.x;delete v.tip.size.x}if(typeof v.tip.size.y=="number"){v.tip.size.height=v.tip.size.y;delete v.tip.size.y}return v}function a(){var v,w,y,B,z,A;v=this;y=[true,{}];for(w=0;w<arguments.length;w++){y.push(arguments[w])}B=[f.extend.apply(f,y)];while(typeof B[0].name=="string"){B.unshift(c(f.fn.qtip.styles[B[0].name]))}B.unshift(true,{classes:{tooltip:"qtip-"+(arguments[0].name||"defaults")}},f.fn.qtip.styles.defaults);z=f.extend.apply(f,B);A=(f.browser.msie)?1:0;z.tip.size.width+=A;z.tip.size.height+=A;if(z.tip.size.width%2>0){z.tip.size.width+=1}if(z.tip.size.height%2>0){z.tip.size.height+=1}if(z.tip.corner===true){z.tip.corner=(v.options.position.corner.tooltip==="center")?false:v.options.position.corner.tooltip}return z}function b(z,y,w){var v={bottomRight:[[0,0],[y,w],[y,0]],bottomLeft:[[0,0],[y,0],[0,w]],topRight:[[0,w],[y,0],[y,w]],topLeft:[[0,0],[0,w],[y,w]],topMiddle:[[0,w],[y/2,0],[y,w]],bottomMiddle:[[0,0],[y,0],[y/2,w]],rightMiddle:[[0,0],[y,w/2],[0,w]],leftMiddle:[[y,0],[y,w],[0,w/2]]};v.leftTop=v.bottomRight;v.rightTop=v.bottomLeft;v.leftBottom=v.topRight;v.rightBottom=v.topLeft;return v[z]}function g(v){var w;if(f("<canvas>").get(0).getContext){w={topLeft:[v,v],topRight:[0,v],bottomLeft:[v,0],bottomRight:[0,0]}}else{if(f.browser.msie){w={topLeft:[-90,90,0],topRight:[-90,90,-v],bottomLeft:[90,270,0],bottomRight:[90,270,-v]}}}return w}function l(){var v,w,y;v=this;y=v.getDimensions();w='<iframe class="qtip-bgiframe" frameborder="0" tabindex="-1" src="javascript:false" style="display:block; position:absolute; z-index:-1; filter:alpha(opacity=\'0\'); border: 1px solid red; height:'+y.height+"px; width:"+y.width+'px" />';v.elements.bgiframe=v.elements.wrapper.prepend(w).children(".qtip-bgiframe:first")}f(document).ready(function(){f.fn.qtip.cache={screen:{scroll:{left:f(window).scrollLeft(),top:f(window).scrollTop()},width:f(window).width(),height:f(window).height()}};var v;f(window).bind("resize scroll",function(w){clearTimeout(v);v=setTimeout(function(){if(w.type==="scroll"){f.fn.qtip.cache.screen.scroll={left:f(window).scrollLeft(),top:f(window).scrollTop()}}else{f.fn.qtip.cache.screen.width=f(window).width();f.fn.qtip.cache.screen.height=f(window).height()}for(i=0;i<f.fn.qtip.interfaces.length;i++){var y=f.fn.qtip.interfaces[i];if(y.status.rendered===true&&(y.options.position.type!=="static"||y.options.position.adjust.scroll&&w.type==="scroll"||y.options.position.adjust.resize&&w.type==="resize")){y.updatePosition(w,true)}}},100)});f(document).bind("mousedown.qtip",function(w){if(f(w.target).parents("div.qtip").length===0){f(".qtip[unfocus]").each(function(){var y=f(this).qtip("api");if(f(this).is(":visible")&&!y.status.disabled&&f(w.target).add(y.elements.target).length>1){y.hide(w)}})}})});f.fn.qtip.interfaces=[];f.fn.qtip.log={error:function(){return this}};f.fn.qtip.constants={};f.fn.qtip.defaults={content:{prerender:false,text:false,url:false,data:null,title:{text:false,button:false}},position:{target:false,corner:{target:"bottomMiddle",tooltip:"topRight"},adjust:{x:0,y:0,mouse:true,screen:false,scroll:true,resize:true},type:"absolute",container:false},show:{when:{target:false,event:"mouseover"},effect:{type:"fade",length:100},delay:140,solo:false,ready:false},hide:{when:{target:false,event:"mouseout"},effect:{type:"fade",length:100},delay:0,fixed:false},api:{beforeRender:function(){},onRender:function(){},beforePositionUpdate:function(){},onPositionUpdate:function(){},beforeShow:function(){},onShow:function(){},beforeHide:function(){},onHide:function(){},beforeContentUpdate:function(){},onContentUpdate:function(){},beforeContentLoad:function(){},onContentLoad:function(){},beforeTitleUpdate:function(){},onTitleUpdate:function(){},beforeDestroy:function(){},onDestroy:function(){},beforeFocus:function(){},onFocus:function(){}}};f.fn.qtip.styles={defaults:{background:"white",color:"#111",overflow:"hidden",textAlign:"left",width:{min:0,max:250},padding:"5px 9px",border:{width:1,radius:0,color:"#d3d3d3"},tip:{corner:false,color:false,size:{width:13,height:13},opacity:1},title:{background:"#e1e1e1",fontWeight:"bold",padding:"7px 12px"},button:{cursor:"pointer"},classes:{target:"",tip:"qtip-tip",title:"qtip-title",button:"qtip-button",content:"qtip-content",active:"qtip-active"}},cream:{border:{width:3,radius:0,color:"#F9E98E"},title:{background:"#F0DE7D",color:"#A27D35"},background:"#FBF7AA",color:"#A27D35",classes:{tooltip:"qtip-cream"}},light:{border:{width:3,radius:0,color:"#E2E2E2"},title:{background:"#f1f1f1",color:"#454545"},background:"white",color:"#454545",classes:{tooltip:"qtip-light"}},dark:{border:{width:3,radius:0,color:"#303030"},title:{background:"#404040",color:"#f3f3f3"},background:"#505050",color:"#f3f3f3",classes:{tooltip:"qtip-dark"}},red:{border:{width:3,radius:0,color:"#CE6F6F"},title:{background:"#f28279",color:"#9C2F2F"},background:"#F79992",color:"#9C2F2F",classes:{tooltip:"qtip-red"}},green:{border:{width:3,radius:0,color:"#A9DB66"},title:{background:"#b9db8c",color:"#58792E"},background:"#CDE6AC",color:"#58792E",classes:{tooltip:"qtip-green"}},blue:{border:{width:3,radius:0,color:"#ADD9ED"},title:{background:"#D0E9F5",color:"#5E99BD"},background:"#E5F6FE",color:"#4D9FBF",classes:{tooltip:"qtip-blue"}}}})(jQuery);(function(a){a.fn.bgIframe=a.fn.bgiframe=function(c){if(a.browser.msie&&/6.0/.test(navigator.userAgent)){c=a.extend({top:"auto",left:"auto",width:"auto",height:"auto",opacity:true,src:"javascript:false;"},c||{});var d=function(e){return e&&e.constructor==Number?e+"px":e},b='<iframe class="bgiframe"frameborder="0"tabindex="-1"src="'+c.src+'"style="display:block;position:absolute;z-index:-1;'+(c.opacity!==false?"filter:Alpha(Opacity='0');":"")+"top:"+(c.top=="auto"?"expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+'px')":d(c.top))+";left:"+(c.left=="auto"?"expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+'px')":d(c.left))+";width:"+(c.width=="auto"?"expression(this.parentNode.offsetWidth+'px')":d(c.width))+";height:"+(c.height=="auto"?"expression(this.parentNode.offsetHeight+'px')":d(c.height))+';"/>';return this.each(function(){if(a("> iframe.bgiframe",this).length==0){this.insertBefore(document.createElement(b),this.firstChild)}})}return this}})(jQuery);(function(a){a.fn.extend({autocomplete:function(b,c){var d=typeof b=="string";c=a.extend({},a.Autocompleter.defaults,{url:d?b:null,data:d?null:b,delay:d?a.Autocompleter.defaults.delay:10,max:c&&!c.scroll?10:150},c);c.highlight=c.highlight||function(e){return e};c.formatMatch=c.formatMatch||c.formatItem;return this.each(function(){new a.Autocompleter(this,c)})},result:function(b){return this.bind("result",b)},search:function(b){return this.trigger("search",[b])},flushCache:function(){return this.trigger("flushCache")},setOptions:function(b){return this.trigger("setOptions",[b])},unautocomplete:function(){return this.trigger("unautocomplete")}});a.Autocompleter=function(n,g){var c={UP:38,DOWN:40,DEL:46,TAB:9,RETURN:13,ESC:27,COMMA:188,PAGEUP:33,PAGEDOWN:34,BACKSPACE:8};var b=a(n).attr("autocomplete","off").addClass(g.inputClass);var l;var r="";var o=a.Autocompleter.Cache(g);var e=0;var z;var C={mouseDownOnSelect:false};var v=a.Autocompleter.Select(g,n,d,C);var B;a.browser.opera&&a(n.form).bind("submit.autocomplete",function(){if(B){B=false;return false}});b.bind((a.browser.opera?"keypress":"keydown")+".autocomplete",function(D){z=D.keyCode;switch(D.keyCode){case c.UP:D.preventDefault();if(v.visible()){v.prev()}else{y(0,true)}break;case c.DOWN:D.preventDefault();if(v.visible()){v.next()}else{y(0,true)}break;case c.PAGEUP:D.preventDefault();if(v.visible()){v.pageUp()}else{y(0,true)}break;case c.PAGEDOWN:D.preventDefault();if(v.visible()){v.pageDown()}else{y(0,true)}break;case g.multiple&&a.trim(g.multipleSeparator)==","&&c.COMMA:case c.TAB:case c.RETURN:if(d()){D.preventDefault();B=true;return false}break;case c.ESC:v.hide();break;default:clearTimeout(l);l=setTimeout(y,g.delay);break}}).focus(function(){e++}).blur(function(){e=0;if(!C.mouseDownOnSelect){w()}}).click(function(){if(e++>1&&!v.visible()){y(0,true)}}).bind("search",function(){var D=(arguments.length>1)?arguments[1]:null;function E(I,H){var F;if(H&&H.length){for(var G=0;G<H.length;G++){if(H[G].result.toLowerCase()==I.toLowerCase()){F=H[G];break}}}if(typeof D=="function"){D(F)}else{b.trigger("result",F&&[F.data,F.value])}}a.each(h(b.val()),function(F,G){f(G,E,E)})}).bind("flushCache",function(){o.flush()}).bind("setOptions",function(){a.extend(g,arguments[1]);if("data" in arguments[1]){o.populate()}}).bind("unautocomplete",function(){v.unbind();b.unbind();a(n.form).unbind(".autocomplete")});function d(){var E=v.selected();if(!E){return false}var D=E.result;r=D;if(g.multiple){var F=h(b.val());if(F.length>1){D=F.slice(0,F.length-1).join(g.multipleSeparator)+g.multipleSeparator+D}D+=g.multipleSeparator}b.val(D);A();b.trigger("result",[E.data,E.value]);return true}function y(F,E){if(z==c.DEL){v.hide();return}var D=b.val();if(!E&&D==r){return}r=D;D=j(D);if(D.length>=g.minChars){b.addClass(g.loadingClass);if(!g.matchCase){D=D.toLowerCase()}f(D,m,A)}else{p();v.hide()}}function h(E){if(!E){return[""]}var F=E.split(g.multipleSeparator);var D=[];a.each(F,function(G,H){if(a.trim(H)){D[G]=a.trim(H)}});return D}function j(D){if(!g.multiple){return D}var E=h(D);return E[E.length-1]}function u(D,E){if(g.autoFill&&(j(b.val()).toLowerCase()==D.toLowerCase())&&z!=c.BACKSPACE){b.val(b.val()+E.substring(j(r).length));a.Autocompleter.Selection(n,r.length,r.length+E.length)}}function w(){clearTimeout(l);l=setTimeout(A,200)}function A(){var D=v.visible();v.hide();clearTimeout(l);p();if(g.mustMatch){b.search(function(E){if(!E){if(g.multiple){var F=h(b.val()).slice(0,-1);b.val(F.join(g.multipleSeparator)+(F.length?g.multipleSeparator:""))}else{b.val("")}}})}if(D){a.Autocompleter.Selection(n,n.value.length,n.value.length)}}function m(E,D){if(D&&D.length&&e){p();v.display(D,E);u(E,D[0].value);v.show()}else{A()}}function f(E,G,D){if(!g.matchCase){E=E.toLowerCase()}var F=o.load(E);if(F&&F.length){G(E,F)}else{if((typeof g.url=="string")&&(g.url.length>0)){var H={timestamp:+new Date()};a.each(g.extraParams,function(I,J){H[I]=typeof J=="function"?J():J});jQuery.post(g.url,{q:j(E),limit:g.max,Qform__FormId:g.extraParams.Qform__FormId,Qform__FormState:a("#Qform__FormState").val(),Qform__FormUpdates:"",Qform__FormCheckableControls:"",Qform__FormParameter:j(E),Qform__FormEvent:"QAutoCompleteTextBoxEvent",Qform__FormCallType:"Ajax",Qform__FormControl:g.extraParams.Qform__FormControl},function(J){var I=g.parse&&g.parse(J)||q(J);o.add(E,I);G(E,I)})}else{v.emptyList();D(E)}}}function q(G){var D=[];var F=G.split("\n");for(var E=0;E<F.length;E++){var H=a.trim(F[E]);if(H){H=H.split("|");D[D.length]={data:H,value:H[0],result:g.formatResult&&g.formatResult(H,H[0])||H[0]}}}return D}function p(){b.removeClass(g.loadingClass)}};a.Autocompleter.defaults={inputClass:"ac_input",resultsClass:"ac_results",loadingClass:"ac_loading",minChars:1,delay:400,matchCase:false,matchSubset:true,matchContains:false,cacheLength:10,max:100,mustMatch:false,extraParams:{},selectFirst:true,formatItem:function(b){return b[0]},formatMatch:null,autoFill:false,width:0,multiple:false,multipleSeparator:", ",highlight:function(c,b){return c.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)("+b.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi,"\\$1")+")(?![^<>]*>)(?![^&;]+;)","gi"),"<strong>$1</strong>")},scroll:true,scrollHeight:180};a.Autocompleter.Cache=function(c){var f={};var d=0;function h(m,l){if(!c.matchCase){m=m.toLowerCase()}var j=m.indexOf(l);if(j==-1){return false}return j==0||c.matchContains}function g(l,j){if(d>c.cacheLength){b()}if(!f[l]){d++}f[l]=j}function e(){if(!c.data){return false}var l={},j=0;if(!c.url){c.cacheLength=1}l[""]=[];for(var n=0,m=c.data.length;n<m;n++){var q=c.data[n];q=(typeof q=="string")?[q]:q;var p=c.formatMatch(q,n+1,c.data.length);if(p===false){continue}var o=p.charAt(0).toLowerCase();if(!l[o]){l[o]=[]}var r={value:p,data:q,result:c.formatResult&&c.formatResult(q)||p};l[o].push(r);if(j++<c.max){l[""].push(r)}}a.each(l,function(u,v){c.cacheLength++;g(u,v)})}setTimeout(e,25);function b(){f={};d=0}return{flush:b,add:g,populate:e,load:function(n){if(!c.cacheLength||!d){return null}if(!c.url&&c.matchContains){var m=[];for(var j in f){if(j.length>0){var o=f[j];a.each(o,function(q,p){if(h(p.value,n)){m.push(p)}})}}return m}else{if(f[n]){return f[n]}else{if(c.matchSubset){for(var l=n.length-1;l>=c.minChars;l--){var o=f[n.substr(0,l)];if(o){var m=[];a.each(o,function(q,p){if(h(p.value,n)){m[m.length]=p}});return m}}}}}return null}}};a.Autocompleter.Select=function(e,l,n,r){var j={ACTIVE:"ac_over"};var m,f=-1,v,o="",w=true,c,q;function p(){if(!w){return}c=a("<div/>").hide().addClass(e.resultsClass).css("position","absolute").appendTo(document.body);q=a("<ul/>").appendTo(c).mouseover(function(y){if(u(y).nodeName&&u(y).nodeName.toUpperCase()=="LI"){f=a("li",q).removeClass(j.ACTIVE).index(u(y));a(u(y)).addClass(j.ACTIVE)}}).click(function(y){a(u(y)).addClass(j.ACTIVE);n();l.focus();return false}).mousedown(function(){r.mouseDownOnSelect=true}).mouseup(function(){r.mouseDownOnSelect=false});if(e.width>0){c.css("width",e.width)}w=false}function u(z){var y=z.target;while(y&&y.tagName!="LI"){y=y.parentNode}if(!y){return[]}return y}function h(y){m.slice(f,f+1).removeClass(j.ACTIVE);g(y);var A=m.slice(f,f+1).addClass(j.ACTIVE);if(e.scroll){var z=0;m.slice(0,f).each(function(){z+=this.offsetHeight});if((z+A[0].offsetHeight-q.scrollTop())>q[0].clientHeight){q.scrollTop(z+A[0].offsetHeight-q.innerHeight())}else{if(z<q.scrollTop()){q.scrollTop(z)}}}}function g(y){f+=y;if(f<0){f=m.size()-1}else{if(f>=m.size()){f=0}}}function b(y){return e.max&&e.max<y?e.max:y}function d(){q.empty();var z=b(v.length);for(var A=0;A<z;A++){if(!v[A]){continue}var B=e.formatItem(v[A].data,A+1,z,v[A].value,o);if(B===false){continue}var y=a("<li/>").html(e.highlight(B,o)).addClass(A%2==0?"ac_even":"ac_odd").appendTo(q)[0];a.data(y,"ac_data",v[A])}m=q.find("li");if(e.selectFirst){m.slice(0,1).addClass(j.ACTIVE);f=0}if(a.fn.bgiframe){q.bgiframe()}}return{display:function(z,y){p();v=z;o=y;d()},next:function(){h(1)},prev:function(){h(-1)},pageUp:function(){if(f!=0&&f-8<0){h(-f)}else{h(-8)}},pageDown:function(){if(f!=m.size()-1&&f+8>m.size()){h(m.size()-1-f)}else{h(8)}},hide:function(){c&&c.hide();m&&m.removeClass(j.ACTIVE);f=-1},visible:function(){return c&&c.is(":visible")},current:function(){return this.visible()&&(m.filter("."+j.ACTIVE)[0]||e.selectFirst&&m[0])},show:function(){var A=a(l).offset();c.css({width:typeof e.width=="string"||e.width>0?e.width:a(l).width(),top:A.top+l.offsetHeight,left:A.left}).show();if(e.scroll){q.scrollTop(0);q.css({maxHeight:e.scrollHeight,overflow:"auto"});if(a.browser.msie&&typeof document.body.style.maxHeight==="undefined"){var y=0;m.each(function(){y+=this.offsetHeight});var z=y>e.scrollHeight;q.css("height",z?e.scrollHeight:y);if(!z){m.width(q.width()-parseInt(m.css("padding-left"))-parseInt(m.css("padding-right")))}}}},selected:function(){var y=m&&m.filter("."+j.ACTIVE).removeClass(j.ACTIVE);return y&&y.length&&a.data(y[0],"ac_data")},emptyList:function(){q&&q.empty()},unbind:function(){c&&c.remove()}}};a.Autocompleter.Selection=function(d,e,c){if(d.createTextRange){var b=d.createTextRange();b.collapse(true);b.moveStart("character",e);b.moveEnd("character",c);b.select()}else{if(d.setSelectionRange){d.setSelectionRange(e,c)}else{if(d.selectionStart){d.selectionStart=e;d.selectionEnd=c}}}d.focus()}})(jQuery);(function(a){a.fn.alphanumeric=function(b){b=a.extend({ichars:"!@#$%^&*()+=[]\\';,/{}|\":<>?~`.- ",nchars:"",allow:""},b);return this.each(function(){if(b.nocaps){b.nchars+="ABCDEFGHIJKLMNOPQRSTUVWXYZ"}if(b.allcaps){b.nchars+="abcdefghijklmnopqrstuvwxyz"}s=b.allow.split("");for(i=0;i<s.length;i++){if(b.ichars.indexOf(s[i])!=-1){s[i]="\\"+s[i]}}b.allow=s.join("|");var d=new RegExp(b.allow,"gi");var c=b.ichars+b.nchars;c=c.replace(d,"");a(this).keypress(function(f){if(!f.charCode){k=String.fromCharCode(f.which)}else{k=String.fromCharCode(f.charCode)}if(c.indexOf(k)!=-1){f.preventDefault()}if(f.ctrlKey&&k=="v"){f.preventDefault()}});a(this).bind("contextmenu",function(){return false})})};a.fn.numeric=function(c){var b="abcdefghijklmnopqrstuvwxyz";b+=b.toUpperCase();c=a.extend({nchars:b},c);return this.each(function(){a(this).alphanumeric(c)})};a.fn.alpha=function(c){var b="1234567890";c=a.extend({nchars:b},c);return this.each(function(){a(this).alphanumeric(c)})}})(jQuery);(function(){function log(){if(typeof(console)!="undefined"&&typeof(console.log)=="function"){Array.prototype.unshift.call(arguments,"[Ajax Upload]");console.log(Array.prototype.join.call(arguments," "))}}function addEvent(el,type,fn){if(el.addEventListener){el.addEventListener(type,fn,false)}else{if(el.attachEvent){el.attachEvent("on"+type,function(){fn.call(el)})}else{throw new Error("not supported or DOM not loaded")}}}function addResizeEvent(fn){var timeout;addEvent(window,"resize",function(){if(timeout){clearTimeout(timeout)}timeout=setTimeout(fn,100)})}if(document.documentElement.getBoundingClientRect){var getOffset=function(el){var box=el.getBoundingClientRect();var doc=el.ownerDocument;var body=doc.body;var docElem=doc.documentElement;var clientTop=docElem.clientTop||body.clientTop||0;var clientLeft=docElem.clientLeft||body.clientLeft||0;var zoom=1;if(body.getBoundingClientRect){var bound=body.getBoundingClientRect();zoom=(bound.right-bound.left)/body.clientWidth}if(zoom>1){clientTop=0;clientLeft=0}var top=box.top/zoom+(window.pageYOffset||docElem&&docElem.scrollTop/zoom||body.scrollTop/zoom)-clientTop,left=box.left/zoom+(window.pageXOffset||docElem&&docElem.scrollLeft/zoom||body.scrollLeft/zoom)-clientLeft;return{top:top,left:left}}}else{var getOffset=function(el){var top=0,left=0;do{top+=el.offsetTop||0;left+=el.offsetLeft||0;el=el.offsetParent}while(el);return{left:left,top:top}}}function getBox(el){var left,right,top,bottom;var offset=getOffset(el);left=offset.left;top=offset.top;right=left+el.offsetWidth;bottom=top+el.offsetHeight;return{left:left,right:right,top:top,bottom:bottom}}function addStyles(el,styles){for(var name in styles){if(styles.hasOwnProperty(name)){el.style[name]=styles[name]}}}function copyLayout(from,to){var box=getBox(from);addStyles(to,{position:"absolute",left:box.left+"px",top:box.top+"px",width:from.offsetWidth+"px",height:from.offsetHeight+"px"})}var toElement=(function(){var div=document.createElement("div");return function(html){div.innerHTML=html;var el=div.firstChild;return div.removeChild(el)}})();var getUID=(function(){var id=0;return function(){return"ValumsAjaxUpload"+id++}})();function fileFromPath(file){return file.replace(/.*(\/|\\)/,"")}function getExt(file){return(-1!==file.indexOf("."))?file.replace(/.*[.]/,""):""}function hasClass(el,name){var re=new RegExp("\\b"+name+"\\b");return re.test(el.className)}function addClass(el,name){if(!hasClass(el,name)){el.className+=" "+name}}function removeClass(el,name){var re=new RegExp("\\b"+name+"\\b");el.className=el.className.replace(re,"")}function removeNode(el){el.parentNode.removeChild(el)}window.AjaxUpload=function(button,options){this._settings={action:"upload.php",name:"userfile",data:{},autoSubmit:true,responseType:false,hoverClass:"hover",disabledClass:"disabled",onChange:function(file,extension){},onSubmit:function(file,extension){},onComplete:function(file,response){}};for(var i in options){if(options.hasOwnProperty(i)){this._settings[i]=options[i]}}if(button.jquery){button=button[0]}else{if(typeof button=="string"){if(/^#.*/.test(button)){button=button.slice(1)}button=document.getElementById(button)}}if(!button||button.nodeType!==1){throw new Error("Please make sure that you're passing a valid element")}if(button.nodeName.toUpperCase()=="A"){addEvent(button,"click",function(e){if(e&&e.preventDefault){e.preventDefault()}else{if(window.event){window.event.returnValue=false}}})}this._button=button;this._input=null;this._disabled=false;this.enable();this._rerouteClicks()};AjaxUpload.prototype={setData:function(data){this._settings.data=data},disable:function(){addClass(this._button,this._settings.disabledClass);this._disabled=true;var nodeName=this._button.nodeName.toUpperCase();if(nodeName=="INPUT"||nodeName=="BUTTON"){this._button.setAttribute("disabled","disabled")}if(this._input){this._input.parentNode.style.visibility="hidden"}},enable:function(){removeClass(this._button,this._settings.disabledClass);this._button.removeAttribute("disabled");this._disabled=false},_createInput:function(){var self=this;var input=document.createElement("input");input.setAttribute("type","file");input.setAttribute("name",this._settings.name);addStyles(input,{position:"absolute",right:0,margin:0,padding:0,fontSize:"480px",cursor:"pointer"});var div=document.createElement("div");addStyles(div,{display:"block",position:"absolute",overflow:"hidden",margin:0,padding:0,opacity:0,direction:"ltr",zIndex:2147483583});if(div.style.opacity!=="0"){if(typeof(div.filters)=="undefined"){throw new Error("Opacity not supported by the browser")}div.style.filter="alpha(opacity=0)"}addEvent(input,"change",function(){if(!input||input.value===""){return}var file=fileFromPath(input.value);if(false===self._settings.onChange.call(self,file,getExt(file))){self._clearInput();return}if(self._settings.autoSubmit){self.submit()}});addEvent(input,"mouseover",function(){addClass(self._button,self._settings.hoverClass)});addEvent(input,"mouseout",function(){removeClass(self._button,self._settings.hoverClass);input.parentNode.style.visibility="hidden"});div.appendChild(input);document.body.appendChild(div);this._input=input},_clearInput:function(){if(!this._input){return}removeNode(this._input.parentNode);this._input=null;this._createInput();removeClass(this._button,this._settings.hoverClass)},_rerouteClicks:function(){var self=this;addEvent(self._button,"mouseover",function(){if(self._disabled){return}if(!self._input){self._createInput()}var div=self._input.parentNode;copyLayout(self._button,div);div.style.visibility="visible"})},_createIframe:function(){var id=getUID();var iframe=toElement('<iframe src="javascript:false;" name="'+id+'" />');iframe.setAttribute("id",id);iframe.style.display="none";document.body.appendChild(iframe);return iframe},_createForm:function(iframe){var settings=this._settings;var form=toElement('<form method="post" enctype="multipart/form-data"></form>');form.setAttribute("action",settings.action);form.setAttribute("target",iframe.name);form.style.display="none";document.body.appendChild(form);for(var prop in settings.data){if(settings.data.hasOwnProperty(prop)){var el=document.createElement("input");el.setAttribute("type","hidden");el.setAttribute("name",prop);el.setAttribute("value",settings.data[prop]);form.appendChild(el)}}return form},_getResponse:function(iframe,file){var toDeleteFlag=false,self=this,settings=this._settings;addEvent(iframe,"load",function(){if(iframe.src=="javascript:'%3Chtml%3E%3C/html%3E';"||iframe.src=="javascript:'<html></html>';"){if(toDeleteFlag){setTimeout(function(){removeNode(iframe)},0)}return}var doc=iframe.contentDocument?iframe.contentDocument:window.frames[iframe.id].document;if(doc.readyState&&doc.readyState!="complete"){return}if(doc.body&&doc.body.innerHTML=="false"){return}var response;if(doc.XMLDocument){response=doc.XMLDocument}else{if(doc.body){response=doc.body.innerHTML;if(settings.responseType&&settings.responseType.toLowerCase()=="json"){if(doc.body.firstChild&&doc.body.firstChild.nodeName.toUpperCase()=="PRE"){response=doc.body.firstChild.firstChild.nodeValue}if(response){response=eval("("+response+")")}else{response={}}}}else{response=doc}}settings.onComplete.call(self,file,response);toDeleteFlag=true;iframe.src="javascript:'<html></html>';"})},submit:function(){var self=this,settings=this._settings;if(!this._input||this._input.value===""){return}var file=fileFromPath(this._input.value);if(false===settings.onSubmit.call(this,file,getExt(file))){this._clearInput();return}var iframe=this._createIframe();var form=this._createForm(iframe);removeNode(this._input.parentNode);removeClass(self._button,self._settings.hoverClass);form.appendChild(this._input);form.submit();removeNode(form);form=null;removeNode(this._input);this._input=null;this._getResponse(iframe,file);this._createInput()}}})();var ddsmoothmenu={arrowimages:{down:["downarrowclass","/assets/images/down.gif",18],right:["rightarrowclass","/assets/images/right.gif"]},transition:{overtime:300,outtime:300},shadow:{enable:false,offsetx:5,offsety:5},detectwebkit:navigator.userAgent.toLowerCase().indexOf("applewebkit")!=-1,detectie6:document.all&&!window.XMLHttpRequest,getajaxmenu:function(c,b){var a=c("#"+b.contentsource[0]);a.html("Loading Menu...");c.ajax({url:b.contentsource[1],async:true,error:function(d){a.html("Error fetching content. Server Response: "+d.responseText)},success:function(d){a.html(d);ddsmoothmenu.buildmenu(c,b)}})},buildmenu:function(d,b){var e=ddsmoothmenu;var a=d("#"+b.mainmenuid+">ul");a.parent().get(0).className=b.classname||"ddsmoothmenu";var c=a.find("ul").parent();c.hover(function(f){d(this).children("a:eq(0)").addClass("selected")},function(f){d(this).children("a:eq(0)").removeClass("selected")});c.each(function(g){var j=d(this).css({zIndex:100-g});var f=d(this).find("ul:eq(0)").css({display:"block"});this._dimensions={w:this.offsetWidth,h:this.offsetHeight,subulw:f.outerWidth(),subulh:f.outerHeight()};this.istopheader=j.parents("ul").length==1?true:false;f.css({top:this.istopheader&&b.orientation!="v"?this._dimensions.h+"px":0});j.children("a:eq(0)").css(this.istopheader?{paddingRight:e.arrowimages.down[2]}:{}).append('<img src="'+(this.istopheader&&b.orientation!="v"?e.arrowimages.down[1]:e.arrowimages.right[1])+'" class="'+(this.istopheader&&b.orientation!="v"?e.arrowimages.down[0]:e.arrowimages.right[0])+'" style="border:0;" />');if(e.shadow.enable){this._shadowoffset={x:(this.istopheader?f.offset().left+e.shadow.offsetx:this._dimensions.w),y:(this.istopheader?f.offset().top+e.shadow.offsety:j.position().top)};if(this.istopheader){$parentshadow=d(document.body)}else{var h=j.parents("li:eq(0)");$parentshadow=h.get(0).$shadow}this.$shadow=d('<div class="ddshadow'+(this.istopheader?" toplevelshadow":"")+'"></div>').prependTo($parentshadow).css({left:this._shadowoffset.x+"px",top:this._shadowoffset.y+"px"})}j.hover(function(o){var n=d(this).children("ul:eq(0)");this._offsets={left:d(this).offset().left,top:d(this).offset().top};var p=this.istopheader&&b.orientation!="v"?0:this._dimensions.w;p=(this._offsets.left+p+this._dimensions.subulw>d(window).width())?(this.istopheader&&b.orientation!="v"?-this._dimensions.subulw+this._dimensions.w:-this._dimensions.w):p;if(n.queue().length<=1){n.css({left:p+"px",width:this._dimensions.subulw+"px"}).animate({height:"show",opacity:"show"},ddsmoothmenu.transition.overtime);if(e.shadow.enable){var m=this.istopheader?n.offset().left+ddsmoothmenu.shadow.offsetx:p;var l=this.istopheader?n.offset().top+e.shadow.offsety:this._shadowoffset.y;if(!this.istopheader&&ddsmoothmenu.detectwebkit){this.$shadow.css({opacity:1})}this.$shadow.css({overflow:"",width:this._dimensions.subulw+"px",left:m+"px",top:l+"px"}).animate({height:this._dimensions.subulh+"px"},ddsmoothmenu.transition.overtime)}}},function(m){var l=d(this).children("ul:eq(0)");l.animate({height:"hide",opacity:"hide"},ddsmoothmenu.transition.outtime);if(e.shadow.enable){if(ddsmoothmenu.detectwebkit){this.$shadow.children("div:eq(0)").css({opacity:0})}this.$shadow.css({overflow:"hidden"}).animate({height:0},ddsmoothmenu.transition.outtime)}})});a.find("ul").css({display:"none",visibility:"visible"})},init:function(c){if(typeof c.customtheme=="object"&&c.customtheme.length==2){var b="#"+c.mainmenuid;var a=(c.orientation=="v")?b:b+", "+b;document.write('<style type="text/css">\n'+a+" ul li a {background:"+c.customtheme[0]+";}\n"+b+" ul li a:hover {background:"+c.customtheme[1]+";}\n</style>")}this.shadow.enable=(document.all&&!window.XMLHttpRequest)?false:this.shadow.enable;jQuery(document).ready(function(d){if(typeof c.contentsource=="object"){ddsmoothmenu.getajaxmenu(d,c)}else{ddsmoothmenu.buildmenu(d,c)}})}};
