//(function($){

	function doStuff(){
	
		//jQuery('body').prepend('<div style="position:fixed; display:block; width:100px; height:100px; background-color:#cccccc; top:0;left:0 " id="garettsInfo">hello world</div>');

		jQuery('#googleadsleft').height(
			jQuery('#content').height() - 
			(
				jQuery('#panelleft:not(#googleadsleft)').height() - 
				jQuery('#googleadsleft').height()
			)
		);
		//jQuery('#googleadsleft').css('background-color','red');
		
		jQuery(window).scroll(function(){
		
			theObj = jQuery('#googleadsleft .sidebar-widget');
			adX = theObj.offset().left;
		
			minWindowMove = jQuery('#googleadsleft').offset().top;
			maxWindowMove = jQuery('#googleadsleft').offset().top + (jQuery('#googleadsleft').height() - jQuery('#googleadsleft .sidebar-widget').height());
			myY = jQuery(window).scrollTop();
			jQuery('#garettsInfo').html(minWindowMove + ' - '+maxWindowMove+'<br>' + myY);
			
			

			if(maxWindowMove < myY)
			{
				theObj.css('position','relative');
				theObj.css('top','0px');
				theObj.css('left','0px');
				theObj.css('margin-top',(maxWindowMove-minWindowMove)+'px');
			}
			else if(minWindowMove < myY)
			{
				theObj.css('margin-top','0px');
				theObj.css('position','fixed');
				theObj.css('top','10px');
				theObj.css('left',adX+'px');
			}
			else
			{
				theObj.css('margin-top','0px');
				theObj.css('position','relative');
				theObj.css('top','0px');
				theObj.css('left','0px');
			}
			
			//if()
		});
		
		jQuery(window).scroll();
		
		
		
	}
	
//})(jQuery);