// JavaScript Document

$(document).ready(function(){
// GENERAL STYLES
	$('ul#menu-main-menu li:last').addClass('lastNav');
	$('body.bio #customSidebar li:last').addClass('lastNav');
	$('#footer ul li:last').addClass('lastNav');
	$("#portfolio .page div.portfolioHolder:nth-child(3n)").addClass("noRight");
	$("#portfolio .page div.portfolioHolder:nth-child(3n+1)").addClass("clearLeft");
	$("#portfolioSingle .page div.portfolioHolder:nth-child(3n+2)").addClass("noRight");
	$("#portfolioSingle .page div.portfolioHolder:nth-child(3n+3)").addClass("clearLeft");
	$(".page div.bioHolder:nth-child(3n)").addClass("noRight");
	//$("span.next").val('').css('display','none');
	$("span.next:empty").remove();
	$("span.previous:empty").remove();
	$("div.textwidget p:last").addClass("noBottom");

// SLIDE PANEL
	$("#slidePanel, .content").hide(); //hides the panel and content from the user
 
   $('#contactTab').toggle(function(){ //adding a toggle function to the #tab
      $(this).animate({"width": "395px"}, "fast");
	  $('#slidePanel').animate({"width": "350px"}, "fast");//sliding the #slidePanel to 400px
	  $('.content').fadeIn('fast'); //slides the content into view.  
   },
   function(){ //when the #tab is next cliked
   $('#contactTab').animate({"width": "45px"}, "fast");
   $('#slidePanel').animate({"width": "0px"}, "fast"); //slide the #slidePanel back to a width of 0
   });

 //PORTFOLIO ROLLOVERS
  $(".portfolioHolder .thumbHolder").hover(
   function() {
	   $(this).animate({"margin-top": "-10", "paddingBottom": "10px"}, 300);
	},
	function() {
		$(this).animate({"margin-top": "0", "paddingBottom": "0px"}, "slow");
});
  
  $('#footerContact a').hover(function(){
			$('#contactTab').animate({'width':'70px'}, 'fast');
			$('#slidePanel').css('display','block');
			$('#slidePanel').animate({'paddingRight':'25px'}, 'fast');
		}, function() {
			$('#contactTab').animate({'width':'45px'}, 'fast');
			$('#slidePanel').animate({'paddingRight':'0px'}, 'fast');
			
	});
  $('#footerContact a').click(function(){
		return false;
	});

});
