/**
 * FlexibleAccordion - jQuery plugin for intuitively opening accordions and menus
 * http://wwww.joomlation.com
 * Copyright (c) 2009 Laurent BELLOEIL
 * Licensed under GPL license:
 * http://www.gnu.org/licenses/gpl.html
 * * You must not remove or change the copyright above !*
 * * If you make any change to the code, please indicated who tou are, when and where you did, like this :
 * LINE  |	changed on	|	By
 * 00       12/25/2009     nobody
 *
 * Requires jQuery 1.2.1 or higher
 * Version: 0.1.0
 *
 * Usage:
 * jQuery('#myUL').flexAccordion();
 * or
 * jQuery('.oneAccordin').flexAccordion({
 *  speed: 'fast', 			// see jQuery slideDown function for available options
 *  activeitem: 'none', 	// 'none' to close all sliders or specify the index of the slider you want to open (0,1,2...)
 *  showheaders: true, 		// Specify if you want to show a slide header (span)
 *  headerEl: 'span', 		// Specify the element to be the header of each slide
 *  contentEl: 'div,			// Specify the element to be the container of each slide
 *  targetdelimiter: ' ', 	// Specify the digit to separate the target slide index in custom buttons
 * });
 */
jQuery.fn.flexAccordion=function(a){a=jQuery.extend({speed:"fast",activeitem:"none",showheaders:true,headerEl:"span",contentEl:"div",targetdelimiter:" "},a);var c=jQuery(this);var e=c.children("li.accPart");function b(f){jQuery(e).each(function(g){if(f==g){jQuery(this).children(a.contentEl+".accContent").slideDown(a.speed);jQuery(this).addClass("active")}else{jQuery(this).children(a.contentEl+".accContent").slideUp(a.speed);jQuery(this).removeClass("active")}})}function d(){jQuery(c).find(a.contentEl+".accContent").each(function(){jQuery(this).hide()});jQuery(c).children("li.accPart").each(function(){jQuery(this).removeClass("active")})}jQuery(e).each(function(f){var g=jQuery(this).children(a.headerEl+".accHeader");if(a.showheaders){g.click(function(){b(f)})}else{g.hide()}});jQuery(this).find("input[title='next']").click(function(){var f=jQuery(this).attr("name");var g=f.substring(f.lastIndexOf(a.targetdelimiter,f.length)+1);b(g)});if(a.activeitem=="none"){d()}else{b(a.activeitem)}return this};