jQuery.fn.jQIR = function(format, path, onload)
{
	if(!document.images) return this;
	path = path || "";
	this.each(
		function()
		{
			var img = $("<img>"), el = jQuery(this);
			var file;
			var re = /(?:{src\:)(\S+)(?:})/i;
			var m = this.className.match(re);
			if(m)
			{
				file = path + m[1];
			}
			else
			{
				file = path + this.id + "." + format;
			}
			
			jQuery(img).attr(
			{
				src: file,
				alt: el.text()
			}).load(typeof onload == "function" ? onload : function(){} );
			var a = el.find("a");
			var toAppend = a.length ? a.empty().append(img) : img;
			el.empty().append(toAppend);
		}
	)
	return this;
}

$(function() {
$(".ir").jQIR("gif", "/wp-content/themes/TheVictoria/img/titles/");
$('map *').Tooltip({showURL: false, track: true, delay: 0,showBody: " - "});
$('#email-link').click( function() { 
	if ( $('#updates form').css('display') == 'none' ) {
		$('#updates form').slideDown(); 
		return false;
	}
	else
		return false;
});

});

