( function ( api ) {

    // Extends our custom "example-1" section.
    api.sectionConstructor['plugin-section'] = api.Section.extend(
        {

            // No events for this type of section.
            attachEvents: function () {},

            // Always make the section active.
            isContextuallyActive: function () {
                return true;
            }
        } 
    );

} )(wp.customize);


function hotel26frontpagesectionsscroll( section_id )
{
    var scroll_section_id = "slider-section";

    var $contents = jQuery('#customize-preview iframe').contents();

    switch ( section_id ) {
    case 'accordion-section-booking_setting':
        scroll_section_id = "booking-section";
        break;
        
    case 'accordion-section-about_pg_Settings':
        scroll_section_id = "about-section";
        break;
        
    case 'accordion-section-service_setting':
        scroll_section_id = "service-section";
        break;

    case 'accordion-section-room_setting':
        scroll_section_id = "room-section";
        break;
        
    case 'accordion-section-funfact_setting':
        scroll_section_id = "funfact-section";
        break;
        
    case 'accordion-section-testimonial_setting':
        scroll_section_id = "testimonial-section";
        break;
        
    case 'accordion-section-animation_bars_setting':
        scroll_section_id = "animation_bar_left";
        break;
        
    case 'accordion-section-cta_setting':
        scroll_section_id = "cta-section";
        break;
        
    case 'accordion-section-pricing_setting':
        scroll_section_id = "pricing-section";
        break;
        
    case 'accordion-section-info_setting':
        scroll_section_id = "info-section";
        break;

    case 'accordion-section-award_setting':
        scroll_section_id = "award-section";
        break;
        
    case 'accordion-section-package_setting':
        scroll_section_id = "packages-offers-section";
        break;
        
    case 'accordion-section-choose_setting':
        scroll_section_id = "choose-section";
        break;
        
    case 'accordion-section-info_two_setting':
        scroll_section_id = "info-two-section";
        break;
        
    case 'accordion-section-workflow_setting':
        scroll_section_id = "workflow-section";
        break;
        
    case 'accordion-section-pricing_two_setting':
        scroll_section_id = "pricing-two-section";
        break;
        
    case 'accordion-section-service_two_setting':
        scroll_section_id = "service-two-section";
        break;
        
    case 'accordion-section-food_setting':
        scroll_section_id = "food-menu-section";
        break;
        
    case 'accordion-section-gallery_setting':
        scroll_section_id = "gallery-section";
        break;
        
    case 'accordion-section-team_setting':
        scroll_section_id = "team-section";
        break;
        
    case 'accordion-section-blog_setting':
        scroll_section_id = "post-section";
        break;
        
    case 'accordion-section-custom_setting':
        scroll_section_id = "custom-section";
        break;
        
    case 'accordion-panel-footer_section':
        scroll_section_id = "footer-section";
        break;
    }

    if($contents.find('#'+scroll_section_id).length > 0 ) {
        $contents.find("html, body").animate(
            {
                scrollTop: $contents.find("#" + scroll_section_id).offset().top
            }, 1000
        );
    }
}

jQuery('body').on(
    'click', '#sub-accordion-panel-hotel_26_frontpage_sections .control-subsection .accordion-section-title', function (event) {
        var section_id = jQuery(this).parent('.control-subsection').attr('id');
        hotel26frontpagesectionsscroll(section_id);
    }
);

jQuery('body').on(
    'click', '#accordion-panel-footer_section', function (event) {
        var section_id = jQuery(this).attr('id');
        hotel26frontpagesectionsscroll(section_id);
    }
);

 (function ($) {
    $(document).ready(
        function ($) {
            if($("select").hasClass("contact-icon-picker")) {
                $('.contact-icon-picker.iconPicker').fontIconPicker();
            }
        }
    );
    
 })(jQuery);

jQuery(document).ready(
    function ($) {
        /* Select */
        jQuery("#customize-control-hotel_26_archive_pg_sidebar select, #customize-control-hotel_26_single_pg_sidebar select, #customize-control-hotel_26_blog_pg_sidebar select, #customize-control-hotel_26_search_pg_sidebar select, #customize-control-breadcrumb_back_attach select, #customize-control-team_sec_column select, #customize-control-team_autoplay select, #customize-control-team_loop_rewind select, #customize-control-award_sec_column select, #customize-control-award_autoplay select, #customize-control-award_loop_rewind select, #customize-control-service_three_sec_column select, #customize-control-service_three_autoplay select, #customize-control-service_three_loop_rewind select, #sub-accordion-section-slider_setting select, #customize-control-slider_ttl_clr button, #customize-control-slider_subttl_clr button, #customize-control-slider_desc_clr button, #sub-accordion-section-service_setting select").prop('disabled', true);
     
        /* Input */
        jQuery("#customize-control-breadcrumb_effect_enable input, #customize-control-hotel_26_site_cntnr_width input, [id*=_padding_top], [id*=_padding_bottom], [id*=_margin_top], [id*=_margin_bottom], #customize-control-slider_animation_speed input, #customize-control-service_animation_speed input, #customize-control-team_animation_speed input, #customize-control-award_animation_speed input, #customize-control-service_three_animation_speed input, #customize-control-footer_bg_opacity_clr button, #customize-control-footer_bg_opacity input, #customize-control-service_background_attachment input").prop('disabled', true);
     
        jQuery("#sub-accordion-section-top_scroller .icons-selector").css({ 'pointer-events':'none', 'opacity':'0.7'});
    }
);