// JavaScript Document



//THIS IS THE TABS SCRIPT
$(document).ready(function() {
	//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(); //Fade in the active content
		return false;
	});
//THIS IS THE END OF THE TABS SCRIPT





	 
//THIS IS THE ACCORDION SCRIPT
	
//Set default open/close settings
$('.acc_container').hide(); //Hide/close all containers
$('.acc_trigger:first').addClass('active').next().show(); //Add "active" class to first trigger, then show/open the immediate next container

//On Click
$('.acc_trigger').click(function(){
	if( $(this).next().is(':hidden') ) { //If immediate next container is closed...
		$('.acc_trigger').removeClass('active').next().slideUp(); //Remove all .acc_trigger classes and slide up the immediate next container
		$(this).toggleClass('active').next().slideDown(); //Add .acc_trigger class to clicked trigger and slide down the immediate next container
	}
	return false; //Prevent the browser jump to the link anchor
});




//THIS IS THE EXPAND SCRIPT AKA READ MORE SCRIPT
 // override some default options
      $('div.expandable').expander({
        slicePoint:       400,  // default is 100
        expandText:       'Read more...',   // text displayed in a link instead of the hidden part of the element.
		expandPrefix:     null, // text to come before the expand link
        collapseTimer:    null, // re-collapses after 5 seconds; default is 0, so no re-collapsing
		expandEffect:     'fadeIn',
		userCollapseText: 'Collapse text...',  // text to use for the link to re-collapse the text

      });
	  
	  
 // override some default options
      $('div.expandable2').expander({
        slicePoint:       400,  // default is 100
        expandText:       'Read more...',   // text displayed in a link instead of the hidden part of the element.
		expandPrefix:     null, // text to come before the expand link
        collapseTimer:    null, // re-collapses after 5 seconds; default is 0, so no re-collapsing
		expandEffect:     'fadeIn',
		userCollapseText: 'Collapse text...',  // text to use for the link to re-collapse the text

      });
	  
	  
	  
	  
//THIS IS THE TOGGLE SCRIPT

$(document).ready(function(){
	
	$(".toggle_container").hide();

	$("h2.trigger").click(function(){
		$(this).toggleClass("active").next().slideToggle("slow");
	});

});
  
	
//THIS IS THE TOGGLE SCRIPT

	
$(document).ready(function(){

	//Hide (Collapse) the toggle containers on load
	$(".toggle_container").hide(); 

	//Switch the "Open" and "Close" state per click then slide up/down (depending on open/close state)
	$("h4.trigger").click(function(){
		$(this).toggleClass("active").next().slideToggle("slow");
		return false; //Prevent the browser jump to the link anchor
	});

});	

});


