// GAB Scrollable Banners, thanks so much JQTools.com  ;)

$(document).ready(function($) {
	var $banners = $("#mod-banners .banner").parent().find("h3").css('display','none').end().end()
	.addClass('divimg').wrap("<div></div>");

	var $cloned = $banners.first().parent();
	$banners.last().parent().clone().addClass("cloned").insertBefore($cloned);
	$cloned = $banners.last().parent();
	$banners.first().parent().clone().addClass("cloned").insertAfter($cloned);
	
	// Banners controller
	$banners.parent().parent().wrapInner($("<div id='chained' class='scrollable'><div class='items' style='left: -2720px;'></div></div>"))
	.append("<div><a class='prev browse left'></a><a class='next browse right'></a><div class='navi'></div></div>");
	$("#mod-banners #chained img").css('width','320px');
	
	// Heeeeere we go!
	$("#chained").scrollable({circular:true,mousewheel:true}).navigator().autoscroll({
		interval: 3000		
	});

});

