/*
this script has been modified for securiko.com
may not suitable for your needs.

2011-10-14
*/
(function($){
var footer; 
  $.fn.extend({
    stickyFooter: function(options) {
      footer = this;		
      positionFooter(); 
      $(window)
        .scroll(positionFooter)
        .resize(positionFooter); 
      function positionFooter() {
		var theHeight=$("#wrapper").height()+$(".footer").height();		
		var winHeight=$(window).height();
        if(theHeight < winHeight){
			var diff = winHeight - theHeight; 			
			$("#sticky_footer").height(diff);		
        }		
		//console.log("doc : ",docHeight);
		//console.log("win : ",winHeight);
		//console.log("diff : ",diff);
		//console.log("theHeight : ",theHeight);
      }
    }
  });
})(jQuery);
