// START Initiating
jQuery(document).ready(function(){
    
    /***************************************************
     JQUERY TOGGLE
     ***************************************************/
    $(".toggle-body").hide();
    $(".toggle-head").click(function(){
        var tb = $(this).next(".toggle-body");
        
        if (tb.is(':hidden')) {
            tb.prev('.toggle-head').children('h3').addClass('minus');
            tb.slideDown('slow');
            
        }
        else {
            tb.slideUp(200, function(){
                 tb.prev('.toggle-head').children('h3').removeClass('minus');
            });
        }
    });
	
	
    /***************************************************
     TAB
     ***************************************************/	
			//Default Action
	$(".tab_content").hide(); //Hide all content
	
	$("div.tabs a:first").removeClass("button-link-inactive"); //Activate first tab
	$("div.tabs a:first").addClass("button-link-active").show(); //Activate first tab
	$(".tab_content:first").show(); //Show first tab content
	
	//On Click Event
	$("div.tabs a").click(function() {
		$("div.tabs a").removeClass("button-link-active");
		$("div.tabs a").addClass("button-link-inactive");

		$(this).removeClass("button-link-inactive"); 

		$(this).addClass("button-link-active"); 
		

		$(".tab_content").hide(); //Hide all tab content
		var activeTab = $(this).attr("href"); //Find the rel attribute value to identify the active tab + content
		$(activeTab).fadeIn(); //Fade in the active content
		return false;
	});
    
}

