var showingLates=0;var currentlyBooking='none';$(document).ready(function(){$(".book").hide();$(".main.late").hide();$(".head").hide();$(".dates.late").hide();$("a.later").click(function(){showingLates=1;$(".main.early").hide();$(".main.late").show();var nextLocation=(currentlyBooking.replace("loc","")*1)+1;$(".head.early.loc"+nextLocation).hide();$(".head.late.loc"+nextLocation).show();if(currentlyBooking=="loc1"){$(".dates.early:not(.loc1)").hide();$(".dates.late:not(.loc1)").show();}else{$(".dates.early").hide();$(".dates.late").show();}return(false);});$("a.earlier").click(function(){showingLates=0;$(".main.late").hide();$(".main.early").show();var nextLocation=(currentlyBooking.replace("loc","")*1)+1;$(".head.late.loc"+nextLocation).hide();$(".head.early.loc"+nextLocation).show();if(currentlyBooking=="loc1"){$(".dates.late:not(.loc1)").hide();$(".dates.early:not(.loc1)").show();}else{$(".dates.late").hide();$(".dates.early").show();}return(false);});$("a.show").click(function(){var thisLocation=$(this).closest("li").attr("id");var nextLocation=(thisLocation.replace("loc","")*1)+1;currentlyBooking=thisLocation;$(".book:not(."+thisLocation+")").hide();$(".head").hide();if(thisLocation!="loc1"){$("li.moredates#"+thisLocation).hide();}else{$(".dates."+thisLocation).hide();}$("li.moredates:not(#"+thisLocation+")").show();if(thisLocation!="loc1"){if(showingLates){$(".dates.late.loc1").show();}else{$(".dates.early.loc1").show();}}$(".book."+thisLocation).slideDown("fast");if(showingLates){$(".head.late.loc"+nextLocation).show();}else{$(".head.early.loc"+nextLocation).show();}return(false);});$("a.hide").click(function(){var thisLocation=$(this).closest("li").attr("class").replace("book ","");var nextLocation=(thisLocation.replace("loc","")*1)+1;currentlyBooking="none";$(".book."+thisLocation).slideUp("fast");if(thisLocation!="loc1"){$("li.moredates#"+thisLocation).show();}else{if(showingLates){$(".dates.late."+thisLocation).show();}else{$(".dates.early."+thisLocation).show();}}if(showingLates){$(".head.late.loc"+nextLocation).hide();}else{$(".head.early.loc"+nextLocation).hide();}return(false);});});
