$(function() {

	// init Cufon
	initCufon();

	// document icons
	$('body.inner-page #content a[href$=pdf]').addClass('pdf'); 
	$('body.inner-page #content a[href$=doc], body.inner-page #content a[href$=docx]').addClass('word'); 
	$('body.inner-page #content a[href$=xls], body.inner-page #content a[href$=xlsx], body.inner-page #content a[href$=csv]').addClass('excel'); 
	$('body.inner-page #content a[href$=txt], body.inner-page #content a[href$=rtf]').addClass('txt'); 
	$('body.inner-page #content a[href$=ppt], body.inner-page #content a[href$=pptx').addClass('ppt'); 
	$('body.inner-page #content a[href$=zip]').addClass('zip'); 
	$('body.inner-page #content a[href$=mp3]').addClass('ipod_sound'); 
	$('body.inner-page #content a[href$=flv]').addClass('movie'); 
	
	// gallery
	var gall = $('div.slide-box').gallery({
		duration: 500,
		autoRotation: 5000,
		listOfSlides: 'ul.gall > li',
		effect: true
	});
	
	// home page promo
	$('div.promo-holder').gallery({
		duration: 500,
		autoRotation: 10000,
		listOfSlides: '.slide-box',
		effect: true
	});	
	
	// hackery to get navee to cooperate
	$('.selected').attr('class', 'active');
	$('#nav > li:first-child').attr('id', 'first');
	$('#nav > li:last-child').attr('id', 'last');
	$('#nav > li > a').wrapInner('<span />');
	
	// open PDFs in a new window
	$('a[href$=pdf]').attr('target', '_blank');
	
	// move leadership link to 4th item in dropdown
	$('#leadership-nav-item').insertAfter('.a4');
	
	// move leadership link to 4th item in footer About nav
	$('#footer-leadership-nav-item').insertAfter('.fa4');	
	
	// dept selector
  $("#dept").change(function() {     
    if ($('option:selected').val() == "Cruise Card Customer Service Center and Staff") { 
      $('#show-me').show();
    } 
    else { 
      $('#show-me').hide();
    } 
  });	
	
});	
