$(function(){
	
	$('a').click(function(){
		if($(this).attr('href')=='#'){
			$(this).css('cursor','default');
			return false
		}
	});

	$('a').filter(function() {
		var theHref = this;
		if (theHref.hostname && theHref.hostname !== location.hostname) {
			$(theHref).attr('target','_blank');
		}
	});
	
	function formatTitle(title, currentArray, currentIndex, currentOpts) {
		return '<div id="fancybox-title-over"><span>' + title + '</span></div>';
	}
	
	$(".fancybox").fancybox({
		'padding'			: 16,
		'margin'			: 0,
		'width'				: 715,
		'height'			: 400,
		'titleShow'			: true,
		'titlePosition'		: 'over',
		'autoScale'			: true,
		'autoDimensions'	: true,
		'scrolling'			: 'no',
		'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'type'				: 'iframe',
		'overlayColor'	 	: '#fff',
		'showCloseButton'	: false,
		'centerOnScroll'	: true,
		'titleFormat'		: formatTitle
	});
	
});

function hideMenu() {
	$('#header').css('margin-top','-50px');
	$('#get-social').fadeOut(0);
}

function showMenu() {
	$('#home-flash').animate({'height': parseInt($(window).height())-150 + "px"}, 1000);
	$('#header').animate({'margin-top':'0'}, 1000, function(){
		$('#get-social').fadeIn(3000);
	});
}
