//sIFR implementation
function pageScripts(){
var KozukaGothicProM = {  src: DNN_skinPath + 'KozukaGothicProM.swf' };
sIFR.activate(KozukaGothicProM);
sIFR.replace(KozukaGothicProM, {
  selector: 'h1', 
  wmode: 'transparent', 
  src:  DNN_skinPath +  'KozukaGothicProM.swf', 
  css: [ '.sIFR-root {color:#ffffff;font-size:30px;}'  ]
});
}


//Menu implementation
jQuery(document).ready(function($){

	jQuery("#Navigation > ul").superfish({
		hoverClass:"hover",
		pathClass:"overideThisToUse",
		delay:800,
		animation:{height:"show"},
		speed:"normal",
		oldJquery:false,
		disableHI:false,
		onInit:function () {},
		onBeforeShow:function () {},
		onShow:function () {},
		onHide:function () {}
	}).find(">li:has(ul)").mouseover(function () {
		jQuery("ul", this).bgIframe({opacity:true});
	}).find("a").focus(function () {
		jQuery("ul", jQuery("#Navigation > ul >li:has(ul)")).bgIframe({opacity:true});
	});
	/* remove box from links */
	jQuery("a").focus(function(){
		this.blur();
			});
	
	/*jQuery(".LinkIcon").rollover();	*/
		
	menuImage1 = new Image(); 
	menuImage1.src = DNN_skinPath + "images/ouroffice_on.jpg";	 
	menuImage2 = new Image(); 
	menuImage2.src = DNN_skinPath + "images/ourcareteam_on.jpg";
    menuImage3 = new Image(); 
	menuImage3.src = DNN_skinPath + "images/locandmaps_on.jpg";
	menuImage4 = new Image(); 
	menuImage4.src = DNN_skinPath + "images/procedures_on.jpg";
	menuImage5 = new Image(); 
	menuImage5.src = DNN_skinPath + "images/pforms_on.jpg";
	menuImage6 = new Image(); 
	menuImage6.src = DNN_skinPath + "images/online_on.jpg";
	menuImage7 = new Image(); 
	menuImage7.src = DNN_skinPath + "images/edu_on.jpg";

 jQuery("#Navigation69 a").click(function(){
			window.open('/Portals/0/pdf/TipsforaColonoscopy.pdf','newwindow')			 			
	 });
 
 
//  jQuery("#s66")
	SplitMenu();
 
 });
 
 /* Enlarge the text */ 
var IsFontTextLarge = false;

function resetTextSize() {
	
	if (IsFontTextLarge) {		
		decreaseFontSize();
	}
	else 
	{		
		increaseFontSize();
	}
}

function increaseFontSize() {
	document.getElementById('dnn_enlargelinks').src = DNN_skinPath + 'images/zoom_hover.jpg';
	//alert('DNN_skinPath:'+document.getElementById('dnn_imgTextSize').src);
	//document.all.dnn_imgTextSize.src = DNN_skinPath + 'images/largertext.gif';
	var p = document.getElementsByTagName('p');	
	var unorder = document.getElementsByTagName('li');	
	var header4 = document.getElementsByTagName('h4');
	var header = document.getElementsByTagName('h3');
	var header2 = document.getElementsByTagName('h2');
	var anchortxt = document.getElementsByTagName('a');
	var form = document.getElementsByTagName('label');
	for(i=0;i<p.length;i++) {
		  p[i].style.fontSize = 18+'px';
		}
	for(i=0;i<unorder.length;i++) {
		  unorder[i].style.fontSize = 16+'px';
		}
		for(i=0;i<header4.length;i++) {
		  header4[i].style.fontSize = 16+'px';
		}
		for(i=0;i<header.length;i++) {
		  header[i].style.fontSize = 20+'px';
		}
		for(i=0;i<header2.length;i++) {
		  header2[i].style.fontSize = 18+'px';
		}
		for(i=0;i<anchortxt.length;i++) {
		  anchortxt[i].style.fontSize = 16+'px';
		}
		for(i=0;i<form.length;i++) {
		  form[i].style.fontSize = 16+'px';
		}
	IsFontTextLarge = true;
}
function decreaseFontSize() {
	document.getElementById('dnn_enlargelinks').src = DNN_skinPath + 'images/zoom.jpg';
	//document.all.dnn_imgTextSize.src = DNN_skinPath + 'images/largertext.gif';	
	var p = document.getElementsByTagName('p');	
		var unorder = document.getElementsByTagName('li');	
	var header4 = document.getElementsByTagName('h4');
	var header = document.getElementsByTagName('h3');
	var header2 = document.getElementsByTagName('h2');
	var anchortxt = document.getElementsByTagName('a');
	var form = document.getElementsByTagName('label');
	for(i=0;i<p.length;i++) {
		  p[i].style.fontSize = 12+'px';
		}
	for(i=0;i<unorder.length;i++) {
		  unorder[i].style.fontSize = 12+'px';
		}
		for(i=0;i<header4.length;i++) {
		  header4[i].style.fontSize = 12+'px';
		}
		for(i=0;i<header.length;i++) {
		  header[i].style.fontSize = 14+'px';
		}
		for(i=0;i<header2.length;i++) {
		  header2[i].style.fontSize = 16+'px';
		}
		for(i=0;i<anchortxt.length;i++) {
		  anchortxt[i].style.fontSize = 14+'px';
		}
		for(i=0;i<form.length;i++) {
		  form[i].style.fontSize = 12+'px';
		}
	IsFontTextLarge = false;
}	



function SplitMenu() {
	var i = 0;
	jQuery('#s66').children().each(function() {
		i += 1;
	});
	
	var half = Math.round(i/2);
	/*jQuery('#Navigation99').before("<div style='float:left; width:230px;'>");
	jQuery('#Navigation80').after("</div>");
	jQuery("#s66").children(0).prepend("<div style='float:left; width:230px;'>");
	jQuery("#s66").children(half).append("</div>");//.prepend("<div style='float:left; width:230px;'>");
	jQuery("#s66").children(":last").append("</div>");*/
}
