﻿        function getHotel(hotelId)
                {
                try
                    {
                    var strURL = 'engine/hotel.aspx?id=' + hotelId;                    
                    window.location.href = strURL;
                    }
                catch(err)
                    {
                    //ERRORS
                    window.alert(err);
                    }             
                }
           function getConference(hotelId)
                {
                try
                    {
                    var strURL = 'engine/conference.aspx?id=' + hotelId;                    
                    window.location.href = strURL;
                    }
                catch(err)
                    {
                    //ERRORS
                    window.alert(err);
                    }             
                }       
            function checkAvailability()
                {
                try
                    {
                    var arrival = $('.txtArrival').val(); 
                    var groupId = $('#ctl00_ddlHotels').val();
                    var strURL = 'engine/gavailability.aspx?gid=' + groupId + '&arrival=' + arrival;
                    
                    window.location.href = strURL;
                    }
                catch(err)
                    {
                    //ERRORS
                    window.alert(err);
                    }             
                }
            $(document).ready(function() 
                {
                try
                    {
                    masterSetup();
                    }
                catch(err)
                    {
                    //Handle errors here
                    window.alert(err);
                    }
                });   
            function masterSetup()
                {        
                try
                    {
                    var arrival = document.getElementById("txtArrival"); //grab the startDate element
                    arrival.setAttribute("autocomplete","off");
                    }
                catch(err)
                    {
                    //Handle errors here
                    window.alert(err);
                    }             
                }        
                
            $(function() 
                {
                $(".txtArrival").datepicker({dateFormat: 'dd/mm/yy',minDate: 0, maxDate: '+1Y -2W'});
                }); 

$(function(){ 
	
	// innerfade - http://medienfreunde.com/lab/innerfade/   
	$('#fader').innerfade({ speed: 700, timeout: 4000, type: 'sequence', containerheight: '234px' });

	// prettyPhoto - http://www.no-margin-for-errors.com/projects/prettyPhoto-jquery-lightbox-clone/   
	$("a[rel^='prettyPhoto']").prettyPhoto();

}); 
