/*HEADER-ROLLOVER*/
// Many thanks to http://webdevel.blogspot.com/2008/04/rollover-images-with-jquery.html :)
jQuery.preloadImages = function()
{
for(var i = 0; i<arguments.length; i++)
{
jQuery("<img>").attr("src", arguments[i]);
}
}
// preload images first (can run before page is fully loaded)
$.preloadImages("facebook_on.png", "twitter_on.png", "vimeo_on.png", "zine_on.png", "mitsc_on.png", "bullet_off.png");

$(
	function()
	{
		// set up rollover
		$("img.rollover").hover(
			function()
			{
				this.src = this.src.replace("_off","_on");
			},
			function()
			{
				this.src = this.src.replace("_on","_off");
			}
		);
		
		$("img.arrowDrop_click").hover(
			function()
			{
				this.src = this.src.replace("_off","_on");
			},
			function()
			{
				this.src = this.src.replace("_on","_off");
			}
		);
	}
)

/* swap for click

$(function(){
  $(".img-swap").live('click', function() {
    if ($(this).attr("class") == "img-swap") {
      this.src = this.src.replace("_off","_on");
    } else {
      this.src = this.src.replace("_on","_off");
    }
    $(this).toggleClass("on");
  });
});

*/


/*HEADER-DROPDOWN*/
// Many thanks to http://css-tricks.com/674-designing-the-digg-header-how-to-download/ :)

$(document).ready(function(){

			   $("#navInternal li em").click(function() {
				   
		   		var hidden = $(this).parents("li").children("ul").is(":hidden");
				$("#navInternal>ul>li>ul").hide()        
			   	$("#navInternal>ul>li>a").removeClass();
				
				$('#navInternal>ul>li>ul').mouseleave(function() {
  				$(this).slideUp();
				});
		
			    if (hidden) {
			   		$(this)
				   		.parents("li").children("ul").toggle()
				   		.parents("li").children("a").addClass("zoneCur");
				   	}
			   });
		});


		
/*MAIN-SECONDARY=PRIMARY DIV HEIGHT
 $(document).ready(function() {
		   $("#secondary_wrapper").height($("#primary_wrapper").height());
 });
 */
