function customer_pictures()
{
	$('tr.project_pic5').hide();	
	$('tr.project_pic6').hide();	
	$('tr.project_pic7').hide();	
	$('tr.project_pic8').hide();	
	
	var count = 5;
	$('a.show').click (
		function() {
			if (count <= 8)
			{
				$('tr.project_pic' + count).show();
				count++;
			}
			
			if (count == 9)
			{
				$('#show_lnk').hide();
			}
			return false;
		});
}

function current_category()
{
	var title = $("h1").attr("title");
	if (title) {
		//Open current category
		title = '#' + title;
		$(title).next("div.menu_body").show();
	}
}

$(document).ready(function() {
	current_category();
	$("a.menu_head").toggle(function(e)
	{
		e.preventDefault();
		$(".menu_head").removeClass("active");
		$(this).addClass("active").next("div.menu_body").slideToggle(300).siblings("div.menu_body").slideUp("slow");
	}, function(e) {
		e.preventDefault();
		$(this).removeClass("active");
		$(this).next("div.menu_body").slideToggle(300).siblings("div.menu_body").slideUp("slow");
	});
	
	
	//Customer Project Image Input
	customer_pictures();
		
	//Apply lightbox to  images	
	$('#leftFloat a.img').lightBox();
	$('#beforeImages a.img').lightBox();
	$('#afterImages a.img').lightBox();

    $('#searchName').example('Search By Name');
    $('#opt_email').example('Email Address');
});