$(document).ready(function() {
	$("#nav-main").tabs("#content > div", {
		effect: 'fade',
        fadeOutSpeed: "slow", 
        rotate: true
	});
	
	$("#header-gallery").scrollable({
		size: 1,
		speed: 700
	}).mousewheel().find("a").overlay({
		target: '#gallery',
		expose: '#111',
		closeOnClick: true,
	}).gallery({
		disabledClass: 'inactive'
	});
	
	$("#illustrations .scrollable").scrollable({
		size: 5,
		speed: 700
	}).mousewheel().find("a").overlay({
		target: '#gallery',
		expose: '#111',
		closeOnClick: true,
	}).gallery({
		disabledClass: 'inactive'
	});
	
	$("#personal .scrollable").scrollable({
		size: 5,
		speed: 700
	}).mousewheel().find("a").overlay({
		target: '#gallery',
		expose: '#111',
		closeOnClick: true,
	}).gallery({
		disabledClass: 'inactive'
	});

	// $('.browse').hide();
	// $('.content-gallery').each(function(){
	// 	$(this).hover(function(){
	// 		$(this).find('.browse').fadeIn();
	// 	}, function(){
	// 		$(this).find('.browse').fadeOut();
	// 	});
	// });
	
	//open links in new window  
	$('a.external').attr("title","This link will open in a new window").click(function(e){
		window.open(this.href);
		e.preventDefault();
	});
});


