rewrite native javascript in jQuery
<p>I've got a native JavaScript function and I'd like to rewrite it in jQuery. Can you help me? Way beyond my understanding...</p>

<p>EDIT: Quickly addressing the "please refactor my code for me" comments- I'm not asking you to rewrite the work, I'd simply like some guidance on how to rewrite this. As you all have experienced at some point, documentation, tutorials, and books that are helpful can be difficult to find. Any advice is welcome, but.. </p>

<pre><code>if(you dont have anything nice to say){
    dont
}



 var RESIZER = function(){ 

    this.prevWidth = resizee.offsetWidth;
    this.prevHeight = resizee.offsetHeight;

    this.resizee = resizeeContainer.getElementsByTagName('video')[0];
    this.resizeeContainer = resizee.parentNode;
    this.resizeeStyle = this.resizee.style;

    var ratio = this.resizee.offsetHeight/this.resizee.offsetWidth;

    var that = this;

    this.Init = function(){
        if( that.resizeeContainer.className.lastIndexOf("resizerd")&gt;=0 )
        {
            var resizeeContOffsetWidth = that.resizeeContainer.offsetWidth;
            var resizeeOffsetWidth = that.resizee.offsetWidth;
            var resizeeContOffsetHeight = that.resizeeContainer.offsetHeight;
            var resizeeOffsetHeight = that.resizee.offsetHeight;

            if(that.prevWidth!= resizeeContOffsetWidth)
            {
                that.prevWidth = resizeeContOffsetWidth;
                var desired = resizeeContainer.offsetHeight/resizeeContainer.offsetWidth;
                if(desired&gt;ratio){
                    that.resizeeStyle.width=resizeeContOffsetWidth*desired+resizeeContOffsetWidth*desired+"px";
                    that.resizeeStyle.left = -1*(resizeeOffsetWidth-resizeeContOffsetWidth)/2+'px';
                }
                else{ 
                 that.resizeeStyle.cssText="width:100%;height:auto;position:fixed;";
                }
            }

            if(that.prevHeight!=resizeeContOffsetHeight)
            { 
                that.prevHeight = resizeeContOffsetHeight;
                var desired = resizeeContOffsetHeight/resizeeContOffsetWidth;  
                if(desired&gt;ratio){  console.log(ratio);
                    //that.resizeeStyle.top = '0px';
                    that.resizeeStyle.left = -1*(resizeeOffsetWidth-resizeeContOffsetWidth)/2+'px';
                    that.resizeeStyle.width = resizeeContOffsetHeight*desired+resizeeContOffsetHeight/desired+'px';
                }
                else
                {
                    that.resizeeStyle.top = -1*(resizeeOffsetHeight-resizeeContOffsetHeight)/2+'px';

                }
            }

        }
    };
};

var myResizerObject = new RESIZER();
window.onresize = myResizerObject.Init;
</code></pre>
