/* Desenvolvido por Bruno Bincoletto - BeDigital.com.br - Soluções Web */

jQuery.fn.center = function () {
    this.css("position","absolute");
    this.css("top", ( $(window).height() - this.height() ) / 2.5+$(window).scrollTop() + "px");
    this.css("left", ( $(window).width() - this.width() ) / 2+$(window).scrollLeft() + "px");
    return this;
}

$(document).ready(function(){
	
	// GENERAL VARS
	var htmlWidth = $('html').width();
	var htmlHeight = $('html').height();
	var winWidth = $(window).width();
	var winHeight = $(window).height();
	

	
	$("img").lazyload();
	
	$('#wrapper').fadeIn('slow');
	
	$('#frases, #frases .frame, #happens, #happens .frame').corner('5px');
	
	
	
	
	
	// PROJETOS
	
	$('.projetos .proj li').hover(function(){
		$(this).children('a').slideToggle();
	},function(){
		$(this).children('a').slideUp();
	});

	
	// GENERAL LAYOUT FUNCTIONS
	$(".navbar li:nth-child(1)").css('border','none');

	
	// FORM FUNCTIONS
	$('input, textarea').focus(function(){
			 $(this).addClass('formFocus');
	});
	$('input, textarea').blur(function(){
			 $(this).removeClass('formFocus');
	});
	


	
	
	
//	setTimeout(function(){ 	
//	var socialH = $('#social').height();
//	$('#happens .frame').height(socialH-118);}, 2000);

	
	
	
	
});
