      
	var active;
        active=0;
	unlock=true;
	var minheight;
	minheight=window.innerHeight-140-20; 

	function gotoposition(position){
	  active=position;
	  $("#screen-container").animate({
	      left: '-'+position,
	    }, 1000, function() { markactive(); unlock=true; 
	      });
	}

	function markactive(){
	  $("#header ul li a.active").removeClass("active");
	  $("#"+active).addClass("active");
	}

	$(function(){
	 $('.content').find('a').attr("target", "_blank");
	 var mincont = document.getElementById('mincont');
	 var stuff = document.getElementById('stuff-content');
	 var show = document.getElementById('show-content');
	 mincont.style.height=minheight+'px';
	 stuff.style.height=minheight+'px';
	 show.style.height=minheight+'px';
	 markactive();
       $('#stuff-content').jScrollPane({scrollbarWidth: 19, showArrows: true});
       $('#show-content').jScrollPane({scrollbarWidth: 19, showArrows: true});


	$("#go-right").click(function(){
	  if(unlock)
	  {
	    unlock=false;
	    var new_pos;
	    new_pos = (active+785)%3140;
	    gotoposition(new_pos);
	  }
	});

	$("#go-left").click(function(){
	  if(unlock)
	  {
	    unlock=false;
	    var new_pos;
	    new_pos = (active+3*785)%3140;
	    gotoposition(new_pos);
	  }
	});

	// blog functions
	$("#stuff ul .content_rest").hide();

	$("#stuff ul .more").click(function(){
	  $(this).siblings(":not(.brief)").slideToggle("fast");
	  $(this).siblings(".less").show();
	  $(this).hide();
	});
	$("#stuff ul .less").click(function(){
	  $(this).siblings(":not(.brief)").slideToggle("fast");
	  $(this).siblings(".more").show();
	  $(this).hide();
	});

	});

