$(document).ready(function() {
	$('A[rel="lightbox"]').lightbox({
		overlayBgColor: "#000",
		overlayOpacity: 0.6,
		imageLoading: "/public/images/lightbox/loading.gif",
		imageBtnClose: "/public/images/lightbox/close.gif",
		imageBtnPrev: "/public/images/lightbox/prev.gif",
		imageBtnNext: "/public/images/lightbox/next.gif",
		imageBlank: "/public/images/lightbox/blank.gif", 
		containerResizeSpeed: 350,
		txtImage: "",
		txtOf: "of"
	});
	
	$("div#slider").smoothDivScroll({ autoScroll: "always", autoScrollDirection: "endlessloopright", autoScrollStep: 1, autoScrollInterval: 50 });

	// Logo parade event handlers
	$("div#slider").bind("mouseover", function() {
		$(this).smoothDivScroll("stopAutoScroll");
	}).bind("mouseout", function() {
		$(this).smoothDivScroll("startAutoScroll");
	});
	
	// header slider
	
	$('#rotator').cycle();

	$("#thumbs").scrollable(); 
	
	$("#thumbs .items img").click(function() { 

		var url = $(this).attr("src"); 
		var wrap = $("#image_wrap"); 
		var img = new Image(); 
		img.onload = function() { 
			wrap.fadeIn(1000); 
			wrap.find("img").attr("src", url).removeAttr("width").removeAttr("height"); 
		}; 
		img.src = url; 

	}).filter(":first").click();
			



	
});
