﻿$(document).ready(function() {

	$('a[rel*=external]').click( function() {
		window.open(this.href);
		return false;
	});
	
	
	$("#slide_content").hide();				// hide main body content then
	$("#slide_content").slideDown(1500);	// slide down on page load

	$("a").not('a[rel*=external],a[class=email]').click(function (ev) {
		ev.preventDefault();				// disable std hyperlink behaviour
		$("#slide_content").slideUp(1500);	// slide up on click
		var link = this.href;
		var delay = function() { followLink(link); };
		setTimeout(delay, 1600); 		// 100ms longer seconds
		});
			
	$("#restart").easyTooltip();
	$(".pics").easyTooltip();
	$("img").easyTooltip(); 				// modified tooltip script over-rides browser tooltip for img titles
			
	portfolioAnimation()
	slideshow();
				
	$("#restart").click(function () { 
      	slideshow(); 
   	}); 
   		
});



//disables page reload for case where a href="#"
function followLink(l) {
	var thisHref = window.location+"#";
	if (l != thisHref) { window.location = l };
}
