$(function(){
 $("#subNavigation dd").hide();
  $("#subNavigation dt").click(function(){
   $("#subNavigation dd:visible").slideUp("slow");
   $(this).next().slideDown("slow");
 });
});
$(function(){
	   jQuery('a#navi1').css('background', '#996600');
		jQuery('h1').css('background', '#996600');
		jQuery('#right').css('border-color', '#996600');
		jQuery('#navibar').css('background-color', '#996600');

});
$(function(){
	$("a#navi2").mouseover(function(){
		jQuery('h1').css('background', '#FF6600');
		jQuery('#navibar').css('background-color', '#FF6600');
	});
	$("a#navi2").mouseout(function(){
		jQuery('h1').css('background', '#996600');
		jQuery('#navibar').css('background-color', '#996600');
	});
});
$(function(){
	$("a#navi3").mouseover(function(){
		jQuery('h1').css('background', '#CC0033');
		jQuery('#navibar').css('background-color', '#CC0033');
	});
	$("a#navi3").mouseout(function(){
			jQuery('h1').css('background', '#996600');
		jQuery('#navibar').css('background-color', '#996600');
	});
});
$(function(){
	$("a#navi4").mouseover(function(){
		jQuery('h1').css('background', '#0066CC');
		jQuery('#navibar').css('background-color', '#0066CC');
	});
	$("a#navi4").mouseout(function(){
			jQuery('h1').css('background', '#996600');
		jQuery('#navibar').css('background-color', '#996600');
	});
});
$(function(){
	$("a#navi5").mouseover(function(){
		jQuery('h1').css('background', '#993399');
		jQuery('#navibar').css('background-color', '#993399');
	});
	$("a#navi5").mouseout(function(){
			jQuery('h1').css('background', '#996600');
		jQuery('#navibar').css('background-color', '#996600');
	});
});
$(function(){
	$("a#navi6").mouseover(function(){
		jQuery('h1').css('background', '#99CC00');
		jQuery('#navibar').css('background-color', '#99CC00');
	});
	$("a#navi6").mouseout(function(){
			jQuery('h1').css('background', '#996600');
		jQuery('#navibar').css('background-color', '#996600');
	});
});
$(function(){
	$("a#navi7").mouseover(function(){
		jQuery('h1').css('background', '#FF33CC');
		jQuery('#navibar').css('background-color', '#FF33CC');
	});
	$("a#navi7").mouseout(function(){
			jQuery('h1').css('background', '#996600');
		jQuery('#navibar').css('background-color', '#996600');
	});
});

$.auto = {
	init: function() {
		for (module in $.auto) {
			if ($.auto[module].init)
				$.auto[module].init();
		}
	}
};

$(document).ready($.auto.init);


// Auto-hidden elements

$.auto.hide = {
	init: function() {
		$('.Hide').hide();
	}
};


// Mouse hover

$.auto.hover = {

	init: function() {
		$('img.hover')
			.bind('mouseover', this.enter)
			.bind('mouseout', this.exit)
			.each(this.preload);
	},

	preload: function() {
		this.preloaded = new Image;
		this.preloaded.src = this.src.replace(/^(.+)(\.[a-z]+)$/, "$1_over$2");
	},

	enter: function() {
		this.src = this.src.replace(/^(.+)(\.[a-z]+)$/, "$1_over$2");
	},

	exit: function() {
		this.src = this.src.replace(/^(.+)_over(\.[a-z]+)$/, "$1$2");
	}
};



