$(function(){

$(document).ready(function(){
  	$('#publicidade').cycle({
		fx: 'fade',
		speed:  1500 ,
		next:   '#prox',
		prev:   '#ant'
	});
});

   /* PESQUISA DE FILMES */
   $('#txtBusca').focus(function() {
      if ($(this).val()=='Pesquisar Filmes') { $(this).val(''); }
   }).blur(function() {
      if ($(this).val()=='') { $(this).val('Pesquisar Filmes'); }
   });
   $('#btnBusca').click(function() {
      var urlServ     =  $('#urlServ').val();
      var strPesq     =  $('#txtBusca').val();
      window.location =  urlServ + '/pesquisa/' + strPesq;
   });
   /* ABRE E FECHA CONTAINER LOGIN */
   $('#btnShowLogin').click(function() {
      $('#luz, #ctnLogar').fadeIn('slow');
   });
   $('#btnShowLogin').click(function() {
      $('#luz, #ctnLogar').fadeIn('slow');
   });
   $('.btnS').click(function() {
      $('#luz, #ctnLogar, #statusLogar').fadeOut('fast');
   });
   $('#luz').click(function() {
      $('#luz, #ctnLogar, #statusLogar').fadeOut('fast');
   });
   /* LIMPA CAMPO USER E PSWD */
   $('input[name=user]').focus(function() {
      if ($(this).val()=='Usuário') { $(this).attr('value', ''); }
   }).blur(function() {
      if ($(this).val().length==0) { $(this).attr('value', 'Usuário'); }
   });
   $('input[name=pswd]').focus(function() {
      if ($(this).val()=='suasenh') { $(this).attr('value', ''); }
   }).blur(function() {
      if ($(this).val().length==0) { $(this).attr('value', 'suasenh'); }
   });
   /* LEMBRAR SENHA */
   $('input[name=myEmail]').focus(function() {
      if ($(this).val()=='seu@email.com') { $(this).attr('value', ''); }
   }).blur(function() {
      if ($(this).val().length==0) { $(this).attr('value', 'seu@email.com'); }
   });
   $('#showRecPass').click(function() {
      $('#ctnFormLogar').slideUp('fast');
      $('#ctnFormRec').slideDown('fast');
      $('.sTitle').html('Digite seu email para receber sua senha!');
   });
   $('#showEnterPanel').click(function() {
      $('#ctnFormRec').slideUp('fast');
      $('#ctnFormLogar').slideDown('fast');
      $('.sTitle').html('Entre com seu usu&aacute;rio e senha.');
   });
});

