//sIFR implementation
function pageScripts() {
	
var futurabook = {src: DNN_skinPath + 'futurabook.swf' };
sIFR.activate(futurabook);
sIFR.replace(futurabook, {
  selector: 'h1', 
  wmode: 'transparent', 
  src:  DNN_skinPath +  'futurabook.swf', 
  css: [ '.sIFR-root {color:#050263; font-size:30px; }'  ]
});

var futurabook = {src: DNN_skinPath + 'futurabook.swf' };
sIFR.activate(futurabook);
sIFR.replace(futurabook, {
  selector: 'h2.article_header', 
  wmode: 'transparent', 
  src:  DNN_skinPath +  'futurabook.swf', 
  css: [ '.sIFR-root {color:#050263; font-size:24px; text-align:center; }'  ]
});

}

//Menu implementation
jQuery(document).ready(function($){
	
	$('ul.Level1', 'li.SelectedTab').show();
	
	$('a, #slideshow').focus(function(){ this.blur(); });
	
	if($("#flashphoto").length) {
		$('#flashphoto').cycle({
			duration: 6000,
			speed: 1000
		}, 'easeOutExpo');
	}
	
	if($('.sidepic img').height() <=60) {
		$('.sidepic').remove();
	}
	
	if(jQuery('.sidepic').length) {
		jQuery('.sidepic').cycle();
	}
	
	if(jQuery('.cycle').length) {
		jQuery('.cycle').cycle();
	}
	if (jQuery('.cycle-right').length) {
		jQuery('.cycle-right').cycle();
	}
	
	if (jQuery('.cbct-gallery').length) {
		jQuery('.cbct-gallery').cycle({
			duration: 7000,
			speed: 1000
		}, 'easeOutExpo');
	}
	
	// faq
	jQuery('.acc-faq h4').click(function() {
		var $this = jQuery(this), $submenu = jQuery(this).next();
		
		if ($this.hasClass('current')) {
			$this.removeClass('current');
			$submenu.slideUp('normal');
		}
		else {
			$('.acc-faq h4.current').removeClass('current').next().toggle("blind");
			$this.addClass('current');
			$submenu.toggle("blind");	
		}
		return false	
	});
	// procedures
	jQuery('.acc-content h2').click(function() {
		var $this = jQuery(this), $submenu = jQuery(this).next();
		
		if ($this.hasClass('current')) {
			$this.removeClass('current');
			//$submenu.slideUp('normal');
			$submenu.hide();
		}
		else {
			//$('.acc-content h2.current').removeClass('current').next().toggle("blind");
			$('.acc-content h2.current').removeClass('current').next().hide();
			$this.addClass('current');
			//$submenu.toggle("blind");
			$submenu.show();	
		}
		//return false	
	});
	
	//slideshow pro - src: O:\c\ccendo.net\development\InHouse
	if (jQuery('#slideshowOT').length) {
		var so = new SWFObject(DNN_skinPath+"images/ccendo_ssp_800x600.swf", "movie", "800", "600", "9", "#000000");
		so.addParam("wmode", "transparent", "high");
		so.addParam("allowfullscreen", "true");
		so.addVariable("xmlFilePath", "/Portals/0/officetour/images.xml?v=1.01");
		so.addVariable("xmlFileType", "Default");
		so.write("slideshowOT");
	}
	//slideshow pro - src: O:\c\ccendo.net\development\InHouse
	if (jQuery('#slideshowCBCT').length) {
		var so = new SWFObject(DNN_skinPath+"images/ccendo_ssp_800x600.swf", "movie", "800", "600", "9", "#000000");
		so.addParam("wmode", "transparent", "high");
		so.addParam("allowfullscreen", "true");
		so.addVariable("xmlFilePath", "/Portals/0/galleryCBCT/images.xml?v=1.01");
		so.addVariable("xmlFileType", "Default");
		so.write("slideshowCBCT");
	}
	
	$('#Navigation258 > a').attr('href','#slideshowOT').fancybox({
		overlayColor: '#000',
		overlayOpacity: 0.9
	});
		//$('#slideshowOT').fancybox();


});


/*function sortSidePics() {
	//setup some basic stuff and figure out what page we're on
	var _path = '/portals/0/sidepics/';
	var _pics;
	var _amt;
	var _title = document.title;
	_title = _title.split(" ", 1);
	_title = _title[0].toLowerCase();
	
	switch(_title) {
		case 'contact' :
			_amt = 2;
			break;
		default :
			return false;
			break;
	}
	return {
		path: _path + _title,
		amt: _amt		
	}
}

function showSidePics() {
	e = sortSidePics();
	e.amt = Number(e.amt);
	var _path;
	var _html = new Array();
	var _pieces = new Array();
	
	for(var i = 1; i <= e.amt; i++) {
		_path = e.path + i + ".jpg";
		_pieces[i] = "<img src='" + _path + "' />";
	}

	_html = _pieces.join(" ");
	jQuery('.sidepic').html(_html);

}
*/
