
$(function(){

  $.mask.masks.string = {mask:'@',type:'repeat'}
  $.mask.masks.numeric = {mask:'9',type:'repeat'}
  $.mask.masks.data    = {mask: '39/19/2999'}
  $.mask.masks.ddd     = {mask: '99'}
  $.mask.masks.fone    = {mask: '(99) 9999-9999'}
  $.mask.masks.cep     = {mask: '99999-999'}
  $.mask.masks.cpf     = {mask: '999.999.999-99'}
  $.mask.masks.money   = {mask : '99,999.999.999.999',type : 'reverse',defaultValue : '+000'}
  $('input:text').setMask();

  /* ##### Validação de formulários padrão 25/11/2010 - Marcel ##### */
  $(".formRequired").submit(function() {
    var check = true;
    $("form .required").each(function() {
      if(!$(this).val() || $(this).val() == 0) {
        alert("Preencha o campo: " + $(this).prev("label").text().replace(":",""));
        $(this).focus();
        check = false;
        return false;
      }
    });
    if(!check) {return false;}

    //alert("Formulario enviado com sucesso!");

    return true;
  });

  		$(function(){
		  $("form textarea, form input:text").each(function(){  
				
			  if($(this).val() == $(this).attr("title") || !$(this).val()) {
				 $(this).css("color","#cb0000");
			  }
			  if(!$(this).val() || $(this).val() == 0) {
				$(this).val($(this).attr("title"));
			  }

			$(this).bind("focus",function(){
				if($(this).val() == $(this).attr("title")) {
					$(this).val('');
	      			 $(this).css("color","#000");	
				}
			});
			$(this).bind("blur",function(){
				if(!$(this).val() || $(this).val() == $(this).attr("title")) {
				 $(this).css("color","#cb0000");	
					$(this).val($(this).attr("title"));
				}
			});
		  });

		});

		$(".cycle").cycle({
			fx: 'fade', // choose your transition type, ex: fade, scrollUp, shuffle, etc...
			timeout: 1000
		});
  
});

hs.graphicsDir = '/images/highslide/graphics/';
hs.align = 'center';
hs.transitions = ['expand', 'crossfade'];
hs.outlineType = 'rounded-white';
hs.fadeInOut = true;
hs.dimmingOpacity = 0.75;
hs.useBox = true;
hs.width = 800;
hs.height = 600;
hs.addSlideshow({
  //slideshowGroup: 'group1',
  interval: 5000,
  repeat: false,
  useControls: true,
  fixedControls: 'fit',
  overlayOptions: {
    opacity: 1,
    position: 'bottom center',
    hideOnMouseOut: true
  }
});


