var $j = jQuery.noConflict();
$j("document").ready(function(){





	try
	{
		//	hash to tag based on 'id' attribute (creates scrolling animation)
		
		$j('[href^=#]').click(function (event) {
			if($j(this).attr('href').slice(1))
			{
				event.preventDefault();
				$j('html,body').animate({scrollTop: $j('[id=' + this.hash.slice(1) +']').offset().top - 5}, 750);
			}
		});
		
		
		
		// video popup
		
		$j('[rel=video]').click(function(event){
			event.preventDefault();
			window.open($j(this).attr('href'), '', 'height=400,width=640');
		});
	}
	catch(e)
	{
		// Just in case
	}





});
