// Services & About loading page content
$(document).ready(function() {

	$('#content div.wrap').hide(); // Hide all divs
		$('#content div.wrap:first').show(); // Show the first div
		$('#tabs ul li a:first').addClass('active'); // Set the class of the first link to active
		$('#tabs ul li a').click(function(){
		//window.location.hash = $(this).attr('href').substr(0,$(this).attr('href').length-0); //When any link is clicked
		$('#tabs ul li a').removeClass('active'); // Remove active class from all links
		$(this).addClass('active'); //Set clicked link class to active
		var currentTab = $(this).attr('href'); // Set variable currentTab to value of href attribute of clicked link
		$('#content div.wrap').hide(); // Hide all divs
		$(currentTab+"-section").fadeIn('normal'); // Show div with id equal to variable currentTab
		return false;
		});
		
		//Init section on pageload
		var url = window.location.hash;
		var section = url.split('#');
		if(section.length > 1){
			var currentTab = $('#'+section[1]+"-section");
			$('#content div.wrap').hide(); 
			$(currentTab).fadeIn('normal');
			$('#tabs ul li a').removeClass('active');
			$("a[href='#"+section[1]+"']").addClass('active');
		}

});

//$(document).ready(function() {
//		$('div.success').hide();
//		$('#contact-form').submit(function(){
//		$('#content .text-wrap').hide(); // Hide all divs
//		$('div.success').fadeIn('normal');
//		return false;
//		});
//});

$(document).ready(function() {
		$('p.giantpea span').hide();
		$('p.giantpea a').hover(function(){
		$('p.giantpea span').fadeIn('normal')
		}, function(){
		$('p.giantpea span').fadeOut('normal');
		return false;
		});
});
