(function($){$.datepicker.holidays=[[1,1],[1,19],[2,16],[5,25],[7,4],[9,7],[10,12],[11,11],[11,26],[12,25]];$.datepicker.setHolidays=function(date){natDays=$.datepicker.holidays;for(i=0;i<natDays.length;i++){if(date.getMonth()==natDays[i][0]-1&&date.getDate()==natDays[i][1]){return[true,"ui-datepicker-holiday"]}}return[true,""]}})(jQuery);jQuery(function($){$("input[type='text'].date,input[type='Text'].date").datepicker({beforeShowDay:$.datepicker.setHolidays,dateFormat:"mm/dd/yy"});$("input[type='text'].futuredate,input[type='Text'].futuredate").datepicker({beforeShowDay:$.datepicker.setHolidays,dateFormat:"mm/dd/yy",minDate:"0"});$(".dateTrigger").click(function(){$(this).siblings("input[type='text'].futuredate,input[type='Text'].futuredate").datepicker("show");$(this).siblings("input[type='text'].date,input[type='Text'].date").datepicker("show");return false})});var animArray=new Array();var animLock=false;function animation(startx,starty,iendx,iendy,sw,sh,d,pos){this.startx=startx;this.starty=starty;this.iendx=iendx;this.iendy=iendy;this.sw=sw;this.sh=sh;this.d=d;this.pos=pos;this.theta=2*Math.PI/2;this.step=0.01;this.ovalModifier=(this.starty-this.iendy)/(this.startx-this.iendx);var x1=this.startx;var x2=this.iendx;var y1=this.starty;var y2=this.iendy;this.step=10/Math.sqrt(Math.pow(x2-x1,2)+Math.pow(y2-y1,2))}function itinAnimateToCart(img){var d=document.createElement("IMG");d.src=img.src;document.body.appendChild(d);d.style.position="absolute";Position.clone(img,d);var starty=parseInt(d.style.top);var startx=parseInt(d.style.left);var iendx=Position.cumulativeOffset($("itinImage"))[0];var iendy=Position.cumulativeOffset($("itinImage"))[1];var sw=img.width;var sh=img.height;var a=new animation(startx,starty,iendx,iendy,sw,sh,d,1);d.style.zIndex=4;while(animLock){}var l=animArray.length;animArray.push(a);var intid=setInterval("toCartHelper("+l+")",2);a.intid=intid;animLock=false}function toCartHelper(index){var a=animArray[index];a.d.style.top=(a.starty-Math.round(Math.sin(a.theta)*(a.starty-a.iendy)))+"px";a.d.style.left=(a.iendx-Math.round(Math.cos(a.theta)*(a.startx-a.iendx)))+"px";a.d.style.width=(a.sw+Math.abs(Math.round(Math.sin(a.theta*2)*25)))+"px";a.d.style.height=(a.sw+Math.abs(Math.round(Math.sin(a.theta*2)*25)))+"px";if(a.theta<Math.PI/2){clearInterval(a.intid);document.body.removeChild(a.d);updateItin()}else{a.theta-=a.step}}function ajaxAddItin(listingid){var a=new Ajax.Request(imgroot+"/itinerary/index.cfm?action=ajax_addItin&listingid="+listingid,{onSuccess:function(response){$("itin_"+listingid).innerHTML='<a class="itineraryAdded" href="#" title="Currently Added in your Itinerary"></a>';return true},onFailure:function(response){document.body.innerHTML=response.responseText;return false}})}function ajaxAddEventItinJQuery(imgroot,eventid){var success=function(response){$("#hideItinEvent_"+eventid).removeClass("showMe");$("#hideItinEventAdded_"+eventid).removeClass("hideMe");$("#hideItinEvent_"+eventid).addClass("hideMe");$("#hideItinEventAdded_"+eventid).addClass("showMe");$("#itinerary span.itinCount").html($("#itinerary .inside").length)};$("#itinerary form").load(imgroot+"/includes/itinerary/index.cfm",{action:"ajax_addEventItin",eventID:eventid},success);return false}function removeEventFromItinAjax(imgroot,eventid){var success=function(response){$("#hideItinEventAdded_"+eventid).removeClass("showMe");$("#hideItinEventAdded_"+eventid).addClass("hideMe");$("#hideItinEvent_"+eventid).removeClass("hideMe");$("#hideItinEvent_"+eventid).addClass("showMe");$("#itinerary span.itinCount").html($("#itinerary .inside").length)};$("#itinerary form").load(imgroot+"/includes/itinerary/index.cfm",{action:"ajax_removeEventItin",eventID:eventid},success);return false}function removeEvent(imgroot,eventid){$("#mainItinerary form").load(imgroot+"/includes/itinerary/index.cfm",{action:"ajax_removeMainEventItin",eventID:eventid})}function ajaxAddItinJQuery(imgroot,listingid,name){var success=function(response){$("#hideItin_"+listingid).removeClass("showMe");$("#hideItinAdded_"+listingid).removeClass("hideMe");$("#hideItin_"+listingid).addClass("hideMe");$("#hideItinAdded_"+listingid).addClass("showMe");$("#itinerary span.itinCount").html($("#itinerary .inside").length);if(updatePlacemarkItinerary){updatePlacemarkItinerary(listingid)}};$("#itinerary form").load(imgroot+"/includes/itinerary/index.cfm",{action:"ajax_addItin",listingID:listingid},success);return false}function removeListingFromItinAjax(imgroot,listingid){var success=function(response){$("#hideItin_"+listingid).removeClass("hideMe");$("#hideItinAdded_"+listingid).removeClass("showMe");$("#hideItin_"+listingid).addClass("showMe");$("#hideItinAdded_"+listingid).addClass("hideMe");$("#itinerary span.itinCount").html($("#itinerary .inside").length)};$("#itinerary form").load(imgroot+"/includes/itinerary/index.cfm",{action:"ajax_removeItin",listingID:listingid},success);return false}function removeListing(imgroot,listingid){$("#mainItinerary form").load(imgroot+"/includes/itinerary/index.cfm",{action:"ajax_removeMainItin",listingID:listingid})}var swfobject=function(){var b="undefined",Q="object",n="Shockwave Flash",p="ShockwaveFlash.ShockwaveFlash",P="application/x-shockwave-flash",m="SWFObjectExprInst",j=window,K=document,T=navigator,o=[],N=[],i=[],d=[],J,Z=null,M=null,l=null,e=false,A=false;var h=function(){var v=typeof K.getElementById!=b&&typeof K.getElementsByTagName!=b&&typeof K.createElement!=b,AC=[0,0,0],x=null;if(typeof T.plugins!=b&&typeof T.plugins[n]==Q){x=T.plugins[n].description;if(x&&!(typeof T.mimeTypes!=b&&T.mimeTypes[P]&&!T.mimeTypes[P].enabledPlugin)){x=x.replace(/^.*\s+(\S+\s+\S+$)/,"$1");AC[0]=parseInt(x.replace(/^(.*)\..*$/,"$1"),10);AC[1]=parseInt(x.replace(/^.*\.(.*)\s.*$/,"$1"),10);AC[2]=/r/.test(x)?parseInt(x.replace(/^.*r(.*)$/,"$1"),10):0}}else{if(typeof j.ActiveXObject!=b){var y=null,AB=false;try{y=new ActiveXObject(p+".7")}catch(t){try{y=new ActiveXObject(p+".6");AC=[6,0,21];y.AllowScriptAccess="always"}catch(t){if(AC[0]==6){AB=true}}if(!AB){try{y=new ActiveXObject(p)}catch(t){}}}if(!AB&&y){try{x=y.GetVariable("$version");if(x){x=x.split(" ")[1].split(",");AC=[parseInt(x[0],10),parseInt(x[1],10),parseInt(x[2],10)]}}catch(t){}}}}var AD=T.userAgent.toLowerCase(),r=T.platform.toLowerCase(),AA=/webkit/.test(AD)?parseFloat(AD.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,q=false,z=r?/win/.test(r):/win/.test(AD),w=r?/mac/.test(r):/mac/.test(AD);
/*@cc_on q=true;@if(@_win32)z=true;@elif(@_mac)w=true;@end@*/
return{w3cdom:v,pv:AC,webkit:AA,ie:q,win:z,mac:w}}();var L=function(){if(!h.w3cdom){return}f(H);if(h.ie&&h.win){try{K.write("<script id=__ie_ondomload defer=true src=//:><\/script>");J=C("__ie_ondomload");if(J){I(J,"onreadystatechange",S)}}catch(q){}}if(h.webkit&&typeof K.readyState!=b){Z=setInterval(function(){if(/loaded|complete/.test(K.readyState)){E()}},10)}if(typeof K.addEventListener!=b){K.addEventListener("DOMContentLoaded",E,null)}R(E)}();function S(){if(J.readyState=="complete"){J.parentNode.removeChild(J);E()}}function E(){if(e){return}if(h.ie&&h.win){var v=a("span");try{var u=K.getElementsByTagName("body")[0].appendChild(v);u.parentNode.removeChild(u)}catch(w){return}}e=true;if(Z){clearInterval(Z);Z=null}var q=o.length;for(var r=0;r<q;r++){o[r]()}}function f(q){if(e){q()}else{o[o.length]=q}}function R(r){if(typeof j.addEventListener!=b){j.addEventListener("load",r,false)}else{if(typeof K.addEventListener!=b){K.addEventListener("load",r,false)}else{if(typeof j.attachEvent!=b){I(j,"onload",r)}else{if(typeof j.onload=="function"){var q=j.onload;j.onload=function(){q();r()}}else{j.onload=r}}}}}function H(){var t=N.length;for(var q=0;q<t;q++){var u=N[q].id;if(h.pv[0]>0){var r=C(u);if(r){N[q].width=r.getAttribute("width")?r.getAttribute("width"):"0";N[q].height=r.getAttribute("height")?r.getAttribute("height"):"0";if(c(N[q].swfVersion)){if(h.webkit&&h.webkit<312){Y(r)}W(u,true)}else{if(N[q].expressInstall&&!A&&c("6.0.65")&&(h.win||h.mac)){k(N[q])}else{O(r)}}}}else{W(u,true)}}}function Y(t){var q=t.getElementsByTagName(Q)[0];if(q){var w=a("embed"),y=q.attributes;if(y){var v=y.length;for(var u=0;u<v;u++){if(y[u].nodeName=="DATA"){w.setAttribute("src",y[u].nodeValue)}else{w.setAttribute(y[u].nodeName,y[u].nodeValue)}}}var x=q.childNodes;if(x){var z=x.length;for(var r=0;r<z;r++){if(x[r].nodeType==1&&x[r].nodeName=="PARAM"){w.setAttribute(x[r].getAttribute("name"),x[r].getAttribute("value"))}}}t.parentNode.replaceChild(w,t)}}function k(w){A=true;var u=C(w.id);if(u){if(w.altContentId){var y=C(w.altContentId);if(y){M=y;l=w.altContentId}}else{M=G(u)}if(!(/%$/.test(w.width))&&parseInt(w.width,10)<310){w.width="310"}if(!(/%$/.test(w.height))&&parseInt(w.height,10)<137){w.height="137"}K.title=K.title.slice(0,47)+" - Flash Player Installation";var z=h.ie&&h.win?"ActiveX":"PlugIn",q=K.title,r="MMredirectURL="+j.location+"&MMplayerType="+z+"&MMdoctitle="+q,x=w.id;if(h.ie&&h.win&&u.readyState!=4){var t=a("div");x+="SWFObjectNew";t.setAttribute("id",x);u.parentNode.insertBefore(t,u);u.style.display="none";var v=function(){u.parentNode.removeChild(u)};I(j,"onload",v)}U({data:w.expressInstall,id:m,width:w.width,height:w.height},{flashvars:r},x)}}function O(t){if(h.ie&&h.win&&t.readyState!=4){var r=a("div");t.parentNode.insertBefore(r,t);r.parentNode.replaceChild(G(t),r);t.style.display="none";var q=function(){t.parentNode.removeChild(t)};I(j,"onload",q)}else{t.parentNode.replaceChild(G(t),t)}}function G(v){var u=a("div");if(h.win&&h.ie){u.innerHTML=v.innerHTML}else{var r=v.getElementsByTagName(Q)[0];if(r){var w=r.childNodes;if(w){var q=w.length;for(var t=0;t<q;t++){if(!(w[t].nodeType==1&&w[t].nodeName=="PARAM")&&!(w[t].nodeType==8)){u.appendChild(w[t].cloneNode(true))}}}}}return u}function U(AG,AE,t){var q,v=C(t);if(v){if(typeof AG.id==b){AG.id=t}if(h.ie&&h.win){var AF="";for(var AB in AG){if(AG[AB]!=Object.prototype[AB]){if(AB.toLowerCase()=="data"){AE.movie=AG[AB]}else{if(AB.toLowerCase()=="styleclass"){AF+=' class="'+AG[AB]+'"'}else{if(AB.toLowerCase()!="classid"){AF+=" "+AB+'="'+AG[AB]+'"'}}}}}var AD="";for(var AA in AE){if(AE[AA]!=Object.prototype[AA]){AD+='<param name="'+AA+'" value="'+AE[AA]+'" />'}}v.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+AF+">"+AD+"</object>";i[i.length]=AG.id;q=C(AG.id)}else{if(h.webkit&&h.webkit<312){var AC=a("embed");AC.setAttribute("type",P);for(var z in AG){if(AG[z]!=Object.prototype[z]){if(z.toLowerCase()=="data"){AC.setAttribute("src",AG[z])}else{if(z.toLowerCase()=="styleclass"){AC.setAttribute("class",AG[z])}else{if(z.toLowerCase()!="classid"){AC.setAttribute(z,AG[z])}}}}}for(var y in AE){if(AE[y]!=Object.prototype[y]){if(y.toLowerCase()!="movie"){AC.setAttribute(y,AE[y])}}}v.parentNode.replaceChild(AC,v);q=AC}else{var u=a(Q);u.setAttribute("type",P);for(var x in AG){if(AG[x]!=Object.prototype[x]){if(x.toLowerCase()=="styleclass"){u.setAttribute("class",AG[x])}else{if(x.toLowerCase()!="classid"){u.setAttribute(x,AG[x])}}}}for(var w in AE){if(AE[w]!=Object.prototype[w]&&w.toLowerCase()!="movie"){F(u,w,AE[w])}}v.parentNode.replaceChild(u,v);q=u}}}return q}function F(t,q,r){var u=a("param");u.setAttribute("name",q);u.setAttribute("value",r);t.appendChild(u)}function X(r){var q=C(r);if(q&&(q.nodeName=="OBJECT"||q.nodeName=="EMBED")){if(h.ie&&h.win){if(q.readyState==4){B(r)}else{j.attachEvent("onload",function(){B(r)})}}else{q.parentNode.removeChild(q)}}}function B(t){var r=C(t);if(r){for(var q in r){if(typeof r[q]=="function"){r[q]=null}}r.parentNode.removeChild(r)}}function C(t){var q=null;try{q=K.getElementById(t)}catch(r){}return q}function a(q){return K.createElement(q)}function I(t,q,r){t.attachEvent(q,r);d[d.length]=[t,q,r]}function c(t){var r=h.pv,q=t.split(".");q[0]=parseInt(q[0],10);q[1]=parseInt(q[1],10)||0;q[2]=parseInt(q[2],10)||0;return(r[0]>q[0]||(r[0]==q[0]&&r[1]>q[1])||(r[0]==q[0]&&r[1]==q[1]&&r[2]>=q[2]))?true:false}function V(v,r){if(h.ie&&h.mac){return}var u=K.getElementsByTagName("head")[0],t=a("style");t.setAttribute("type","text/css");t.setAttribute("media","screen");if(!(h.ie&&h.win)&&typeof K.createTextNode!=b){t.appendChild(K.createTextNode(v+" {"+r+"}"))}u.appendChild(t);if(h.ie&&h.win&&typeof K.styleSheets!=b&&K.styleSheets.length>0){var q=K.styleSheets[K.styleSheets.length-1];if(typeof q.addRule==Q){q.addRule(v,r)}}}function W(t,q){var r=q?"visible":"hidden";if(e&&C(t)){C(t).style.visibility=r}else{V("#"+t,"visibility:"+r)}}function g(s){var r=/[\\\"<>\.;]/;var q=r.exec(s)!=null;return q?encodeURIComponent(s):s}var D=function(){if(h.ie&&h.win){window.attachEvent("onunload",function(){var w=d.length;for(var v=0;v<w;v++){d[v][0].detachEvent(d[v][1],d[v][2])}var t=i.length;for(var u=0;u<t;u++){X(i[u])}for(var r in h){h[r]=null}h=null;for(var q in swfobject){swfobject[q]=null}swfobject=null})}}();return{registerObject:function(u,q,t){if(!h.w3cdom||!u||!q){return}var r={};r.id=u;r.swfVersion=q;r.expressInstall=t?t:false;N[N.length]=r;W(u,false)},getObjectById:function(v){var q=null;if(h.w3cdom){var t=C(v);if(t){var u=t.getElementsByTagName(Q)[0];if(!u||(u&&typeof t.SetVariable!=b)){q=t}else{if(typeof u.SetVariable!=b){q=u}}}}return q},embedSWF:function(x,AE,AB,AD,q,w,r,z,AC){if(!h.w3cdom||!x||!AE||!AB||!AD||!q){return}AB+="";AD+="";if(c(q)){W(AE,false);var AA={};if(AC&&typeof AC===Q){for(var v in AC){if(AC[v]!=Object.prototype[v]){AA[v]=AC[v]}}}AA.data=x;AA.width=AB;AA.height=AD;var y={};if(z&&typeof z===Q){for(var u in z){if(z[u]!=Object.prototype[u]){y[u]=z[u]}}}if(r&&typeof r===Q){for(var t in r){if(r[t]!=Object.prototype[t]){if(typeof y.flashvars!=b){y.flashvars+="&"+t+"="+r[t]}else{y.flashvars=t+"="+r[t]}}}}f(function(){U(AA,y,AE);if(AA.id==AE){W(AE,true)}})}else{if(w&&!A&&c("6.0.65")&&(h.win||h.mac)){A=true;W(AE,false);f(function(){var AF={};AF.id=AF.altContentId=AE;AF.width=AB;AF.height=AD;AF.expressInstall=w;k(AF)})}}},getFlashPlayerVersion:function(){return{major:h.pv[0],minor:h.pv[1],release:h.pv[2]}},hasFlashPlayerVersion:c,createSWF:function(t,r,q){if(h.w3cdom){return U(t,r,q)}else{return undefined}},removeSWF:function(q){if(h.w3cdom){X(q)}},createCSS:function(r,q){if(h.w3cdom){V(r,q)}},addDomLoadEvent:f,addLoadEvent:R,getQueryParamValue:function(v){var u=K.location.search||K.location.hash;if(v==null){return g(u)}if(u){var t=u.substring(1).split("&");for(var r=0;r<t.length;r++){if(t[r].substring(0,t[r].indexOf("="))==v){return g(t[r].substring((t[r].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(A&&M){var q=C(m);if(q){q.parentNode.replaceChild(M,q);if(l){W(l,true);if(h.ie&&h.win){M.style.display="block"}}M=null;l=null;A=false}}}}}();function ddtabcontent(tabinterfaceid){this.tabinterfaceid=tabinterfaceid;this.tabs=document.getElementById(tabinterfaceid).getElementsByTagName("a");this.enabletabpersistence=true;this.hottabspositions=[];this.currentTabIndex=0;this.subcontentids=[];this.revcontentids=[];this.selectedClassTarget="link"}ddtabcontent.getCookie=function(Name){var re=new RegExp(Name+"=[^;]+","i");if(document.cookie.match(re)){return document.cookie.match(re)[0].split("=")[1]}return""};ddtabcontent.setCookie=function(name,value){document.cookie=name+"="+value+";path=/"};ddtabcontent.prototype={expandit:function(tabid_or_position){this.cancelautorun();var tabref="";try{if(typeof tabid_or_position=="string"&&document.getElementById(tabid_or_position).getAttribute("rel")){tabref=document.getElementById(tabid_or_position)}else{if(parseInt(tabid_or_position)!=NaN&&this.tabs[tabid_or_position].getAttribute("rel")){tabref=this.tabs[tabid_or_position]}}}catch(err){alert("Invalid Tab ID or position entered!")}if(tabref!=""){this.expandtab(tabref)}},cycleit:function(dir,autorun){if(dir=="next"){var currentTabIndex=(this.currentTabIndex<this.hottabspositions.length-1)?this.currentTabIndex+1:0}else{if(dir=="prev"){var currentTabIndex=(this.currentTabIndex>0)?this.currentTabIndex-1:this.hottabspositions.length-1}}if(typeof autorun=="undefined"){this.cancelautorun()}this.expandtab(this.tabs[this.hottabspositions[currentTabIndex]])},setpersist:function(bool){this.enabletabpersistence=bool},setselectedClassTarget:function(objstr){this.selectedClassTarget=objstr||"link"},getselectedClassTarget:function(tabref){return(this.selectedClassTarget==("linkparent".toLowerCase()))?tabref.parentNode:tabref},urlparamselect:function(tabinterfaceid){var result=window.location.search.match(new RegExp(tabinterfaceid+"=(\\d+)","i"));return(result==null)?null:parseInt(RegExp.$1)},expandtab:function(tabref){var subcontentid=tabref.getAttribute("rel");var associatedrevids=(tabref.getAttribute("rev"))?","+tabref.getAttribute("rev").replace(/\s+/,"")+",":"";this.expandsubcontent(subcontentid);this.expandrevcontent(associatedrevids);for(var i=0;i<this.tabs.length;i++){this.getselectedClassTarget(this.tabs[i]).className=(this.tabs[i].getAttribute("rel")==subcontentid)?"selected":""}if(this.enabletabpersistence){ddtabcontent.setCookie(this.tabinterfaceid,tabref.tabposition)}this.setcurrenttabindex(tabref.tabposition)},expandsubcontent:function(subcontentid){for(var i=0;i<this.subcontentids.length;i++){var subcontent=document.getElementById(this.subcontentids[i]);subcontent.style.display=(subcontent.id==subcontentid)?"block":"none"}},expandrevcontent:function(associatedrevids){var allrevids=this.revcontentids;for(var i=0;i<allrevids.length;i++){document.getElementById(allrevids[i]).style.display=(associatedrevids.indexOf(","+allrevids[i]+",")!=-1)?"block":"none"}},setcurrenttabindex:function(tabposition){for(var i=0;i<this.hottabspositions.length;i++){if(tabposition==this.hottabspositions[i]){this.currentTabIndex=i;break}}},autorun:function(){this.cycleit("next",true)},cancelautorun:function(){if(typeof this.autoruntimer!="undefined"){clearInterval(this.autoruntimer)}},init:function(automodeperiod){var persistedtab=ddtabcontent.getCookie(this.tabinterfaceid);var selectedtab=-1;var selectedtabfromurl=this.urlparamselect(this.tabinterfaceid);this.automodeperiod=automodeperiod||0;for(var i=0;i<this.tabs.length;i++){this.tabs[i].tabposition=i;if(this.tabs[i].getAttribute("rel")){var tabinstance=this;this.hottabspositions[this.hottabspositions.length]=i;this.subcontentids[this.subcontentids.length]=this.tabs[i].getAttribute("rel");this.tabs[i].onclick=function(){tabinstance.expandtab(this);tabinstance.cancelautorun();return false};if(this.tabs[i].getAttribute("rev")){this.revcontentids=this.revcontentids.concat(this.tabs[i].getAttribute("rev").split(/\s*,\s*/))}if(selectedtabfromurl==i||this.enabletabpersistence&&selectedtab==-1&&parseInt(persistedtab)==i||!this.enabletabpersistence&&selectedtab==-1&&this.getselectedClassTarget(this.tabs[i]).className=="selected"){selectedtab=i}}}if(selectedtab!=-1){this.expandtab(this.tabs[selectedtab])}else{this.expandtab(this.tabs[this.hottabspositions[0]])}if(parseInt(this.automodeperiod)>500&&this.hottabspositions.length>1){this.autoruntimer=setInterval(function(){tabinstance.autorun()},this.automodeperiod)}}};var lastMouseX;var lastMouseY;var curPopupWindow=null;function setLastMousePosition(e){if(navigator.appName.indexOf("Microsoft")!=-1){e=window.event}lastMouseX=e.screenX;lastMouseY=e.screenY}function openPopup(url,name,pWidth,pHeight,features,snapToLastMousePosition){openPopupFocus(url,name,pWidth,pHeight,features,snapToLastMousePosition,true)}function openPopupFocus(url,name,pWidth,pHeight,features,snapToLastMousePosition,closeOnLoseFocus){closePopup();if(snapToLastMousePosition){if(lastMouseX-pWidth<0){lastMouseX=pWidth}if(lastMouseY+pHeight>screen.height){lastMouseY-=(lastMouseY+pHeight+50)-screen.height}lastMouseX-=pWidth;lastMouseY+=10;features+="screenX="+lastMouseX+",left="+lastMouseX+"screenY="+lastMouseY+",top="+lastMouseY}if(closeOnLoseFocus){curPopupWindow=window.open(url,name,features,false);curPopupWindow.focus()}else{win=window.open(url,name,features,false);win.focus()}}function closePopup(){if(curPopupWindow!=null){if(!curPopupWindow.closed){curPopupWindow.close()}curPopupWindow=null}}function openLookup(baseURL,tbl,frm,fld_id,fld_txt,param){var str=baseURL+"/includes/lookup/lookup.cfm?tbl="+tbl+"&frm="+frm+"&fld_id="+fld_id+"&fld_txt="+fld_txt;if(param==undefined){param=""}str+="&param="+param;openPopup(str,"lookup",430,300,"width=430,height=300,toolbar=no,status=no,directories=no,menubar=no,resizable=yes,scrollable=no",true)}function openCombo(baseURL,frm,fld,evt){var str=baseURL+"/includes/lookup/combo.cfm?frm="+frm+"&fld="+fld+"&evt="+evt;openPopup(str,"combo",300,200,"width=300,height=200,toolbar=no,status=no,directories=no,menubar=no,resizable=yes,scrollable=no",true)}function showDate(baseURL,fld,frm){var str=baseURL+"/includes/lookup/cal.cfm?frm="+frm+"&fld="+fld;if(eval("document."+frm+"."+fld).value.length>0){str=str+"&cdate="+eval("document."+frm+"."+fld).value}openPopup(str,"calwin",170,190,"width=170,height=190,toolbar=no,status=no,directories=no,menubar=no,resizable=no,scrollable=no",true)}function openWindow(url){var popupWin=window.open(url,"newWin","status=no,scrollbars,resizable,menubar,toolbar,dependent,width=777,height=457,left=50,top=50");popupWin.focus()}function openWindowNoJS(url){var popupWin=window.open(url,"newWin","status=no,scrollbars,resizable,menubar,toolbar,dependent,width=777,height=457,left=50,top=50");popupWin.focus();return false}function openPTWindow(url,view,id){return ptWin(url,view,id)}function openMap(url){var mapWin=window.open(url,"mapWin","status,scrollbars,resizable,menubar,toolbar,dependent,width=770,height=502,left=50,top=50");mapWin.focus()}function openWindowGolf(url){popupWin=window.open(url,"golfWin","status,scrollbars,resizable,toolbar=yes,dependent,width=640,height=550,left=50,top=50");popupWin.focus()}function openPolicy(url){popupWin=window.open(url,"PWin","status,scrollbars,resizable,toolbar=yes,dependent,width=610,height=550,left=50,top=50");popupWin.focus()}function ptWin(location,view,id){location=typeof(location)!="undefined"&&location!=""?location:imgroot+"/phototour/";if(typeof(view)!="undefined"){location+="?view="+view}if(typeof(id)!="undefined"){location+="&id="+id}GB_show("Gallery",location,515,750)}function windowLocation(location){window.location=location}function mapWin(b){URL=imgroot+"/listings/index.cfm?action=mapcat&regionId="+b;var a=window.open(URL,"mapWin","status=no,scrollbars=yes,resizable=yes,menubar=no,toolbar=no,dependent,width=730,height=570,left=50,top=50");a.focus()}function mapWinByCat(b){URL=imgroot+"/listings/index.cfm?action=mapcat&regionId=0&catid="+b;var a=window.open(URL,"mapWin","status=no,scrollbars=yes,resizable=yes,menubar=no,toolbar=no,dependent,width=730,height=570,left=50,top=50");a.focus()}function printMap(c,b){URL=imgroot+"/listings/index.cfm?action=printMap&addr="+c+"&listingID="+b;var a=window.open(URL,"mapWin","status=no,scrollbars=yes,resizable=yes,menubar=no,toolbar=no,dependent,width=510,height=410,left=50,top=50");a.focus()}MSDropDown={settings:{theme:"blue",autoHide:"off",offClass:"aOff",onClass:"aOn",maintainHeight:0,idpostfixmain:"__ms",idpostfixchild:"__child",idpostfixa:"__msa",idposttitlediv:"__divtitle",idposttitle:"__title",idhidden:"__input",showTitle:true,visibleRows:7,iconWithTitle:true},styles:{ddclass:"msDropDown",childclass:"msDropDown_Child",arrow:"msdropdown/dd_arrow.gif",arrowclass:"msArrow",titleclass:"msDropdownTitle",disabled:"msDisabled",enabled:"msEnabled"},attributes:{action:"onfocus,onblur,onchange,onclick,ondblclick,onmousedown,onmouseup,onmouseover,onmousemove,onmouseout,onkeypress,onkeydown,onkeyup",prop:"size,multiple,disabled,tabindex"},selected:{},zIndex:999,insideWindow:false,dp_array:{},currentDiv:"",init:function(byID){this.storeNmake(byID)},storeNmake:function(byID){var dps=this.getAllDropDown(byID);var total=dps.length;for(var iCount=0;iCount<total;iCount++){var currentSelect=dps[iCount];if(currentSelect.id!=undefined&&currentSelect.id.length>0){this.addNewEvents(currentSelect.id);var prop=[];var selectProp=this.getSelectProperties(currentSelect.id);prop.selectAttributes=selectProp.attributes;prop.selectAction=selectProp.action;var width=(this.dp_array[currentSelect.id]==undefined)?$(currentSelect).width():this.dp_array[currentSelect.id].width;var height=(this.dp_array[currentSelect.id]==undefined)?$(currentSelect).height():this.dp_array[currentSelect.id].height;$(currentSelect).css({width:width+"px"});var oOptions=$("#"+currentSelect.id+"> *");var totalOptions=oOptions.length;for(var optionCount=0;optionCount<totalOptions;optionCount++){var foundopt=false;var currentOption;var values;if(oOptions[optionCount].nodeName=="OPTION"){currentOption=oOptions[optionCount];values=this.getOptionsProperties(currentOption);prop.push(values)}else{if(oOptions[optionCount].nodeName=="OPTGROUP"){foundopt=true;var optinit=false;var oCurrentOptGroup=oOptions[optionCount].childNodes;for(var optoptioncount=0;optoptioncount<oCurrentOptGroup.length;optoptioncount++){currentOption=oCurrentOptGroup[optoptioncount];values=this.getOptionsProperties(currentOption);if(values!=false){if(optinit==false){optinit=true;var opt=this.getOptGroupProperties(oOptions[optionCount]);values.optstart=opt}prop.push(values)}}if(foundopt){prop[prop.length-1].optend="end"}}}}prop.id=currentSelect.id;prop.position=(this.dp_array[currentSelect.id]==undefined)?$("#"+currentSelect.id).position():this.dp_array[currentSelect.id].position;prop.width=width;prop.height=height;this.store(currentSelect.id,prop)}else{throw"An id is required!"}}this.makeAdropDown(byID)},setOutOfVision:function(id){$("#"+id).css({position:"absolute",left:"-5000px",top:"-5000px"})},makeAdropDown:function(){var alldps=this.getdps();var idMain=this.settings.idpostfixmain;var idChild=this.settings.idpostfixchild;var idhidden=this.settings.idhidden;var idA=this.settings.idpostfixa;var idtitlediv=this.settings.idposttitlediv;var idtitle=this.settings.idposttitle;var ddclass=this.styles.ddclass;var childclass=this.styles.childclass;var arrowclass=this.styles.arrowclass;var arrow=this.styles.arrow;var titleclass=this.styles.titleclass;var counter=0;for(i in alldps){var id=i;this.setOutOfVision(id);var values=alldps[i];var selectProp=values.selectAttributes;var selectAction=values.selectAction;var position=values.position;var width=(values.width)+"px";var titlewidth=values.width-18+"px";var top=position.top+"px";var left=position.left+"px";var dd_id=id+idMain;if($("#"+dd_id).length>0){$("#"+dd_id).remove()}var childid=dd_id+idChild;var childtitledivid=dd_id+idtitlediv;var titleid=dd_id+idtitle;var hiddeninput=dd_id+idhidden;var onchange=values.onchange;var childheight="";if(values.length>this.getVisibleRows()){childheight="120"}var ddhtml="";var zIndex=this.zIndex--;var css=(selectProp.disabled==true)?" "+this.styles.disabled:this.styles.enabled;ddhtml+="<div  id='"+dd_id+"' class='"+ddclass+"' style='position:relative;width:"+width+";z-Index:"+zIndex+"'>";if(selectProp.disabled==true){ddhtml+="<div id='"+childtitledivid+"' class='"+css+"'><div class='"+arrowclass+"'><img src='"+arrow+"' border='0' align='right' /></div><div style='white-space:nowrap;width:"+titlewidth+"' class='"+titleclass+"' id='"+titleid+"'>Loading...</div><input style='text-indent:-400px;position:absolute; top:0; left:0; border:none; background:transparent;cursor:pointer;width:0px;heigh:0px;display:none' type='text' value='' id='"+hiddeninput+"' name='"+hiddeninput+"' /></div>"}else{ddhtml+="<div id='"+childtitledivid+"' class='"+css+"' onclick=\"MSDropDown.openDropDown('"+dd_id+"')\"><div class='"+arrowclass+"'></div><div style='white-space:nowrap;width:"+titlewidth+"' class='"+titleclass+"' id='"+titleid+"'>Loading...</div><input style='position:absolute; top:0; left:0; border:none; background:transparent;cursor:pointer;width:0px;heigh:0px;display:none' type='text' value='' id='"+hiddeninput+"' name='"+hiddeninput+"' /></div>"}ddhtml+="<div id='"+childid+"' class='coloredScroll "+childclass+"' style='width:"+(values.width+2)+"px'>";var ahtml="";var sValue="";var sImg="";for(var aCount=0;aCount<values.length;aCount++){var curretna=values[aCount];var aID=dd_id+"_a_"+aCount;var value=curretna.value;if(aCount==0){var selectedID=aID}var text=curretna.text;var selected=curretna.selected;var icon=curretna.icon;if($("#"+id+" option:selected").text()==text){sValue=text;selectedID=aID;var showIcon=this.getSetting("iconWithTitle");if(icon!=undefined&&showIcon==true){sImg="<img hspace='2' align='absMiddle' src='"+icon+"' />"}}var isDisabled=curretna.disabled;var img="";var sTitle=(this.getShowTitle()==true)?text:"";var innerStyle=(curretna.style!=undefined)?curretna.style:"";if(curretna.optstart!=undefined){var optLabel=(curretna.optstart.label==undefined)?"":curretna.optstart.label;ahtml+="<div style='display:block;clear:both;'><span style='font-weight:bold;font-style:italic'>"+optLabel+"</span><div style='display:block;text-indent:10px;clear:both:'>"}if(icon!=undefined){img="<img id='"+aID+"_icon' class='icon' align='left' src='"+icon+"' />"}if(isDisabled==undefined||isDisabled==false){ahtml+="<a id='"+aID+"' title='"+sTitle+"' style='display:block;"+innerStyle+"'+ href='javascript:void(0);' value='"+(value)+"' onclick=\"MSDropDown.setSelected('"+dd_id+"', '"+String(text).replace(/\\?'/,"\\'")+"', '"+aID+"', '"+String(value).replace(/\\?'/,"\\'")+"', '"+icon+"')\">"}else{ahtml+="<a id='"+aID+"' title='"+sTitle+"' style='cursor:pointer;filter:alpha(opacity=50);-moz-opacity:.50;opacity:.50;display:block;"+innerStyle+"' href='javascript:void(0);' value='"+(value)+"'>"}ahtml+=img+"<span>"+text+"</span></a>";if(curretna.optend=="end"){ahtml+="</div></div>"}}sValue=(sValue=="")?values[0].text:sValue;ddhtml+=ahtml;ddhtml+="</div>";ddhtml+="</div>";counter++;$("#"+id).after(ddhtml);if(selectProp.disabled==false){}else{$("#"+dd_id).css({opacity:0.4})}this.applyEvents(dd_id,values,id);if(childheight!=""){$("#"+childid).css({overflowY:"scroll",overflowX:"hidden",height:childheight+"px"})}$("#"+titleid).html(sImg+sValue);this.manageSelection(id,selectedID)}},hasAction:function(prop,action){var sAction=action;var selectAction=prop;for(var i in selectAction){if(i.toString().toLowerCase()==sAction.toString().toLowerCase()&&selectAction[i]==true){return true}}return false},applyEvents:function(id,values,parent){var sID=id;var parent_id=parent;var props=values;var selectProp=props.selectAttributes;var selectAction=props.selectAction;if(selectProp.disabled==false){for(var i in selectAction){if(selectAction[i]==true){switch(i){case"onfocus":$("#"+sID).bind("focus",function(e){$("#"+parent_id).focus()});break;case"onblur":break;case"onchange":break;case"onclick":$("#"+sID).bind("click",function(e){$("#"+parent_id).click()});break;case"ondblclick":$("#"+sID).bind("dblclick",function(e){$("#"+parent_id).dblclick()});break;case"onmousedown":$("#"+sID).bind("mousedown",function(e){$("#"+parent_id).mousedown()});break;case"onmouseup":$("#"+sID).bind("mouseup",function(e){$("#"+parent_id).mouseup()});break;case"onmouseover":$("#"+sID).bind("mouseover",function(e){$("#"+parent_id).mouseover()});break;case"onmousemove":$("#"+sID).bind("mousemove",function(e){$("#"+parent_id).mousemove()});break;case"onmouseout":$("#"+sID).bind("mouseleave",function(e){$("#"+parent_id).mouseout()});break;case"onkeypress":$("#"+sID).bind("keypress",function(e){$("#"+parent_id).keypress()});break;case"onkeydown":$("#"+sID).bind("keydown",function(e){$("#"+parent_id).keydown()});break;case"onkeyup":$("#"+sID).bind("keyup",function(e){$("#"+parent_id).keyup()});break}}}}},addNewEvents:function(id){document.getElementById(id).refresh=function(e){MSDropDown.refresh(this.id)}},refresh:function(id){MSDropDown.storeNmake("#"+id)},manageSelection:function(id,selected){if(this.selected[id]==undefined){this.selected[id]={selected:selected,previous:selected}}this.selected[id].selected=selected;if(this.selected[id].previous!=this.selected[id].selected){$("#"+this.selected[id].previous).removeClass("selected")}$("#"+this.selected[id].selected).addClass("selected");this.selected[id].previous=this.selected[id].selected},setSelected:function(id,value,aID,val,imgsrc){var parentID=id.split("__")[0];this.selected[parentID].current=aID;var sID=id;var oPorop=prop;var targetDiv=sID+this.settings.idposttitle;var hiddeninput=sID+this.settings.idhidden;var prop=this.getdps(parentID);$("#"+parentID+" option:selected").text(value.toString());$("#"+parentID+" option:selected").val(val.toString());if($("#"+parentID).attr("onfocus")!=undefined){$("#"+parentID).focus();$("#"+hiddeninput).focus()}if($("#"+parentID).attr("onchange")!=undefined){$("#"+parentID).change()}$("#"+hiddeninput).val(value);var showIcon=this.getSetting("iconWithTitle");if(imgsrc.toString()!="undefined"&&showIcon==true){value="<img hspace='2' align='absmiddle' src='"+imgsrc+"' />"+value}$("#"+targetDiv).html(value);this.manageSelection(parentID,aID);this.closeDropDown()},openDropDown:function(id){var prentDiv=id;var childDiv=id+="__child";if($("#"+childDiv).css("display")=="block"){MSDropDown.closeDropDown();return false}var position=$("#"+prentDiv).position();var childPosTop=$("#"+prentDiv).height()+parseInt($("#"+prentDiv).css("padding-top"))+"px";var parentWidth=parseInt($("#"+prentDiv).width());var childWidth=parseInt($("#"+childDiv).width());if(childWidth<parentWidth){$("#"+childDiv).css({width:$("#"+prentDiv).width()+"px"})}this.currentDiv=childDiv;$("#"+childDiv).css({position:"absolute",top:childPosTop,left:"-1px"});$("#"+childDiv).slideDown("fast");$("#"+childDiv).mouseover(function(e){MSDropDown.setInsideWindow(true)});$("#"+childDiv).mouseout(function(e){MSDropDown.setInsideWindow(false)});$(document).bind("mouseup",function(e){if(MSDropDown.insideWindow==false){$(document).unbind("mouseup");MSDropDown.closeDropDown()}})},setInsideWindow:function(set){this.insideWindow=set},closeDropDown:function(){var curerntDiv=this.currentDiv;var parentID=curerntDiv.split("__")[0];var hiddeninput=curerntDiv+this.settings.idhidden;if($("#"+parentID).attr("onblur")!=undefined){$("#"+parentID).focus();$("#"+hiddeninput).focus()}$("#"+this.currentDiv).slideUp("fast")},store:function(id,prop){this.dp_array[id]=prop},getdps:function(byID){return(byID==undefined)?this.dp_array:this.dp_array[byID]},getAllDropDown:function(byID){return(byID==undefined)?$("body select"):$(byID)},showTitle:function(show){this.settings.showTitle=show},getShowTitle:function(){return this.settings.showTitle},setVisibleRows:function(rows){this.settings.visibleRows=rows},getVisibleRows:function(){return this.settings.visibleRows},getSelectProperties:function(id){var currentSelect=id;var attributes=this.attributes.prop;var prop=new Object();var attribs=attributes.split(",");var total=attribs.length;prop.attributes=new Object();for(var iCount=0;iCount<total;iCount++){var key=attribs[iCount].toString();var value=$("#"+currentSelect).attr(key);if(value!=undefined){prop.attributes[key]=value}}attributes=this.attributes.action;attribs=attributes.split(",");total=attribs.length;prop.action=new Object();for(var iCount=0;iCount<total;iCount++){var key=attribs[iCount].toString();var value=$("#"+currentSelect).attr(key);if(value!=undefined){prop.action[key]=true}else{prop.action[key]=false}}return prop},getOptionsProperties:function(option){var currentOption=option;if(currentOption.text!=undefined){var prop=new Object();prop.text=currentOption.text;prop.value=(currentOption.value==undefined)?currentOption.text:currentOption.value;var attribs=currentOption.attributes;var total=attribs.length;for(var iCount=0;iCount<total;iCount++){var att=attribs[iCount];prop[att.nodeName]=att.nodeValue}return prop}else{return false}},getOptGroupProperties:function(opt){var oOpt=opt;var prop=new Object();prop.optstart="start";var attribs=oOpt.attributes;var total=attribs.length;if(total>0){for(var iCount=0;iCount<total;iCount++){var att=attribs[iCount];prop[att.nodeName]=att.nodeValue}}return prop},showIconWithTitle:function(show){this.settings.iconWithTitle=show},getSetting:function(prop){return this.settings[prop]}};var GB_HEIGHT=400;var GB_WIDTH=400;function GB_show(caption,url,height,width){GB_HEIGHT=height||400;GB_WIDTH=width||400;$(document.body).append('<div id="GB_overlay"></div><div id="GB_window"><div id="GB_caption"></div><a class="GB_hide" href="#">Close</a></div>');$("#GB_window a.GB_hide").click(GB_hide);$(window).resize(GB_position);$("#GB_window").append('<iframe id="GB_frame" src="'+url+'" frameborder="0"></iframe>');$("#GB_caption").html(caption);GB_position();$("#GB_overlay").css({opacity:0,display:"block",height:$("body").height()}).fadeTo("normal",0.7);$("#GB_window").show()}function GB_hide(){$("#GB_window,#GB_overlay").remove();return false}function GB_position(e){var w=$(this).width();var h=$(this).height();$("#GB_overlay").css({width:$("body").width(),height:$("body").height()});$("#GB_frame,#GB_window").css({width:GB_WIDTH+"px",height:GB_HEIGHT+"px"}).filter("#GB_window").height(GB_HEIGHT+$("#GB_caption").outerHeight());var w2=$("#GB_window").outerWidth();var h2=$("#GB_window").outerHeight();windowTop=(h>=h2?(h-h2)/2:0)+$(this).scrollTop();windowLeft=(w>=w2?(w-w2)/2:0)+$(this).scrollLeft();$("#GB_window").css({left:windowLeft+"px",top:windowTop+"px"})}(function(d){var k=d.scrollTo=function(a,i,e){d(window).scrollTo(a,i,e)};k.defaults={axis:"xy",duration:parseFloat(d.fn.jquery)>=1.3?0:1};k.window=function(a){return d(window)._scrollable()};d.fn._scrollable=function(){return this.map(function(){var a=this,i=!a.nodeName||d.inArray(a.nodeName.toLowerCase(),["iframe","#document","html","body"])!=-1;if(!i){return a}var e=(a.contentWindow||a).document||a.ownerDocument||a;return d.browser.safari||e.compatMode=="BackCompat"?e.body:e.documentElement})};d.fn.scrollTo=function(n,j,b){if(typeof j=="object"){b=j;j=0}if(typeof b=="function"){b={onAfter:b}}if(n=="max"){n=9000000000}b=d.extend({},k.defaults,b);j=j||b.speed||b.duration;b.queue=b.queue&&b.axis.length>1;if(b.queue){j/=2}b.offset=p(b.offset);b.over=p(b.over);return this._scrollable().each(function(){var q=this,r=d(q),f=n,s,g={},u=r.is("html,body");switch(typeof f){case"number":case"string":if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(f)){f=p(f);break}f=d(f,this);case"object":if(f.is||f.style){s=(f=d(f)).offset()}}d.each(b.axis.split(""),function(a,i){var e=i=="x"?"Left":"Top",h=e.toLowerCase(),c="scroll"+e,l=q[c],m=k.max(q,i);if(s){g[c]=s[h]+(u?0:l-r.offset()[h]);if(b.margin){g[c]-=parseInt(f.css("margin"+e))||0;g[c]-=parseInt(f.css("border"+e+"Width"))||0}g[c]+=b.offset[h]||0;if(b.over[h]){g[c]+=f[i=="x"?"width":"height"]()*b.over[h]}}else{var o=f[h];g[c]=o.slice&&o.slice(-1)=="%"?parseFloat(o)/100*m:o}if(/^\d+$/.test(g[c])){g[c]=g[c]<=0?0:Math.min(g[c],m)}if(!a&&b.queue){if(l!=g[c]){t(b.onAfterFirst)}delete g[c]}});t(b.onAfter);function t(a){r.animate(g,j,b.easing,a&&function(){a.call(this,n,b)})}}).end()};k.max=function(a,i){var e=i=="x"?"Width":"Height",h="scroll"+e;if(!d(a).is("html,body")){return a[h]-d(a)[e.toLowerCase()]()}var c="client"+e,l=a.ownerDocument.documentElement,m=a.ownerDocument.body;return Math.max(l[h],m[h])-Math.min(l[c],m[c])};function p(a){return typeof a=="object"?a:{top:a,left:a}}})(jQuery);$(document).ready(function(){jQuery.fn.fadeToggle=function(speed,easing,callback){return this.animate({opacity:"toggle"},speed,easing,callback)};$(".btn-slide").click(function(){$("div#panel").fadeToggle("slow");$(this).toggleClass("active");return false});$(".itinRemoveBtn").click(function(){$("div#panel").show("fast")})});
