!function(e){"use strict";window.vc.atts.radioimage={init:function(a,n){e(".radio-image-wrapper label input",n).change((function(){e(this).closest(".radio-image-wrapper").find(".wpb_vc_param_value").val(e(this).val()).trigger("change")}))}},e(".jnews_token_access.facebook").on("click",(function(a){a.preventDefault();var n,t=e(this),i=t.parents("#vc_edit-form-tab-0"),s={client_id:i.find("input.fb_id").val(),client_secret:i.find("input.fb_secret").val(),grant_type:"client_credentials"};e.ajax({url:"https://graph.facebook.com/oauth/access_token",data:s,dataType:"json",type:"POST",beforeSend:function(e){t.parent().find(".jnews-spinner").addClass("active")}}).done((function(e,a,t){n=e.access_token,i.find("input.fb_key").val(n)})).fail((function(e,a,n){window.alert("Info Message: "+n)})).always((function(e,a,n){t.parent().find(".jnews-spinner").removeClass("active")}))})),e(".jnews_instagram_access_token").on("click",(function(e){if(e.preventDefault(),"undefined"!=typeof jnewsinstagramoption){var a="https://api.instagram.com/oauth/authorize?app_id=423965861585747&redirect_uri=https://api.smashballoon.com/instagram-basic-display-redirect.php&response_type=code&scope=user_profile,user_media&state="+jnewsinstagramoption.instagram_callback;window.open(a,"_blank").focus()}}))}(window.jQuery);