$j=jQuery.noConflict();
$j(document).ready(function($) {

	var $postShare = $('.dd_ajax_float');
	
	if($('.dd_content_wrap').length > 0){
	
		var descripY = parseInt($('.dd_content_wrap').offset().top) - 20;
		var pullX = $postShare.css('margin-left');
	
		$(window).scroll(function () { 
		  
			var scrollY = $(window).scrollTop();
			var fixedShare = $postShare.css('position') == 'fixed';
			
			if($('.dd_ajax_float').length > 0){
			
				if ( scrollY > descripY && !fixedShare ) {
					$postShare.stop().css({
						position: 'fixed',
						left: '50%',
						top: 20,
						marginLeft: 452
	
					});
				} else if ( scrollY < descripY && fixedShare ) {
					$postShare.css({
						position: 'relative',
						left: 0,
						top: 0,
						marginLeft: pullX
					});
				}
				
			}
	
		});
	}

});

