function runCufon(){
	
	Cufon.replace ('a.Level0');
	Cufon.replace ('h1');
}

function initAnimations(){
		if (IELower == false && jQuery('.CP0').size() > 0){
		setAnimations()
	}
}

function hideEmptyWhiteBg(){
// Hides white background divs for IE 7
	jQuery('.DNNEmptyPane').prev().remove();
}

function setBackgroundWith(){

var sOut = ''

	var imgW = 960;
	var imgH = 629;

	var winW = jQuery(window).width();
	var winH = jQuery(window).height();
	
	var iNewW = 960 // The new width

	// If  width is larger
	if (winW > imgW && winH > imgH){ // If the image is smaller then the window
		if (winW / imgW > winH / imgH){ // Least amount of space vertically
			// Set image height
			jQuery('#BodyImg').height(winH); 
			// Get the new width
			iNewW = Math.round(imgW * (winH / imgH)); 
			// Set the width of the wrapper to the new width
			jQuery('#SkinWrap').width(iNewW);
		}
		else // Least amount of space horizontally
		{
			//Set width of image
			jQuery('#BodyImg').width(winW);
			// Get the new width
			iNewW = winW
			// Set the width of the wrapper
			jQuery('#SkinWrap').width(iNewW);
			jQuery('#ContentWrap').css({'margin' : '0 0 20px'})
		}
		// Get margin for content
		var contM = Math.round((iNewW - 960) / 2) - 1
		jQuery('#ContentWrap').css({'margin-left' : contM})
		jQuery('#MenuHorDD > ul').css({'margin-left' : contM})
	}
}


function setAnimations(){
	jQuery(document).ready(function(){
		setOpacity("#MenuHorDD", 0.1, 1500, 2000)
		jQuery("#MenuHorDD").mouseover(function(){
			setOpacity("#MenuHorDD", 1, 300, 0);
		});
		jQuery("#MenuHorDD").mouseleave(function(){
			setOpacity("#MenuHorDD", 0.1, 1000, 0);
		});
		
		setOpacity(".WhiteBg", 0.15, 1500, 5000);
		setOpacity(".Pane", 0.15, 1500, 5000);
		
		jQuery(".Pane").mouseover(function(){
			setOpacity(".WhiteBg", 1, 300, 0);
			setOpacity(".Pane", 1, 300, 0);
		});
		
		jQuery(".Pane").mouseleave(function(){
			setOpacity(".WhiteBg", 0.15, 1000, 3000);
			setOpacity(".Pane", 0.15, 1000, 3000);
		});
	})
}


function setOpacity(id, i, t, d){
setTimeout(function(){jQuery(id).stop().fadeTo(t, i)}, d);
}


