//Initialize first demo:
ddaccordion.init({
	headerclass: "mypets", //Shared CSS class name of headers group
	contentclass: "thepet", //Shared CSS class name of contents group
	revealtype: "click", //Reveal content when user clicks or onmouseover the header? Valid value: "click", "clickgo", or "mouseover"
	mouseoverdelay: 200, //if revealtype="mouseover", set delay in milliseconds before header expands onMouseover
	collapseprev: true, //Collapse previous content (so only one open at any time)? true/false 
	defaultexpanded: [0], //index of content(s) open by default [index1, index2, etc]. [] denotes no content.
	onemustopen: false, //Specify whether at least one header should be open always (so never all headers closed)
	animatedefault: false, //Should contents open by default be animated into view?
	persiststate: true, //persist state of opened contents within browser session?
	toggleclass: ["", "openpet"], //Two CSS classes to be applied to the header when it's collapsed and expanded, respectively ["class1", "class2"]
	togglehtml: ["none", "", ""], //Additional HTML added to the header when it's collapsed and expanded, respectively  ["position", "html1", "html2"] (see docs)
	animatespeed: "fast", //speed of animation: integer in milliseconds (ie: 200), or keywords "fast", "normal", or "slow"
	oninit:function(expandedindices){ //custom code to run when headers have initalized
		//do nothing
	},
	onopenclose:function(header, index, state, isuseractivated){ //custom code to run whenever a header is opened or closed
		//do nothing
	}
})


////////////////////////////////////////////////////////////////////////////////////////



/* ********************************* drop down menu function ************************ */

$(document).ready(function() {
						   
		 $(".dd_ser").css('z-index','1000');
		 $(".dd_abtus").css('z-index','999');

         $(".li_ser").hover(
				  function () {
					  
					 $(".dd_ser").slideDown("slow");
					
				  },
				  
				  function () {
					 $(".dd_ser").slideUp(1);
				  }
		);
		 
		 
		 $(".li_abc").hover(
				  function () {
					  
					 $(".dd_abtus").slideDown("slow");
					 $(".dd_ser").hide(1);
					 /*$(".li_cont").css('z-index','-1');*/
					 
				  },
				  
				  function () {
					 $(".dd_abtus").slideUp(1);
					 $(".dd_ser").hide(1);
					 /*$(".li_cont").css('z-index','1');*/
					 
					
				  }
		);
		 
		 
	///////////////////////////// tabs functions //////////////////////////////
	
	//Default Action
	$(".tab_content").hide(); //Hide all content
	$("ul.tabs li:first").addClass("active").show(); //Activate first tab
	$(".tab_content:first").show(); //Show first tab content
	
	//On Click Event
	$("ul.tabs li").click(function() {
		$("ul.tabs li").removeClass("active"); //Remove any "active" class
		$(this).addClass("active"); //Add "active" class to selected tab
		$(".tab_content").hide(); //Hide all tab content
		var activeTab = $(this).find("a").attr("href"); //Find the rel attribute value to identify the active tab + content
		$(activeTab).fadeIn('fast',function(){
			window.scrollTo(0,0);
		}); 
		
		return false;
	});
	
	
	///////////////////////////////////////////////////////////////////////////
	
	$(".tab_first").css('z-index','1000');
	$(".tab_first").click(function(e) {
								   		$(this).css('z-index','1000');
										$(".tab_second").css('z-index','90');
										$(".tab_third").css('z-index','80');
										$(".tab_forth").css('z-index','70');
								   });
	
	$(".tab_second").click(function(e) {
								   		$(this).css('z-index','1000');
										$(".tab_first").css('z-index','90');
										$(".tab_third").css('z-index','80');
										$(".tab_forth").css('z-index','70');
								   });
	
	$(".tab_third").click(function(e) {
		
								   		$(this).css('z-index','1000');
								   		$(".tab_first").css('z-index','60');
										$(".tab_second").css('z-index','80');
										$(".tab_forth").css('z-index','70');
								   });
	
	$(".tab_forth").click(function(e) {
								   		$(this).css('z-index','1000');
								   		$(".tab_first").css('z-index','90');
										$(".tab_second").css('z-index','80');
										$(".tab_third").css('z-index','70');
								   });
	///////////////////////////////////////////////////////////////////////////

		
});





/* ************************************************************************************/
