/**
 * Last Edit
 * By	:	Jason
 * When	:	23 May 08
 * What	:	Initial setup
 */
$(document).ready(function(){
	$("ul.nav").superfish();
	$('#dynamic_sections .sections_container').removeClass('sections_container');
	$('#dynamic_sections .section').addClass('section_jquery').hide();
	if (location.hash) {
		var initial_section_to_show = location.hash.split('#')[1];
	} else {
		var initial_section_to_show = 'enquire';
		if($("body").eq(0).attr("id")=="page3"){
			var initial_section_to_show = 'what';
		}
	}
	$('#dynamic_sections #section_'+initial_section_to_show).addClass('visible').show();
	$('#dynamic_sections #sections a[href$='+initial_section_to_show+']').addClass('currentsection');
	$('#dynamic_sections #sections a').click(function() {
		$('#dynamic_sections #sections a.currentsection').removeClass('currentsection');
		$(this).addClass('currentsection');
		var section_to_show = $(this).attr('href').split('#')[1];
		$('#dynamic_sections .visible').removeClass('visible').fadeOut('slow',function () { 
		$('#dynamic_sections #section_'+section_to_show).addClass('visible').fadeIn();
		});
	});
});
/*
// cusomisation options listed here, if you need them
$(document).ready(function(){
	$("ul.nav").superfish({
		hoverClass	: "sfHover",
		pathClass	: "overideThisToUse",
		delay		: 800,
		animation	: {opacity:"show"},
		speed		: "normal",
		oldJquery	: false, // set to true if using jQuery version below 1.2 
		disableHI	: false, // set to true to disable hoverIntent detection 
		onInit		: function(){},
		onBeforeShow	: function(){},
		onShow		: function(){},
		onHide		: function(){}
	});
});
*/
