$(document).ready(function() {
	jQueryGlobalFunctions();
	jQueryLocalFunctions();
	return false;
});
function jQueryGlobalFunctions()
{
	$("#navlinks ul li").corner("8px");
	$("#navlinks ul li").click( 
		function() { 
			location.href=this.firstChild.href; 
		});
	$("#navlinks ul li").hover(
		function() { 
			$(this).toggleClass("linkon").toggleClass("linkoff"); 
		},
		function() { 
			$(this).toggleClass("linkon").toggleClass("linkoff"); 
		});
/*
 **************************************************
 *	Optional - Rounded corners for "Samples" links
 **************************************************
 */
	if ($(".samples").length) {
		$(".samples").corner();
    }

/*
 ***************************************
 *	Optional - Slideshows
 ***************************************
 */
    if ($(".pics").length) {
		$('#s1').cycle({ fx: 'fade', speed: 2500 });
		$('#s2').cycle({ fx: 'fade', speed: 2500, delay: -2000 });
	}

/*
 *	Construction and Retail thumbnail galleries
 *
 *  The following code is the jQuery equivalent of lightweight.js 
 *	(David Hellsing - http://monc.se/kitchen/80/lightweight-image-gallery-with-thumbnails)
 *	This code by Ros Moss (http://enkiducomputing.com.au) 05/11/2007
 */
	if ($("ul#gallery").length) {
		$("ul#gallery li").each(function(index) 
			{
				var $thisLI = $(this);
				var $thisBG = "url('" + $thisLI.find("img").attr("src") + "')";
				$thisLI.css({
					backgroundImage: $thisBG,
					backgroundRepeat: "no-repeat"
				});
				$thisLI.bind("click", function(){
					$("ul#jgal li.active").removeClass("active");
					$(this).addClass("active");
				});				
			});
		$("ul#gallery li").eq(0).addClass("active").end();
		$("ul#gallery").attr("id","jgal");
    }
}

function jQueryLocalFunctions(){} // STUB DO NOT USE

