/** @author Diego */

String.prototype.isEmail = function(){
	var regex = /[A-Za-z0-9_.-]+@([A-Za-z0-9_]+\.)+[A-Za-z]{2,4}/;
	return regex.test( this );
}

Date.prototype.getMonthName = function() {
	switch (this.getMonth()) {
		case 0: return 'Janeiro'; break;
		case 1: return 'Fevereiro'; break;
		case 2: return 'Março'; break;
		case 3: return 'Abril'; break;
		case 4: return 'Maio'; break;
		case 5: return 'Junho'; break;
		case 6: return 'Julho'; break;
		case 7: return 'Agosto'; break;
		case 8: return 'Setembro'; break;
		case 9: return 'Outubro'; break;
		case 10: return 'Novembro'; break;
		case 11: return 'Dezembro'; break;
	}
}


Date.prototype.getFullDateTime = function() {
	return  this.getFullYear() + '-' + parseInt(this.getMonth()+1) + '-' + this.getDate() + ' ' + this.getHours() + ':' + this.getMinutes() + ':' + this.getSeconds();
}

$(document).ready(function () {
	$('.button').mouseover(function() {
		$(this).addClass('ui-state-hover').css('cursor', 'pointer');
	}).mouseout(function() {
		$(this).removeClass('ui-state-hover');
	});

    $('#BSair').click(function() {
        window.location = '/home/logout';
    });

    $('#BInicialProf').click(function() {
        window.location = '/professores';
    });
    $('#BInicialAluno').click(function() {
        window.location = '/home';
    });

    $('#BVoltar').click(function() {
        window.history.back();
    });

});
