$(document).ready(function(){

$('#show-humor').click(function(){
	$(this).removeClass('inativo');
	$('#show-news').addClass('inativo');

	$('#escolha ul:last').show();
	$('#escolha ul:first').hide();
	return false;
});

$('#show-news').click(function(){
	$(this).removeClass('inativo');
	$('#show-humor').addClass('inativo');

	$('#escolha ul:last').hide();
	$('#escolha ul:first').show();
	return false;
});

//Clear input forms

	$('#list_city ').hover(function(){
	$(this).children('ul').fadeIn();
	}, function(){
	$(this).children('ul').fadeOut();
	});

$('#list_city li a').click(function(){

	var current_url = window.location.href;
	var city = $(this).text();

	$.ajax({

	type: "POST",
	url: current_url,
	data: "city="+city,

	//sucess in send information
	success: function(){

	var patt1=/(vitrine\/[0-9-]+)/g;

	if( current_url.match(patt1) ){
	window.location = 'http://www.dicasmulher.com.br/';
	
	}else{
	window.location = current_url;
	}




	}


	})

return false;
});


//Clear input forms
$('#busca_busca').attr({ value: 'Encontrar no site...' }).focus(function(){

    if($(this).val()=='Encontrar no site...'){
	   $(this).val('');
	}

	$(this).css('color','black');

}).blur(function(){
	if($(this).val()==''){
		$(this).val('Encontrar no site...');
	}	
});



//Clear input forms
$('#busca_eshop').attr({ value: 'Procurar produto...' }).focus(function(){
    
	if($(this).val()=='Procurar produto...'){
	   $(this).val('');
	}

	$(this).css('color','black');

}).blur(function(){
	if($(this).val()==''){
		$(this).val('Procurar produto...');
	}	
});




$('.a_false').click(function(){
	return false;
});

//.parents-subNav

$('.parents-subNav').hover(function(){
	$(this).children('ul').css({display:'block', position:'absolute', top:'42px'});
},function(){
	$(this).children('ul').css('display','none');

});

$('.parents-subNav2').hover(function(){
	$(this).children('ul').css({display:'block', position:'absolute', top:'38px'});
},function(){
	$(this).children('ul').css('display','none');

});


$('#desconto tbody tr').hover(function(){
	$(this).css('cursor','pointer');
});

$('#desconto tbody tr').click(function(){
	window.location = $(this).find('td').children('a').attr('href');
	return false;
});


//fix cap to size of newsletter
$('.mail_capcha #recaptcha_response_field').css('width','100px');

$('.mail_capcha .recaptcha_image_cell').siblings().addClass('none');
$('.mail_capcha .recaptcha_input_area').parent().siblings().addClass('none');


});










var RecaptchaOptions = {
		theme : 'clean',
		tabindex : 0,
		lang: 'pt'
};

