function addOption(d,a,b){var e=document.createElement("option");var c=document.createTextNode(a);e.setAttribute("value",b);e.appendChild(c);d.appendChild(e);return false}function removeAllOptions(b){var a=b.options.length;for(i=0;i<a;i++){b.removeChild(b.options[0])}return false}function setbrowser(){var f=navigator.userAgent;var c=(f.indexOf("Opera")>-1)?"Opera":navigator.appName;var a="";var f=navigator.userAgent;var c="";c=(f.indexOf("Mozilla")>-1)?"Mozilla":navigator.appName;c=(f.indexOf("Opera")>-1)?"Opera":navigator.appName;var d=f.indexOf("MSIE");if((d>-1)&&(c!="Mozilla")&&(c!="Opera")){alert(c);b=f.substring(d+5);var d=b.indexOf(";");var b=b.substring(0,d)}var d=f.indexOf("Opera");if(d>-1){b=f.substring(d+6);var d=b.indexOf(" ");var b=b.substring(0,d)}if(c=="Netscape"){var b=f.substring(8);var d=b.indexOf(" ");var b=b.substring(0,d);var d=b.indexOf("-");if(d>0){var b=b.substring(0,d)}}if(c=="Netscape"&&parseInt(navigator.appVersion)>=5){var d=f.lastIndexOf("/");var b=f.substring(d+1)}var e;if(c=="Microsoft Internet Explorer"&&b>=4&&f.indexOf("Mac")==-1){e="ie"}else{if(c=="Microsoft Internet Explorer"&&b>=5.2&&f.indexOf("Mac")>-1){e="iemac"}else{if((c=="Netscape"&&(b>=7||parseInt(b)<2))||(c=="Mozilla")){e="ns7"}else{if(c=="Netscape"&&b>4&&b<5){e="ns4"}else{if(c=="Opera"&&b>7.02){e="opera"}else{e="static"}}}}}}function getlayerall(c,a){if(!a){a=window.document}if(a.layers){for(var d=0;d<a.layers.length;d++){if(a.layers[d].id==c){return a.layers[d]}}for(var d=0;d<a.layers.length;d++){var b=getlayer(c,a.layers[d].document);if(b){return b}}return null}else{if(a.all){return a.all[c]}else{if(a.getElementById){return a.getElementById(c)}}}}var isNS=(navigator.appName.indexOf("Netscape")>=0);var isIE=(navigator.appName.indexOf("Microsoft")>=0);function getlayer(b){if(document.layers){var a=document.layers[b]}else{if(document.getElementById){var a=document.getElementById(b)}else{var a=document.all[b]}}return a}function toggleLayer(c,b){b=b||true;var a=document.getElementById(c);if(a.style.visibility=="visible"){layeroff(a)}else{layeron(a,b)}}function layeron(b,a){a=a||true;if(b){if(document.layers){b.visibility="visible"}else{b.style.visibility="visible";if(a){b.style.display="block"}else{b.style.display="inline"}}}}function layeroff(a){a.style.visibility="hidden";a.style.display="none"}function layerdisplayon(a){a.style.display="inline";a.style.visibility="visible"}function layerdisplayoff(a){a.style.visibility="hidden";a.style.display="none"}function elementdisplayon(a){layerdisplayon(getlayer(a))}function elementdisplayoff(a){layerdisplayoff(getlayer(a))}function UpdateInnerHTML(c,a){try{document.getElementById(c).innerHTML=a}catch(b){return false}}if(document.getElementsByTagName){var objects=document.getElementsByTagName("object");for(var i=0;i<objects.length;i++){objects[i].outerHTML=objects[i].outerHTML}}function readCookie(a){var f=a+"=";var b=document.cookie.split(";");for(var e=0;e<b.length;e++){var d=b[e];while(d.charAt(0)==" "){d=d.substring(1,d.length)}if(d.indexOf(f)==0){return d.substring(f.length,d.length)}}return null}function deleteCookie(a){createCookie(a,"",-1)}function createCookie(a,g,f){if(f){var c=new Date();c.setTime(c.getTime()+(f*24*60*60*1000));var d="; expires="+c.toGMTString()}else{var d=""}var b=document.location.hostname.toString().toLowerCase();if(b.indexOf("localhost")==-1){var e=b.indexOf(".");b=b.substring(e,b.length)}else{b=""}document.cookie=a+"="+g+d+"; path=/; domain="+b}function checkinit(){if(typeof(pageinit)=="function"){pageinit()}}function checkMobile(){var a=readCookie("SendToMobile");if(a=="Go"){top.location.href="payment.aspx?wci=mobilepayment"}}function request(e){var b=document.location.href;var a=b.indexOf("?");if(a>0){b=b.substring(a,b.length)}else{b=""}if(b.toLowerCase().indexOf(e)<=0){return""}else{var c=b.toLowerCase().indexOf("&",b.toLowerCase().indexOf(e));var d=b.toLowerCase().indexOf("#",b.toLowerCase().indexOf(e));if(c<=0&&d<=0){return b.substring(b.toLowerCase().indexOf(e)+e.length+1)}else{if(c>0){return b.substring(b.toLowerCase().indexOf(e)+e.length+1,b.toLowerCase().indexOf("&",b.toLowerCase().indexOf(e)))}else{return b.substring(b.toLowerCase().indexOf(e)+e.length+1,b.toLowerCase().indexOf("#",b.toLowerCase().indexOf(e)))}}}}function getElementsByClassName(a,c,f){var b=(c=="*"&&f.all)?f.all:f.getElementsByTagName(c);var e=new Array();a=a.replace(/-/g,"-");var h=new RegExp("(^|s)"+a+"(s|$)");var d;for(var g=0;g<b.length;g++){d=b[g];if(h.test(d.className)){e.push(d)}}return(e)}function getInputValue(a){var c="";if(a.options){c=a.options[a.selectedIndex].value}else{if(a.length){for(var b=0;b<a.length;b++){if(a[b].checked){c=a[b].value}}}else{if(a.type=="radio"){if(a.checked){c=a.value}}else{if(a.type=="checkbox"){if(a.checked){c=a.value}}else{c=a.value}}}}return c}function setInputValue(b,a){if(b.options){for(var c=0;c<b.options.length;c++){if(b.options[c].value==a){b.selectedIndex=c;break}}}else{if(b.length){for(var c=0;c<b.length;c++){b[c].checked=false;if(b[c].value==a){b[c].checked=true}}}else{if(b.type=="radio"){if(b.value==a){b.checked=true}}else{if(b.type=="checkbox"){b.checked=false;if(b.value==a){b.checked=true}}else{b.value=a}}}}}function addLoadEvent(b){var a=window.onload;if(typeof window.onload!="function"){window.onload=b}else{window.onload=function(){a();b()}}}function left(b,a){if(a<=0){return""}else{if(a>String(b).length){return b}else{return String(b).substring(0,a)}}}function right(b,a){if(a<=0){return""}else{if(a>String(b).length){return b}else{var c=String(b).length;return String(b).substring(c,c-a)}}}function removeClass(b,c){var a=new RegExp("(^| )"+c+"( |$)");b.className=b.className.replace(a,"$1");b.className=b.className.replace(/ $/,"")}function hasClass(b,c){var a=new RegExp("(^| )"+c+"( |$)");if(a.test(b.className)){return true}return false}function addClass(b,a){if(!hasClass(b,a)){if(b.className==""){b.className=a}else{b.className+=" "+a}}};var SERVER_CONTROLLER=new Array();SERVER_CONTROLLER[1]="im.aspx?wci=imcontrol&wce=action";SERVER_CONTROLLER[2]="nfupdate.aspx?wci=picformat&wce=preview";SERVER_CONTROLLER[3]="newfriends.aspx?";SERVER_CONTROLLER[4]="speeddating.aspx?wci=speeddatecontrol&wce=action";SERVER_CONTROLLER[5]="member.aspx?wci=editprofile&wce=action";SERVER_CONTROLLER[6]="join.aspx?";SERVER_CONTROLLER[7]="newfriends.aspx?wci=ExecuteRequest";SERVER_CONTROLLER[8]="speeddating.aspx?wci=speeddate&wce=action";SERVER_CONTROLLER[9]="member.aspx?";SERVER_CONTROLLER[10]="im.aspx?";var jsrefreshFunction="executeRequest('action=refresh')";function CanDoExecuteRequest(){if(document.getElementById&&document.childNodes&&document.createElement&&document.getElementsByTagName){return true}else{return false}}function canexecuteRequest(){if(document.getElementById&&document.childNodes&&document.createElement){return true}else{return false}}function executeRequest(a,b){parameters=new String(a).split(",");var e=SERVER_CONTROLLER[b]+"&rnd="+Math.random();for(var f=0;f<parameters.length;f++){if(parameters[f]!=""){e+="&"+parameters[f]}}if(CanDoExecuteRequest()==true){var c=document.getElementsByTagName("head").item(0);var d=document.getElementById("lastLoadedCmds");if(d){c.removeChild(d)}script=document.createElement("script");script.src=e+"&execreq=Y";script.type="text/javascript";script.defer=true;script.id="lastLoadedCmds";void (c.appendChild(script))}else{window.top.location.href=e}}function update(frame,id,html,bApp){var bAppend=false;if(bApp){bAppend=true}var doc=eval(frame+".document");if(doc.layers){alert("here1");var l=doc[id];alert("here2");l.document.open();l.document.write(html);l.document.close()}else{if(doc.all&&doc.all[id]){if(bAppend){doc.all[id].innerHTML+=html}else{doc.all[id].innerHTML=html}}else{if(doc.createRange){var l=doc.getElementById(id);var r=doc.createRange();if(!bAppend){while(l.hasChildNodes()){l.removeChild(l.lastChild)}r.setStartAfter(l)}try{var docFrag=r.createContextualFragment(html);l.appendChild(docFrag)}catch(e){if(bAppend){l.innerHTML+=(html)}else{l.innerHTML=(html)}}}}}}function updatevar(frame,id,v){eval(frame+".doswitch('"+v+"')");return;var ovar=eval(frame+"."+id);alert(ovar+" - "+v);ovar=v;alert(ovar+" = "+v)}function updateLastMessage(a){update("top.fmeimmain","lastmessage",a)}function updateOptions(b,a){update("top.fmeimmain",b,a)}function updateIcon(b,a){update("self",b,a)}function updateControl(b,a){update("parent.fmecontrolmain",b,a)}function updateMessages(b,a){update("top.fmeimmain.messageiframe","messages",b,a)}function updateSpeedDateMessages(b,a){update("top.fmecontrolmain.messageiframe",b,a);upda}function updatePrivateMessages(b,a){update("parent.messages",b,a)}function updateInvites(b,a){update("parent.messages",b,a)}function updateUsers(b,a){update("parent.users",b,a);onUsersChanged(undefined)}function updateRooms(b,a){update("parent.rooms",b,a)}function updateInviteList(b,a){update("parent.messages",b,a)}function updateRoomsPrivate(b,a){update("parent.roomsprivate",b,a)}function updatelobbymembers(b,a){update("self",b,a)}function onUsersChanged(a){if(typeof a=="undefined"){return}if((typeof parent.message!="undefined")&&(typeof parent.message.onUsersChanged!="undefined")){parent.message.onUsersChanged(a)}}function focusMessageArea(){if((typeof parent.message!="undefined")&&(typeof parent.message.frmControl!="undefined")&&(typeof parent.message.frmControl.message!="undefined")){parent.message.focus();parent.message.frmControl.message.focus()}}function scrollToBottom(a,e){var b=top.fmeimmain.messageiframe.document;var d=top.fmeimmain.messageiframe;var c=b.height?b.height:b.body.scrollHeight;d.scrollTo(0,((e=="true")?c:0))}function updateLastMessageKey(a){LastMsgKey=a;return}function setMessageFocus(){var a=top.fmeimmain.frmControl.document.getElementById("messagebox");if(a){a.focus()}};var bupdatedlookingfor=false;function updatelookingforpostcode(){if(!bupdatedlookingfor){document.userform.lookingfor_post_code.value=document.userform.area_code.value;checkpostcode()}else{document.userform.lookingfor_post_code.value=document.userform.area_code.value}}function manualupdatelookingforpostcode(){bupdatedlookingfor=true}function alertPostCode(a){if(document.userform.area_code.className.indexOf("quickregerr")<0){document.userform.area_code.className="quickregerr"}if(document.userform.area_code.value.indexOf("is not a valid post code")<0){document.userform.area_code.maxLength="100";document.userform.area_code.value=a+" is not a valid post code."}document.userform.area_code.maxLength="4";var b=document.getElementsByTagName("label");for(j=0;j<b.length;j++){forval=b[j].getAttribute("for")?b[j].getAttribute("for"):b[j].getAttribute("htmlFor");if(forval=="area_code"){labelword=b[j].childNodes[0].nodeValue;b[j].className="labelerr";break}}}function CheckTownLocationRefresh(b){var a=document.userform.area_code.value;var c=document.userform.country_key.value;if(b.value=="refresh"){refreshcodes(a,a,c,bupdatedlookingfor)}}function checkpostcode(){var b=document.userform.area_code_hidden.value;var c=document.userform.area_code.value;var a=document.userform.country_key.value;if(c!=b&&c!=""){refreshcodes(c,b,a,bupdatedlookingfor);updatehiddenpostcode(c)}}function refreshcodes(c,b,a,d){if(canexecuteRequest()){executeRequest("wce=RegPostCodeSwap,area_code="+c+",old_code="+b+",country_key="+a+",bUlf="+d,7)}else{swappostcode()}}function updatehiddenpostcode(a){document.userform.area_code_hidden.value=a}function displayregions(obj,prefix){var countrycode=eval(document.userform[obj].value);var lay_183=document.getElementById(prefix+"_183");var lay_125=document.getElementById(prefix+"_125");var lay_160=document.getElementById(prefix+"_160");switch(countrycode){case 183:layerdisplayon(lay_183);layerdisplayoff(lay_125);layerdisplayoff(lay_160);break;case 125:layerdisplayoff(lay_183);layerdisplayon(lay_125);layerdisplayoff(lay_160);break;case 160:layerdisplayoff(lay_183);layerdisplayoff(lay_125);layerdisplayon(lay_160);break;default:layerdisplayoff(lay_183);layerdisplayoff(lay_125);layerdisplayoff(lay_160)}return}function gocountry(){var b=document.country;var a=b.countryselect.value;alert(a);alert(b);if(a=="UK"){alert("please select a country")}else{b.submit()}}function switchcountries(){var countrycode=eval(document.userform.country.value);switch(countrycode){case 183:subregionon(1,183);subregionon(2,183);subregionoff(1,125);subregionoff(2,125);subregionoff(1,160);subregionoff(2,160);break;case 125:subregionoff(1,183);subregionoff(2,183);subregionon(1,125);subregionon(2,125);subregionoff(1,160);subregionoff(2,160);break;case 160:subregionoff(1,183);subregionoff(2,183);subregionoff(1,125);subregionoff(2,125);subregionon(1,160);subregionon(2,160);break;default:subregionoff(1,183);subregionoff(2,183);subregionoff(1,125);subregionoff(2,125);subregionoff(1,160);subregionoff(2,160);break}return}function switchcountrieslooking(){var countrycode=eval(document.userform.lookingfor_country.value);switch(countrycode){case 183:subregionon(3,183);subregionoff(3,125);subregionoff(3,160);break;case 125:subregionoff(3,183);subregionon(3,125);subregionoff(3,160);break;case 160:subregionoff(3,183);subregionoff(3,125);subregionon(3,160);break;default:subregionoff(3,183);subregionoff(3,125);subregionoff(3,160);break}return}function subregionon(b,a){layerdisplayon(document.getElementById("region"+b+"_"+a))}function subregionoff(b,a){layerdisplayoff(document.getElementById("region"+b+"_"+a))}function regstage2swapcountry(b,a){var c=parseInt(b.value);switch(c){case 183:elementdisplayon("trpostcode1_holder");document.getElementById("trpostcode1_holder").style.display="block";elementdisplayoff("trregion");elementdisplayon("trtownlocation_holder");document.getElementById("trtownlocation_holder").style.display="block";elementdisplayoff("trtown");UpdateInnerHTML("pcexample","First part only (e.g. LA1, CR8) to protect your privacy");addClass(document.getElementById("town_location_key"),"required");addClass(document.getElementById("area_code"),"required");removeClass(document.getElementById("county_key"),"required");removeClass(document.getElementById("town"),"required");break;case 9:elementdisplayon("trpostcode1_holder");document.getElementById("trpostcode1_holder").style.display="block";elementdisplayoff("trregion");elementdisplayon("trtownlocation_holder");document.getElementById("trtownlocation_holder").style.display="block";elementdisplayoff("trtown");UpdateInnerHTML("pcexample","e.g. 3052, 6151");addClass(document.getElementById("town_location_key"),"required");addClass(document.getElementById("area_code"),"required");removeClass(document.getElementById("county_key"),"required");removeClass(document.getElementById("town"),"required");break;case 125:elementdisplayoff("trpostcode1_holder");elementdisplayon("trregion");document.getElementById("trregion").style.display="block";elementdisplayoff("trtownlocation_holder");elementdisplayon("trtown");document.getElementById("trtown").style.display="block";removeClass(document.getElementById("town_location_key"),"required");removeClass(document.getElementById("area_code"),"required");addClass(document.getElementById("county_key"),"required");addClass(document.getElementById("town"),"required");if(a){executeRequest("wci=register,wce=fillregions,country_key="+c,6)}break;default:elementdisplayoff("trpostcode1_holder");elementdisplayoff("trregion");elementdisplayoff("trtownlocation_holder");elementdisplayon("trtown");document.getElementById("trtown").style.display="block";removeClass(document.getElementById("town_location_key"),"required");removeClass(document.getElementById("area_code"),"required");removeClass(document.getElementById("county_key"),"required");addClass(document.getElementById("town"),"required");break}}function regstage2swapcountrylookingfor(b,a){var c=parseInt(b.value);switch(c){case 183:elementdisplayon("trlookingfordistance_holder");document.getElementById("trlookingfordistance_holder").style.display="block";elementdisplayoff("trlookingforregion");UpdateInnerHTML("pcexample_looking","first part of my postcode e.g. KT3");UpdateInnerHTML("distancelabel_looking","miles of ");break;case 9:elementdisplayon("trlookingfordistance_holder");document.getElementById("trlookingfordistance_holder").style.display="block";elementdisplayoff("trlookingforregion");UpdateInnerHTML("pcexample_looking","my postcode e.g. 3052, 6151");UpdateInnerHTML("distancelabel_looking","kms of ");break;case 125:elementdisplayoff("trlookingfordistance_holder");elementdisplayon("trlookingforregion");document.getElementById("trlookingforregion").style.display="block";if(a){executeRequest("wci=register,wce=fillregionslookingfor,lookingfor_country="+c,6)}break;default:elementdisplayoff("trlookingfordistance_holder");elementdisplayoff("trlookingforregion");break}}function searchresultscountryswitch(b,a){var c=parseInt(b.value);switch(c){case 183:elementdisplayon("areacode");elementdisplayoff("countydiv");UpdateInnerHTML("pcexample_looking","your postcode eg W3, SE10, TN8");UpdateInnerHTML("distancelabel_looking","miles");break;case 9:elementdisplayon("areacode");elementdisplayoff("countydiv");UpdateInnerHTML("pcexample_looking","your postcode eg 2060, 3052, 6151");UpdateInnerHTML("distancelabel_looking","kms");break;case 125:elementdisplayoff("areacode");elementdisplayon("countydiv");if(a){executeRequest("wce=SearchResultsCountrySwap,country_key="+c,7)}break;default:elementdisplayoff("areacode");elementdisplayoff("countydiv");break}}function setCountry(a){if(!a){a=""}try{switch(request("loc").toUpperCase()){case"AU":document.forms[0].action="http://www.friendsreuniteddating.com.au/"+a;if(document.forms[0].lookingfor_country){document.forms[0].lookingfor_country.value=9}if(document.forms[0].country_key){document.forms[0].country_key.value=9}document.getElementById("postcode").style.visibility="visible";document.forms[0].lookingfor_post_code.value="eg. 4352";break;case"NZ":document.forms[0].action="http://www.friendsreuniteddating.co.nz/"+a;if(document.forms[0].lookingfor_country){document.forms[0].lookingfor_country.value=125}if(document.forms[0].country_key){document.forms[0].country_key.value=125}document.getElementById("postcode").style.visibility="hidden";break;default:document.forms[0].action="http://www.friendsreuniteddating.co.uk/"+a;if(document.forms[0].lookingfor_country){document.forms[0].lookingfor_country.value=183}if(document.forms[0].country_key){document.forms[0].country_key.value=183}document.getElementById("postcode").style.visibility="visible";document.forms[0].lookingfor_post_code.value="eg. SW10";break}}catch(b){}}function changeCountry(a,b){if(!b){b=""}try{switch(a){case"183":document.forms[0].action="http://www.friendsreuniteddating.co.uk/"+b;document.getElementById("postcode").style.visibility="visible";document.forms[0].lookingfor_post_code.value="eg. SW10";break;case"125":document.forms[0].action="http://www.friendsreuniteddating.co.nz/"+b;document.getElementById("postcode").style.visibility="hidden";document.forms[0].lookingfor_post_code.value="";break;case"9":document.forms[0].action="http://www.friendsreuniteddating.com.au/"+b;document.getElementById("postcode").style.visibility="visible";document.forms[0].lookingfor_post_code.value="eg. 4352";break;default:document.forms[0].action="http://www.friendsreuniteddating.co.uk/"+b;document.getElementById("postcode").style.visibility="hidden";document.forms[0].lookingfor_post_code.value="";break}}catch(c){}};function invite(f,c,e,b,g,d,a){this.conversationKey=f;this.invite=document.getElementById(c);this.accept=document.getElementById(e);this.decline=document.getElementById(b);this.wait=document.getElementById(g);this.answer=document.getElementById(d);this.accept.onclick=this.acceptOffer.bind(this);this.decline.onclick=this.declineOffer.bind(this);this.trigger=null;this.alertPollTime=a}invite.prototype.declineOffer=function(a,c){var b=new updater;b.sendARequest("AjaxRequest.aspx?wci=declineInvitation&ConversationKey="+this.conversationKey);layeroff(this.invite)};invite.prototype.acceptOffer=function(a,c){layeroff(this.invite);layeron(this.wait);var b=new updater;b.sendARequest("AjaxRequest.aspx?wci=AcceptInvitation&ConversationKey="+this.conversationKey);this.startRequesting()};invite.prototype.startRequesting=function(){try{var a=new updater;a.sendARequest("AjaxRequest.aspx?wci=PaymentAccepted&ConversationKey="+this.conversationKey,this.paymentListener.bind(this))}catch(b){}};invite.prototype.paymentListener=function(req){if(req){try{var r=eval("("+req.responseText+")");if(r.chattingStatus=="1"){top.location.href="friendsmessenger.aspx?wci=friendsmessenger&wce=enterConversation&ConversationKey="+this.conversationKey;return}if(r.chattingToStatus=="7"){layeroff(this.invite);layeroff(this.wait);layeron(this.answer)}}catch(err){}}var timer=setTimeout(this.startRequesting.bind(this),this.alertPollTime)};function alertItem(a,c,b){this.name=a;this.id=c;this.parent=b;this.container=null}alertItem.prototype.createAlert=function(){this.container=document.createElement("h1");this.parent.div.appendChild(this.container);this.container.innerHTML='<img src="../WCContent/image/icons/chat30x25.png" class="middle" /> Instant message alert: <b>'+this.name+"</b> has sent you a message";var c=document.createElement("a");c.classname="linkAlert";c.href="friendsmessenger.aspx?wci=friendsmessenger&wce=enterConversation&ConversationKey="+this.id;c.innerHTML="Accept chat";c.className="accept";this.parent.div.appendChild(c);var b=document.createElement("a");b.classname="decline";b.onclick=this.dismissAlert.bind(this);b.innerHTML="Decline chat";b.href="";this.parent.div.appendChild(b)};alertItem.prototype.dismissAlert=function(){var a=new updater;a.sendARequest("AjaxRequest.aspx?wci=DismissAlert&conversationkey="+this.id);this.container.parentNode.removeChild(this.container);if(this.parent.div.innerHTML==""){this.parent.clearAlert()}};function alerter(b,a,c){this.div=document.getElementById(b);this.path=a;this.alertPollTime=c;this.stop=false}alerter.prototype.addMessageAlert=function(a,d){try{var b=new alertItem(a,d,this);b.createAlert()}catch(c){}};alerter.prototype.clearAlert=function(a){this.div.style.visibility="hidden";this.div.style.display="none";this.div.innerHTML=""};alerter.prototype.stopAlerting=function(){this.clearAlert();var a=new updater;a.sendARequest("AjaxRequest.aspx?wci=stopAlerting");this.stop=true};alerter.prototype.startAlerting=function(){this.stop=false;var a=new updater;a.sendARequest("AjaxRequest.aspx?wci=startAlerting");this.alertListener()};alerter.prototype.startRequesting=function(){try{var a=new updater;this.alertListener.bind(new nullObject());a.sendARequest(this.path,this.alertListener.bind(this))}catch(b){}};alerter.prototype.alertListener=function(req){if(!this.stop){if(req){this.clearAlert();try{var r=eval("("+req.responseText+")");for(j=0;j<r.messages.length;j++){if(this.div.style.visibility){this.div.style.visibility="visible"}this.div.style.display="block";this.addMessageAlert(r.messages[j].name,r.messages[j].conversationkey)}}catch(err){}}this.startRequesting.bind(new nullObject());var timer=setTimeout(this.startRequesting.bind(this),this.alertPollTime)}};(function(){function a(b){var c=[];for(var d=0;d<b.length;d++){c.push(b[d])}return c}Function.prototype.bind=function(c){var b=this;var d=a(arguments).slice(1);return function(f){if(f==nullObject){b=null;d=null}else{if(b==null){throw"Attempt to invoke destructed method reference."}else{var e=a(arguments);return b.apply(c,d.concat(e))}}}};Function.prototype.bindEventListener=function(c){var b=this;var d=a(arguments).slice(1);return function(e){return b.apply(c,e||window.event,d)}}})();function nullObject(){}function updater(){this.xmlhttp=createXMLHTTPObject()}updater.prototype.sendARequest=function(c,e,d){var b=createXMLHTTPObject();if(!b){return}var a="";if(d){a="POST"}else{a="GET";c+="&"+Math.random(10)}b.open(a,c,true);b.setRequestHeader("User-Agent","XMLHTTP/1.0");if(d){b.setRequestHeader("Content-type","application/x-www-form-urlencoded")}b.onreadystatechange=function(){if(b.readyState!=4){return}if(b.status!=200&&b.status!=304){return}if(e){e(b)}};if(b.readyState==4){return}b.send(d)};var XMLHttpFactories=[function(){return new XMLHttpRequest()},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Msxml3.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}];function createXMLHTTPObject(){var c=false;for(var b=0;b<XMLHttpFactories.length;b++){try{c=XMLHttpFactories[b]()}catch(a){continue}break}return c};var resetTarget;var resetCheck;function dropNav(b){this.oTarget=b;this.aHeadLinks=new Array();this.aDrops=new Array();var c=b.getElementsByTagName("li");for(i=0;i<c.length;i++){if(c[i].id){var a=new list(c[i]);a.oParent=this;this.aDrops.push(a)}}}dropNav.prototype.clearDrops=function(){for(i=0;i<this.aDrops.length;i++){if(this.aDrops[i].oList){this.aDrops[i].oTarget.className="";this.aDrops[i].bClicked=false;this.aDrops[i].shieldDown()}}};dropNav.prototype.clearHighLights=function(a){for(i=0;i<this.aDrops.length;i++){if(this.aDrops[i].oTarget.className!="navSelected"&&this.aDrops[i].oTarget!=a){this.aDrops[i].oTarget.className=""}}};function list(a){this.oParent;this.oTarget=a;this.active=false;this.bClicked=false;this.oLink=this.oTarget.getElementsByTagName("a")[0];if(this.oLink.innerHTML.toLowerCase().indexOf("0")>=0){this.oLink.innerHTML="My mail"}this.oList=this.oTarget.getElementsByTagName("div")[0];if(this.oList){this.oLink.className="DDMenu";this.listLinks=this.oList.getElementsByTagName("li");this.setListLinks();this.oLink.onclick=this.killLink.bind(this);this.oTarget.onclick=this.turnOn.bind(this)}else{this.oTarget.onclick=this.followLink.bind(this)}this.oTarget.onmouseover=this.highLight.bind(this);this.oTarget.onmouseout=this.clearHighlights.bind(this)}list.prototype.killLink=function(){return false};list.prototype.followLink=function(){document.location.href=this.oLink.href;return false};list.prototype.turnOn=function(){if(this.bClicked){this.oParent.clearDrops();this.oParent.clearHighLights()}else{this.startResetCheck();this.oParent.clearDrops();this.oTarget.className="navSelected";this.shieldUp(this.oList.offsetHeight,this.oList.offsetWidth);this.bClicked=true}return false};list.prototype.highLight=function(){this.startResetCheck();this.active=true;this.oParent.clearHighLights();if(this.oTarget.className!="navSelected"){this.oTarget.className="highLighted"}};list.prototype.clearHighlights=function(){this.active=false;this.oParent.clearHighLights(this.oTarget)};list.prototype.setListLinks=function(){for(l=0;l<this.listLinks.length;l++){this.listLinks[l].oParent=this;this.listLinks[l].shref=this.listLinks[l].getElementsByTagName("a")[0].href;this.listLinks[l].onmouseover=function(){this.oParent.active=true;this.className="navListSelected"};this.listLinks[l].onmouseout=function(){this.oParent.active=false;this.className=""};this.listLinks[l].onclick=function(){document.location.href=this.shref;return false}}};list.prototype.shieldUp=function(a,b){if(!this.Shield){this.Shield=document.createElement("iframe");this.oTarget.appendChild(this.Shield);this.Shield.style.height=(a)+"px";this.Shield.style.width=b+"px";this.Shield.style.zIndex=-10}this.Shield.style.visibility="visible";this.Shield.style.display="block"};list.prototype.shieldDown=function(){if(this.Shield){this.Shield.style.visibility="hidden";this.Shield.style.display="none"}};list.prototype.startResetCheck=function(){resetTarget=this;if(resetCheck){clearTimeout(resetCheck)}resetCheck=setTimeout(resetChecker,1000)};function resetChecker(){if(!resetTarget.active){resetTarget.oParent.clearDrops();resetTarget.oParent.clearHighLights()}}window.document.onclick=function(){if(resetTarget){resetChecker()}};function errorWarning(){this.container=jQuery("#sitemessage");this.cookie=document.cookie}errorWarning.prototype.setMessages=function(){var b=this.cookie.split("; ");for(i=0;i<b.length;i++){var a=unescape(b[i]);if(a.substring(0,12)=="sitemessage="){var c=a.substring(12);this.splitSubItems(this.container,c);this.clearCookie("sitemessage")}}};errorWarning.prototype.splitSubItems=function(a,g){var h=g.split("&");var b=jQuery(a).find(".alertInner");for(j=0;j<h.length;j++){var d=h[j];if((d.indexOf("=")>0)&&(d.indexOf("Type")!=0)){var f=d.substring(d.indexOf("=")+1);if(b.innerHTML!=null){this.appendMessages(b,f)}else{var e;switch(h[j+1].substring(d.indexOf("=")+4)){case"0":e="warning";break;case"1":e="error";break;case"2":e="information";break}var c=document.createElement("div");c.innerHTML=f.split("+").join(" ");jQuery("#sitemessage").removeClass().addClass(e).show();jQuery(b).html(c)}}}};errorWarning.prototype.appendMessages=function(a,c){var b=document.createElement("div");b.innerHTML=c.split("+").join(" ");if(a.innerHTML.indexOf(c.split("+").join(" "))==-1){a.appendChild(b)}layeron(a)};errorWarning.prototype.clearCookie=function(a){deleteCookie(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 s=this,w,g=s.jQuery,j=s.$,m=s.jQuery=s.$=function(F,E){return new m.fn.init(F,E)},f=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,z=/^.[^:#\[\.,]*$/;m.fn=m.prototype={init:function(H,G){H=H||document;if(H.nodeType){this[0]=H;this.length=1;this.context=H;return this}if(typeof H==="string"){var E=f.exec(H);if(E&&(E[1]||!G)){if(E[1]){H=m.clean([E[1]],G)}else{var F=document.getElementById(E[3]);if(F&&F.id!=E[3]){return m().find(H)}var I=m(F||[]);I.context=document;I.selector=H;return I}}else{return m(G).find(H)}}else{if(m.isFunction(H)){return m(document).ready(H)}}if(H.selector&&H.context){this.selector=H.selector;this.context=H.context}return this.setArray(m.isArray(H)?H:m.makeArray(H))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(E){return E===w?Array.prototype.slice.call(this):this[E]},pushStack:function(H,E,G){var F=m(H);F.prevObject=this;F.context=this.context;if(E==="find"){F.selector=this.selector+(this.selector?" ":"")+G}else{if(E){F.selector=this.selector+"."+E+"("+G+")"}}return F},setArray:function(E){this.length=0;Array.prototype.push.apply(this,E);return this},each:function(F,E){return m.each(this,F,E)},index:function(E){return m.inArray(E&&E.jquery?E[0]:E,this)},attr:function(E,H,F){var G=E;if(typeof E==="string"){if(H===w){return this[0]&&m[F||"attr"](this[0],E)}else{G={};G[E]=H}}return this.each(function(I){for(E in G){m.attr(F?this.style:this,E,m.prop(this,G[E],F,I,E))}})},css:function(F,E){if((F=="width"||F=="height")&&parseFloat(E)<0){E=w}return this.attr(F,E,"curCSS")},text:function(F){if(typeof F!=="object"&&F!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(F))}var E="";m.each(F||this,function(){m.each(this.childNodes,function(){if(this.nodeType!=8){E+=this.nodeType!=1?this.nodeValue:m.fn.text([this])}})});return E},wrapAll:function(E){if(this[0]){var F=m(E,this[0].ownerDocument).clone();if(this[0].parentNode){F.insertBefore(this[0])}F.map(function(){var G=this;while(G.firstChild){G=G.firstChild}return G}).append(this)}return this},wrapInner:function(E){return this.each(function(){m(this).contents().wrapAll(E)})},wrap:function(E){return this.each(function(){m(this).wrapAll(E)})},append:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.appendChild(E)}})},prepend:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.insertBefore(E,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this)})},after:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this.nextSibling)})},end:function(){return this.prevObject||m([])},push:[].push,sort:[].sort,splice:[].splice,find:function(E){if(this.length===1){var F=this.pushStack([],"find",E);F.length=0;m.find(E,this[0],F);return F}else{return this.pushStack(m.unique(m.map(this,function(G){return m.find(E,G)})),"find",E)}},clone:function(F){var H=this.map(function(){if(!m.support.noCloneEvent&&!m.isXMLDoc(this)){var J=this.outerHTML;if(!J){var I=this.ownerDocument.createElement("div");I.appendChild(this.cloneNode(true));J=I.innerHTML}return m.clean([J.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]}else{return this.cloneNode(true)}});if(F===true){var E=this.find("*").andSelf(),G=0;H.find("*").andSelf().each(function(){if(this.nodeName!==E[G].nodeName){return}var J=m.data(E[G],"events");for(var K in J){for(var I in J[K]){m.event.add(this,K,J[K][I],J[K][I].data)}}G++})}return H},filter:function(E){return this.pushStack(m.isFunction(E)&&m.grep(this,function(F,G){return E.call(F,G)})||m.multiFilter(E,m.grep(this,function(F){return F.nodeType===1})),"filter",E)},closest:function(F){var E=m.expr.match.POS.test(F)?m(F):null,G=0;return this.map(function(){var H=this;while(H&&H.ownerDocument){if(E?E.index(H)>-1:m(H).is(F)){m.data(H,"closest",G);return H}H=H.parentNode;G++}})},not:function(F){if(typeof F==="string"){if(z.test(F)){return this.pushStack(m.multiFilter(F,this,true),"not",F)}else{F=m.multiFilter(F,this)}}var E=F.length&&F[F.length-1]!==w&&!F.nodeType;return this.filter(function(){return E?m.inArray(this,F)<0:this!=F})},add:function(E){return this.pushStack(m.unique(m.merge(this.get(),typeof E==="string"?m(E):m.makeArray(E))))},is:function(E){return !!E&&m.multiFilter(E,this).length>0},hasClass:function(E){return !!E&&this.is("."+E)},val:function(F){if(F===w){var L=this[0];if(L){if(m.nodeName(L,"option")){return(L.attributes.value||{}).specified?L.value:L.text}if(m.nodeName(L,"select")){var G=L.selectedIndex,H=[],E=L.options,K=L.type=="select-one";if(G<0){return null}for(var J=K?G:0,M=K?G+1:E.length;J<M;J++){var I=E[J];if(I.selected){F=m(I).val();if(K){return F}H.push(F)}}return H}return(L.value||"").replace(/\r/g,"")}return w}if(typeof F==="number"){F+=""}return this.each(function(){if(this.nodeType!=1){return}if(m.isArray(F)&&/radio|checkbox/.test(this.type)){this.checked=(m.inArray(this.value,F)>=0||m.inArray(this.name,F)>=0)}else{if(m.nodeName(this,"select")){var N=m.makeArray(F);m("option",this).each(function(){this.selected=(m.inArray(this.value,N)>=0||m.inArray(this.text,N)>=0)});if(!N.length){this.selectedIndex=-1}}else{this.value=F}}})},html:function(E){return E===w?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(E)},replaceWith:function(E){return this.after(E).remove()},eq:function(E){return this.slice(E,+E+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(E){return this.pushStack(m.map(this,function(F,G){return E.call(F,G,F)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(J,L,M){if(this[0]){var G=(this[0].ownerDocument||this[0]).createDocumentFragment(),I=m.clean(J,(this[0].ownerDocument||this[0]),G),K=G.firstChild;if(K){for(var E=0,H=this.length;E<H;E++){M.call(F(this[E],K),this.length>1||E>0?G.cloneNode(true):G)}}if(I){m.each(I,e)}}return this;function F(N,O){return L&&m.nodeName(N,"table")&&m.nodeName(O,"tr")?(N.getElementsByTagName("tbody")[0]||N.appendChild(N.ownerDocument.createElement("tbody"))):N}}};m.fn.init.prototype=m.fn;function e(F,E){if(E.src){m.ajax({url:E.src,async:false,dataType:"script"})}else{m.globalEval(E.text||E.textContent||E.innerHTML||"")}if(E.parentNode){E.parentNode.removeChild(E)}}function a(){return +new Date}m.extend=m.fn.extend=function(){var K=arguments[0]||{},I=1,J=arguments.length,G=false,E;if(typeof K==="boolean"){G=K;K=arguments[1]||{};I=2}if(typeof K!=="object"&&!m.isFunction(K)){K={}}if(J==I){K=this;--I}for(;I<J;I++){if((E=arguments[I])!=null){for(var F in E){var L=K[F],H=E[F];if(K===H){continue}if(G&&H&&typeof H==="object"&&!H.nodeType){K[F]=m.extend(G,L||(H.length!=null?[]:{}),H)}else{if(H!==w){K[F]=H}}}}}return K};var t=/z-?index|font-?weight|opacity|zoom|line-?height/i,A=document.defaultView||{},h=Object.prototype.toString;m.extend({noConflict:function(E){s.$=j;if(E){s.jQuery=g}return m},isFunction:function(E){return h.call(E)==="[object Function]"},isArray:function(E){return h.call(E)==="[object Array]"},isXMLDoc:function(E){return E.nodeType===9&&E.documentElement.nodeName!=="HTML"||!!E.ownerDocument&&m.isXMLDoc(E.ownerDocument)},globalEval:function(G){if(G&&/\S/.test(G)){var E=document.getElementsByTagName("head")[0]||document.documentElement,F=document.createElement("script");F.type="text/javascript";if(m.support.scriptEval){F.appendChild(document.createTextNode(G))}else{F.text=G}E.insertBefore(F,E.firstChild);E.removeChild(F)}},nodeName:function(F,E){return F.nodeName&&F.nodeName.toUpperCase()==E.toUpperCase()},each:function(G,K,F){var E,H=0,J=G.length;if(F){if(J===w){for(E in G){if(K.apply(G[E],F)===false){break}}}else{for(;H<J;){if(K.apply(G[H++],F)===false){break}}}}else{if(J===w){for(E in G){if(K.call(G[E],E,G[E])===false){break}}}else{for(var I=G[0];H<J&&K.call(I,H,I)!==false;I=G[++H]){}}}return G},prop:function(G,E,H,I,F){if(m.isFunction(E)){E=E.call(G,I)}return typeof E==="number"&&H=="curCSS"&&!t.test(F)?E+"px":E},className:{add:function(E,F){m.each((F||"").split(/\s+/),function(H,G){if(E.nodeType==1&&!m.className.has(E.className,G)){E.className+=(E.className?" ":"")+G}})},remove:function(E,F){if(E.nodeType==1){E.className=F!==w?m.grep(E.className.split(/\s+/),function(G){return !m.className.has(F,G)}).join(" "):""}},has:function(E,F){return E&&m.inArray(F,(E.className||E).toString().split(/\s+/))>-1}},swap:function(G,H,I){var E={};for(var F in H){E[F]=G.style[F];G.style[F]=H[F]}I.call(G);for(var F in H){G.style[F]=E[F]}},css:function(J,I,L,K){if(I=="width"||I=="height"){var H,G={position:"absolute",visibility:"hidden",display:"block"},F=I=="width"?["Left","Right"]:["Top","Bottom"];function E(){H=I=="width"?J.offsetWidth:J.offsetHeight;if(K==="border"){return}m.each(F,function(){if(!K){H-=parseFloat(m.curCSS(J,"padding"+this,true))||0}if(K==="margin"){H+=parseFloat(m.curCSS(J,"margin"+this,true))||0}else{H-=parseFloat(m.curCSS(J,"border"+this+"Width",true))||0}})}if(J.offsetWidth!==0){E()}else{m.swap(J,G,E)}return Math.max(0,Math.round(H))}return m.curCSS(J,I,L)},curCSS:function(K,G,M){var E,L=K.style;if(G=="opacity"&&!m.support.opacity){E=m.attr(L,"opacity");return E==""?"1":E}if(G.match(/float/i)){G=y}if(!M&&L&&L[G]){E=L[G]}else{if(A.getComputedStyle){if(G.match(/float/i)){G="float"}G=G.replace(/([A-Z])/g,"-$1").toLowerCase();var J=A.getComputedStyle(K,null);if(J){E=J.getPropertyValue(G)}if(G=="opacity"&&E==""){E="1"}}else{if(K.currentStyle){var H=G.replace(/\-(\w)/g,function(O,N){return N.toUpperCase()});E=K.currentStyle[G]||K.currentStyle[H];if(!/^\d+(px)?$/i.test(E)&&/^\d/.test(E)){var F=L.left,I=K.runtimeStyle.left;K.runtimeStyle.left=K.currentStyle.left;L.left=E||0;E=L.pixelLeft+"px";L.left=F;K.runtimeStyle.left=I}}}}return E},clean:function(I,K,F){K=K||document;if(typeof K.createElement==="undefined"){K=K.ownerDocument||K[0]&&K[0].ownerDocument||document}if(!F&&I.length===1&&typeof I[0]==="string"){var J=/^<(\w+)\s*\/?>$/.exec(I[0]);if(J){return[K.createElement(J[1])]}}var G=[],L=[],H=K.createElement("div");m.each(I,function(Q,N){if(typeof N==="number"){N+=""}if(!N){return}if(typeof N==="string"){N=N.replace(/(<(\w+)[^>]*?)\/>/g,function(U,V,T){return T.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?U:V+"></"+T+">"});var M=N.replace(/^\s+/,"").substring(0,10).toLowerCase();var S=!M.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!M.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||M.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!M.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!M.indexOf("<td")||!M.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!M.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!m.support.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];H.innerHTML=S[1]+N+S[2];while(S[0]--){H=H.lastChild}if(!m.support.tbody){var P=/<tbody/i.test(N),O=!M.indexOf("<table")&&!P?H.firstChild&&H.firstChild.childNodes:S[1]=="<table>"&&!P?H.childNodes:[];for(var R=O.length-1;R>=0;--R){if(m.nodeName(O[R],"tbody")&&!O[R].childNodes.length){O[R].parentNode.removeChild(O[R])}}}if(!m.support.leadingWhitespace&&/^\s/.test(N)){H.insertBefore(K.createTextNode(N.match(/^\s*/)[0]),H.firstChild)}N=m.makeArray(H.childNodes)}if(N.nodeType){G.push(N)}else{G=m.merge(G,N)}});if(F){for(var E=0;G[E];E++){if(m.nodeName(G[E],"script")&&(!G[E].type||G[E].type.toLowerCase()==="text/javascript")){L.push(G[E].parentNode?G[E].parentNode.removeChild(G[E]):G[E])}else{if(G[E].nodeType===1){G.splice.apply(G,[E+1,0].concat(m.makeArray(G[E].getElementsByTagName("script"))))}F.appendChild(G[E])}}return L}return G},attr:function(I,E,G){if(!I||I.nodeType==3||I.nodeType==8){return w}var L=!m.isXMLDoc(I),F=G!==w;E=L&&m.props[E]||E;if(I.tagName){var K=/href|src|style/.test(E);if(E=="selected"&&I.parentNode){I.parentNode.selectedIndex}if(E in I&&L&&!K){if(F){if(E=="type"&&m.nodeName(I,"input")&&I.parentNode){throw"type property can't be changed"}I[E]=G}if(m.nodeName(I,"form")&&I.getAttributeNode(E)){return I.getAttributeNode(E).nodeValue}if(E=="tabIndex"){var J=I.getAttributeNode("tabIndex");return J&&J.specified?J.value:I.nodeName.match(/(button|input|object|select|textarea)/i)?0:I.nodeName.match(/^(a|area)$/i)&&I.href?0:w}return I[E]}if(!m.support.style&&L&&E=="style"){return m.attr(I.style,"cssText",G)}if(F){I.setAttribute(E,""+G)}var H=!m.support.hrefNormalized&&L&&K?I.getAttribute(E,2):I.getAttribute(E);return H===null?w:H}if(!m.support.opacity&&E=="opacity"){if(F){I.zoom=1;I.filter=(I.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(G)+""=="NaN"?"":"alpha(opacity="+G*100+")")}return I.filter&&I.filter.indexOf("opacity=")>=0?(parseFloat(I.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}E=E.replace(/-([a-z])/ig,function(N,M){return M.toUpperCase()});if(F){I[E]=G}return I[E]},trim:function(E){return(E||"").replace(/^\s+|\s+$/g,"")},makeArray:function(F){var G=[];if(F!=null){var E=F.length;if(E==null||typeof F==="string"||m.isFunction(F)||F.setInterval){G[0]=F}else{while(E){G[--E]=F[E]}}}return G},inArray:function(F,H){for(var G=0,E=H.length;G<E;G++){if(H[G]===F){return G}}return -1},merge:function(F,G){var I=0,E,H=F.length;if(!m.support.getAll){while((E=G[I++])!=null){if(E.nodeType!=8){F[H++]=E}}}else{while((E=G[I++])!=null){F[H++]=E}}return F},unique:function(J){var K=[],E={};try{for(var H=0,G=J.length;H<G;H++){var I=m.data(J[H]);if(!E[I]){E[I]=true;K.push(J[H])}}}catch(F){K=J}return K},grep:function(J,E,F){var G=[];for(var H=0,I=J.length;H<I;H++){if(!F!=!E(J[H],H)){G.push(J[H])}}return G},map:function(J,E){var F=[];for(var G=0,I=J.length;G<I;G++){var H=E(J[G],G);if(H!=null){F[F.length]=H}}return F.concat.apply([],F)}});var n=navigator.userAgent.toLowerCase();m.browser={version:(n.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],safari:/webkit/.test(n),opera:/opera/.test(n),msie:/msie/.test(n)&&!/opera/.test(n),mozilla:/mozilla/.test(n)&&!/(compatible|webkit)/.test(n)};m.each({parent:function(E){return E.parentNode},parents:function(E){return m.dir(E,"parentNode")},next:function(E){return m.nth(E,2,"nextSibling")},prev:function(E){return m.nth(E,2,"previousSibling")},nextAll:function(E){return m.dir(E,"nextSibling")},prevAll:function(E){return m.dir(E,"previousSibling")},siblings:function(E){return m.sibling(E.parentNode.firstChild,E)},children:function(E){return m.sibling(E.firstChild)},contents:function(E){return m.nodeName(E,"iframe")?E.contentDocument||E.contentWindow.document:m.makeArray(E.childNodes)}},function(F,E){m.fn[F]=function(G){var H=m.map(this,E);if(G&&typeof G=="string"){H=m.multiFilter(G,H)}return this.pushStack(m.unique(H),F,G)}});m.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(F,E){m.fn[F]=function(I){var L=[],H=m(I);for(var J=0,G=H.length;J<G;J++){var K=(J>0?this.clone(true):this).get();m.fn[E].apply(m(H[J]),K);L=L.concat(K)}return this.pushStack(L,F,I)}});m.each({removeAttr:function(E){m.attr(this,E,"");if(this.nodeType==1){this.removeAttribute(E)}},addClass:function(E){m.className.add(this,E)},removeClass:function(E){m.className.remove(this,E)},toggleClass:function(F,E){if(typeof E!=="boolean"){E=!m.className.has(this,F)}m.className[E?"add":"remove"](this,F)},remove:function(E){if(!E||m.filter(E,[this]).length){m("*",this).add([this]).each(function(){m.event.remove(this);m.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){m(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(F,E){m.fn[F]=function(){return this.each(E,arguments)}});function o(E,F){return E[0]&&parseInt(m.curCSS(E[0],F,true),10)||0}var r="jQuery"+a(),x=0,q={};m.extend({cache:{},data:function(F,E,H){F=F==s?q:F;var G=F[r];if(!G){G=F[r]=++x}if(E&&!m.cache[G]){m.cache[G]={}}if(H!==w){m.cache[G][E]=H}return E?m.cache[G][E]:G},removeData:function(F,E){F=F==s?q:F;var H=F[r];if(E){if(m.cache[H]){delete m.cache[H][E];E="";for(E in m.cache[H]){break}if(!E){m.removeData(F)}}}else{try{delete F[r]}catch(G){if(F.removeAttribute){F.removeAttribute(r)}}delete m.cache[H]}},queue:function(E,F,H){if(E){F=(F||"fx")+"queue";var G=m.data(E,F);if(!G||m.isArray(H)){G=m.data(E,F,m.makeArray(H))}else{if(H){G.push(H)}}}return G},dequeue:function(F,G){var H=m.queue(F,G),E=H.shift();if(!G||G==="fx"){E=H[0]}if(E!==w){E.call(F)}}});m.fn.extend({data:function(F,E){var G=F.split(".");G[1]=G[1]?"."+G[1]:"";if(E===w){var H=this.triggerHandler("getData"+G[1]+"!",[G[0]]);if(H===w&&this.length){H=m.data(this[0],F)}return H===w&&G[1]?this.data(G[0]):H}else{return this.trigger("setData"+G[1]+"!",[G[0],E]).each(function(){m.data(this,F,E)})}},removeData:function(E){return this.each(function(){m.removeData(this,E)})},queue:function(E,F){if(typeof E!=="string"){F=E;E="fx"}if(F===w){return m.queue(this[0],E)}return this.each(function(){var G=m.queue(this,E,F);if(E=="fx"&&G.length==1){G[0].call(this)}})},dequeue:function(E){return this.each(function(){m.dequeue(this,E)})}});
/*
 * 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 H=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,R=0,P=Object.prototype.toString;var O=function(Y,ae,X,ac){X=X||[];ae=ae||document;if(ae.nodeType!==1&&ae.nodeType!==9){return[]}if(!Y||typeof Y!=="string"){return X}var aa=[],ah,V,ai,ag,T,W,Z=true;H.lastIndex=0;while((ah=H.exec(Y))!==null){aa.push(ah[1]);if(ah[2]){W=RegExp.rightContext;break}}if(aa.length>1&&I.exec(Y)){if(aa.length===2&&M.relative[aa[0]]){V=N(aa[0]+aa[1],ae)}else{V=M.relative[aa[0]]?[ae]:O(aa.shift(),ae);while(aa.length){Y=aa.shift();if(M.relative[Y]){Y+=aa.shift()}V=N(Y,V)}}}else{var U=ac?{expr:aa.pop(),set:F(ac)}:O.find(aa.pop(),aa.length===1&&ae.parentNode?ae.parentNode:ae,K(ae));V=O.filter(U.expr,U.set);if(aa.length>0){ai=F(V)}else{Z=false}while(aa.length){var ab=aa.pop(),af=ab;if(!M.relative[ab]){ab=""}else{af=aa.pop()}if(af==null){af=ae}M.relative[ab](ai,af,K(ae))}}if(!ai){ai=V}if(!ai){throw"Syntax error, unrecognized expression: "+(ab||Y)}if(P.call(ai)==="[object Array]"){if(!Z){X.push.apply(X,ai)}else{if(ae.nodeType===1){for(var ad=0;ai[ad]!=null;ad++){if(ai[ad]&&(ai[ad]===true||ai[ad].nodeType===1&&L(ae,ai[ad]))){X.push(V[ad])}}}else{for(var ad=0;ai[ad]!=null;ad++){if(ai[ad]&&ai[ad].nodeType===1){X.push(V[ad])}}}}}else{F(ai,X)}if(W){O(W,ae,X,ac);if(Q){hasDuplicate=false;X.sort(Q);if(hasDuplicate){for(var ad=1;ad<X.length;ad++){if(X[ad]===X[ad-1]){X.splice(ad--,1)}}}}}return X};O.matches=function(U,T){return O(U,null,null,T)};O.find=function(ab,aa,Y){var W,Z;if(!ab){return[]}for(var T=0,V=M.order.length;T<V;T++){var X=M.order[T],Z;if((Z=M.match[X].exec(ab))){var U=RegExp.leftContext;if(U.substr(U.length-1)!=="\\"){Z[1]=(Z[1]||"").replace(/\\/g,"");W=M.find[X](Z,aa,Y);if(W!=null){ab=ab.replace(M.match[X],"");break}}}}if(!W){W=aa.getElementsByTagName("*")}return{set:W,expr:ab}};O.filter=function(W,Y,Z,ag){var aa=W,X=[],ai=Y,af,V,ah=Y&&Y[0]&&K(Y[0]);while(W&&Y.length){for(var U in M.filter){if((af=M.match[U].exec(W))!=null){var ac=M.filter[U],ae,T;V=false;if(ai==X){X=[]}if(M.preFilter[U]){af=M.preFilter[U](af,ai,Z,X,ag,ah);if(!af){V=ae=true}else{if(af===true){continue}}}if(af){for(var ad=0;(T=ai[ad])!=null;ad++){if(T){ae=ac(T,af,ad,ai);var ab=ag^!!ae;if(Z&&ae!=null){if(ab){V=true}else{ai[ad]=false}}else{if(ab){X.push(T);V=true}}}}}if(ae!==w){if(!Z){ai=X}W=W.replace(M.match[U],"");if(!V){return[]}break}}}if(W==aa){if(V==null){throw"Syntax error, unrecognized expression: "+W}else{break}}aa=W}return ai};var M=O.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(T){return T.getAttribute("href")}},relative:{"+":function(ab,W,Z){var X=typeof W==="string",Y=X&&!/\W/.test(W),U=X&&!Y;if(Y&&!Z){W=W.toUpperCase()}for(var T=0,V=ab.length,aa;T<V;T++){if((aa=ab[T])){while((aa=aa.previousSibling)&&aa.nodeType!==1){}ab[T]=U||aa&&aa.nodeName===W?aa||false:aa===W}}if(U){O.filter(W,ab,true)}},">":function(aa,V,X){var W=typeof V==="string";if(W&&!/\W/.test(V)){V=X?V:V.toUpperCase();for(var T=0,U=aa.length;T<U;T++){var Z=aa[T];if(Z){var Y=Z.parentNode;aa[T]=Y.nodeName===V?Y:false}}}else{for(var T=0,U=aa.length;T<U;T++){var Z=aa[T];if(Z){aa[T]=W?Z.parentNode:Z.parentNode===V}}if(W){O.filter(V,aa,true)}}},"":function(V,W,Y){var U=R++,T=E;if(!W.match(/\W/)){var X=W=Y?W:W.toUpperCase();T=S}T("parentNode",W,U,V,X,Y)},"~":function(V,W,Y){var U=R++,T=E;if(typeof W==="string"&&!W.match(/\W/)){var X=W=Y?W:W.toUpperCase();T=S}T("previousSibling",W,U,V,X,Y)}},find:{ID:function(U,W,T){if(typeof W.getElementById!=="undefined"&&!T){var V=W.getElementById(U[1]);return V?[V]:[]}},NAME:function(U,Y,T){if(typeof Y.getElementsByName!=="undefined"){var Z=[],X=Y.getElementsByName(U[1]);for(var W=0,V=X.length;W<V;W++){if(X[W].getAttribute("name")===U[1]){Z.push(X[W])}}return Z.length===0?null:Z}},TAG:function(T,U){return U.getElementsByTagName(T[1])}},preFilter:{CLASS:function(Y,aa,V,U,W,X){Y=" "+Y[1].replace(/\\/g,"")+" ";if(X){return Y}for(var T=0,Z;(Z=aa[T])!=null;T++){if(Z){if(W^(Z.className&&(" "+Z.className+" ").indexOf(Y)>=0)){if(!V){U.push(Z)}}else{if(V){aa[T]=false}}}}return false},ID:function(T){return T[1].replace(/\\/g,"")},TAG:function(T,U){for(var V=0;U[V]===false;V++){}return U[V]&&K(U[V])?T[1]:T[1].toUpperCase()},CHILD:function(T){if(T[1]=="nth"){var U=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(T[2]=="even"&&"2n"||T[2]=="odd"&&"2n+1"||!/\D/.test(T[2])&&"0n+"+T[2]||T[2]);T[2]=(U[1]+(U[2]||1))-0;T[3]=U[3]-0}T[0]=R++;return T},ATTR:function(W,X,Z,V,U,T){var Y=W[1].replace(/\\/g,"");if(!T&&M.attrMap[Y]){W[1]=M.attrMap[Y]}if(W[2]==="~="){W[4]=" "+W[4]+" "}return W},PSEUDO:function(V,W,X,U,T){if(V[1]==="not"){if(V[3].match(H).length>1||/^\w/.test(V[3])){V[3]=O(V[3],null,null,W)}else{var Y=O.filter(V[3],W,X,true^T);if(!X){U.push.apply(U,Y)}return false}}else{if(M.match.POS.test(V[0])||M.match.CHILD.test(V[0])){return true}}return V},POS:function(T){T.unshift(true);return T}},filters:{enabled:function(T){return T.disabled===false&&T.type!=="hidden"},disabled:function(T){return T.disabled===true},checked:function(T){return T.checked===true},selected:function(T){T.parentNode.selectedIndex;return T.selected===true},parent:function(T){return !!T.firstChild},empty:function(T){return !T.firstChild},has:function(U,V,T){return !!O(T[3],U).length},header:function(T){return/h\d/i.test(T.nodeName)},text:function(T){return"text"===T.type},radio:function(T){return"radio"===T.type},checkbox:function(T){return"checkbox"===T.type},file:function(T){return"file"===T.type},password:function(T){return"password"===T.type},submit:function(T){return"submit"===T.type},image:function(T){return"image"===T.type},reset:function(T){return"reset"===T.type},button:function(T){return"button"===T.type||T.nodeName.toUpperCase()==="BUTTON"},input:function(T){return/input|select|textarea|button/i.test(T.nodeName)}},setFilters:{first:function(T,U){return U===0},last:function(U,V,T,W){return V===W.length-1},even:function(T,U){return U%2===0},odd:function(T,U){return U%2===1},lt:function(U,V,T){return V<T[3]-0},gt:function(U,V,T){return V>T[3]-0},nth:function(U,V,T){return T[3]-0==V},eq:function(U,V,T){return T[3]-0==V}},filter:{PSEUDO:function(Z,Y,T,X){var W=Y[1],U=M.filters[W];if(U){return U(Z,T,Y,X)}else{if(W==="contains"){return(Z.textContent||Z.innerText||"").indexOf(Y[3])>=0}else{if(W==="not"){var V=Y[3];for(var T=0,aa=V.length;T<aa;T++){if(V[T]===Z){return false}}return true}}}},CHILD:function(aa,Y){var U=Y[1],T=aa;switch(U){case"only":case"first":while(T=T.previousSibling){if(T.nodeType===1){return false}}if(U=="first"){return true}T=aa;case"last":while(T=T.nextSibling){if(T.nodeType===1){return false}}return true;case"nth":var ac=Y[2],Z=Y[3];if(ac==1&&Z==0){return true}var X=Y[0],W=aa.parentNode;if(W&&(W.sizcache!==X||!aa.nodeIndex)){var ab=0;for(T=W.firstChild;T;T=T.nextSibling){if(T.nodeType===1){T.nodeIndex=++ab}}W.sizcache=X}var V=aa.nodeIndex-Z;if(ac==0){return V==0}else{return(V%ac==0&&V/ac>=0)}}},ID:function(U,T){return U.nodeType===1&&U.getAttribute("id")===T},TAG:function(U,T){return(T==="*"&&U.nodeType===1)||U.nodeName===T},CLASS:function(U,T){return(" "+(U.className||U.getAttribute("class"))+" ").indexOf(T)>-1},ATTR:function(V,T){var Y=T[1],U=M.attrHandle[Y]?M.attrHandle[Y](V):V[Y]!=null?V[Y]:V.getAttribute(Y),Z=U+"",W=T[2],X=T[4];return U==null?W==="!=":W==="="?Z===X:W==="*="?Z.indexOf(X)>=0:W==="~="?(" "+Z+" ").indexOf(X)>=0:!X?Z&&U!==false:W==="!="?Z!=X:W==="^="?Z.indexOf(X)===0:W==="$="?Z.substr(Z.length-X.length)===X:W==="|="?Z===X||Z.substr(0,X.length+1)===X+"-":false},POS:function(V,T,W,Y){var U=T[2],X=M.setFilters[U];if(X){return X(V,W,T,Y)}}}};var I=M.match.POS;for(var J in M.match){M.match[J]=RegExp(M.match[J].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var F=function(U,T){U=Array.prototype.slice.call(U);if(T){T.push.apply(T,U);return T}return U};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(G){F=function(W,V){var X=V||[];if(P.call(W)==="[object Array]"){Array.prototype.push.apply(X,W)}else{if(typeof W.length==="number"){for(var U=0,T=W.length;U<T;U++){X.push(W[U])}}else{for(var U=0;W[U];U++){X.push(W[U])}}}return X}}var Q;if(document.documentElement.compareDocumentPosition){Q=function(T,U){var V=T.compareDocumentPosition(U)&4?-1:T===U?0:1;if(V===0){hasDuplicate=true}return V}}else{if("sourceIndex" in document.documentElement){Q=function(T,U){var V=T.sourceIndex-U.sourceIndex;if(V===0){hasDuplicate=true}return V}}else{if(document.createRange){Q=function(U,V){var W=U.ownerDocument.createRange(),T=V.ownerDocument.createRange();W.selectNode(U);W.collapse(true);T.selectNode(V);T.collapse(true);var X=W.compareBoundaryPoints(Range.START_TO_END,T);if(X===0){hasDuplicate=true}return X}}}}(function(){var U=document.createElement("form"),V="script"+(new Date).getTime();U.innerHTML="<input name='"+V+"'/>";var T=document.documentElement;T.insertBefore(U,T.firstChild);if(!!document.getElementById(V)){M.find.ID=function(X,Z,W){if(typeof Z.getElementById!=="undefined"&&!W){var Y=Z.getElementById(X[1]);return Y?Y.id===X[1]||typeof Y.getAttributeNode!=="undefined"&&Y.getAttributeNode("id").nodeValue===X[1]?[Y]:w:[]}};M.filter.ID=function(X,W){var Y=typeof X.getAttributeNode!=="undefined"&&X.getAttributeNode("id");return X.nodeType===1&&Y&&Y.nodeValue===W}}T.removeChild(U)})();(function(){var T=document.createElement("div");T.appendChild(document.createComment(""));if(T.getElementsByTagName("*").length>0){M.find.TAG=function(V,Y){var X=Y.getElementsByTagName(V[1]);if(V[1]==="*"){var W=[];for(var U=0;X[U];U++){if(X[U].nodeType===1){W.push(X[U])}}X=W}return X}}T.innerHTML="<a href='#'></a>";if(T.firstChild&&typeof T.firstChild.getAttribute!=="undefined"&&T.firstChild.getAttribute("href")!=="#"){M.attrHandle.href=function(U){return U.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var T=O,U=document.createElement("div");U.innerHTML="<p class='TEST'></p>";if(U.querySelectorAll&&U.querySelectorAll(".TEST").length===0){return}O=function(X,V,Z,W){V=V||document;if(!W&&V.nodeType===9&&!K(V)){try{return F(V.querySelectorAll(X),Z)}catch(Y){}}return T(X,V,Z,W)};O.find=T.find;O.filter=T.filter;O.selectors=T.selectors;O.matches=T.matches})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var T=document.createElement("div");T.innerHTML="<div class='test e'></div><div class='test'></div>";if(T.getElementsByClassName("e").length===0){return}T.lastChild.className="e";if(T.getElementsByClassName("e").length===1){return}M.order.splice(1,0,"CLASS");M.find.CLASS=function(V,W,U){if(typeof W.getElementsByClassName!=="undefined"&&!U){return W.getElementsByClassName(V[1])}}})()}function S(V,Y,aa,ad,ab,Z){var T=V=="previousSibling"&&!Z;for(var X=0,U=ad.length;X<U;X++){var ac=ad[X];if(ac){if(T&&ac.nodeType===1){ac.sizcache=aa;ac.sizset=X}ac=ac[V];var W=false;while(ac){if(ac.sizcache===aa){W=ad[ac.sizset];break}if(ac.nodeType===1&&!Z){ac.sizcache=aa;ac.sizset=X}if(ac.nodeName===Y){W=ac;break}ac=ac[V]}ad[X]=W}}}function E(V,Y,aa,ad,ab,Z){var T=V=="previousSibling"&&!Z;for(var X=0,U=ad.length;X<U;X++){var ac=ad[X];if(ac){if(T&&ac.nodeType===1){ac.sizcache=aa;ac.sizset=X}ac=ac[V];var W=false;while(ac){if(ac.sizcache===aa){W=ad[ac.sizset];break}if(ac.nodeType===1){if(!Z){ac.sizcache=aa;ac.sizset=X}if(typeof Y!=="string"){if(ac===Y){W=true;break}}else{if(O.filter(Y,[ac]).length>0){W=ac;break}}}ac=ac[V]}ad[X]=W}}}var L=document.compareDocumentPosition?function(T,U){return T.compareDocumentPosition(U)&16}:function(T,U){return T!==U&&(T.contains?T.contains(U):true)};var K=function(T){return T.nodeType===9&&T.documentElement.nodeName!=="HTML"||!!T.ownerDocument&&K(T.ownerDocument)};var N=function(X,aa){var W=[],Y="",Z,U=aa.nodeType?[aa]:aa;while((Z=M.match.PSEUDO.exec(X))){Y+=Z[0];X=X.replace(M.match.PSEUDO,"")}X=M.relative[X]?X+"*":X;for(var T=0,V=U.length;T<V;T++){O(X,U[T],W)}return O.filter(Y,W)};m.find=O;m.filter=O.filter;m.expr=O.selectors;m.expr[":"]=m.expr.filters;O.selectors.filters.hidden=function(T){return T.offsetWidth===0||T.offsetHeight===0};O.selectors.filters.visible=function(T){return T.offsetWidth>0||T.offsetHeight>0};O.selectors.filters.animated=function(T){return m.grep(m.timers,function(U){return T===U.elem}).length};m.multiFilter=function(U,V,T){if(T){U=":not("+U+")"}return O.matches(U,V)};m.dir=function(U,T){var V=[],W=U[T];while(W&&W!=document){if(W.nodeType==1){V.push(W)}W=W[T]}return V};m.nth=function(W,U,T,V){U=U||1;var X=0;for(;W;W=W[T]){if(W.nodeType==1&&++X==U){break}}return W};m.sibling=function(U,V){var T=[];for(;U;U=U.nextSibling){if(U.nodeType==1&&U!=V){T.push(U)}}return T};return;s.Sizzle=O})();m.event={add:function(H,I,G,K){if(H.nodeType==3||H.nodeType==8){return}if(H.setInterval&&H!=s){H=s}if(!G.guid){G.guid=this.guid++}if(K!==w){var E=G;G=this.proxy(E);G.data=K}var J=m.data(H,"events")||m.data(H,"events",{}),F=m.data(H,"handle")||m.data(H,"handle",function(){return typeof m!=="undefined"&&!m.event.triggered?m.event.handle.apply(arguments.callee.elem,arguments):w});F.elem=H;m.each(I.split(/\s+/),function(N,M){var L=M.split(".");M=L.shift();G.type=L.slice().sort().join(".");var O=J[M];if(m.event.specialAll[M]){m.event.specialAll[M].setup.call(H,K,L)}if(!O){O=J[M]={};if(!m.event.special[M]||m.event.special[M].setup.call(H,K,L)===false){if(H.addEventListener){H.addEventListener(M,F,false)}else{if(H.attachEvent){H.attachEvent("on"+M,F)}}}}O[G.guid]=G;m.event.global[M]=true});H=null},guid:1,global:{},remove:function(K,G,L){if(K.nodeType==3||K.nodeType==8){return}var H=m.data(K,"events"),F,I;if(H){if(G===w||(typeof G==="string"&&G.charAt(0)==".")){for(var E in H){this.remove(K,E+(G||""))}}else{if(G.type){L=G.handler;G=G.type}m.each(G.split(/\s+/),function(P,O){var M=O.split(".");O=M.shift();var N=RegExp("(^|\\.)"+M.slice().sort().join(".*\\.")+"(\\.|$)");if(H[O]){if(L){delete H[O][L.guid]}else{for(var Q in H[O]){if(N.test(H[O][Q].type)){delete H[O][Q]}}}if(m.event.specialAll[O]){m.event.specialAll[O].teardown.call(K,M)}for(F in H[O]){break}if(!F){if(!m.event.special[O]||m.event.special[O].teardown.call(K,M)===false){if(K.removeEventListener){K.removeEventListener(O,m.data(K,"handle"),false)}else{if(K.detachEvent){K.detachEvent("on"+O,m.data(K,"handle"))}}}F=null;delete H[O]}}})}for(F in H){break}if(!F){var J=m.data(K,"handle");if(J){J.elem=null}m.removeData(K,"events");m.removeData(K,"handle")}}},trigger:function(F,G,L,H){var E=F.type||F;if(!H){F=typeof F==="object"?F[r]?F:m.extend(m.Event(E),F):m.Event(E);if(E.indexOf("!")>=0){F.type=E=E.slice(0,-1);F.exclusive=true}if(!L){F.stopPropagation();if(this.global[E]){m.each(m.cache,function(){if(this.events&&this.events[E]){m.event.trigger(F,G,this.handle.elem)}})}}if(!L||L.nodeType==3||L.nodeType==8){return w}F.result=w;F.target=L;G=m.makeArray(G);G.unshift(F)}F.currentTarget=L;var J=m.data(L,"handle");if(J){J.apply(L,G)}if((!L[E]||(m.nodeName(L,"a")&&E=="click"))&&L["on"+E]&&L["on"+E].apply(L,G)===false){F.result=false}if(!H&&L[E]&&!F.isDefaultPrevented()&&!(m.nodeName(L,"a")&&E=="click")){this.triggered=true;try{L[E]()}catch(I){}}this.triggered=false;if(!F.isPropagationStopped()){var K=L.parentNode||L.ownerDocument;if(K){m.event.trigger(F,G,K,true)}}},handle:function(H){var K,J;H=arguments[0]=m.event.fix(H||s.event);H.currentTarget=this;var I=H.type.split(".");H.type=I.shift();K=!I.length&&!H.exclusive;var F=RegExp("(^|\\.)"+I.slice().sort().join(".*\\.")+"(\\.|$)");J=(m.data(this,"events")||{})[H.type];for(var E in J){var L=J[E];if(K||F.test(L.type)){H.handler=L;H.data=L.data;var G=L.apply(this,arguments);if(G!==w){H.result=G;if(G===false){H.preventDefault();H.stopPropagation()}}if(H.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(H){if(H[r]){return H}var G=H;H=m.Event(G);for(var I=this.props.length,J;I;){J=this.props[--I];H[J]=G[J]}if(!H.target){H.target=H.srcElement||document}if(H.target.nodeType==3){H.target=H.target.parentNode}if(!H.relatedTarget&&H.fromElement){H.relatedTarget=H.fromElement==H.target?H.toElement:H.fromElement}if(H.pageX==null&&H.clientX!=null){var F=document.documentElement,E=document.body;H.pageX=H.clientX+(F&&F.scrollLeft||E&&E.scrollLeft||0)-(F.clientLeft||0);H.pageY=H.clientY+(F&&F.scrollTop||E&&E.scrollTop||0)-(F.clientTop||0)}if(!H.which&&((H.charCode||H.charCode===0)?H.charCode:H.keyCode)){H.which=H.charCode||H.keyCode}if(!H.metaKey&&H.ctrlKey){H.metaKey=H.ctrlKey}if(!H.which&&H.button){H.which=(H.button&1?1:(H.button&2?3:(H.button&4?2:0)))}return H},proxy:function(E,F){F=F||function(){return E.apply(this,arguments)};F.guid=E.guid=E.guid||F.guid||this.guid++;return F},special:{ready:{setup:B,teardown:function(){}}},specialAll:{live:{setup:function(F,E){m.event.add(this,E[0],D)},teardown:function(E){if(E.length){var G=0,F=RegExp("(^|\\.)"+E[0]+"(\\.|$)");m.each((m.data(this,"events").live||{}),function(){if(F.test(this.type)){G++}});if(G<1){m.event.remove(this,E[0],D)}}}}}};m.Event=function(E){if(!this.preventDefault){return new m.Event(E)}if(E&&E.type){this.originalEvent=E;this.type=E.type}else{this.type=E}this.timeStamp=a();this[r]=true};function d(){return false}function l(){return true}m.Event.prototype={preventDefault:function(){this.isDefaultPrevented=l;var E=this.originalEvent;if(!E){return}if(E.preventDefault){E.preventDefault()}E.returnValue=false},stopPropagation:function(){this.isPropagationStopped=l;var E=this.originalEvent;if(!E){return}if(E.stopPropagation){E.stopPropagation()}E.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=l;this.stopPropagation()},isDefaultPrevented:d,isPropagationStopped:d,isImmediatePropagationStopped:d};var c=function(F){var E=F.relatedTarget;while(E&&E!=this){try{E=E.parentNode}catch(G){E=this}}if(E!=this){F.type=F.data;m.event.handle.apply(this,arguments)}};m.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(F,E){m.event.special[E]={setup:function(){m.event.add(this,F,c,E)},teardown:function(){m.event.remove(this,F,c)}}});m.fn.extend({bind:function(F,G,E){return F=="unload"?this.one(F,G,E):this.each(function(){m.event.add(this,F,E||G,E&&G)})},one:function(G,H,E){var F=m.event.proxy(E||H,function(I){m(this).unbind(I,F);return(E||H).apply(this,arguments)});return this.each(function(){m.event.add(this,G,F,E&&H)})},unbind:function(F,E){return this.each(function(){m.event.remove(this,F,E)})},trigger:function(E,F){return this.each(function(){m.event.trigger(E,F,this)})},triggerHandler:function(F,G){if(this[0]){var E=m.Event(F);E.preventDefault();E.stopPropagation();m.event.trigger(E,G,this[0]);return E.result}},toggle:function(E){var F=arguments,G=1;while(G<F.length){m.event.proxy(E,F[G++])}return this.click(m.event.proxy(E,function(H){this.lastToggle=(this.lastToggle||0)%G;H.preventDefault();return F[this.lastToggle++].apply(this,arguments)||false}))},hover:function(F,E){return this.mouseenter(F).mouseleave(E)},ready:function(E){B();if(m.isReady){E.call(document,m)}else{m.readyList.push(E)}return this},live:function(F,E){var G=m.event.proxy(E);G.guid+=this.selector+F;m(document).bind(p(F,this.selector),this.selector,G);return this},die:function(F,E){m(document).unbind(p(F,this.selector),E?{guid:E.guid+this.selector+F}:null);return this}});function D(E){var F=RegExp("(^|\\.)"+E.type+"(\\.|$)"),G=true,H=[];m.each(m.data(this,"events").live||[],function(K,I){if(F.test(I.type)){var J=m(E.target).closest(I.data)[0];if(J){H.push({elem:J,fn:I})}}});H.sort(function(I,J){return m.data(I.elem,"closest")-m.data(J.elem,"closest")});m.each(H,function(){if(this.fn.call(this.elem,E,this.fn.data)===false){return(G=false)}});return G}function p(E,F){return["live",E,F.replace(/\./g,"`").replace(/ /g,"|")].join(".")}m.extend({isReady:false,readyList:[],ready:function(){if(!m.isReady){m.isReady=true;if(m.readyList){m.each(m.readyList,function(){this.call(document,m)});m.readyList=null}m(document).triggerHandler("ready")}}});var C=false;function B(){if(C){return}C=true;if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false);m.ready()},false)}else{if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);m.ready()}});if(document.documentElement.doScroll&&s==s.top){(function(){if(m.isReady){return}try{document.documentElement.doScroll("left")}catch(E){setTimeout(arguments.callee,0);return}m.ready()})()}}}m.event.add(s,"load",m.ready)}m.each(("blur,focus,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave,change,select,submit,keydown,keypress,keyup,error").split(","),function(F,E){m.fn[E]=function(G){return G?this.bind(E,G):this.trigger(E)}});m(s).bind("unload",function(){for(var E in m.cache){if(E!=1&&m.cache[E].handle){m.event.remove(m.cache[E].handle.elem)}}});(function(){m.support={};var F=document.documentElement,I=document.createElement("script"),E=document.createElement("div"),J="script"+(new Date).getTime();E.style.display="none";E.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 G=E.getElementsByTagName("*"),K=E.getElementsByTagName("a")[0];if(!G||!G.length||!K){return}m.support={leadingWhitespace:E.firstChild.nodeType==3,tbody:!E.getElementsByTagName("tbody").length,objectAll:!!E.getElementsByTagName("object")[0].getElementsByTagName("*").length,htmlSerialize:!!E.getElementsByTagName("link").length,style:/red/.test(K.getAttribute("style")),hrefNormalized:K.getAttribute("href")==="/a",opacity:K.style.opacity==="0.5",cssFloat:!!K.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};I.type="text/javascript";try{I.appendChild(document.createTextNode("window."+J+"=1;"))}catch(H){}F.insertBefore(I,F.firstChild);if(s[J]){m.support.scriptEval=true;delete s[J]}F.removeChild(I);if(E.attachEvent&&E.fireEvent){E.attachEvent("onclick",function(){m.support.noCloneEvent=false;E.detachEvent("onclick",arguments.callee)});E.cloneNode(true).fireEvent("onclick")}m(function(){var L=document.createElement("div");L.style.width=L.style.paddingLeft="1px";document.body.appendChild(L);m.boxModel=m.support.boxModel=L.offsetWidth===2;document.body.removeChild(L).style.display="none"})})();var y=m.support.cssFloat?"cssFloat":"styleFloat";m.props={"for":"htmlFor","class":"className","float":y,cssFloat:y,styleFloat:y,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",tabindex:"tabIndex"};m.fn.extend({_load:m.fn.load,load:function(H,E,K){if(typeof H!=="string"){return this._load(H)}var F=H.indexOf(" ");if(F>=0){var I=H.slice(F,H.length);H=H.slice(0,F)}var G="GET";if(E){if(m.isFunction(E)){K=E;E=null}else{if(typeof E==="object"){E=m.param(E);G="POST"}}}var J=this;m.ajax({url:H,type:G,dataType:"html",data:E,complete:function(M,L){if(L=="success"||L=="notmodified"){J.html(I?m("<div/>").append(M.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(I):M.responseText)}if(K){J.each(K,[M.responseText,L,M])}}});return this},serialize:function(){return m.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?m.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|search/i.test(this.type))}).map(function(F,E){var G=m(this).val();return G==null?null:m.isArray(G)?m.map(G,function(I,H){return{name:E.name,value:I}}):{name:E.name,value:G}}).get()}});m.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(F,E){m.fn[E]=function(G){return this.bind(E,G)}});var k=a();m.extend({get:function(G,H,E,F){if(m.isFunction(H)){E=H;H=null}return m.ajax({type:"GET",url:G,data:H,success:E,dataType:F})},getScript:function(E,F){return m.get(E,null,F,"script")},getJSON:function(F,G,E){return m.get(F,G,E,"json")},post:function(G,H,E,F){if(m.isFunction(H)){E=H;H={}}return m.ajax({type:"POST",url:G,data:H,success:E,dataType:F})},ajaxSetup:function(E){m.extend(m.ajaxSettings,E)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return s.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(K){K=m.extend(true,K,m.extend(true,{},m.ajaxSettings,K));var F,O=/=\?(&|$)/g,L,M,G=K.type.toUpperCase();if(K.data&&K.processData&&typeof K.data!=="string"){K.data=m.param(K.data)}if(K.dataType=="jsonp"){if(G=="GET"){if(!K.url.match(O)){K.url+=(K.url.match(/\?/)?"&":"?")+(K.jsonp||"callback")+"=?"}}else{if(!K.data||!K.data.match(O)){K.data=(K.data?K.data+"&":"")+(K.jsonp||"callback")+"=?"}}K.dataType="json"}if(K.dataType=="json"&&(K.data&&K.data.match(O)||K.url.match(O))){F="jsonp"+k++;if(K.data){K.data=(K.data+"").replace(O,"="+F+"$1")}K.url=K.url.replace(O,"="+F+"$1");K.dataType="script";s[F]=function(X){M=X;P();S();s[F]=w;try{delete s[F]}catch(Y){}if(W){W.removeChild(U)}}}if(K.dataType=="script"&&K.cache==null){K.cache=false}if(K.cache===false&&G=="GET"){var E=a();var J=K.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+E+"$2");K.url=J+((J==K.url)?(K.url.match(/\?/)?"&":"?")+"_="+E:"")}if(K.data&&G=="GET"){K.url+=(K.url.match(/\?/)?"&":"?")+K.data;K.data=null}if(K.global&&!m.active++){m.event.trigger("ajaxStart")}var V=/^(\w+:)?\/\/([^\/?#]+)/.exec(K.url);if(K.dataType=="script"&&G=="GET"&&V&&(V[1]&&V[1]!=location.protocol||V[2]!=location.host)){var W=document.getElementsByTagName("head")[0];var U=document.createElement("script");U.src=K.url;if(K.scriptCharset){U.charset=K.scriptCharset}if(!F){var I=false;U.onload=U.onreadystatechange=function(){if(!I&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){I=true;P();S();U.onload=U.onreadystatechange=null;W.removeChild(U)}}}W.appendChild(U);return w}var T=false;var H=K.xhr();if(K.username){H.open(G,K.url,K.async,K.username,K.password)}else{H.open(G,K.url,K.async)}try{if(K.data){H.setRequestHeader("Content-Type",K.contentType)}if(K.ifModified){H.setRequestHeader("If-Modified-Since",m.lastModified[K.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}H.setRequestHeader("X-Requested-With","XMLHttpRequest");H.setRequestHeader("Accept",K.dataType&&K.accepts[K.dataType]?K.accepts[K.dataType]+", */*":K.accepts._default)}catch(Q){}if(K.beforeSend&&K.beforeSend(H,K)===false){if(K.global&&!--m.active){m.event.trigger("ajaxStop")}H.abort();return false}if(K.global){m.event.trigger("ajaxSend",[H,K])}var R=function(X){if(H.readyState==0){if(N){clearInterval(N);N=null;if(K.global&&!--m.active){m.event.trigger("ajaxStop")}}}else{if(!T&&H&&(H.readyState==4||X=="timeout")){T=true;if(N){clearInterval(N);N=null}L=X=="timeout"?"timeout":!m.httpSuccess(H)?"error":K.ifModified&&m.httpNotModified(H,K.url)?"notmodified":"success";if(L=="success"){try{M=m.httpData(H,K.dataType,K)}catch(Z){L="parsererror"}}if(L=="success"){var Y;try{Y=H.getResponseHeader("Last-Modified")}catch(Z){}if(K.ifModified&&Y){m.lastModified[K.url]=Y}if(!F){P()}}else{m.handleError(K,H,L)}S();if(X){H.abort()}if(K.async){H=null}}}};if(K.async){var N=setInterval(R,13);if(K.timeout>0){setTimeout(function(){if(H&&!T){R("timeout")}},K.timeout)}}try{H.send(K.data)}catch(Q){m.handleError(K,H,null,Q)}if(!K.async){R()}function P(){if(K.success){K.success(M,L)}if(K.global){m.event.trigger("ajaxSuccess",[H,K])}}function S(){if(K.complete){K.complete(H,L)}if(K.global){m.event.trigger("ajaxComplete",[H,K])}if(K.global&&!--m.active){m.event.trigger("ajaxStop")}}return H},handleError:function(E,H,F,G){if(E.error){E.error(H,F,G)}if(E.global){m.event.trigger("ajaxError",[H,E,G])}},active:0,httpSuccess:function(F){try{return !F.status&&location.protocol=="file:"||(F.status>=200&&F.status<300)||F.status==304||F.status==1223}catch(E){}return false},httpNotModified:function(H,F){try{var G=H.getResponseHeader("Last-Modified");return H.status==304||G==m.lastModified[F]}catch(E){}return false},httpData:function(I,G,E){var H=I.getResponseHeader("content-type"),F=G=="xml"||!G&&H&&H.indexOf("xml")>=0,J=F?I.responseXML:I.responseText;if(F&&J.documentElement.tagName=="parsererror"){throw"parsererror"}if(E&&E.dataFilter){J=E.dataFilter(J,G)}if(typeof J==="string"){if(G=="script"){m.globalEval(J)}if(G=="json"){J=s["eval"]("("+J+")")}}return J},param:function(G){var E=[];function F(J,I){E[E.length]=encodeURIComponent(J)+"="+encodeURIComponent(I)}if(m.isArray(G)||G.jquery){m.each(G,function(){F(this.name,this.value)})}else{for(var H in G){if(m.isArray(G[H])){m.each(G[H],function(){F(H,this)})}else{F(H,m.isFunction(G[H])?G[H]():G[H])}}}return E.join("&").replace(/%20/g,"+")}});var u={},b,i=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function v(F,G){var E={};m.each(i.concat.apply([],i.slice(0,G)),function(){E[this]=F});return E}m.fn.extend({show:function(H,L){if(H){return this.animate(v("show",3),H,L)}else{for(var E=0,F=this.length;E<F;E++){var I=m.data(this[E],"olddisplay");this[E].style.display=I||"";if(m.css(this[E],"display")==="none"){var G=this[E].tagName,J;if(u[G]){J=u[G]}else{var K=m("<"+G+" />").appendTo("body");J=K.css("display");if(J==="none"){J="block"}K.remove();u[G]=J}m.data(this[E],"olddisplay",J)}}for(var E=0,F=this.length;E<F;E++){this[E].style.display=m.data(this[E],"olddisplay")||""}return this}},hide:function(F,I){if(F){return this.animate(v("hide",3),F,I)}else{for(var H=0,G=this.length;H<G;H++){var E=m.data(this[H],"olddisplay");if(!E&&E!=="none"){m.data(this[H],"olddisplay",m.css(this[H],"display"))}}for(var H=0,G=this.length;H<G;H++){this[H].style.display="none"}return this}},_toggle:m.fn.toggle,toggle:function(E,F){var G=typeof E==="boolean";return m.isFunction(E)&&m.isFunction(F)?this._toggle.apply(this,arguments):E==null||G?this.each(function(){var H=G?E:m(this).is(":hidden");m(this)[H?"show":"hide"]()}):this.animate(v("toggle",3),E,F)},fadeTo:function(F,E,G){return this.animate({opacity:E},F,G)},animate:function(I,G,E,F){var H=m.speed(G,E,F);return this[H.queue===false?"each":"queue"](function(){var M=m.extend({},H),L,J=this.nodeType==1&&m(this).is(":hidden"),K=this;for(L in I){if(I[L]=="hide"&&J||I[L]=="show"&&!J){return M.complete.call(this)}if((L=="height"||L=="width")&&this.style){M.display=m.css(this,"display");M.overflow=this.style.overflow}}if(M.overflow!=null){this.style.overflow="hidden"}M.curAnim=m.extend({},I);m.each(I,function(N,T){var S=new m.fx(K,M,N);if(/toggle|show|hide/.test(T)){S[T=="toggle"?J?"show":"hide":T](I)}else{var R=T.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),P=S.cur(true)||0;if(R){var Q=parseFloat(R[2]),O=R[3]||"px";if(O!="px"){K.style[N]=(Q||1)+O;P=((Q||1)/S.cur(true))*P;K.style[N]=P+O}if(R[1]){Q=((R[1]=="-="?-1:1)*Q)+P}S.custom(P,Q,O)}else{S.custom(P,T,"")}}});return true})},stop:function(E,G){var F=m.timers;if(E){this.queue([])}this.each(function(){for(var H=F.length-1;H>=0;H--){if(F[H].elem==this){if(G){F[H](true)}F.splice(H,1)}}});if(!G){this.dequeue()}return this}});m.each({slideDown:v("show",1),slideUp:v("hide",1),slideToggle:v("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(F,E){m.fn[F]=function(G,H){return this.animate(E,G,H)}});m.extend({speed:function(G,F,E){var H=typeof G==="object"?G:{complete:E||!E&&F||m.isFunction(G)&&G,duration:G,easing:E&&F||F&&!m.isFunction(F)&&F};H.duration=m.fx.off?0:typeof H.duration==="number"?H.duration:m.fx.speeds[H.duration]||m.fx.speeds._default;H.old=H.complete;H.complete=function(){if(H.queue!==false){m(this).dequeue()}if(m.isFunction(H.old)){H.old.call(this)}};return H},easing:{linear:function(G,E,H,F){return H+F*G},swing:function(G,E,H,F){return((-Math.cos(G*Math.PI)/2)+0.5)*F+H}},timers:[],fx:function(E,F,G){this.options=F;this.elem=E;this.prop=G;if(!F.orig){F.orig={}}}});m.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(m.fx.step[this.prop]||m.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(F){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var E=parseFloat(m.css(this.elem,this.prop,F));return E&&E>-10000?E:parseFloat(m.curCSS(this.elem,this.prop))||0},custom:function(E,F,G){this.startTime=a();this.start=E;this.end=F;this.unit=G||this.unit||"px";this.now=this.start;this.pos=this.state=0;var H=this;function I(J){return H.step(J)}I.elem=this.elem;if(I()&&m.timers.push(I)&&!b){b=setInterval(function(){var J=m.timers;for(var K=0;K<J.length;K++){if(!J[K]()){J.splice(K--,1)}}if(!J.length){clearInterval(b);b=w}},13)}},show:function(){this.options.orig[this.prop]=m.attr(this.elem.style,this.prop);this.options.show=true;this.custom(this.prop=="width"||this.prop=="height"?1:0,this.cur());m(this.elem).show()},hide:function(){this.options.orig[this.prop]=m.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(I){var G=a();if(I||G>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var E=true;for(var H in this.options.curAnim){if(this.options.curAnim[H]!==true){E=false}}if(E){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(m.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){m(this.elem).hide()}if(this.options.hide||this.options.show){for(var J in this.options.curAnim){m.attr(this.elem.style,J,this.options.orig[J])}}this.options.complete.call(this.elem)}return false}else{var F=G-this.startTime;this.state=F/this.options.duration;this.pos=m.easing[this.options.easing||(m.easing.swing?"swing":"linear")](this.state,F,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};m.extend(m.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(E){m.attr(E.elem.style,"opacity",E.now)},_default:function(E){if(E.elem.style&&E.elem.style[E.prop]!=null){E.elem.style[E.prop]=E.now+E.unit}else{E.elem[E.prop]=E.now}}}});if(document.documentElement.getBoundingClientRect){m.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return m.offset.bodyOffset(this[0])}var E=this[0].getBoundingClientRect(),I=this[0].ownerDocument,L=I.body,J=I.documentElement,K=J.clientTop||L.clientTop||0,F=J.clientLeft||L.clientLeft||0,G=E.top+(self.pageYOffset||m.boxModel&&J.scrollTop||L.scrollTop)-K,H=E.left+(self.pageXOffset||m.boxModel&&J.scrollLeft||L.scrollLeft)-F;return{top:G,left:H}}}else{m.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return m.offset.bodyOffset(this[0])}m.offset.initialized||m.offset.initialize();var O=this[0],N=O.offsetParent,F=O,K=O.ownerDocument,E,L=K.documentElement,M=K.body,I=K.defaultView,J=I.getComputedStyle(O,null),G=O.offsetTop,H=O.offsetLeft;while((O=O.parentNode)&&O!==M&&O!==L){E=I.getComputedStyle(O,null);G-=O.scrollTop,H-=O.scrollLeft;if(O===N){G+=O.offsetTop,H+=O.offsetLeft;if(m.offset.doesNotAddBorder&&!(m.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(O.tagName))){G+=parseInt(E.borderTopWidth,10)||0,H+=parseInt(E.borderLeftWidth,10)||0}F=N,N=O.offsetParent}if(m.offset.subtractsBorderForOverflowNotVisible&&E.overflow!=="visible"){G+=parseInt(E.borderTopWidth,10)||0,H+=parseInt(E.borderLeftWidth,10)||0}J=E}if(J.position==="relative"||J.position==="static"){G+=M.offsetTop,H+=M.offsetLeft}if(J.position==="fixed"){G+=Math.max(L.scrollTop,M.scrollTop),H+=Math.max(L.scrollLeft,M.scrollLeft)}return{top:G,left:H}}}m.offset={initialize:function(){if(this.initialized){return}var L=document.body,F=document.createElement("div"),N,I,E,M,J,G,K=L.style.marginTop,H='<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>';J={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(G in J){F.style[G]=J[G]}F.innerHTML=H;L.insertBefore(F,L.firstChild);N=F.firstChild,I=N.firstChild,M=N.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(I.offsetTop!==5);this.doesAddBorderForTableAndCells=(M.offsetTop===5);N.style.overflow="hidden",N.style.position="relative";this.subtractsBorderForOverflowNotVisible=(I.offsetTop===-5);L.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(L.offsetTop===0);L.style.marginTop=K;L.removeChild(F);this.initialized=true},bodyOffset:function(E){m.offset.initialized||m.offset.initialize();var F=E.offsetTop,G=E.offsetLeft;if(m.offset.doesNotIncludeMarginInBodyOffset){F+=parseInt(m.curCSS(E,"marginTop",true),10)||0,G+=parseInt(m.curCSS(E,"marginLeft",true),10)||0}return{top:F,left:G}}};m.fn.extend({position:function(){var H=0,F=0,I;if(this[0]){var J=this.offsetParent(),G=this.offset(),E=/^body|html$/i.test(J[0].tagName)?{top:0,left:0}:J.offset();G.top-=o(this,"marginTop");G.left-=o(this,"marginLeft");E.top+=o(J,"borderTopWidth");E.left+=o(J,"borderLeftWidth");I={top:G.top-E.top,left:G.left-E.left}}return I},offsetParent:function(){var E=this[0].offsetParent||document.body;while(E&&(!/^body|html$/i.test(E.tagName)&&m.css(E,"position")=="static")){E=E.offsetParent}return m(E)}});m.each(["Left","Top"],function(G,E){var F="scroll"+E;m.fn[F]=function(H){if(!this[0]){return null}return H!==w?this.each(function(){this==s||this==document?s.scrollTo(!G?H:m(s).scrollLeft(),G?H:m(s).scrollTop()):this[F]=H}):this[0]==s||this[0]==document?self[G?"pageYOffset":"pageXOffset"]||m.boxModel&&document.documentElement[F]||document.body[F]:this[0][F]}});m.each(["Height","Width"],function(H,F){var I=H?"Left":"Top",J=H?"Right":"Bottom",E=F.toLowerCase();m.fn["inner"+F]=function(){return this[0]?m.css(this[0],E,false,"padding"):null};m.fn["outer"+F]=function(K){return this[0]?m.css(this[0],E,false,K?"margin":"border"):null};var G=F.toLowerCase();m.fn[G]=function(K){return this[0]==s?document.compatMode=="CSS1Compat"&&document.documentElement["client"+F]||document.body["client"+F]:this[0]==document?Math.max(document.documentElement["client"+F],document.body["scroll"+F],document.documentElement["scroll"+F],document.body["offset"+F],document.documentElement["offset"+F]):K===w?(this.length?m.css(this[0],G):null):this.css(G,typeof K==="string"?K:K+"px")}})})();(function(b){b.ui={plugin:{add:function(f,g,d){var e=b.ui[f].prototype;for(var h in d){e.plugins[h]=e.plugins[h]||[];e.plugins[h].push([g,d[h]])}},call:function(g,e,f){var d=g.plugins[e];if(!d){return}for(var h=0;h<d.length;h++){if(g.options[d[h][0]]){d[h][1].apply(g.element,f)}}}},cssCache:{},css:function(d){if(b.ui.cssCache[d]){return b.ui.cssCache[d]}var f=b('<div class="ui-gen">').addClass(d).css({position:"absolute",top:"-5000px",left:"-5000px",display:"block"}).appendTo("body");b.ui.cssCache[d]=!!((!(/auto|default/).test(f.css("cursor"))||(/^[1-9]/).test(f.css("height"))||(/^[1-9]/).test(f.css("width"))||!(/none/).test(f.css("backgroundImage"))||!(/transparent|rgba\(0, 0, 0, 0\)/).test(f.css("backgroundColor"))));try{b("body").get(0).removeChild(f.get(0))}catch(g){}return b.ui.cssCache[d]},disableSelection:function(d){b(d).attr("unselectable","on").css("MozUserSelect","none")},enableSelection:function(d){b(d).attr("unselectable","off").css("MozUserSelect","")},hasScroll:function(g,d){var f=/top/.test(d||"top")?"scrollTop":"scrollLeft",h=false;if(g[f]>0){return true}g[f]=1;h=g[f]>0?true:false;g[f]=0;return h}};var a=b.fn.remove;b.fn.remove=function(){b("*",this).add(this).triggerHandler("remove");return a.apply(this,arguments)};function c(d,g,e){var f=b[d][g].getter||[];f=(typeof f=="string"?f.split(/,?\s+/):f);return(b.inArray(e,f)!=-1)}b.widget=function(e,f){var d=e.split(".")[0];e=e.split(".")[1];b.fn[e]=function(j){var h=(typeof j=="string"),g=Array.prototype.slice.call(arguments,1);if(h&&c(d,e,j)){var i=b.data(this[0],e);return(i?i[j].apply(i,g):undefined)}return this.each(function(){var k=b.data(this,e);if(h&&k&&b.isFunction(k[j])){k[j].apply(k,g)}else{if(!h){b.data(this,e,new b[d][e](this,j))}}})};b[d][e]=function(h,i){var g=this;this.widgetName=e;this.widgetBaseClass=d+"-"+e;this.options=b.extend({},b.widget.defaults,b[d][e].defaults,i);this.element=b(h).bind("setData."+e,function(l,k,j){return g.setData(k,j)}).bind("getData."+e,function(k,j){return g.getData(j)}).bind("remove",function(){return g.destroy()});this.init()};b[d][e].prototype=b.extend({},b.widget.prototype,f)};b.widget.prototype={init:function(){},destroy:function(){this.element.removeData(this.widgetName)},getData:function(d){return this.options[d]},setData:function(e,d){this.options[e]=d;if(e=="disabled"){this.element[d?"addClass":"removeClass"](this.widgetBaseClass+"-disabled")}},enable:function(){this.setData("disabled",false)},disable:function(){this.setData("disabled",true)}};b.widget.defaults={disabled:false};b.ui.mouse={mouseInit:function(){var d=this;this.element.bind("mousedown."+this.widgetName,function(f){return d.mouseDown(f)});if(b.browser.msie){this._mouseUnselectable=this.element.attr("unselectable");this.element.attr("unselectable","on")}this.started=false},mouseDestroy:function(){this.element.unbind("."+this.widgetName);(b.browser.msie&&this.element.attr("unselectable",this._mouseUnselectable))},mouseDown:function(g){(this._mouseStarted&&this.mouseUp(g));this._mouseDownEvent=g;var f=this,d=(g.which==1),h=(typeof this.options.cancel=="string"?b(g.target).parents().add(g.target).filter(this.options.cancel).length:false);if(!d||h||!this.mouseCapture(g)){return true}this._mouseDelayMet=!this.options.delay;if(!this._mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){f._mouseDelayMet=true},this.options.delay)}if(this.mouseDistanceMet(g)&&this.mouseDelayMet(g)){this._mouseStarted=(this.mouseStart(g)!==false);if(!this._mouseStarted){g.preventDefault();return true}}this._mouseMoveDelegate=function(i){return f.mouseMove(i)};this._mouseUpDelegate=function(i){return f.mouseUp(i)};b(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);return false},mouseMove:function(d){if(b.browser.msie&&!d.button){return this.mouseUp(d)}if(this._mouseStarted){this.mouseDrag(d);return false}if(this.mouseDistanceMet(d)&&this.mouseDelayMet(d)){this._mouseStarted=(this.mouseStart(this._mouseDownEvent,d)!==false);(this._mouseStarted?this.mouseDrag(d):this.mouseUp(d))}return !this._mouseStarted},mouseUp:function(d){b(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this.mouseStop(d)}return false},mouseDistanceMet:function(d){return(Math.max(Math.abs(this._mouseDownEvent.pageX-d.pageX),Math.abs(this._mouseDownEvent.pageY-d.pageY))>=this.options.distance)},mouseDelayMet:function(d){return this._mouseDelayMet},mouseStart:function(d){},mouseDrag:function(d){},mouseStop:function(d){},mouseCapture:function(d){return true}};b.ui.mouse.defaults={cancel:null,distance:1,delay:0}})(jQuery);(function(a){a.widget("ui.draggable",a.extend({},a.ui.mouse,{init:function(){var b=this.options;if(b.helper=="original"&&!(/(relative|absolute|fixed)/).test(this.element.css("position"))){this.element.css("position","relative")}this.element.addClass("ui-draggable");(b.disabled&&this.element.addClass("ui-draggable-disabled"));this.mouseInit()},mouseStart:function(g){var b=this.options;if(this.helper||b.disabled||a(g.target).is(".ui-resizable-handle")){return false}var i=!this.options.handle||!a(this.options.handle,this.element).length?true:false;a(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==g.target){i=true}});if(!i){return false}if(a.ui.ddmanager){a.ui.ddmanager.current=this}this.helper=a.isFunction(b.helper)?a(b.helper.apply(this.element[0],[g])):(b.helper=="clone"?this.element.clone():this.element);if(!this.helper.parents("body").length){this.helper.appendTo((b.appendTo=="parent"?this.element[0].parentNode:b.appendTo))}if(this.helper[0]!=this.element[0]&&!(/(fixed|absolute)/).test(this.helper.css("position"))){this.helper.css("position","absolute")}this.margins={left:(parseInt(this.element.css("marginLeft"),10)||0),top:(parseInt(this.element.css("marginTop"),10)||0)};this.cssPosition=this.helper.css("position");this.offset=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};this.offset.click={left:g.pageX-this.offset.left,top:g.pageY-this.offset.top};this.offsetParent=this.helper.offsetParent();var h=this.offsetParent.offset();if(this.offsetParent[0]==document.body&&a.browser.mozilla){h={top:0,left:0}}this.offset.parent={top:h.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:h.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)};var c=this.element.position();this.offset.relative=this.cssPosition=="relative"?{top:c.top-(parseInt(this.helper.css("top"),10)||0)+this.offsetParent[0].scrollTop,left:c.left-(parseInt(this.helper.css("left"),10)||0)+this.offsetParent[0].scrollLeft}:{top:0,left:0};this.originalPosition=this.generatePosition(g);this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()};if(b.cursorAt){if(b.cursorAt.left!=undefined){this.offset.click.left=b.cursorAt.left+this.margins.left}if(b.cursorAt.right!=undefined){this.offset.click.left=this.helperProportions.width-b.cursorAt.right+this.margins.left}if(b.cursorAt.top!=undefined){this.offset.click.top=b.cursorAt.top+this.margins.top}if(b.cursorAt.bottom!=undefined){this.offset.click.top=this.helperProportions.height-b.cursorAt.bottom+this.margins.top}}if(b.containment){if(b.containment=="parent"){b.containment=this.helper[0].parentNode}if(b.containment=="document"||b.containment=="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,a(b.containment=="document"?document:window).width()-this.offset.relative.left-this.offset.parent.left-this.helperProportions.width-this.margins.left-(parseInt(this.element.css("marginRight"),10)||0),(a(b.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.offset.relative.top-this.offset.parent.top-this.helperProportions.height-this.margins.top-(parseInt(this.element.css("marginBottom"),10)||0)]}if(!(/^(document|window|parent)$/).test(b.containment)){var f=a(b.containment)[0];var d=a(b.containment).offset();this.containment=[d.left+(parseInt(a(f).css("borderLeftWidth"),10)||0)-this.offset.relative.left-this.offset.parent.left,d.top+(parseInt(a(f).css("borderTopWidth"),10)||0)-this.offset.relative.top-this.offset.parent.top,d.left+Math.max(f.scrollWidth,f.offsetWidth)-(parseInt(a(f).css("borderLeftWidth"),10)||0)-this.offset.relative.left-this.offset.parent.left-this.helperProportions.width-this.margins.left-(parseInt(this.element.css("marginRight"),10)||0),d.top+Math.max(f.scrollHeight,f.offsetHeight)-(parseInt(a(f).css("borderTopWidth"),10)||0)-this.offset.relative.top-this.offset.parent.top-this.helperProportions.height-this.margins.top-(parseInt(this.element.css("marginBottom"),10)||0)]}}this.propagate("start",g);this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()};if(a.ui.ddmanager&&!b.dropBehaviour){a.ui.ddmanager.prepareOffsets(this,g)}this.helper.addClass("ui-draggable-dragging");this.mouseDrag(g);return true},convertPositionTo:function(c,b){if(!b){b=this.position}var e=c=="absolute"?1:-1;return{top:(b.top+this.offset.relative.top*e+this.offset.parent.top*e-(this.cssPosition=="fixed"||(this.cssPosition=="absolute"&&this.offsetParent[0]==document.body)?0:this.offsetParent[0].scrollTop)*e+(this.cssPosition=="fixed"?a(document).scrollTop():0)*e+this.margins.top*e),left:(b.left+this.offset.relative.left*e+this.offset.parent.left*e-(this.cssPosition=="fixed"||(this.cssPosition=="absolute"&&this.offsetParent[0]==document.body)?0:this.offsetParent[0].scrollLeft)*e+(this.cssPosition=="fixed"?a(document).scrollLeft():0)*e+this.margins.left*e)}},generatePosition:function(f){var b=this.options;var g={top:(f.pageY-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(this.cssPosition=="fixed"||(this.cssPosition=="absolute"&&this.offsetParent[0]==document.body)?0:this.offsetParent[0].scrollTop)-(this.cssPosition=="fixed"?a(document).scrollTop():0)),left:(f.pageX-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(this.cssPosition=="fixed"||(this.cssPosition=="absolute"&&this.offsetParent[0]==document.body)?0:this.offsetParent[0].scrollLeft)-(this.cssPosition=="fixed"?a(document).scrollLeft():0))};if(!this.originalPosition){return g}if(this.containment){if(g.left<this.containment[0]){g.left=this.containment[0]}if(g.top<this.containment[1]){g.top=this.containment[1]}if(g.left>this.containment[2]){g.left=this.containment[2]}if(g.top>this.containment[3]){g.top=this.containment[3]}}if(b.grid){var c=this.originalPosition.top+Math.round((g.top-this.originalPosition.top)/b.grid[1])*b.grid[1];g.top=this.containment?(!(c<this.containment[1]||c>this.containment[3])?c:(!(c<this.containment[1])?c-b.grid[1]:c+b.grid[1])):c;var d=this.originalPosition.left+Math.round((g.left-this.originalPosition.left)/b.grid[0])*b.grid[0];g.left=this.containment?(!(d<this.containment[0]||d>this.containment[2])?d:(!(d<this.containment[0])?d-b.grid[0]:d+b.grid[0])):d}return g},mouseDrag:function(b){this.position=this.generatePosition(b);this.positionAbs=this.convertPositionTo("absolute");this.position=this.propagate("drag",b)||this.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){var d=a.ui.ddmanager.drop(this,c)}if((this.options.revert=="invalid"&&!d)||(this.options.revert=="valid"&&d)||this.options.revert===true){var b=this;a(this.helper).animate(this.originalPosition,parseInt(this.options.revert,10)||500,function(){b.propagate("stop",c);b.clear()})}else{this.propagate("stop",c);this.clear()}return false},clear:function(){this.helper.removeClass("ui-draggable-dragging");if(this.options.helper!="original"&&!this.cancelHelperRemoval){this.helper.remove()}this.helper=null;this.cancelHelperRemoval=false},plugins:{},uiHash:function(b){return{helper:this.helper,position:this.position,absolutePosition:this.positionAbs,options:this.options}},propagate:function(b,c){a.ui.plugin.call(this,b,[c,this.uiHash()]);if(b=="drag"){this.positionAbs=this.convertPositionTo("absolute")}return this.element.triggerHandler(b=="drag"?b:"drag"+b,[c,this.uiHash()],this.options[b])},destroy:function(){if(!this.element.data("draggable")){return}this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable");this.mouseDestroy()}}));a.extend(a.ui.draggable,{defaults:{appendTo:"parent",axis:false,cancel:":input",delay:0,distance:1,helper:"original"}});a.ui.plugin.add("draggable","cursor",{start:function(d,c){var b=a("body");if(b.css("cursor")){c.options._cursor=b.css("cursor")}b.css("cursor",c.options.cursor)},stop:function(c,b){if(b.options._cursor){a("body").css("cursor",b.options._cursor)}}});a.ui.plugin.add("draggable","zIndex",{start:function(d,c){var b=a(c.helper);if(b.css("zIndex")){c.options._zIndex=b.css("zIndex")}b.css("zIndex",c.options.zIndex)},stop:function(c,b){if(b.options._zIndex){a(b.helper).css("zIndex",b.options._zIndex)}}});a.ui.plugin.add("draggable","opacity",{start:function(d,c){var b=a(c.helper);if(b.css("opacity")){c.options._opacity=b.css("opacity")}b.css("opacity",c.options.opacity)},stop:function(c,b){if(b.options._opacity){a(b.helper).css("opacity",b.options._opacity)}}});a.ui.plugin.add("draggable","iframeFix",{start:function(c,b){a(b.options.iframeFix===true?"iframe":b.options.iframeFix).each(function(){a('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1000}).css(a(this).offset()).appendTo("body")})},stop:function(c,b){a("div.DragDropIframeFix").each(function(){this.parentNode.removeChild(this)})}});a.ui.plugin.add("draggable","scroll",{start:function(f,c){var b=c.options;var d=a(this).data("draggable");b.scrollSensitivity=b.scrollSensitivity||20;b.scrollSpeed=b.scrollSpeed||20;d.overflowY=function(e){do{if(/auto|scroll/.test(e.css("overflow"))||(/auto|scroll/).test(e.css("overflow-y"))){return e}e=e.parent()}while(e[0].parentNode);return a(document)}(this);d.overflowX=function(e){do{if(/auto|scroll/.test(e.css("overflow"))||(/auto|scroll/).test(e.css("overflow-x"))){return e}e=e.parent()}while(e[0].parentNode);return a(document)}(this);if(d.overflowY[0]!=document&&d.overflowY[0].tagName!="HTML"){d.overflowYOffset=d.overflowY.offset()}if(d.overflowX[0]!=document&&d.overflowX[0].tagName!="HTML"){d.overflowXOffset=d.overflowX.offset()}},drag:function(f,c){var b=c.options;var d=a(this).data("draggable");if(d.overflowY[0]!=document&&d.overflowY[0].tagName!="HTML"){if((d.overflowYOffset.top+d.overflowY[0].offsetHeight)-f.pageY<b.scrollSensitivity){d.overflowY[0].scrollTop=d.overflowY[0].scrollTop+b.scrollSpeed}if(f.pageY-d.overflowYOffset.top<b.scrollSensitivity){d.overflowY[0].scrollTop=d.overflowY[0].scrollTop-b.scrollSpeed}}else{if(f.pageY-a(document).scrollTop()<b.scrollSensitivity){a(document).scrollTop(a(document).scrollTop()-b.scrollSpeed)}if(a(window).height()-(f.pageY-a(document).scrollTop())<b.scrollSensitivity){a(document).scrollTop(a(document).scrollTop()+b.scrollSpeed)}}if(d.overflowX[0]!=document&&d.overflowX[0].tagName!="HTML"){if((d.overflowXOffset.left+d.overflowX[0].offsetWidth)-f.pageX<b.scrollSensitivity){d.overflowX[0].scrollLeft=d.overflowX[0].scrollLeft+b.scrollSpeed}if(f.pageX-d.overflowXOffset.left<b.scrollSensitivity){d.overflowX[0].scrollLeft=d.overflowX[0].scrollLeft-b.scrollSpeed}}else{if(f.pageX-a(document).scrollLeft()<b.scrollSensitivity){a(document).scrollLeft(a(document).scrollLeft()-b.scrollSpeed)}if(a(window).width()-(f.pageX-a(document).scrollLeft())<b.scrollSensitivity){a(document).scrollLeft(a(document).scrollLeft()+b.scrollSpeed)}}}});a.ui.plugin.add("draggable","snap",{start:function(d,c){var b=a(this).data("draggable");b.snapElements=[];a(c.options.snap===true?".ui-draggable":c.options.snap).each(function(){var f=a(this);var e=f.offset();if(this!=b.element[0]){b.snapElements.push({item:this,width:f.outerWidth(),height:f.outerHeight(),top:e.top,left:e.left})}})},drag:function(u,k){var y=a(this).data("draggable");var s=k.options.snapTolerance||20;var o=k.absolutePosition.left,v=o+y.helperProportions.width,p=k.absolutePosition.top,w=p+y.helperProportions.height;for(var m=y.snapElements.length-1;m>=0;m--){var n=y.snapElements[m].left,g=n+y.snapElements[m].width,h=y.snapElements[m].top,q=h+y.snapElements[m].height;if(!((n-s<o&&o<g+s&&h-s<p&&p<q+s)||(n-s<o&&o<g+s&&h-s<w&&w<q+s)||(n-s<v&&v<g+s&&h-s<p&&p<q+s)||(n-s<v&&v<g+s&&h-s<w&&w<q+s))){continue}if(k.options.snapMode!="inner"){var c=Math.abs(h-w)<=20;var j=Math.abs(q-p)<=20;var f=Math.abs(n-v)<=20;var x=Math.abs(g-o)<=20;if(c){k.position.top=y.convertPositionTo("relative",{top:h-y.helperProportions.height,left:0}).top}if(j){k.position.top=y.convertPositionTo("relative",{top:q,left:0}).top}if(f){k.position.left=y.convertPositionTo("relative",{top:0,left:n-y.helperProportions.width}).left}if(x){k.position.left=y.convertPositionTo("relative",{top:0,left:g}).left}}if(k.options.snapMode!="outer"){var c=Math.abs(h-p)<=20;var j=Math.abs(q-w)<=20;var f=Math.abs(n-o)<=20;var x=Math.abs(g-v)<=20;if(c){k.position.top=y.convertPositionTo("relative",{top:h,left:0}).top}if(j){k.position.top=y.convertPositionTo("relative",{top:q-y.helperProportions.height,left:0}).top}if(f){k.position.left=y.convertPositionTo("relative",{top:0,left:n}).left}if(x){k.position.left=y.convertPositionTo("relative",{top:0,left:g-y.helperProportions.width}).left}}}}});a.ui.plugin.add("draggable","connectToSortable",{start:function(d,c){var b=a(this).data("draggable");b.sortables=[];a(c.options.connectToSortable).each(function(){if(a.data(this,"sortable")){var e=a.data(this,"sortable");b.sortables.push({instance:e,shouldRevert:e.options.revert});e.refreshItems();e.propagate("activate",d,b)}})},stop:function(d,c){var b=a(this).data("draggable");a.each(b.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;b.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert){this.instance.options.revert=true}this.instance.mouseStop(d);this.instance.element.triggerHandler("sortreceive",[d,a.extend(this.instance.ui(),{sender:b.element})],this.instance.options.receive);this.instance.options.helper=this.instance.options._helper}else{this.instance.propagate("deactivate",d,b)}})},drag:function(g,c){var b=a(this).data("draggable"),f=this;var d=function(h){var k=h.left,e=k+h.width,j=h.top,i=j+h.height;return(k<(this.positionAbs.left+this.offset.click.left)&&(this.positionAbs.left+this.offset.click.left)<e&&j<(this.positionAbs.top+this.offset.click.top)&&(this.positionAbs.top+this.offset.click.top)<i)};a.each(b.sortables,function(e){if(d.call(b,this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=a(f).clone().appendTo(this.instance.element).data("sortable-item",true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return c.helper[0]};g.target=this.instance.currentItem[0];this.instance.mouseCapture(g,true);this.instance.mouseStart(g,true,true);this.instance.offset.click.top=b.offset.click.top;this.instance.offset.click.left=b.offset.click.left;this.instance.offset.parent.left-=b.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=b.offset.parent.top-this.instance.offset.parent.top;b.propagate("toSortable",g)}if(this.instance.currentItem){this.instance.mouseDrag(g)}}else{if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance.mouseStop(g,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();if(this.instance.placeholder){this.instance.placeholder.remove()}b.propagate("fromSortable",g)}}})}});a.ui.plugin.add("draggable","stack",{start:function(d,c){var b=a.makeArray(a(c.options.stack.group)).sort(function(e,f){return(parseInt(a(e).css("zIndex"),10)||c.options.stack.min)-(parseInt(a(f).css("zIndex"),10)||c.options.stack.min)});a(b).each(function(e){this.style.zIndex=c.options.stack.min+e});this[0].style.zIndex=c.options.stack.min+b.length}})})(jQuery);(function(a){a.widget("ui.droppable",{init:function(){this.element.addClass("ui-droppable");this.isover=0;this.isout=1;var b=this.options,c=b.accept;b=a.extend(b,{accept:b.accept&&b.accept.constructor==Function?b.accept:function(e){return a(e).is(c)}});this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};a.ui.ddmanager.droppables.push(this)},plugins:{},ui:function(b){return{draggable:(b.currentItem||b.element),helper:b.helper,position:b.position,absolutePosition:b.positionAbs,options:this.options,element:this.element}},destroy:function(){var c=a.ui.ddmanager.droppables;for(var b=0;b<c.length;b++){if(c[b]==this){c.splice(b,1)}}this.element.removeClass("ui-droppable ui-droppable-disabled").removeData("droppable").unbind(".droppable")},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,(b.currentItem||b.element))){a.ui.plugin.call(this,"over",[c,this.ui(b)]);this.element.triggerHandler("dropover",[c,this.ui(b)],this.options.over)}},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,(b.currentItem||b.element))){a.ui.plugin.call(this,"out",[c,this.ui(b)]);this.element.triggerHandler("dropout",[c,this.ui(b)],this.options.out)}},drop:function(f,c){var d=c||a.ui.ddmanager.current;if(!d||(d.currentItem||d.element)[0]==this.element[0]){return false}var b=false;this.element.find(".ui-droppable").not(".ui-draggable-dragging").each(function(){var e=a.data(this,"droppable");if(e.options.greedy&&a.ui.intersect(d,a.extend(e,{offset:e.element.offset()}),e.options.tolerance)){b=true;return false}});if(b){return false}if(this.options.accept.call(this.element,(d.currentItem||d.element))){a.ui.plugin.call(this,"drop",[f,this.ui(d)]);this.element.triggerHandler("drop",[f,this.ui(d)],this.options.drop);return true}return false},activate:function(c){var b=a.ui.ddmanager.current;a.ui.plugin.call(this,"activate",[c,this.ui(b)]);if(b){this.element.triggerHandler("dropactivate",[c,this.ui(b)],this.options.activate)}},deactivate:function(c){var b=a.ui.ddmanager.current;a.ui.plugin.call(this,"deactivate",[c,this.ui(b)]);if(b){this.element.triggerHandler("dropdeactivate",[c,this.ui(b)],this.options.deactivate)}}});a.extend(a.ui.droppable,{defaults:{disabled:false,tolerance:"intersect"}});a.ui.intersect=function(j,c,d){if(!c.offset){return false}var m=(j.positionAbs||j.position.absolute).left,f=m+j.helperProportions.width,n=(j.positionAbs||j.position.absolute).top,g=n+j.helperProportions.height;var e=c.offset.left,i=e+c.proportions.width,k=c.offset.top,h=k+c.proportions.height;switch(d){case"fit":return(e<m&&f<i&&k<n&&g<h);break;case"intersect":return(e<m+(j.helperProportions.width/2)&&f-(j.helperProportions.width/2)<i&&k<n+(j.helperProportions.height/2)&&g-(j.helperProportions.height/2)<h);break;case"pointer":return(e<((j.positionAbs||j.position.absolute).left+(j.clickOffset||j.offset.click).left)&&((j.positionAbs||j.position.absolute).left+(j.clickOffset||j.offset.click).left)<i&&k<((j.positionAbs||j.position.absolute).top+(j.clickOffset||j.offset.click).top)&&((j.positionAbs||j.position.absolute).top+(j.clickOffset||j.offset.click).top)<h);break;case"touch":return((n>=k&&n<=h)||(g>=k&&g<=h)||(n<k&&g>h))&&((m>=e&&m<=i)||(f>=e&&f<=i)||(m<e&&f>i));break;default:return false;break}};a.ui.ddmanager={current:null,droppables:[],prepareOffsets:function(c,g){var b=a.ui.ddmanager.droppables;var d=g?g.type:null;for(var f=0;f<b.length;f++){if(b[f].options.disabled||(c&&!b[f].options.accept.call(b[f].element,(c.currentItem||c.element)))){continue}b[f].visible=b[f].element.css("display")!="none";if(!b[f].visible){continue}b[f].offset=b[f].element.offset();b[f].proportions={width:b[f].element[0].offsetWidth,height:b[f].element[0].offsetHeight};if(d=="dragstart"||d=="sortactivate"){b[f].activate.call(b[f],g)}}},drop:function(b,c){var d=false;a.each(a.ui.ddmanager.droppables,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,(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,function(){if(this.options.disabled||this.greedyChild||!this.visible){return}var g=a.ui.intersect(b,this,this.options.tolerance);var f=!g&&this.isover==1?"isout":(g&&this.isover==0?"isover":null);if(!f){return}var d;if(this.options.greedy){var e=this.element.parents(".ui-droppable:eq(0)");if(e.length){d=a.data(e[0],"droppable");d.greedyChild=(f=="isover"?1:0)}}if(d&&f=="isover"){d.isover=0;d.isout=1;d.out.call(d,c)}this[f]=1;this[f=="isout"?"isover":"isout"]=0;this[f=="isover"?"over":"out"].call(this,c);if(d&&f=="isout"){d.isout=0;d.isover=1;d.over.call(d,c)}})}};a.ui.plugin.add("droppable","activeClass",{activate:function(c,b){a(this).addClass(b.options.activeClass)},deactivate:function(c,b){a(this).removeClass(b.options.activeClass)},drop:function(c,b){a(this).removeClass(b.options.activeClass)}});a.ui.plugin.add("droppable","hoverClass",{over:function(c,b){a(this).addClass(b.options.hoverClass)},out:function(c,b){a(this).removeClass(b.options.hoverClass)},drop:function(c,b){a(this).removeClass(b.options.hoverClass)}})})(jQuery);(function(a){a.widget("ui.resizable",a.extend({},a.ui.mouse,{init:function(){var v=this,m=this.options;var p=this.element.css("position");this.originalElement=this.element;this.element.addClass("ui-resizable").css({position:/static/.test(p)?"relative":p});a.extend(m,{_aspectRatio:!!(m.aspectRatio),helper:m.helper||m.ghost||m.animate?m.helper||"proxy":null,knobHandles:m.knobHandles===true?"ui-resizable-knob-handle":m.knobHandles});var d="1px solid #DEDEDE";m.defaultTheme={"ui-resizable":{display:"block"},"ui-resizable-handle":{position:"absolute",background:"#F2F2F2",fontSize:"0.1px"},"ui-resizable-n":{cursor:"n-resize",height:"4px",left:"0px",right:"0px",borderTop:d},"ui-resizable-s":{cursor:"s-resize",height:"4px",left:"0px",right:"0px",borderBottom:d},"ui-resizable-e":{cursor:"e-resize",width:"4px",top:"0px",bottom:"0px",borderRight:d},"ui-resizable-w":{cursor:"w-resize",width:"4px",top:"0px",bottom:"0px",borderLeft:d},"ui-resizable-se":{cursor:"se-resize",width:"4px",height:"4px",borderRight:d,borderBottom:d},"ui-resizable-sw":{cursor:"sw-resize",width:"4px",height:"4px",borderBottom:d,borderLeft:d},"ui-resizable-ne":{cursor:"ne-resize",width:"4px",height:"4px",borderRight:d,borderTop:d},"ui-resizable-nw":{cursor:"nw-resize",width:"4px",height:"4px",borderLeft:d,borderTop:d}};m.knobTheme={"ui-resizable-handle":{background:"#F2F2F2",border:"1px solid #808080",height:"8px",width:"8px"},"ui-resizable-n":{cursor:"n-resize",top:"0px",left:"45%"},"ui-resizable-s":{cursor:"s-resize",bottom:"0px",left:"45%"},"ui-resizable-e":{cursor:"e-resize",right:"0px",top:"45%"},"ui-resizable-w":{cursor:"w-resize",left:"0px",top:"45%"},"ui-resizable-se":{cursor:"se-resize",right:"0px",bottom:"0px"},"ui-resizable-sw":{cursor:"sw-resize",left:"0px",bottom:"0px"},"ui-resizable-nw":{cursor:"nw-resize",left:"0px",top:"0px"},"ui-resizable-ne":{cursor:"ne-resize",right:"0px",top:"0px"}};m._nodeName=this.element[0].nodeName;if(m._nodeName.match(/canvas|textarea|input|select|button|img/i)){var u=this.element;if(/relative/.test(u.css("position"))&&a.browser.opera){u.css({position:"relative",top:"auto",left:"auto"})}u.wrap(a('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({position:u.css("position"),width:u.outerWidth(),height:u.outerHeight(),top:u.css("top"),left:u.css("left")}));var c=this.element;this.element=this.element.parent();this.element.data("resizable",this);this.element.css({marginLeft:c.css("marginLeft"),marginTop:c.css("marginTop"),marginRight:c.css("marginRight"),marginBottom:c.css("marginBottom")});c.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});if(a.browser.safari&&m.preventDefault){c.css("resize","none")}m.proportionallyResize=c.css({position:"static",zoom:1,display:"block"});this.element.css({margin:c.css("margin")});this._proportionallyResize()}if(!m.handles){m.handles=!a(".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(m.handles.constructor==String){m.zIndex=m.zIndex||1000;if(m.handles=="all"){m.handles="n,e,s,w,se,sw,ne,nw"}var h=m.handles.split(",");m.handles={};var b={handle:"position: absolute; display: none; overflow:hidden;",n:"top: 0pt; width:100%;",e:"right: 0pt; height:100%;",s:"bottom: 0pt; width:100%;",w:"left: 0pt; height:100%;",se:"bottom: 0pt; right: 0px;",sw:"bottom: 0pt; left: 0px;",ne:"top: 0pt; right: 0px;",nw:"top: 0pt; left: 0px;"};for(var f=0;f<h.length;f++){var g=a.trim(h[f]),r=m.defaultTheme,s="ui-resizable-"+g,k=!a.ui.css(s)&&!m.knobHandles,w=a.ui.css("ui-resizable-knob-handle"),j=a.extend(r[s],r["ui-resizable-handle"]),t=a.extend(m.knobTheme[s],!w?m.knobTheme["ui-resizable-handle"]:{});var q=/sw|se|ne|nw/.test(g)?{zIndex:++m.zIndex}:{};var e=(k?b[g]:""),l=a(['<div class="ui-resizable-handle ',s,'" style="',e,b.handle,'"></div>'].join("")).css(q);m.handles[g]=".ui-resizable-"+g;this.element.append(l.css(k?j:{}).css(m.knobHandles?t:{}).addClass(m.knobHandles?"ui-resizable-knob-handle":"").addClass(m.knobHandles))}if(m.knobHandles){this.element.addClass("ui-resizable-knob").css(!a.ui.css("ui-resizable-knob")?{}:{})}}this._renderAxis=function(x){x=x||this.element;for(var y in m.handles){if(m.handles[y].constructor==String){m.handles[y]=a(m.handles[y],this.element).show()}if(m.transparent){m.handles[y].css({opacity:0})}if(this.element.is(".ui-wrapper")&&m._nodeName.match(/textarea|input|select|button/i)){var z=a(m.handles[y],this.element),n=0;n=/sw|ne|nw|se|n|s/.test(y)?z.outerHeight():z.outerWidth();var o=["padding",/ne|nw|n/.test(y)?"Top":/se|sw|s/.test(y)?"Bottom":/^e$/.test(y)?"Right":"Left"].join("");if(!m.transparent){x.css(o,n)}this._proportionallyResize()}if(!a(m.handles[y]).length){continue}}};this._renderAxis(this.element);m._handles=a(".ui-resizable-handle",v.element);if(m.disableSelection){m._handles.each(function(n,o){a.ui.disableSelection(o)})}m._handles.mouseover(function(){if(!m.resizing){if(this.className){var i=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)}v.axis=m.axis=i&&i[1]?i[1]:"se"}});if(m.autoHide){m._handles.hide();a(v.element).addClass("ui-resizable-autohide").hover(function(){a(this).removeClass("ui-resizable-autohide");m._handles.show()},function(){if(!m.resizing){a(this).addClass("ui-resizable-autohide");m._handles.hide()}})}this.mouseInit()},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,options:this.options,originalSize:this.originalSize,originalPosition:this.originalPosition}},propagate:function(b,c){a.ui.plugin.call(this,b,[c,this.ui()]);if(b!="resize"){this.element.triggerHandler(["resize",b].join(""),[c,this.ui()],this.options[b])}},destroy:function(){var b=this.element,c=b.children(".ui-resizable").get(0);this.mouseDestroy();var d=function(e){a(e).removeClass("ui-resizable ui-resizable-disabled").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};d(b);if(b.is(".ui-wrapper")&&c){b.parent().append(a(c).css({position:b.css("position"),width:b.outerWidth(),height:b.outerHeight(),top:b.css("top"),left:b.css("left")})).end().remove();d(c)}},mouseStart:function(l){if(this.options.disabled){return false}var m=false;for(var b in this.options.handles){if(a(this.options.handles[b])[0]==l.target){m=true}}if(!m){return false}var f=this.options,c=this.element.position(),j=this.element,n=function(e){return parseInt(e,10)||0},g=a.browser.msie&&a.browser.version<7;f.resizing=true;f.documentScroll={top:a(document).scrollTop(),left:a(document).scrollLeft()};if(j.is(".ui-draggable")||(/absolute/).test(j.css("position"))){var d=a.browser.msie&&!f.containment&&(/absolute/).test(j.css("position"))&&!(/relative/).test(j.parent().css("position"));var k=d?f.documentScroll.top:0,h=d?f.documentScroll.left:0;j.css({position:"absolute",top:(c.top+k),left:(c.left+h)})}if(a.browser.opera&&/relative/.test(j.css("position"))){j.css({position:"relative",top:"auto",left:"auto"})}this._renderProxy();var p=n(this.helper.css("left")),q=n(this.helper.css("top"));if(f.containment){p+=a(f.containment).scrollLeft()||0;q+=a(f.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:p,top:q};this.size=f.helper||g?{width:j.outerWidth(),height:j.outerHeight()}:{width:j.width(),height:j.height()};this.originalSize=f.helper||g?{width:j.outerWidth(),height:j.outerHeight()}:{width:j.width(),height:j.height()};this.originalPosition={left:p,top:q};this.sizeDiff={width:j.outerWidth()-j.width(),height:j.outerHeight()-j.height()};this.originalMousePosition={left:l.pageX,top:l.pageY};f.aspectRatio=(typeof f.aspectRatio=="number")?f.aspectRatio:((this.originalSize.height/this.originalSize.width)||1);if(f.preserveCursor){a("body").css("cursor",this.axis+"-resize")}this.propagate("start",l);return true},mouseDrag:function(l){var j=this.helper,f=this.options,c={},n=this,g=this.originalMousePosition,h=this.axis;var m=(l.pageX-g.left)||0,p=(l.pageY-g.top)||0;var b=this._change[h];if(!b){return false}var i=b.apply(this,[l,m,p]),d=a.browser.msie&&a.browser.version<7,k=this.sizeDiff;if(f._aspectRatio||l.shiftKey){i=this._updateRatio(i,l)}i=this._respectSize(i,l);this.propagate("resize",l);j.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});if(!f.helper&&f.proportionallyResize){this._proportionallyResize()}this._updateCache(i);this.element.triggerHandler("resize",[l,this.ui()],this.options.resize);return false},mouseStop:function(i){this.options.resizing=false;var f=this.options,l=function(e){return parseInt(e,10)||0},m=this;if(f.helper){var k=f.proportionallyResize,g=k&&(/textarea/i).test(k.get(0).nodeName),c=g&&a.ui.hasScroll(k.get(0),"left")?0:m.sizeDiff.height,j=g?0:m.sizeDiff.width;var h={width:(m.size.width-j),height:(m.size.height-c)},d=(parseInt(m.element.css("left"),10)+(m.position.left-m.originalPosition.left))||null,b=(parseInt(m.element.css("top"),10)+(m.position.top-m.originalPosition.top))||null;if(!f.animate){this.element.css(a.extend(h,{top:b,left:d}))}if(f.helper&&!f.animate){this._proportionallyResize()}}if(f.preserveCursor){a("body").css("cursor","auto")}this.propagate("stop",i);if(f.helper){this.helper.remove()}return false},_updateCache:function(c){var b=this.options;this.offset=this.helper.offset();if(c.left){this.position.left=c.left}if(c.top){this.position.top=c.top}if(c.height){this.size.height=c.height}if(c.width){this.size.width=c.width}},_updateRatio:function(h,g){var c=this.options,f=this.position,b=this.size,d=this.axis;if(h.height){h.width=(b.height/c.aspectRatio)}else{if(h.width){h.height=(b.width*c.aspectRatio)}}if(d=="sw"){h.left=f.left+(b.width-h.width);h.top=null}if(d=="nw"){h.top=f.top+(b.height-h.height);h.left=f.left+(b.width-h.width)}return h},_respectSize:function(d,h){var f=this.helper,b=this.options,m=b._aspectRatio||h.shiftKey,c=this.axis,q=d.width&&b.maxWidth&&b.maxWidth<d.width,l=d.height&&b.maxHeight&&b.maxHeight<d.height,g=d.width&&b.minWidth&&b.minWidth>d.width,k=d.height&&b.minHeight&&b.minHeight>d.height;if(g){d.width=b.minWidth}if(k){d.height=b.minHeight}if(q){d.width=b.maxWidth}if(l){d.height=b.maxHeight}var j=this.originalPosition.left+this.originalSize.width,n=this.position.top+this.size.height;var i=/sw|nw|w/.test(c),r=/nw|ne|n/.test(c);if(g&&i){d.left=j-b.minWidth}if(q&&i){d.left=j-b.maxWidth}if(k&&r){d.top=n-b.minHeight}if(l&&r){d.top=n-b.maxHeight}var p=!d.width&&!d.height;if(p&&!d.left&&d.top){d.top=null}else{if(p&&!d.top&&d.left){d.left=null}}return d},_proportionallyResize:function(){var c=this.options;if(!c.proportionallyResize){return}var f=c.proportionallyResize,d=this.helper||this.element;if(!c.borderDif){var e=[f.css("borderTopWidth"),f.css("borderRightWidth"),f.css("borderBottomWidth"),f.css("borderLeftWidth")],g=[f.css("paddingTop"),f.css("paddingRight"),f.css("paddingBottom"),f.css("paddingLeft")];c.borderDif=a.map(e,function(h,k){var j=parseInt(h,10)||0,b=parseInt(g[k],10)||0;return j+b})}f.css({height:(d.height()-c.borderDif[0]-c.borderDif[2])+"px",width:(d.width()-c.borderDif[1]-c.borderDif[3])+"px"})},_renderProxy:function(){var d=this.element,c=this.options;this.elementOffset=d.offset();if(c.helper){this.helper=this.helper||a('<div style="overflow:hidden;"></div>');var f=a.browser.msie&&a.browser.version<7,b=(f?1:0),e=(f?2:-1);this.helper.addClass(c.helper).css({width:d.outerWidth()+e,height:d.outerHeight()+e,position:"absolute",left:this.elementOffset.left-b+"px",top:this.elementOffset.top-b+"px",zIndex:++c.zIndex});this.helper.appendTo("body");if(c.disableSelection){a.ui.disableSelection(this.helper.get(0))}}else{this.helper=d}},_change:{e:function(c,d,b){return{width:this.originalSize.width+d}},w:function(g,h,f){var c=this.options,d=this.originalSize,b=this.originalPosition;return{left:b.left+h,width:d.width-h}},n:function(g,h,f){var c=this.options,d=this.originalSize,b=this.originalPosition;return{top:b.top+f,height:d.height-f}},s:function(c,d,b){return{height:this.originalSize.height+b}},se:function(c,d,b){return a.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[c,d,b]))},sw:function(c,d,b){return a.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[c,d,b]))},ne:function(c,d,b){return a.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[c,d,b]))},nw:function(c,d,b){return a.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[c,d,b]))}}}));a.extend(a.ui.resizable,{defaults:{cancel:":input",distance:1,delay:0,preventDefault:true,transparent:false,minWidth:10,minHeight:10,aspectRatio:false,disableSelection:true,preserveCursor:true,autoHide:false,knobHandles:false}});a.ui.plugin.add("resizable","containment",{start:function(i,j){var c=j.options,n=a(this).data("resizable"),g=n.element;var m=c.containment,l=(m instanceof a)?m.get(0):(/parent/.test(m))?g.parent().get(0):m;if(!l){return}n.containerElement=a(l);if(/document/.test(m)||m==document){n.containerOffset={left:0,top:0};n.containerPosition={left:0,top:0};n.parentData={element:a(document),left:0,top:0,width:a(document).width(),height:a(document).height()||document.body.parentNode.scrollHeight}}else{n.containerOffset=a(l).offset();n.containerPosition=a(l).position();n.containerSize={height:a(l).innerHeight(),width:a(l).innerWidth()};var d=n.containerOffset,k=n.containerSize.height,f=n.containerSize.width,b=(a.ui.hasScroll(l,"left")?l.scrollWidth:f),h=(a.ui.hasScroll(l)?l.scrollHeight:k);n.parentData={element:l,left:d.left,top:d.top,width:b,height:h}}},resize:function(i,j){var f=j.options,n=a(this).data("resizable"),b=n.containerSize,g=n.containerOffset,m=n.size,k=n.position,l=f._aspectRatio||i.shiftKey,p={top:0,left:0},d=n.containerElement;if(d[0]!=document&&/static/.test(d.css("position"))){p=n.containerPosition}if(k.left<(f.helper?g.left:p.left)){n.size.width=n.size.width+(f.helper?(n.position.left-g.left):(n.position.left-p.left));if(l){n.size.height=n.size.width*f.aspectRatio}n.position.left=f.helper?g.left:p.left}if(k.top<(f.helper?g.top:0)){n.size.height=n.size.height+(f.helper?(n.position.top-g.top):n.position.top);if(l){n.size.width=n.size.height/f.aspectRatio}n.position.top=f.helper?g.top:0}var h=(f.helper?n.offset.left-g.left:(n.position.left-p.left))+n.sizeDiff.width,c=(f.helper?n.offset.top-g.top:n.position.top)+n.sizeDiff.height;if(h+n.size.width>=n.parentData.width){n.size.width=n.parentData.width-h;if(l){n.size.height=n.size.width*f.aspectRatio}}if(c+n.size.height>=n.parentData.height){n.size.height=n.parentData.height-c;if(l){n.size.width=n.size.height/f.aspectRatio}}},stop:function(i,j){var f=j.options,m=a(this).data("resizable"),k=m.position,g=m.containerOffset,l=m.containerPosition,d=m.containerElement;var c=a(m.helper),b=c.offset(),n=c.innerWidth(),p=c.innerHeight();if(f.helper&&!f.animate&&/relative/.test(d.css("position"))){a(this).css({left:(b.left-g.left),top:(b.top-g.top),width:n,height:p})}if(f.helper&&!f.animate&&/static/.test(d.css("position"))){a(this).css({left:l.left+(b.left-g.left),top:l.top+(b.top-g.top),width:n,height:p})}}});a.ui.plugin.add("resizable","grid",{resize:function(g,h){var c=h.options,m=a(this).data("resizable"),l=m.size,j=m.originalSize,f=m.originalPosition,d=m.axis,i=c._aspectRatio||g.shiftKey;c.grid=typeof c.grid=="number"?[c.grid,c.grid]:c.grid;var b=Math.round((l.width-j.width)/(c.grid[0]||1))*(c.grid[0]||1),k=Math.round((l.height-j.height)/(c.grid[1]||1))*(c.grid[1]||1);if(/^(se|s|e)$/.test(d)){m.size.width=j.width+b;m.size.height=j.height+k}else{if(/^(ne)$/.test(d)){m.size.width=j.width+b;m.size.height=j.height+k;m.position.top=f.top-k}else{if(/^(sw)$/.test(d)){m.size.width=j.width+b;m.size.height=j.height+k;m.position.left=f.left-b}else{m.size.width=j.width+b;m.size.height=j.height+k;m.position.top=f.top-k;m.position.left=f.left-b}}}}});a.ui.plugin.add("resizable","animate",{stop:function(i,j){var f=j.options,m=a(this).data("resizable");var k=f.proportionallyResize,g=k&&(/textarea/i).test(k.get(0).nodeName),c=g&&a.ui.hasScroll(k.get(0),"left")?0:m.sizeDiff.height,h=g?0:m.sizeDiff.width;var l={width:(m.size.width-h),height:(m.size.height-c)},d=(parseInt(m.element.css("left"),10)+(m.position.left-m.originalPosition.left))||null,b=(parseInt(m.element.css("top"),10)+(m.position.top-m.originalPosition.top))||null;m.element.animate(a.extend(l,b&&d?{top:b,left:d}:{}),{duration:f.animateDuration||"slow",easing:f.animateEasing||"swing",step:function(){var e={width:parseInt(m.element.css("width"),10),height:parseInt(m.element.css("height"),10),top:parseInt(m.element.css("top"),10),left:parseInt(m.element.css("left"),10)};if(k){k.css({width:e.width,height:e.height})}m._updateCache(e);m.propagate("animate",i)}})}});a.ui.plugin.add("resizable","ghost",{start:function(h,d){var c=d.options,g=a(this).data("resizable"),b=c.proportionallyResize,f=g.size;if(!b){g.ghost=g.element.clone()}else{g.ghost=b.clone()}g.ghost.css({opacity:0.25,display:"block",position:"relative",height:f.height,width:f.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof c.ghost=="string"?c.ghost:"");g.ghost.appendTo(g.helper)},resize:function(g,d){var c=d.options,f=a(this).data("resizable"),b=c.proportionallyResize;if(f.ghost){f.ghost.css({position:"relative",height:f.size.height,width:f.size.width})}},stop:function(g,d){var c=d.options,f=a(this).data("resizable"),b=c.proportionallyResize;if(f.ghost&&f.helper){f.helper.get(0).removeChild(f.ghost.get(0))}}});a.ui.plugin.add("resizable","alsoResize",{start:function(f,c){var b=c.options,d=a(this).data("resizable"),g=function(e){a(e).each(function(){a(this).data("resizable-alsoresize",{width:parseInt(a(this).width(),10),height:parseInt(a(this).height(),10),left:parseInt(a(this).css("left"),10),top:parseInt(a(this).css("top"),10)})})};if(typeof(b.alsoResize)=="object"){if(b.alsoResize.length){b.alsoResize=b.alsoResize[0];g(b.alsoResize)}else{a.each(b.alsoResize,function(e,h){g(e)})}}else{g(b.alsoResize)}},resize:function(g,h){var c=h.options,j=a(this).data("resizable"),i=j.originalSize,f=j.originalPosition;var b={height:(j.size.height-i.height)||0,width:(j.size.width-i.width)||0,top:(j.position.top-f.top)||0,left:(j.position.left-f.left)||0},d=function(e,k){a(e).each(function(){var n=a(this).data("resizable-alsoresize"),m={},l=k&&k.length?k:["width","height","top","left"];a.each(l||["width","height","top","left"],function(o,q){var p=(n[q]||0)+(b[q]||0);if(p&&p>=0){m[q]=p||null}});a(this).css(m)})};if(typeof(c.alsoResize)=="object"){a.each(c.alsoResize,function(e,k){d(e,k)})}else{d(c.alsoResize)}},stop:function(c,b){a(this).removeData("resizable-alsoresize-start")}})})(jQuery);(function(a){a.widget("ui.selectable",a.extend({},a.ui.mouse,{init:function(){var c=this;this.element.addClass("ui-selectable");this.dragged=false;var b;this.refresh=function(){b=a(c.options.filter,c.element[0]);b.each(function(){var e=a(this);var d=e.offset();a.data(this,"selectable-item",{element:this,$element:e,left:d.left,top:d.top,right:d.left+e.width(),bottom:d.top+e.height(),startselected:false,selected:e.hasClass("ui-selected"),selecting:e.hasClass("ui-selecting"),unselecting:e.hasClass("ui-unselecting")})})};this.refresh();this.selectees=b.addClass("ui-selectee");this.mouseInit();this.helper=a(document.createElement("div")).css({border:"1px dotted black"})},toggle:function(){if(this.options.disabled){this.enable()}else{this.disable()}},destroy:function(){this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable");this.mouseDestroy()},mouseStart:function(d){var c=this;this.opos=[d.pageX,d.pageY];if(this.options.disabled){return}var f=this.options;this.selectees=a(f.filter,this.element[0]);this.element.triggerHandler("selectablestart",[d,{selectable:this.element[0],options:f}],f.start);a("body").append(this.helper);this.helper.css({"z-index":100,position:"absolute",left:d.clientX,top:d.clientY,width:0,height:0});if(f.autoRefresh){this.refresh()}this.selectees.filter(".ui-selected").each(function(){var e=a.data(this,"selectable-item");e.startselected=true;if(!d.ctrlKey){e.$element.removeClass("ui-selected");e.selected=false;e.$element.addClass("ui-unselecting");e.unselecting=true;c.element.triggerHandler("selectableunselecting",[d,{selectable:c.element[0],unselecting:e.element,options:f}],f.unselecting)}});var b=false;a(d.target).parents().andSelf().each(function(){if(a.data(this,"selectable-item")){b=true}});return this.options.keyboard?!b:true},mouseDrag:function(g){var h=this;this.dragged=true;if(this.options.disabled){return}var b=this.options;var i=this.opos[0],j=this.opos[1],d=g.pageX,f=g.pageY;if(i>d){var c=d;d=i;i=c}if(j>f){var c=f;f=j;j=c}this.helper.css({left:i,top:j,width:d-i,height:f-j});this.selectees.each(function(){var e=a.data(this,"selectable-item");if(!e||e.element==h.element[0]){return}var k=false;if(b.tolerance=="touch"){k=(!(e.left>d||e.right<i||e.top>f||e.bottom<j))}else{if(b.tolerance=="fit"){k=(e.left>i&&e.right<d&&e.top>j&&e.bottom<f)}}if(k){if(e.selected){e.$element.removeClass("ui-selected");e.selected=false}if(e.unselecting){e.$element.removeClass("ui-unselecting");e.unselecting=false}if(!e.selecting){e.$element.addClass("ui-selecting");e.selecting=true;h.element.triggerHandler("selectableselecting",[g,{selectable:h.element[0],selecting:e.element,options:b}],b.selecting)}}else{if(e.selecting){if(g.ctrlKey&&e.startselected){e.$element.removeClass("ui-selecting");e.selecting=false;e.$element.addClass("ui-selected");e.selected=true}else{e.$element.removeClass("ui-selecting");e.selecting=false;if(e.startselected){e.$element.addClass("ui-unselecting");e.unselecting=true}h.element.triggerHandler("selectableunselecting",[g,{selectable:h.element[0],unselecting:e.element,options:b}],b.unselecting)}}if(e.selected){if(!g.ctrlKey&&!e.startselected){e.$element.removeClass("ui-selected");e.selected=false;e.$element.addClass("ui-unselecting");e.unselecting=true;h.element.triggerHandler("selectableunselecting",[g,{selectable:h.element[0],unselecting:e.element,options:b}],b.unselecting)}}}});return false},mouseStop:function(c){var b=this;this.dragged=false;var d=this.options;a(".ui-unselecting",this.element[0]).each(function(){var e=a.data(this,"selectable-item");e.$element.removeClass("ui-unselecting");e.unselecting=false;e.startselected=false;b.element.triggerHandler("selectableunselected",[c,{selectable:b.element[0],unselected:e.element,options:d}],d.unselected)});a(".ui-selecting",this.element[0]).each(function(){var e=a.data(this,"selectable-item");e.$element.removeClass("ui-selecting").addClass("ui-selected");e.selecting=false;e.selected=true;e.startselected=true;b.element.triggerHandler("selectableselected",[c,{selectable:b.element[0],selected:e.element,options:d}],d.selected)});this.element.triggerHandler("selectablestop",[c,{selectable:b.element[0],options:this.options}],this.options.stop);this.helper.remove();return false}}));a.extend(a.ui.selectable,{defaults:{distance:1,delay:0,cancel:":input",appendTo:"body",autoRefresh:true,filter:"*",tolerance:"touch"}})})(jQuery);(function(a){function b(d,e){var c=a.browser.safari&&a.browser.version<522;if(d.contains&&!c){return d.contains(e)}if(d.compareDocumentPosition){return !!(d.compareDocumentPosition(e)&16)}while(e=e.parentNode){if(e==d){return true}}return false}a.widget("ui.sortable",a.extend({},a.ui.mouse,{init:function(){var c=this.options;this.containerCache={};this.element.addClass("ui-sortable");this.refresh();this.floating=this.items.length?(/left|right/).test(this.items[0].item.css("float")):false;if(!(/(relative|absolute|fixed)/).test(this.element.css("position"))){this.element.css("position","relative")}this.offset=this.element.offset();this.mouseInit()},plugins:{},ui:function(c){return{helper:(c||this)["helper"],placeholder:(c||this)["placeholder"]||a([]),position:(c||this)["position"],absolutePosition:(c||this)["positionAbs"],options:this.options,element:this.element,item:(c||this)["currentItem"],sender:c?c.element:null}},propagate:function(c,f,d,g){a.ui.plugin.call(this,c,[f,this.ui(d)]);if(!g){this.element.triggerHandler(c=="sort"?c:"sort"+c,[f,this.ui(d)],this.options[c])}},serialize:function(c){var e=(a.isFunction(this.options.items)?this.options.items.call(this.element):a(this.options.items,this.element)).not(".ui-sortable-helper");var d=[];c=c||{};e.each(function(){var f=(a(this).attr(c.attribute||"id")||"").match(c.expression||(/(.+)[-=_](.+)/));if(f){d.push((c.key||f[1])+"[]="+(c.key&&c.expression?f[1]:f[2]))}});return d.join("&")},toArray:function(d){var c=(a.isFunction(this.options.items)?this.options.items.call(this.element):a(this.options.items,this.element)).not(".ui-sortable-helper");var e=[];c.each(function(){e.push(a(this).attr(d||"id"))});return e},intersectsWith:function(d){var j=this.positionAbs.left,e=j+this.helperProportions.width,k=this.positionAbs.top,f=k+this.helperProportions.height;var c=d.left,h=c+d.width,i=d.top,g=i+d.height;if(this.options.tolerance=="pointer"||this.options.forcePointerForContainers||(this.options.tolerance=="guess"&&this.helperProportions[this.floating?"width":"height"]>d[this.floating?"width":"height"])){return(k+this.offset.click.top>i&&k+this.offset.click.top<g&&j+this.offset.click.left>c&&j+this.offset.click.left<h)}else{return(c<j+(this.helperProportions.width/2)&&e-(this.helperProportions.width/2)<h&&i<k+(this.helperProportions.height/2)&&f-(this.helperProportions.height/2)<g)}},intersectsWithEdge:function(d){var j=this.positionAbs.left,e=j+this.helperProportions.width,k=this.positionAbs.top,f=k+this.helperProportions.height;var c=d.left,h=c+d.width,i=d.top,g=i+d.height;if(this.options.tolerance=="pointer"||(this.options.tolerance=="guess"&&this.helperProportions[this.floating?"width":"height"]>d[this.floating?"width":"height"])){if(!(k+this.offset.click.top>i&&k+this.offset.click.top<g&&j+this.offset.click.left>c&&j+this.offset.click.left<h)){return false}if(this.floating){if(j+this.offset.click.left>c&&j+this.offset.click.left<c+d.width/2){return 2}if(j+this.offset.click.left>c+d.width/2&&j+this.offset.click.left<h){return 1}}else{if(k+this.offset.click.top>i&&k+this.offset.click.top<i+d.height/2){return 2}if(k+this.offset.click.top>i+d.height/2&&k+this.offset.click.top<g){return 1}}}else{if(!(c<j+(this.helperProportions.width/2)&&e-(this.helperProportions.width/2)<h&&i<k+(this.helperProportions.height/2)&&f-(this.helperProportions.height/2)<g)){return false}if(this.floating){if(e>c&&j<c){return 2}if(j<h&&e>h){return 1}}else{if(f>i&&k<i){return 1}if(k<g&&f>g){return 2}}}return false},refresh:function(){this.refreshItems();this.refreshPositions()},refreshItems:function(){this.items=[];this.containers=[this];var f=this.items;var g=this;var k=[[a.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):a(this.options.items,this.element),this]];if(this.options.connectWith){for(var d=this.options.connectWith.length-1;d>=0;d--){var e=a(this.options.connectWith[d]);for(var h=e.length-1;h>=0;h--){var c=a.data(e[h],"sortable");if(c&&!c.options.disabled){k.push([a.isFunction(c.options.items)?c.options.items.call(c.element):a(c.options.items,c.element),c]);this.containers.push(c)}}}}for(var d=k.length-1;d>=0;d--){k[d][0].each(function(){a.data(this,"sortable-item",k[d][1]);f.push({item:a(this),instance:k[d][1],width:0,height:0,left:0,top:0})})}},refreshPositions:function(g){if(this.offsetParent){var c=this.offsetParent.offset();this.offset.parent={top:c.top+this.offsetParentBorders.top,left:c.left+this.offsetParentBorders.left}}for(var f=this.items.length-1;f>=0;f--){if(this.items[f].instance!=this.currentContainer&&this.currentContainer&&this.items[f].item[0]!=this.currentItem[0]){continue}var d=this.options.toleranceElement?a(this.options.toleranceElement,this.items[f].item):this.items[f].item;if(!g){this.items[f].width=d[0].offsetWidth;this.items[f].height=d[0].offsetHeight}var e=d.offset();this.items[f].left=e.left;this.items[f].top=e.top}if(this.options.custom&&this.options.custom.refreshContainers){this.options.custom.refreshContainers.call(this)}else{for(var f=this.containers.length-1;f>=0;f--){var e=this.containers[f].element.offset();this.containers[f].containerCache.left=e.left;this.containers[f].containerCache.top=e.top;this.containers[f].containerCache.width=this.containers[f].element.outerWidth();this.containers[f].containerCache.height=this.containers[f].element.outerHeight()}}},destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").removeData("sortable").unbind(".sortable");this.mouseDestroy();for(var c=this.items.length-1;c>=0;c--){this.items[c].item.removeData("sortable-item")}},createPlaceholder:function(c){var f=c||this,d=f.options;if(d.placeholder.constructor==String){var e=d.placeholder;d.placeholder={element:function(){return a("<div></div>").addClass(e)[0]},update:function(g,h){h.css(g.offset()).css({width:g.outerWidth(),height:g.outerHeight()})}}}f.placeholder=a(d.placeholder.element.call(f.element,f.currentItem)).appendTo("body").css({position:"absolute"});d.placeholder.update.call(f.element,f.currentItem,f.placeholder)},contactContainers:function(k){for(var h=this.containers.length-1;h>=0;h--){if(this.intersectsWith(this.containers[h].containerCache)){if(!this.containers[h].containerCache.over){if(this.currentContainer!=this.containers[h]){var d=10000;var g=null;var f=this.positionAbs[this.containers[h].floating?"left":"top"];for(var c=this.items.length-1;c>=0;c--){if(!b(this.containers[h].element[0],this.items[c].item[0])){continue}var l=this.items[c][this.containers[h].floating?"left":"top"];if(Math.abs(l-f)<d){d=Math.abs(l-f);g=this.items[c]}}if(!g&&!this.options.dropOnEmpty){continue}if(this.placeholder){this.placeholder.remove()}if(this.containers[h].options.placeholder){this.containers[h].createPlaceholder(this)}else{this.placeholder=null}this.currentContainer=this.containers[h];g?this.rearrange(k,g,null,true):this.rearrange(k,null,this.containers[h].element,true);this.propagate("change",k);this.containers[h].propagate("change",k,this)}this.containers[h].propagate("over",k,this);this.containers[h].containerCache.over=1}}else{if(this.containers[h].containerCache.over){this.containers[h].propagate("out",k,this);this.containers[h].containerCache.over=0}}}},mouseCapture:function(i,f){if(this.options.disabled||this.options.type=="static"){return false}this.refreshItems();var d=null,h=this,g=a(i.target).parents().each(function(){if(a.data(this,"sortable-item")==h){d=a(this);return false}});if(a.data(i.target,"sortable-item")==h){d=a(i.target)}if(!d){return false}if(this.options.handle&&!f){var c=false;a(this.options.handle,d).find("*").andSelf().each(function(){if(this==i.target){c=true}});if(!c){return false}}this.currentItem=d;return true},mouseStart:function(g,k,j){var d=this.options;this.currentContainer=this;this.refreshPositions();this.helper=typeof d.helper=="function"?a(d.helper.apply(this.element[0],[g,this.currentItem])):this.currentItem.clone();if(!this.helper.parents("body").length){a(d.appendTo!="parent"?d.appendTo:this.currentItem[0].parentNode)[0].appendChild(this.helper[0])}this.helper.css({position:"absolute",clear:"both"}).addClass("ui-sortable-helper");this.margins={left:(parseInt(this.currentItem.css("marginLeft"),10)||0),top:(parseInt(this.currentItem.css("marginTop"),10)||0)};this.offset=this.currentItem.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};this.offset.click={left:g.pageX-this.offset.left,top:g.pageY-this.offset.top};this.offsetParent=this.helper.offsetParent();var h=this.offsetParent.offset();this.offsetParentBorders={top:(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)};this.offset.parent={top:h.top+this.offsetParentBorders.top,left:h.left+this.offsetParentBorders.left};this.originalPosition=this.generatePosition(g);this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()};if(d.placeholder){this.createPlaceholder()}this.propagate("start",g);this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()};if(d.cursorAt){if(d.cursorAt.left!=undefined){this.offset.click.left=d.cursorAt.left}if(d.cursorAt.right!=undefined){this.offset.click.left=this.helperProportions.width-d.cursorAt.right}if(d.cursorAt.top!=undefined){this.offset.click.top=d.cursorAt.top}if(d.cursorAt.bottom!=undefined){this.offset.click.top=this.helperProportions.height-d.cursorAt.bottom}}if(d.containment){if(d.containment=="parent"){d.containment=this.helper[0].parentNode}if(d.containment=="document"||d.containment=="window"){this.containment=[0-this.offset.parent.left,0-this.offset.parent.top,a(d.containment=="document"?document:window).width()-this.offset.parent.left-this.helperProportions.width-this.margins.left-(parseInt(this.element.css("marginRight"),10)||0),(a(d.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.offset.parent.top-this.helperProportions.height-this.margins.top-(parseInt(this.element.css("marginBottom"),10)||0)]}if(!(/^(document|window|parent)$/).test(d.containment)){var l=a(d.containment)[0];var f=a(d.containment).offset();this.containment=[f.left+(parseInt(a(l).css("borderLeftWidth"),10)||0)-this.offset.parent.left,f.top+(parseInt(a(l).css("borderTopWidth"),10)||0)-this.offset.parent.top,f.left+Math.max(l.scrollWidth,l.offsetWidth)-(parseInt(a(l).css("borderLeftWidth"),10)||0)-this.offset.parent.left-this.helperProportions.width-this.margins.left-(parseInt(this.currentItem.css("marginRight"),10)||0),f.top+Math.max(l.scrollHeight,l.offsetHeight)-(parseInt(a(l).css("borderTopWidth"),10)||0)-this.offset.parent.top-this.helperProportions.height-this.margins.top-(parseInt(this.currentItem.css("marginBottom"),10)||0)]}}if(this.options.placeholder!="clone"){this.currentItem.css("visibility","hidden")}if(!j){for(var c=this.containers.length-1;c>=0;c--){this.containers[c].propagate("activate",g,this)}}if(a.ui.ddmanager){a.ui.ddmanager.current=this}if(a.ui.ddmanager&&!d.dropBehaviour){a.ui.ddmanager.prepareOffsets(this,g)}this.dragging=true;this.mouseDrag(g);return true},convertPositionTo:function(e,c){if(!c){c=this.position}var f=e=="absolute"?1:-1;return{top:(c.top+this.offset.parent.top*f-(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)*f+this.margins.top*f),left:(c.left+this.offset.parent.left*f-(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft)*f+this.margins.left*f)}},generatePosition:function(g){var c=this.options;var h={top:(g.pageY-this.offset.click.top-this.offset.parent.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)),left:(g.pageX-this.offset.click.left-this.offset.parent.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft))};if(!this.originalPosition){return h}if(this.containment){if(h.left<this.containment[0]){h.left=this.containment[0]}if(h.top<this.containment[1]){h.top=this.containment[1]}if(h.left>this.containment[2]){h.left=this.containment[2]}if(h.top>this.containment[3]){h.top=this.containment[3]}}if(c.grid){var d=this.originalPosition.top+Math.round((h.top-this.originalPosition.top)/c.grid[1])*c.grid[1];h.top=this.containment?(!(d<this.containment[1]||d>this.containment[3])?d:(!(d<this.containment[1])?d-c.grid[1]:d+c.grid[1])):d;var f=this.originalPosition.left+Math.round((h.left-this.originalPosition.left)/c.grid[0])*c.grid[0];h.left=this.containment?(!(f<this.containment[0]||f>this.containment[2])?f:(!(f<this.containment[0])?f-c.grid[0]:f+c.grid[0])):f}return h},mouseDrag:function(f){this.position=this.generatePosition(f);this.positionAbs=this.convertPositionTo("absolute");a.ui.plugin.call(this,"sort",[f,this.ui()]);this.positionAbs=this.convertPositionTo("absolute");this.helper[0].style.left=this.position.left+"px";this.helper[0].style.top=this.position.top+"px";for(var d=this.items.length-1;d>=0;d--){var c=this.intersectsWithEdge(this.items[d]);if(!c){continue}if(this.items[d].item[0]!=this.currentItem[0]&&this.currentItem[c==1?"next":"prev"]()[0]!=this.items[d].item[0]&&!b(this.currentItem[0],this.items[d].item[0])&&(this.options.type=="semi-dynamic"?!b(this.element[0],this.items[d].item[0]):true)){this.direction=c==1?"down":"up";this.rearrange(f,this.items[d]);this.propagate("change",f);break}}this.contactContainers(f);if(a.ui.ddmanager){a.ui.ddmanager.drag(this,f)}this.element.triggerHandler("sort",[f,this.ui()],this.options.sort);return false},rearrange:function(h,g,d,j){d?d[0].appendChild(this.currentItem[0]):g.item[0].parentNode.insertBefore(this.currentItem[0],(this.direction=="down"?g.item[0]:g.item[0].nextSibling));this.counter=this.counter?++this.counter:1;var f=this,c=this.counter;window.setTimeout(function(){if(c==f.counter){f.refreshPositions(!j)}},0);if(this.options.placeholder){this.options.placeholder.update.call(this.element,this.currentItem,this.placeholder)}},mouseStop:function(f,c){if(a.ui.ddmanager&&!this.options.dropBehaviour){a.ui.ddmanager.drop(this,f)}if(this.options.revert){var d=this;var g=d.currentItem.offset();if(d.placeholder){d.placeholder.animate({opacity:"hide"},(parseInt(this.options.revert,10)||500)-50)}a(this.helper).animate({left:g.left-this.offset.parent.left-d.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:g.top-this.offset.parent.top-d.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){d.clear(f)})}else{this.clear(f,c)}return false},clear:function(f,c){if(this.domPosition.prev!=this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!=this.currentItem.parent()[0]){this.propagate("update",f,null,c)}if(!b(this.element[0],this.currentItem[0])){this.propagate("remove",f,null,c);for(var d=this.containers.length-1;d>=0;d--){if(b(this.containers[d].element[0],this.currentItem[0])){this.containers[d].propagate("update",f,this,c);this.containers[d].propagate("receive",f,this,c)}}}for(var d=this.containers.length-1;d>=0;d--){this.containers[d].propagate("deactivate",f,this,c);if(this.containers[d].containerCache.over){this.containers[d].propagate("out",f,this);this.containers[d].containerCache.over=0}}this.dragging=false;if(this.cancelHelperRemoval){this.propagate("stop",f,null,c);return false}a(this.currentItem).css("visibility","");if(this.placeholder){this.placeholder.remove()}this.helper.remove();this.helper=null;this.propagate("stop",f,null,c);return true}}));a.extend(a.ui.sortable,{getter:"serialize toArray",defaults:{helper:"clone",tolerance:"guess",distance:1,delay:0,scroll:true,scrollSensitivity:20,scrollSpeed:20,cancel:":input",items:"> *",zIndex:1000,dropOnEmpty:true,appendTo:"parent"}});a.ui.plugin.add("sortable","cursor",{start:function(f,d){var c=a("body");if(c.css("cursor")){d.options._cursor=c.css("cursor")}c.css("cursor",d.options.cursor)},stop:function(d,c){if(c.options._cursor){a("body").css("cursor",c.options._cursor)}}});a.ui.plugin.add("sortable","zIndex",{start:function(f,d){var c=d.helper;if(c.css("zIndex")){d.options._zIndex=c.css("zIndex")}c.css("zIndex",d.options.zIndex)},stop:function(d,c){if(c.options._zIndex){a(c.helper).css("zIndex",c.options._zIndex)}}});a.ui.plugin.add("sortable","opacity",{start:function(f,d){var c=d.helper;if(c.css("opacity")){d.options._opacity=c.css("opacity")}c.css("opacity",d.options.opacity)},stop:function(d,c){if(c.options._opacity){a(c.helper).css("opacity",c.options._opacity)}}});a.ui.plugin.add("sortable","scroll",{start:function(g,d){var c=d.options;var f=a(this).data("sortable");f.overflowY=function(e){do{if(/auto|scroll/.test(e.css("overflow"))||(/auto|scroll/).test(e.css("overflow-y"))){return e}e=e.parent()}while(e[0].parentNode);return a(document)}(f.currentItem);f.overflowX=function(e){do{if(/auto|scroll/.test(e.css("overflow"))||(/auto|scroll/).test(e.css("overflow-x"))){return e}e=e.parent()}while(e[0].parentNode);return a(document)}(f.currentItem);if(f.overflowY[0]!=document&&f.overflowY[0].tagName!="HTML"){f.overflowYOffset=f.overflowY.offset()}if(f.overflowX[0]!=document&&f.overflowX[0].tagName!="HTML"){f.overflowXOffset=f.overflowX.offset()}},sort:function(g,d){var c=d.options;var f=a(this).data("sortable");if(f.overflowY[0]!=document&&f.overflowY[0].tagName!="HTML"){if((f.overflowYOffset.top+f.overflowY[0].offsetHeight)-g.pageY<c.scrollSensitivity){f.overflowY[0].scrollTop=f.overflowY[0].scrollTop+c.scrollSpeed}if(g.pageY-f.overflowYOffset.top<c.scrollSensitivity){f.overflowY[0].scrollTop=f.overflowY[0].scrollTop-c.scrollSpeed}}else{if(g.pageY-a(document).scrollTop()<c.scrollSensitivity){a(document).scrollTop(a(document).scrollTop()-c.scrollSpeed)}if(a(window).height()-(g.pageY-a(document).scrollTop())<c.scrollSensitivity){a(document).scrollTop(a(document).scrollTop()+c.scrollSpeed)}}if(f.overflowX[0]!=document&&f.overflowX[0].tagName!="HTML"){if((f.overflowXOffset.left+f.overflowX[0].offsetWidth)-g.pageX<c.scrollSensitivity){f.overflowX[0].scrollLeft=f.overflowX[0].scrollLeft+c.scrollSpeed}if(g.pageX-f.overflowXOffset.left<c.scrollSensitivity){f.overflowX[0].scrollLeft=f.overflowX[0].scrollLeft-c.scrollSpeed}}else{if(g.pageX-a(document).scrollLeft()<c.scrollSensitivity){a(document).scrollLeft(a(document).scrollLeft()-c.scrollSpeed)}if(a(window).width()-(g.pageX-a(document).scrollLeft())<c.scrollSensitivity){a(document).scrollLeft(a(document).scrollLeft()+c.scrollSpeed)}}}});a.ui.plugin.add("sortable","axis",{sort:function(f,c){var d=a(this).data("sortable");if(c.options.axis=="y"){d.position.left=d.originalPosition.left}if(c.options.axis=="x"){d.position.top=d.originalPosition.top}}})})(jQuery);(function(b){b.widget("ui.accordion",{init:function(){var j=this.options;if(j.navigation){var h=this.element.find("a").filter(j.navigationFilter);if(h.length){if(h.filter(j.header).length){j.active=h}else{j.active=h.parent().parent().prev();h.addClass("current")}}}j.headers=this.element.find(j.header);j.active=f(j.headers,j.active);if(b.browser.msie){this.element.find("a").css("zoom","1")}if(!this.element.hasClass("ui-accordion")){this.element.addClass("ui-accordion");b("<span class='ui-accordion-left'/>").insertBefore(j.headers);b("<span class='ui-accordion-right'/>").appendTo(j.headers);j.headers.addClass("ui-accordion-header").attr("tabindex","0")}var g;if(j.fillSpace){g=this.element.parent().height();j.headers.each(function(){g-=b(this).outerHeight()});var i=0;j.headers.next().each(function(){i=Math.max(i,b(this).innerHeight()-b(this).height())}).height(g-i)}else{if(j.autoHeight){g=0;j.headers.next().each(function(){g=Math.max(g,b(this).outerHeight())}).height(g)}}j.headers.not(j.active||"").next().hide();j.active.parent().andSelf().addClass(j.selectedClass);if(j.event){this.element.bind((j.event)+".accordion",d)}},activate:function(g){d.call(this.element[0],{target:f(this.options.headers,g)[0]})},destroy:function(){this.options.headers.next().css("display","");if(this.options.fillSpace||this.options.autoHeight){this.options.headers.next().css("height","")}b.removeData(this.element[0],"accordion");this.element.removeClass("ui-accordion").unbind(".accordion")}});function e(h,g){return function(){return h.apply(g,arguments)}}function c(i){if(!b.data(this,"accordion")){return}var g=b.data(this,"accordion");var h=g.options;h.running=i?0:--h.running;if(h.running){return}if(h.clearStyle){h.toShow.add(h.toHide).css({height:"",overflow:""})}b(this).triggerHandler("accordionchange",[b.event.fix({type:"accordionchange",target:g.element[0]}),h.data],h.change)}function a(k,h,m,j,i){var l=b.data(this,"accordion").options;l.toShow=k;l.toHide=h;l.data=m;var g=e(c,this);l.running=h.size()===0?k.size():h.size();if(l.animated){if(!l.alwaysOpen&&j){b.ui.accordion.animations[l.animated]({toShow:jQuery([]),toHide:h,complete:g,down:i,autoHeight:l.autoHeight})}else{b.ui.accordion.animations[l.animated]({toShow:k,toHide:h,complete:g,down:i,autoHeight:l.autoHeight})}}else{if(!l.alwaysOpen&&j){k.toggle()}else{h.hide();k.show()}g(true)}}function d(i){var g=b.data(this,"accordion").options;if(g.disabled){return false}if(!i.target&&!g.alwaysOpen){g.active.parent().andSelf().toggleClass(g.selectedClass);var n=g.active.next(),j={options:g,newHeader:jQuery([]),oldHeader:g.active,newContent:jQuery([]),oldContent:n},h=(g.active=b([]));a.call(this,h,n,j);return false}var k=b(i.target);k=b(k.parents(g.header)[0]||k);var l=k[0]==g.active[0];if(g.running||(g.alwaysOpen&&l)){return false}if(!k.is(g.header)){return}g.active.parent().andSelf().toggleClass(g.selectedClass);if(!l){k.parent().andSelf().addClass(g.selectedClass)}var h=k.next(),n=g.active.next(),j={options:g,newHeader:k,oldHeader:g.active,newContent:h,oldContent:n},m=g.headers.index(g.active[0])>g.headers.index(k[0]);g.active=l?b([]):k;a.call(this,h,n,j,l,m);return false}function f(h,g){return g!=undefined?typeof g=="number"?h.filter(":eq("+g+")"):h.not(h.not(g)):g===false?b([]):h.filter(":eq(0)")}b.extend(b.ui.accordion,{defaults:{selectedClass:"selected",alwaysOpen:true,animated:"slide",event:"click",header:"a",autoHeight:true,running:0,navigationFilter:function(){return this.href.toLowerCase()==location.href.toLowerCase()}},animations:{slide:function(i,g){i=b.extend({easing:"swing",duration:300},i,g);if(!i.toHide.size()){i.toShow.animate({height:"show"},i);return}var k=i.toHide.height(),h=i.toShow.height(),j=h/k;i.toShow.css({height:0,overflow:"hidden"}).show();i.toHide.filter(":hidden").each(i.complete).end().filter(":visible").animate({height:"hide"},{step:function(m){var l=(k-m)*j;if(b.browser.msie||b.browser.opera){l=Math.ceil(l)}i.toShow.height(l)},duration:i.duration,easing:i.easing,complete:function(){if(!i.autoHeight){i.toShow.css("height","auto")}i.complete()}})},bounceslide:function(g){this.slide(g,{easing:g.down?"bounceout":"swing",duration:g.down?1000:200})},easeslide:function(g){this.slide(g,{easing:"easeinout",duration:700})}}});b.fn.activate=function(g){return this.accordion("activate",g)}})(jQuery);(function(b){var a={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"};b.widget("ui.dialog",{init:function(){var k=this,c=this.options,d=typeof c.resizable=="string"?c.resizable:"n,e,s,w,se,sw,ne,nw",i=this.element.addClass("ui-dialog-content").wrap("<div/>").wrap("<div/>"),h=(this.uiDialogContainer=i.parent().addClass("ui-dialog-container").css({position:"relative",width:"100%",height:"100%"})),f=c.title||i.attr("title")||"",g=(this.uiDialogTitlebar=b('<div class="ui-dialog-titlebar"/>')).append('<span class="ui-dialog-title">'+f+"</span>").append('<a href="#" class="ui-dialog-titlebar-close"><span>X</span></a>').prependTo(h),j=(this.uiDialog=h.parent()).appendTo(document.body).hide().addClass("ui-dialog").addClass(c.dialogClass).addClass(i.attr("className")).removeClass("ui-dialog-content").css({position:"absolute",width:c.width,height:c.height,overflow:"hidden",zIndex:c.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(l){if(c.closeOnEscape){var m=27;(l.keyCode&&l.keyCode==m&&k.close())}}).mousedown(function(){k.moveToTop()}),e=(this.uiDialogButtonPane=b("<div/>")).addClass("ui-dialog-buttonpane").css({position:"absolute",bottom:0}).appendTo(j);this.uiDialogTitlebarClose=b(".ui-dialog-titlebar-close",g).hover(function(){b(this).addClass("ui-dialog-titlebar-close-hover")},function(){b(this).removeClass("ui-dialog-titlebar-close-hover")}).mousedown(function(l){l.stopPropagation()}).click(function(){k.close();return false});this.uiDialogTitlebar.find("*").add(this.uiDialogTitlebar).each(function(){b.ui.disableSelection(this)});if(b.fn.draggable){j.draggable({cancel:".ui-dialog-content",helper:c.dragHelper,handle:".ui-dialog-titlebar",start:function(m,l){k.moveToTop();(c.dragStart&&c.dragStart.apply(k.element[0],arguments))},drag:function(m,l){(c.drag&&c.drag.apply(k.element[0],arguments))},stop:function(m,l){(c.dragStop&&c.dragStop.apply(k.element[0],arguments));b.ui.dialog.overlay.resize()}});(c.draggable||j.draggable("disable"))}if(b.fn.resizable){j.resizable({cancel:".ui-dialog-content",helper:c.resizeHelper,maxWidth:c.maxWidth,maxHeight:c.maxHeight,minWidth:c.minWidth,minHeight:c.minHeight,start:function(){(c.resizeStart&&c.resizeStart.apply(k.element[0],arguments))},resize:function(m,l){(c.autoResize&&k.size.apply(k));(c.resize&&c.resize.apply(k.element[0],arguments))},handles:d,stop:function(m,l){(c.autoResize&&k.size.apply(k));(c.resizeStop&&c.resizeStop.apply(k.element[0],arguments));b.ui.dialog.overlay.resize()}});(c.resizable||j.resizable("disable"))}this.createButtons(c.buttons);this.isOpen=false;(c.bgiframe&&b.fn.bgiframe&&j.bgiframe());(c.autoOpen&&this.open())},setData:function(d,c){(a[d]&&this.uiDialog.data(a[d],c));switch(d){case"buttons":this.createButtons(c);break;case"draggable":this.uiDialog.draggable(c?"enable":"disable");break;case"height":this.uiDialog.height(c);break;case"position":this.position(c);break;case"resizable":(typeof c=="string"&&this.uiDialog.data("handles.resizable",c));this.uiDialog.resizable(c?"enable":"disable");break;case"title":b(".ui-dialog-title",this.uiDialogTitlebar).text(c);break;case"width":this.uiDialog.width(c);break}b.widget.prototype.setData.apply(this,arguments)},position:function(f){var d=b(window),c=b(document),e=c.scrollTop(),g=c.scrollLeft(),h=e;if(b.inArray(f,["center","top","right","bottom","left"])>=0){f=[f=="right"||f=="left"?f:"center",f=="top"||f=="bottom"?f:"middle"]}if(f.constructor!=Array){f=["center","middle"]}if(f[0].constructor==Number){g+=f[0]}else{switch(f[0]){case"left":g+=0;break;case"right":g+=d.width()-this.uiDialog.width();break;default:case"center":g+=(d.width()-this.uiDialog.width())/2}}if(f[1].constructor==Number){e+=f[1]}else{switch(f[1]){case"top":e+=0;break;case"bottom":e+=d.height()-this.uiDialog.height();break;default:case"middle":e+=(d.height()-this.uiDialog.height())/2}}e=Math.max(e,h);this.uiDialog.css({top:e,left:g})},size:function(){var c=this.uiDialogContainer,d=this.uiDialogTitlebar,g=this.element,e=parseInt(g.css("margin-top"),10)+parseInt(g.css("margin-bottom"),10),f=parseInt(g.css("margin-left"),10)+parseInt(g.css("margin-right"),10);g.height(c.height()-d.outerHeight()-e);g.width(c.width()-f)},open:function(){if(this.isOpen){return}this.overlay=this.options.modal?new b.ui.dialog.overlay(this):null;(this.uiDialog.next().length>0)&&this.uiDialog.appendTo("body");this.position(this.options.position);this.uiDialog.show(this.options.show);this.options.autoResize&&this.size();this.moveToTop(true);var c=null;var d={options:this.options};this.uiDialogTitlebarClose.focus();this.element.triggerHandler("dialogopen",[c,d],this.options.open);this.isOpen=true},moveToTop:function(d){if((this.options.modal&&!d)||(!this.options.stack&&!this.options.modal)){return this.element.triggerHandler("dialogfocus",[null,{options:this.options}],this.options.focus)}var c=this.options.zIndex,e=this.options;b(".ui-dialog:visible").each(function(){c=Math.max(c,parseInt(b(this).css("z-index"),10)||e.zIndex)});(this.overlay&&this.overlay.$el.css("z-index",++c));this.uiDialog.css("z-index",++c);this.element.triggerHandler("dialogfocus",[null,{options:this.options}],this.options.focus)},close:function(){(this.overlay&&this.overlay.destroy());this.uiDialog.hide(this.options.hide);var c=null;var d={options:this.options};this.element.triggerHandler("dialogclose",[c,d],this.options.close);b.ui.dialog.overlay.resize();this.isOpen=false},destroy:function(){(this.overlay&&this.overlay.destroy());this.uiDialog.hide();this.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content").hide().appendTo("body");this.uiDialog.remove()},createButtons:function(d){var e=this,f=false,c=this.uiDialogButtonPane;c.empty().hide();b.each(d,function(){return !(f=true)});if(f){c.show();b.each(d,function(h,g){b("<button/>").text(h).click(function(){g.apply(e.element[0],arguments)}).appendTo(c)})}}});b.extend(b.ui.dialog,{defaults:{autoOpen:true,autoResize:true,bgiframe:false,buttons:{},closeOnEscape:true,draggable:true,height:200,minHeight:100,minWidth:150,modal:false,overlay:{},position:"center",resizable:true,stack:true,width:300,zIndex:1000},overlay:function(c){this.$el=b.ui.dialog.overlay.create(c)}});b.extend(b.ui.dialog.overlay,{instances:[],events:b.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(c){return c+".dialog-overlay"}).join(" "),create:function(d){if(this.instances.length===0){setTimeout(function(){b("a, :input").bind(b.ui.dialog.overlay.events,function(){var g=false;var e=b(this).parents(".ui-dialog");if(e.length){var f=b(".ui-dialog-overlay");if(f.length){var h=parseInt(f.css("z-index"),10);f.each(function(){h=Math.max(h,parseInt(b(this).css("z-index"),10))});g=parseInt(e.css("z-index"),10)>h}else{g=true}}return g})},1);b(document).bind("keydown.dialog-overlay",function(f){var g=27;(f.keyCode&&f.keyCode==g&&d.close())});b(window).bind("resize.dialog-overlay",b.ui.dialog.overlay.resize)}var c=b("<div/>").appendTo(document.body).addClass("ui-dialog-overlay").css(b.extend({borderWidth:0,margin:0,padding:0,position:"absolute",top:0,left:0,width:this.width(),height:this.height()},d.options.overlay));(d.options.bgiframe&&b.fn.bgiframe&&c.bgiframe());this.instances.push(c);return c},destroy:function(c){this.instances.splice(b.inArray(this.instances,c),1);if(this.instances.length===0){b("a, :input").add([document,window]).unbind(".dialog-overlay")}c.remove()},height:function(){if(b.browser.msie&&b.browser.version<7){var c=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);var d=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);if(c<d){return b(window).height()+"px"}else{return c+"px"}}else{return b(document).height()+"px"}},width:function(){if(b.browser.msie&&b.browser.version<7){var d=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth);var c=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth);if(d<c){return b(window).width()+"px"}else{return d+"px"}}else{return b(document).width()+"px"}},resize:function(){var c=b([]);b.each(b.ui.dialog.overlay.instances,function(){c=c.add(this)});c.css({width:0,height:0}).css({width:b.ui.dialog.overlay.width(),height:b.ui.dialog.overlay.height()})}});b.extend(b.ui.dialog.overlay.prototype,{destroy:function(){b.ui.dialog.overlay.destroy(this.$el)}})})(jQuery);(function(a){a.fn.unwrap=a.fn.unwrap||function(b){return this.each(function(){a(this).parents(b).eq(0).after(this).remove()})};a.widget("ui.slider",{plugins:{},ui:function(b){return{options:this.options,handle:this.currentHandle,value:this.options.axis!="both"||!this.options.axis?Math.round(this.value(null,this.options.axis=="vertical"?"y":"x")):{x:Math.round(this.value(null,"x")),y:Math.round(this.value(null,"y"))},range:this.getRange()}},propagate:function(b,c){a.ui.plugin.call(this,b,[c,this.ui()]);this.element.triggerHandler(b=="slide"?b:"slide"+b,[c,this.ui()],this.options[b])},destroy:function(){this.element.removeClass("ui-slider ui-slider-disabled").removeData("slider").unbind(".slider");if(this.handle&&this.handle.length){this.handle.unwrap("a");this.handle.each(function(){a(this).data("mouse").mouseDestroy()})}this.generated&&this.generated.remove()},setData:function(c,b){a.widget.prototype.setData.apply(this,arguments);if(/min|max|steps/.test(c)){this.initBoundaries()}if(c=="range"){b?this.handle.length==2&&this.createRange():this.removeRange()}},init:function(){var c=this;this.element.addClass("ui-slider");this.initBoundaries();this.handle=a(this.options.handle,this.element);if(!this.handle.length){c.handle=c.generated=a(c.options.handles||[0]).map(function(){var d=a("<div/>").addClass("ui-slider-handle").appendTo(c.element);if(this.id){d.attr("id",this.id)}return d[0]})}var b=function(d){this.element=a(d);this.element.data("mouse",this);this.options=c.options;this.element.bind("mousedown",function(){if(c.currentHandle){this.blur(c.currentHandle)}c.focus(this,1)});this.mouseInit()};a.extend(b.prototype,a.ui.mouse,{mouseStart:function(d){return c.start.call(c,d,this.element[0])},mouseStop:function(d){return c.stop.call(c,d,this.element[0])},mouseDrag:function(d){return c.drag.call(c,d,this.element[0])},mouseCapture:function(){return true},trigger:function(d){this.mouseDown(d)}});a(this.handle).each(function(){new b(this)}).wrap('<a href="javascript:void(0)" style="outline:none;border:none;"></a>').parent().bind("focus",function(d){c.focus(this.firstChild)}).bind("blur",function(d){c.blur(this.firstChild)}).bind("keydown",function(d){if(!c.options.noKeyboard){c.keydown(d.keyCode,this.firstChild)}});this.element.bind("mousedown.slider",function(d){c.click.apply(c,[d]);c.currentHandle.data("mouse").trigger(d);c.firstValue=c.firstValue+1});a.each(this.options.handles||[],function(d,e){c.moveTo(e.start,d,true)});if(!isNaN(this.options.startValue)){this.moveTo(this.options.startValue,0,true)}this.previousHandle=a(this.handle[0]);if(this.handle.length==2&&this.options.range){this.createRange()}},initBoundaries:function(){var c=this.element[0],b=this.options;this.actualSize={width:this.element.outerWidth(),height:this.element.outerHeight()};a.extend(b,{axis:b.axis||(c.offsetWidth<c.offsetHeight?"vertical":"horizontal"),max:!isNaN(parseInt(b.max,10))?{x:parseInt(b.max,10),y:parseInt(b.max,10)}:({x:b.max&&b.max.x||100,y:b.max&&b.max.y||100}),min:!isNaN(parseInt(b.min,10))?{x:parseInt(b.min,10),y:parseInt(b.min,10)}:({x:b.min&&b.min.x||0,y:b.min&&b.min.y||0})});b.realMax={x:b.max.x-b.min.x,y:b.max.y-b.min.y};b.stepping={x:b.stepping&&b.stepping.x||parseInt(b.stepping,10)||(b.steps?b.realMax.x/(b.steps.x||parseInt(b.steps,10)||b.realMax.x):0),y:b.stepping&&b.stepping.y||parseInt(b.stepping,10)||(b.steps?b.realMax.y/(b.steps.y||parseInt(b.steps,10)||b.realMax.y):0)}},keydown:function(b,c){if(/(37|38|39|40)/.test(b)){this.moveTo({x:/(37|39)/.test(b)?(b==37?"-":"+")+"="+this.oneStep("x"):0,y:/(38|40)/.test(b)?(b==38?"-":"+")+"="+this.oneStep("y"):0},c)}},focus:function(c,b){this.currentHandle=a(c).addClass("ui-slider-handle-active");if(b){this.currentHandle.parent()[0].focus()}},blur:function(b){a(b).removeClass("ui-slider-handle-active");if(this.currentHandle&&this.currentHandle[0]==b){this.previousHandle=this.currentHandle;this.currentHandle=null}},click:function(c){var b=[c.pageX,c.pageY];var d=false;this.handle.each(function(){if(this==c.target){d=true}});if(d||this.options.disabled||!(this.currentHandle||this.previousHandle)){return}if(!this.currentHandle&&this.previousHandle){this.focus(this.previousHandle,true)}this.offset=this.element.offset();this.moveTo({y:this.convertValue(c.pageY-this.offset.top-this.currentHandle[0].offsetHeight/2,"y"),x:this.convertValue(c.pageX-this.offset.left-this.currentHandle[0].offsetWidth/2,"x")},null,!this.options.distance)},createRange:function(){if(this.rangeElement){return}this.rangeElement=a("<div></div>").addClass("ui-slider-range").css({position:"absolute"}).appendTo(this.element);this.updateRange()},removeRange:function(){this.rangeElement.remove();this.rangeElement=null},updateRange:function(){var c=this.options.axis=="vertical"?"top":"left";var b=this.options.axis=="vertical"?"height":"width";this.rangeElement.css(c,(parseInt(a(this.handle[0]).css(c),10)||0)+this.handleSize(0,this.options.axis=="vertical"?"y":"x")/2);this.rangeElement.css(b,(parseInt(a(this.handle[1]).css(c),10)||0)-(parseInt(a(this.handle[0]).css(c),10)||0))},getRange:function(){return this.rangeElement?this.convertValue(parseInt(this.rangeElement.css(this.options.axis=="vertical"?"height":"width"),10),this.options.axis=="vertical"?"y":"x"):null},handleIndex:function(){return this.handle.index(this.currentHandle[0])},value:function(d,c){if(this.handle.length==1){this.currentHandle=this.handle}if(!c){c=this.options.axis=="vertical"?"y":"x"}var b=a(d!=undefined&&d!==null?this.handle[d]||d:this.currentHandle);if(b.data("mouse").sliderValue){return parseInt(b.data("mouse").sliderValue[c],10)}else{return parseInt(((parseInt(b.css(c=="x"?"left":"top"),10)/(this.actualSize[c=="x"?"width":"height"]-this.handleSize(d,c)))*this.options.realMax[c])+this.options.min[c],10)}},convertValue:function(b,c){return this.options.min[c]+(b/(this.actualSize[c=="x"?"width":"height"]-this.handleSize(null,c)))*this.options.realMax[c]},translateValue:function(b,c){return((b-this.options.min[c])/this.options.realMax[c])*(this.actualSize[c=="x"?"width":"height"]-this.handleSize(null,c))},translateRange:function(b,c){if(this.rangeElement){if(this.currentHandle[0]==this.handle[0]&&b>=this.translateValue(this.value(1),c)){b=this.translateValue(this.value(1,c)-this.oneStep(c),c)}if(this.currentHandle[0]==this.handle[1]&&b<=this.translateValue(this.value(0),c)){b=this.translateValue(this.value(0,c)+this.oneStep(c),c)}}if(this.options.handles){var d=this.options.handles[this.handleIndex()];if(b<this.translateValue(d.min,c)){b=this.translateValue(d.min,c)}else{if(b>this.translateValue(d.max,c)){b=this.translateValue(d.max,c)}}}return b},translateLimits:function(b,c){if(b>=this.actualSize[c=="x"?"width":"height"]-this.handleSize(null,c)){b=this.actualSize[c=="x"?"width":"height"]-this.handleSize(null,c)}if(b<=0){b=0}return b},handleSize:function(c,b){return a(c!=undefined&&c!==null?this.handle[c]:this.currentHandle)[0]["offset"+(b=="x"?"Width":"Height")]},oneStep:function(b){return this.options.stepping[b]||1},start:function(c,d){var b=this.options;if(b.disabled){return false}this.actualSize={width:this.element.outerWidth(),height:this.element.outerHeight()};if(!this.currentHandle){this.focus(this.previousHandle,true)}this.offset=this.element.offset();this.handleOffset=this.currentHandle.offset();this.clickOffset={top:c.pageY-this.handleOffset.top,left:c.pageX-this.handleOffset.left};this.firstValue=this.value();this.propagate("start",c);this.drag(c,d);return true},stop:function(b){this.propagate("stop",b);if(this.firstValue!=this.value()){this.propagate("change",b)}this.focus(this.currentHandle,true);return false},drag:function(d,g){var c=this.options;var f={top:d.pageY-this.offset.top-this.clickOffset.top,left:d.pageX-this.offset.left-this.clickOffset.left};if(!this.currentHandle){this.focus(this.previousHandle,true)}f.left=this.translateLimits(f.left,"x");f.top=this.translateLimits(f.top,"y");if(c.stepping.x){var b=this.convertValue(f.left,"x");b=Math.round(b/c.stepping.x)*c.stepping.x;f.left=this.translateValue(b,"x")}if(c.stepping.y){var b=this.convertValue(f.top,"y");b=Math.round(b/c.stepping.y)*c.stepping.y;f.top=this.translateValue(b,"y")}f.left=this.translateRange(f.left,"x");f.top=this.translateRange(f.top,"y");if(c.axis!="vertical"){this.currentHandle.css({left:f.left})}if(c.axis!="horizontal"){this.currentHandle.css({top:f.top})}this.currentHandle.data("mouse").sliderValue={x:Math.round(this.convertValue(f.left,"x"))||0,y:Math.round(this.convertValue(f.top,"y"))||0};if(this.rangeElement){this.updateRange()}this.propagate("slide",d);return false},moveTo:function(f,g,i){var d=this.options;this.actualSize={width:this.element.outerWidth(),height:this.element.outerHeight()};if(g==undefined&&!this.currentHandle&&this.handle.length!=1){return false}if(g==undefined&&!this.currentHandle){g=0}if(g!=undefined){this.currentHandle=this.previousHandle=a(this.handle[g]||g)}if(f.x!==undefined&&f.y!==undefined){var b=f.x,e=f.y}else{var b=f,e=f}if(b!==undefined&&b.constructor!=Number){var h=/^\-\=/.test(b),c=/^\+\=/.test(b);if(h||c){b=this.value(null,"x")+parseInt(b.replace(h?"=":"+=",""),10)}else{b=isNaN(parseInt(b,10))?undefined:parseInt(b,10)}}if(e!==undefined&&e.constructor!=Number){var h=/^\-\=/.test(e),c=/^\+\=/.test(e);if(h||c){e=this.value(null,"y")+parseInt(e.replace(h?"=":"+=",""),10)}else{e=isNaN(parseInt(e,10))?undefined:parseInt(e,10)}}if(d.axis!="vertical"&&b!==undefined){if(d.stepping.x){b=Math.round(b/d.stepping.x)*d.stepping.x}b=this.translateValue(b,"x");b=this.translateLimits(b,"x");b=this.translateRange(b,"x");d.animate?this.currentHandle.stop().animate({left:b},(Math.abs(parseInt(this.currentHandle.css("left"))-b))*(!isNaN(parseInt(d.animate))?d.animate:5)):this.currentHandle.css({left:b})}if(d.axis!="horizontal"&&e!==undefined){if(d.stepping.y){e=Math.round(e/d.stepping.y)*d.stepping.y}e=this.translateValue(e,"y");e=this.translateLimits(e,"y");e=this.translateRange(e,"y");d.animate?this.currentHandle.stop().animate({top:e},(Math.abs(parseInt(this.currentHandle.css("top"))-e))*(!isNaN(parseInt(d.animate))?d.animate:5)):this.currentHandle.css({top:e})}if(this.rangeElement){this.updateRange()}this.currentHandle.data("mouse").sliderValue={x:Math.round(this.convertValue(b,"x"))||0,y:Math.round(this.convertValue(e,"y"))||0};if(!i){this.propagate("start",null);this.propagate("stop",null);this.propagate("change",null);this.propagate("slide",null)}}});a.ui.slider.getter="value";a.ui.slider.defaults={handle:".ui-slider-handle",distance:1,animate:false}})(jQuery);(function(a){a.widget("ui.tabs",{init:function(){this.options.event+=".tabs";this.tabify(true)},setData:function(c,b){if((/^selected/).test(c)){this.select(b)}else{this.options[c]=b;this.tabify()}},length:function(){return this.$tabs.length},tabId:function(b){return b.title&&b.title.replace(/\s/g,"_").replace(/[^A-Za-z0-9\-_:\.]/g,"")||this.options.idPrefix+a.data(b)},ui:function(c,b){return{options:this.options,tab:c,panel:b,index:this.$tabs.index(c)}},tabify:function(e){this.$lis=a("li:has(a[href])",this.element);this.$tabs=this.$lis.map(function(){return a("a",this)[0]});this.$panels=a([]);var p=this,f=this.options;this.$tabs.each(function(s,o){if(o.hash&&o.hash.replace("#","")){p.$panels=p.$panels.add(o.hash)}else{if(a(o).attr("href")!="#"){a.data(o,"href.tabs",o.href);a.data(o,"load.tabs",o.href);var t=p.tabId(o);o.href="#"+t;var u=a("#"+t);if(!u.length){u=a(f.panelTemplate).attr("id",t).addClass(f.panelClass).insertAfter(p.$panels[s-1]||p.element);u.data("destroy.tabs",true)}p.$panels=p.$panels.add(u)}else{f.disabled.push(s+1)}}});if(e){this.element.addClass(f.navClass);this.$panels.each(function(){var i=a(this);i.addClass(f.panelClass)});if(f.selected===undefined){if(location.hash){this.$tabs.each(function(u,s){if(s.hash==location.hash){f.selected=u;if(a.browser.msie||a.browser.opera){var t=a(location.hash),o=t.attr("id");t.attr("id","");setTimeout(function(){t.attr("id",o)},500)}scrollTo(0,0);return false}})}else{if(f.cookie){var h=parseInt(a.cookie("ui-tabs"+a.data(p.element)),10);if(h&&p.$tabs[h]){f.selected=h}}else{if(p.$lis.filter("."+f.selectedClass).length){f.selected=p.$lis.index(p.$lis.filter("."+f.selectedClass)[0])}}}}f.selected=f.selected===null||f.selected!==undefined?f.selected:0;f.disabled=a.unique(f.disabled.concat(a.map(this.$lis.filter("."+f.disabledClass),function(o,s){return p.$lis.index(o)}))).sort();if(a.inArray(f.selected,f.disabled)!=-1){f.disabled.splice(a.inArray(f.selected,f.disabled),1)}this.$panels.addClass(f.hideClass);this.$lis.removeClass(f.selectedClass);if(f.selected!==null){this.$panels.eq(f.selected).show().removeClass(f.hideClass);this.$lis.eq(f.selected).addClass(f.selectedClass);var j=function(){a(p.element).triggerHandler("tabsshow",[p.fakeEvent("tabsshow"),p.ui(p.$tabs[f.selected],p.$panels[f.selected])],f.show)};if(a.data(this.$tabs[f.selected],"load.tabs")){this.load(f.selected,j)}else{j()}}a(window).bind("unload",function(){p.$tabs.unbind(".tabs");p.$lis=p.$tabs=p.$panels=null})}for(var b=0,c;c=this.$lis[b];b++){a(c)[a.inArray(b,f.disabled)!=-1&&!a(c).hasClass(f.selectedClass)?"addClass":"removeClass"](f.disabledClass)}if(f.cache===false){this.$tabs.removeData("cache.tabs")}var q,g,l={"min-width":0,duration:1},d="normal";if(f.fx&&f.fx.constructor==Array){q=f.fx[0]||l,g=f.fx[1]||l}else{q=g=f.fx||l}var r={display:"",overflow:"",height:""};if(!a.browser.msie){r.opacity=""}function n(s,o,i){o.animate(q,q.duration||d,function(){o.addClass(f.hideClass).css(r);if(a.browser.msie&&q.opacity){o[0].style.filter=""}if(i){k(s,i,o)}})}function k(s,i,o){if(g===l){i.css("display","block")}i.animate(g,g.duration||d,function(){i.removeClass(f.hideClass).css(r);if(a.browser.msie&&g.opacity){i[0].style.filter=""}a(p.element).triggerHandler("tabsshow",[p.fakeEvent("tabsshow"),p.ui(s,i[0])],f.show)})}function m(s,i,o,t){i.addClass(f.selectedClass).siblings().removeClass(f.selectedClass);n(s,o,t)}this.$tabs.unbind(".tabs").bind(f.event,function(){var i=a(this).parents("li:eq(0)"),o=p.$panels.filter(":visible"),t=a(this.hash);if((i.hasClass(f.selectedClass)&&!f.unselect)||i.hasClass(f.disabledClass)||a(this).hasClass(f.loadingClass)||a(p.element).triggerHandler("tabsselect",[p.fakeEvent("tabsselect"),p.ui(this,t[0])],f.select)===false){this.blur();return false}p.options.selected=p.$tabs.index(this);if(f.unselect){if(i.hasClass(f.selectedClass)){p.options.selected=null;i.removeClass(f.selectedClass);p.$panels.stop();n(this,o);this.blur();return false}else{if(!o.length){p.$panels.stop();var s=this;p.load(p.$tabs.index(this),function(){i.addClass(f.selectedClass).addClass(f.unselectClass);k(s,t)});this.blur();return false}}}if(f.cookie){a.cookie("ui-tabs"+a.data(p.element),p.options.selected,f.cookie)}p.$panels.stop();if(t.length){var s=this;p.load(p.$tabs.index(this),o.length?function(){m(s,i,o,t)}:function(){i.addClass(f.selectedClass);k(s,t)})}else{throw"jQuery UI Tabs: Mismatching fragment identifier."}if(a.browser.msie){this.blur()}return false});if(!(/^click/).test(f.event)){this.$tabs.bind("click.tabs",function(){return false})}},add:function(e,h,f){if(f==undefined){f=this.$tabs.length}var b=this.options;var i=a(b.tabTemplate.replace(/#\{href\}/g,e).replace(/#\{label\}/g,h));i.data("destroy.tabs",true);var c=e.indexOf("#")==0?e.replace("#",""):this.tabId(a("a:first-child",i)[0]);var d=a("#"+c);if(!d.length){d=a(b.panelTemplate).attr("id",c).addClass(b.hideClass).data("destroy.tabs",true)}d.addClass(b.panelClass);if(f>=this.$lis.length){i.appendTo(this.element);d.appendTo(this.element[0].parentNode)}else{i.insertBefore(this.$lis[f]);d.insertBefore(this.$panels[f])}b.disabled=a.map(b.disabled,function(j,k){return j>=f?++j:j});this.tabify();if(this.$tabs.length==1){i.addClass(b.selectedClass);d.removeClass(b.hideClass);var g=a.data(this.$tabs[0],"load.tabs");if(g){this.load(f,g)}}this.element.triggerHandler("tabsadd",[this.fakeEvent("tabsadd"),this.ui(this.$tabs[f],this.$panels[f])],b.add)},remove:function(e){var c=this.options,b=this.$lis.eq(e).remove(),d=this.$panels.eq(e).remove();if(b.hasClass(c.selectedClass)&&this.$tabs.length>1){this.select(e+(e+1<this.$tabs.length?1:-1))}c.disabled=a.map(a.grep(c.disabled,function(f,g){return f!=e}),function(f,g){return f>=e?--f:f});this.tabify();this.element.triggerHandler("tabsremove",[this.fakeEvent("tabsremove"),this.ui(b.find("a")[0],d[0])],c.remove)},enable:function(d){var c=this.options;if(a.inArray(d,c.disabled)==-1){return}var b=this.$lis.eq(d).removeClass(c.disabledClass);if(a.browser.safari){b.css("display","inline-block");setTimeout(function(){b.css("display","block")},0)}c.disabled=a.grep(c.disabled,function(e,f){return e!=d});this.element.triggerHandler("tabsenable",[this.fakeEvent("tabsenable"),this.ui(this.$tabs[d],this.$panels[d])],c.enable)},disable:function(d){var c=this,b=this.options;if(d!=b.selected){this.$lis.eq(d).addClass(b.disabledClass);b.disabled.push(d);b.disabled.sort();this.element.triggerHandler("tabsdisable",[this.fakeEvent("tabsdisable"),this.ui(this.$tabs[d],this.$panels[d])],b.disable)}},select:function(b){if(typeof b=="string"){b=this.$tabs.index(this.$tabs.filter("[href$="+b+"]")[0])}this.$tabs.eq(b).trigger(this.options.event)},load:function(g,m){var k=this,d=this.options,b=this.$tabs.eq(g),f=b[0],e=m==undefined||m===false,i=b.data("load.tabs");m=m||function(){};if(!i||!e&&a.data(f,"cache.tabs")){m();return}var l=function(n){var p=a(n),o=p.find("*:last");return o.length&&o.is(":not(img)")&&o||p};var c=function(){k.$tabs.filter("."+d.loadingClass).removeClass(d.loadingClass).each(function(){if(d.spinner){l(this).parent().html(l(this).data("label.tabs"))}});k.xhr=null};if(d.spinner){var j=l(f).html();l(f).wrapInner("<em></em>").find("em").data("label.tabs",j).html(d.spinner)}var h=a.extend({},d.ajaxOptions,{url:i,success:function(n,o){a(f.hash).html(n);c();if(d.cache){a.data(f,"cache.tabs",true)}a(k.element).triggerHandler("tabsload",[k.fakeEvent("tabsload"),k.ui(k.$tabs[g],k.$panels[g])],d.load);d.ajaxOptions.success&&d.ajaxOptions.success(n,o);m()}});if(this.xhr){this.xhr.abort();c()}b.addClass(d.loadingClass);setTimeout(function(){k.xhr=a.ajax(h)},0)},url:function(c,b){this.$tabs.eq(c).removeData("cache.tabs").data("load.tabs",b)},destroy:function(){var b=this.options;this.element.unbind(".tabs").removeClass(b.navClass).removeData("tabs");this.$tabs.each(function(){var c=a.data(this,"href.tabs");if(c){this.href=c}var d=a(this).unbind(".tabs");a.each(["href","load","cache"],function(f,e){d.removeData(e+".tabs")})});this.$lis.add(this.$panels).each(function(){if(a.data(this,"destroy.tabs")){a(this).remove()}else{a(this).removeClass([b.selectedClass,b.unselectClass,b.disabledClass,b.panelClass,b.hideClass].join(" "))}})},fakeEvent:function(b){return a.event.fix({type:b,target:this.element[0]})}});a.ui.tabs.defaults={unselect:false,event:"click",disabled:[],cookie:null,spinner:"Loading&#8230;",cache:false,idPrefix:"ui-tabs-",ajaxOptions:{},fx:null,tabTemplate:'<li><a href="#{href}"><span>#{label}</span></a></li>',panelTemplate:"<div></div>",navClass:"ui-tabs-nav",selectedClass:"ui-tabs-selected",unselectClass:"ui-tabs-unselect",disabledClass:"ui-tabs-disabled",panelClass:"ui-tabs-panel",hideClass:"ui-tabs-hide",loadingClass:"ui-tabs-loading"};a.ui.tabs.getter="length";a.extend(a.ui.tabs.prototype,{rotation:null,rotate:function(c,e){e=e||false;var f=this,g=this.options.selected;function d(){f.rotation=setInterval(function(){g=++g<f.$tabs.length?g:0;f.select(g)},c)}function b(h){if(!h||h.clientX){clearInterval(f.rotation)}}if(c){d();if(!e){this.$tabs.bind(this.options.event,b)}else{this.$tabs.bind(this.options.event,function(){b();g=f.options.selected;d()})}}else{b();this.$tabs.unbind(this.options.event,b)}}})})(jQuery);(function($){var PROP_NAME="datepicker";function Datepicker(){this.debug=false;this._curInst=null;this._disabledInputs=[];this._datepickerShowing=false;this._inDialog=false;this._mainDivId="ui-datepicker-div";this._appendClass="ui-datepicker-append";this._triggerClass="ui-datepicker-trigger";this._dialogClass="ui-datepicker-dialog";this._promptClass="ui-datepicker-prompt";this._unselectableClass="ui-datepicker-unselectable";this._currentClass="ui-datepicker-current-day";this.regional=[];this.regional[""]={clearText:"Clear",clearStatus:"Erase the current date",closeText:"Close",closeStatus:"Close without change",prevText:"&#x3c;Prev",prevStatus:"Show the previous month",nextText:"Next&#x3e;",nextStatus:"Show the next month",currentText:"Today",currentStatus:"Show the current month",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"],monthStatus:"Show a different month",yearStatus:"Show a different year",weekHeader:"Wk",weekStatus:"Week of the year",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],dayStatus:"Set DD as first week day",dateStatus:"Select DD, M d",dateFormat:"mm/dd/yy",firstDay:0,initStatus:"Select a date",isRTL:false};this._defaults={showOn:"focus",showAnim:"show",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:false,closeAtTop:true,mandatory:false,hideIfNoPrevNext:false,navigationAsDateFormat:false,gotoCurrent:false,changeMonth:true,changeYear:true,yearRange:"-10:+10",changeFirstDay:true,highlightWeek:false,showOtherMonths:false,showWeeks:false,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",showStatus:false,statusForDate:this.dateStatus,minDate:null,maxDate:null,duration:"normal",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,stepMonths:1,rangeSelect:false,rangeSeparator:" - ",altField:"",altFormat:""};$.extend(this._defaults,this.regional[""]);this.dpDiv=$('<div id="'+this._mainDivId+'" style="display: none;"></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(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"+new Date().getTime()}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){return{id:target[0].id,input:target,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:inline,dpDiv:(!inline?this.dpDiv:$('<div class="ui-datepicker-inline"></div>'))}},_connectDatepicker:function(target,inst){var input=$(target);if(input.hasClass(this.markerClassName)){return}var appendText=this._get(inst,"appendText");var isRTL=this._get(inst,"isRTL");if(appendText){input[isRTL?"before":"after"]('<span class="'+this._appendClass+'">'+appendText+"</span>")}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");var 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"](trigger);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 input=$(target);if(input.hasClass(this.markerClassName)){return}input.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)},_dialogDatepicker:function(input,dateText,onSelect,settings,pos){var inst=this._dialogInst;if(!inst){var id="dp"+new Date().getTime();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 nodeName=target.nodeName.toLowerCase();var $target=$(target);$.removeData(target,PROP_NAME);if(nodeName=="input"){$target.siblings("."+this._appendClass).remove().end().siblings("."+this._triggerClass).remove().end().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){target.disabled=false;$(target).siblings("button."+this._triggerClass).each(function(){this.disabled=false}).end().siblings("img."+this._triggerClass).css({opacity:"1.0",cursor:""});this._disabledInputs=$.map(this._disabledInputs,function(value){return(value==target?null:value)})},_disableDatepicker:function(target){target.disabled=true;$(target).siblings("button."+this._triggerClass).each(function(){this.disabled=true}).end().siblings("img."+this._triggerClass).css({opacity:"0.5",cursor:"default"});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},_changeDatepicker:function(target,name,value){var settings=name||{};if(typeof name=="string"){settings={};settings[name]=value}if(inst=$.data(target,PROP_NAME)){extendRemove(inst.settings,settings);this._updateDatepicker(inst)}},_setDateDatepicker:function(target,date,endDate){var inst=$.data(target,PROP_NAME);if(inst){this._setDate(inst,date,endDate);this._updateDatepicker(inst)}},_getDateDatepicker:function(target){var inst=$.data(target,PROP_NAME);if(inst){this._setDateFromField(inst)}return(inst?this._getDate(inst):null)},_doKeyDown:function(e){var inst=$.data(e.target,PROP_NAME);var handled=true;if($.datepicker._datepickerShowing){switch(e.keyCode){case 9:$.datepicker._hideDatepicker(null,"");break;case 13:$.datepicker._selectDay(e.target,inst.selectedMonth,inst.selectedYear,$("td.ui-datepicker-days-cell-over",inst.dpDiv)[0]);return false;break;case 27:$.datepicker._hideDatepicker(null,$.datepicker._get(inst,"duration"));break;case 33:$.datepicker._adjustDate(e.target,(e.ctrlKey?-1:-$.datepicker._get(inst,"stepMonths")),(e.ctrlKey?"Y":"M"));break;case 34:$.datepicker._adjustDate(e.target,(e.ctrlKey?+1:+$.datepicker._get(inst,"stepMonths")),(e.ctrlKey?"Y":"M"));break;case 35:if(e.ctrlKey){$.datepicker._clearDate(e.target)}break;case 36:if(e.ctrlKey){$.datepicker._gotoToday(e.target)}break;case 37:if(e.ctrlKey){$.datepicker._adjustDate(e.target,-1,"D")}break;case 38:if(e.ctrlKey){$.datepicker._adjustDate(e.target,-7,"D")}break;case 39:if(e.ctrlKey){$.datepicker._adjustDate(e.target,+1,"D")}break;case 40:if(e.ctrlKey){$.datepicker._adjustDate(e.target,+7,"D")}break;default:handled=false}}else{if(e.keyCode==36&&e.ctrlKey){$.datepicker._showDatepicker(this)}else{handled=false}}if(handled){e.preventDefault();e.stopPropagation()}},_doKeyPress:function(e){var inst=$.data(e.target,PROP_NAME);var chars=$.datepicker._possibleChars($.datepicker._get(inst,"dateFormat"));var chr=String.fromCharCode(e.charCode==undefined?e.keyCode:e.charCode);return e.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=$.data(input,PROP_NAME);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);inst.dpDiv.width($.datepicker._getNumberOfMonths(inst)[1]*$(".ui-datepicker",inst.dpDiv[0])[0].offsetWidth);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)<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};inst.dpDiv.empty().append(this._generateDatepicker(inst)).find("iframe.ui-datepicker-cover").css({width:dims.width,height:dims.height});var numMonths=this._getNumberOfMonths(inst);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.input[0]).focus()}},_checkOffset:function(inst,offset,isFixed){var pos=inst.input?this._findPos(inst.input[0]):null;var browserWidth=window.innerWidth||document.documentElement.clientWidth;var browserHeight=window.innerHeight||document.documentElement.clientHeight;var scrollX=document.documentElement.scrollLeft||document.body.scrollLeft;var scrollY=document.documentElement.scrollTop||document.body.scrollTop;if(this._get(inst,"isRTL")||(offset.left+inst.dpDiv.width()-scrollX)>browserWidth){offset.left=Math.max((isFixed?0:scrollX),pos[0]+(inst.input?inst.input.width():0)-(isFixed?scrollX:0)-inst.dpDiv.width()-(isFixed&&$.browser.opera?document.documentElement.scrollLeft:0))}else{offset.left-=(isFixed?scrollX:0)}if((offset.top+inst.dpDiv.height()-scrollY)>browserHeight){offset.top=Math.max((isFixed?0:scrollY),pos[1]-(isFixed?scrollY:0)-(this._inDialog?0:inst.dpDiv.height())-(isFixed&&$.browser.opera?document.documentElement.scrollTop:0))}else{offset.top-=(isFixed?scrollY: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){return}var rangeSelect=this._get(inst,"rangeSelect");if(rangeSelect&&this._stayOpen){this._selectDate("#"+inst.id,this._formatDate(inst,inst.currentDay,inst.currentMonth,inst.currentYear))}this._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),[this._getDate(inst),inst])}this._datepickerShowing=false;this._lastInput=null;inst.settings.prompt=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");$("."+this._promptClass,inst.dpDiv).remove()},_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=$.data(target[0],PROP_NAME);this._adjustInstDate(inst,offset,period);this._updateDatepicker(inst)},_gotoToday:function(id){var target=$(id);var inst=$.data(target[0],PROP_NAME);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._adjustDate(target);this._notifyChange(inst)},_selectMonthYear:function(id,select,period){var target=$(id);var inst=$.data(target[0],PROP_NAME);inst._selectingMonthYear=false;inst[period=="M"?"drawMonth":"drawYear"]=select.options[select.selectedIndex].value-0;this._adjustDate(target);this._notifyChange(inst)},_clickMonthYear:function(id){var target=$(id);var inst=$.data(target[0],PROP_NAME);if(inst.input&&inst._selectingMonthYear&&!$.browser.msie){inst.input[0].focus()}inst._selectingMonthYear=!inst._selectingMonthYear},_changeFirstDay:function(id,day){var target=$(id);var inst=$.data(target[0],PROP_NAME);inst.settings.firstDay=day;this._updateDatepicker(inst)},_selectDay:function(id,month,year,td){if($(td).hasClass(this._unselectableClass)){return}var target=$(id);var inst=$.data(target[0],PROP_NAME);var rangeSelect=this._get(inst,"rangeSelect");if(rangeSelect){this._stayOpen=!this._stayOpen;if(this._stayOpen){$(".ui-datepicker td").removeClass(this._currentClass);$(td).addClass(this._currentClass)}}inst.selectedDay=inst.currentDay=$("a",td).html();inst.selectedMonth=inst.currentMonth=month;inst.selectedYear=inst.currentYear=year;if(this._stayOpen){inst.endDay=inst.endMonth=inst.endYear=null}else{if(rangeSelect){inst.endDay=inst.currentDay;inst.endMonth=inst.currentMonth;inst.endYear=inst.currentYear}}this._selectDate(id,this._formatDate(inst,inst.currentDay,inst.currentMonth,inst.currentYear));if(this._stayOpen){inst.rangeStart=this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay));this._updateDatepicker(inst)}else{if(rangeSelect){inst.selectedDay=inst.currentDay=inst.rangeStart.getDate();inst.selectedMonth=inst.currentMonth=inst.rangeStart.getMonth();inst.selectedYear=inst.currentYear=inst.rangeStart.getFullYear();inst.rangeStart=null;if(inst.inline){this._updateDatepicker(inst)}}}},_clearDate:function(id){var target=$(id);var inst=$.data(target[0],PROP_NAME);if(this._get(inst,"mandatory")){return}this._stayOpen=false;inst.endDay=inst.endMonth=inst.endYear=inst.rangeStart=null;this._selectDate(target,"")},_selectDate:function(id,dateStr){var target=$(id);var inst=$.data(target[0],PROP_NAME);dateStr=(dateStr!=null?dateStr:this._formatDate(inst));if(this._get(inst,"rangeSelect")&&dateStr){dateStr=(inst.rangeStart?this._formatDate(inst,inst.rangeStart):dateStr)+this._get(inst,"rangeSeparator")+dateStr}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(!this._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");var date=this._getDate(inst);dateStr=(isArray(date)?(!date[0]&&!date[1]?"":this.formatDate(altFormat,date[0],this._getFormatConfig(inst))+this._get(inst,"rangeSeparator")+this.formatDate(altFormat,date[1]||date[0],this._getFormatConfig(inst))):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){checkDate.setDate(checkDate.getDate()+3);return $.datepicker.iso8601Week(checkDate)}}}return Math.floor(((checkDate-firstMon)/86400000)/7)+1},dateStatus:function(date,inst){return $.datepicker.formatDate($.datepicker._get(inst,"dateStatus"),date,$.datepicker._getFormatConfig(inst))},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 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:2));var size=origSize;var num=0;while(size>0&&iValue<value.length&&value.charAt(iValue)>="0"&&value.charAt(iValue)<="9"){num=num*10+(value.charAt(iValue++)-0);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"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<100){year+=new Date().getFullYear()-new Date().getFullYear()%100+(year<=shortYearCutoff?0:-100)}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){return(lookAhead(match)&&value<10?"0":"")+value};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());break;case"D":output+=formatName("D",date.getDay(),dayNamesShort,dayNames);break;case"m":output+=formatNumber("m",date.getMonth()+1);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().split(this._get(inst,"rangeSeparator")):null;inst.endDay=inst.endMonth=inst.endYear=null;var date=defaultDate=this._getDefaultDate(inst);if(dates.length>0){var settings=this._getFormatConfig(inst);if(dates.length>1){date=this.parseDate(dateFormat,dates[1],settings)||defaultDate;inst.endDay=date.getDate();inst.endMonth=date.getMonth();inst.endYear=date.getFullYear()}try{date=this.parseDate(dateFormat,dates[0],settings)||defaultDate}catch(e){this.log(e);date=defaultDate}}inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear();inst.currentDay=(dates[0]?date.getDate():0);inst.currentMonth=(dates[0]?date.getMonth():0);inst.currentYear=(dates[0]?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+=(matches[1]-0);break;case"w":case"W":day+=(matches[1]*7);break;case"m":case"M":month+=(matches[1]-0);day=Math.min(day,getDaysInMonth(year,month));break;case"y":case"Y":year+=(matches[1]-0);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);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(this._get(inst,"rangeSelect")){if(endDate){endDate=this._determineDate(endDate,null);inst.endDay=endDate.getDate();inst.endMonth=endDate.getMonth();inst.endYear=endDate.getFullYear()}else{inst.endDay=inst.currentDay;inst.endMonth=inst.currentMonth;inst.endYear=inst.currentYear}}this._adjustInstDate(inst);if(inst.input){inst.input.val(clear?"":this._formatDate(inst)+(!this._get(inst,"rangeSelect")?"":this._get(inst,"rangeSeparator")+this._formatDate(inst,inst.endDay,inst.endMonth,inst.endYear)))}},_getDate:function(inst){var startDate=(!inst.currentYear||(inst.input&&inst.input.val()=="")?null:this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));if(this._get(inst,"rangeSelect")){return[inst.rangeStart||startDate,(!inst.endYear?inst.rangeStart||startDate:this._daylightSavingAdjust(new Date(inst.endYear,inst.endMonth,inst.endDay)))]}else{return startDate}},_generateDatepicker:function(inst){var today=new Date();today=this._daylightSavingAdjust(new Date(today.getFullYear(),today.getMonth(),today.getDate()));var showStatus=this._get(inst,"showStatus");var isRTL=this._get(inst,"isRTL");var clear=(this._get(inst,"mandatory")?"":'<div class="ui-datepicker-clear"><a onclick="jQuery.datepicker._clearDate(\'#'+inst.id+"');\""+(showStatus?this._addStatus(inst,this._get(inst,"clearStatus")||"&#xa0;"):"")+">"+this._get(inst,"clearText")+"</a></div>");var controls='<div class="ui-datepicker-control">'+(isRTL?"":clear)+'<div class="ui-datepicker-close"><a onclick="jQuery.datepicker._hideDatepicker();"'+(showStatus?this._addStatus(inst,this._get(inst,"closeStatus")||"&#xa0;"):"")+">"+this._get(inst,"closeText")+"</a></div>"+(isRTL?clear:"")+"</div>";var prompt=this._get(inst,"prompt");var closeAtTop=this._get(inst,"closeAtTop");var hideIfNoPrevNext=this._get(inst,"hideIfNoPrevNext");var navigationAsDateFormat=this._get(inst,"navigationAsDateFormat");var numMonths=this._getNumberOfMonths(inst);var stepMonths=this._get(inst,"stepMonths");var isMultiMonth=(numMonths[0]!=1||numMonths[1]!=1);var currentDate=this._daylightSavingAdjust((!inst.currentDay?new Date(9999,9,9):new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));var minDate=this._getMinMaxDate(inst,"min",true);var maxDate=this._getMinMaxDate(inst,"max");var drawMonth=inst.drawMonth;var drawYear=inst.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--}}}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='<div class="ui-datepicker-prev">'+(this._canAdjustMonth(inst,-1,drawYear,drawMonth)?"<a onclick=\"jQuery.datepicker._adjustDate('#"+inst.id+"', -"+stepMonths+", 'M');\""+(showStatus?this._addStatus(inst,this._get(inst,"prevStatus")||"&#xa0;"):"")+">"+prevText+"</a>":(hideIfNoPrevNext?"":"<label>"+prevText+"</label>"))+"</div>";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='<div class="ui-datepicker-next">'+(this._canAdjustMonth(inst,+1,drawYear,drawMonth)?"<a onclick=\"jQuery.datepicker._adjustDate('#"+inst.id+"', +"+stepMonths+", 'M');\""+(showStatus?this._addStatus(inst,this._get(inst,"nextStatus")||"&#xa0;"):"")+">"+nextText+"</a>":(hideIfNoPrevNext?"":"<label>"+nextText+"</label>"))+"</div>";var currentText=this._get(inst,"currentText");currentText=(!navigationAsDateFormat?currentText:this.formatDate(currentText,today,this._getFormatConfig(inst)));var html=(prompt?'<div class="'+this._promptClass+'">'+prompt+"</div>":"")+(closeAtTop&&!inst.inline?controls:"")+'<div class="ui-datepicker-links">'+(isRTL?next:prev)+(this._isInRange(inst,(this._get(inst,"gotoCurrent")&&inst.currentDay?currentDate:today))?'<div class="ui-datepicker-current"><a onclick="jQuery.datepicker._gotoToday(\'#'+inst.id+"');\""+(showStatus?this._addStatus(inst,this._get(inst,"currentStatus")||"&#xa0;"):"")+">"+currentText+"</a></div>":"")+(isRTL?prev:next)+"</div>";var firstDay=this._get(inst,"firstDay");var changeFirstDay=this._get(inst,"changeFirstDay");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 beforeShowDay=this._get(inst,"beforeShowDay");var highlightWeek=this._get(inst,"highlightWeek");var showOtherMonths=this._get(inst,"showOtherMonths");var showWeeks=this._get(inst,"showWeeks");var calculateWeek=this._get(inst,"calculateWeek")||this.iso8601Week;var status=(showStatus?this._get(inst,"dayStatus")||"&#xa0;":"");var dateStatus=this._get(inst,"statusForDate")||this.dateStatus;var endDate=inst.endDay?this._daylightSavingAdjust(new Date(inst.endYear,inst.endMonth,inst.endDay)):currentDate;for(var row=0;row<numMonths[0];row++){for(var col=0;col<numMonths[1];col++){var selectedDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,inst.selectedDay));html+='<div class="ui-datepicker-one-month'+(col==0?" ui-datepicker-new-row":"")+'">'+this._generateMonthYearHeader(inst,drawMonth,drawYear,minDate,maxDate,selectedDate,row>0||col>0,showStatus,monthNames)+'<table class="ui-datepicker" cellpadding="0" cellspacing="0"><thead><tr class="ui-datepicker-title-row">'+(showWeeks?"<td>"+this._get(inst,"weekHeader")+"</td>":"");for(var dow=0;dow<7;dow++){var day=(dow+firstDay)%7;var dayStatus=(status.indexOf("DD")>-1?status.replace(/DD/,dayNames[day]):status.replace(/D/,dayNamesShort[day]));html+="<td"+((dow+firstDay+6)%7>=5?' class="ui-datepicker-week-end-cell"':"")+">"+(!changeFirstDay?"<span":"<a onclick=\"jQuery.datepicker._changeFirstDay('#"+inst.id+"', "+day+');"')+(showStatus?this._addStatus(inst,dayStatus):"")+' title="'+dayNames[day]+'">'+dayNamesMin[day]+(changeFirstDay?"</a>":"</span>")+"</td>"}html+="</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++){html+='<tr class="ui-datepicker-days-row">'+(showWeeks?'<td class="ui-datepicker-week-col">'+calculateWeek(printDate)+"</td>":"");for(var dow=0;dow<7;dow++){var daySettings=(beforeShowDay?beforeShowDay.apply((inst.input?inst.input[0]:null),[printDate]):[true,""]);var otherMonth=(printDate.getMonth()!=drawMonth);var unselectable=otherMonth||!daySettings[0]||(minDate&&printDate<minDate)||(maxDate&&printDate>maxDate);html+='<td class="ui-datepicker-days-cell'+((dow+firstDay+6)%7>=5?" ui-datepicker-week-end-cell":"")+(otherMonth?" ui-datepicker-otherMonth":"")+(printDate.getTime()==selectedDate.getTime()&&drawMonth==inst.selectedMonth?" ui-datepicker-days-cell-over":"")+(unselectable?" "+this._unselectableClass:"")+(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?(highlightWeek?" onmouseover=\"jQuery(this).parent().addClass('ui-datepicker-week-over');\" onmouseout=\"jQuery(this).parent().removeClass('ui-datepicker-week-over');\"":""):" onmouseover=\"jQuery(this).addClass('ui-datepicker-days-cell-over')"+(highlightWeek?".parent().addClass('ui-datepicker-week-over')":"")+";"+(!showStatus||(otherMonth&&!showOtherMonths)?"":"jQuery('#ui-datepicker-status-"+inst.id+"').html('"+(dateStatus.apply((inst.input?inst.input[0]:null),[printDate,inst])||"&#xa0;")+"');")+"\" onmouseout=\"jQuery(this).removeClass('ui-datepicker-days-cell-over')"+(highlightWeek?".parent().removeClass('ui-datepicker-week-over')":"")+";"+(!showStatus||(otherMonth&&!showOtherMonths)?"":"jQuery('#ui-datepicker-status-"+inst.id+"').html('&#xa0;');")+'" onclick="jQuery.datepicker._selectDay(\'#'+inst.id+"',"+drawMonth+","+drawYear+', this);"')+">"+(otherMonth?(showOtherMonths?printDate.getDate():"&#xa0;"):(unselectable?printDate.getDate():"<a>"+printDate.getDate()+"</a>"))+"</td>";printDate.setDate(printDate.getDate()+1);printDate=this._daylightSavingAdjust(printDate)}html+="</tr>"}drawMonth++;if(drawMonth>11){drawMonth=0;drawYear++}html+="</tbody></table></div>"}}html+=(showStatus?'<div style="clear: both;"></div><div id="ui-datepicker-status-'+inst.id+'" class="ui-datepicker-status">'+(this._get(inst,"initStatus")||"&#xa0;")+"</div>":"")+(!closeAtTop&&!inst.inline?controls:"")+'<div style="clear: both;"></div>'+($.browser.msie&&parseInt($.browser.version)<7&&!inst.inline?'<iframe src="javascript:false;" class="ui-datepicker-cover"></iframe>':"");return html},_generateMonthYearHeader:function(inst,drawMonth,drawYear,minDate,maxDate,selectedDate,secondary,showStatus,monthNames){minDate=(inst.rangeStart&&minDate&&selectedDate<minDate?selectedDate:minDate);var html='<div class="ui-datepicker-header">';if(secondary||!this._get(inst,"changeMonth")){html+=monthNames[drawMonth]+"&#xa0;"}else{var inMinYear=(minDate&&minDate.getFullYear()==drawYear);var inMaxYear=(maxDate&&maxDate.getFullYear()==drawYear);html+='<select class="ui-datepicker-new-month" onchange="jQuery.datepicker._selectMonthYear(\'#'+inst.id+"', this, 'M');\" onclick=\"jQuery.datepicker._clickMonthYear('#"+inst.id+"');\""+(showStatus?this._addStatus(inst,this._get(inst,"monthStatus")||"&#xa0;"):"")+">";for(var month=0;month<12;month++){if((!inMinYear||month>=minDate.getMonth())&&(!inMaxYear||month<=maxDate.getMonth())){html+='<option value="'+month+'"'+(month==drawMonth?' selected="selected"':"")+">"+monthNames[month]+"</option>"}}html+="</select>"}if(secondary||!this._get(inst,"changeYear")){html+=drawYear}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=endYear=new Date().getFullYear();year+=parseInt(years[0],10);endYear+=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-new-year" onchange="jQuery.datepicker._selectMonthYear(\'#'+inst.id+"', this, 'Y');\" onclick=\"jQuery.datepicker._clickMonthYear('#"+inst.id+"');\""+(showStatus?this._addStatus(inst,this._get(inst,"yearStatus")||"&#xa0;"):"")+">";for(;year<=endYear;year++){html+='<option value="'+year+'"'+(year==drawYear?' selected="selected"':"")+">"+year+"</option>"}html+="</select>"}html+="</div>";return html},_addStatus:function(inst,text){return" onmouseover=\"jQuery('#ui-datepicker-status-"+inst.id+"').html('"+text+"');\" onmouseout=\"jQuery('#ui-datepicker-status-"+inst.id+"').html('&#xa0;');\""},_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),[new Date(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){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))}return this.each(function(){typeof options=="string"?$.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this].concat(otherArgs)):$.datepicker._attachDatepicker(this,options)})};$.datepicker=new Datepicker();$(document).ready(function(){$(document.body).append($.datepicker.dpDiv).mousedown($.datepicker._checkExternalClick)})})(jQuery);(function(c){c.effects=c.effects||{};c.extend(c.effects,{save:function(f,e){for(var g=0;g<e.length;g++){if(e[g]!==null){c.data(f[0],"ec.storage."+e[g],f[0].style[e[g]])}}},restore:function(f,e){for(var g=0;g<e.length;g++){if(e[g]!==null){f.css(e[g],c.data(f[0],"ec.storage."+e[g]))}}},setMode:function(e,f){if(f=="toggle"){f=e.is(":hidden")?"show":"hide"}return f},getBaseline:function(h,e){var g,f;switch(h[0]){case"top":g=0;break;case"middle":g=0.5;break;case"bottom":g=1;break;default:g=h[0]/e.height}switch(h[1]){case"left":f=0;break;case"center":f=0.5;break;case"right":f=1;break;default:f=h[1]/e.width}return{x:f,y:g}},createWrapper:function(f){if(f.parent().attr("id")=="fxWrapper"){return f}var e={width:f.outerWidth({margin:true}),height:f.outerHeight({margin:true}),"float":f.css("float")};f.wrap('<div id="fxWrapper" style="font-size:100%;background:transparent;border:none;margin:0;padding:0"></div>');var h=f.parent();if(f.css("position")=="static"){h.css({position:"relative"});f.css({position:"relative"})}else{var i=f.css("top");if(isNaN(parseInt(i))){i="auto"}var g=f.css("left");if(isNaN(parseInt(g))){g="auto"}h.css({position:f.css("position"),top:i,left:g,zIndex:f.css("z-index")}).show();f.css({position:"relative",top:0,left:0})}h.css(e);return h},removeWrapper:function(e){if(e.parent().attr("id")=="fxWrapper"){return e.parent().replaceWith(e)}return e},setTransition:function(e,f,g,h){h=h||{};c.each(f,function(k,j){unit=e.cssUnit(j);if(unit[0]>0){h[j]=unit[0]*g+unit[1]}});return h},animateClass:function(f,h,e,j){var i=(typeof e=="function"?e:(j?j:null));var g=(typeof e=="object"?e:null);return this.each(function(){var p={};var l=c(this);var q=l.attr("style")||"";if(typeof q=="object"){q=q.cssText}if(f.toggle){l.hasClass(f.toggle)?f.remove=f.toggle:f.add=f.toggle}var m=c.extend({},(document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle));if(f.add){l.addClass(f.add)}if(f.remove){l.removeClass(f.remove)}var o=c.extend({},(document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle));if(f.add){l.removeClass(f.add)}if(f.remove){l.addClass(f.remove)}for(var k in o){if(typeof o[k]!="function"&&o[k]&&k.indexOf("Moz")==-1&&k.indexOf("length")==-1&&o[k]!=m[k]&&(k.match(/color/i)||(!k.match(/color/i)&&!isNaN(parseInt(o[k],10))))&&(m.position!="static"||(m.position=="static"&&!k.match(/left|top|bottom|right/)))){p[k]=o[k]}}l.animate(p,h,g,function(){if(typeof c(this).attr("style")=="object"){c(this).attr("style")["cssText"]="";c(this).attr("style")["cssText"]=q}else{c(this).attr("style",q)}if(f.add){c(this).addClass(f.add)}if(f.remove){c(this).removeClass(f.remove)}if(i){i.apply(this,arguments)}})})}});c.fn.extend({_show:c.fn.show,_hide:c.fn.hide,__toggle:c.fn.toggle,_addClass:c.fn.addClass,_removeClass:c.fn.removeClass,_toggleClass:c.fn.toggleClass,effect:function(e,f,g,h){return c.effects[e]?c.effects[e].call(this,{method:e,options:f||{},duration:g,callback:h}):null},show:function(){if(!arguments[0]||(arguments[0].constructor==Number||/(slow|normal|fast)/.test(arguments[0]))){return this._show.apply(this,arguments)}else{var e=arguments[1]||{};e.mode="show";return this.effect.apply(this,[arguments[0],e,arguments[2]||e.duration,arguments[3]||e.callback])}},hide:function(){if(!arguments[0]||(arguments[0].constructor==Number||/(slow|normal|fast)/.test(arguments[0]))){return this._hide.apply(this,arguments)}else{var e=arguments[1]||{};e.mode="hide";return this.effect.apply(this,[arguments[0],e,arguments[2]||e.duration,arguments[3]||e.callback])}},toggle:function(){if(!arguments[0]||(arguments[0].constructor==Number||/(slow|normal|fast)/.test(arguments[0]))||(arguments[0].constructor==Function)){return this.__toggle.apply(this,arguments)}else{var e=arguments[1]||{};e.mode="toggle";return this.effect.apply(this,[arguments[0],e,arguments[2]||e.duration,arguments[3]||e.callback])}},addClass:function(g,f,e,h){return f?c.effects.animateClass.apply(this,[{add:g},f,e,h]):this._addClass(g)},removeClass:function(g,f,e,h){return f?c.effects.animateClass.apply(this,[{remove:g},f,e,h]):this._removeClass(g)},toggleClass:function(g,f,e,h){return f?c.effects.animateClass.apply(this,[{toggle:g},f,e,h]):this._toggleClass(g)},morph:function(h,f,g,e,i){return c.effects.animateClass.apply(this,[{add:f,remove:h},g,e,i])},switchClass:function(){return this.morph.apply(this,arguments)},cssUnit:function(e){var f=this.css(e),g=[];c.each(["em","px","%","pt"],function(j,h){if(f.indexOf(h)>0){g=[parseFloat(f),h]}});return g}});jQuery.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","color","outlineColor"],function(e,f){jQuery.fx.step[f]=function(g){if(g.state==0){g.start=b(g.elem,f);g.end=a(g.end)}g.elem.style[f]="rgb("+[Math.max(Math.min(parseInt((g.pos*(g.end[0]-g.start[0]))+g.start[0]),255),0),Math.max(Math.min(parseInt((g.pos*(g.end[1]-g.start[1]))+g.start[1]),255),0),Math.max(Math.min(parseInt((g.pos*(g.end[2]-g.start[2]))+g.start[2]),255),0)].join(",")+")"}});function a(f){var e;if(f&&f.constructor==Array&&f.length==3){return f}if(e=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(f)){return[parseInt(e[1]),parseInt(e[2]),parseInt(e[3])]}if(e=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(f)){return[parseFloat(e[1])*2.55,parseFloat(e[2])*2.55,parseFloat(e[3])*2.55]}if(e=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(f)){return[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]}if(e=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(f)){return[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16)]}if(e=/rgba\(0, 0, 0, 0\)/.exec(f)){return d.transparent}return d[jQuery.trim(f).toLowerCase()]}function b(e,g){var f;do{f=jQuery.curCSS(e,g);if(f!=""&&f!="transparent"||jQuery.nodeName(e,"body")){break}g="backgroundColor"}while(e=e.parentNode);return a(f)}var d={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]};jQuery.easing.jswing=jQuery.easing.swing;jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(e,f,g,h,i){return jQuery.easing[jQuery.easing.def](e,f,g,h,i)},easeInQuad:function(e,f,g,h,i){return h*(f/=i)*f+g},easeOutQuad:function(e,f,g,h,i){return -h*(f/=i)*(f-2)+g},easeInOutQuad:function(e,f,g,h,i){if((f/=i/2)<1){return h/2*f*f+g}return -h/2*((--f)*(f-2)-1)+g},easeInCubic:function(e,f,g,h,i){return h*(f/=i)*f*f+g},easeOutCubic:function(e,f,g,h,i){return h*((f=f/i-1)*f*f+1)+g},easeInOutCubic:function(e,f,g,h,i){if((f/=i/2)<1){return h/2*f*f*f+g}return h/2*((f-=2)*f*f+2)+g},easeInQuart:function(e,f,g,h,i){return h*(f/=i)*f*f*f+g},easeOutQuart:function(e,f,g,h,i){return -h*((f=f/i-1)*f*f*f-1)+g},easeInOutQuart:function(e,f,g,h,i){if((f/=i/2)<1){return h/2*f*f*f*f+g}return -h/2*((f-=2)*f*f*f-2)+g},easeInQuint:function(e,f,g,h,i){return h*(f/=i)*f*f*f*f+g},easeOutQuint:function(e,f,g,h,i){return h*((f=f/i-1)*f*f*f*f+1)+g},easeInOutQuint:function(e,f,g,h,i){if((f/=i/2)<1){return h/2*f*f*f*f*f+g}return h/2*((f-=2)*f*f*f*f+2)+g},easeInSine:function(e,f,g,h,i){return -h*Math.cos(f/i*(Math.PI/2))+h+g},easeOutSine:function(e,f,g,h,i){return h*Math.sin(f/i*(Math.PI/2))+g},easeInOutSine:function(e,f,g,h,i){return -h/2*(Math.cos(Math.PI*f/i)-1)+g},easeInExpo:function(e,f,g,h,i){return(f==0)?g:h*Math.pow(2,10*(f/i-1))+g},easeOutExpo:function(e,f,g,h,i){return(f==i)?g+h:h*(-Math.pow(2,-10*f/i)+1)+g},easeInOutExpo:function(e,f,g,h,i){if(f==0){return g}if(f==i){return g+h}if((f/=i/2)<1){return h/2*Math.pow(2,10*(f-1))+g}return h/2*(-Math.pow(2,-10*--f)+2)+g},easeInCirc:function(e,f,g,h,i){return -h*(Math.sqrt(1-(f/=i)*f)-1)+g},easeOutCirc:function(e,f,g,h,i){return h*Math.sqrt(1-(f=f/i-1)*f)+g},easeInOutCirc:function(e,f,g,h,i){if((f/=i/2)<1){return -h/2*(Math.sqrt(1-f*f)-1)+g}return h/2*(Math.sqrt(1-(f-=2)*f)+1)+g},easeInElastic:function(e,l,g,h,i){var k=1.70158;var j=0;var f=h;if(l==0){return g}if((l/=i)==1){return g+h}if(!j){j=i*0.3}if(f<Math.abs(h)){f=h;var k=j/4}else{var k=j/(2*Math.PI)*Math.asin(h/f)}return -(f*Math.pow(2,10*(l-=1))*Math.sin((l*i-k)*(2*Math.PI)/j))+g},easeOutElastic:function(e,l,g,h,i){var k=1.70158;var j=0;var f=h;if(l==0){return g}if((l/=i)==1){return g+h}if(!j){j=i*0.3}if(f<Math.abs(h)){f=h;var k=j/4}else{var k=j/(2*Math.PI)*Math.asin(h/f)}return f*Math.pow(2,-10*l)*Math.sin((l*i-k)*(2*Math.PI)/j)+h+g},easeInOutElastic:function(e,l,g,h,i){var k=1.70158;var j=0;var f=h;if(l==0){return g}if((l/=i/2)==2){return g+h}if(!j){j=i*(0.3*1.5)}if(f<Math.abs(h)){f=h;var k=j/4}else{var k=j/(2*Math.PI)*Math.asin(h/f)}if(l<1){return -0.5*(f*Math.pow(2,10*(l-=1))*Math.sin((l*i-k)*(2*Math.PI)/j))+g}return f*Math.pow(2,-10*(l-=1))*Math.sin((l*i-k)*(2*Math.PI)/j)*0.5+h+g},easeInBack:function(e,f,g,h,i,j){if(j==undefined){j=1.70158}return h*(f/=i)*f*((j+1)*f-j)+g},easeOutBack:function(e,f,g,h,i,j){if(j==undefined){j=1.70158}return h*((f=f/i-1)*f*((j+1)*f+j)+1)+g},easeInOutBack:function(e,f,g,h,i,j){if(j==undefined){j=1.70158}if((f/=i/2)<1){return h/2*(f*f*(((j*=(1.525))+1)*f-j))+g}return h/2*((f-=2)*f*(((j*=(1.525))+1)*f+j)+2)+g},easeInBounce:function(e,f,g,h,i){return h-jQuery.easing.easeOutBounce(e,i-f,0,h,i)+g},easeOutBounce:function(e,f,g,h,i){if((f/=i)<(1/2.75)){return h*(7.5625*f*f)+g}else{if(f<(2/2.75)){return h*(7.5625*(f-=(1.5/2.75))*f+0.75)+g}else{if(f<(2.5/2.75)){return h*(7.5625*(f-=(2.25/2.75))*f+0.9375)+g}else{return h*(7.5625*(f-=(2.625/2.75))*f+0.984375)+g}}}},easeInOutBounce:function(e,f,g,h,i){if(f<i/2){return jQuery.easing.easeInBounce(e,f*2,0,h,i)*0.5+g}return jQuery.easing.easeOutBounce(e,f*2-i,0,h,i)*0.5+h*0.5+g}})})(jQuery);(function(a){a.effects.blind=function(b){return this.queue(function(){var g=a(this),e=["position","top","left"];var c=a.effects.setMode(g,b.options.mode||"hide");var h=b.options.direction||"vertical";a.effects.save(g,e);g.show();var i=a.effects.createWrapper(g).css({overflow:"hidden"});var d=(h=="vertical")?"height":"width";var f=(h=="vertical")?i.height():i.width();if(c=="show"){i.css(d,0)}var j={};j[d]=c=="show"?f:0;i.animate(j,b.duration,b.options.easing,function(){if(c=="hide"){g.hide()}a.effects.restore(g,e);a.effects.removeWrapper(g);if(b.callback){b.callback.apply(g[0],arguments)}g.dequeue()})})}})(jQuery);(function(a){a.effects.bounce=function(b){return this.queue(function(){var k=a(this),g=["position","top","left"];var c=a.effects.setMode(k,b.options.mode||"effect");var m=b.options.direction||"up";var j=b.options.distance||20;var f=b.options.times||5;var h=b.duration||250;if(/show|hide/.test(c)){g.push("opacity")}a.effects.save(k,g);k.show();a.effects.createWrapper(k);var e=(m=="up"||m=="down")?"top":"left";var l=(m=="up"||m=="left")?"pos":"neg";var j=b.options.distance||(e=="top"?k.outerHeight({margin:true})/3:k.outerWidth({margin:true})/3);if(c=="show"){k.css("opacity",0).css(e,l=="pos"?-j:j)}if(c=="hide"){j=j/(f*2)}if(c!="hide"){f--}if(c=="show"){var p={opacity:1};p[e]=(l=="pos"?"+=":"-=")+j;k.animate(p,h/2,b.options.easing);j=j/2;f--}for(var n=0;n<f;n++){var o={},d={};o[e]=(l=="pos"?"-=":"+=")+j;d[e]=(l=="pos"?"+=":"-=")+j;k.animate(o,h/2,b.options.easing).animate(d,h/2,b.options.easing);j=(c=="hide")?j*2:j/2}if(c=="hide"){var p={opacity:0};p[e]=(l=="pos"?"-=":"+=")+j;k.animate(p,h/2,b.options.easing,function(){k.hide();a.effects.restore(k,g);a.effects.removeWrapper(k);if(b.callback){b.callback.apply(this,arguments)}})}else{var o={},d={};o[e]=(l=="pos"?"-=":"+=")+j;d[e]=(l=="pos"?"+=":"-=")+j;k.animate(o,h/2,b.options.easing).animate(d,h/2,b.options.easing,function(){a.effects.restore(k,g);a.effects.removeWrapper(k);if(b.callback){b.callback.apply(this,arguments)}})}k.queue("fx",function(){k.dequeue()});k.dequeue()})}})(jQuery);(function(a){a.effects.clip=function(b){return this.queue(function(){var h=a(this),e=["position","top","left","height","width"];var c=a.effects.setMode(h,b.options.mode||"hide");var i=b.options.direction||"vertical";a.effects.save(h,e);h.show();var j=a.effects.createWrapper(h).css({overflow:"hidden"});var f=h[0].tagName=="IMG"?j:h;var d={size:(i=="vertical")?"height":"width",position:(i=="vertical")?"top":"left"};var g=(i=="vertical")?f.height():f.width();if(c=="show"){f.css(d.size,0);f.css(d.position,g/2)}var k={};k[d.size]=c=="show"?g:0;k[d.position]=c=="show"?0:g/2;f.animate(k,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){if(c=="hide"){h.hide()}a.effects.restore(h,e);a.effects.removeWrapper(h);if(b.callback){b.callback.apply(h[0],arguments)}h.dequeue()}})})}})(jQuery);(function(a){a.effects.drop=function(b){return this.queue(function(){var g=a(this),e=["position","top","left","opacity"];var c=a.effects.setMode(g,b.options.mode||"hide");var i=b.options.direction||"left";a.effects.save(g,e);g.show();a.effects.createWrapper(g);var d=(i=="up"||i=="down")?"top":"left";var h=(i=="up"||i=="left")?"pos":"neg";var f=b.options.distance||(d=="top"?g.outerHeight({margin:true})/2:g.outerWidth({margin:true})/2);if(c=="show"){g.css("opacity",0).css(d,h=="pos"?-f:f)}var j={opacity:c=="show"?1:0};j[d]=(c=="show"?(h=="pos"?"+=":"-="):(h=="pos"?"-=":"+="))+f;g.animate(j,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){if(c=="hide"){g.hide()}a.effects.restore(g,e);a.effects.removeWrapper(g);if(b.callback){b.callback.apply(this,arguments)}g.dequeue()}})})}})(jQuery);(function(a){a.effects.explode=function(b){return this.queue(function(){var f=b.options.pieces?Math.round(Math.sqrt(b.options.pieces)):3;var g=b.options.pieces?Math.round(Math.sqrt(b.options.pieces)):3;b.options.mode=b.options.mode=="toggle"?(a(this).is(":visible")?"hide":"show"):b.options.mode;var h=a(this).show().css("visibility","hidden");var l=h.offset();l.top-=parseInt(h.css("marginTop"))||0;l.left-=parseInt(h.css("marginLeft"))||0;var e=h.outerWidth(true);var k=h.outerHeight(true);for(var c=0;c<f;c++){for(var d=0;d<g;d++){h.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-d*(e/g),top:-c*(k/f)}).parent().addClass("effects-explode").css({position:"absolute",overflow:"hidden",width:e/g,height:k/f,left:l.left+d*(e/g)+(b.options.mode=="show"?(d-Math.floor(g/2))*(e/g):0),top:l.top+c*(k/f)+(b.options.mode=="show"?(c-Math.floor(f/2))*(k/f):0),opacity:b.options.mode=="show"?0:1}).animate({left:l.left+d*(e/g)+(b.options.mode=="show"?0:(d-Math.floor(g/2))*(e/g)),top:l.top+c*(k/f)+(b.options.mode=="show"?0:(c-Math.floor(f/2))*(k/f)),opacity:b.options.mode=="show"?1:0},b.duration||500)}}setTimeout(function(){b.options.mode=="show"?h.css({visibility:"visible"}):h.css({visibility:"visible"}).hide();if(b.callback){b.callback.apply(h[0])}h.dequeue();a(".effects-explode").remove()},b.duration||500)})}})(jQuery);(function(a){a.effects.fold=function(b){return this.queue(function(){var h=a(this),e=["position","top","left"];var c=a.effects.setMode(h,b.options.mode||"hide");var l=b.options.size||15;var g=!(!b.options.horizFirst);a.effects.save(h,e);h.show();var m=a.effects.createWrapper(h).css({overflow:"hidden"});var k=((c=="show")!=g);var d=k?["width","height"]:["height","width"];var f=k?[m.width(),m.height()]:[m.height(),m.width()];var j=/([0-9]+)%/.exec(l);if(j){l=parseInt(j[1])/100*f[c=="hide"?0:1]}if(c=="show"){m.css(g?{height:0,width:l}:{height:l,width:0})}var i={},n={};i[d[0]]=c=="show"?f[0]:l;n[d[1]]=c=="show"?f[1]:0;m.animate(i,b.duration/2,b.options.easing).animate(n,b.duration/2,b.options.easing,function(){if(c=="hide"){h.hide()}a.effects.restore(h,e);a.effects.removeWrapper(h);if(b.callback){b.callback.apply(h[0],arguments)}h.dequeue()})})}})(jQuery);(function(a){a.effects.highlight=function(b){return this.queue(function(){var e=a(this),c=["backgroundImage","backgroundColor","opacity"];var h=a.effects.setMode(e,b.options.mode||"show");var f=b.options.color||"#ffff99";var g=e.css("backgroundColor");a.effects.save(e,c);e.show();e.css({backgroundImage:"none",backgroundColor:f});var d={backgroundColor:g};if(h=="hide"){d.opacity=0}e.animate(d,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){if(h=="hide"){e.hide()}a.effects.restore(e,c);if(h=="show"&&jQuery.browser.msie){this.style.removeAttribute("filter")}if(b.callback){b.callback.apply(this,arguments)}e.dequeue()}})})}})(jQuery);(function(a){a.effects.pulsate=function(b){return this.queue(function(){var c=a(this);var e=a.effects.setMode(c,b.options.mode||"show");var d=b.options.times||5;if(e=="hide"){d--}if(c.is(":hidden")){c.css("opacity",0);c.show();c.animate({opacity:1},b.duration/2,b.options.easing);d=d-2}for(var f=0;f<d;f++){c.animate({opacity:0},b.duration/2,b.options.easing).animate({opacity:1},b.duration/2,b.options.easing)}if(e=="hide"){c.animate({opacity:0},b.duration/2,b.options.easing,function(){c.hide();if(b.callback){b.callback.apply(this,arguments)}})}else{c.animate({opacity:0},b.duration/2,b.options.easing).animate({opacity:1},b.duration/2,b.options.easing,function(){if(b.callback){b.callback.apply(this,arguments)}})}c.queue("fx",function(){c.dequeue()});c.dequeue()})}})(jQuery);(function(a){a.effects.puff=function(b){return this.queue(function(){var d=a(this);var f=a.extend(true,{},b.options);var g=a.effects.setMode(d,b.options.mode||"hide");var e=parseInt(b.options.percent)||150;f.fade=true;var c={height:d.height(),width:d.width()};var h=e/100;d.from=(g=="hide")?c:{height:c.height*h,width:c.width*h};f.from=d.from;f.percent=(g=="hide")?e:100;f.mode=g;d.effect("scale",f,b.duration,b.callback);d.dequeue()})};a.effects.scale=function(b){return this.queue(function(){var h=a(this);var e=a.extend(true,{},b.options);var c=a.effects.setMode(h,b.options.mode||"effect");var j=parseInt(b.options.percent)||(parseInt(b.options.percent)==0?0:(c=="hide"?0:100));var g=b.options.direction||"both";var d=b.options.origin;if(c!="effect"){e.origin=d||["middle","center"];e.restore=true}var i={height:h.height(),width:h.width()};h.from=b.options.from||(c=="show"?{height:0,width:0}:i);var f={y:g!="horizontal"?(j/100):1,x:g!="vertical"?(j/100):1};h.to={height:i.height*f.y,width:i.width*f.x};if(b.options.fade){if(c=="show"){h.from.opacity=0;h.to.opacity=1}if(c=="hide"){h.from.opacity=1;h.to.opacity=0}}e.from=h.from;e.to=h.to;e.mode=c;h.effect("size",e,b.duration,b.callback);h.dequeue()})};a.effects.size=function(b){return this.queue(function(){var k=a(this),f=["position","top","left","width","height","overflow","opacity"];var p=["position","top","left","overflow","opacity"];var m=["width","height","overflow"];var n=["fontSize"];var g=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"];var l=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"];var c=a.effects.setMode(k,b.options.mode||"effect");var e=b.options.restore||false;var h=b.options.scale||"both";var d=b.options.origin;var o={height:k.height(),width:k.width()};k.from=b.options.from||o;k.to=b.options.to||o;if(d){var j=a.effects.getBaseline(d,o);k.from.top=(o.height-k.from.height)*j.y;k.from.left=(o.width-k.from.width)*j.x;k.to.top=(o.height-k.to.height)*j.y;k.to.left=(o.width-k.to.width)*j.x}var i={from:{y:k.from.height/o.height,x:k.from.width/o.width},to:{y:k.to.height/o.height,x:k.to.width/o.width}};if(h=="box"||h=="both"){if(i.from.y!=i.to.y){f=f.concat(g);k.from=a.effects.setTransition(k,g,i.from.y,k.from);k.to=a.effects.setTransition(k,g,i.to.y,k.to)}if(i.from.x!=i.to.x){f=f.concat(l);k.from=a.effects.setTransition(k,l,i.from.x,k.from);k.to=a.effects.setTransition(k,l,i.to.x,k.to)}}if(h=="content"||h=="both"){if(i.from.y!=i.to.y){f=f.concat(n);k.from=a.effects.setTransition(k,n,i.from.y,k.from);k.to=a.effects.setTransition(k,n,i.to.y,k.to)}}a.effects.save(k,e?f:p);k.show();a.effects.createWrapper(k);k.css("overflow","hidden").css(k.from);if(h=="content"||h=="both"){g=g.concat(["marginTop","marginBottom"]).concat(n);l=l.concat(["marginLeft","marginRight"]);m=f.concat(g).concat(l);k.find("*[width]").each(function(){child=a(this);if(e){a.effects.save(child,m)}var q={height:child.height(),width:child.width()};child.from={height:q.height*i.from.y,width:q.width*i.from.x};child.to={height:q.height*i.to.y,width:q.width*i.to.x};if(i.from.y!=i.to.y){child.from=a.effects.setTransition(child,g,i.from.y,child.from);child.to=a.effects.setTransition(child,g,i.to.y,child.to)}if(i.from.x!=i.to.x){child.from=a.effects.setTransition(child,l,i.from.x,child.from);child.to=a.effects.setTransition(child,l,i.to.x,child.to)}child.css(child.from);child.animate(child.to,b.duration,b.options.easing,function(){if(e){a.effects.restore(child,m)}})})}k.animate(k.to,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){if(c=="hide"){k.hide()}a.effects.restore(k,e?f:p);a.effects.removeWrapper(k);if(b.callback){b.callback.apply(this,arguments)}k.dequeue()}})})}})(jQuery);(function(a){a.effects.shake=function(b){return this.queue(function(){var k=a(this),g=["position","top","left"];var c=a.effects.setMode(k,b.options.mode||"effect");var m=b.options.direction||"left";var j=b.options.distance||20;var f=b.options.times||3;var h=b.duration||b.options.duration||140;a.effects.save(k,g);k.show();a.effects.createWrapper(k);var e=(m=="up"||m=="down")?"top":"left";var l=(m=="up"||m=="left")?"pos":"neg";var p={},o={},d={};p[e]=(l=="pos"?"-=":"+=")+j;o[e]=(l=="pos"?"+=":"-=")+j*2;d[e]=(l=="pos"?"-=":"+=")+j*2;k.animate(p,h,b.options.easing);for(var n=1;n<f;n++){k.animate(o,h,b.options.easing).animate(d,h,b.options.easing)}k.animate(o,h,b.options.easing).animate(p,h/2,b.options.easing,function(){a.effects.restore(k,g);a.effects.removeWrapper(k);if(b.callback){b.callback.apply(this,arguments)}});k.queue("fx",function(){k.dequeue()});k.dequeue()})}})(jQuery);(function(a){a.effects.slide=function(b){return this.queue(function(){var g=a(this),e=["position","top","left"];var c=a.effects.setMode(g,b.options.mode||"show");var i=b.options.direction||"left";a.effects.save(g,e);g.show();a.effects.createWrapper(g).css({overflow:"hidden"});var d=(i=="up"||i=="down")?"top":"left";var h=(i=="up"||i=="left")?"pos":"neg";var f=b.options.distance||(d=="top"?g.outerHeight({margin:true}):g.outerWidth({margin:true}));if(c=="show"){g.css(d,h=="pos"?-f:f)}var j={};j[d]=(c=="show"?(h=="pos"?"+=":"-="):(h=="pos"?"-=":"+="))+f;g.animate(j,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){if(c=="hide"){g.hide()}a.effects.restore(g,e);a.effects.removeWrapper(g);if(b.callback){b.callback.apply(this,arguments)}g.dequeue()}})})}})(jQuery);(function(a){a.effects.transfer=function(b){return this.queue(function(){var d=a(this);var g=a.effects.setMode(d,b.options.mode||"effect");var e=a(b.options.to);var f=d.offset();var c=a('<div class="ui-effects-transfer"></div>').appendTo(document.body);if(b.options.className){c.addClass(b.options.className)}c.addClass(b.options.className);c.css({top:f.top,left:f.left,height:d.outerHeight()-parseInt(c.css("borderTopWidth"))-parseInt(c.css("borderBottomWidth")),width:d.outerWidth()-parseInt(c.css("borderLeftWidth"))-parseInt(c.css("borderRightWidth")),position:"absolute"});f=e.offset();animation={top:f.top,left:f.left,height:e.outerHeight()-parseInt(c.css("borderTopWidth"))-parseInt(c.css("borderBottomWidth")),width:e.outerWidth()-parseInt(c.css("borderLeftWidth"))-parseInt(c.css("borderRightWidth"))};c.animate(animation,b.duration,b.options.easing,function(){c.remove();if(b.callback){b.callback.apply(d[0],arguments)}d.dequeue()})})}})(jQuery);(function(b){b.fn.jcarousel=function(d){return this.each(function(){new c(this,d)})};var a={vertical:false,start:1,offset:1,size:null,scroll:3,visible:null,animation:"normal",easing:"swing",auto:0,wrap:null,initCallback:null,reloadCallback:null,itemLoadCallback:null,itemFirstInCallback:null,itemFirstOutCallback:null,itemLastInCallback:null,itemLastOutCallback:null,itemVisibleInCallback:null,itemVisibleOutCallback:null,buttonNextHTML:"<div></div>",buttonPrevHTML:"<div></div>",buttonNextEvent:"click",buttonPrevEvent:"click",buttonNextCallback:null,buttonPrevCallback:null};b.jcarousel=function(l,h){this.options=b.extend({},a,h||{});this.locked=false;this.container=null;this.clip=null;this.list=null;this.buttonNext=null;this.buttonPrev=null;this.wh=!this.options.vertical?"width":"height";this.lt=!this.options.vertical?"left":"top";var m="",j=l.className.split(" ");for(var d=0;d<j.length;d++){if(j[d].indexOf("jcarousel-skin")!=-1){b(l).removeClass(j[d]);var m=j[d];break}}if(l.nodeName=="UL"||l.nodeName=="OL"){this.list=b(l);this.container=this.list.parent();if(this.container.hasClass("jcarousel-clip")){if(!this.container.parent().hasClass("jcarousel-container")){this.container=this.container.wrap("<div></div>")}this.container=this.container.parent()}else{if(!this.container.hasClass("jcarousel-container")){this.container=this.list.wrap("<div></div>").parent()}}}else{this.container=b(l);this.list=b(l).find(">ul,>ol,div>ul,div>ol")}if(m!=""&&this.container.parent()[0].className.indexOf("jcarousel-skin")==-1){this.container.wrap('<div class=" '+m+'"></div>')}this.clip=this.list.parent();if(!this.clip.length||!this.clip.hasClass("jcarousel-clip")){this.clip=this.list.wrap("<div></div>").parent()}this.buttonPrev=b(".jcarousel-prev",this.container);if(this.buttonPrev.size()==0&&this.options.buttonPrevHTML!=null){this.buttonPrev=this.clip.before(this.options.buttonPrevHTML).prev()}this.buttonPrev.addClass(this.className("jcarousel-prev"));this.buttonNext=b(".jcarousel-next",this.container);if(this.buttonNext.size()==0&&this.options.buttonNextHTML!=null){this.buttonNext=this.clip.before(this.options.buttonNextHTML).prev()}this.buttonNext.addClass(this.className("jcarousel-next"));this.clip.addClass(this.className("jcarousel-clip"));this.list.addClass(this.className("jcarousel-list"));this.container.addClass(this.className("jcarousel-container"));var g=this.options.visible!=null?Math.ceil(this.clipping()/this.options.visible):null;var f=this.list.children("li");var n=this;if(f.size()>0){var k=0,d=this.options.offset;f.each(function(){n.format(this,d++);k+=n.dimension(this,g)});this.list.css(this.wh,k+"px");if(!h||h.size===undefined){this.options.size=f.size()}}this.container.css("display","block");this.buttonNext.css("display","block");this.buttonPrev.css("display","block");this.funcNext=function(){n.next()};this.funcPrev=function(){n.prev()};this.funcResize=function(){n.reload()};if(this.options.initCallback!=null){this.options.initCallback(this,"init")}this.setup()};var c=b.jcarousel;c.fn=c.prototype={jcarousel:"0.2.3"};c.fn.extend=c.extend=b.extend;c.fn.extend({setup:function(){this.first=null;this.last=null;this.prevFirst=null;this.prevLast=null;this.animating=false;this.timer=null;this.tail=null;this.inTail=false;if(this.locked){return}this.list.css(this.lt,this.pos(this.options.offset)+"px");var d=this.pos(this.options.start);this.prevFirst=this.prevLast=null;this.animate(d,false);b(window).unbind("resize",this.funcResize).bind("resize",this.funcResize)},reset:function(){this.list.empty();this.list.css(this.lt,"0px");this.list.css(this.wh,"10px");if(this.options.initCallback!=null){this.options.initCallback(this,"reset")}this.setup()},reload:function(){if(this.tail!=null&&this.inTail){this.list.css(this.lt,c.intval(this.list.css(this.lt))+this.tail)}this.tail=null;this.inTail=false;if(this.options.reloadCallback!=null){this.options.reloadCallback(this)}if(this.options.visible!=null){var e=this;var f=Math.ceil(this.clipping()/this.options.visible),d=0,g=0;b("li",this.list).each(function(h){d+=e.dimension(this,f);if(h+1<e.first){g=d}});this.list.css(this.wh,d+"px");this.list.css(this.lt,-g+"px")}this.scroll(this.first,false)},lock:function(){this.locked=true;this.buttons()},unlock:function(){this.locked=false;this.buttons()},size:function(d){if(d!=undefined){this.options.size=d;if(!this.locked){this.buttons()}}return this.options.size},has:function(g,d){if(d==undefined||!d){d=g}if(this.options.size!==null&&d>this.options.size){d=this.options.size}for(var h=g;h<=d;h++){var f=this.get(h);if(!f.length||f.hasClass("jcarousel-item-placeholder")){return false}}return true},get:function(d){return b(".jcarousel-item-"+d,this.list)},add:function(d,o){var n=this.get(d),g=0,l=0;if(n.length==0){var m,n=this.create(d),f=c.intval(d);while(m=this.get(--f)){if(f<=0||m.length){f<=0?this.list.prepend(n):m.after(n);break}}}else{g=this.dimension(n)}n.removeClass(this.className("jcarousel-item-placeholder"));typeof o=="string"?n.html(o):n.empty().append(o);var h=this.options.visible!=null?Math.ceil(this.clipping()/this.options.visible):null;var k=this.dimension(n,h)-g;if(d>0&&d<this.first){this.list.css(this.lt,c.intval(this.list.css(this.lt))-k+"px")}this.list.css(this.wh,c.intval(this.list.css(this.wh))+k+"px");return n},remove:function(g){var h=this.get(g);if(!h.length||(g>=this.first&&g<=this.last)){return}var f=this.dimension(h);if(g<this.first){this.list.css(this.lt,c.intval(this.list.css(this.lt))+f+"px")}h.remove();this.list.css(this.wh,c.intval(this.list.css(this.wh))-f+"px")},next:function(){this.stopAuto();if(this.tail!=null&&!this.inTail){this.scrollTail(false)}else{this.scroll(((this.options.wrap=="both"||this.options.wrap=="last")&&this.options.size!=null&&this.last==this.options.size)?1:this.first+this.options.scroll)}},prev:function(){this.stopAuto();if(this.tail!=null&&this.inTail){this.scrollTail(true)}else{this.scroll(((this.options.wrap=="both"||this.options.wrap=="first")&&this.options.size!=null&&this.first==1)?this.options.size:this.first-this.options.scroll)}},scrollTail:function(e){if(this.locked||this.animating||!this.tail){return}var d=c.intval(this.list.css(this.lt));!e?d-=this.tail:d+=this.tail;this.inTail=!e;this.prevFirst=this.first;this.prevLast=this.last;this.animate(d)},scroll:function(e,d){if(this.locked||this.animating){return}this.animate(this.pos(e),d)},pos:function(o){if(this.locked||this.animating){return}if(this.options.wrap!="circular"){o=o<1?1:(this.options.size&&o>this.options.size?this.options.size:o)}var A=this.first>o;var D=c.intval(this.list.css(this.lt));var z=this.options.wrap!="circular"&&this.first<=1?1:this.first;var u=A?this.get(z):this.get(this.last);var q=A?z:z-1;var y=null,r=0,g=false,w=0;while(A?--q>=o:++q<o){y=this.get(q);g=!y.length;if(y.length==0){y=this.create(q).addClass(this.className("jcarousel-item-placeholder"));u[A?"before":"after"](y)}u=y;w=this.dimension(y);if(g){r+=w}if(this.first!=null&&(this.options.wrap=="circular"||(q>=1&&(this.options.size==null||q<=this.options.size)))){D=A?D+w:D-w}}var t=this.clipping();var B=[];var C=0,q=o,n=0;var u=this.get(o-1);while(++C){y=this.get(q);g=!y.length;if(y.length==0){y=this.create(q).addClass(this.className("jcarousel-item-placeholder"));u.length==0?this.list.prepend(y):u[A?"before":"after"](y)}u=y;var w=this.dimension(y);if(w==0){alert("jCarousel: No width/height set for items. This will cause an infinite loop. Aborting...");return 0}if(this.options.wrap!="circular"&&this.options.size!==null&&q>this.options.size){B.push(y)}else{if(g){r+=w}}n+=w;if(n>=t){break}q++}for(var E=0;E<B.length;E++){B[E].remove()}if(r>0){this.list.css(this.wh,this.dimension(this.list)+r+"px");if(A){D-=r;this.list.css(this.lt,c.intval(this.list.css(this.lt))-r+"px")}}var h=o+C-1;if(this.options.wrap!="circular"&&this.options.size&&h>this.options.size){h=this.options.size}if(q>h){C=0,q=h,n=0;while(++C){var y=this.get(q--);if(!y.length){break}n+=this.dimension(y);if(n>=t){break}}}var k=h-C+1;if(this.options.wrap!="circular"&&k<1){k=1}if(this.inTail&&A){D+=this.tail;this.inTail=false}this.tail=null;if(this.options.wrap!="circular"&&h==this.options.size&&(h-C+1)>=1){var s=c.margin(this.get(h),!this.options.vertical?"marginRight":"marginBottom");if((n-s)>t){this.tail=n-t-s}}while(o-->k){D+=this.dimension(this.get(o))}this.prevFirst=this.first;this.prevLast=this.last;this.first=k;this.last=h;return D},animate:function(h,f){if(this.locked||this.animating){return}this.animating=true;var g=this;var d=function(){g.animating=false;if(h==0){g.list.css(g.lt,0)}if(g.options.wrap=="both"||g.options.wrap=="last"||g.options.size==null||g.last<g.options.size){g.startAuto()}g.buttons();g.notify("onAfterAnimation")};this.notify("onBeforeAnimation");if(!this.options.animation||f==false){this.list.css(this.lt,h+"px");d()}else{var e=!this.options.vertical?{left:h}:{top:h};this.list.animate(e,this.options.animation,this.options.easing,d)}},startAuto:function(d){if(d!=undefined){this.options.auto=d}if(this.options.auto==0){return this.stopAuto()}if(this.timer!=null){return}var e=this;this.timer=setTimeout(function(){e.next()},this.options.auto*1000)},stopAuto:function(){if(this.timer==null){return}clearTimeout(this.timer);this.timer=null},buttons:function(d,f){if(d==undefined||d==null){var d=!this.locked&&this.options.size!==0&&((this.options.wrap&&this.options.wrap!="first")||this.options.size==null||this.last<this.options.size);if(!this.locked&&(!this.options.wrap||this.options.wrap=="first")&&this.options.size!=null&&this.last>=this.options.size){d=this.tail!=null&&!this.inTail}}if(f==undefined||f==null){var f=!this.locked&&this.options.size!==0&&((this.options.wrap&&this.options.wrap!="last")||this.first>1);if(!this.locked&&(!this.options.wrap||this.options.wrap=="last")&&this.options.size!=null&&this.first==1){f=this.tail!=null&&this.inTail}}var e=this;this.buttonNext[d?"bind":"unbind"](this.options.buttonNextEvent,this.funcNext)[d?"removeClass":"addClass"](this.className("jcarousel-next-disabled")).attr("disabled",d?false:true);this.buttonPrev[f?"bind":"unbind"](this.options.buttonPrevEvent,this.funcPrev)[f?"removeClass":"addClass"](this.className("jcarousel-prev-disabled")).attr("disabled",f?false:true);if(this.buttonNext.length>0&&(this.buttonNext[0].jcarouselstate==undefined||this.buttonNext[0].jcarouselstate!=d)&&this.options.buttonNextCallback!=null){this.buttonNext.each(function(){e.options.buttonNextCallback(e,this,d)});this.buttonNext[0].jcarouselstate=d}if(this.buttonPrev.length>0&&(this.buttonPrev[0].jcarouselstate==undefined||this.buttonPrev[0].jcarouselstate!=f)&&this.options.buttonPrevCallback!=null){this.buttonPrev.each(function(){e.options.buttonPrevCallback(e,this,f)});this.buttonPrev[0].jcarouselstate=f}},notify:function(e){var d=this.prevFirst==null?"init":(this.prevFirst<this.first?"next":"prev");this.callback("itemLoadCallback",e,d);if(this.prevFirst!==this.first){this.callback("itemFirstInCallback",e,d,this.first);this.callback("itemFirstOutCallback",e,d,this.prevFirst)}if(this.prevLast!==this.last){this.callback("itemLastInCallback",e,d,this.last);this.callback("itemLastOutCallback",e,d,this.prevLast)}this.callback("itemVisibleInCallback",e,d,this.first,this.last,this.prevFirst,this.prevLast);this.callback("itemVisibleOutCallback",e,d,this.prevFirst,this.prevLast,this.first,this.last)},callback:function(k,f,g,j,e,h,l){if(this.options[k]==undefined||(typeof this.options[k]!="object"&&f!="onAfterAnimation")){return}var n=typeof this.options[k]=="object"?this.options[k][f]:this.options[k];if(!b.isFunction(n)){return}var m=this;if(j===undefined){n(m,g,f)}else{if(e===undefined){this.get(j).each(function(){n(m,this,j,g,f)})}else{for(var d=j;d<=e;d++){if(d!==null&&!(d>=h&&d<=l)){this.get(d).each(function(){n(m,this,d,g,f)})}}}}},create:function(d){return this.format("<li></li>",d)},format:function(g,f){var d=b(g).addClass(this.className("jcarousel-item")).addClass(this.className("jcarousel-item-"+f));d.attr("jcarouselindex",f);return d},className:function(d){return d+" "+d+(!this.options.vertical?"-horizontal":"-vertical")},dimension:function(j,i){var f=j.jquery!=undefined?j[0]:j;var g=!this.options.vertical?f.offsetWidth+c.margin(f,"marginLeft")+c.margin(f,"marginRight"):f.offsetHeight+c.margin(f,"marginTop")+c.margin(f,"marginBottom");if(i==undefined||g==i){return g}var h=!this.options.vertical?i-c.margin(f,"marginLeft")-c.margin(f,"marginRight"):i-c.margin(f,"marginTop")-c.margin(f,"marginBottom");b(f).css(this.wh,h+"px");return this.dimension(f)},clipping:function(){return !this.options.vertical?this.clip[0].offsetWidth-c.intval(this.clip.css("borderLeftWidth"))-c.intval(this.clip.css("borderRightWidth")):this.clip[0].offsetHeight-c.intval(this.clip.css("borderTopWidth"))-c.intval(this.clip.css("borderBottomWidth"))},index:function(e,d){if(d==undefined){d=this.options.size}return Math.round((((e-1)/d)-Math.floor((e-1)/d))*d)+1}});c.extend({defaults:function(e){return b.extend(a,e||{})},margin:function(i,j){if(!i){return 0}var f=i.jquery!=undefined?i[0]:i;if(j=="marginRight"&&b.browser.safari){var g={display:"block","float":"none",width:"auto"},d,h;b.swap(f,g,function(){d=f.offsetWidth});g.marginRight=0;b.swap(f,g,function(){h=f.offsetWidth});return h-d}return c.intval(b.css(f,j))},intval:function(d){d=parseInt(d);return isNaN(d)?0:d}})})(jQuery);/*
 * jQuery blockUI plugin
 * Version 2.25 (29-AUG-2009)
 * @requires jQuery v1.2.3 or later
 *
 * Examples at: http://malsup.com/jquery/block/
 * Copyright (c) 2007-2008 M. Alsup
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 *
 * Thanks to Amir-Hossein Sobhi for some excellent contributions!
 */
(function(f){if(/1\.(0|1|2)\.(0|1|2)/.test(f.fn.jquery)||/^1.1/.test(f.fn.jquery)){alert("blockUI requires jQuery v1.2.3 or later!  You are using v"+f.fn.jquery);return}f.fn._fadeIn=f.fn.fadeIn;var a=document.documentMode||0;var l=f.browser.msie&&((f.browser.version<8&&!a)||a<8);var h=f.browser.msie&&/MSIE 6.0/.test(navigator.userAgent)&&!a;f.blockUI=function(o){i(window,o)};f.unblockUI=function(o){k(window,o)};f.growlUI=function(o,q,r,p){var s=f('<div class="growlUI"></div>');if(o){s.append("<h1>"+o+"</h1>")}if(q){s.append("<h2>"+q+"</h2>")}if(r==undefined){r=3000}f.blockUI({message:s,fadeIn:700,fadeOut:1000,centerY:false,timeout:r,showOverlay:false,onUnblock:p,css:f.blockUI.defaults.growlCSS})};f.fn.block=function(o){return this.unblock({fadeOut:0}).each(function(){if(f.css(this,"position")=="static"){this.style.position="relative"}if(f.browser.msie){this.style.zoom=1}i(this,o)})};f.fn.unblock=function(o){return this.each(function(){k(this,o)})};f.blockUI.version=2.25;f.blockUI.defaults={message:"<h1>Please wait...</h1>",title:null,draggable:true,theme:false,css:{padding:0,margin:0,width:"30%",top:"40%",left:"35%",textAlign:"center",color:"#000",border:"3px solid #aaa",backgroundColor:"#fff",cursor:"wait"},themedCSS:{width:"30%",top:"40%",left:"35%"},overlayCSS:{backgroundColor:"#000",opacity:0.6,cursor:"wait"},growlCSS:{width:"350px",top:"10px",left:"",right:"10px",border:"none",padding:"5px",opacity:0.6,cursor:null,color:"#fff",backgroundColor:"#000","-webkit-border-radius":"10px","-moz-border-radius":"10px"},iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank",forceIframe:false,baseZ:1000,centerX:true,centerY:true,allowBodyStretch:true,bindEvents:true,constrainTabKey:true,fadeIn:200,fadeOut:400,timeout:0,showOverlay:true,focusInput:true,applyPlatformOpacityRules:true,onUnblock:null,quirksmodeOffsetHack:4};var m=null;var e=[];function i(I,B){var p=(I==window);var G=B&&B.message!==undefined?B.message:undefined;B=f.extend({},f.blockUI.defaults,B||{});B.overlayCSS=f.extend({},f.blockUI.defaults.overlayCSS,B.overlayCSS||{});var H=f.extend({},f.blockUI.defaults.css,B.css||{});var F=f.extend({},f.blockUI.defaults.themedCSS,B.themedCSS||{});G=G===undefined?B.message:G;if(p&&m){k(window,{fadeOut:0})}if(G&&typeof G!="string"&&(G.parentNode||G.jquery)){var v=G.jquery?G[0]:G;var w={};f(I).data("blockUI.history",w);w.el=v;w.parent=v.parentNode;w.display=v.style.display;w.position=v.style.position;if(w.parent){w.parent.removeChild(v)}}var o=B.baseZ;var x=(f.browser.msie||B.forceIframe)?f('<iframe class="blockUI" style="z-index:'+(o++)+';display:none;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0" src="'+B.iframeSrc+'"></iframe>'):f('<div class="blockUI" style="display:none"></div>');var C=f('<div class="blockUI blockOverlay" style="z-index:'+(o++)+';display:none;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0"></div>');var D;if(B.theme&&p){var r='<div class="blockUI blockMsg blockPage ui-dialog ui-widget ui-corner-all" style="z-index:'+o+';display:none;position:fixed"><div class="ui-widget-header ui-dialog-titlebar blockTitle">'+(B.title||"&nbsp;")+'</div><div class="ui-widget-content ui-dialog-content"></div></div>';D=f(r)}else{D=p?f('<div class="blockUI blockMsg blockPage" style="z-index:'+o+';display:none;position:fixed"></div>'):f('<div class="blockUI blockMsg blockElement" style="z-index:'+o+';display:none;position:absolute"></div>')}if(G){if(B.theme){D.css(F);D.addClass("ui-widget-content")}else{D.css(H)}}if(!B.applyPlatformOpacityRules||!(f.browser.mozilla&&/Linux/.test(navigator.platform))){C.css(B.overlayCSS)}C.css("position",p?"fixed":"absolute");if(f.browser.msie||B.forceIframe){x.css("opacity",0)}f([x[0],C[0],D[0]]).appendTo(p?"body":I);if(B.theme&&B.draggable&&f.fn.draggable){D.draggable({handle:".ui-dialog-titlebar",cancel:"li"})}var J=l&&(!f.boxModel||f("object,embed",p?null:I).length>0);if(h||J){if(p&&B.allowBodyStretch&&f.boxModel){f("html,body").css("height","100%")}if((h||!f.boxModel)&&!p){var u=g(I,"borderTopWidth"),y=g(I,"borderLeftWidth");var A=u?"(0 - "+u+")":0;var q=y?"(0 - "+y+")":0}f.each([x,C,D],function(L,z){var t=z[0].style;t.position="absolute";if(L<2){p?t.setExpression("height","Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.boxModel?0:"+B.quirksmodeOffsetHack+') + "px"'):t.setExpression("height",'this.parentNode.offsetHeight + "px"');p?t.setExpression("width",'jQuery.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"'):t.setExpression("width",'this.parentNode.offsetWidth + "px"');if(q){t.setExpression("left",q)}if(A){t.setExpression("top",A)}}else{if(B.centerY){if(p){t.setExpression("top",'(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"')}t.marginTop=0}else{if(!B.centerY&&p){var K=(B.css&&B.css.top)?parseInt(B.css.top):0;var M="((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "+K+') + "px"';t.setExpression("top",M)}}}})}if(G){if(B.theme){D.find(".ui-widget-content").append(G)}else{D.append(G)}if(G.jquery||G.nodeType){f(G).show()}}if((f.browser.msie||B.forceIframe)&&B.showOverlay){x.show()}if(B.fadeIn){if(B.showOverlay){C._fadeIn(B.fadeIn)}if(G){D.fadeIn(B.fadeIn)}}else{if(B.showOverlay){C.show()}if(G){D.show()}}n(1,I,B);if(p){m=D[0];e=f(":input:enabled:visible",m);if(B.focusInput){setTimeout(j,20)}}else{b(D[0],B.centerX,B.centerY)}if(B.timeout){var E=setTimeout(function(){p?f.unblockUI(B):f(I).unblock(B)},B.timeout);f(I).data("blockUI.timeout",E)}}function k(r,o){var p=(r==window);var q=f(r);var u=q.data("blockUI.history");var s=q.data("blockUI.timeout");if(s){clearTimeout(s);q.removeData("blockUI.timeout")}o=f.extend({},f.blockUI.defaults,o||{});n(0,r,o);var t;if(p){t=f("body").children().filter(".blockUI").add("body > .blockUI")}else{t=f(".blockUI",r)}if(p){m=e=null}if(o.fadeOut){t.fadeOut(o.fadeOut);setTimeout(function(){d(t,u,o,r)},o.fadeOut)}else{d(t,u,o,r)}}function d(r,q,o,p){r.each(function(t,s){if(this.parentNode){this.parentNode.removeChild(this)}});if(q&&q.el){q.el.style.display=q.display;q.el.style.position=q.position;if(q.parent){q.parent.appendChild(q.el)}f(q.el).removeData("blockUI.history")}if(typeof o.onUnblock=="function"){o.onUnblock(p,o)}}function n(t,r,o){var p=r==window,q=f(r);if(!t&&(p&&!m||!p&&!q.data("blockUI.isBlocked"))){return}if(!p){q.data("blockUI.isBlocked",t)}if(!o.bindEvents||(t&&!o.showOverlay)){return}var s="mousedown mouseup keydown keypress";t?f(document).bind(s,o,c):f(document).unbind(s,c)}function c(q){if(q.keyCode&&q.keyCode==9){if(m&&q.data.constrainTabKey){var r=e;var p=!q.shiftKey&&q.target==r[r.length-1];var o=q.shiftKey&&q.target==r[0];if(p||o){setTimeout(function(){j(o)},10);return false}}}if(f(q.target).parents("div.blockMsg").length>0){return true}return f(q.target).parents().children().filter("div.blockUI").length==0}function j(o){if(!e){return}var p=e[o===true?e.length-1:0];if(p){p.focus()}}function b(r,o,q){var w=r.parentNode,v=r.style;var z=((w.offsetWidth-r.offsetWidth)/2)-g(w,"borderLeftWidth");var u=((w.offsetHeight-r.offsetHeight)/2)-g(w,"borderTopWidth");if(o){v.left=z>0?(z+"px"):"0"}if(q){v.top=u>0?(u+"px"):"0"}}function g(o,q){return parseInt(f.css(o,q))||0}})(jQuery);function hl(){this.hotlistCount=0;this.car={}}hl.prototype.itemLoadCallback=function(e,d){if(e.prevFirst!=null){for(var a=e.prevFirst;a<=e.prevLast;a++){}}var h=e.last-e.first+1;var k=0;var j,c;var g=e;for(var a=e.first;a<=e.last;a++){var b=Math.ceil(a/h);if(k!=b){k=b;j=((b-1)*h)+1;c=j+h-1;j=j<e.first?e.first:j;c=c>e.last?e.last:c;if(e.has(j,c)){continue}this.makeRequest(e,j,c,h,b)}}};hl.prototype.makeRequest=function(c,b,f,d,a){c.lock();var e=this;jQuery.ajax({type:"GET",url:"AjaxRequest.aspx?wci=hotlist",data:{page:a,per_page:d},dataType:"json",success:function(g){e.itemAddCallback(c,b,f,g,a)}})};hl.prototype.itemAddCallback=function(e,j,k,f,b){e.unlock();e.size(hotlist.hotlistCount);var d=f;var g=e.last-e.first+1;for(var a=j;a<=k;a++){var h=a-1;var c=Math.round(((h/g)-Math.floor(h/g))*g);if(d[c]){e.add(a,this.getItemHTML(d[c],a))}else{e.add(a,"")}}jQuery(".hotliststar").unblock();this.car=e};hl.prototype.getItemHTML=function(a,c){var b='<div class="hotlist_gallery"> <a title="'+a.title+'" href="member.aspx?wci=viewprofile&member_key='+a.memberKey+'"> <img height="100" width="80" src="'+a.url+'" alt="" /> </a> <div class="removefromhotlist"><a title="Remove from Hotlist" href="#" onClick="hotlist.removeFromHotlist('+a.memberKey+", "+c+'); return false;">x</a></div> </div>';return b};hl.prototype.removeFromHotlist=function(a,c){var b=this;jQuery("div.hotlistbar").block({message:null,fadeIn:0,fadeOut:0,overlayCSS:{backgroundColor:"#000",opacity:"0"}});jQuery.ajax({type:"GET",url:"AjaxRequest.aspx?wci=hotlistremove",data:{fav_member_key:a},success:function(d){b.decrementHotlistCount();b.car.removeVisibleItem(c);jQuery("a[href='member.aspx?wci=viewprofile&member_key="+a+"']").parent().find(".hotliststar").attr("title","Add to my hotlist").hide().empty().append("<a class='hotliststarlink' onclick='return hotlist.addToHotlist_search(this, "+a+")' href='#'/>");jQuery("a[href='member.aspx?wci=memberimages&member_key="+a+"']").parent().find(".hotliststar").hide();b.setAddToHotlistProfileLink(a);jQuery("div.hotlistbar").unblock()}})};jQuery.jcarousel.fn.extend({removeVisibleItem:function(b){var c=this.get(b);var a=this.dimension(c);if(b<this.first){this.list.css(this.lt,jQuery.jcarousel.intval(this.list.css(this.lt))+a+"px")}c.remove();this.list.css(this.wh,jQuery.jcarousel.intval(this.list.css(this.wh))-a+"px");this.reload()}});hl.prototype.showHotlist=function(){jQuery(".showlink").hide();var a=this;if(this.car.reset){this.car.options.size=this.hotlistCount;this.car.reset()}jQuery(".hideViewEdit").show();jQuery(".hidelink").show();jQuery(".hotlistbar").animate({height:"154px"},400,function(){if(!hotlist.car.reset){jQuery("#hotlist_scroll").jcarousel({itemLoadCallback:a.itemLoadCallback.bind(a),scroll:9,size:a.hotlistCount})}})};hl.prototype.hideHotlist=function(){jQuery(".showlink").show();jQuery(".hideViewEdit").fadeOut();jQuery(".hidelink").hide();jQuery(".hotlistbar").animate({height:"34px"},400)};hl.prototype.setAddToHotlistProfileLink=function(a){var b=this;jQuery("li.profile_contact_hotlist_remove").removeClass("profile_contact_hotlist_remove").addClass("profile_contact_hotlist_add").find("a").unbind("click").removeAttr("onClick").removeAttr("onclick").click(function(c){c.preventDefault();b.addToHotlist_profile(a)}).attr("title","Add to Hotlist")};hl.prototype.setRemoveHotlistProfileLink=function(a){var b=this;jQuery("li.profile_contact_hotlist_add").removeClass("profile_contact_hotlist_add").addClass("profile_contact_hotlist_remove").find("a").unbind("click").removeAttr("onClick").removeAttr("onclick").click(function(c){c.preventDefault();b.removeFromHotlist_profile(a)}).attr("title","Remove from Hotlist")};jQuery(document).ready(function(){hotlist=new hl();jQuery.ajax({type:"GET",url:"AjaxRequest.aspx?wci=hotlistcount",dataType:"json",success:function(a){hotlist.hotlistCount=a.hotlistCount;if(hotlist.hotlistCount>0){jQuery("span#hotlistCount").html("("+hotlist.hotlistCount+")");jQuery(".hotlistbar").show()}jQuery(".showlink").click(function(b){b.preventDefault();hotlist.showHotlist()});jQuery(".hidelink").click(function(b){b.preventDefault();hotlist.hideHotlist()})}})});hl.prototype.addToHotlist_profile=function(a){var b=this;jQuery.ajax({type:"POST",data:{fav_member_key:a},url:"AjaxRequest.aspx?wci=HotlistAdd",success:function(){b.incrementHotlistCount();b.setRemoveHotlistProfileLink(a);b.showHotlist();jQuery(".hotliststar").show()}});return false};hl.prototype.removeFromHotlist_profile=function(a){var b=this;jQuery.ajax({type:"POST",data:{fav_member_key:a},url:"AjaxRequest.aspx?wci=HotlistRemove",success:function(){b.decrementHotlistCount();if(b.car.reset){b.car.reset()}b.setAddToHotlistProfileLink(a);jQuery(".hotliststar").hide()}});return false};hl.prototype.addToHotlist_messenger=function(b,a){var c=this;jQuery.ajax({type:"POST",data:{fav_member_key:b},url:"AjaxRequest.aspx?wci=HotlistAdd",success:function(){c.incrementHotlistCount();if(c.car.reset){c.showHotlist()}jQuery("#addBuddy"+a).hide();jQuery("#removeBuddy"+a).show()}});return false};hl.prototype.removeFromHotlist_messenger=function(b,a){var c=this;jQuery.ajax({type:"POST",data:{fav_member_key:b},url:"AjaxRequest.aspx?wci=HotlistRemove",success:function(){c.decrementHotlistCount();if(c.car.reset){c.car.reset()}jQuery("#addBuddy"+a).show();jQuery("#removeBuddy"+a).hide()}});return false};hl.prototype.addToHotlist_search=function(a,b){var c=this;jQuery(".hotliststar").block({message:null,fadeIn:0,fadeOut:0,overlayCSS:{backgroundColor:"#000",opacity:"0"}});jQuery.ajax({type:"POST",data:{fav_member_key:b},url:"AjaxRequest.aspx?wci=HotlistAdd",success:function(){c.incrementHotlistCount();jQuery(a).parent().show().empty().attr("title","In my hotlist");c.showHotlist()},error:function(){jQuery(".hotliststar").unblock()}});return false};hl.prototype.incrementHotlistCount=function(){this.hotlistCount++;jQuery("span#hotlistCount").html("("+this.hotlistCount+")")};hl.prototype.decrementHotlistCount=function(){this.hotlistCount--;jQuery("span#hotlistCount").html("("+this.hotlistCount+")");if(this.hotlistCount==0){this.hideHotlist()}};