function wbContact(){$("#msgdone").hide();name=$("#name").val();phone=$("#phone").val();email=$("#email").val();what=$("#what").val();$.post("/contact/",{name:name,phone:phone,email:email,what:what},function(a){$("#msgdone").show()});return false}selextra=new Array();function addExtra(b){var a=b.name;var c=$(b).val();selextra[a]=c}$(document).ready(function(){$("#checkAvail").click(function(){var a="";for(var b in selextra){a+=","+b+":"+selextra[b]}day=$("#day").val();how=$("#how").val();$.post("bnow",{day:day,how:how,extra:a},function(c){$("#resp").html(c)})})});if(typeof(iMonth)=="undefined"){iMonth=new Date().getMonth()}if(typeof(iYear)=="undefined"){iYear=new Date().getFullYear()}if(typeof(iDay)=="undefined"){iDay=new Date().getDate()}if(typeof(itype)=="undefined"){itype="strict"}if(typeof(imaxDays)=="undefined"){imaxDays=700}if(typeof(stDay)=="undefined"){startDay=iDay}if(typeof(stMonth)=="undefined"){startMonth=iMonth}if(typeof(stYear)=="undefined"){startYear=iYear}if(typeof(addZero)=="undefined"){addZero=true}if(typeof(offX)=="undefined"){offX=10}if(typeof(offY)=="undefined"){offY=-10}if(typeof(formatInputs)=="undefined"){formatInputs=1}if(typeof(formatSplitter)=="undefined"){formatSplitter="/"}if(typeof(monthFormat)=="undefined"){monthFormat="mm"}if(typeof(yearFormat)=="undefined"){yearFormat="yyyy"}if(typeof(folowMouse)=="undefined"){folowMouse=true}if(typeof(formatType)=="undefined"){formatType="dd"+formatSplitter+monthFormat+formatSplitter+yearFormat}if(typeof(callNotice)=="undefined"){callNotice="fallsilent()"}_baseCalCreated=0;var IE=document.all?true:false;var tempX=0;var tempY=0;if(!IE){document.captureEvents(Event.MOUSEMOVE)}document.onmousemove=hack_getMouseXY;function hack_getMouseXY(c){try{getMouseXY(c);return true}catch(e){return true}}function getMouseXY(b){if(IE){tempX=event.clientX+document.body.scrollLeft;tempY=event.clientY+document.body.scrollTop}else{tempX=b.pageX;tempY=b.pageY}if(tempX<0){tempX=0}if(tempY<0){tempY=0}return true}function getScrollXY(){var c=0,e=0;if(typeof(window.pageYOffset)=="number"){e=window.pageYOffset;c=window.pageXOffset}else{if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){e=document.body.scrollTop;c=document.body.scrollLeft}else{if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){e=document.documentElement.scrollTop;c=document.documentElement.scrollLeft}}}return[c,e]}var d=document;function cel(b){return d.createElement(b)}function sa(e,g,f){return e.setAttribute(g,f)}function appendc(c,e){return c.appendChild(e)}function cNode(c,e){return c.appendChild(d.createTextNode(e))}function getID(b){return d.getElementById(b)}var DayCol=["M","T","W","T","F","S","S"];var MonthCol=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function getDaysInMonth(g,e){var f=[31,28,31,30,31,30,31,31,30,31,30,31];if(g==1){f[1]=((e%400==0)||((e%4==0)&&(e%100!=0)))?29:28}return f[g]}var cw={currMonth:iMonth,currYear:iYear,currDay:iDay,selMonth:iMonth,selYear:iYear,selDay:iDay,config:itype,maxDays:imaxDays,stMonth:startMonth,stYear:startYear,stDay:startDay,endMonth:11,endYear:iYear,endDay:31,addZ:addZero,setMarks:function(){if(this.config=="strict"){this.stDay=iDay;this.stMonth=iMonth;this.stYear=iYear;this.getEnd()}},getConfMonths:function(){if(this.config=="strict"){cw.setMarks()}mthCol=cel("ul");mthCol.id="months";k=0;for(i=0;i<12;i++){mth=cel("li");if(cw.isValidMonth(i)){mth.className="months";if(cw.isCurrentMonth(i)){mth.className="currMonth"}mtha=cel("a");mtha.href="javascript:modMonth("+this.selYear+","+i+")";mtha.innerHTML=MonthCol[i];appendc(mth,mtha)}else{mth.className="monthDisabled";mth.innerHTML=MonthCol[i]}appendc(mthCol,mth)}cw.setBrowseYears();return mthCol},getConfDays:function(){dayCol=cel("ul");dayCol.id="days";for(i=0;i<7;i++){dayCell=cel("li");dayCell.className="headDay";dayCell.innerHTML=DayCol[i];appendc(dayCol,dayCell)}var b=new Date(this.selYear,this.selMonth,1).getDay();b--;if(b<0){b=6}for(i=0;i<b;i++){dayCell=cel("li");dayCell.className="dayBlank";dayCell.innerHTML="&nbsp;";appendc(dayCol,dayCell)}for(i=1;i<=getDaysInMonth(this.selMonth,this.selYear);i++){dayCell=cel("li");if(cw.isValidDate(i)){dayCell.className="dayNormal";if(cw.isWeekend(i)){dayCell.className="dayWeekend"}if(cw.isCurrentDay(i)){dayCell.className="dayCurrent"}dayLink=cel("a");dayLink.href="javascript: newDay("+i+");fillBackDate("+i+","+this.selMonth+","+this.selYear+")";dayLink.innerHTML=i;appendc(dayCell,dayLink)}else{dayCell.className="dayDisabled";dayCell.innerHTML=i}appendc(dayCol,dayCell)}return dayCol},getEnd:function(){imaxD=imaxDays-(getDaysInMonth(this.stMonth,this.stYear)-this.stDay);tmpM=this.stMonth;tmpY=this.stYear;tmpD=this.stDay;i=0;while(imaxD>=getDaysInMonth(tmpM,tmpY)){tmpM++;if(tmpM>11){tmpM=0;tmpY++}tmpD=imaxD-=getDaysInMonth(tmpM,tmpY)}tmpM++;if(tmpM>11){tmpM=0;tmpY++}this.endMonth=tmpM;this.endDay=tmpD;this.endYear=tmpY},isValidDate:function(b){if(this.config=="loose"){return true}if(this.selYear==this.stYear){if(this.selMonth<this.stMonth){return false}if(this.selMonth==this.stMonth&&b<this.stDay){return false}}if(this.selYear==this.endYear){if(this.selMonth>this.endMonth){return false}if(this.selMonth==this.endMonth&&b>this.endDay){return false}}if(this.selYear==this.endYear&&this.selYear==this.stYear){if(this.selMonth>this.endMonth||this.selMonth<this.stMonth){return false}}if(this.selYear>this.endYear){return false}return true},isWeekend:function(b){sun=new Date(this.selYear,this.selMonth,b).getDay();if(sun==6||sun==0){return true}return false},isCurrentDay:function(b){if(this.selDay==b){return true}return false},setBrowseYears:function(){brsY=cel("li");brsY.className="yearBrowse";if(this.selYear<=this.stYear&&this.config=="strict"){backB=cel("span")}else{backB=cel("a");backB.href="javascript: modYear(-1)"}backB.innerHTML="&laquo";yText=cel("b");yText.innerHTML=cw.selYear;if(this.selYear>=this.endYear&&this.config=="strict"){fwdB=cel("span")}else{fwdB=cel("a");fwdB.href="javascript: modYear(1)"}fwdB.innerHTML="&raquo;";appendc(brsY,backB);appendc(brsY,yText);appendc(brsY,fwdB);appendc(mthCol,brsY)},isValidMonth:function(b){if(this.config=="loose"){return true}else{if(this.selYear<this.stYear){return false}if(this.selYear==this.stYear&&b<this.stMonth){return false}if(this.selYear>this.endYear){return false}if(this.selYear==this.endYear&&b>this.endMonth){return false}}return true},isCurrentMonth:function(b){if(b==this.selMonth){return true}return false}};cw.setMarks();function createBase(){var c=cel("div");c.id="calendar";c.style.display="none";if(typeof(elToAppend)=="undefined"){tDocument=document.getElementsByTagName("body").item(0)}else{var e=elToAppend;tDocument=document.getElementById(e)}appendc(tDocument,c);_baseCalCreated=1}function createCalendarElements(){var c="calendar";var e=cel("div");e.id="elements";while(document.getElementById(c).firstChild){document.getElementById(c).removeChild(document.getElementById(c).firstChild)}appendc(document.getElementById(c),e);mthCol=cw.getConfMonths();appendc(e,mthCol);dayStruct=cw.getConfDays();appendc(e,dayStruct);closeBtn=cel("div");closeBtn.id="closeBtn";closeBtna=cel("a");closeBtna.href="javascript: closeCalendar()";closeBtna.innerHTML="close";appendc(closeBtn,closeBtna);appendc(document.getElementById(c),closeBtn)}function modMonth(e,c){cw.selYear=e;cw.selMonth=c;createCalendarElements()}function newDay(b){cw.selDay=b;createCalendarElements()}function modYear(b){cw.selYear=parseInt(cw.selYear)+parseInt(b);createCalendarElements()}var datas;var elem1;var elem2;var elem3;var mA=0;var yA=0;var mm=["mm","mmm"];var yy=["yy","yyyy"];function leftCalendar(b){fPopCalendar(b,"","",-220,0)}function fPopCalendar(n,o,p,l,m){if(_baseCalCreated==0){try{createBase()}catch(q){return}}if(!l||l=="undefined"){l=0}if(!m||m=="undefined"){m=0}tmpString=new String();if(formatInputs==1){elem1=n;tmpString=document.getElementById(elem1).value}if(formatInputs==2){elem1=n;elem2=o;tmpString=document.getElementById(elem1).value+formatSplitter+document.getElementById(elem2).value}if(formatInputs==3){elem1=n;elem2=o;elem3=p;tmpString=document.getElementById(elem1).value+formatSplitter+document.getElementById(elem2).value+formatSplitter+document.getElementById(elem3).value}datas=tmpString.split(formatSplitter);tmpo=formatType.split(formatSplitter);dC="";tC="";if(datas.length==tmpo.length){for(i=0;i<datas.length;i++){if(datas[i].length<2){datas[i]="0"+datas[i]}dC+=datas[i];tC+=tmpo[i]}if(dC.length==tC.length){orderData()}}else{datas=[cw.selDay,cw.selMonth,cw.selYear]}createCalendarElements();offsets=getScrollXY();document.getElementById("calendar").style.display="block";if(folowMouse){var r=navigator.appName;if(r=="Microsoft Internet Explorer"&&document.compatMode!="BackCompat"){ox=parseInt(tempX)+parseInt(offX)+parseInt(offsets[0])+parseInt(l);oy=parseInt(tempY)+parseInt(offY)+parseInt(offsets[1])+parseInt(m);document.getElementById("calendar").style.left=ox+"px";document.getElementById("calendar").style.top=oy+"px"}else{ox=parseInt(tempX)+parseInt(offX)+parseInt(l);oy=parseInt(tempY)+parseInt(offY)+parseInt(m);document.getElementById("calendar").style.left=ox+"px";document.getElementById("calendar").style.top=oy+"px"}}order=new String(formatType).split(formatSplitter);for(i=0;i<mm.length;i++){for(j=0;j<order.length;j++){if(mm[i]==order[j]){mA=i}if(yy[i]==order[j]){yA=i}}}}function orderData(){order=new String(formatType).split(formatSplitter);for(i=0;i<order.length;i++){for(j=0;j<mm.length;j++){if(mm[j]==order[i]){cw.selMonth=datas[i];if(cw.selMonth.slice(0,1)==0){cw.selMonth=parseInt(cw.selMonth.slice(1,cw.selMonth.length))-1}else{if(cw.selMonth.length<3){cw.selMonth=parseInt(cw.selMonth)-1}}if(j==1){for(k=0;k<MonthCol.length;k++){if(MonthCol[k].toLowerCase()==cw.selMonth.toLowerCase()){cw.selMonth=k;break}}}}if(yy[j]==order[i]){cw.selYear=datas[i];if(cw.selYear.slice(0,1)==0){cw.selYear=parseInt(cw.selYear.slice(1,cw.selYear.length))}if(j==0){cw.selYear=2000+parseInt(cw.selYear)}}}if(order[i].toLowerCase()=="dd"){cw.selDay=datas[i];if(cw.selDay.slice(0,1)==0){cw.selDay=parseInt(cw.selDay.slice(1,cw.selDay.length))}}}}function fillBackDate(f,g,e){if(mA==1){g=MonthCol[g]}if(mA==0){g++;if(g<10&&cw.addZ==true){g="0"+g}}if(yA==0){e=new String(e).slice(2,4)}if(f<10&&cw.addZ==true){f="0"+f}if(formatInputs==1){document.getElementById(elem1).value=f+formatSplitter+g+formatSplitter+e}if(formatInputs==2){document.getElementById(elem1).value=f;document.getElementById(elem2).value=g+formatSplitter+e}if(formatInputs==3){document.getElementById(elem1).value=f;document.getElementById(elem2).value=g;document.getElementById(elem3).value=e}setTimeout(callNotice,0);closeCalendar()}function closeCalendar(){var b="calendar";document.getElementById(b).style.display="none"}function fallsilent(){}function pPopCalendar(f,h,l,g){fPopCalendar(h,l,g);f()}function remember_dates(){but=document.getElementById("dbutton");but.style.fontWeight="bold"}jQuery.fn.ytplaylist=function(a){var a=jQuery.extend({holderId:"ytvideo",playerHeight:"300",playerWidth:"450",addThumbs:false,thumbSize:"small",showInline:false,autoPlay:true,showRelated:true,allowFullScreen:false},a);return this.each(function(){var e=$(this);var g="";var c="&rel=0";var f="";if(a.autoPlay){g="&autoplay=1"}if(a.showRelated){c="&rel=1"}if(a.allowFullScreen){f="&fs=1"}function l(n){var m="";m+='<object height="'+a.playerHeight+'" width="'+a.playerWidth+'">';m+='<param name="movie" value="http://www.youtube.com/v/'+n+g+c+f+'"> </param>';m+='<param name="wmode" value="transparent"> </param>';if(a.allowFullScreen){m+='<param name="allowfullscreen" value="true"> </param>'}m+='<embed src="http://www.youtube.com/v/'+n+g+c+f+'"';if(a.allowFullScreen){m+=' allowfullscreen="true" '}m+='type="application/x-shockwave-flash" wmode="transparent"  height="'+a.playerHeight+'" width="'+a.playerWidth+'"></embed>';m+="</object>";return m}function h(m){var n=m.match("[\\?&]v=([^&#]*)");n=n[1];return n}var b=e.children("li:first-child").addClass("currentvideo").children("a").attr("href");$("#"+a.holderId+"").html(l(h(b)));e.children("li").children("a").click(function(){if(a.showInline){$("li.currentvideo").removeClass("currentvideo");$(this).parent("li").addClass("currentvideo").html(l(h($(this).attr("href"))))}else{$("#"+a.holderId+"").html(l(h($(this).attr("href"))));$(this).parent().parent("ul").find("li.currentvideo").removeClass("currentvideo");$(this).parent("li").addClass("currentvideo")}return false});if(a.addThumbs){e.children().each(function(n){var m=$(this).text();if(a.thumbSize=="small"){var o="http://img.youtube.com/vi/"+h($(this).children("a").attr("href"))+"/2.jpg"}else{var o="http://img.youtube.com/vi/"+h($(this).children("a").attr("href"))+"/0.jpg"}$(this).children("a").empty().html("<img src='"+o+"' alt='"+m+"' />"+m).attr("title",m)})}})};
