/************************************************************
Design and development by Webtraders Internet Solutions B.V.
URL:          http://webtraders.nl
Phone:        +31 (0) 70 306 0002
E-mail:       info@webtraders.nl
Completed:    # Mei 2010
*************************************************************/ 

/*
 * jQuery Timer Plugin
 * http://www.evanbot.com/article/jquery-timer-plugin/23
 *
 * @version      1.0
 * @copyright    2009 Evan Byrne (http://www.evanbot.com)
 */ 

jQuery.timer = function(time,func,callback){
    var a = {timer:setTimeout(func,time),callback:null}
    if(typeof(callback) == 'function'){a.callback = callback;}
    return a;
};

jQuery.clearTimer = function(a){
    clearTimeout(a.timer);
    if(typeof(a.callback) == 'function'){a.callback();};
    return this;
}; 

function resizeContentDiv() 
{
    // This will hold our timer
    var myTimer = {}; 
   
    var windowHeight = $(window).height();
    var windowWidth  = $(window).width();
    var bodyHeight   = $("body").height();
    var bodyWidth    = $("body").width(); 

    $("#container-content").css('height','auto');  
    
    var headerHeight  = 152; 
    var footerHeight  = 60; // met links 172 zonder links 60 
    var contentHeight = $("#container-content").height();
      
    var totalContentHeight = contentHeight + footerHeight + headerHeight;  
    
    // De content is minder dan de scherm resolutie
    if (totalContentHeight < windowHeight){
        var newContentHeight = windowHeight - headerHeight - footerHeight; 
        
        if (newContentHeight > contentHeight){
            myTimer = $.timer(500,function(){  
                $("#container-content").stop(true).animate({
                    height: newContentHeight
                }, {queue:false, duration:'fast'}, 'linear');  
           }); 
        } 
    }
} 

/*$(function(){ 
    jQuery.event.add(window, "load", resizeContentDiv);
    jQuery.event.add(window, "resize", resizeContentDiv);
    
    Cufon.refresh();
    Cufon.replace('#navigation-container ul li, #navigation-container ul li a, #navigation-container ul li a:hover', {
        forceHitArea: true,
        hover: {
            color:'#a24882'
        } 
    }); 
    Cufon.replace('#content h1');     
    Cufon.replace('#content-blok1 h1');
    Cufon.replace('.border-left h1');
    Cufon.replace('#content-blok3 .blok-half h1');
    Cufon.replace('#footer_container_ul_li h2'); 
    Cufon.now(); 
});*/

