/* - uofl.custom.js - */
// http://louisville.edu/portal_javascripts/uofl.custom.js?original=1
function recordOutboundLink(link,category,action,opt_label){_gat._getTrackerByName()._trackEvent(category,action,opt_label);setTimeout('document.location = "'+link.href+'"',100)}
jq(function(){jq('#shelf .shelf_content a').click(function(){recordOutboundLink(this,'Outgoing Shelf Links',jq(this).attr('href'))})});jq(function(){jq('#calendar a').click(function(){recordOutboundLink(this,'Outgoing Calendar Links',jq(this).attr('href'))})});jq(function(){jq('#newsblogs a').click(function(){recordOutboundLink(this,'Outgoing News Links',jq(this).attr('href'))})});jq(function(){jq('#spotlight a').click(function(){recordOutboundLink(this,'Outgoing Spotlight Links',jq(this).attr('href'))})});jq(function(){jq('#featured_links a').click(function(){recordOutboundLink(this,'Outgoing Featured Links',jq(this).attr('href'))})});jq(function(){jq('#slider a').click(function(){recordOutboundLink(this,'Outgoing Banner Links',jq(this).attr('href'))})});jq(function(){jq('#uofltoday-gallery a').click(function(){recordOutboundLink(this,'Outgoing Flickr Links',jq(this).attr('href'))})});jq(function(){jq('#footer_menu a').click(function(){recordOutboundLink(this,'Outgoing Footer Links',jq(this).attr('href'))})});jq(function(){jq('#login_content a').click(function(){recordOutboundLink(this,'Outgoing Login Menu Links',jq(this).attr('href'))})});
function preLoadShelf(event){event.preventDefault();var shelfClass=jq(this).parent().attr('id');if(jq('#shelf_'+shelfClass).css('display')=='none'){jq('#shelf_'+shelfClass).load('/shelf/'+shelfClass+'.html/@@ajaxview',
function(){jq('#shelf_'+shelfClass+' a').click( function(){recordOutboundLink(this,'Outgoing Shelf Links',jq(this).attr('href'),shelfClass)})})}}
function tMenu(event){event.preventDefault();var shelfClass=jq(this).parent().attr('id');var liHeight=240;if(jq('section#shelf').css('display')=='none'){jq('.topic_menu a').removeClass('selected');jq(this).css('height','45px');jq(this).css('background-position','0 0');jq(this).addClass('selected');jq('section#shelf').css('height','0px');jq('section#shelf').css('display','block');jq('#shelf_'+shelfClass).css('display','block');jq('#shelf_'+shelfClass+' ul').children('li').each(
function(){liHeight=liHeight>=jq(this).height()?liHeight:jq(this).height()});jq('#shelf_'+shelfClass+' ul').children('li').height(liHeight);jq('section#shelf').css('display','none');jq('#shelf_'+shelfClass).fadeIn('800');shelfHeight=liHeight+30;jq("section#shelf").css('height',shelfHeight);jq("section#shelf").slideToggle('300')} else{if(jq('section#shelf').css('display')!='none'&&jq('#shelf_'+shelfClass).css('display')=='none'){jq('.topic_menu a').not(jq(this)).css('background-position','0 -52px');jq('.topic_menu a').not(jq(this)).css('height','52px');jq('.topic_menu a').not(jq(this)).removeClass('selected');jq(this).css('height','45px');jq(this).css('background-position','0 0');jq(this).addClass('selected');jq('.shelf_content').fadeOut('200');jq('.shelf_content').css('display','none');jq('#shelf_'+shelfClass).css('visibility','hidden');jq('#shelf_'+shelfClass).css('display','block');jq('#shelf_'+shelfClass+' ul').children('li').each(
function(){liHeight=liHeight>=jq(this).height()?liHeight:jq(this).height()});jq('#shelf_'+shelfClass+' ul').children('li').height(liHeight);jq('#shelf_'+shelfClass).css('visibility','visible');shelfHeight=liHeight+30;jq('section#shelf').animate({height:shelfHeight});jq('.shelf_content').css('display','none');jq('#shelf_'+shelfClass).fadeIn('200')} else{jq('.shelf_content').fadeOut('500');jq("section#shelf").slideToggle('500');jq('.topic_menu a.selected').removeClass('selected');jq('.topic_menu a').css('background-position','0 -52px');jq('.topic_menu a').css('height','52px');jq('.topic_menu a').hover( function(){jq(this).css('background-position','0 0')},
function(){jq(this).css('background-position','0 -52px')})}}
jq('.topic_menu a').css('background-position','0 -52px');jq('.topic_menu a').css('height','52px');jq('.topic_menu a').hover( function(){jq(this).css('background-position','0 0')},
function(){jq(this).css('background-position','0 -52px')});jq('.topic_menu a.selected').unbind('mouseenter mouseleave');jq('.topic_menu a.selected').css('background-position','0 0px');jq('.topic_menu a.selected').css('height','45px')}
function clearText(thefield){if(thefield.defaultValue==thefield.value){thefield.value=""}}
jq(window).load(function(){jq('#slider').nivoSlider({effect:'fade',slices:1,animSpeed:500,pauseTime:6500,startSlide:0,directionNav:true,directionNavHide:true,controlNav:true,controlNavThumbs:false,controlNavThumbsFromRel:false,keyboardNav:true,pauseOnHover:true,manualAdvance:false,captionOpacity:0.8,beforeChange: function(){},afterChange: function(){},slideshowEnd: function(){}})});jq(document).ready(function(){jq('#shelf_default_about').load('/shelf/default_about.html/@@ajaxview');jq(function(){jq('#shelf_default_about a').click(function(){recordOutboundLink(this,'Outgoing Shelf Links',jq(this).attr('href'),'default_about')})});jq("#default_about > a").click(tMenu);jq("#default_academics > a").mouseenter(preLoadShelf);jq("#default_academics > a").click(tMenu);jq("#default_athletics > a").mouseenter(preLoadShelf);jq("#default_athletics > a").click(tMenu);jq("#default_research > a").mouseenter(preLoadShelf);jq("#default_research > a").click(tMenu);jq("#default_connect > a").mouseenter(preLoadShelf);jq("#default_connect > a").click(tMenu);jq('#shelf_future_admission').load('/shelf/future_admission.html/@@ajaxview');jq(function(){jq('#shelf_future_admission a').click(function(){recordOutboundLink(this,'Outgoing Shelf Links',jq(this).attr('href'),'future_admission')})});jq("#future_admission > a").click(tMenu);jq("#future_academics > a").mouseenter(preLoadShelf);jq("#future_academics > a").click(tMenu);jq("#future_campuslife > a").mouseenter(preLoadShelf);jq("#future_campuslife > a").click(tMenu);jq("#future_resources > a").mouseenter(preLoadShelf);jq("#future_resources > a").click(tMenu);jq("#future_explore > a").mouseenter(preLoadShelf);jq("#future_explore > a").click(tMenu);jq('#shelf_students_academics').load('/shelf/students_academics.html/@@ajaxview');jq(function(){jq('#shelf_students_academics a').click(function(){recordOutboundLink(this,'Outgoing Shelf Links',jq(this).attr('href'),'students_academics')})});jq("#students_academics > a").click(tMenu);jq("#students_resources > a").mouseenter(preLoadShelf);jq("#students_resources > a").click(tMenu);jq("#students_campuslife > a").mouseenter(preLoadShelf);jq("#students_campuslife > a").click(tMenu);jq("#students_connect > a").mouseenter(preLoadShelf);jq("#students_connect > a").click(tMenu);jq('#shelf_facstaff_resources').load('/shelf/facstaff_resources.html/@@ajaxview');jq(function(){jq('#shelf_facstaff_resources a').click(function(){recordOutboundLink(this,'Outgoing Shelf Links',jq(this).attr('href'),'facstaff_resources')})});jq("#facstaff_resources > a").click(tMenu);jq("#facstaff_hr > a").mouseenter(preLoadShelf);jq("#facstaff_hr > a").click(tMenu);jq("#facstaff_academics > a").mouseenter(preLoadShelf);jq("#facstaff_academics > a").click(tMenu);jq("#facstaff_news > a").mouseenter(preLoadShelf);jq("#facstaff_news > a").click(tMenu);jq('#shelf_alumni_association').load('/shelf/alumni_association.html/@@ajaxview');jq(function(){jq('#shelf_alumni_association a').click(function(){recordOutboundLink(this,'Outgoing Shelf Links',jq(this).attr('href'),'alumni_association')})});jq("#alumni_association > a").click(tMenu);jq("#alumni_giving > a").mouseenter(preLoadShelf);jq("#alumni_giving > a").click(tMenu);jq("#alumni_services > a").mouseenter(preLoadShelf);jq("#alumni_services > a").click(tMenu);jq("#alumni_news > a").mouseenter(preLoadShelf);jq("#alumni_news > a").click(tMenu);jq('#shelf_close').click( function(event){event.preventDefault();jq(".shelf_content").fadeOut('slow');jq("section#shelf").slideUp('slow');jq('.topic_menu a.selected').removeClass('selected');jq('.topic_menu a').css('background-position','0 -52px');jq('.topic_menu a').css('height','52px');jq('.topic_menu a').hover( function(){jq(this).css('background-position','0 0')},
function(){jq(this).css('background-position','0 -52px')})});jq("#main_menu").tabs({event:"mouseover",select: function(event,ui){if(jq('section#shelf').css('display')!='none'){loc=jq(ui.tab).attr('href');jq(loc+' li:first-child a').triggerHandler('mouseenter');jq(loc+' li:first-child a').triggerHandler('click')}
return true}});jq('#apply_link').mouseenter(function(){jq('#campus_menu').fadeOut('100');jq('#apply_menu').fadeIn('800')});jq('#apply_menu').mouseleave( function(){jq('#apply_menu').fadeOut('800')});jq('#campus_link').mouseenter(function(){jq('#apply_menu').fadeOut('100');jq('#campus_menu').fadeIn('800')});jq('#campus_menu').mouseleave( function(){jq('#campus_menu').fadeOut('800')})});jq(document).keyup(function(event){if(event.keyCode==27){jq(".shelf_content").fadeOut('slow');jq("section#shelf").slideUp('slow');jq('.topic_menu a.selected').removeClass('selected');jq('.topic_menu a').css('background-position','0 -52px');jq('.topic_menu a').css('height','52px');jq('.topic_menu a').hover( function(){jq(this).css('background-position','0 0')},
function(){jq(this).css('background-position','0 -52px')})}});jq(document).ready(function(){jq("a#login_link").fancybox({overlayOpacity:0.8})});

