// label form
$(document).ready(function(){
  $(":text").labelify();
  $(":password").labelify();
});

// slide show
$(document).ready(function() {
	$('#coin-slider').coinslider({ width: 960, height: 235, navigation: true, effect: 'random', hoverPause: false, links: true, spw: 12, sph: 8, sDelay: 5, delay: 20000 })
});

// imc
$('#imccalc').submit(function() {
  if($('#peso').val()==""){
    return false;
  } 
  else if ($('#altura').val()==""){
    return false;		  
  } else {
    return true;
  }  
});
    
$('#imccalc').ajaxForm({
	target: '#calculoIMC',
	success:    function() { 
   		 document.getElementById('calculoIMC').style.display = 'block';
		}			
});

/* abas produtos */
$(function() {
	$( "#tabs" ).tabs();
});

	
jQuery(function ($) {
	$('#boxProduto .foto').click(function (e) {
		$('#fotoMostrar').modal();
		return false;
	});
});


/* Togle form de login - esqueci a senha */
    function fechar(){
        document.getElementById('esqueciasenha').style.display = 'none';
        document.getElementById('loginInicio').style.display = 'block';            
    }
    function abrir(){
        document.getElementById('esqueciasenha').style.display = 'block';
        document.getElementById('loginInicio').style.display = 'none';            
    }
    
 
// slide fotos lojas
$.fn.cycle.defaults.timeout = 6000;
	$(document).ready(function() {
$(function() {
    // run the code in the markup!
    $('#s2').cycle({ 
		fx:     'fade', 
		speed:  'fast', 
		timeout: 0, 
		next:   '#next2', 
		prev:   '#prev2',
	    after:   onAfter 
	});
    
});
}); 
 
function onAfter() {
    $('#output').html("<div class='output'> </div>")
        .append(this.alt);
}
