$(function(){
	var v = $(window).width();
	$("#main").css({'height' : $(window).height() - 100 + 'px' , 'width' : $(window).width() + 'px' });
	$(window).resize(function() {
		$("#main").css({'height' : $(window).height() - 100 + 'px' , 'width' :  $(window).width() + 'px' });
	});
});



$(function(){
	  //Get our elements for faster access and set overlay width
	  var div = $('div.sc_line'),
				   ul = $('ul.sc_line'),
				   // unordered list's left margin
				   ulPadding = 15;
	
	  //Get menu width
	  var divWidth = div.width();
	  //Find last image container
	  var lastLi = ul.find('li:last-child');
	
	  //Remove scrollbars then When user move mouse over menu
	  div.css({overflow: 'hidden'}).mousemove(function(e){
			//As images are loaded ul width increases,
			//so we recalculate it each time
			var ulWidth = lastLi[0].offsetLeft + lastLi.outerWidth() + ulPadding;
		
			var left = (e.pageX - div.offset().left) * (ulWidth-divWidth) / divWidth;
			div.scrollLeft(left);
	  });
	});

