jQuery(document).ready(function(){
	jQuery("#svc1-link a").addClass("svcActive");
	
	//get anchor tag in url
	//var temp = self.document.location.hash;
	jQuery("#servicesList a.fader").click(function(){

		$clicked = jQuery(this);

		//we "calculate" the id to shown (each button div MUST have a "xx-link" and the target div must have an id "xx" )
		//yet again the reference
		var idToLoad = $clicked.parent().attr("id").split('-');
		var targetId = "#" + idToLoad[0];
		//we search trough the content for the visible div and we fade it out
		jQuery("#svc").find("div:visible").fadeOut("fast", function(){
			//once the fade out is completed, we start to fade in the right div
			jQuery(targetId + " .svcTitle").fadeIn("fast");
			jQuery(this).parent().find(targetId).fadeIn("slow");
			
		})

		jQuery(".svcActive").removeClass("svcActive");
		$clicked.addClass("svcActive");
	});

});