say = function(str) {
    if (typeof(console) == 'object') {
        console.log(str);
    }
};

$(document).ready(function(){
    
    Nifty("div#vd_teaserbox_border,div#vd_teaserbox","same heigth small");
    Nifty("div.vd_border,div.vd_item","small");
    Nifty("div.vd_border","small");
    Nifty("div.vd_item_inactive","small");
    Nifty("div.vd_item_navbar","top small");
    Nifty("div.vd_feedback","small");
   
    Nifty("div#vd_headereffect_top,div.vd_navbar,div.vd_error","top small");
    Nifty("div#vd_headereffect_bottom","fixed-height bottom small");
    
    //Top buttons (not working in MSIE)
    if (! /MSIE (\d+\.\d+);/.test(navigator.userAgent)){
        Nifty("div.vd_topbutton","top small");
        Nifty("div.vd_topbutton div","top small");
    }
    
    if ($.growl) {
        $.growl.settings.displayTimeout = 7000;
        $.growl.settings.noticeCss = {position: 'relative'};
        
        $.growl.settings.noticeTemplate = ''
            + '<div class="vd_growl vd_growl_%priority%">'
            + '  <img src="/static/share/style/validad/icons/%image%_32x32.png" />'
            + '  <h3>%title%</h3>'
            + '  <p>%message%</p>'
            + '</div>';
            
        $(document).ajaxError(function(event, request, settings){
            event.stopImmediatePropagation();
            $.growl('System error', 'Error requesting the document <strong>' + settings.url + '</strong> could not be loaded', 'error');
        });
        
    }
    

});


