$(document).ready(function() {
	// find all links that begin with "http://"
    $('a[href^="http://"]').filter(function(){ 
		return this.hostname && this.hostname !== location.hostname; 
	})
	.addClass("external")
	.attr( 'title', 'Link will open in new window')
	.click( function() {
			window.open(this.href);
			return false;
	});
	
	$('.content h2').css({ marginLeft: -500 });
	$('.content p, .content h3').css({ marginLeft: -900 });
	$('.content ul, .gallery-photos').css({ marginLeft: -1300 });

	$('.content').css({
		width: 0
	})
	.animate({
		width: 470
	}, 
	1000,
	'easeOutQuart',

	function(){
		$('.content h2, .content p, .content ul, .gallery-photos, .content h3').animate({
			marginLeft: 40
		},
		1200,
		'easeOutBack'
		)
	}
	);
	
	$('.gallery-photos').innerfade({
		speed: 1000,
		timeout: 4000,
		type: 'random',
		containerheight: '263px'
	});
	
	$('#tabs').tabs({fx:{opacity: 'toggle'}},{selected: -1});
	
	$('.navigation a, #tabs a').not('.navigation a.active').hover(
		function(){
			$(this).animate({ marginLeft: 5},'fast')
		},
		function(){
			$(this).animate({ marginLeft: 0},'fast')
		}
	);
});