/* 
  helper class to set width styles according to page width 
  Requires Jquery 1.2.1 
*/ 
pageWidthHelper = {
	// Properties
	min_width_breakpoint : 910,
	standard_class : 'footer_link_normal',
	narrow_class : 'footer_link_small',
	
	setWidthStyles: function() {
		var winWidth = jQuery(window).width();
		//set appropriate CSS for this browser width
		if(winWidth < this.min_width_breakpoint) {
			jQuery('#footer-main-links').removeClass(this.standard_class);
			jQuery('#footer-main-links').addClass(this.narrow_class);
		} else {
			jQuery('#footer-main-links').removeClass(this.narrow_class);
			jQuery('#footer-main-links').addClass(this.standard_class);
		}
	}
};

$(function() {
	//set the CSS for this width
	pageWidthHelper.setWidthStyles();
	
	//set the CSS for this width on browser resize
	$(window).resize(function() {
		pageWidthHelper.setWidthStyles(jQuery(window).width());
	});
	
	//facebook share enhancement
	$('#fbshare').html('<a type="box_count" name="fb_share" href="http://www.facebook.com/sharer.php" title="fb_share">Share</a>');
	
	//tweetmeme enhancement
	$('#tweetmeme').html('<iframe src="http://api.tweetmeme.com/button.js?url='+document.location.href+'" height="61" width="50" frameborder="0" scrolling="no"></iframe>');
});

