

//Maintain open state of menu after end user has made a selection
//This snippet came from http://www.i-marco.nl/weblog/jquery-accordion-menu-redux2/

function initMenus() {
$('ul.smenu ul').hide();
$.each($('ul.smenu'), function(){
var cookie = $.cookie(this.id);
if(cookie === null || String(cookie).length < 1) {
$('#' + this.id + '.expandfirst ul:first').show();
}
else {
$('#' + this.id + ' .' + cookie).next().show();
}
});
$('ul.smenu li a').click(
function() {

var checkElement = $(this).next();
var parent = this.parentNode.parentNode.id;

if($('#' + parent).hasClass('noaccordion')) {
if((String(parent).length > 0) && (String(this.className).length > 0)) {
if($(this).next().is(':visible')) {
$.cookie(parent, null,{path:'/'});
}
else {
$.cookie(parent, this.className,{path:'/'});
}
 $(this).next().slideToggle('normal');
}
 } 
 if((checkElement.is('ul')) && (checkElement.is(':visible'))) {
if($('#' + parent).hasClass('collapsible')) {
$('#' + parent + ' ul:visible').slideUp('normal');
 }
 return false;
}
if((checkElement.is('ul')) && (!checkElement.is(':visible'))) {
$('#' + parent + ' ul:visible').slideUp('normal');
if((String(parent).length > 0) && (String(this.className).length > 0)) {
 $.cookie(parent, this.className,{path:'/'});
 }
checkElement.slideDown('normal');
return false;
 }
 }
 );
}


$(document).ready(function() {
 // replace the sfHover function above in jQuery
 $("#nav-sitelist").find("li").mouseover(function () {$(this).addClass("sfhover");}).mouseout(function() {$(this).removeClass("sfhover");});


 // Expanding only the active menu, which is determined by the class name
 //$("#smenuTop1").find("+ ul").slideToggle("medium");

 //$('.smenu').hide();

 initMenus(); // left navigation accordion


 $('#newsitem02').hide();
 $('#newsitem03').hide();
 $('#newsitem04').hide();

	
 $('#newslink03').hover(
	function() {
		$('.newsitem').hide();
		$('#newsitem03').show();
	},
	function() {
		$('#newsitem03').show();	
	}
);

 $('#newslink02').hover(
	function() {
		$('.newsitem').hide();
		$('#newsitem02').show();
	},
	function() {
		$('#newsitem02').show();	
	}
);

 $('#newslink01').hover(
	function() {
		$('.newsitem').hide();
		$('#newsitem01').show();
	},
	function() {
		$('#newsitem01').show();	
	}
);

				
//	 //Toggling the selected menu's class and expand or collapse the menu
//	$("#udm > li > a").click(function() {
//		$(this).toggleClass("expanded").toggleClass("collapsed").find("+ ul").slideToggle("medium");
//		return false;
//	});
//
//	
});


$(document).ready(function(){
    $('#M1 #slideshow1').flash(
        { src: '/flash/iamterry/homeIAmTerry1.0.swf',
          width: 750,
          height: 260,
 		  wmode: "transparent"},
		{ update: false }
    );

    $('#M5 #aacsb_banner').flash(
        { src: '/about/flash/AACSB.swf',
          width: 560,
          height: 347,
 		  wmode: "transparent"},
		{ update: false }
    );
	
	 $('#M4 #alumni_banner').flash(
        { src: '/_assets/swf/bnr_alumni.swf',
          width: 767,
          height: 259,
 		  wmode: "transparent"},
		{ update: false }
    );
	 
	  $('#M4 #atlanta_banner').flash(
        { src: '/atlanta/flash/atlantaHome.swf',
          width: 767,
          height: 259,
 		  wmode: "transparent"},
		{ update: false }
    );
	
	 $('#M4 #hireterry_banner').flash(
        { src: '/_assets/swf/bnr_hireterry.swf',
          width: 767,
          height: 259,
 		  wmode: "transparent"},
		{ update: false }
    );

    $('#M2 #economics_banner').flash(
        { src: '/_assets/swf/bnr_economics.swf',
          width: 767,
          height: 110,
 		  wmode: "transparent"},
		{ update: false }
    );

    $('#M4 #gala_banner').flash(
        { src: '/_assets/swf/bnr_gala.swf',
          width: 767,
          height: 259,
 		  wmode: "transparent"},
		{ update: false }
    );

    $('#M4 #ib_banner').flash(
        { src: '/_assets/swf/bnr_ib.swf',
          width: 767,
          height: 259,
 		  wmode: "transparent"},
		{ update: false }
    );

    $('#M4 #leadership_banner').flash(
        { src: '/_assets/swf/bnr_leadership.swf',
          width: 767,
          height: 259,
 		  wmode: "transparent"},
		{ update: false }
    );

    $('#M11 #mbaprog_banner').flash(
        { src: '/_assets/swf/bnr_mba_fulltime.swf',
          width: 767,
          height: 259,
 		  wmode: "transparent"},
		{ update: false }
    );

    $('#M4 #musicbusiness_banner').flash(
        { src: '/_assets/swf/bnr_musicbusiness.swf',
          width: 767,
          height: 259,
 		  wmode: "transparent"},
		{ update: false }
    );

 $('#M4 #phd_banner').flash(
        { src: '/_assets/swf/bnr_phd.swf',
          width: 767,
          height: 259,
 		  wmode: "transparent"},
		{ update: false }
    );

 $('#M4 #selig_banner').flash(
        { src: '/_assets/swf/bnr_selig.swf',
          width: 767,
          height: 259,
 		  wmode: "transparent"},
		{ update: false }
    );

 $('#M4 #undergraduate_banner').flash(
        { src: '/_assets/swf/bnr_undergraduate.swf',
          width: 767,
          height: 259,
 		  wmode: "transparent"},
		{ update: false }
    );

});
/***********************************************************
                      Major Decision Videos
***********************************************************/
$(document).ready(function(){
$('#M5 #video_accounting').flash(
        { src: '/_assets/swf/video_majors_ben.swf',
          width: 320,
          height: 285,
 		  wmode: "transparent"},
		{ update: false }
    );

$('#M5 #video_finance').flash(
        { src: '/_assets/swf/video_majors_annette.swf',
          width: 320,
          height: 285,
 		  wmode: "transparent"},
		{ update: false }
    );

$('#M5 #video_dean').flash(
        { src: '/_assets/swf/video_majors_dean.swf',
          width: 320,
          height: 285,
 		  wmode: "transparent"},
		{ update: false }
    );

$('#M5 #video_diversity').flash(
        { src: '/_assets/swf/video_majors_randy.swf',
          width: 320,
          height: 285,
 		  wmode: "transparent"},
		{ update: false }
    );

$('#M5 #video_economics').flash(
        { src: '/_assets/swf/video_majors_chris.swf',
          width: 320,
          height: 285,
 		  wmode: "transparent"},
		{ update: false }
    );

$('#M5 #video_ib').flash(
        { src: '/_assets/swf/video_majors_myra.swf',
          width: 320,
          height: 285,
 		  wmode: "transparent"},
		{ update: false }
    );


$('#M5 #video_management').flash(
        { src: '/_assets/swf/video_majors_allen.swf',
          width: 320,
          height: 285,
 		  wmode: "transparent"},
		{ update: false }
    );

$('#M5 #video_marketing').flash(
        { src: '/_assets/swf/video_majors_peggy.swf',
          width: 320,
          height: 285,
 		  wmode: "transparent"},
		{ update: false }
    );

$('#M5 #video_mis').flash(
        { src: '/_assets/swf/video_majors_rick.swf',
          width: 320,
          height: 285,
 		  wmode: "transparent"},
		{ update: false }
    );

$('#M5 #video_realestate').flash(
        { src: '/_assets/swf/video_majors_henry.swf',
          width: 320,
          height: 285,
 		  wmode: "transparent"},
		{ update: false }
    );

$('#M5 #video_rmi').flash(
        { src: '/_assets/swf/video_majors_robert.swf',
          width: 320,
          height: 285,
 		  wmode: "transparent"},
		{ update: false }
    );


/***********************************************************
                       I Am Terry Videos
***********************************************************/


$('#M5 #video_iamterry_akinkuowo').flash(
        { src: '/_assets/swf/video_akinkuowo.swf',
          width: 500,
          height: 330,
 		  wmode: "transparent"},
		{ update: false }
    );

$('#M5 #video_iamterry_amacher').flash(
        { src: '/_assets/swf/video_amacher.swf',
          width: 500,
          height: 330,
 		  wmode: "transparent"},
		{ update: false }
    );

$('#M5 #video_iamterry_barksdale').flash(
        { src: '/_assets/swf/video_barksdale.swf',
          width: 500,
          height: 330,
 		  wmode: "transparent"},
		{ update: false }
    );

$('#M5 #video_iamterry_bartlett').flash(
        { src: '/_assets/swf/video_bartlett.swf',
          width: 500,
          height: 330,
 		  wmode: "transparent"},
		{ update: false }
    );

$('#M5 #video_iamterry_bauer').flash(
        { src: '/_assets/swf/video_bauer.swf',
          width: 500,
          height: 330,
 		  wmode: "transparent"},
		{ update: false }
    );

$('#M5 #video_iamterry_beggerly').flash(
        { src: '/_assets/swf/video_beggerly.swf',
          width: 500,
          height: 330,
 		  wmode: "transparent"},
		{ update: false }
    );

$('#M5 #video_iamterry_boudreau').flash(
        { src: '/_assets/swf/video_boudreau.swf',
          width: 500,
          height: 330,
 		  wmode: "transparent"},
		{ update: false }
    );

$('#M5 #video_iamterry_callaway').flash(
        { src: '/_assets/swf/video_callaway.swf',
          width: 500,
          height: 330,
 		  wmode: "transparent"},
		{ update: false }
    );

$('#M5 #video_iamterry_davis').flash(
        { src: '/_assets/swf/video_davis.swf',
          width: 500,
          height: 330,
 		  wmode: "transparent"},
		{ update: false }
    );

$('#M5 #video_iamterry_devore').flash(
        { src: '/_assets/swf/video_devore.swf',
          width: 500,
          height: 330,
 		  wmode: "transparent"},
		{ update: false }
    );

$('#M5 #video_iamterry_dillard').flash(
        { src: '/_assets/swf/video_dillard.swf',
          width: 500,
          height: 330,
 		  wmode: "transparent"},
		{ update: false }
    );

$('#M5 #video_iamterry_frazier').flash(
        { src: '/_assets/swf/video_frazier.swf',
          width: 500,
          height: 330,
 		  wmode: "transparent"},
		{ update: false }
    );

$('#M5 #video_iamterry_glover').flash(
        { src: '/_assets/swf/video_glover.swf',
          width: 500,
          height: 330,
 		  wmode: "transparent"},
		{ update: false }
    );

$('#M5 #video_iamterry_graham').flash(
        { src: '/_assets/swf/video_graham.swf',
          width: 500,
          height: 330,
 		  wmode: "transparent"},
		{ update: false }
    );

$('#M5 #video_iamterry_jacobo').flash(
        { src: '/_assets/swf/video_jacobo.swf',
          width: 500,
          height: 330,
 		  wmode: "transparent"},
		{ update: false }
    );

$('#M5 #video_iamterry_jakstadt').flash(
        { src: '/_assets/swf/video_jakstadt.swf',
          width: 500,
          height: 330,
 		  wmode: "transparent"},
		{ update: false }
    );

$('#M5 #video_iamterry_jarrell').flash(
        { src: '/_assets/swf/video_jarrell.swf',
          width: 500,
          height: 330,
 		  wmode: "transparent"},
		{ update: false }
    );

$('#M5 #video_iamterry_omeara').flash(
        { src: '/_assets/swf/video_omeara.swf',
          width: 500,
          height: 330,
 		  wmode: "transparent"},
		{ update: false }
    );

$('#M5 #video_iamterry_otu').flash(
        { src: '/_assets/swf/video_otu.swf',
          width: 500,
          height: 330,
 		  wmode: "transparent"},
		{ update: false }
    );

$('#M5 #video_iamterry_pruiett').flash(
        { src: '/_assets/swf/video_pruiett.swf',
          width: 500,
          height: 330,
 		  wmode: "transparent"},
		{ update: false }
    );

$('#M5 #video_iamterry_reddy').flash(
        { src: '/_assets/swf/video_reddy.swf',
          width: 500,
          height: 330,
 		  wmode: "transparent"},
		{ update: false }
    );

$('#M5 #video_iamterry_skinner').flash(
        { src: '/_assets/swf/video_skinner.swf',
          width: 500,
          height: 330,
 		  wmode: "transparent"},
		{ update: false }
    );

$('#M5 #video_iamterry_sumichrast').flash(
        { src: '/_assets/swf/video_sumichrast.swf',
          width: 500,
          height: 330,
 		  wmode: "transparent"},
		{ update: false }
    );

$('#M5 #video_iamterry_thompson').flash(
        { src: '/_assets/swf/video_thompson.swf',
          width: 500,
          height: 330,
 		  wmode: "transparent"},
		{ update: false }
    );

$('#M5 #video_iamterry_thrower').flash(
        { src: '/_assets/swf/video_thrower.swf',
          width: 500,
          height: 330,
 		  wmode: "transparent"},
		{ update: false }
    );

$('#M5 #video_iamterry_veliyath').flash(
        { src: '/_assets/swf/video_veliyath.swf',
          width: 500,
          height: 330,
 		  wmode: "transparent"},
		{ update: false }
    );

$('#M5 #video_iamterry_white').flash(
        { src: '/_assets/swf/video_white.swf',
          width: 500,
          height: 330,
 		  wmode: "transparent"},
		{ update: false }
    );

$('#M5 #video_iamterry_yoshimura').flash(
        { src: '/_assets/swf/video_yoshimura.swf',
          width: 500,
          height: 330,
 		  wmode: "transparent"},
		{ update: false }
    );


/* Other Flash Videos */

$('#M5 #mbus_promo').flash(
        { src: '/musicbusiness/flash/mbus_promo.swf',
          width: 500,
          height: 330,
 		  wmode: "transparent"},
		{ update: false }
    );

$('#M5 #mbus_showcase').flash(
        { src: '/musicbusiness/flash/mbus_showcase.swf',
          width: 500,
          height: 330,
 		  wmode: "transparent"},
		{ update: false }
    );


}); /* Close tag for the function */