This is the code:
mainobject = $("#MainObject");
topBasis = mainobject.offset().top;
mainHeight = mainobject.height();
leftBasis = mainobject.offset().left;
mainWidth = mainobject.width();
But because of the fact that the MainObject is really large it takes a few seconds to execute this piece of code. Is there any way to make it faster?