// JavaScript document
// Common functions

// Toggle
$(document).ready(function(){

 $('.toggle-hidden').hide(); // Give an element a class of toggle-hidden and it will be hidden

	$(".toggle").click(function(){ // Give a link or input the class of toggle and it will have show/hide functionality
	  $(".toggle-hidden").toggle(); // This is the element that it will show/hide. If the element is already hidden it will show it. If the element is not hidden it will hide it.
	  $(".toggle-show").toggleClass("toggle-hide"); // gives a p or li a plus/minus symbol that toggles.
	});

});

// JQuery UI Tabs 
$(function() {
var $tabs = $('#tabs').tabs(); // first tab selected

  $('#link-first-tab').click(function() { // bind click event to link
		  $tabs.tabs('select', 0); // switch to first tab
		  return false;
  });
  
  $('#link-second-tab').click(function() { // bind click event to link
		  $tabs.tabs('select', 1); // switch to second tab
		  return false;
  });
  
  $('#link-third-tab').click(function() { // bind click event to link
		  $tabs.tabs('select', 2); // switch to third tab
		  return false;
  });
  
  $('#link-forth-tab').click(function() { // bind click event to link
		  $tabs.tabs('select', 3); // switch to forth tab
		  return false;
  });

  $('#link-fifth-tab').click(function() { // bind click event to link
		  $tabs.tabs('select', 4); // switch to forth tab
		  return false;
  });

});

<!-- Hook up the FlexSlider -->
$(window).load(function() {
	$('.flexslider').flexslider();
});

