
	//$(document).ready(function(){
//		init_page('body');
//	});
//	
//	function init_page(div)
//	{
//		$('#menu a, #banners a, #footer a, .ajax',div).not('*[@rel^=lightbox]').click(function(){
//			var uri = $(this).attr('href')+"?"+Math.random(200);
//			var rel = $(this).attr('rel');
//			
//			$('.on').removeClass('on');
//			$.get(uri, function(data){
//				
//				var text = $(data).find('#text').html();
//				var wide = $(data).find('#text.wide').html();
//				
//				var current_wide = $('#text').css('margin-left');
//				
//				if (wide)
//				{
//					$('#flash').fadeTo('slow',0);
//				} else {
//					$('#flash').fadeTo(0.1,1,function(){
//						if(rel)
//						{
//							if (current_wide == '10px') change_flash(rel,63);
//							else change_flash(rel,53);
//						}
//					});
//				}
//				
//				$('#text').fadeOut('slow',function(){
//					if (wide)
//					{
//						$(this).html(wide).show().fadeTo(1,0.1).animate({"marginLeft": "10px", "width": "848px", "opacity": 1}, "slow",function(){
//							init_page($('#text'));
//						});	
//					} else {
//						$(this).html(text).show().fadeTo(1,0.1).animate({"marginLeft": "428px", "width": "425px", "opacity": 1}, "slow",function(){
//							init_page($('#text'));
//						});	
//					}
//					make_box();
//					
//					this.scrollTop = 0;
//					delete data;
//				});
//			});
//			$(this).addClass('on');			
//
//			
//			return false;
//		});
//		//make_box();
//	}
	
	function make_box()
	{
		//$('a.lightbox').lightbox();
		//Lightbox.initialize();
		$("#text a").each(function(){
			if(this.rel.toLowerCase().match('lightbox')){
				$(this).click(function(){
					Lightbox.start(this);
					return false;
				});
			}
		});
	}
	
	function getFlashMovieObject(movieName)
	{
	  if (window.document[movieName]) 
	  {
	      return window.document[movieName];
	  }
	  if (navigator.appName.indexOf("Microsoft Internet")==-1)
	  {
	    if (document.embeds && document.embeds[movieName])
	      return document.embeds[movieName]; 
	  }
	  else // if (navigator.appName.indexOf("Microsoft Internet")!=-1)
	  {
	    return document.getElementById(movieName);
	  }
	}
	
	function change_flash(to,frame)
	{
		var flashMovie=getFlashMovieObject("mainflash");
		if (flashMovie)
		{
			flashMovie.SetVariable('ind',to);
			flashMovie.GotoFrame(frame);
			flashMovie.Play();
		}

	}
	
	function submitEnq()
	{
		var error = '';
		if ($('input[@name=firstNameField]').val() == '') error += 'Please enter your first name.\n';
		if ($('input[@name=emailField]').val() == '') error += 'Please enter your email address.\n';
		
		if (error)
		{
			alert(error);
			return;
		}
		
		var dat = $("#form1").serialize();
		$.post("contact.php",dat);
		$('#text').fadeOut('slow',function(){
			$('#text').html('<h1>Enquiry Form Sent!</h1><p>Thankyou! Someone will be in contact with you as soon as possible.</p>').fadeIn('fast');
		});
		

	}