//document.write('<script type="text/javascript" src="/themasites/javascript/global.js"></script>');
document.write('<script type="text/javascript" src="/themasites/flash/jw_flv_player/swfobject.js"></script>');

document.write('<script type="text/javascript" src="/themasites/javascript/overlib417/overlib.js"><!-- overLIB (c) Erik Bosrup --></script>');
document.write('<script type="text/javascript" src="/themasites/javascript/overlib417/overlib_cssw3c.js"></script>');
document.write('<script type="text/javascript" src="/themasites/javascript/beeldvergroting.js"></script>');
document.write('<script type="text/javascript" src="/themasites/javascript/jquery/jquery.form.js"></script>');
document.write('<script type="text/javascript" src="/themasites/javascript/jquery/jquery.dimensions.js"></script>');
document.write('<script type="text/javascript" src="/themasites/javascript/jquery/jquery.tablesorter.pack.js"></script>');

/** In Europa vpro package */
document.write('<script type="text/javascript" src="/themasites/javascript/ineuropa/vpro.js"></script>');

document.write('<script type="text/javascript" src="/themasites/javascript/ineuropa/leesmeer.js"></script>');


var messageCache = new Array();
/*
* object om dynamische textjes mee te laden
*/
function MessageLoader(){
    this.loadMessage = function(key){
        this.key = key;
        this.props = {
                key:        key,
                section:    'ineuropa.kaft'
        }
        var ref = this;

        $.get(contextPath + '/ajax/texts.jsp', this.props, function(result){
            messageCache[ref.key] = result;
        });
    }
};

/*
* function that loads any number of dynamic texts from the server
* @param keys and array of Strings
*/
function loadMessages(keys){
    for(key in keys){
        loader = new MessageLoader();
        loader.loadMessage(keys[key]);
    }
}


$(function() {
      // POR-1215: Open links in same window regardless what for shit that is in target and onclick attributes
      $("div.description a").click(function() {
                                       if (new RegExp('http://.*vpro\.nl/.*').test(this.href)) {
                                           document.location = this.href;
                                           return false;
                                       } else {
                                           return true;
                                       }
                                   });
});