$(document).ready(function(){
    $('.Slide').cycle({
        fx:'scrollHorz',
        sync: true ,
        speed:'500',
        prev:   '#prev', 
        next:   '#next', 
        timeout:'6000'
    });
    $('.Apagar').click(function(){
        if(this.value == this.defaultValue){
            this.value = '';
        }
    });
    $('.Apagar').blur(function(){
        if (this.value == ''){
            this.value = this.defaultValue;
        }
    });
    $('.Tel').mask('(99) 9999-9999');
    $('.Placa').mask('aaa-9999');
    $('.Data').mask('99/99/9999');
    $('.Hora').mask('99:99');
    $("#arquivo").change(function() {
        $(this).prev().html($(this).val());
    });
    $('.SubMenu li a').hover(function(){
        $(this).parent().css({'background-image':'url("img/icon8.png")'});
        $(this).css({'color':'#741d27'});
    }, function(){
        if($(this).parent().attr('class') != 'Atual'){
            $(this).parent().css({'background-image':'url("img/icon7.png")'});
            $(this).css({'color':'#4a4f54'});
        }
    })
    $('.ListagemVeiculos p').hover(function(){
        $(this).css({'background':'white'});
        $(this).css({'color':'#741d27'});
    }, function(){
        $(this).css({'background':'#e3e4e4'});
        $(this).css({'color':'#4a4f54'});
    })
    $('.ListagemVeiculos img').hover(function(){
        $(this).parent().parent().find('p').css({'background':'white'});
        $(this).parent().parent().find('p').css({'color':'#741d27'});
    }, function(){
        $(this).parent().parent().find('p').css({'background':'#e3e4e4'});
        $(this).parent().parent().find('p').css({'color':'#4a4f54'});
    });
    
    $("a.group").fancybox({
        'transitionIn'	:	'elastic',
        'transitionOut'	:	'elastic',
        'speedIn'		:	400, 
        'speedOut'		:	200, 
        'overlayShow'	:	false,
        'hideOnContentClick': true
    });
    
});


