$(document).ready(function(){


// Carrusel formulario
$('#grupo_familiar').hide();
	





$('.acc_container').hide();
$('.acc_trigger:first')
	.addClass('active')
	.next()
	.show();

$('.acc_trigger').click(function(){
	if($(this).next().is(':hidden') ) {
		$('.acc_trigger')
			.removeClass('active')
			.next()
			.slideUp();
		$(this).toggleClass('active')
			.next()
			.slideDown();
	}
	return false;
});

});


$(function(){
// desactivar el boton envio al cargar la pagina
$('input#enviar-reserva', this).attr('disabled', 'disabled');
// activar / desactivar el boton de envio
$('input#acepta').click(function(){
var disabled=$('input#enviar-reserva').attr('disabled');
if(disabled) {
$('input#enviar-reserva').attr('disabled', false);
}else{
$('input#enviar-reserva').attr('disabled', 'disabled');
}
});
});



$(function(){


$("select#cantidad").click(function(){
	
	var value = $('#valoroculto').val(); 

	
   $("."+value).css({background: 'url("assets/templates/cinestar/img/bg-precio-select.jpg")', font: 'bold', color: '#000' }); 
   
   
});
});


$(function(){
$("#hora").click(function(){
	
   var value = $('#valoroculto').val();
   $("."+value).css({background: 'none',font: 'normal',color: '#fff'}); 
   
   
});
});





		$(document).ready(function(){	
			$("#slider").easySlider({
				auto: true,
				continuous: true,
				nextId: "slider1next",
				prevId: "slider1prev"
			});
			$("#slider2").easySlider({ 
                                auto: true,
                                continuous: true,
                                pause: 6000,
				numeric: true
			});
		});	





    $(function(){

        $("#pelicula").change(function(event){

            

            var complejo = $("#pelicula").find(':selected').val();
 var value = $('#valoroculto').val();
            $("#horario").load('index.php?id=840&complejo='+complejo);
  
   $("."+value).css({background: 'none',font: 'normal',color: '#fff'}); 
$("select#horario").empty().val();
$("select#hora").empty().val();
$("#valor").empty().val();
$("#inventario").empty().val();
$("#total-echo").empty().val();

        });

   });



    $(function(){

        $("#horario").change(function(event){

            var horario = $("#horario").find(':selected').val();

            $("#hora").load('index.php?id=837&horario='+horario);

            

        });

    });

    $(function(){

        $("#tipoticket").change(function(event){

            var cantidad = $("#cantidad").find(':selected').val();
            var ticket = $("#tipoticket").find(':selected').val();
$("#total").val(cantidad*ticket);


                 

        });

    });


 

    $(function(){

        $("#horario").change(function(event){

            var hora = $("#horario").find(':selected').val();

            $("#hora").load('funciones/select2?hora='+hora);

  

        });

    });

  

    $(function(){

        $("#hora").change(function(event){

            var valor = $("#hora").find(':selected').val();

            $("#valor").load('funciones/select-precio?valor='+valor);



        });

    });

 

    $(function(){

        $("#hora").change(function(event){

            var id = $("#hora").find(':selected').val();

            $("#inventario").load('funciones/select-inventario?id='+id);



        });

    });




