if(typeof eventId == "undefined") {
    var eventId = 11736;
}
if(eventId == 23390) { // hack for fox sports tiger wood's event (http://msn.foxsports.com/golf/story/10455648)
    var useAkamai = true;
}
if(typeof publisherId == "undefined") {
    var publisherId = 0;
}
if(typeof width == "undefined") {
    var width = 300;
}
if(typeof height == "undefined") {
    var height = 600;
}
if(typeof baseStyle == "undefined") {
    var baseStyle = "black";
}
if(typeof interactionBox == "undefined") {
    var interactionBox = "bottom";
}
if(typeof showTitle == "undefined") {
    var showTitle = false;
}
if(typeof shareLink == "undefined") {
    var shareLink = true;
}
if(typeof refreshLink == "undefined") {
    var refreshLink = true;
}
if(typeof enableMedia == "undefined") {
    var enableMedia = true;
}
if(typeof enableNews == "undefined") {
    var enableNews = false;
}
if(typeof mediaHeight == "undefined") {
    var mediaHeight = 160;
}
if(typeof enableEventSelector == "undefined") {
    var enableEventSelector = false;
}
if(typeof bottomInfo == "undefined") {
    var bottomInfo = false;
}
if(typeof roundCorners == "undefined") {
    var roundCorners = false;
}
if(typeof brandLogo == "undefined") {
    var brandLogo = "";
}
if(typeof hashTag == "undefined") {
    var hashTag = "";
}
if(typeof bgImage == "undefined") {
    var bgImage = "";
}
if(typeof bgColor == "undefined") {
    var bgColor = "";
}
if(typeof paneBgColor == "undefined") {
    var paneBgColor = "";
}
if(typeof fontColor == "undefined") {
    var fontColor = "";
}
if(typeof linkColor == "undefined") {
    var linkColor = "";
}
if(typeof interactionBoxColor == "undefined") {
    var interactionBoxColor = "";
}

if(typeof useTabs == "undefined") {
    var useTabs = false;
}
if(typeof defaultTab == "undefined") {
    var defaultTab = 1;
}
if(typeof tab1 == "undefined") {
    var tab1 = "";
}
if(typeof tab1fn == "undefined") {
    var tab1fn = "all";
}
if(typeof tab1group == "undefined") {
    var tab1group = "";
}
if(typeof tab2 == "undefined") {
    var tab2 = "";
}
if(typeof tab2fn == "undefined") {
    var tab2fn = "featured";
}
if(typeof tab2group == "undefined") {
    var tab2group = "";
}
if(typeof tab3 == "undefined") {
    var tab3 = "";
}
if(typeof tab3fn == "undefined") {
    var tab3fn = "";
}
if(typeof tab3group == "undefined") {
    var tab3group = "";
}
if(typeof tab4 == "undefined") {
    var tab4 = "";
}
if(typeof tab4fn == "undefined") {
    var tab4fn = "";
}
if(typeof tab4group == "undefined") {
    var tab4group = "";
}
if(typeof tab5 == "undefined") {
    var tab5 = "";
}
if(typeof tab5fn == "undefined") {
    var tab5fn = "";
}
if(typeof tab5group == "undefined") {
    var tab5group = "";
}
if(typeof tab6 == "undefined") {
    var tab6 = "";
}
if(typeof tab6fn == "undefined") {
    var tab6fn = "";
}
if(typeof tab6group == "undefined") {
    var tab6group = "";
}

if(typeof subtab1 == "undefined") {
    var subtab1 = "All";
}
if(typeof subtab1fn == "undefined") {
    var subtab1fn = "all";
}
if(typeof subtab2 == "undefined") {
    var subtab2 = "Photos";
}
if(typeof subtab2fn == "undefined") {
    var subtab2fn = "photos";
}
if(typeof subtab3 == "undefined") {
    var subtab3 = "Videos";
}
if(typeof subtab3fn == "undefined") {
    var subtab3fn = "videos";
}
if(typeof subtab4 == "undefined") {
    var subtab4 = "Trends";
}
if(typeof subtab4fn == "undefined") {
    var subtab4fn = "trends";
}
if(typeof clickThroughURL == "undefined") {
    var clickThroughURL = "";
}
if(typeof useAkamai == "undefined") {
    var useAkamai = false;
}
if(typeof enableAd == "undefined") {
    var enableAd = false;
}
if(typeof enableExtraTrends == "undefined") {
    var enableExtraTrends = false;
}
if(typeof autoRefreshSpeed == "undefined") {
    var autoRefreshSpeed = 7000;
}
if(typeof eventCategory == "undefined") {
    var eventCategory = "";
}
if(typeof skipInitialVideo == "undefined") {
    var skipInitialVideo = false;
}
if(typeof topBox == "undefined") {
    var topBox = true;
}
/*
 * Tracking Vars
 * 
  var appid = 0;
  var devid = 0;
  var mid = 0;
  var iid = 0;
  var pubid = 0;
  var pv = 0;
  var sess = 0;
  var idtype = "t";
  var adTile = 0;
  var refer = 0;
  var view = 0;
*/

var configvars = [ 'width', 'height', 'baseStyle', 'showTitle', 'useTabs', 'defaultTab',
 'shareLink','refreshLink','enableMedia', 'enableNews', 'mediaHeight', 'enableEventSelector', 'brandLogo', 'bottomInfo',
 'roundCorners', 'interactionBox', 'hashTag', 'bgImage', 'bgColor', 'paneBgColor',
 'fontColor', 'linkColor', 'publisherId', 'tab1', 'tab1fn', 'tab1group', 'tab2',
 'tab2fn', 'tab2group', 'tab3', 'tab3fn', 'tab3group','tab4', 'tab4fn', 'tab4group','tab5', 'tab5fn',
 'tab5group','tab6', 'tab6fn', 'tab6group', 'eventId', 'subtab1', 'subtab1fn',
 'subtab2', 'subtab2fn', 'subtab3', 'subtab3fn', 'subtab4', 'subtab4fn',
 'clickThroughURL', 'useAkamai', 'enableAd', 'akamaiUrl', 'apiUrl', 'autoRefreshSpeed', 'language',
 'appid', 'devid', 'mid', 'iid', 'pubid', 'pv', 'sess', 'idtype', 'adTile', 'refer', 'view', 'widgetId', 'eventCategory', 
 'enableExtraTrends', 'skipInitialVideo', 'topBox', 'interactionBoxColor'  ];

var params = '';
for (var i in configvars) {
    var name = configvars[i];
    if (typeof window[name] != "undefined") {
        if (params)
            params += '&';
        params += name +"="+encodeURIComponent(window[name]);
    }
}

var widgetHost = 'http://www4.tinker.com/standard/';

// DEBUG
//widgetHost = 'http://widgets.standard.tinker.com:8888/'
//if(console.log) {console.log("ALERT:: widgetHost: " + widgetHost)}

document.write('<iframe src="'+widgetHost+'widget_sm.html?' + params + '" width="'+width+
    '" height="'+height+'" marginwidth="0" marginheight="0" scrolling="no" frameborder="0" allowTransparency="true"></iframe>');
    