	// initialize some vars
	iconON = '';
	tabOpen = '';
	videoOpen = false;
	
	// turn on an icon
	function turnON(obj) {
		imgsrc = $(obj).attr('src');
		imgsrcON = imgsrc.replace('OFF', 'ON');
		$(obj).attr("src", imgsrcON).addClass('trans');
	}
	
	// turn off icon
	function turnOFF(obj) {
		imgsrc = $(obj).attr('src');
		
		if (imgsrc != curimgsrcON) {
		imgsrcOFF = imgsrc.replace('ON', 'OFF');
		$(obj).attr("src", imgsrcOFF);
		}
	}


$(document).ready(function() {

		$('img[align="right"]').addClass('alignRight');
		$('img[align="left"]').addClass('alignLeft');
		

		// form validation
		if($.fn.validate) {
	    	$("#siteform").validate();
	    }

		// Preload all rollovers
		$('#nav a img').preload({
		    find: 'OFF',
		    replace: 'ON'
		});

		
		// Navigation rollovers
		$("#nav a").hover(
			function(){turnON($(this).children("img"));},//over
			function(){//out
				if (typeof(imgsrc) != 'undefined') {
					turnOFF($(this).children("img"));
				}
			}
		
		);

		thePath = '';
		curimgsrcON = '';
		// Determine the active section button
		if (location.pathname.substring(1)) {
			// get the path
			thePath = location.pathname.substring(1);
			thePath = thePath.match(/^\/?([a-z0-9_\.-]+)/); // only get the first part of the path

			thePath = '/' + thePath[0];
			
			navLink = $('#nav a[href$="' + thePath + '"]');
			imgsrc = $(navLink).children("img").attr("src");
			if (imgsrc) {
			curimgsrcON = imgsrc.replace(/OFF/ig,"ON"); // strip off .gif
			$(navLink).children("img").attr("src", curimgsrcON);
			}
		}


		$('#selectbtn').click(function(){
			$('#dropdown:visible').hide('blind');
			$('#dropdown:hidden').show('blind');
			
			return false;
		});
		$('#select').mouseleave(function(){
			$('#dropdown:visible').hide('blind');
		});
		
		$('#dropdown a').click(function(){
			//$('#dropdown:visible').hide('blind');
			return;
		});







});