/**
 * Admin JS
 */

jQuery(document).ready(function() {

	/* Latest News Content */
    var data = {
        action: 'feed_action',
    };
	jQuery.post(ajaxurl, data, function(response) {
		jQuery("#fluida-news .inside").html(response);
    });
    jQuery.post(ajaxurl, data, function(response) {
        jQuery("#fluida-news .inside").html(response);
    });
				
	/* Confirm modal window on reset to defaults */
	jQuery('#fluida_reset_defaults').click (function() {
		if (!confirm(reset_confirmation)) { return false;}
	});
	
	/* jQuery version for admin page system info */
	text = jQuery('#cryout-sysinfo').val();
	text = text.replace('jQuery not detected', jQuery.fn.jquery);
	if(text.length) jQuery('#cryout-sysinfo').val(text);

});/* document.ready */


/* FB like button */
(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.0";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));

/* Twitter follow button */
window.twttr = (function (d, s, id) {
  var t, js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src= "https://platform.twitter.com/widgets.js";
  fjs.parentNode.insertBefore(js, fjs);
  return window.twttr || (t = { _e: [], ready: function (f) { t._e.push(f) } });
}(document, "script", "twitter-wjs"));

/* FIN */