//windowFade
jQuery('head').append('<style type="text/css">#windowFade{display:block;height:' + jQuery(window).height() + 'px}</style>');
function windowFade(){
	jQuery('#windowFade').each(function(){
		jQuery('#windowFade').fadeOut(400).height(jQuery('body').height());
		jQuery('a').click(function(){
			var url = jQuery(this).attr('href');
			if( this.href.match(location.hostname) && jQuery(this).attr("href").charAt(0) != "#" && !jQuery(this).attr("rel") && !jQuery(this).attr("target") ){
				var LinkURL = jQuery(this).attr("href");
				jQuery('#windowFade').height(jQuery(window).height());
				jQuery('#windowFade').fadeIn(400,function(){
					jQuery('body').css("display", "none");
					location.href = LinkURL;
				});
				return false;
			}
		});
	});
};
window.onload = function() {
	windowFade();
};
window.onunload = function() {
	windowFade();
};
