$(function() {
	var last_target = location.hash;
	
	$(".hmenu").localScroll({
		axis: "x",
		target: ".hcontainer",
		duration: 1000,
		hash: true,
		onAfter: function( anchor, settings ) {
			last_target = anchor;
		}				
	});
	
	function resize_blocks()
	{
		$(".hblock").width($(".hcontainer").width());
		$(".hblock1").width($(".hcontainer").width());
		$(".hblock2").width($(".hcontainer").width());
		$(".hcontainer").scrollTo(last_target);
	}
	
	resize_blocks();
	$(window).resize(resize_blocks);
});

