IE memory overflow with function

IE memory overflow with function

Ok guys.
Here's what I do:

  1. function myFunction($obj, fix)
  2. {
  3.       var acum = 0;
  4.       var apply = 0;
  5.       $obj.height(0);
  6.       $('#contenedora').height($(document).height() - fix);
  7.       var $prev = $obj.prev('.iframe_full_title');
  8.       var $footer = $('#divFooter');
  9.       var $titulo = $('#iframe_zona_titulo');
  10.       var $parent = $obj.parents('.iframe_full_block:eq(0)');
  11.       var $ant = $parent.prev('.iframe_full_block');
  12.       var $bttn = $parent.next('.button_div_bottom');
  13.       acum = Number($prev.outerHeight(true));
  14.       acum += Number($footer.outerHeight(true));     
  15.       acum += Number($titulo.outerHeight(true));
  16.       acum += Number($ant.outerHeight(true));
  17.       acum += Number($bttn.outerHeight(true));
  18.     
  19.       apply = Number(Number($('#contenedora').height()) - acum);
  20.         
  21.       $obj.height(apply);
  22. }

  23. $(document).ready(function(){
  24.       [..]
  25.       myFunction($div, 50);
  26.       $div.css('prop', value);
  27. });

  28. $(window).resize(function(){
  29.       myFunction($div, 50);
  30. }).resize();
Ok, it works fine in FF, Chrome and Safari.
The I switch into IE8 and then cames an overrun memory problem that freezes the window.
¿What I'm doing wrong?


- I didn't know it was imposible, so far I wouldn't had achieved it. -