replaced $.extend() with own extend() (switching to WinJS instead of jQuery)

Quick and dirty, but it should work.