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

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

$(function() {

	$("a[rel^='prettyPhoto']").prettyPhoto({
		animation_speed: 'normal', /* fast/slow/normal */
		slideshow: 5000, /* false OR interval time in ms */
		autoplay_slideshow: false, /* true/false */
		opacity: 0.60, /* Value between 0 and 1 */
		show_title: true, /* true/false */
		allow_resize: true, /* Resize the photos bigger than viewport. true/false */
		overlay_gallery: false,
		default_width: 500,
		default_height: 344,
		counter_separator_label: '/', /* The separator for the gallery counter 1 "of" 2 */
		theme: 'dark_square', /* light_rounded / dark_rounded / light_square / dark_square / facebook */
		social_tools: false,
		keyboard_shortcuts: true /* Set to false if you open forms inside prettyPhoto */
	});			

	// 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) - 100
	});

	$('.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+')'
		});

	});

*/

		
});

