﻿$(document).ready(function(){

	//Fixes IE 6 and 7's Z-index issues
	$(function() {
	var zIndexNumber = 1000;
	$('div').each(function() {
		$(this).css('zIndex', zIndexNumber);
		zIndexNumber -= 10;
	});
});

//Formats Homepage RSS Events
$("#rssevents a").each(function()
	{
		$(this).html($(this).html().replace("(","<span class='eventdate'>").replace(")","</span><br />"));	
	});
	
//Fixes IE6 Quicklink issue
	$(function() {
	if ($.browser.msie && parseInt($.browser.version)< 7) {
	    $("#quicklinks li").hover(
            function() {
            	$(this).addClass("over");
            },
            function() {
		$(this).removeClass("over");
            });
	}
});

//Clears and Replaces text value of search box
$(document).ready(function () {
    $("#bonus-nav input.searchbox").focus(function() {
        if(this.value=='Search USC Upstate') {this.value=''}
    });
    $("#bonus-nav input.searchbox").blur(function() {
        if(this.value=='') {this.value='Search USC Upstate'}
    });
});
	
    //Secondary Menu
	$("div#secondary").hide();
    $("#open").click(function(){
		if ( $('#secondary').is(':hidden') ) {
			$("#secondary").slideDown("slow");
			$("#open").addClass("open").removeClass("closed"); 
		} else {
			$("#secondary").slideUp("slow");
			$("#open").addClass("closed").removeClass("open"); 
		}
	});
});	


