--- scripturefilter.orig/scripturefilter.inc	2007-05-21 17:45:34.000000000 +0100
+++ modules/scripturefilter/scripturefilter.inc	2007-12-21 06:46:44.000000000 +0000
@@ -1,7 +1,7 @@
 <?php
 /* $Id: scripturefilter.inc,v 1.3.4.1 2007/05/21 16:45:34 smsimms Exp $ */
 
-define('DEFAULT_BIBLE_TRANSLATION','NIV');
+define('DEFAULT_BIBLE_TRANSLATION','KJV');
 
 function scripturize ($text = '',$bible = DEFAULT_BIBLE_TRANSLATION){
     // skip everything within a hyperlink, a <pre> block, a <code> block, or a tag
@@ -81,33 +81,85 @@ function scripturizeLinkReference($refer
        $verse = strtok($verse,',& ');
    }
 
-   switch ($translation) {
+    switch ($translation) {
+		case 'KJV':
+		case 'AKJV':
+		case 'ACV':
+		case 'BBE':
+		case 'WEB':
+		case 'Webster':
+		case 'Weymouth':
+			$link = "http://read.thepositiveword.com/quote.php?ver=$translation&close=none&ref=";
+			$title = "read.thepositiveword.com";
+			$link = sprintf('<a class="thickbox" href="%s%s&KeepThis=true&TB_iframe=true&height=400&width=600" target="_new" title="%s">%s</a>',$link,htmlentities(urlencode(trim("$volume $book $verse"))),$title,trim($reference));
+             break;
         case 'ESV':
         // note: the ESV could actually support a mouseover reference
         // we could pull it directly from their site and include it in the $title text
         // http://www.gnpcb.org/esv/share/services/api/ for more info
              $link = 'http://www.gnpcb.org/esv/search/?go=Go&q=';
-             $title = 'English Standard Version Bible';
-             $link = sprintf('<a href="%s%s" title="%s">%s</a>',$link,htmlentities(urlencode(trim("$volume $book $verse"))),$title,trim($reference));
+             $title = "English Standard Version Bible";
+             $link = sprintf('<a class="thickbox" href="%s%s&KeepThis=true&TB_iframe=true&height=400&width=600" target="_new" title="%s">%s</a>',$link,htmlentities(urlencode(trim("$volume $book $verse"))),$title,trim($reference));
              break;
         case 'NET':
              $link = 'http://net.bible.org/passage.php?passage=';
-             $title = 'New English Translation';
-             $link = sprintf('<a href="%s%s" title="%s">%s</a>',$link,htmlentities(urlencode(trim("$volume $book $verse"))),$title,trim($reference));
+             $title = "New English Translation";
+             $link = sprintf('<a class="thickbox" href="%s%s&KeepThis=true&TB_iframe=true&height=400&width=600" target="_new" title="%s">%s</a>',$link,htmlentities(urlencode(trim("$volume $book $verse"))),$title,trim($reference));
              break;
-	case 'TNIV':
-             $link = 'http://www.tniv.info/bible/passagesearch.php?passage_request=';
-             $title = 'Today\'s New International Version';
-             $link = sprintf('<a href="%s%s" title="%s">%s</a>',$link,htmlentities(urlencode(trim("$volume $book $verse"))),$title,trim($reference));
-	     break;
         default:
-             $link = "http://biblegateway.com/cgi-bin/bible?language=english&version=$translation&passage=";
-             $title = 'Bible Gateway';
-             $link = sprintf('<a href="%s%s" title="%s">%s</a>',$link,htmlentities(urlencode(trim("$volume $book $verse"))),$title,trim($reference));
+	         $t= getBibleGatewayId($translation);
+             $link = "http://biblegateway.com/cgi-bin/bible?language=english&version=$t&interface=print&passage=";
+             $title = "Bible Gateway - $translation";
+             $link = sprintf('<a class="thickbox" href="%s%s&KeepThis=true&TB_iframe=true&height=400&width=600" target="_new" title="%s">%s</a>',$link,htmlentities(urlencode(trim("$volume $book $verse"))),$title,trim($reference));
              break;
     }
 
     return $link;
 }
 
+function getBibleGatewayId($translation) {
+// return the Bible Gateway ID for the translation (http://www.biblegateway.com/usage/linking/versionslist.php)
+	switch($translation) {
+        case "AMP":
+			return 45;
+			break;
+        case "ASV":
+			return 8;
+			break;
+        case "CEV":
+			return 46;
+			break;
+        case "DARBY":
+			return 16;
+			break;
+        case "NASB":
+			return 49;
+			break;
+        case "NIRV":
+			return 76;
+			break;
+        case "NIV-UK":
+			return 64;
+			break;
+        case "NKJV":
+			return 50;
+			break;
+        case "NLT":
+			return 51;
+			break;
+        case "KJ21":
+			return 48;
+			break;
+        case "TNIV":
+			return 72;
+			break;
+        case "WYC":
+			return 53;
+			break;
+        case "NIV":
+		default:
+			return 31;
+			break;
+	}
+}
 ?>
