
// protoculture|complex 2.0, interaction javascript library //


function getHOME() {
    
    var url = document.URL;
    var pos = url.indexOf( 'episcopalchurch.org' );
    
	if ( pos <= 0 ) pos = url.indexOf( 'episcopalchurch.org');
	if ( pos <= 0 ) pos = url.indexOf( 'iamepiscopalian.org');
    if ( pos <= 0 ) throw 'Invalid URL (interaction.js)';
    
    return url.substring( 0, pos ) + 'iamepiscopalian.org/';
    
}

var _HOME_ = getHOME();


function getKeyCode( e ) {
    var kc = ( e.which || e.keyCode );
    return (!isNaN(String.fromCharCode(kc)));
}

// doesn't handle negative numbers or commas; won't allow number to start with zero
function isNumeric( val ) {
    if ( val.substring(0, 1) == "0" ) return false;
    if ( val.indexOf('.') >= 0 ) return false;
    return !isNaN( val );
}




$(document).ready( function(){
    
    /*if ( !Shadowbox ) alert( '[warning:] shadowbox is not loaded properly.' );
    
    //Shadowbox.loadSkin( 'DFMS', '/lib/js/shadowbox/src/skin' );
    //Shadowbox.loadSkin( 'DFMS', 'css' );

    
    var options = {
        handleOversize:     'resize',
        displayNav:         true,
        displayCounter:     false,
        handleUnsupported:  'remove',
        autoplayMovies:     false,
        enableKeys:         false,
        animSequence:       'sync',
		flvPlayer:      	'/JWPlayer/player.swf',
        modal:              true
    };
    
    Shadowbox.init( options );*/
    
 	
 });