// Add a watermark to the devt site
$(document).ready(
	function() {
		var tgt_site = 'http://leia.office.archonet.com';
		var curr_site = '' + window.location;
		//alert(curr_site.substring(0,tgt_site.length));
		if (curr_site.substring(0,tgt_site.length) == tgt_site) {
			$('body').css('backgroundImage', "url('/images/test_site.gif')");
		}
	}
);

// Stripe stripy tables.
// Hover style-change over menus and list-actions.
// We could use a :hover selector if it wasn't for IE...
$(document).ready(
	function() {
		$('table.striped > tbody > tr:odd').addClass('odd');

		$('table.menu').hover(
			function() { $(this).addClass('menuhover'); },
			function() { $(this).removeClass('menuhover'); }
		);
		$('div.listactions').hover(
			function() { $(this).addClass('actionhover'); },
			function() { $(this).removeClass('actionhover'); }
		);
		$('table.list > tbody > tr').hover(
			function() { $(this).addClass('rowhover'); },
			function() { $(this).removeClass('rowhover'); }
		);
	}
);

// Rollover image replacement where class="rollover"
$(document).ready(
	function() {
		$("img.rollover").hover(
			function() {
				this.src = this.src.replace("_off","_on");
			},
			function() {
				this.src = this.src.replace("_on","_off");
			}
		);
	}
);
