jQuery(document).ready(function() {

        if (jQuery.browser.msie) {
            jQuery('head').append('<link href="/PlatoTheme/css/IE.css" type="text/css" rel="stylesheet" />');
            jQuery('head').append('<script src="/PlatoTheme/javascript/IE.js" type="text/javascript"></script>');
        } else {
            jQuery('head').append('<link href="/PlatoTheme/css/notIE.css" type="text/css" rel="stylesheet" />');
            jQuery('head').append('<script src="/PlatoTheme/javascript/notIE.js" type="text/javascript"></script>');
        }

        //Apply LavaLamp to primary navigation
        jQuery('#navigation ul').addClass('lavaLampPrimary').lavaLamp({
                fx: "backout",
                speed: 700
        });

        //Apply LavaLamp to secondary navigation
        jQuery('#childNavigation ul').addClass('lavaLampSecondary').lavaLamp({
                fx: "backout",
                speed: 700
        });

        //Change link color of primary nav item on hover
        jQuery('.lavaLampPrimary li').not('.selected').hover(function(){
                jQuery('.lavaLampPrimary .selected a').css('color', '#D3DADD');
        }, function(){
                jQuery('.lavaLampPrimary .selected a').css('color', '#183152')
        });

        //Change link color of secondary nav item on hover
        jQuery('.lavaLampSecondary li').not('.selected').hover(function(){
                jQuery('.lavaLampSecondary .selected a').css('color', '#375D81');
        }, function(){
                jQuery('.lavaLampSecondary .selected a').css('color', '#D3DADD')
        });


        //Tabs - Show/hide general and campus specific news content
	//When page loads...
	jQuery("ul.frontpageTabs li:first").addClass("active").show(); //Activate first tab
	jQuery("#layout-column_column-2 .portlet-asset-publisher:first").show(); //Show first tab content

	//On Click Event
	jQuery("ul.frontpageTabs li").click(function() {
                var clickedTab = jQuery('ul.tabs')

		jQuery("ul.frontpageTabs li").removeClass("active"); //Remove any "active" class
		jQuery(this).addClass("active"); //Add "active" class to selected tab
		jQuery("#layout-column_column-2 .portlet-asset-publisher").hide(); //Hide all tab content
                jQuery("#layout-column_column-2 .portlet-journal-content").hide(); //Hide all tab content

		var activeTab = jQuery(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content
		jQuery(activeTab).fadeIn(); //Fade in the active ID content
		return false;
	});

});
