function scrollTo() {
	$('html, body').stop().animate({
		scrollTop: $('body').offset().top
	}, 500);
	event.returnValue=false; 
	return false;
}	

function getWindowWidth(win) { 
	if (win == undefined) win = window; 
	if (win.innerWidth) { 
		return win.innerWidth; 
	} 
	else { 
		if (win.document.documentElement && 
			win.document.documentElement.clientWidth) { 
			return win.document.documentElement.clientWidth; 
		} 
		return win.document.body.offsetWidth; 
	} 
} 

function getWindowHeight(win) { 
	if (win == undefined) win = window; 
	if (win.innerHeight) { 
		return win.innerHeight; 
	} 
	else { 
		if (win.document.documentElement 
			&& win.document.documentElement.clientHeight) { 
			return win.document.documentElement.clientHeight; 
		} 
		return win.document.body.offsetHeight; 
	} 
}

$(function () {
	// Hover effect
	$('.item-image-hover').hoverIntent(function(){
		$(this).animate({opacity: 0});
	}, function(){
		$(this).animate({opacity: 1});
	});
	// Image Slider
   	$('#slider').nivoSlider({
       	effect:'slideInLeft',
        animSpeed:500,
   	    pauseTime:6000,
   	    directionNav:false,
       	startSlide:0,
   	    controlNav:true
    });
    height = getWindowHeight();
	height = height - 280;
    $('#detail').css('min-height',height+'px');
});

