$(document).ready(function(){
//	var domain = location.href.match(/^https?(:\/\/[a-zA-Z0-9.]+)\//i)[1];
//	$('a[href^=http]').not('[href*="'+domain+'"]').attr('target','_blank');
	$('a[href^=http]').not('[href*="'+location.hostname+'"]').attr('target','_blank');
	
/* Link target blank */
	$('a.external').each(function(){
		$(this).attr("target","_blank");
	});
});


$(window).scroll(function(){
	PageTopReplace();
});

function PageTopReplace() {
	
	var x = $(window).scrollTop();
	if ( x > 200 ) {
		$("#PageTop").fadeIn();
	} else {
		$("#PageTop").fadeOut();
	}
}

