Dollar sign troubling me

Dollar sign troubling me

Following code was provided to me @ http://jsfiddle.net/rUbwq/2/

  1. $(window).scroll(function(){
  2.     if(this.pageYOffset + $(this).height() > $(document).height() - 200){
  3.         $('div').css('background', 'red'); //do popup
  4.     }
  5. });​

in response to my question of triggering a popup when scroller reached particular height...
Problem is this part:
  1. this.pageYOffset + $(this).height()
why used $ in the 2nd this but not the first?