 /**
   * The Customize Theme Script.
   *
   *
   * @package   cuisine WordPress Theme
   * @copyright Copyright (C) 2015, OrdaSoft
   * @license  http://www.gnu.org/licenses/gpl-2.0.html  GNU General Public License v2 or later
   * @author    AUTHOR <www.ordasoft.com>
   * themeslug is distributed under the terms of the GNU GPL
   */
( function( $ ) {

//***********************General*********************
wp.customize( 'cuisine_soc_facebook', function( value ) {
        value.bind( function( newval ) {
            $('.facebook').keypress( newval );
        } );
    } );

    wp.customize( 'cuisine_theme_color', function( value ) {
        value.bind( function( newval ) {
            $('.widget_title_content_top').css('background', newval );
        } );
    } );

    wp.customize( 'cuisine_theme_color', function( value ) {
        value.bind( function( newval ) {
            $('.title').css('background', newval );
        } );
    } );

    wp.customize( 'cuisine_theme_color', function( value ) {
        value.bind( function( newval ) {
            $('.page-numbers').css('background', newval );
        } );
    } );

    wp.customize( 'cuisine_theme_color', function( value ) {
        value.bind( function( newval ) {
            $('.add_to_cart_button').css('background', newval );
        } );
    } );

    wp.customize( 'cuisine_theme_color', function( value ) {
        value.bind( function( newval ) {
            $('.button').css('background', newval );
        } );
    } );

    wp.customize( 'cuisine_theme_color', function( value ) {
        value.bind( function( newval ) {
            $('.more-button').css('background', newval );
        } );
    } );

    wp.customize( 'cuisine_theme_color', function( value ) {
        value.bind( function( newval ) {
            $('.product-category h3').css('color', newval );
        } );
    } );

    wp.customize( 'cuisine_theme_color', function( value ) {
        value.bind( function( newval ) {
            $('.title-home-page').css('background', newval );
        } );
    } );

    wp.customize( 'cuisine_theme_color', function( value ) {
        value.bind( function( newval ) {
            $('#myTab .active').css('background', newval );
        } );
    } );

    wp.customize( 'cuisine_theme_color', function( value ) {
        value.bind( function( newval ) {
            $('.wpcf7-submit').css('background', newval );
        } );
    } );

    wp.customize( 'cuisine_theme_color', function( value ) {
        value.bind( function( newval ) {
            $('#myTab a').css('color', newval );
        } );
    } );

    wp.customize( 'cuisine_theme_color', function( value ) {
        value.bind( function( newval ) {
            $('.page-content h3').css('color', newval );
        } );
    } );

//----------------------Body font
    wp.customize( 'cuisine_body_font', function( value ) {
        value.bind( function( newval ) {
            $('body').css('font-family', newval );
        } );
    } );

//-------------------Body font size
    wp.customize( 'cuisine_font_size', function( value ) {
        value.bind( function( newval ) {
            $('body').css('font-size', newval+'px' );
        } );
    } );

//---------------------Body font color
    wp.customize( 'cuisine_font_color', function( value ) {
        value.bind( function( newval ) {
            $('body').css('color', newval );
        } );
    } );

//----------------------Theme Color
    wp.customize( 'cuisine_theme_color', function( value ) {
        value.bind( function( newval ) {
            $('.widget_title').css('background', newval );
        } );
    } );

    wp.customize( 'cuisine_theme_color', function( value ) {
        value.bind( function( newval ) {
            $('.theme-color').css('background', newval );
        } );
    } );

    wp.customize( 'cuisine_theme_color', function( value ) {
        value.bind( function( newval ) {
            $('.more-button').css('background', newval );
        } );
    } );

    wp.customize( 'cuisine_theme_color', function( value ) {
        value.bind( function( newval ) {
            $('.add_to_cart_button').css('background', newval );
        } );
    } );

    wp.customize( 'cuisine_theme_color', function( value ) {
        value.bind( function( newval ) {
            $('input[type="submit"]').css('background', newval );
        } );
    } );

    wp.customize( 'cuisine_theme_color', function( value ) {
        value.bind( function( newval ) {
            $('.page-numbers').css('background', newval );
        } );
    } );

    wp.customize( 'cuisine_theme_color', function( value ) {
        value.bind( function( newval ) {
            $('.button').css('background', newval );
        } );
    } );

    wp.customize( 'cuisine_theme_color', function( value ) {
        value.bind( function( newval ) {
            $('.onsale').css('background', newval );
        } );
    } );

    wp.customize( 'cuisine_theme_color', function( value ) {
        value.bind( function( newval ) {
            $('#wp-calendar caption').css('background', newval );
        } );
    } );

    wp.customize( 'cuisine_theme_color', function( value ) {
        value.bind( function( newval ) {
            $('.menu-item-has-children ul').css('background', newval );
        } );
    } );

    wp.customize( 'cuisine_theme_color', function( value ) {
        value.bind( function( newval ) {
            $('.shadow').css('text-shadow', newval );
        } );
    } );

    wp.customize( 'cuisine_theme_color', function( value ) {
        value.bind( function( newval ) {
            $('.desc').css('border-left-color', newval );
        } );
    } );

    wp.customize( 'cuisine_theme_color', function( value ) {
        value.bind( function( newval ) {
            $('.menu-item:before').css('border-color', newval );
        } );
    } );

    wp.customize( 'cuisine_custom_css', function( value ) {
        value.bind( function( newval ) {
          $( '#cuisine-custom-css' ).html( newval );
        } );
      } );

    wp.customize( 'header_layout_home', function( value ) {
        value.bind( function( newval ) {
          $( '.header' ).html( newval );
        } );
      } );

//----------------------Body link size
    wp.customize( 'cuisine_link_size', function( value ) {
        value.bind( function( newval ) {
            $('body a').css('font-size', newval );
        } );
    } );

//----------------------Body links color
    wp.customize( 'cuisine_link_color', function( value ) {
        value.bind( function( newval ) {
            $('body a').css('color', newval );
        } );
    } );

//---------------Body link hover color
    wp.customize( 'cuisine_link_hover_color', function( value ) {
        value.bind( function( newval ) {
            $('body a:hover').css('color', newval );
        } );
    } );

//------------------Body link decoration
    wp.customize( 'cuisine_link_underline', function( value ) {
        value.bind( function( newval ) {
            $('body a').css('text-decoration', newval );
        } );
    } );

//--------------------Body link hover decoration
    wp.customize( 'cuisine_link_underline_hover', function( value ) {
        value.bind( function( newval ) {
            $('body a:hover').css('text-decoration', newval );
        } );
    } );

//--------------------Custom CSS
    wp.customize( 'cuisine_custom_css', function( value ) {
        value.bind( function( newval ) {
            $('body').text(' ', newval );
        } );
    } );


//--------------------Logo
    wp.customize( 'cuisine_logo_img', function( value ) {
        value.bind( function( newval ) {
            $('body').html('img', newval );
        } );
    } );

    wp.customize( 'cuisine_soc_size', function( value ) {
        value.bind( function( newval ) {
            $('#social a').css('font-size', newval );
        } );
    } );


//--------------------------------typography------------------------------------------

wp.customize( 'cuisine_h1_font', function( value ) {
        value.bind( function( newval ) {
            $('body h1').css('font-family', newval );
        } );
    } );
wp.customize( 'cuisine_h1_color', function( value ) {
        value.bind( function( newval ) {
            $('body h1').css('color', newval );
        } );
    } );

wp.customize( 'cuisine_h2_font', function( value ) {
        value.bind( function( newval ) {
            $('body h2').css('font-family', newval );
        } );
    } );
wp.customize( 'cuisine_h2_color', function( value ) {
        value.bind( function( newval ) {
            $('body h2').css('color', newval );
        } );
    } );

wp.customize( 'cuisine_h3_font', function( value ) {
        value.bind( function( newval ) {
            $('body h3').css('font-family', newval );
        } );
    } );
wp.customize( 'cuisine_h3_color', function( value ) {
        value.bind( function( newval ) {
            $('body h3').css('color', newval );
        } );
    } );

wp.customize( 'cuisine_h4_font', function( value ) {
        value.bind( function( newval ) {
            $('body h4').css('font-family', newval );
        } );
    } );
wp.customize( 'cuisine_h4_color', function( value ) {
        value.bind( function( newval ) {
            $('body h4').css('color', newval );
        } );
    } );

wp.customize( 'cuisine_h5_font', function( value ) {
        value.bind( function( newval ) {
            $('body h5').css('font-family', newval );
        } );
    } );
wp.customize( 'cuisine_h5_color', function( value ) {
        value.bind( function( newval ) {
            $('body h5').css('color', newval );
        } );
    } );

wp.customize( 'cuisine_h6_font', function( value ) {
        value.bind( function( newval ) {
            $('body h6').css('font-family', newval );
        } );
    } );
wp.customize( 'cuisine_h6_color', function( value ) {
        value.bind( function( newval ) {
            $('body h6').css('color', newval );
        } );
    } );


//-----------------------------menu-------------------------------------------
    wp.customize( 'cuisine_menu_font', function( value ) {
        value.bind( function( newval ) {
            $('.nav-menu ul li a').css('font-family', newval );
        } );
    } );

    wp.customize( 'cuisine_menu_font', function( value ) {
        value.bind( function( newval ) {
            $('#menu-menu li a').css('font-family', newval );
        } );
    } );

    wp.customize( 'cuisine_menu_font_size', function( value ) {
        value.bind( function( newval ) {
            $('.nav-menu ul li a').css('font-size', newval+'px');
        } );
    } );

    wp.customize( 'cuisine_menu_font_size', function( value ) {
        value.bind( function( newval ) {
            $('#menu-menu li a').css('font-size', newval+'px');
        } );
    } );

    wp.customize( 'cuisine_menu_margin', function( value ) {
        value.bind( function( newval ) {
            $('.nav-menu ul li').css('margin', newval+'px');
        } );
    } );

    wp.customize( 'cuisine_menu_margin', function( value ) {
        value.bind( function( newval ) {
            $('#menu-menu li').css('margin', newval+'px');
        } );
    } );

    wp.customize( 'cuisine_menu_color', function( value ) {
        value.bind( function( newval ) {
            $('.nav-menu ul li a').css('color', newval );
        } );
    } );

    wp.customize( 'cuisine_menu_hover_color', function( value ) {
        value.bind( function( newval ) {
            $('.nav-menu ul li a:hover').css('color', newval  );
        } );
    } );

    wp.customize( 'cuisine_menu_underline', function( value ) {
        value.bind( function( newval ) {
            $('.nav-menu ul li a').css('text-decoration', newval  );
        } );
    } );

    wp.customize( 'cuisine_menu_underline_hover', function( value ) {
        value.bind( function( newval ) {
            $('.nav-menu ul li a:hover').css('text-decoration', newval  );
        } );
    } );

    wp.customize( 'cuisine_submenu_color', function( value ) {
        value.bind( function( newval ) {
            $('.children li a').css('color', newval  );
        } );
    } );

    wp.customize( 'cuisine_submenu_hover_color', function( value ) {
        value.bind( function( newval ) {
            $('.children li a:hover').css('color', newval  );
        } );
    } );

//soc icons---------------------------------------------------------------------------------------------------------------------------------------------------

    wp.customize( 'cuisine_soc_size', function( value ) {
        value.bind( function( newval ) {
            $('#social a').css('font-size', newval+'px' );
        } );
    } );

    wp.customize( 'cuisine_soc_color', function( value ) {
        value.bind( function( newval ) {
            $('#social a').css('color', newval );
        } );
    } );

    wp.customize( 'cuisine_soc_color_hover', function( value ) {
        value.bind( function( newval ) {
            $('#social a:hover').css('color', newval );
        } );
    } );



    wp.customize( 'cuisine_home_width', function( value ) {
        value.bind( function( newval ) {
          $( '#content' ).removeClass("container").addClass( newval );
        } );
    } );


    wp.customize( 'cuisine_products_column', function( value ) {
        value.bind( function( newval ) {
          $( 'div[row="one-product"]' ).removeClass().addClass( newval );
        } );
    } );

    wp.customize( 'cuisine_shop_show', function( value ) {
        value.bind( function( newval ) {
          $( '#shop-section' ).attr( 'style', newval );
        } );
    } );

    wp.customize( 'cuisine_any_section_show', function( value ) {
        value.bind( function( newval ) {
          $( '#any-section' ).attr( 'style', newval );
        } );
    } );

    wp.customize( 'cuisine_content_show', function( value ) {
        value.bind( function( newval ) {
          $( '.page-content' ).attr( 'style', newval );
        } );
    } );

//--------------------------------Header text shw-------------------------------------------------

    wp.customize( 'cuisine_header_text_show', function( value ) {
        value.bind( function( newval ) {
          $( '#plate' ).attr( 'style', newval );
        } );
    } );

    wp.customize( 'cuisine_header_text1', function( value ) {
        value.bind( function( newval ) {
          $( '.text5' ).html( newval );
        } );
      } );

    wp.customize( 'cuisine_header_text2', function( value ) {
        value.bind( function( newval ) {
          $( '.text1' ).html( newval );
        } );
      } );

    wp.customize( 'cuisine_header_text3', function( value ) {
        value.bind( function( newval ) {
          $( '.text2' ).html( newval );
        } );
      } );

    wp.customize( 'cuisine_header_text4', function( value ) {
        value.bind( function( newval ) {
          $( '.text3' ).html( newval );
        } );
      } );

    wp.customize( 'cuisine_header_text5', function( value ) {
        value.bind( function( newval ) {
          $( '.text4' ).html( newval );
        } );
      } );

//-----------------------header layout -------------------------------------------------

    wp.customize( 'cuisine_button_text', function( value ) {
        value.bind( function( newval ) {
          $( '.button-about' ).html( newval );
        } );
      } );

    wp.customize( 'cuisine_more_button', function( value ) {
        value.bind( function( newval ) {
          $( '.more-button' ).html( newval );
        } );
      } );


    wp.customize( 'cuisine_header_layout_home', function( value ) {
            value.bind( function( newval ) {
              $( '.header' ).attr("id", newval);
            } );
        } );

     wp.customize( 'cuisine_home_blog_title', function( value ) {
        value.bind( function( newval ) {
          $( '.title' ).html( newval );
        } );
    } );

     wp.customize( 'cuisine_home_blog_desc', function( value ) {
        value.bind( function( newval ) {
          $( '.title-desc' ).html( newval );
        } );
    } );

     wp.customize( 'cuisine_home_shop_title', function( value ) {
        value.bind( function( newval ) {
          $( '.title' ).html( newval );
        } );
    } );

     wp.customize( 'cuisine_home_shop_desc', function( value ) {
        value.bind( function( newval ) {
          $( '.title-desc' ).html( newval );
        } );
    } );

     wp.customize( 'cuisine_any_section_title', function( value ) {
        value.bind( function( newval ) {
          $( '.title' ).html( newval );
        } );
    } );

     wp.customize( 'cuisine_any_section_desc', function( value ) {
        value.bind( function( newval ) {
          $( '.title-desc' ).html( newval );
        } );
    } );


    //Footer-------------------

    wp.customize( 'cuisine_footer_background', function( value ) {
        value.bind( function( newval ) {
            $('.site-footer').css('background', newval );
        } );
    } );

    wp.customize( 'cuisine_copyright_text', function( value ) {
        value.bind( function( newval ) {
            $('.site-footer').css('background', newval );
        } );
    } );

    wp.customize( 'cuisine_copyright_font', function( value ) {
        value.bind( function( newval ) {
            $('#copyright p').css('font-family', newval );
        } );
    } );

    wp.customize( 'cuisine_copyright_font', function( value ) {
        value.bind( function( newval ) {
            $('#copyright a').css('font-family', newval );
        } );
    } );

    wp.customize( 'cuisine_copyright_font_size', function( value ) {
        value.bind( function( newval ) {
            $('#copyright a').css('font-size', newval+'px' );
        } );
    } );

    wp.customize( 'cuisine_copyright_font_size', function( value ) {
        value.bind( function( newval ) {
            $('#copyright p').css('font-size', newval+'px' );
        } );
    } );

    wp.customize( 'cuisine_copyright_color', function( value ) {
        value.bind( function( newval ) {
            $('#copyright p').css('color', newval );
        } );
    } );

    wp.customize( 'cuisine_copyright_color', function( value ) {
        value.bind( function( newval ) {
            $('#copyright a').css('color', newval );
        } );
    } );

    wp.customize( 'cuisine_copyright_hover_color', function( value ) {
        value.bind( function( newval ) {
            $('#copyright a:hover').css('color', newval );
        } );
    } );

    wp.customize( 'cuisine_copyright_underline', function( value ) {
        value.bind( function( newval ) {
            $('#copyright a').css('text-decoration', newval );
        } );
    } );

    wp.customize( 'cuisine_copyright_underline_hover', function( value ) {
        value.bind( function( newval ) {
            $('#copyright a:hover').css('text-decoration', newval );
        } );
    } );

    wp.customize( 'cuisine_copyright_text', function( value ) {
        value.bind( function( newval ) {
          $( '#copyright p' ).html( newval );
        } );
    } );


} )( jQuery );

