try{Typekit.load();}catch(e){}

$(document).ready(function() {

   // Match Window Height for #body
   
   $(function(){
	    $('#body').css({'minHeight':(($(window).height()))+'px'});
	
	    $(window).resize(function(){
	          $('#body').css({'minHeight':(($(window).height()))+'px'});
	          
	    });
	});
	
	// Animated Portfolio Images
			
	$("#portfolio li").hover(
	  function () {
	    $("img",this).animate( { left:"100%" }, 300 );
	  },
	  function () {
	    $("img",this).animate( { left:"0%" }, 300 );
	  }
	);
		$("#portfolio1 li").hover(
	  function () {
	    $("img",this).animate( { left:"100%" }, 300 );
	  },
	  function () {
	    $("img",this).animate( { left:"0%" }, 300 );
	  }
	);
	
	// Scroll Anchor Links
	
	var scrollWin = function (selector) {
		$('html, body').animate({
		scrollTop: $(selector).offset().top
		}, 500);
	}
	 
	$("[href^=#]").click(function(e) {
		scrollWin ($(this).attr("href"));
		return false;
	});
	
	// Open External Links In New Window
	
	$("a[href^=http]").each(
		function(){
			if(this.href.indexOf(location.hostname) == -1) { 
			$(this).attr('target', '_blank');
		}
	});
	
 });