﻿jQuery.noConflict(); 

jQuery(function() {
	jQuery("#productInfoBox").tabs({ fx: { opacity: 'toggle', duration: 'slow'}});
	jQuery("#home_offer_box").tabs({ fx: { opacity: 'toggle', duration: 'slow' }}).tabs('rotate', 5000);
	jQuery("#home_destacados_box").tabs({ fx: { opacity: 'toggle', duration: 'slow'}});
	
	// ocultar preloader
	//jQuery("#preloader").hide();
	/*
	jQuery("#tab-todos").click(function() { 
		loadTab("/tab-todos.php"); 
	});
	*/
	// automatically load tab1 on start . probado en code/local SIN ACCESO,
	// app/design/frontend/default/bara/template/destacados/tab-todos.php SIN ACCESO
	//loadTab("tab-todos.php"); 
	/*
	jQuery("#tab-temporario").click(function() 
	{ 
		loadTab("tab-temporario.php");
	});
 
	jQuery("#tab-tradicional").click(function() 
	{ 
		loadTab("tab-tradicional.php"); 
	});
	*/
	
	//jQuery("#accordion").accordion();
	
	
/*
        jQuery('div.acordeon> div').hide();  
        jQuery('div.acordeon> h3').click(function() {
          $(this).next('div').slideToggle('fast')
          .siblings('div:visible').slideUp('fast');
        });
*/



	
});

jQuery(function() {
		//alert('hello');
		jQuery("#accordion").accordion();
});

/* Mostrar amenities */
jQuery(document).ready(function(){
jQuery('a.amenitiesLink').click(function() {
		$(this).next().toggle('slow');
		return false;
	}).next().hide();
});

function loadTab(pageUrl) 
{ 
    jQuery.ajax( 
    { 
        url: pageUrl, 
        cache: false,
		dataType: "html",
        success: function(html){ 
            jQuery("#tabcontent").empty().append(html);
			jQuery("#preloader").hide();
        } 
    });
} 

// FAQS
jQuery(document).ready(function(){
	jQuery('.faqsBox .faqsQuestion').click(function() {
		jQuery(this).toggleClass( 'faqsQuestionMinimize' );
		jQuery(this).next().toggle('slow');
		return false;
	}).next().hide();
});

// BLOQUES COLUMNA IZQ
jQuery(document).ready(function(){
	jQuery('.lateralMenu h3').click(function() {
		jQuery(this).toggleClass( 'minimize' );
		jQuery(this).next().toggle('slow');
		return false;
	}).next().hide();
	jQuery('.lateralMenu h3:first').toggleClass( 'minimize' ).next().show();
	jQuery('.blackLateralBox h3:first').toggleClass( 'minimize' ).next().show();
	jQuery('.neighborhood h3').toggleClass( 'minimize' ).next().show();
});


// FORM BUSQUEDA AVANZADA
jQuery(document).ready(function(){
	jQuery('h3.showHide').click(function() {
		jQuery(this).toggleClass( 'showHideMinimize' );
		jQuery(this).next().toggle('slow');
		return false;
	});//.next().hide()
});





