function moveGalleryNav() {
	if (jQuery(window).height() > 700) {
		jQuery("#footer").css({
			"top": "auto",
			"bottom": "15px"
		});
	} else {
		jQuery("#footer").css({
			"top": "680px",
			"bottom": "auto"
		});
	}
}

jQuery(document).ready(function() {
	// moveGalleryNav();
	jQuery("a[rel=gallery]").fancybox();
	
	jQuery("#topnavfirst > li").hover(function() {
		jQuery(this).addClass("hovered");
	},function() {
		jQuery(this).removeClass("hovered");	
	});
	
	// jQuery(window).resize(moveGalleryNav);
	
	jQuery("#maincontent ul#gallery, #maincontent ul#subgalleries").carouFredSel({
		auto: {
			play: false
		},
		circular: false,
		height: 460,
		infinite: false,
		items: {
			width: "variable",
			visible: 4
		},
		scroll: {
			duration: 700
		},
		width: 1920
	});
	
	jQuery("ul#gallery li").hover(function() {
		jQuery(".enlargebox",this).show();
	},function() {
		jQuery(".enlargebox",this).hide();
	});
});

//when the dom is ready
//window.addEvent('domready',function() {
	//smooooooth scrolling enabled
	//new SmoothScroll({ options }, window);

	//new SmoothScroll({ duration:700 }, window); //700 milliseconds to get there
//});
