$(document).ready(function(){
	initCufon();
	clearInputs();
	ieHover('.visual ul li');
	galleryHover();
	$(".visual ul a[rel^='prettyPhoto']").prettyPhoto({theme:'light_square'});
});
/* clear inputs function */
function clearInputs(){
	$('input:text, input:password, textarea').each(function(){
		if(!this.val) this.val = this.value;
		this.onfocus = function(){
			if(this.value == this.val) this.value = '';
		}
		this.onblur = function(){
			if(this.value == '') this.value = this.val;
		}
	});
}
/* IE6 hover function */
function ieHover(h_list) {
	if ($.browser.msie && $.browser.version < 7) {
		$(h_list).hover(function() {
			$(this).addClass('hover');
		}, function() {
			$(this).removeClass('hover');
		});
	}
}
/* gallery */
function galleryHover() {
	$(".thumbnail").css({opacity: 1.0}); // Loaded at 0 opacity
	$(".thumbnail").fadeTo("normal", 9.0); // Onload fade items to 70%
	$(".thumbnail").hover(function(){
		$(this).fadeTo("normal", 0.65); // Rollover at 100%
		},function(){
			$(this).fadeTo("normal", 1.0); // Rollout at 70%
		});
	}
