<!--//---------------------------------+
//  Developed by Roshan Bhattarai 
//  Visit http://roshanbh.com.np for this script and more.
//  This notice MUST stay intact for legal use
//
// The code below has been altered from the original.
// visit Rohan's website to see the original code.
// --------------------------------->

$(document).ready(function()
{
	//set variables for counters
	$welcome=0;
	$faq=0;
	$locations=0;

	
	//slides the element with class "menu_body" when paragraph with class "menu_head_welcome" is clicked 
	$("#firstpane div.menu_head_welcome").click(function()
    {
		$welcome=$welcome + 1;
		$faq=0;
		$locations=0;

		$(this).css({backgroundImage:"url(images/tab-open.jpg)"}).next("div.menu_body").slideToggle(300).siblings("div.menu_body").slideDown("fast");
       	$("#firstpane div.menu_head_faq").css({backgroundImage:"url(images/tab-closed.jpg)"}).next("div.menu_body").slideUp("slow");
		$("#firstpane div.menu_head_locations").css({backgroundImage:"url(images/tab-closed.jpg)"}).next("div.menu_body").slideUp("slow");

		
if($welcome==2){
	$(this).css({backgroundImage:"url(images/tab-closed.jpg)"});
	$welcome=0;
};
	});
	
	
	
		//slides the element with class "menu_body" when paragraph with class "menu_head_faq" is clicked 
	$("#firstpane div.menu_head_faq").click(function()
    {
		$faq=$faq + 1;
		$welcome=0;
		$locations=0;

		$(this).css({backgroundImage:"url(images/tab-open.jpg)"}).next("div.menu_body").slideToggle(300).siblings("div.menu_body").slideDown("fast");
       	$("#firstpane div.menu_head_welcome").css({backgroundImage:"url(images/tab-closed.jpg)"}).next("div.menu_body").slideUp("slow");
		$("#firstpane div.menu_head_locations").css({backgroundImage:"url(images/tab-closed.jpg)"}).next("div.menu_body").slideUp("slow");
       

if($faq==2){
	$(this).css({backgroundImage:"url(images/tab-closed.jpg)"});
	$faq=0;
};
	});
	
	
	
		//slides the element with class "menu_body" when paragraph with class "menu_head_locations" is clicked 
	$("#firstpane div.menu_head_locations").click(function()
    {
		
		$locations=$locations + 1;
		$faq=0;
		$welcome=0;

		$(this).css({backgroundImage:"url(images/tab-open.jpg)"}).next("div.menu_body").slideToggle(300).siblings("div.menu_body").slideDown("fast");
       	$("#firstpane div.menu_head_faq").css({backgroundImage:"url(images/tab-closed.jpg)"}).next("div.menu_body").slideUp("slow");
		$("#firstpane div.menu_head_welcome").css({backgroundImage:"url(images/tab-closed.jpg)"}).next("div.menu_body").slideUp("slow");


if($locations==2){
	$(this).css({backgroundImage:"url(images/tab-closed.jpg)"});
	$locations=0;
};
	});
	
});;
