//	jQuery Compatibility Method
var $j = jQuery.noConflict();





$j("document").ready(function(){




	//	Lightbox
	$j('.lightbox').lightBox({fixedNavigation:true});
	
	
	
	//	form validation (not currently in use)
	$j("form").submit(function (event) {
		
		empty_form = false;
				
		$j("input").each(function()
		{
			if($j(this).val().length == 0)
			{
				empty_form = true;
			}
		});
		
		$j("textarea").each(function()
		{
			if($j(this).val().length == 0)
			{
				empty_form = true;
			}
		});
				
		if(empty_form == true)
		{
			event.preventDefault();
			alert("Please fill out all of the fields.")
		}
	});
	
	
	
	//	external links open in new window
	$j("a.external").click(function (event) {
		event.preventDefault();
		window.open($j(this).attr('href'));
	});
	
	
	//	#anchor to tag based on 'id' attribute (creates scrolling animation)
	$j('a[href*=#]').click(function (event) {
		event.preventDefault();
		if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname)
		{
			var $target = $j(this.hash);
			$target = $target.length && $target || $j('[id=' + this.hash.slice(1) +']');
			if ($target.length)
			{
				var targetOffset = $target.offset().top;
				$j('html,body').animate({scrollTop: targetOffset}, 1000);
				return false;
			}
		}
	});





}); // Ends Ready Function