// JavaScript Document

// For the contact sidebar

$(document).ready(function(){

	//Hide (Collapse) the toggle containers on load
	$(".sidebar_container").show();

	//Switch the "Open" and "Close" state per click
	$("h2.sidebar1_trigger").toggle(function(){
		$(this).addClass("active");
		}, function () {
		$(this).removeClass("active");
	});

	//Slide up and down on click
	$("h2.sidebar1_trigger").click(function(){
		$(this).next(".sidebar_container").slideToggle("slow");
	});

});

// For the services sidebar

$(document).ready(function(){

	//Hide (Collapse) the toggle containers on load
	$(".sidebar_container").show();

	//Switch the "Open" and "Close" state per click
	$("h2.sidebar2_trigger").toggle(function(){
		$(this).addClass("active");
		}, function () {
		$(this).removeClass("active");
	});

	//Slide up and down on click
	$("h2.sidebar2_trigger").click(function(){
		$(this).next(".sidebar_container").slideToggle("slow");
	});

});

// For the respect and friends sidebar

$(document).ready(function(){

	//Hide (Collapse) the toggle containers on load
	$(".sidebar_container_hidden").hide();

	//Switch the "Open" and "Close" state per click
	$("h2.sidebar3_trigger").toggle(function(){
		$(this).addClass("active");
		}, function () {
		$(this).removeClass("active");
	});

	//Slide up and down on click
	$("h2.sidebar3_trigger").click(function(){
		$(this).next(".sidebar_container_hidden").slideToggle("slow");
	});

});

// For the about sidebar

$(document).ready(function(){

	//Hide (Collapse) the toggle containers on load
	$(".sidebar_container").show();

	//Switch the "Open" and "Close" state per click
	$("h2.sidebar4_trigger").toggle(function(){
		$(this).addClass("active");
		}, function () {
		$(this).removeClass("active");
	});

	//Slide up and down on click
	$("h2.sidebar4_trigger").click(function(){
		$(this).next(".sidebar_container").slideToggle("slow");
	});

});

// For the featured work bar

$(document).ready(function(){

	//Hide (Collapse) the toggle containers on load
	$(".featured_container").show();

	//Switch the "Open" and "Close" state per click
	$("h2.featured_trigger").toggle(function(){
		$(this).addClass("active");
		}, function () {
		$(this).removeClass("active");
	});

	//Slide up and down on click
	$("h2.featured_trigger").click(function(){
		$(this).next(".featured_container").slideToggle("slow");
	});

});



