$(document).ready(function() {


    $('.slideshow').cycle({
        fx: 'fade',
        speed:  1000
    });


    /*
         * Menu dos tutoriais
        */
    $('.animate').click(function() {
        $('.sub').hide();
        $('#'+$(this).attr('rel')).fadeIn(1000);
    });


    /*
     * Limpa campos do formulário
    */
    $(".txt").focus(function(){
        if( $(this).val() == $(this).attr('alt') ){
            $(this).val("");
        }
    });


    $(".txt").blur(function(){
        if( $(this).val() == "" ){
            $(this).val($(this).attr('alt'));
        }
    });



    //Browser


    if ( $.browser.msie ) {
        if($.browser.version<='7.0'){
            window.location.href='http://blackpixel.com.br/forms/error/';
        }
    }


	//Alerta Treinamento
	$(".traning_alert").click(function(){
		jAlert('Inicialmente é necessario efetuar o cadastramento no site da Blackpixel e depois no treinamento de sua escolha.', 'Aviso');
		return false
	});


	//Saiba mais Instrutor
	$(".instructors_button").toggle(function(){
		$(".instructor_description1").hide()
		$(".instructor_description2").fadeIn()
	}, function(){
		$(".instructor_description2").hide()
		$(".instructor_description1").fadeIn()
	});
	
	//$('#banner').fadeIn();
				
				/*$('#fechar_banner').click(function(){
					$('#banner').fadeOut()
					return false;
				});*/
				
				setTimeout( function() {
		jQuery('#banner').fadeOut();
	}, 8000 );


});






