var $j = jQuery.noConflict();

$j(document).ready(function () {
    scripture();
    emcode();
    votd();
});
function scripture() {
	$j(".scripture").each(function() {
		$j(this).wrap(
			"<a href=\"http://www.biblegateway.com/passage/?search="
			+ $j(this).html()
			+ "&amp;version=9;\" target=\"blank\">")
	});
}
function emcode() {
	$j('span.emcode').each(function() {
		var at = / at /;
		var dot = / dot /g;
		var addr = $j(this).text().replace(at, "@").replace(dot, ".");
		$j(this).after('<a href="mailto:' + addr + '" title="Send email">' + addr + '</a>').hover(function () { window.status = "Send an email."; }, function () { window.status = ""; });
		$j(this).remove();
	});
}
function votd() {
	$j('h2:contains("Verse of the Day")').parent().addClass("votd-widget");
	$j('.votd-widget div:first').contents().filter(function() {
	  return this.nodeType == 3;
	}).wrap('<span class="powered-by"></span>')
}



