// Flash configuration
// Major version of Flash required
var requiredMajorVersion = 7;
// Minor version of Flash required
var requiredMinorVersion = 0;
// Minor version of Flash required
var requiredRevision = 0;

//Menu init
ddsmoothmenu.init({
	mainmenuid: "smoothmenu1", //menu DIV id
	orientation: 'h', //Horizontal or vertical menu: Set to "h" or "v"
	classname: 'ddsmoothmenu', //class added to menu's outer DIV
	contentsource: "markup" //"markup" or ["container_id", "path_to_menu_file"]
})

function openDocFormatWindow(target) {
	var features = "scrollbars=yes,resizable=yes,width=550,height=500";
	var winName = "popup";
	window.open(target,winName,features);
}
function openPopupEm(url,w,h) {
	fo = window.open(paramescape(url),'','width='+w+',height='+h+',toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no');
	fo.focus();
	if (fo.opener == null) {fo.opener = self;}
}

jQuery(document).ready(function() {
    
    // Use jQUERY Cycle to make a homepage slideshow. Documentation: http://jquery.malsup.com/cycle/options.html
	$('.gc-carousel-list').cycle({     
	    fx:     'fade', 
	    speed:  1000, 
	    timeout: 7000, 
	    delay: -2000, // delay the animation of the first slide
	    //next: '.gc-carousel-list', // next slide on click
	    pause: 1, // pause on hover
	    fastOnEvent: 0, /// when an external controller is clicked, the next animation should happen immediately
	    pager: '#carousel-pager-buttons'
	});	
	
	// Set some control links
	$(".carousel-pause-resume a#carousel-pause").click(function() {
		$('.gc-carousel-list').cycle('pause');
		return false;  
	});
	$(".carousel-pause-resume a#carousel-resume").click(function() {
		$('.gc-carousel-list').cycle('resume');
		return false;  
	});
    
});



// jquery slideshow needs to 
  //  1. initialize with the first item having the active class
  //  2. new slide fades in slowly every 7 seconds, active class is removed from previous and applied to current
  //  3. onclick of control, new slide fades in slowly, active class is removed from previous and applied to current
  //  4. pause slideshow on hover

