////////////////////////////
// http://adipalaz.awardspace.com/experiments/jquery/accordion3.html
///////////////////////////
(function($) {
$.fn.orphans = function(){
    var txt = [];
    this.each(function(){$.each(this.childNodes, function() {
        if (this.nodeType == 3 && $.trim(this.nodeValue)) txt.push(this)
    })}); 
    return $(txt);
};
})(jQuery);
////////////////////////////


$(function() {
    $('#desplegable h4.expand').orphans().wrap('<a style="display:block" href="#" title=""></a>');
   
    // demo 1 - div.demo:eq(0) -  Simple slide effect with first section initially expanded
    $('#desplegable div.demo:eq(0)').find('h4.expand').addClass('open').end()
    .find('div.collapse').hide().end()
    .find('h4.expand').click(function() {
        $(this).toggleClass('open')
        .next('div').slideToggle().end()
        return false;
    });
 }); 




$(function() {
    $('#desplegable h4.expand2').orphans().wrap('<a style="display:block" href="#expand/collapse" title=""></a>');
	
	// demo 1 - div.demo:eq(0) -  Simple slide effect with first section initially expanded
    $('#desplegable div.demo:eq(0)').find('h4.expand2').addClass('open2').end()
    .find('h4.expand2').click(function() {
        $(this).toggleClass('open2')
        .next('div').slideToggle().end()
        return false;
    });
	
    

});

$(function() {
    $('#desplegable h4.expand3').orphans().wrap('<a style="display:block" href="#expand/collapse" title=""></a>');
	
	// demo 1 - div.demo:eq(0) -  Simple slide effect with first section initially expanded
    $('#desplegable div.demo:eq(0)').find('h4.expand3').addClass('open3').end()
    .find('h4.expand3').click(function() {
        $(this).toggleClass('open3')
        .next('div').slideToggle().end()
        return false;
    });
	
    

});


// desplegables home


$(function() {
    $('#desplegable2 h4.expand4').orphans().wrap('<a style="display:block" href="#expand/collapse" title=""></a>');
   
    // demo 1 - div.demo:eq(0) -  Simple slide effect with first section initially expanded
    $('#desplegable2 div.demo:eq(0)').find('h4.expand4').addClass('open4').end()
    .find('div.collapse4').hide().end()
    .find('h4.expand4').click(function() {
        $(this).toggleClass('open4')
        .next('div').slideToggle().end()
        return false;
    });
 }); 




$(function() {
    $('#desplegable2 h4.expand5').orphans().wrap('<a style="display:block" href="#expand/collapse" title=""></a>');
	
	// demo 1 - div.demo:eq(0) -  Simple slide effect with first section initially expanded
    $('#desplegable2 div.demo:eq(0)').find('h4.expand5').addClass('open5').end()
    .find('h4.expand5').click(function() {
        $(this).toggleClass('open5')
        .next('div').slideToggle().end()
        return false;
    });
	
    

});

$(function() {
    $('#desplegable2 h4.expand6').orphans().wrap('<a style="display:block" href="#expand/collapse" title=""></a>');
	
	// demo 1 - div.demo:eq(0) -  Simple slide effect with first section initially expanded
    $('#desplegable2 div.demo:eq(0)').find('h4.expand6').addClass('open6').end()
    .find('h4.expand6').click(function() {
        $(this).toggleClass('open6')
        .next('div').slideToggle().end()
        return false;
    });
	
    

});


