/**
* init
**/

Website = {};                      

$(document).ready(function() {       
    
    Website.init();
});                           


Website.init = function() {
        
    // jsEnabled class for body
    $(document.body).addClass('jsEnabled');
    
    // Links met rel="external" moeten in een nieuw venster worden geopend
    $('a[rel="external"]').click( function() {
        //window.open( jQuery(this).attr('href') );
        window.open(this.href,'name','scrollbars=yes,toolbar=yes,location=yes')
        return false;
    });        

         
        
    this.initFormCheckFields();     
    
};

         
/**
* Form Check Fields
**/
var aCheckFields;
var iCheckFields;

Website.initFormCheckFields = function() {             
    
    // Form check fields
    aCheckFields = $('.swisFormCheck');
    iCheckFields = aCheckFields.length;

    
    if(iCheckFields > 0) {
        $.get(Website.Config.sBaseUrl +'default/index/get-default-form-check-value', null,
        this.fillFormCheckFields);
    }
    
};

Website.fillFormCheckFields = function(sFormCheckValue) {
    
    while (iCheckFields--) {
        if (aCheckFields[iCheckFields].value == '') {
            aCheckFields[iCheckFields].value = sFormCheckValue;
        }
    }
    
};

