Attached js to window