function yesClick(){alert('test');}
function noClick(){alert('no!');}
function closeConfirmModal(){}
function showError(message){$.fn.buildModal(message,'error');}
function showSystemMessage(message){$.fn.buildModal(message,'systemmessage');}
function showConfirm(message,yes,no){var yes=yes||null;var no=no||null;$.fn.buildModal(message,'confirm',yes,no);}
function showEventDetails(message){$.fn.buildModal(message,'event');}
function showItineraryMenu(message){$.fn.buildModal(message,'itinerary');}
function showUpgradeMessage(message){buildModal(message,'upsell');}
function hideUpgradeMessage()
{$('.upgrademsg').hide();}
function buildModal(message,type,yes,no){var yes=yes||null;var no=no||null;$.fn.buildModal(message,type,yes,no);}
jQuery.fn.buildModal=function(message,type,yes,no){var selector=type+"_skeleton";var $modal=$('.'+selector).clone(true,true);$modal.children().find('.msg_body').html(message);$modal.attr('id','modal_'+(parseInt(Math.random()*255)));$modal.removeClass(selector).addClass('modal').appendTo('body');if($modal.children().find('#confirmsubmit').length){$modal.children().find('#confirmsubmit').bind('click',function(){if(!yes){showError('There is no YES callback defined');}else{if(yes.indexOf('(')>-1)
{eval(yes+";");}
else
{eval(yes+"();");}
$(this).unmodal();}});$modal.children().find('#confirmccancel').bind('click',function(){if(no){eval(no+"();");}else{$(this).unmodal();}});}
$modal.modal();}
jQuery.fn.modal=function(){var height=$(document).height();$("#overlay").css('height',height).show();$(this).center().show();cufon_Modal();cufon_ModalErrors()
echo('cufon modal');modalQueue++;echo(modalQueue);}
jQuery.fn.unmodal=function(no_remove){var no_remove=no_remove||false;var id=$(this).parents('.modal').attr('id');modalQueue--;echo(modalQueue);if(modalQueue==0)$('#overlay').hide();if(no_remove){$("#"+id).hide();echo('hiding modal #'+id);}else{$("#"+id).hide();echo('removing modal #'+id);}}
function rotate(){if(currentImage<marqueeImages.length){currentImage++;}else{currentImage=1;}
var marqueeImage=marqueeImages[currentImage-1];if(marqueeImage){$("#main_marquee_image").attr('src',marqueeImage);}else{rotate();}}
function initializeMap(latitude,longitude){if(!$("#map_canvas").length){$("#mainContentHTML").append('<div id="map_canvas" style="height:300px; width:500px;"></div>');}
var latlng=new google.maps.LatLng(latitude,longitude);var myOptions={zoom:15,center:latlng,mapTypeId:google.maps.MapTypeId.ROADMAP};var map=new google.maps.Map(document.getElementById("map_canvas"),myOptions);var marker=new google.maps.Marker({position:latlng,map:map,title:map_title});marker.setMap(map);}
jQuery.fn.center=function(){this.css("position","absolute");this.css("top",($(window).height()-this.height())/2+$(window).scrollTop()+"px");this.css("left",($(window).width()-this.width())/2+$(window).scrollLeft()+"px");return this;}
function echo(val){if(typeof console=='object'){console.log(val);}else{}}
var drop_name;$(document).ready(function(){zebra();var style;$('span').each(function(){style=$(this).attr('style');if(style&&style.indexOf('through')>-1){$(this).addClass('content_title');}});$("#show_list_view").click(function(){$(".event_info").attr("style","left: -9999px;");$(".calendar-content").removeClass("selected_day").removeClass("corresponding_days").parent().css("border","none");$(".selected_day_number").removeClass("selected_day_number");$(".selected_event").removeClass("selected_event");});function simple_tooltip(target_items,name){$(target_items).each(function(i){var thumbnail=$(this).attr("thumbnail");if(thumbnail!=""){thumbnail="<img src='"+thumbnail+"' width='100' /><br />";}
var enddate=$(this).attr('enddate');var startdate=$(this).attr('startdate');var now=$.format.date(new Date(),"MM/dd");var endtime=$(this).attr('endtime');if(startdate!=enddate){if(enddate==now){enddate="Today";}
endtime=enddate+" at "+endtime;}
var starttime=$(this).attr('starttime');if(startdate!=enddate){if(startdate==now){startdate="Today";}
starttime=startdate+" at "+starttime;}
var time=starttime+" thru <br />"+endtime;var eventtitle="<p class='content_title'>"+$(this).attr('eventtitle')+"</p>";var learnmore=$(this).attr('learnmore');if(learnmore!=""){learnmore="<br /><br /><a href='"+learnmore+"'>Learn More</a>";}
var eventinfo="<p>"+$(this).attr('eventinfo')+"</p><br />";$("body").append("<div class='"+name+"' id='"+name+i+"'><div class='close_event'>x</div><div class='clear'></div>"+thumbnail+eventtitle+eventinfo+time+learnmore+"</div>");var my_tooltip=$("#"+name+i);var other_days=$(this).attr("class");var currentEventHolder=$(this).parent().parent();$(this).click(function(){$(".event_info").attr("style","left: -9999px;");$(".calendar-content").removeClass("selected_day").removeClass("corresponding_days");$(".calendar-content").parent().css("border","none");$(".selected_day_number").removeClass("selected_day_number");$(".selected_event").removeClass("selected_event");$("."+other_days).parent().parent().addClass("corresponding_days");currentEventHolder.addClass("selected_day");currentEventHolder.children(":first").addClass("selected_day_number");$(this).addClass("selected_event");my_tooltip.show().position({of:currentEventHolder,at:'center top',my:'center bottom',offset:'0 -5px'});});});}
simple_tooltip("#calContent li","event_info");$(".close_event").click(function(){$(".event_info").attr("style","left: -9999px;");$(".calendar-content").removeClass("selected_day").removeClass("corresponding_days");$(".calendar-content").parent().css("border","none");$(".selected_day_number").removeClass("selected_day_number");$(".selected_event").removeClass("selected_event");});$(".login").live('click',function(){$("#modal_login_register").modal();$('#login_userid_popup').focus();});$(".howitworks").live('click',function(){$("#HowItWorks").modal();$('.modal_close').focus();});$('img.calTrigger').live('click',function(){$(this).siblings('input').datepicker('show');});$(".modal_close").live('click',function(event){event.stopPropagation();event.preventDefault();$(this).unmodal();echo('modal_close');});$(".login_close").live('click',function(event){event.stopPropagation();event.preventDefault();$(this).unmodal(true);echo('login_close');});$('#home_page_touts').css("display","block");$('#profile_next').click(function(event){event.preventDefault();var errors=[];var validate;var login_email='';var login_email_confirm='';var password='';var password_confirm='';validate=$("#signup_login_email").validate_input_data();if(validate.value===false){errors.push(validate.message);}else{login_email=validate.value;}
validate=$("#signup_login_email_confirm").validate_input_data();if(validate.value===false){errors.push(validate.message);}else{login_email_confirm=validate.value;}
if(login_email!=''&&login_email_confirm!=''){if(login_email.toLowerCase()!=login_email_confirm.toLowerCase())errors.push("Email and email confirmation must match");}
validate=$("#signup_password").validate_input_data();if(validate.value===false){errors.push(validate.message);}else{password=validate.value;}
validate=$("#signup_password_confirm").validate_input_data();if(validate.value===false){errors.push(validate.message);}else{password_confirm=validate.value;}
if(password!=password_confirm)errors.push("Password and password confirmation must match");validate=$("#signup_phone").validate_input_data();if(validate.value===false){errors.push(validate.message);}
if(errors.length){showError(errors.join('<Br>'));}else{$('#Step1').hide().removeClass('current');$('#Step2').show().addClass('current');}
return false;});$('#profile_Edit_next').click(function(event){var errors=[];var validate;var login_email='';var login_email_confirm='';validate=$("#signup_login_email").validate_input_data();if(validate.value===false){errors.push(validate.message);}else{login_email=validate.value;}
validate=$("#signup_login_email_confirm").validate_input_data();if(validate.value===false){errors.push(validate.message);}else{login_email_confirm=validate.value;}
if(login_email!=''&&login_email_confirm!=''){if(login_email.toLowerCase()!=login_email_confirm.toLowerCase())errors.push("Email and email confirmation must match");}
var password;var password_confirm;var email=$("#signup_email").val();var email_confirm=$("#signup_email_confirm").val();validate=$("#signup_email").validate_input_data();if(validate.value===false){errors.push(validate.message);}else{email=validate.value;}
validate=$("#signup_email_confirm").validate_input_data();if(validate.value===false){errors.push(validate.message);}else{email_confirm=validate.value;}
if(login_email!=''&&login_email_confirm!=''){if(email.toLowerCase()!=email_confirm.toLowerCase())errors.push("Property Email and email confirmation must match");}
validate=$("#signup_password").validate_input_data();if(validate.value===false){errors.push(validate.message);}else{password=validate.value;}
validate=$("#signup_password_confirm").validate_input_data();if(validate.value===false){errors.push(validate.message);}else{password_confirm=validate.value;}
if(password!=password_confirm)errors.push("Password and password confirmation must match");validate=$("#edit_address1").validate_input_data();if(validate.value===false){errors.push(validate.message);}
validate=$("#edit_address2").validate_input_data();if(validate.value===false){errors.push(validate.message);}
validate=$("#edit_city").validate_input_data();if(validate.value===false){errors.push(validate.message);}
validate=$("#edit_state").validate_input_data();if(validate.value===false){errors.push(validate.message);}
validate=$("#edit_zip").validate_input_data();if(validate.value===false){errors.push(validate.message);}
validate=$("#signup_phone").validate_input_data();if(validate.value===false){errors.push(validate.message);}
if(errors.length){showError(errors.join('<br>'));}else{$('#Step1').hide().removeClass('current');$('#Step2').show().addClass('current');window.scrollTo(0,0);}
event.preventDefault();});$('#Previous').click(function(){$('#Step2').hide().removeClass('current');$('#Step1').show().addClass('current');return false;});$('#navigation').children('ul').children('li').bind('mouseover',function(){menuitem=$(this).children('ul');menuitem.css('display','block');menuitem.prev().addClass("active_top_item");});$('#navigation').children('ul').children('li').bind('mouseout',function(){if(menuitem)menuitem.css('display','none');if(menuitem)menuitem.prev().removeClass("active_top_item");});$('#navigation').delay(1000).css('display','block');$('.cufon').delay(1000).css('display','block');$(window).bind("resize scroll",function(){$('.modal').center();});$('#whatisthiszoom').hide();$('#boom_info_container_hover_box').hide();$('#whatisthis').hover(function(){$('#whatisthiszoom').show();},function(){$('#whatisthiszoom').hide();});$('#tout_carousel').jcarousel({auto:10,wrap:'circular',dispItems:3});var boom_x="-352px";var ldl_x="-500px";var footer_y="-70px";var force_footer_close=true;var footerCloseTimeout;$(".footer_dropdown").mouseover(function(){drop_name=$(this).attr("name");var drop_name_x=(drop_name=="boom")?"-352px":"-500px";clear_footer_timeout();clear_footer_box();$('#'+drop_name+'_info_container_hover_box').show();$('.'+drop_name+'_logo').css('backgroundImage','url(../themes/bno/images/footer_logos.png)').css('backgroundPosition',drop_name_x+" "+footer_y);});$(".footer_dropdown").mouseleave(function(){footerCloseTimeout=window.setTimeout(footer_timeout,"100");});$(".info_container_box").mouseenter(function(){clear_footer_timeout();});$(".info_container_box").mouseleave(function(){clear_footer_box();});function clear_footer_box(){$('.info_container_box').hide();$('#'+drop_name+'_info_container_hover_box').hide();$('.footer_dropdown').css('background-image','none');}
function footer_timeout(){clear_footer_box();}
function clear_footer_timeout(){window.clearTimeout(footerCloseTimeout);}
$(".show_calendar").click(function(event){event.preventDefault();var id=$(this).attr('id').substr(4);$(".calendar_view").hide();$("#calendar"+id).show();});function zebra(){$(".zebra tr").each(function(index){$(this).children().attr("name",""+index+"");var checking=$(this).children().attr("name");if(checking%2===0){$(this).children().addClass("zebra_odd");}});$(".zebra").find("td:first-child").addClass("tside");}
$(".zebra tr").hover(function(){if($(this).children().hasClass("theader")){}else{$(this).children().addClass("zebra_active_row");}},function(){$(this).children().removeClass("zebra_active_row");});});function set_interval(type)
{var timeOutLimit=(15*60*1000);clearTimeout(timeOut);timeOut=setInterval("auto_logout()",timeOutLimit);}
function auto_logout()
{if(isLoggedIn){clearTimeout(timeOut);var docHeight=$(document).height();$("body").append('<div id="secure_overlay"></div>');$("#secure_overlay").height(docHeight).show();showSystemMessage('Your session has expired. You have been logged out.');isBooking=false;$('.systemmsgclose').click(function(){logout();});}}
function logout(){window.location="/home/Logout/";}
