
emai = /^\w+[\+\.\w-]*@([\w-]+\.)*\w+[\w-]*\.([a-z]{2,4}|\d+)$/i
								function ValidationCheck() {
									
										
										
										
									if (document.reg_comp.f_name.value=="" || document.reg_comp.f_name.value=="First name..."){
												alert("Please enter your first name");
												return false;
										}
										
										if (document.reg_comp.l_name.value=="" || document.reg_comp.l_name.value=="Last name..."){
												alert("Please enter your last name");
												return false;
										}
										
										
									
									if (!emai.test(document.reg_comp.email.value)){
									alert("Please enter a valid email address (email addresses contain a '@', no spaces and end with a domain extension such as .ie, .com, .fr....");	
									return false;
										}
										
										
										
								return true;
								}
				   


/*************************  HIGHLIGHTING CURRENT PAGE  **************************/
$(document).ready(function() {


			/**********************************************************************************************/
			
			/*   ATTENTION, FOR THIS SCRIPT TO WORK YOU MUST SET THE HREF WITHIN THE LINK TO A FULL URL    */
			/*   FOR INSTANCE http://mydomain.com/page1.html AS OPPOSED TO  page1.html                     */
		//set the ID of the menu
			
				//current location
			var href = jQuery(location).attr('href');
		
		//REPEAT THE SCRIPT BELOW IF YOU WANT THIS TO WORK ON SEVERAL MENUS
		$('#main_nav li a').each(function(index) {
   				
						if ($(this).attr('href')== href)
						{
									$(this).css('color', '#fff');
									$(this).css('background', '#cfb587');
						}//end if
							
	  			});//end loop
		
		
		
		
		$('#second_nav li a').each(function(index) {
   				
						if ($(this).attr('href')== href)
						{
									$(this).css('color', '#fff');
									
						}//end if
							
	  			});//end loop
		
		
		
		//color:#fff; background:#cfb587
		
			$("#main_nav li ul").hover(
  function () {$(this).prev().css('background', '#cfb587');$(this).prev().css('color', '#fff');}, 
  function () {$(this).prev().css('background', '');$(this).prev().css('color', '#f4ebd8'); }
	);
		
//alert($(window).width());
$('#slideshow_slides div').width(500);




//activate the lightbox
jQuery('a[href$=jpg], a[href$=png], a[href$=gif], a[href$=jpeg]').prettyPhoto({theme: "light_square"});

					
$('#frontpage-slider').aviaSlider();
										




/*

$("#booking_box_insert_inside").hover(
  function () {
    alert('over')
  },
  function () {
    alert('out')
  }
);
*/

										
					
});





		function slideShow()
		{
			
			$('#slide1').fadeOut(2000);
			//$('#slide2').fadeIn(2000);
			
			
			
		}//end function






/***** CUFON *******/
Cufon.replace('h1');
Cufon.replace('.cufon');


var moreOp=0;

	function viewM()
	{
		
			if (moreOp==0)
			{
					$('#home_more').slideDown(500);
					$('#home_more_link').html('Read Less');
					moreOp = 1;
				
			}
			else
			{
				
				$('#home_more').slideUp(500);
					$('#home_more_link').html('Read More');
					moreOp = 0;
				
			}
		
		
		
	}//end of function




	function openRmenu(id)
	{
	
			//collapse all open menus first
			$('.right_links_containers').slideUp(400);
				
				//then show the menu called
				$('#right_links_'+id).slideDown(500);
	
	
	
		
	}//end function




		function greyPage()
				{
					//create the layer and show it
					$("#grey_layer").animate({
						opacity: 0.75,
						width: '100%',
						height: $(document).height()   
					 });
					
				}



	function showVideo(id)
		{
			greyPage()
				var offsetTop = 50;//place layer a little higher if needs to
				
				//calcuate the margin-left
				var ML = '-'+($('#'+id).width()/2) + 'px';
				
				//calculate the top margin
				var MT = ($(window).height()/2) - ($('#'+id).height() / 2) + $(window).scrollTop() - offsetTop + 'px';
				
							//place the layer in the centre
						$('#'+id).css({'position':'absolute','left':'50%','margin-left':ML,'margin-top': MT});
						$('#'+id).fadeIn(500);
						
		
		
		
		}

	function closeV()
	{
		$('#layer_video').fadeOut();
		$("#grey_layer").animate({
						opacity: 0,
						width: '0px',
						height: '0px'   
					 });
		
	}
	


	function closeCom()
	{
		$('#layer_competitions').fadeOut();
		$("#grey_layer").animate({
						opacity: 0,
						width: '0px',
						height: '0px'   
					 });
		
		
	}

