;(function($) {
	
    $(document).ready( function() {
		// menu
		var oMenu  = $('.menu'),
		    oMenu2 = $('.menu2');
		
		/*$('.frame').attr({
		    scrollTop : 0, 
			scrollLeft: 0
		});*/
		
		$.localScroll.hash({
		    target  : '.frame',
			axis    : 'x',
			duration: 0,
			onBefore: function( e, anchor, $target ) {
				var sCurrent = $(anchor).attr('id');
				
				oMenu.find('a').removeClass('active');
				oMenu.find('a[href="#' + sCurrent + '"]').addClass('active').blur();
			}
		});
		
		oMenu.localScroll({
			target  : '.frame',
			axis    : 'x',
			duration: 500,
			hash    : true,
			onBefore: function( e, anchor, $target ) {
				var sCurrent = $(anchor).attr('id');
				
				oMenu.find('a').removeClass('active');
				oMenu.find('a[href="#' + sCurrent + '"]').addClass('active').blur();
			}
		});
		
		oMenu2.localScroll({
			target  : '.frame2',
			axis    : 'y',
			duration: 500
		});
		
    });
	
})(jQuery);
