$(function() {
	$("img").bind("contextmenu",function(e){
        return false;
    });

	$("#menu").lavaLamp({
		fx: "easeOutExpo",
		speed: 400
	});
	
	$("#slider li img.off").each(function(){
		var theImage = new Image();
		theImage.src = $(this).attr('src');
		$(this).css('top', '-'+ ((theImage.height-78)/2) +'px');
		
	});
	
	$("#slider li[class!='active']").hover(
		function(){
			$("img.color", this).stop().css({top: $("img.off", this).css("top"), opacity: 0.0}).animate({opacity:1.0}, 'slow');
			$("span.caption", this).stop().animate(
				{ bottom: 0 }, {
				 duration: 'slow',
				 easing: 'easeOutBounce'
				});
		},
		function(){
			$("img.color", this).stop().animate({opacity:0.0}, 'slow', function() { $(this).css('top', '78px'); });
			//$("img.color", this).fadeOut('slow');
			$("span.caption", this).stop().animate(
				{ bottom: -30 }, {
				 duration: 'slow',
				 easing: 'easeOutBounce'
				});
		}
	);
	
	
	$("#ho-so img").css('opacity', 0.8).hover(
		function(){
			$(this).stop().animate({opacity:1.0}, 'slow');
		},
		function(){
			$(this).stop().animate({opacity:0.8}, 'slow');
		}
	);
	
	/*
	var highestCol = Math.max($('.tgp-body > .left').height(),$('.tgp-body > .right').height());
	$('.tgp-body > .left').height(highestCol);
	$('.tgp-body > .right .body-content').css('height',(highestCol - 144)+'px');
	*/
});


getUpdate = function(type, parameter1, parameter2)
{
	if (type == 'item')
	{
		var index = parameter1;
		$("#slide-content > div").removeAttr('style').stop().eq(index).slideDown({ duration: 1500, easing: 'easeOutBounce' });
	}
}

