jQuery().ready(function(){
	// first simple accordion with special markup
	jQuery('#faq').accordion({ 
	    header: 'a.title', 
	    active: false, 
	    alwaysOpen: false, 
	    animated: 'easeslide',
	    autoheight: false 
	});
	
	
	jQuery('#faq-page-head').accordion({ 
	    header: 'a.questiontrigger', 
	    active: false, 
	    alwaysOpen: false, 
	    animated: 'easeslide',
	    autoheight: false 
		
	});
	
	 
	jQuery('a#questiontoggle').toggle(
		  function () {
			jQuery(this).text("Hide Questions");
		  },
		  function () {
			jQuery(this).text("Show Questions");
		  }
		);
			
	jQuery('a#questiontoggle').click(function() {
		jQuery('.question').toggle(400);
		return false;
	});
	// bind to change event of select to control first and seconds accordion
	// similar to tab's plugin triggerTab(), without an extra method
	var accordions = jQuery('#faq');
	
	jQuery('#switch select').change(function() {
		accordions.accordion("activate", this.selectedIndex-1 );
	});
	jQuery('#close').click(function() {
		accordions.accordion("activate", -1);
	});
	jQuery('#switch2').change(function() {
		accordions.accordion("activate", this.value);
	});
	jQuery('#enable').click(function() {
		accordions.accordion("enable");
	});
	jQuery('#disable').click(function() {
		accordions.accordion("disable");
	});
	jQuery('#remove').click(function() {
		accordions.accordion("destroy");
		wizardButtons.unbind("click");
	});
	
	
	
	
	var accordionstwo = jQuery('#faq-page-head');
	
	jQuery('#switch select').change(function() {
		accordionstwo.accordion("activate", this.selectedIndex-1 );
	});
	jQuery('#close').click(function() {
		accordionstwo.accordion("activate", -1);
	});
	jQuery('#switch2').change(function() {
		accordionstwo.accordion("activate", this.value);
	});
	jQuery('#enable').click(function() {
		accordionstwo.accordion("enable");
	});
	jQuery('#disable').click(function() {
		accordionstwo.accordion("disable");
	});
	jQuery('#remove').click(function() {
		accordionstwo.accordion("destroy");
		wizardButtons.unbind("click");
	});
	
	
	
	
	
	
});