// JavaScript Document

<!--//---------------------------------+
//  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
	var $tab1=0;
	var $tab2=0;
	var $tab3=0;
	var $tab4=0;
	var $tab5=0;
	var $tab6=0;
	var $tab7=0;
	var $tab8=0;
	var $tab9=0;
	var $tab10=0;
	var $tab11=0;
	var $tab12=0;
	var $tab13=0;
	var $tab14=0;


//////////////////////////TAB 1//////////////////////////////////////////
//slides the element with class "menu_body" when paragraph with class "menu_head1" is clicked 
	$("#firstpane div.menu_head1").click(function()
    {
		$tab1=$tab1 + 1; //when tab is click increase it's counter by 1
		$tab2=0; //reset all the other tabs counters
		$tab3=0;
		$tab4=0;
		$tab5=0;
		$tab6=0;
		$tab7=0;
		$tab8=0;
		$tab9=0;
		$tab10=0;
		$tab11=0;
		$tab12=0;
		$tab13=0;
		$tab14=0;		
		
		//change this image to open, and animate body open
		$(this).css({backgroundImage:"http://www.mednet-sites5.net/wps/lakeshorevision.com/wp-content/themes/lakeshorevision/style/images/arrow_02.gif"}).next("div.menu_body").slideToggle(300).siblings("div.menu_body").slideUp("slow");
		
		//change all other siblings back to closed image
       	$(this).siblings("div.menu_tab").css({backgroundImage:"http://www.mednet-sites5.net/wps/lakeshorevision.com/wp-content/themes/lakeshorevision/style/images/arrow_01.gif)"});


		if($tab1==2){ //if the same tab is clicked twice - when the counter hits '2'
		$(this).css({backgroundImage:"http://www.mednet-sites5.net/wps/lakeshorevision.com/wp-content/themes/lakeshorevision/style/images/arrow_01.gif)"}); //switch back to original image
		$tab1=0; //reset counter for this tab
		}; //end if

	}); //end menu_head1 click funtion

	
	
//////////////////////////TAB 2//////////////////////////////////////////
//slides the element with class "menu_body" when paragraph with class "menu_head2" is clicked 
	$("#firstpane div.menu_head2").click(function()
    {
		$tab2=$tab2 + 1; //when tab is click increase it's counter by 1
		$tab1=0; //reset all the other tabs counters
		$tab3=0;
		$tab4=0;
		$tab5=0;
		$tab6=0;
		$tab7=0;
		$tab8=0;
		$tab9=0;
		$tab10=0;
		$tab11=0;
		$tab12=0;
		$tab13=0;
		$tab14=0;
		
		//change this image to open, and animate body open
		$(this).css({backgroundImage:"http://www.mednet-sites5.net/wps/lakeshorevision.com/wp-content/themes/lakeshorevision/style/images/arrow_02.gif"}).next("div.menu_body").slideToggle(300).siblings("div.menu_body").slideUp("slow");
		
		//change all other siblings back to closed image
       	$(this).siblings("div.menu_tab").css({backgroundImage:"http://www.mednet-sites5.net/wps/lakeshorevision.com/wp-content/themes/lakeshorevision/style/images/arrow_01.gif"});


		if($tab2==2){ //if the same tab is clicked twice - when the counter hits '2'
		$(this).css({backgroundImage:"http://www.mednet-sites5.net/wps/lakeshorevision.com/wp-content/themes/lakeshorevision/style/images/arrow_01.gif"}); //switch back to original image
		$tab2=0; //reset counter for this tab
		}; //end if

	}); //end menu_head2 click funtion	
	

//////////////////////////TAB 3//////////////////////////////////////////
//slides the element with class "menu_body" when paragraph with class "menu_head3" is clicked 
	$("#firstpane div.menu_head3").click(function()
    {
		$tab3=$tab3 + 1; //when tab is click increase it's counter by 1
		$tab1=0; //reset all the other tabs counters
		$tab2=0;
		$tab4=0;
		$tab5=0;
		$tab6=0;
		$tab7=0;
		$tab8=0;
		$tab9=0;
		$tab10=0;
		$tab11=0;
		$tab12=0;
		$tab13=0;
		$tab14=0;
		
		//change this image to open, and animate body open
		$(this).css({backgroundImage:"http://www.mednet-sites5.net/wps/lakeshorevision.com/wp-content/themes/lakeshorevision/style/images/arrow_02.gif"}).next("div.menu_body").slideToggle(300).siblings("div.menu_body").slideUp("slow");
		
		//change all other siblings back to closed image
       	$(this).siblings("div.menu_tab").css({backgroundImage:"http://www.mednet-sites5.net/wps/lakeshorevision.com/wp-content/themes/lakeshorevision/style/images/arrow_01.gif"});


		if($tab3==2){ //if the same tab is clicked twice - when the counter hits '2'
		$(this).css({backgroundImage:"http://www.mednet-sites5.net/wps/lakeshorevision.com/wp-content/themes/lakeshorevision/style/images/arrow_01.gif"}); //switch back to original image
		$tab3=0; //reset counter for this tab
		}; //end if

	}); //end menu_head3 click funtion



//////////////////////////TAB 4//////////////////////////////////////////
//slides the element with class "menu_body" when paragraph with class "menu_head2" is clicked 
	$("#firstpane div.menu_head4").click(function()
    {
		$tab4=$tab4 + 1; //when tab is click increase it's counter by 1
		$tab1=0; //reset all the other tabs counters
		$tab2=0;
		$tab3=0;
		$tab5=0;
		$tab6=0;
		$tab7=0;
		$tab8=0;
		$tab9=0;
		$tab10=0;
		$tab11=0;
		$tab12=0;
		$tab13=0;
		$tab14=0;
		
		//change this image to open, and animate body open
		$(this).css({backgroundImage:"url(style/images/arrow_02.gif"}).next("div.menu_body").slideToggle(300).siblings("div.menu_body").slideUp("slow");
		
		//change all other siblings back to closed image
    	$(this).siblings("div.menu_tab").css({backgroundImage:"url(style/images/arrow_01.gif"});


		if($tab4==2){ //if the same tab is clicked twice - when the counter hits '2'
		$(this).css({backgroundImage:"url(style/images/arrow_01.gif"}); //switch back to original image
		$tab4=0; //reset counter for this tab
		}; //end if

	}); //end menu_head4 click funtion


//////////////////////////TAB 5//////////////////////////////////////////
//slides the element with class "menu_body" when paragraph with class "menu_head2" is clicked 
	$("#firstpane div.menu_head5").click(function()
    {
		$tab5=$tab5 + 1; //when tab is click increase it's counter by 1
		$tab1=0; //reset all the other tabs counters
		$tab2=0;
		$tab3=0;
		$tab4=0;
		$tab6=0;
		$tab7=0;
		$tab8=0;
		$tab9=0;
		$tab10=0;
		$tab11=0;
		$tab12=0;
		$tab13=0;
		$tab14=0;
		
		//change this image to open, and animate body open
		$(this).css({backgroundImage:"url(style/images/arrow_02.gif"}).next("div.menu_body").slideToggle(300).siblings("div.menu_body").slideUp("slow");
		
		//change all other siblings back to closed image
    	$(this).siblings("div.menu_tab").css({backgroundImage:"url(style/images/arrow_01.gif"});


		if($tab5==2){ //if the same tab is clicked twice - when the counter hits '2'
		$(this).css({backgroundImage:"url(style/images/arrow_01.gif"}); //switch back to original image
		$tab5=0; //reset counter for this tab
		}; //end if

	}); //end menu_head5 click funtion
	

//////////////////////////TAB 6//////////////////////////////////////////
//slides the element with class "menu_body" when paragraph with class "menu_head2" is clicked 
	$("#firstpane div.menu_head6").click(function()
    {
		$tab6=$tab6 + 1; //when tab is click increase it's counter by 1
		$tab1=0; //reset all the other tabs counters
		$tab2=0;
		$tab3=0;
		$tab4=0;
		$tab5=0;
		$tab7=0;
		$tab8=0;
		$tab9=0;
		$tab10=0;
		$tab11=0;
		$tab12=0;
		$tab13=0;
		$tab14=0;
		
		//change this image to open, and animate body open
		$(this).css({backgroundImage:"url(style/images/arrow_02.gif"}).next("div.menu_body").slideToggle(300).siblings("div.menu_body").slideUp("slow");
		
		//change all other siblings back to closed image
    	$(this).siblings("div.menu_tab").css({backgroundImage:"url(style/images/arrow_01.gif"});


		if($tab6==2){ //if the same tab is clicked twice - when the counter hits '2'
		$(this).css({backgroundImage:"url(style/images/arrow_01.gif"}); //switch back to original image
		$tab6=0; //reset counter for this tab
		}; //end if

	}); //end menu_head6 click funtion
	
	
//////////////////////////TAB 7//////////////////////////////////////////
//slides the element with class "menu_body" when paragraph with class "menu_head2" is clicked 
	$("#firstpane div.menu_head7").click(function()
    {
		$tab7=$tab7 + 1; //when tab is click increase it's counter by 1
		$tab1=0; //reset all the other tabs counters
		$tab2=0;
		$tab3=0;
		$tab4=0;
		$tab5=0;
		$tab6=0;
		$tab8=0;
		$tab9=0;
		$tab10=0;
		$tab11=0;
		$tab12=0;
		$tab13=0;
		$tab14=0;
		
		//change this image to open, and animate body open
		$(this).css({backgroundImage:"url(style/images/arrow_02.gif"}).next("div.menu_body").slideToggle(300).siblings("div.menu_body").slideUp("slow");
		
		//change all other siblings back to closed image
    	$(this).siblings("div.menu_tab").css({backgroundImage:"url(style/images/arrow_01.gif"});


		if($tab7==2){ //if the same tab is clicked twice - when the counter hits '2'
		$(this).css({backgroundImage:"url(style/images/arrow_01.gif"}); //switch back to original image
		$tab7=0; //reset counter for this tab
		}; //end if

	}); //end menu_head7 click funtion	

	
//////////////////////////TAB 8//////////////////////////////////////////
//slides the element with class "menu_body" when paragraph with class "menu_head2" is clicked 
	$("#firstpane div.menu_head8").click(function()
    {
		$tab8=$tab8 + 1; //when tab is click increase it's counter by 1
		$tab1=0; //reset all the other tabs counters
		$tab2=0;
		$tab3=0;
		$tab4=0;
		$tab5=0;
		$tab6=0;
		$tab7=0;
		$tab9=0;
		$tab10=0;
		$tab11=0;
		$tab12=0;
		$tab13=0;
		$tab14=0;
		
		//change this image to open, and animate body open
		$(this).css({backgroundImage:"url(style/images/arrow_02.gif"}).next("div.menu_body").slideToggle(300).siblings("div.menu_body").slideUp("slow");
		
		//change all other siblings back to closed image
    	$(this).siblings("div.menu_tab").css({backgroundImage:"url(style/images/arrow_01.gif"});


		if($tab8==2){ //if the same tab is clicked twice - when the counter hits '2'
		$(this).css({backgroundImage:"url(style/images/arrow_01.gif"}); //switch back to original image
		$tab8=0; //reset counter for this tab
		}; //end if

	}); //end menu_head8 click funtion	
	

//////////////////////////TAB 9//////////////////////////////////////////
//slides the element with class "menu_body" when paragraph with class "menu_head2" is clicked 
	$("#firstpane div.menu_head9").click(function()
    {
		$tab9=$tab9 + 1; //when tab is click increase it's counter by 1
		$tab1=0; //reset all the other tabs counters
		$tab2=0;
		$tab3=0;
		$tab4=0;
		$tab5=0;
		$tab6=0;
		$tab7=0;
		$tab8=0;
		$tab10=0;
		$tab11=0;
		$tab12=0;
		$tab13=0;
		$tab14=0;
		
		//change this image to open, and animate body open
		$(this).css({backgroundImage:"url(style/images/arrow_02.gif"}).next("div.menu_body").slideToggle(300).siblings("div.menu_body").slideUp("slow");
		
		//change all other siblings back to closed image
    	$(this).siblings("div.menu_tab").css({backgroundImage:"url(style/images/arrow_01.gif"});


		if($tab9==2){ //if the same tab is clicked twice - when the counter hits '2'
		$(this).css({backgroundImage:"url(style/images/arrow_01.gif"}); //switch back to original image
		$tab9=0; //reset counter for this tab
		}; //end if

	}); //end menu_head9 click funtion	
	

//////////////////////////TAB 10//////////////////////////////////////////
//slides the element with class "menu_body" when paragraph with class "menu_head2" is clicked 
	$("#firstpane div.menu_head10").click(function()
    {
		$tab10=$tab10 + 1; //when tab is click increase it's counter by 1
		$tab1=0; //reset all the other tabs counters
		$tab2=0;
		$tab3=0;
		$tab4=0;
		$tab5=0;
		$tab6=0;
		$tab7=0;
		$tab8=0;
		$tab9=0;
		$tab11=0;
		$tab12=0;
		$tab13=0;
		$tab14=0;
		
		//change this image to open, and animate body open
		$(this).css({backgroundImage:"url(style/images/arrow_02.gif"}).next("div.menu_body").slideToggle(300).siblings("div.menu_body").slideUp("slow");
		
		//change all other siblings back to closed image
    	$(this).siblings("div.menu_tab").css({backgroundImage:"url(style/images/arrow_01.gif"});


		if($tab10==2){ //if the same tab is clicked twice - when the counter hits '2'
		$(this).css({backgroundImage:"url(style/images/arrow_01.gif"}); //switch back to original image
		$tab10=0; //reset counter for this tab
		}; //end if

	}); //end menu_head10 click funtion	
	
	
//////////////////////////TAB 11//////////////////////////////////////////
//slides the element with class "menu_body" when paragraph with class "menu_head2" is clicked 
	$("#firstpane div.menu_head11").click(function()
    {
		$tab11=$tab11 + 1; //when tab is click increase it's counter by 1
		$tab1=0; //reset all the other tabs counters
		$tab2=0;
		$tab3=0;
		$tab4=0;
		$tab5=0;
		$tab6=0;
		$tab7=0;
		$tab8=0;
		$tab9=0;
		$tab10=0;
		$tab12=0;
		$tab13=0;
		$tab14=0;
		
		//change this image to open, and animate body open
		$(this).css({backgroundImage:"url(style/images/arrow_02.gif"}).next("div.menu_body").slideToggle(300).siblings("div.menu_body").slideUp("slow");
		
		//change all other siblings back to closed image
    	$(this).siblings("div.menu_tab").css({backgroundImage:"url(style/images/arrow_01.gif"});


		if($tab11==2){ //if the same tab is clicked twice - when the counter hits '2'
		$(this).css({backgroundImage:"url(style/images/arrow_01.gif"}); //switch back to original image
		$tab11=0; //reset counter for this tab
		}; //end if

	}); //end menu_head11 click funtion		
	
	
//////////////////////////TAB 12//////////////////////////////////////////
//slides the element with class "menu_body" when paragraph with class "menu_head2" is clicked 
	$("#firstpane div.menu_head12").click(function()
    {
		$tab12=$tab12 + 1; //when tab is click increase it's counter by 1
		$tab1=0; //reset all the other tabs counters
		$tab2=0;
		$tab3=0;
		$tab4=0;
		$tab5=0;
		$tab6=0;
		$tab7=0;
		$tab8=0;
		$tab9=0;
		$tab10=0;
		$tab11=0;
		$tab13=0;
		$tab14=0;
		
		//change this image to open, and animate body open
		$(this).css({backgroundImage:"url(style/images/arrow_02.gif"}).next("div.menu_body").slideToggle(300).siblings("div.menu_body").slideUp("slow");
		
		//change all other siblings back to closed image
    	$(this).siblings("div.menu_tab").css({backgroundImage:"url(style/images/arrow_01.gif"});


		if($tab12==2){ //if the same tab is clicked twice - when the counter hits '2'
		$(this).css({backgroundImage:"url(style/images/arrow_01.gif"}); //switch back to original image
		$tab12=0; //reset counter for this tab
		}; //end if

	}); //end menu_head12 click funtion		
		
		
//////////////////////////TAB 13//////////////////////////////////////////
//slides the element with class "menu_body" when paragraph with class "menu_head2" is clicked 
	$("#firstpane div.menu_head13").click(function()
    {
		$tab13=$tab13 + 1; //when tab is click increase it's counter by 1
		$tab1=0; //reset all the other tabs counters
		$tab2=0;
		$tab3=0;
		$tab4=0;
		$tab5=0;
		$tab6=0;
		$tab7=0;
		$tab8=0;
		$tab9=0;
		$tab10=0;
		$tab11=0;
		$tab12=0;
		$tab14=0;
		
		//change this image to open, and animate body open
		$(this).css({backgroundImage:"url(style/images/arrow_02.gif"}).next("div.menu_body").slideToggle(300).siblings("div.menu_body").slideUp("slow");
		
		//change all other siblings back to closed image
    	$(this).siblings("div.menu_tab").css({backgroundImage:"url(style/images/arrow_01.gif"});


		if($tab13==2){ //if the same tab is clicked twice - when the counter hits '2'
		$(this).css({backgroundImage:"url(style/images/arrow_01.gif"}); //switch back to original image
		$tab13=0; //reset counter for this tab
		}; //end if

	}); //end menu_head13 click funtion				
	
	
//////////////////////////TAB 14//////////////////////////////////////////
//slides the element with class "menu_body" when paragraph with class "menu_head2" is clicked 
	$("#firstpane div.menu_head14").click(function()
    {
		$tab14=$tab14 + 1; //when tab is click increase it's counter by 1
		$tab1=0; //reset all the other tabs counters
		$tab2=0;
		$tab3=0;
		$tab4=0;
		$tab5=0;
		$tab6=0;
		$tab7=0;
		$tab8=0;
		$tab9=0;
		$tab10=0;
		$tab11=0;
		$tab12=0;
		$tab13=0;
		
		//change this image to open, and animate body open
		$(this).css({backgroundImage:"url(style/images/arrow_02.gif"}).next("div.menu_body").slideToggle(300).siblings("div.menu_body").slideUp("slow");
		
		//change all other siblings back to closed image
    	$(this).siblings("div.menu_tab").css({backgroundImage:"url(style/images/arrow_01.gif"});


		if($tab14==2){ //if the same tab is clicked twice - when the counter hits '2'
		$(this).css({backgroundImage:"url(style/images/arrow_01.gif"}); //switch back to original image
		$tab14=0; //reset counter for this tab
		}; //end if

	}); //end menu_head14 click funtion				
		
	
}); //end document.ready
		
		
		
/////////////////////////////////////////////  TESTING TESTING TESTING TESTING ///////////////////////////////

$(document).ready(function()
{
	////set variables for counters
	var $tab1=0;
	var $tab2=0;
	var $tab3=0;


//////////////////////////TAB 1//////////////////////////////////////////
//slides the element with class "menu_body" when paragraph with class "menu_head1" is clicked 
	$("#secondpane div.menu_head1").click(function()
    {
		$tab1=$tab1 + 1; //when tab is click increase it's counter by 1
		$tab2=0; //reset all the other tabs counters
		$tab3=0;	
		
		//change this image to open, and animate body open
		$(this).css({backgroundImage:"url(style/images/arrow_02.gif"}).next("div.menu_body").slideToggle(300).siblings("div.menu_body").slideUp("slow");
		
		//change all other siblings back to closed image
       	$(this).siblings("div.menu_tab").css({backgroundImage:"url(style/images/arrow_01.gif)"});


		if($tab1==2){ //if the same tab is clicked twice - when the counter hits '2'
		$(this).css({backgroundImage:"url(style/images/arrow_01.gif)"}); //switch back to original image
		$tab1=0; //reset counter for this tab
		}; //end if

	}); //end menu_head1 click funtion

	
	
//////////////////////////TAB 2//////////////////////////////////////////
//slides the element with class "menu_body" when paragraph with class "menu_head2" is clicked 
	$("#secondpane div.menu_head2").click(function()
    {
		$tab2=$tab2 + 1; //when tab is click increase it's counter by 1
		$tab1=0; //reset all the other tabs counters
		$tab3=0;
		
		//change this image to open, and animate body open
		$(this).css({backgroundImage:"url(style/images/arrow_02.gif"}).next("div.menu_body").slideToggle(300).siblings("div.menu_body").slideUp("slow");
		
		//change all other siblings back to closed image
       	$(this).siblings("div.menu_tab").css({backgroundImage:"url(style/images/arrow_01.gif"});


		if($tab2==2){ //if the same tab is clicked twice - when the counter hits '2'
		$(this).css({backgroundImage:"url(style/images/arrow_01.gif"}); //switch back to original image
		$tab2=0; //reset counter for this tab
		}; //end if

	}); //end menu_head2 click funtion	
	

//////////////////////////TAB 3//////////////////////////////////////////
//slides the element with class "menu_body" when paragraph with class "menu_head3" is clicked 
	$("#secondpane div.menu_head3").click(function()
    {
		$tab3=$tab3 + 1; //when tab is click increase it's counter by 1
		$tab1=0; //reset all the other tabs counters
		$tab2=0;
		
		//change this image to open, and animate body open
		$(this).css({backgroundImage:"url(style/images/arrow_02.gif"}).next("div.menu_body").slideToggle(300).siblings("div.menu_body").slideUp("slow");
		
		//change all other siblings back to closed image
       	$(this).siblings("div.menu_tab").css({backgroundImage:"url(style/images/arrow_01.gif"});


		if($tab3==2){ //if the same tab is clicked twice - when the counter hits '2'
		$(this).css({backgroundImage:"url(style/images/arrow_01.gif"}); //switch back to original image
		$tab3=0; //reset counter for this tab
		}; //end if

	}); //end menu_head3 click funtion

}); //end document.ready
