// JavaScript Document

   
$(document).ready(function(){

	var vAccordianActive = false;
	
	if(typeof(vParent) != "undefined") {
		
		vAccordianActive = '#' + vParent;
	}
	
	
	$('#news_events').accordion({ 
		active: vAccordianActive, 
		header: '.drop_link',
		autoheight: false
	});
	
	if(typeof(vCategory) != "undefined") {
	
		$('#' + vCategory + "_" + vFile + ' a').removeClass('item');
		$('#' + vCategory + "_" + vFile + ' a').addClass('active');
	}
	
	function addMega(){
		
		$(this).addClass("hovering"); 
	} 

	function removeMega(){ 
		
		$(this).removeClass("hovering"); 
	}
	
	var megaConfig = {
         interval: 200,
         sensitivity: 4,
         over: addMega,
         timeout: 200,
         out: removeMega
    };
	
    $('#nav_container .mega').hoverIntent(megaConfig);
	
	$('#print_container a').click(function() {
	
		var content = $('#content_body').html();
		
		var window_attributes='toolbar=0,location=0,directories=0,menubar=0,scrollbars=1,resizable=1,width=830,height=600';
		
		var window_document = window.open('print_friendly.html', 'test', window_attributes);
		
		//window_document.location.pathname = window.location.pathname;
		//window_document.location.href = '.';
		
		///$('printer_content_container', window_document.document).append(content);
		
		return false;
		
	});
	
});