$(document).ready(function(){
	
	initScript();
	
});


function initScript(){
	
	embeddFonts();
	initTooltips();	
	
}


function embeddFonts(){
		
	Cufon.replace('h1');
	Cufon.replace('h2');
	Cufon.replace('h3');
	Cufon.replace('h4');
	Cufon.replace('#menu a', { hover: true });
	Cufon.replace('#project-links a', { hover: true });
	Cufon.replace('.submit');

}


function initTooltips(){
	
	$("#project-nav .tooltip").tooltip();	
	$(".login .tooltip").tooltip({horizontalAlign: 'right', verticalAlign: 'top'});
	
}


function weaintplastic_resizeGallery( height ){
	
	//$("#flashgallery").css()
	
	$('#flashgallery').animate({ height: height} ,300, "easeInOutQuart");
	
	//weaintplastic_resize();

}

function weaintplastic_resize(){
	
	$("#flashgallery").css( "height", $("#flashgallery").height() + 5 + "px");
	
	if($("#flashgallery").height() < 600) setTimeout(weaintplastic_resize,20);
}