var slug;
clickable = true;

function gotoProject(slug){
	if(clickable == true){
		$$('#homeIcons div').each(function(item,index){ 
			item.setStyles({"border":"5px #ddd solid"}); 
		});


		clickable = false;
		var scrollfx = new Fx.Scroll('homeFrame', {
			wait: false,
			duration: 300,
			offset: {'x': 0, 'y': 0},
			transition: Fx.Transitions.Sine.easeInOut,
			onComplete: function(){ 
				clickable = true; 
			},
		});
	    scrollfx.toElement(slug);
		$(slug + '_icon').style.border = "5px #808080 solid";
	}
}

function showVideo(pk){
	$("movieiframe").src = '/video/' + pk + '/';
}

window.addEvent('domready', function() {
  var scroll = new Scroller('scrollerPlacement', {area: 120, velocity: 0.1});
  $('scrollerPlacement').addEvent('mouseenter', scroll.start.bind(scroll));
  $('scrollerPlacement').addEvent('mouseleave', scroll.stop.bind(scroll));

  var scrollfx = new Fx.Scroll('scrollerPlacement', {
    wait: false,
    duration: 1500,
    offset: {'x': 0, 'y': 0},
    transition: Fx.Transitions.Sine.easeInOut
  });//Fx.Transitions.Quad.easeOut

  $('scroller-top').addEvent('click', function(event) {
    event = new Event(event).stop();
    scrollfx.toElement('firstAnchor');
  });

  $('scroller-bottom').addEvent('click', function(event) {
    event = new Event(event).stop();
    scrollfx.toElement('lastAnchor');
  });
});


