
	/**
	 * jQuery commonly used functions including preloading images, rollovers...
	 * @source - http://www.texotela.co.uk/code/jquery/rollover/
	 */
	jQuery.preloadImages = function() {
		for(var i = 0; i<arguments.length; i++) {
			jQuery("<img>").attr("src", arguments[i]);
		}
	} // ef
	
	// preload images first (can run before page is fully loaded)
	$.preloadImages("../images/scooters_off.gif", "../images/scooters_on.gif");
	$.preloadImages("../images/motorcycles_off.gif", "../images/motorcycles_on.gif");
	$.preloadImages("../images/atvs_off.gif", "../images/atvs_on.gif");
	
	$(
		function()
		{
			// set up rollover on any image with the class 'rollover' when we hover over this element
			$("img.rollover").hover(
				function() 
				{
					this.src = this.src.replace("_off","_on");	// replace off with on in the filename
				},
				function()
				{
					this.src = this.src.replace("_on","_off");	// replace on with off in the filename
				}
			);
		}
	) // ef


	/**
	 * Common js functions
	 */

	function confirmDelete(url) {
		var strMsg = 'Are you sure you want to delete this item ?';

		if (confirm(strMsg)) {
			window.location = url;
		}
	} // ef