var lm = {
    timer : 400,

    insert : function(targets, funkcja) {
        var ok = true;
        for(var target in targets) {
            var desthtml = $el(target);
            if (desthtml) {
                /* nie powinna usuwać wcześniej załadowanych stylów */
//                alert('Wdupczam do ' + target + ': ' + targets[target]);
                desthtml.innerHTML += targets[target];
            } else {
                ok = false;
                alert(
                    "Rozpacz!!! Problem z umieszczeniem w elemencie:\n\r" +
                        target);
            }
        }
        if (funkcja) funkcja();
        return ok;

    },

    current_layout : -1
}

//ajaxAction.setLayoutManager(lm);

/* MENU LEWE */

var currentMenu = null;
var classMemory = null;

function menu(action, button) {
    if (currentMenu != null) {
        currentMenu.className = classMemory;
    }

    if (button) {
        classMemory = button.className;
        currentMenu = button;
        button.className += ' selected';
    }
    ajaxAction.menuAction(action);
}

function home(button){
    menu('start', button);
}

function o_firmie(button){
    menu('firma', button);
//    menu('firma_home', button);
}

function sklepy(button){
    menu('sklepy_home', button);
}


function produkty(button){
    menu('produkty_home', button);
}

function savoir(button){
    menu('savoir_vivre_home', button);
}

function informacje(button){
    menu('news_home', button);
}

function pressroom(button){
    menu('pressroom_home', button);
}

function kontakt(button){
    menu('kontakt_home', button);
}

function fullimage(img, bigPath){

    var image = img.src;
    var tab = ImageChanger.pathFile(image);

    if (!bigPath) bigPath = tab['path'] + '_big';
    var bigImage = bigPath + '/' + tab['file'];
    
//    ajaxAction.setBack(true);
//      $('#_disabledPane').append('<img id="image_preview" style=";border:1px solid white;margin-top:120px;max-height:500px"  onclick="$('+"'image_preview'"+').remove();ajaxAction.setBack(false);" src="'+image+'"/>');
    $('body').append('<div id="szadok" onclick="$('+"'#szadok'"+').remove()"><img style="border:1px solid white;margin-top:5%;max-height:80%;max-width:80%"  onclick="$('+"'#szadok'"+').remove()" src="'+bigImage+'"/></div>');
    $('#szadok').fadeIn('slow');

}