$(document).ready(function() {
	// Outline scrubber
	$("a").focus(function() { this.blur() });
	$("button").focus(function() { this.blur() });
	
	// External links
	$("a").each(function() { if($(this).attr("rel") == "external"){ $(this).attr("target", "_blank") } });

	// Image alt to title copier
	$("img").each(function() { $(this).attr("title", $(this).attr("alt")) });

    swapValues = [];
    $(".swap-value").each(function(i){
        swapValues[i] = $(this).val();
        $(this).focus(function(){
            if ($(this).val() == swapValues[i]) {
                $(this).val("");
            }
        }).blur(function(){
            if ($.trim($(this).val()) == "") {
                $(this).val(swapValues[i]);
            }
        });
    });

	$(".add-hover").each(function() {
		$(this)
		.removeClass("add-hover")
		.mouseover(function() { $(this).addClass("hover") })
		.mouseout(function() { $(this).removeClass("hover") });
	});
});