$(document).ready(function () {        
	 $('#timeline').mousedown(function (event) {
		  $(this)
				.data('down', true)
				.data('x', event.clientX)
				.data('scrollLeft', this.scrollLeft);
//				$('#timeline').removeClass();
//				$('#timeline').addClass('closedhand');
		  return false;
	 }).mouseup(function (event) {
		  $(this).data('down', false);
//		  $('#timeline').removeClass();
//		  $('#timeline').addClass('openhand');
	 }).mousemove(function (event) {
		  if ($(this).data('down') == true) {
				this.scrollLeft = $(this).data('scrollLeft') + $(this).data('x') - event.clientX;
		  }
	 }).css({
		  'overflow' : 'hidden',
		  'cursor' : 'w-resize'
	 });
});
    
$(window).mouseout(function (event) {
	 if ($('#timeline').data('down')) {
		  try {
				if (event.originalTarget.nodeName == 'BODY' || event.originalTarget.nodeName == 'HTML') {
					 $('#timeline').data('down', false);
				}                
		  } catch (e) {}
	 }
});

function jumpTo(element) {
  element = document.getElementById(element);
  $('#timeline').scrollTo(element, 800);
}

function navScroll(target) {
	$('#timeline_nav_inner1').scrollTo(target, 400);
}