<!--
$(document).ready(function() {

 	$(".outer").fadeIn(400);
 
	$(".contents").live("mouseover",function() {
			var windowH = $(this).find("div.caption p").height();
			var boxH = $(this).height();
			$(this).find("div.detail").animate({bottom:-73 + 'px'},{queue:false,duration:300});
			$(this).find("div.caption").animate({bottom:-73 + 'px'},{queue:false,duration:300});
	});
	$(".contents").live("mouseout",function() {	
			var boxH = $(this).height();		
			$(this).find("div.detail").animate({bottom:'-184px'},{queue:false,duration:300});
			$(this).find("div.caption").animate({bottom:'-184px'},{queue:false,duration:300});
	});	
	
	$(".colourlink").live("mouseenter",function() {
			$(this).find("img").fadeIn(400);
	});
			
	$(".colourlink").live("mouseleave",function() {
			$(this).find("img").fadeOut(400);
	});
		
	$(".colourbar").live("mouseenter",function() {
			$(this).addClass("on");
	});
			
	$(".colourbar").live("mouseleave",function() {
			$(this).removeClass("on");
	});
	
	$(".staffmenu li a").click( function () {
		
		var link = "/hq/lib/ajax/";
		
		$.post(link + "load_section.php", { page_url: $(this).attr("href"), section: 'Section2'},  
				 function(data){ 
				 
					// consider putting up a saving data panel
					if (data.status=="OK") {
						// remove the panel from here
						$("#"+data.section).replaceWith($.URLDecode(data.section_render));
						// Re-CuFont stuff
						 Cufon.refresh();
					}
					 // Interact with returned data  
				 }, "json");
			
		return false;
		
	});

	
	$(".reveal a.trigger").toggle(
		function(){$(this).next().slideDown("slow")},
		function(){$(this).next().slideUp("slow")}
	);
	
			var callback = { 
				success:   showResponse,  // post-submit callback 
				dataType:  'json'        // 'xml', 'script', or 'json' (expected server response type) 
			}; 

			 var redirect = { 
				success:   doRedirect,  // post-submit callback 		 
				dataType:  'json'        // 'xml', 'script', or 'json' (expected server response type) 
			}; 
	
			function showResponse(responseText, statusText, xhr, $form)  { 			 
				$(responseText.div).replaceWith("<p class='bold'>"+responseText.response+"</p>");		
			} 
			
			function doRedirect(responseText, statusText, xhr, $form)  { 	
			//	alert("[TENG_BaseRef]"+responseText.response);	 
				window.location=responseText.response;
			} 
			
			function simpleRedirect(responseText)  { 	
			//	alert("[TENG_BaseRef]"+responseText.response);	 
				window.location=responseText;
			} 
			
			
            
			//$('#request_callback').ajaxForm(function(callback) {});

			$//("#btn_introducerpack").click(function() { $("#introducer_pack").ajaxSubmit(callback); return false;});			
//			$("#btn_applyonline").click(function() { $("#apply_online").ajaxSubmit(redirect); return false;});
			//$("#nl_submit").click(function() 	{ 
//					if ( $("#nl_email").val()!="" ) {
//							$("#frm_newsletter-signup").ajaxSubmit(callback); 
//					}
//					return false; 
//			});
			
	$("#nl_submit").click(function() 	{ if (fncValidateForm("frm_newsletter-signup")){$("#frm_newsletter-signup").ajaxSubmit(callback);} return false; });


	function fncValidateForm (f) {

		var i;

		var form_validation = new Array();


		form_validation['email'] 	= new Array('Email', 1, 'email');
	

		var form_valid = F.Validate(f, form_validation);

		if (!form_valid) {

			return false;

		} else {

			return true;
		}
	}
  

});
-->
