$(document).ready(function() {
	// Outline Scrubber
	$('a').focus(function() { this.blur() });
	$('a').each(function() { if($(this).attr('rel') == 'external'){ $(this).attr('target', '_blank') } });

	// Table Striper
	$('.zebra tr')
		.mouseover(function() { $(this).addClass('over') })
		.mouseout(function() { $(this).removeClass('over') });
	$('.zebra tr:even').addClass('alt');


	// Image alt to title copier
	$('img').each(function() { $(this).attr('title', $(this).attr('alt')) });
});

$.fn.StyleButton = function(settings) {
	settings = jQuery.extend({
		style	: 'button',
		form	: 'submit-form'
	}, settings);
	
	$(this).each(function() {
		$(this).hide();
		$(this).after('<a href="#" class="'+ settings.style +'"><span>'+ $(this).text() +'</span></a>');
		$(this).next()
			.focus(function() { this.blur() })
			.click(function() { document.getElementById(settings.form).submit(); return false; });
	});
};
