(function($) {
  var cache = [];
  // Arguments are image paths relative to the current page.
  $.preLoadImages = function() {
    var args_len = arguments.length;
    for (var i = args_len; i--;) {
      var cacheImage = document.createElement('img');
      cacheImage.src = arguments[i];
      cache.push(cacheImage);
    }
  }
})(jQuery)

jQuery.preLoadImages("/images/nav/NEW-SUPPORT-ROLL.jpg", "/images/nav/NEW4-EVENTS-ROLL.jpg", "/images/nav/NEW4-STORE-ROLL.jpg", "/images/nav/NEW4-ARCHIVES-ROLL.jpg", "/images/nav/NEW4-CURRENT-ROLL.jpg", "/images/nav/NEW-INTRANS-ROLL.jpg");

$(document).ready(function($) {					   
	
	//onClick dropdowns
	
	$(".toggle_info").click(function(){						
		if($(this).siblings(".toggle_content").css('display') == 'block'){
			$(this).html('show more &rarr;');
			$(this).siblings(".toggle_content").hide();
		}else{
			$(this).html('hide &darr;');
			$(this).siblings(".toggle_content").show();
		}
	});
	
	/*
	
	$("#intrans").hover(
	  function () {
		$("#intrans").attr('src','/images/nav/NEW-INTRANS-ROLL.jpg');
	  },
	  function () {
		$("#intrans").attr('src','/images/nav/NEW-INTRANS.jpg');
	  }
	);
	
	*/
	
	$("#brevents").hover(
	  function () {
		$("#brevents").attr('src','/images/nav/NEW4-EVENTS-ROLL.jpg');
	  },
	  function () {
		$("#brevents").attr('src','/images/nav/NEW4-EVENTS.jpg');
	  }
	);
	
	$("#store").hover(
	  function () {
		$("#store").attr('src','/images/nav/NEW4-STORE-ROLL.jpg');
	  },
	  function () {
		$("#store").attr('src','/images/nav/NEW4-STORE.jpg');
	  }
	);
	
	$("#archives").hover(
	  function () {
		$("#archives").attr('src','/images/nav/NEW4-ARCHIVES-ROLL.jpg');
	  },
	  function () {
		$("#archives").attr('src','/images/nav/NEW4-ARCHIVES.jpg');
	  }
	);
	
	$("#support").hover(
	  function () {
		$("#support").attr('src','/images/nav/NEW-SUPPORT-ROLL.jpg');
	  },
	  function () {
		$("#support").attr('src','/images/nav/NEW-SUPPORT.jpg');
	  }
	);
	
	/* LEFT COLUMN */
	
	$(".drop").hoverIntent(
	  function(){ 
		$(".da_drop").slideDown("slow");
	  },
	  function(){
		$(".da_drop").slideUp("slow");
	  }
	);
								
});
