$(document).ready(function(){
	/* Main Nav Image Swap */
	$("#nav img:not(.active)").hover(
		function()
		{
		this.src = this.src.replace("_nav","_nav_over");
		},
		function()
		{
		this.src = this.src.replace("_nav_over","_nav");
		}
	);
	
	/* Portfolio Image Swap */

	$(".out").hover(
		function()
		{
		$(this).animate({"opacity": "0"}, "200");
		},
		function()
		{
		$(this).animate({"opacity": "1"}, "200");

		}
	); 
	
	/* Contact Details Swap */
	$("#country-selector .us").click(function(){
		$('#country-selector .canada').css({"background" : "none"});
		$('#country-selector .us').css({"background-image" : "url(http://205.186.147.249/wp-content/themes/r3m1x3d/images/location_arrow.png)", "background-position" : "center 16px", "background-repeat" : "no-repeat"});
			$('#canada').hide();
			$('#us').fadeIn('slow');
	});
	
	$("#country-selector .canada").click(function(){
		$('#country-selector .us').css({"background" : "none"});
		$('#country-selector .canada').css({"background-image" : "url(http://205.186.147.249//wp-content/themes/r3m1x3d/images/location_arrow.png)", "background-position" : "center 16px", "background-repeat" : "no-repeat"});
			$('#us').hide();
			$('#canada').fadeIn('slow');
	});
	
	
	if(document.images) {
	path = "http://205.186.147.249//wp-content/themes/r3m1x3d/images/";
    img1 = new Image();
    img1.src = path + "agency_nav_over.png";
	img3 = new Image();
    img3.src = path + "approach_nav_over.png";
	
	img5 = new Image();
    img5.src = path + "capabilities_nav_over.png";
	img6 = new Image();
    img6.src = path + "case_nav_over.png";
	
	img8 = new Image();
    img8.src = path + "contact_nav_over.png";
	img9 = new Image();
    img9.src = path + "examples_nav_over.png";
	
	img11 = new Image();
    img11.src = path + "founders_nav_over.png";
	img12 = new Image();
    img12.src = path + "identity_nav_over.png";
	
	img14 = new Image();
    img14.src = path + "interactive_nav_over.png";
	img15 = new Image();
    img15.src = path + "motion_nav_over.png";
	
	img17 = new Image();
    img17.src = path + "philosophies_nav_over.png";
	img18 = new Image();
    img18.src = path + "print_nav_over.png";
	
	img20 = new Image();
    img20.src = path + "strategy_nav_over.png";
	img21 = new Image();
    img21.src = path + "extras_nav_over.png";
}

	
});


