how about this instead.
var $w = $(element || window),