jQuery.noConflict();

jQuery(function(){

	var hash = location.hash
	hash = hash.substr(1, hash.length);
	
	//FAQS
	if(jQuery("ul.faq").length){
		if(hash){
			jQuery("div.content").hide();
			jQuery("a.accordeon").addClass("off");
			jQuery("a[name='"+hash+"']").toggleClass("off").next().show();
			location.href="#"+hash;
		}
		jQuery("select[name=tema]").change(function(){
			jQuery("div.faq_contents").fadeTo("fast", 0, function(){
				jQuery(this).load(jQuery("select[name=tema]").val() + " div.faq_contents", function(){
					jQuery("div.content").hide();
					jQuery("a.accordeon").addClass("off");
					jQuery("div.faq_contents").fadeTo("fast", 1);
				});
			});
		});
	}
	
	jQuery('input.imprimir').click(function(){
	    jQuery('ul.table li .accordeon').toggleClass('off');
	    jQuery('ul.table li .content').show();
	    window.print();
	});

	
//	//GLOSSARIO
//	if(jQuery(".alfabeto").length){
//		if(hash){
//			jQuery(".alfabeto a").removeClass("on");
//			jQuery(".alfabeto a."+hash).addClass("on")
//			jQuery(".glossario").load(jQuery(".alfabeto a."+hash).attr("href")+" .glossario")
//		}
//		jQuery(".alfabeto a").click(function(event){
//			event.preventDefault();
//			jQuery(".alfabeto a").removeClass("on");
//			jQuery(this).addClass("on");
//			var url = jQuery(this).attr("href");
//			jQuery(".glossario").fadeTo("fast", 0, function(){
//				jQuery(this).load(url+" .glossario", function(){
//					jQuery(".glossario").fadeTo("fast", 1);
//				});
//			});
//		});
//	}
	
//	//PESQUISA
//	jQuery("form[name='filtro']").submit(function(event){
//		event.preventDefault();
//		jQuery("div.results").load(jQuery(this).attr("action"), function(){
//			jQuery("div.results_container").slideDown(function(){
//				jQuery(this).height(jQuery("div.results").height());
//				jQuery("div.loading").fadeIn().animate({opacity: 1.0}, 1000).fadeOut(function(){
//					jQuery("div.results").css("visibility","visible").hide().fadeIn("fast");
//				});
//			});
//		});
//	});

});
