jQuery(document).ready(function($){



	//$('#ahachat_title_coupon_color,#ahachat_subtitle_coupon_customize_color,#ahachat_background_coupon_box_color,#ahachat_border_coupon_color').wpColorPicker();

	

	$('#ahachat_title_coupon_color').wpColorPicker({

  

	    change: function (event, ui) {

	        var element = event.target;

	        var color = ui.color.toString();



	        // Add your code here

	        $("h2.ahachat-cartback-widget__title").css("color",color);

	    },



	    clear: function (event) {  

	        var color = '#444444';

	        $("h2.ahachat-cartback-widget__title").css("color",color);

	    }



	});

	$('#ahachat_subtitle_coupon_customize_color').wpColorPicker({

  

	    change: function (event, ui) {

	        var element = event.target;

	        var color = ui.color.toString();



	        // Add your code here

	        $("h3.ahachat-cartback-widget__subtitle").css("color",color);

	    },



	    clear: function (event) {  

	        var color = '#727272';

	        $("h3.ahachat-cartback-widget__subtitle").css("color",color);

	    }



	});

	$('#ahachat_background_coupon_box_color').wpColorPicker({

  

	    change: function (event, ui) {

	        var element = event.target;

	        var color = ui.color.toString();



	        // Add your code here

	        $(".ahachat-widget-preview-content").css("background",color);

	    },



	    clear: function (event) {  

	        var color = '#fffabf';

	        $(".ahachat-widget-preview-content").css("background",color);

	    }



	});

	$('#ahachat_border_coupon_color').wpColorPicker({

  

	    change: function (event, ui) {

	        var element = event.target;

	        var color = ui.color.toString();



	        // Add your code here

	        $(".ahachat-widget-preview-content").css("border-color",color);

	    },



	    clear: function (event) {  

	        var color = '#f7ef90';

	        $(".ahachat-widget-preview-content").css("border-color",color);

	    }



	});

	

});