/* Description: 
Common javascript fucntion for all of the site

*/
$(document).ready(function() {
	// Find all a tags with external links, add target _blank (to handle window focus with named window) and add external icon
	$('a').filter(function() {
		return this.hostname && this.hostname !== location.hostname;
		})//.attr('target', '_blank') /// add target to all external links
		.not(':has(img)').addClass('external');// For all <a> not containing an <img> add class - instead of appeading image -> prevents IE border of image problem		

	// Highlight row of table on mouseover
	$(".alternatingRowTable tr").hover(
   function() { $(this).addClass("row_highlight"); },
   function() { $(this).removeClass("row_highlight"); }
  );
	
	$(".makeRowClickable tr").
		mouseover(function(){
			var href = $('a', this).attr("href");
			if (href) {
				$(this).css('cursor', 'pointer');
			}
		}).
		click(
		function() {
			var href = $('a', this).attr("href");
			if (href) {
				window.location = href;
			}
		});
		
});

