$.fn.slideFadeOut = function (speed,callback) {
	return this.animate({height: 'hide', opacity: 'hide'},speed,callback);
}
$.fn.slideFadeIn = function (speed,callback) {
	return this.animate({height: 'show', opacity: 'show'},speed,callback);
}

$(document).ready(homeAccord);

$(document).ready(serveAccord);

function homeAccord()
{
	$("#accord a").not(".header").next("div").slideFadeOut("fast");
	
	$("#accord a").click(function() {
		$(this).next("div").siblings("div").slideFadeOut("slow");
		$(this).next("div").slideFadeIn("slow");
	});
}
function flow(item)
{
	$("#"+item).slideFadeIn("slow");
}
function serveAccord()
{
	// Hide all divs bar first
	$("#services-content div:not(#item1)").hide();
	
	$("#service-list a").click(function() {
		//alert($(this).attr("rel"));
		var toShow = $(this).attr("rel");
		$("#services-content div").slideFadeOut("slow");
		setTimeout(function(){flow(toShow);},600);
		
	});
}


