// JavaScript Document
//jQuery code for this page
$(document).ready(function(){
// close the offDiv content sections
//(doing this with js instead of css means if no js, content is all visible)
$('.offDiv > .show-hide').hide();
// show the correct buttons for each div
// they are hidden with css for no-js users
$('.offDiv > .showLink').show();
$('.onDiv > .hideLink').show();
$('a.showAll').show();
$('a.hideAll').show();
// showLink shows the content
$('a.showLink').click(function(){
$(this).siblings('.show-hide').slideToggle('slow');
$(this).parents('.offDiv').removeClass().addClass('onDiv');
$('a.hideAll').show();
$(this).hide();
$(this).siblings('.hideLink').show();
return false;
});
// hideLink hides the content
$('a.hideLink').click(function(){
$(this).siblings('.show-hide').slideToggle('slow');
$(this).parents('.onDiv').removeClass().addClass('offDiv');
$('a.showAll').show();
$(this).hide();
$(this).siblings('.showLink').show();
return false;
});
// show all link
$('a.showAll').click(function(){
$('.show-hide').slideDown('slow');
$('.offDiv').removeClass().addClass('onDiv');
$('a.hideAll').show();
$('a.hideLink').show();
$('a.showLink').hide();
$(this).hide();
return false;
});
// hide all link
$('a.hideAll').click(function(){
$('.show-hide').slideUp('slow');
$('.onDiv').removeClass().addClass('offDiv');
$('a.showLink').show();
$('a.hideLink').hide();
$(this).hide();
$('a.showAll').show();
return false;
});
 // title is clickable, and toggles the content
$(".titN").click( function() { 
						   
   //ini esto funk bien
//   $('.txtCmn >.show-hide').slideToggle('slow');
  // $('.Estilo5 >.masInfoDer').hide();
//   $('.Estilo5 >.masInfoDer').siblings("a").toggle();
//   $('.Estilo5 >.masInfoDer').toggleClass('onDiv');
//fin esto funk bien
//alert($(this));
//  	$(this).next("div").slideToggle('slow');
	//$(this).parent("div").toggleClass('offDiv');
//	$(this).parent("div").toggleClass('onDiv');
	//$(this).siblings("a").toggle();
 } );

$('.offDiv >.titN').click(function(){
$('a.hideAll').show();
});
$('.onDiv >.titN').click(function(){
$('a.showAll').show();
}); 

});
