//top nav mega dropdown functions & config start
function printMe() {
	self.print();
}

//top nav mega dropdown functions & config end

//image rollover
//swap img src from "imagename-off.gif" to "imagename-on.gif" - works for any image folder path
//usage: apply class="rollover" to images/form buttons etc
function rollover() {
	$(".rollover").hover(
		function() {
			this.src = this.src.replace("-off","-on");
		},
		function() {
			this.src = this.src.replace("-on","-off");
		}
	);		
}

//bookmarker
//need to include jfav.js
function bookmarker() {
	$("A.bookmark").jFav();
}

function hmPanels() {
	$(".hm-panel").hide();
	$(".hm-panel:first").fadeIn();
	
	$("UL#hm LI A").click(function() {
		var elemID = this.id;
//		alert(elemID);
		$("DIV.hm-panel").slideUp(500);
		fadeBackIn(elemID);
		
//		("",function() {
//			$("DIV#perm" + elemID).slideDown();
//		});
	});
}

function fadeBackIn(elemID) {
	$("DIV#hm" + elemID).slideDown("slow");
}

function reInitSifr() {
	//add sifr calls here
	sIFR.replace(bliss, {
		selector: '.agendaDetailedBoxContents H4',
		css: [
			'.sIFR-root {color: #7B7B7B;}',
			'strong {font-weight: bold;}',
			'em { font-size: 15px; font-style: normal;}'
		],
		wmode: 'transparent'
	});
}

function banner(totalSlideCount, currentImageNum) {
    $(".homeAnim").cycle({ 
		fx: 'fade',
	    speed:  1500,
	    timeout: 8000,
        before: onBefore 
    }); 

    function onBefore(curr, next, opts) { 
        if (!opts.addSlide) 
            return; 
 
       	currentImageNum++;  
             
        if (currentImageNum == totalSlideCount) { 
            opts.addSlide = null; 
            return; 
        } 
         
        opts.addSlide("<p><img src=\"images/" + homeImgs[currentImageNum] + "\" width=\"796\" height=\"404\" alt=\"risk management for private equity\" /></p>");
    }; 
}

var homeImgs = new Array(4);
homeImgs[0]="home1.jpg";
homeImgs[1]="home2.jpg";
homeImgs[2]="home3.jpg";
homeImgs[3]="home4.jpg";

