$(document).ready(function() {
	
	var easingImage = 'easeOutBack';
	var easingFade = 'easeOutBack';
	var easingShadow = 'easeOutExpo';
	var easingLabel = 'easeOutSine';

$('#full-portfolio a').hover(function(){
	$(this).stop().animate({
			'opacity': 1
		}, 2000, easingFade);
	
}, function(){
	$(this).stop().animate({
			'opacity': 0
		}, 1500, easingFade);
});
	
$('#portfolio-categories li').hover(function(){
	$(this).stop().animate({'width': '178px'}, 600, easingImage);
	$(this).find("span.p-nav-hover").stop().animate({
			'opacity': 1
		}, 1500, easingFade);

	/*$(this).find("span.p-nav-hover").show();*/
	}, function() {
	$(this).stop().animate({'width': '157px'}, 500, easingImage);
	$(this).find("span.p-nav-hover").stop().animate({
			'opacity': 0
		}, 700, easingFade);
	/*$(this).find("span.p-nav-hover").hide();	*/
	}
);

//portfolio details tabs

$('#tab1').hover(function(){
	if($('#tab1').hasClass('current')){}
	else {
	$(this).stop().animate({'bottom': '6px'}, 600, easingImage);
	$(this).find("span#tab-hover").stop().animate({
			'opacity': 1
		}, 200, easingFade);

	/*$(this).find("span.p-nav-hover").show();*/
	}
}, function() {
	$(this).stop().animate({'bottom': '1px'}, 500, easingImage);
	$(this).find("span#tab-hover").stop().animate({
			'opacity': 0
		}, 200, easingFade);
	/*$(this).find("span.p-nav-hover").hide();	*/
	}
	
);

$('#tab2').hover(function(){
	if($('#tab2').hasClass('current')){}
	else {
	$(this).stop().animate({'bottom': '6px'}, 600, easingImage);
	$(this).find("span#tab-hover").stop().animate({
			'opacity': 1
		}, 200, easingFade);
	}
}, function() {
	$(this).stop().animate({'bottom': '1px'}, 500, easingImage);
	$(this).find("span#tab-hover").stop().animate({
			'opacity': 0
		}, 200, easingFade);
	}
);

$('#tab3').hover(function(){
	if($('#tab3').hasClass('current')){}
	else {
	$(this).stop().animate({'bottom': '6px'}, 600, easingImage);
	$(this).find("span#tab-hover").stop().animate({
			'opacity': 1
		}, 200, easingFade);
	}
}, function() {
	$(this).stop().animate({'bottom': '1px'}, 500, easingImage);
	$(this).find("span#tab-hover").stop().animate({
			'opacity': 0
		}, 200, easingFade);
	}
);

$('#tab4').hover(function(){
	if($('#tab4').hasClass('current')){}
	else {
	$(this).stop().animate({'bottom': '6px'}, 600, easingImage);
	$(this).find("span#tab-hover").stop().animate({
			'opacity': 1
		}, 200, easingFade);
	}
}, function() {
	$(this).stop().animate({'bottom': '1px'}, 500, easingImage);
	$(this).find("span#tab-hover").stop().animate({
			'opacity': 0
		}, 200, easingFade);
	}
);

$('#tab1').click(function(){
	$('#tab2').find("span#tab-active").stop().animate({'opacity': 0}, 200, easingFade);
	$('#tab3').find("span#tab-active").stop().animate({'opacity': 0}, 200, easingFade);
	$('#tab4').find("span#tab-active").stop().animate({'opacity': 0}, 200, easingFade);
	$(this).stop().animate({'bottom:': '6px'}, 300, easingImage);
	$(this).find("span#tab-active").stop().animate({
			'opacity': 1
		}, 200, easingFade);
});

$('#tab2').click(function(){
	$('#tab1').find("span#tab-active").stop().animate({'opacity': 0}, 200, easingFade);
	$('#tab3').find("span#tab-active").stop().animate({'opacity': 0}, 200, easingFade);
	$('#tab4').find("span#tab-active").stop().animate({'opacity': 0}, 200, easingFade);
	$(this).stop().animate({'bottom:': '6px'}, 300, easingImage);
	$(this).find("span#tab-active").stop().animate({
			'opacity': 1
		}, 200, easingFade);
});

$('#tab3').click(function(){
	$('#tab1').find("span#tab-active").stop().animate({'opacity': 0}, 200, easingFade);
	$('#tab2').find("span#tab-active").stop().animate({'opacity': 0}, 200, easingFade);
	$('#tab4').find("span#tab-active").stop().animate({'opacity': 0}, 200, easingFade);
	$(this).stop().animate({'bottom:': '6px'}, 300, easingImage);
	$(this).find("span#tab-active").stop().animate({
			'opacity': 1
		}, 200, easingFade);
});

$('#tab4').click(function(){
	$('#tab1').find("span#tab-active").stop().animate({'opacity': 0}, 200, easingFade);
	$('#tab2').find("span#tab-active").stop().animate({'opacity': 0}, 200, easingFade);
	$('#tab3').find("span#tab-active").stop().animate({'opacity': 0}, 200, easingFade);
	$(this).stop().animate({'bottom:': '6px'}, 300, easingImage);
	$(this).find("span#tab-active").stop().animate({
			'opacity': 1
		}, 200, easingFade);
});

var titleheight = $('#project-title').height();
$('#details-right .tabs').height(titleheight + 'px');


});
