/*
                              Javascript for
                     SteveHiggs.com - V7 - portfolio.php
--------------------------------------------------------------------------------
*/

function fnGetDomain(url) {
   return url.match(/:\/\/(.[^/]+)/)[1];
}

$(function() {


	// Initalize Shadowbox plugin
	Shadowbox.init({
		'overlayOpacity': 0.80,	
	    handleOversize: "drag",
		'overlayColor': '#000000'
	});

	// Set the resume link div's top margin to be equal to half of the paragraph's height minus half the resume div's height:
	$("#ResumeLink").css({
		'marginTop': ($("#PortfolioIntro").height() /2) - ($("#ResumeLink").height() / 2)
	});

	$('.Project:first').css({
		'border': '0'
	});


/*
	Function to get the Favicon from a site and show it as the icon of a link
	$('.RemoteFavicon').each(function(){
		var remoteURL = $(this).attr('href');
		var remoteDomain = fnGetDomain(remoteURL);

		$(this).css({
			'background-image': 'url(http://www.google.com/s2/favicons?domain='+remoteDomain+')'
		});

	});

*/

		
});
