$(document).ready(function(){
	
	//footer scroll to top event
	$("#toplink").click(function(){

		$('html, body').animate({scrollTop:0}, 'slow');
		return false;
		
	});
	
	//external links
	$("a").each( function(){
	
		if ($(this).attr("rel") == "_blank"){
			
			$(this).attr("target","_blank");
			$(this).addClass("external");
			
		}
	
	});
	
	/*$('.thumbgrid').find('a').hover(
		function(){ $(this).find('.title').slideDown(300); },
		function(){ $(this).find('.title').slideUp(300); }
	);*/
	
	
/*	$("a:not('.external')").click(function(event){
		event.preventDefault();
		linkLocation = this.href;
		$("#main").fadeOut(500, redirectPage);		
	});
	
	function redirectPage() {
		window.location = linkLocation;
	}*/
	
	
	
});

function openwindow(f,winname,w,h,resize) {
	var strTemp="width="+w+",height="+h+",resizable="+resize+",left=0,top=0,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,copyhistory=no";
	var newWindow = window.open(f,winname,strTemp);
	newWindow.focus();
}

