
function setTextBoxHeight(i) {
	el = $(".text");	
	if(i>0)
		if(i<3)
			el.css("max-height", "281px");
		else
			el.css("max-height", "174px");
	else
		el.css("max-height", "388px");
}


function setImageMargin() {
	
	el = $("a.advance-link img");
	h = el.height();
//	alert(h);

	if(h <= 548 && h != 0)
		el.css('marginTop', (652-h)/2+"px");
}

$(window).load(function() {
	


$("#slideshow").css('display','none');

$(".img-grid img").click(
	function() {
		idx = $(this).attr("attr");
		$("#slideshow-outer").fadeIn(200,
			function() {
				$("#slideshow").fadeIn();
			}
		);
		
		$.galleriffic.gotoImage(idx);
	}
);

$("#close").click(
	function() {
		$("#slideshow").fadeOut(
			function() {
				$("#slideshow-outer").fadeOut();
			}
		);
		
	}
);

});

/* test */
