fix firefox document height problem

can not get actual height using $(window) in firefox
instead  use $(document)