$(document).ready(function() {

	if (typeof Shadowbox !="undefined") {
		Shadowbox.init();
	}
	
	$('.jump-menu').change(function() {
		$(".jump-menu option:selected").each(function() {
			
			var link = $(this).attr('value');
			
			if(this.form !== null) {
				link = $(this.form).attr('action') + $(this).attr('value');
			}

			location.href = link;
		});
	});

	$('.rollover').hover(
		function() {
			fullpath = $(this).attr('src');
			partial  = fullpath.substr(0, fullpath.lastIndexOf('.')); 
			src 	 = fullpath.substr(fullpath.lastIndexOf('.'));
			newpath  =  partial + '_o' + src;
		
			$(this).attr('src', newpath);
		},
		function() {
			fullpath = $(this).attr('src');
			partial  = fullpath.substr(0, fullpath.lastIndexOf('_o.')); 
			src 	 = fullpath.substr(fullpath.lastIndexOf('.'));
			newpath  =  partial + src;
		
			$(this).attr('src', newpath);
	});
	
	//Used for address removal.
	$('.confirm-delete').click(function() {
		return confirm('Remove this entry from your address book?');
	});
	
});