var cmurl = "";
(function($) { 
	$.fn.saveClicks = function() { 
		$(this).bind('mousedown.clickmap', function(evt) { 
			try{
				$.post(cmurl+'/clickmap.php', {  x:evt.pageX,  y:evt.pageY,  savel:escape(document.location.pathname) }); 
			}catch(e){
				var MapImg = new Image();
				MapImg.src = cmurl+'/clickmap.php' + '?x=' + evt.pageX + '&y=' + evt.pageY + '&savel=' + escape(document.location.pathname);
			}
		}); 
	}; 
	$.fn.stopSaveClicks = function() { 
		$(this).unbind('mousedown.clickmap'); 
	}; 
	$.displayClicks = function(settings) { 
		$('<div id="clickmap-overlay"></div>').appendTo('body'); 
		$('<div id="clickmap-loading"></div>').appendTo('body'); 
//		alert( document.location.pathname );
		$.get(cmurl+'/clickmap.php', { showl:escape( document.location.pathname) },  
			function(html) { 
				$(html).appendTo('body');$('#clickmap-loading').remove(); 
			} 
		); 
	}; 
	 
	$.removeClicks = function() { 
	    $('#clickmap-overlay').remove(); 
	    $('#clickmap-container').remove(); 
	};
			jQuery(document).ready(function() {
			
				$('*.img').each(function() {
					string = $(this).text();
					filename = string.toLowerCase().replace(/ /g, '-').replace(/([^0-9a-z-])/g,'');
					$(this).html('<img src="images/' + filename + '.png" alt="' + string + '" />');
				});
			
		}); 
	jQuery(document).ready(function() {
		  $('li.toggle:eq(0)> div').hide();
	});

	jQuery(document).ready(function() {
		$('li.toggle:eq(0)> div').hide();
		$('li.toggle:eq(0)> strong').click(function() { });
	});

	jQuery(document).ready(function() {
		$('li.toggle:eq(0)> div').hide();
		$('li.toggle:eq(0)> strong').click(function() {
			$(this).next().slideToggle('fast');
		});
	});

	jQuery(document).ready(function() {
		  $('li.toggle2:eq(0)> div').hide();
	});

	jQuery(document).ready(function() {
		$('li.toggle2:eq(0)> div').hide();
		$('li.toggle2:eq(0)> strong').click(function() { });
	});

	jQuery(document).ready(function() {
		$('li.toggle2:eq(0)> div').hide();
		$('li.toggle2:eq(0)> strong').click(function() {
			$(this).next().slideToggle('fast');
		});
	});
		jQuery(document).ready(function() {
		  $('li.toggle3:eq(0)> div').hide();
	});

	jQuery(document).ready(function() {
		$('li.toggle3:eq(0)> div').hide();
		$('li.toggle3:eq(0)> strong').click(function() { });
	});

	jQuery(document).ready(function() {
		$('li.toggle3:eq(0)> div').hide();
		$('li.toggle3:eq(0)> strong').click(function() {
			$(this).next().slideToggle('fast');
		});
	});


})(jQuery); 