(function($) {
    'use strict';
    
    // Posodobi predogled, ko se spremeni vrstni red Experience Journeyev
    wp.customize('experience_journey_order', function(setting) {
        setting.bind(function(newValue) {
            wp.customize.previewer.refresh();
        });
    });
    
    // Posodobi predogled, ko se spremeni vrstni red Individual Tours v katerem koli Journey
    $('option[id^="individual_tour_order_"]').each(function() {
        var settingId = $(this).attr('id');
        wp.customize(settingId, function(setting) {
            setting.bind(function(newValue) {
                wp.customize.previewer.refresh();
            });
        });
    });
})(jQuery); 