// JavaScript Document

(function() {

/* Keep everything in BG variable
    augment existing variable if it exists.
*/
if ( !window.BG || typeof window.BG !== 'object') {
    window.BG = {};
}
var BG = window.BG;

BG.votdWriteCallback = function(json) {
    var votd = json.votd;
    document.write('<div id=votd-title>' + 'Verse of the Day' + '<br />' + '<a style="text-decoration:none;" target="_blank" href="' + votd.permalink +'">' + votd.reference + '</a>');
    document.write('</div>');
	document.write('<div id=votd-text>' + votd.text);
	document.write('</div>');
	document.write('<div id=votd-link>' + '<a style="text-decoration:none;" target="_blank" href="' + votd.copyrightlink + '">' + votd.copyright + '</a>.' + '<br />');
    document.write('Powered by <a style="text-decoration:none;" target="_blank" href="http://www.biblegateway.com/">BibleGateway.com</a>');
    document.write('</div>');
};

window.BG = BG;


})();

