﻿/*
main.js
100208eg
Contains cross-site javascript, site object

Copyright Radio Systems Corporation
*/

function Site(name, domain, omniture) {
    this.name = name;
    this.domain = domain;
    this.suite = omniture;
}

var sites = Array(
    new Site("PetSafe", "http://www.petsafe.net/", "rspetsafenetprod"),
    new Site("Innotek", "http://www.innotek.net/", "rsinnoteknet"),
    new Site("Staywell", "http://www.staywell.co.uk/", "staywell")
);

// Defaults currentSite to PetSafe as fallback
var currentSite = sites[0];
if (typeof currentSiteName == 'undefined') {
    if (console != null) console.log("currentSiteName does not exist!");
} else {
    // Loop through available sites, select matching site
    var needle = currentSiteName.toLowerCase();
    for (var i = 0; i < sites.length; i++) {
        if (sites[i].name.toLowerCase() == needle) {
            currentSite = sites[i];
            break;
        }
    }
}
