﻿// Analytics
function initAnalytics() {
	if (_gat && _gat._getTracker) {
		try {
		    var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
            document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
			var pageTracker = _gat._getTracker("UA-1145301-1");
			pageTracker._trackPageview();
		} catch(err) {}
	}
};
// Friend Connect
function initFriendConnect() {
	if (google && google.friendconnect && window.XMLHttpRequest) { // Detect Friend Connect script, don’t let in IE 6 and pals
	    //try {
		    var container = document.createElement("div");
		    container.id = "div-5852233331617236048";
		    document.body.appendChild(container);
		    var skin = {};
            skin['BORDER_COLOR'] = '#cccccc';
            skin['ENDCAP_BG_COLOR'] = '#e0ecff';
            skin['ENDCAP_TEXT_COLOR'] = '#333333';
            skin['ENDCAP_LINK_COLOR'] = '#0000cc';
            skin['ALTERNATE_BG_COLOR'] = '#ffffff';
            skin['CONTENT_BG_COLOR'] = '#ffffff';
            skin['CONTENT_LINK_COLOR'] = '#0000cc';
            skin['CONTENT_TEXT_COLOR'] = '#333333';
            skin['CONTENT_SECONDARY_LINK_COLOR'] = '#7777cc';
            skin['CONTENT_SECONDARY_TEXT_COLOR'] = '#666666';
            skin['CONTENT_HEADLINE_COLOR'] = '#333333';
            skin['POSITION'] = 'bottom';
            skin['DEFAULT_COMMENT_TEXT'] = '- add your comment here -';
            skin['HEADER_TEXT'] = 'Comments';
		    google.friendconnect.container.setParentUrl("/");
		    google.friendconnect.container.renderSocialBar({
			    id: "div-5852233331617236048",
			    locale: "en",
			    site: "05781158956602303548",
                'view-params':{"scope":"PAGE","features":"video,comment","showWall":"true"}
		    },skin);
		    //document.body.id = "social";  //?necessary?
	    //} catch(err) {}
	}
};
