$(document).ready( function(){ 

	// Homepage innerfade
	$('#myFlashContent').innerfade({
		speed: 2000,
		timeout: 4000,
		type: 'sequence',
		containerheight: '270px'
	});
	
	// Tiered approach page	
	$("#tieredApproach #left a").click(function(event) {
		var thisID = $(this).attr("ID");
		event.preventDefault();
		
		// Hide all divs and remove current from any links
		$("#tieredApproach #right div").hide();
		$("#tieredApproach #left a").removeClass("current");
		
		// Add current to the clicked link
		$(this).addClass("current");
		
		// Show the appropriate panel
		switch (thisID) 
		{
			case "linkBespoke": result = $("div#bespoke").show(); break;
			case "linkPremierPlus": result = $("div#premierPlus").show(); break;
			case "linkPremier": result = $("div#premier").show(); break;
			case "linkStandard": result = $("div#standard").show(); break;		
		}
		
  	});
  	
  	// Cufon
  	Cufon.replace("h1");
  	Cufon.replace("h2");
  	Cufon.replace("h2 a");
  	Cufon.replace("#header ul li a", {
		hover: true
	});
	
	// Image rollovers
	$('.rollover').hover(function() {
        var currentImg = $(this).attr('src');
        $(this).attr('src', $(this).attr('hover'));
        $(this).attr('hover', currentImg);
    }, function() {
        var currentImg = $(this).attr('src');
        $(this).attr('src', $(this).attr('hover'));
        $(this).attr('hover', currentImg);
    });
	
}); 
