var affectedSelectors = ".content p, .content h2, .content h3, .content h4, .content h5, .content table, .formLabel, .content table p.Normal";
var scale = 1.2;

jQuery(document).ready(function(){

jQuery("#navigation > ul").superfish({
		hoverClass:"sfHover",
		pathClass:"overideThisToUse",
		delay:400,
		animation:{width:"show"},
		speed:"normal",
		oldJquery:false,
		disableHI:false,
		autoArrows: true,
		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});
	});


	/* Activate all media */
	jQuery(".media").media();

	/* remove box from links */
	jQuery("a").focus(function(){
		this.blur();
	});
	
	jQuery(".LinkIcon").rollover();

	var toggleCookie = jQuery.cookie('textSize');
	if(toggleCookie=="true"){
		toggleCookie = true;
		changeFontSize(toggleCookie);
		//change image
		jQuery(".font-toggle-img").attr('src', DNN_skinPath + 'images/reducetype.gif');
	} else {
		toggleCookie = false;
	}
	
	jQuery("a.font-toggle").click(function(){
		
		toggleCookie = (toggleCookie) ? false:true;
		
		//change font
		changeFontSize(toggleCookie);
		
		//change image
		img = (toggleCookie) ? 'enlargetype':'reducetype' ;
		jQuery(".font-toggle-img").attr('src', DNN_skinPath + 'images/'+img+'.gif');
		
		//save toggle var as cookie
		jQuery.cookie('textSize',toggleCookie,{path:'/'});
	});
});

function changeFontSize (toggle){
	jQuery(affectedSelectors).each(function(){
		// set the current font size of .mainText as a var called currentSize
		var currentSize = jQuery(this).css('font-size');
		// parse the number value out of the font size value, set as a var called 'num'
		var num = parseFloat(currentSize, 10);
		// make sure current size is 2 digit number, save as var called 'unit'
		var unit = currentSize.slice(-2);
	
		if(toggle){
			num = num / scale;
		} else {
			num = num * scale;
		}
		// jQuery lets us set the font Size value of the mainText div
		jQuery(this).css('font-size', num + unit);
	});
}
var streetcornerslaboblique = {  src: DNN_skinPath + 'streetcornerslaboblique.swf' };
sIFR.activate(streetcornerslaboblique);
sIFR.replace(streetcornerslaboblique, {
  selector: 'h1.homeYel', 
  wmode: 'transparent', 
  src:  DNN_skinPath +  'streetcornerslaboblique.swf', 
  css: [ '.sIFR-root {color:#FEB914;}'  ]
});
var streetcornerslaboblique = {  src: DNN_skinPath + 'streetcornerslaboblique.swf' };
sIFR.activate(streetcornerslaboblique);
sIFR.replace(streetcornerslaboblique, {
  selector: 'h1', 
  wmode: 'transparent', 
  src:  DNN_skinPath +  'streetcornerslaboblique.swf', 
  css: [ '.sIFR-root {color:#ffffff;}'  ]
});

