// JavaScript Document
//$(document).ready(function(){
//			
//	//Hover event for main navigation
//	$('div[class^=nav2]').hover(
//		function() {
//			var $this = $(this);
//			var x = $this.attr("id");
//			$('#'+x+'_Menu' ).show("slow");
//		},
//		function() {
//			var $this = $(this);
//			var x = $this.attr("id");
//			var y = document.getElementById(x+"_Menu")
//			$('#'+x+'_Menu' ).hide("slow");
//		}
//	);
// });
var bar

/*window.onload = init;

function init()
{
			
	var a = document.getElementsByTagName("DIV")
	
	for( i=0; i<a.length;i++ )
	{
		if( a[i].className )
		{
			
			if( a[i].className == 'topnav' )
			{
				a[i].onmouseover = a[i].onfocus = function()
				{
					if(document.getElementById('sub_'+this.id.split('_')[0]))
						//document.getElementById('sub_'+this.id.split('_')[0]).style.display = 'block'
						//bar = document.getElementById('sub_'+this.id.split('_')[0])
						num = this.id.split('_')[0]
						opacity('sub_'+num, 0, 100, 500)
						//var thesub = document.getElementById('sub_'+this.id.split('_')[0])
						//opacity('thesub', 0, 100, 500)
				}
				
				a[i].onmouseout = a[i].onblur = function()
				{
						if( document.getElementById('sub_'+this.id.split('_')[0]))
							//document.getElementById('sub_'+this.id.split('_')[0]).style.display = 'none'
							numtwo = this.id.split('_')[0]
							opacity('sub_'+numtwo, 100, 0, 500)
							//var thesub2 = document.getElementById('sub_'+this.id.split('_')[0])
							//opacity('thesub2', 100, 0, 500)
				}
			}

		}
	}
	
	
	var a = document.getElementsByTagName("A")
		for( i=0;i<a.length;i++ )
		//alert("yes")
		{
			if( a[i].href.indexOf('.pdf') != -1 || a[i].href.indexOf('.PDF') != -1 )
			{

				a[i].style.paddingRight = '18px'
				a[i].style.background = 'url(/images/ico_pdf.gif) top right no-repeat'
			}
			
			if( a[i].href.indexOf('mailto:') != -1 || a[i].href.indexOf('MAILTO:') != -1 )
			{
				a[i].style.paddingRight = '18px'
				a[i].style.background = 'url(/images/ico_mail.gif) top right no-repeat'
			}
			
			if( a[i].href.indexOf('maps.google.com') != -1 || a[i].href.indexOf('MAPS.GOOGLE.COM') != -1 )
			{
				a[i].style.paddingRight = '18px'
				a[i].style.background = 'url(/images/ico_maps.gif) top right no-repeat'
			}
		}
	
}*/

function imagesLoaded()
{
	var loading = document.getElementById('loading')
	var page = document.getElementById('background')
	 
	 loading.style.display = 'none';
	 page.style.display = 'block';
}

//JQuery for side navigation
$(document).ready(function(){
			
	//Hover event for main navigation
	$('div[class^=nav2]').hover(
		function() {
			var $this = $(this);
			var x = $this.attr("id").split("_");
			navOut(x[0]);
		},
		function() {
			removeNav();
		}
	);
	
 });
