// <![CDATA[
$(function() {
		   
// -------------------------- //
// -- -- Generic jQuery -- -- //
// -------------------------- //

	//Opens Links In External Window
	$("a[rel='external']").addClass("external").attr('title', function() { return this.title + ' (Opens in New Window)' }).click(function() { window.open(this.href); return false; });
	
	//Scroll To Back to Top
	$("a[href='#backtotop']").click(function() { $.scrollTo(0, 500); return false; }); 
	
	$('label.overlay').labelOver();
	
	$.fn.qtip.styles.motoTip = { // Last part is the name of the style
	   background: '#FFFFFF',
	   color: '#1FA5B1',
	   textAlign: 'center',
	   fontWeight: 'bold',
	   border: {
		  width: 1,
		  radius: 5,
		  color: '#1FA5B1'
	   }//,
	   //name: 'dark' // Inherit the rest of the attributes from the preset dark style
	}
	
	//Start Tool Tips
	$(".gmnoprint[src*='/development/']").live("mouseover",																	  
		function() {			
			if ($(this).attr('src') != '/development/map/icons/shadow.png') {
				var tipContent = $(this).attr('title');
				$(this).attr('rel', tipContent);
				$(this).removeAttr('title');
				$(this).qtip({	
					content: tipContent,	
					show: { ready: true },
					style: { name: 'motoTip', textAlign: 'center', tip: 'bottomMiddle'},
					position: { corner: { target: 'topMiddle', tooltip: 'bottomMiddle'}}				
				});	
			}
		}
	);
	
	$(".gmnoprint[src*='/development/']").live("mouseout",																	  
		function() {			
			if ($(this).attr('src') != '/development/map/icons/shadow.png') {
				var tipContent = $(this).attr('rel');
				$(this).attr('title', tipContent);						
			}
		}
	);
});
// ]]>