if(typeof sIFR == "function"){
    sIFR.replaceElement("h1", named({sFlashSrc: "/flash/bauhaus.swf", sColor: "#FFFFFF", sWmode: "transparent"}));
};
$(document).ready(function(){


	// Main menu background position animation

	$("ul#main_navigation li").each(function(){
		if(!$(this).hasClass("current")){

			$(this).css({backgroundPosition: '0px 0px'});

			$(this).hover(
				function (){
					$(this).animate({backgroundPosition:"(0px -3px)"}, 150);
				},
				function (){
					$(this).animate({backgroundPosition:"(0 0)"}, 150);
				}
			);
		}
	});

	// Sub menu background colour animation

	$("ul#sub_navigation li").each(function(){
		if(!$(this).hasClass("current")){
			$(this).hover(
				function (){
					$(this).animate({backgroundColor:"#e0dede"}, 300);
				},
				function (){
					$(this).animate({backgroundColor:"#e8e8e9"}, 300);
				}
			);
		}
	});

	//// tab box header animation
	
	grad = [ "#e98024", "#e3783b", "#e26f44", "#dd5b44", "#d8463f", "#d41f34" ]

	$("ul#tab_boxes li.tab_box").each(function(){
		var this_col = grad[0];
		var next_col = grad[1];

		$(this).find('div.outer').css('border-color',this_col);
		$(this).find('p.arrow_link a').css('color',this_col);

		var this_header = $(this).find('h3');
		this_header.css({'background-color': this_col});

		this_header.hover(
			function (){
				this_header.animate({backgroundColor:next_col}, 300);
			},
			function (){
				this_header.animate({backgroundColor:this_col}, 300);
			}
		);
		grad.push(grad.shift());
	}); 
});


