$(document).ready(function(){
	/**
	 * Main menu navigation script, changes the styles of the main navigation by manipulating it's classes
	 */		
	
	
	$('ul#menulist li ul').wrap('<div class="nav-main-subnav" />');	 // Wrap the menu in this div because we cannot manipulate MMCMS html
	
	$('ul#menulist li').bind({
		'mouseover' : function(){
			$('a', this).addClass('mouseover');
			$('div.nav-main-subnav', this).addClass('nav-main-subnav-hover');				
		},
		'mouseout' : function(){
			$('a', this).removeClass('mouseover');
			$('div.nav-main-subnav', this).removeClass('nav-main-subnav-hover');
		}				
	});
	
	/**
	 * Creates full working links of all the frontpage blocks below the splash image.
	 */					
	$('.frontpage-block').bind('click' , function(){
		var href = $('a.frontpage-block-link', this).attr('href');
		window.location = href;
		return false;
	});
	
	
	/**
	 * Fixing corners for IE
	 */					
	if ( $.browser.msie ) 
	{
		
	}
  
  
  /**
   * mm-lightbox
  */
  
 
  $('#book-form').submit(
    function()
    {
      return false;
    }
  );
  
  $("#book-form input[type='submit']").mm_lightbox();
  
  
  $("#arrival-date").datepicker(
  {
    showOn: "both",
    dateFormat: 'dd-mm-yy',
    buttonImage: '/images/gfx/icon-calendar.png',
    buttonImageOnly: true
  });
  
});	
