// Email.js version 5
var tld_ 	= new Array()
tld_[0]  	= "com";
tld_[1] 	= "org";
tld_[2]  	= "net";
tld_[3]  	= "info";
tld_[4] 	= "co.uk";
tld_[5] 	= "fr";
tld_[6] 	= "org.uk";
tld_[7] 	= "gov.uk";
tld_[8] 	= "uk.com";
tld_[9] 	= "gb.com";
var topDom_ = 13;
var m_ 		= "mailto:";
var a_ 		= "@";
var d_ 		= ".";

function mail(name, dom, tl, accesskey, display) {
	var s = e(name,dom,tl);
	
	if (display != "") { document.write('<a href="'+m_+e(name,dom,tl)+'" accesskey="'+accesskey+'">'+display+'</a>'); }
	else { document.write('<a href="'+m_+s+'" accesskey="'+accesskey+'">'+s+'</a>'); }
		
}




// JQUERY FUNCTION

jQuery(document).ready(function($){
	$("#content h1:eq(0)").css({ margin:"0 0 0.6em 0" });
	
	
// BASKET HIDDEN  IF NOT DETAILS
	nbForm = $("#basket form").size();
	if(nbForm==0)
	{
		$("#basket").remove();
	}
	
	// IMAGE WITH CLASS PICTURE WILL WORK WITH THICKBOX
	$("#colleft img.picture, #colleft img[longdesc]").each(function(){		
  	//var stop = $(this).attr("src").indexOf("-256_x.jpg");
		//var sublink = $(this).attr("src").substring(0,stop);
		
		var rel = $(this).attr("rel");
		var longdesc = $(this).attr("longdesc");
		
		if(longdesc =='' || longdesc ==undefined)
		{
			var link = rel;
		}
		else
		{
			var link = longdesc;
		}
		
		$(this).wrap("<a href=\""+link+"\" class=\"thickbox\"></a>");
		$(this).removeAttr("title");
	});
	
	$("#colRight .button, #colLeft .button, #notification .button")
	.mouseover(
		function(){
			$(this).css({ background:"#FFB21F", border:"1px solid #FFA700" });
		})
	.mouseout(
		function(){
			$(this).css({ background:"#009EE0", border:"1px solid #0094CF" });
		});
	
	$("#searchForm")
	.mouseover(
		function(){
			$("#recherchei").css({ display:"block" });
			$(this).css({ width:"214px", padding:"0 0 0 100px" });
		})
	.mouseout(
		function(){
			$("#recherchei").css({ display:"none" });
			$(this).css({ width:"74px", padding:"0" });
		});

	$("#automenu li:eq(1) a")
	.mouseover(
		function(){
			$("#adventureActivities").css({ display:"block" });
		})
	.mouseout(
		function(){
			$("#adventureActivities").css({ display:"none" });
		});

	$("#adventureActivities")
	.mouseover(
		function(){
			$(this).css({ display:"block" });
		})
	.mouseout(
		function(){
			$(this).css({ display:"none" });
		});
	
	$("#automenu li:eq(4) a")
	.mouseover(
		function(){
			$("#generalInfo").css({ display:"block" });
		})
	.mouseout(
		function(){
			$("#generalInfo").css({ display:"none" });
		});

	$("#generalInfo")
	.mouseover(
		function(){
			$(this).css({ display:"block" });
		})
	.mouseout(
		function(){
			$(this).css({ display:"none" });
		});

	$("#automenu li:eq(2) a")
	.mouseover(
		function(){
			$("#corpActivities").css({ display:"block" });
		})
	.mouseout(
		function(){
			$("#corpActivities").css({ display:"none" });
		});

	$("#corpActivities")
	.mouseover(
		function(){
			$(this).css({ display:"block" });
		})
	.mouseout(
		function(){
			$(this).css({ display:"none" });
		});
	
	$("input.button")
	.click(
		function(){
			$('#processing').css({ display:"block"});
		});
	
	// PNG IE FIX
	$('a.skypContent, #header1 h1, #AALA a').IEPNGHack();
	
	// TARGET BLANK XHTML STRICT
	$('a[@rel$="external"]').click(function(){
	
		this.target = "_blank";
	
	});
	
	
	$('a').ToolTip(
		{
			className: 'inputsTooltip',
			position: 'mouse'
		}
	);


	// PAGE NAVIGATION SHOW HIDE

	var page = $("#pages li").size();
	if(page <= 6)
	{
		$("#pages").css({display:"none"});
	};

	
});



