(function(b){var c={detach:1,thisobject:null,zindex:500,opt_obj:null};var a={init:function(d){if(d){b.extend(c,d)}c.thisobject=$(this);b(window).bind("resize",a.reportPosition);b(window).bind("scroll",a.reportPosition);b(document).bind("load",a.reportPosition);b(window).bind("load",a.reportPosition)},reportPosition:function(){var g=b(window).height();var e=b(document).height();var k=(e-g);var f=b(document).scrollTop();var h=c.thisobject.height();var i=c.opt_obj.height();var d=k-h+i;var j=1;if(f>=d){j=0}c.detach=j;a.run()},run:function(){if(c.detach==1){c.opt_obj.css({position:"fixed",bottom:"0px","z-index":c.zindex})}else{c.opt_obj.css({position:"static",bottom:"auto","z-index":c.zindex})}}};b.fn.hfdetach=function(d){if(a[d]){return a[d].apply(this,Array.prototype.slice.call(arguments,1))}else{if(typeof d==="object"||!d){return a.init.apply(this,arguments)}else{b.error("Method "+d+" does not exist on jQuery.hfdetach")}}}})(jQuery);

