$(document).ready(function(){
	
	$(".bg, .txt-box").css('display','none');
	$(".bg").fadeIn(1000,function(){
		$(".txt-box").show("clip",1000);
	});	

	//txt-box slide int
	var ypos = $("body").height()/2 + 120;
	$('.txt-box').css({top:ypos});	
	$(".txt-box a").hover(function(){
		$(this).stop().animate({ "color": "#c1d72d" }, 600);									  
	},function(){
		$(this).stop().animate({ "color": "#fff" }, 400);								  
	})
	.click(function(){
		var dest = $(this).attr('dest');		
//		$(".txt-box").hide('clip','slow',function(){$('.wrapper').fadeOut("slow");});
		$('.landing').fadeOut("slow",function(){location.href=dest;});
		return false;
	});
	resizeWrapper();
	$(window).bind("resize", resizeWrapper);
	
	function resizeWrapper(e) {
		var ypos = $("body").height()/2 + 120;
		$('.txt-box').css({top:ypos});
		var min_w = $(".txt-box").css('min-width').substring(0,-2);
		var new_w = 0;
		if($(window).width()>min_w)
			new_w = $(window).width();
		else
			new_w = min_w;
		$(".txt-box").css('width',new_w+'px');
		$("#log").text(ypos);
		
	
	}
	
});
