function init_tpl_side_images() {
    var $window = $(window);
    var $body = $('body');
    var $h1 = $('.content-path:first');
    var bgi = 'background-image';
    var minWidthToShow = 1200; // px
    $body.data(bgi, $body.css(bgi));
    $h1.data(bgi, $h1.css(bgi));
    $window.resize(function(){
        if ($body.width() <= minWidthToShow) {
            $body.css(bgi, 'none');
            $h1.css(bgi, 'none');
        } else {
            $body.css(bgi, $body.data(bgi));
            $h1.css(bgi, $h1.data(bgi));
        }
    }).resize(); 
}

function init_popup_images() {
    var default_opts = {
        maxWidth: '90%',
        maxHeight: '90%',
        current: 'Фото {current} из {total}',
        previous: 'предыдущее',
        next: 'следующее',
        close: 'закрыть'
    };
    $('.colorbox').colorbox(default_opts);
    
    var catalog_opts = default_opts;
    catalog_opts.width = 900;
    $('.colorbox-catalog').colorbox(catalog_opts);
}


