//var w3JsHost = (("https:" == document.location.protocol) ? "https://www." : "https://www.");
//document.write(unescape("%3Cspan id='tolvnow'%3E%3C/span%3E%3Cscript defer src='" + w3JsHost +"tolvnow.com/webClient/siteCall.php?key=a684eceee76fc522773286a895bc8436' type='text/javascript'%3E%3C/script%3E"));

// JavaScript Document
$(function() {

    // if the function argument is given to overlay,
    // it is assumed to be the onBeforeLoad event listener
    $("a[rel]").overlay({

        mask: {

            // you might also consider a "transparent" color for the mask
            color: 'black',
                
            // load mask a little faster
            loadSpeed: 'fast',
		
            closeSpeed: 'fast'
        },
        //effect: 'apple',
        fixed: false,
        top: '10%',

        onBeforeLoad: function() {

            // grab wrapper element inside content
            var wrap = this.getOverlay().find(".contentWrap");
            
            // load the page specified in the trigger
            wrap.load(this.getTrigger().attr("href"));
        }

    });
	
    $("#senha_show").focus(function(){
        $(this).css('display','none');
        $('#senha').css('display','block').focus();
    });
	
    $('#email').focus(function(){
        $(this).val('');
    });
	
	$("#esqueci_senha").click(function () {
	   var email = $("#email").val();
       var erro = false;
       
	   var regmail = /^[\w!#$%&amp;'*+\/=?^`{|}~-]+(\.[\w!#$%&amp;'*+\/=?^`{|}~-]+)*@(([\w-]+\.)+[A-Za-z]{2,6}|\[\d{1,3}(\.\d{1,3}){3}\])$/;
	   
	   
	   if (!regmail.test($("#email").val())) {
           erro = true;		   
       }
       
       if(erro){
           alert("ATENÇÃO Informe um e-mail válido");
       }else{
           window.location.href = "http://www.cwaclipping.net/sistema?acao=requestPassword&mail="+email;
       }
   });
	
});

$(function () {
    $('#js-news').ticker({
        speed: 0.15,        
        titleText: ''
    });    
});
