$( document ).ready( function (){
	$(".tabs").tabs();
	$(".event-dates").tabs();
	
 	//sticky header
 	/*
	$('#superhead').scrollFollow( {
		container: 'shadow'
	} ); 
	*/
	
	
	//-------------------------------------BEGIN JQUERY ROLLOVERS ---------------------------------//
	$(".teaser").hover(   
	function() {
	$(this).addClass("pointer");
    },function(){
        $(this).removeClass("pointer");
    });


	$(".teaser").click(function(){
	  window.location=$(this).find("a").attr("href"); return false;
	});

/*	
	$("#campus-eye-content").hover(   
	function() {
	$(this).addClass("pointer");
    },function(){
        $(this).removeClass("pointer");
    });

	$("#campus-eye-content").click(function(){
	  window.location=$(this).find("a").attr("href"); return false;
	});
*/
	
	
	$("#opinionBox li").hover(   
	function() {
	$(this).addClass("highlight");
    },function(){
        $(this).removeClass("highlight");
    });

	$("#opinionBox li").click(function(){
	  window.location=$(this).find("a").attr("href"); return false;
	});
	
	
	$("#connect-box li").hover(   
	function() {
	$(this).addClass("highlight");
    },function(){
        $(this).removeClass("highlight");
    });
	/*
	$("#connect-box li").click(function(){
	  window.location=$(this).find("a").attr("href"); return false;
	});
	*/
	
	
	$("#sponsor-box li").hover(   
	function() {
	$(this).addClass("highlight");
    },function(){
        $(this).removeClass("highlight");
    });

	$("#sponsor-box li").click(function(){
	  window.location=$(this).find("a").attr("href"); return false;
	});
		
	$("#cartoonList li").hover(   
	function() {
	$(this).addClass("highlight");
    },function(){
        $(this).removeClass("highlight");
    });

	$("#cartoonList li").click(function(){
	  window.location=$(this).find("a").attr("href"); return false;
	});		
	$("#gameList li").hover(   
	function() {
	$(this).addClass("highlight");
    },function(){
        $(this).removeClass("highlight");
    });

	$("#gameList li").click(function(){
	  window.location=$(this).find("a").attr("href"); return false;
	});

	
	$("#blogList td").hover(   
	function() {
	$(this).addClass("highlight");
    },function(){
        $(this).removeClass("highlight");
    });

	$("#blogList td").click(function(){
	  window.location=$(this).find("a").attr("href"); return false;
	});
	
	
	//-------------------------------------END JQUERY ROLLOVERS ---------------------------------//
	
	
	
	//-------------------------------------BEGIN animated collapsing ---------------------------------//
	
	//for the issue summary collapsable sidebar:
	$(".collapseList").click(function(){
		$(this).children("ul").slideToggle("slow");
	});
	$(".collapseList").each(function(){
		$(this).children("ul").hide();
	});
	
	
	//for the comments in the story
	$(".moreDrop-comment").each(function(){
		$(this).hide();
	});
	$(".readMore-comment").each(function(){
		$(this).show();
	});
	
	$(".readMore-comment").click(function(){
	$(this).parent().children().children(".moreDrop-comment").slideToggle("slow");
	$(this).hide();
	$(this).parent().children(".readMore-comment-expanded").show();
	});
	$(".readMore-comment-expanded").click(function(){
	$(this).parent().children().children(".moreDrop-comment").slideToggle("slow");
	$(this).hide();
	$(this).parent().children(".readMore-comment").show();
	});


	
	
	// Article bookmark links
	if(window.opera) {
		if ($("a.jqbookmark").attr("rel") != ""){
			$("a.jqbookmark").attr("rel","sidebar");
		}
	}

	$("a.jqbookmark").click(function(event){
		event.preventDefault();
		var url = this.href;
		var title = this.title;

		if (window.sidebar) {
			window.sidebar.addPanel(title, url,"");
		} else if( window.external ) {
			window.external.AddFavorite( url, title);
		} else if(window.opera) {
			return false;
		} else {
			 alert('Unfortunately, this browser does not support the requested action,'
			 + ' please bookmark this page manually.');
		}

	});
	
}); 