$(document).ready(function() {

	$(".scrollable").scrollable({circular: true, mousewheel: false}).navigator().autoscroll({
		interval: 6000,
		autopause: true	
	});
	
	$(".scroll").scrollable({ circular: true }).click(function() {
		$(this).data("scrollable").next();		
	});	
	
	$(".project").preloadImages({
        showSpeed: 500,
        easing: 'easeOutQuad'
    });
    
    $(".full-project").preloadImages({
        showSpeed: 500,
        easing: 'easeOutQuad'
    });
	
	$('.project').hover(function(){
		$(".caption", this).stop().animate({top:'0'},{queue:false,duration:160});
	}, function() {
		$(".caption", this).stop().animate({top:'192px'},{queue:false,duration:160});
	});	
	
	$('.description-trigger').hover(function(){
		$(".text").stop().animate({top:'0'},{queue:false,duration:260});
	}, function() {
		$(".text").stop().animate({top:'468px'},{queue:false,duration:260});
	});	
	
	$('.description-trigger-two').hover(function(){
		$(".text-two").stop().animate({top:'0'},{queue:false,duration:260});
	}, function() {
		$(".text-two").stop().animate({top:'468px'},{queue:false,duration:260});
	});	
	
	$('.description-grouped .description-trigger').hover(function(){
		$(".text").stop().animate({top:'0'},{queue:false,duration:260});
	}, function() {
		$(".text").stop().animate({top:'402px'},{queue:false,duration:260});
	});	
			
	$(".overlay-trigger[rel]").overlay({mask: '#5E696B'});		
	
	$(".tooltip-trigger-architecture").tooltip({
	    relative: true,
	    offset: [10, 0],
		effect: 'slide'
	});
		
	$(".tooltip-trigger-interiors").tooltip({
	    relative: true,
	    offset: [50, -20],
		effect: 'slide'
	});	
		
	$(".tooltip-trigger-planning").tooltip({
	    relative: true,
	    offset: [30, 3],
		effect: 'slide'
	});	
		
	$(".tooltip-trigger-furniture").tooltip({
	    relative: true,
	    offset: [60, 10],
		effect: 'slide'
	});	
		
	$(".tooltip-trigger-project").tooltip({
	    relative: true,
	    offset: [30, 3],
		effect: 'slide'
	});				
		
	$(".before").hover(
	function() {
		$('.before').animate({"opacity": "0"}, "slow");
	},
	function() {
		$('.before').animate({"opacity": "1"}, "slow");
	});
	
	if (navigator.platform == "iPad") return;
    $(".lazy").find("img").lazyload({
		effect:"fadeIn",
	    placeholder: "i/grey.gif",
	    failurelimit : 99
	});
	
});
 
$(function(){
	$.fn.supersized.options = {  
		startwidth: 1700,    
		startheight: 1000,
		vertical_center: 1,
		slideshow: 1,
		navigation: 1,
		transition: 1,
		pause_hover: 0,
		slide_counter: 0,
		slide_captions: 0,
		slide_interval: 8000,
		fit_portrait: 1,		//Portrait images will not exceed browser height
		fit_landscape: 0	//Landscape images will not exceed browser width  
	};
    $('#supersize').supersized(); 
});
