var addthis_config = {
	//ui_click:true,
	ui_header_color:'#fff',
	ui_header_background:'#F37A26',
	ui_offset_top:0,
	ui_offset_left:0
	//ui_cobrand:'SDNN.COM',
};
var addthis_share = {
	url:social_permalink
};

	
$(document).ready(function(){
	var socialTBY = $('#social-toolbox').offset().top;
	var socialTBH = $('#social-toolbox').outerHeight();
	resetToolBox();
	$(window).scroll(function () {
		resetToolBox();
	});
	$(window).resize(function(){
		resetToolBox();				  
	});
	function resetToolBox(){
		var windowBottom = $(window).scrollTop()+$(window).height()-socialTBH;
		if(windowBottom < socialTBY && mobileBrowser == false){
			$('#social-toolbox').addClass('fixed');
		}else{
			$('#social-toolbox').removeClass('fixed');
		};
		//console.log( 'window bottom '+windowBottom+' and the offset is '+socialTBY+' and the height is '+socialTBH);
	}
		// FireFox
		$(".story_body embed").attr("wmode", "opaque");

		// IE
    		var embedTag;
   		$(".story_body embed").each(function(i) {
        		embedTag = $(this).attr("outerHTML");
        		if ((embedTag != null) && (embedTag.length > 0)) {
           			embedTag = embedTag.replace(/embed /gi, "embed wmode=\"opaque\" ");
         			$(this).attr("outerHTML", embedTag);
        		}
       		 // This "else" was added
    			else {
           			$(this).wrap("<div></div>");
      		}
 		});

});