$(document).ready(function() {

    var scrollable = $("div.scrollable").scrollable({
		size: 1,
		vertical: false,
		clickable: false,
		loop: true,
		easing: "swing",
		api: true
	});
	
	$("#banner2 .button img").click(function() {
		
		var rel = $(this).attr('rel');
		if ( rel == "http://www.2020panel.com" ) {
			document.location = rel;
			return false;
		}
		
		var currentIndex = scrollable.getPageIndex();
		
		if ( currentIndex == $(this).attr('scrollIndex') ) {
			document.location = $(this).attr('rel');
		} else {
			btSrc = $(this).attr('src');
			var scrollIndex = $(this).attr("scrollIndex");
			scrollable.seekTo(scrollIndex);
			return false;			
		}

		
	});
	
});
