﻿sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

drawSocialLinks = function(oContainers) {
    var l, i, socialList = [], socialHtm = '';
    var t = 'Dollar Rent A Car';   /*  adjust this to select the title of your article */
    //var u = window.location.href;  /*  this selects the link to your article */
    var iconDirectory = 'img/'; /* this is the director containing your icons */

    var socialMedia = [
			{ linkText: 'Facebook', icon: 'facebook.png', href: 'http://www.facebook.com/share.php?u=' + t },
			{ linkText: 'Twitter', icon: 'twitter.png', href: 'http://twitter.com/home?status=' + t },
		];

    l = socialMedia.length - 1;
    for (i = 0; i < l; i++) {
        socialList.push('<li><a href="' + socialMedia[i].href + '" title="' + socialMedia[i].linkText + '"><img src ="' + this.webRoot + iconDirectory + socialMedia[i].icon + '" alt="' + socialMedia[i].linkText + '" /></a></li>');
    }
    socialHtm = '<ul>' + socialList.join("\n") + '</ul>';
    oContainers.append('<div class="socialMediaContainer">' + socialHtm + '</div>');
}
//drawSocialLinks($('#SocialMedia'));

