/*
	Author: Joe Tan (joetan54@gmail.com)
*/


jQuery(function($) {
	$('#search input[type=text]').focus(function() {
		if ($(this).attr('defaultValue') == $(this).val()) {
			$(this).val('');
		}
	});

});

jQuery(function($) {
	$('#sidebar .tabs').tabs({});
});


// social media counts
jQuery(function($) {
	$.getJSON('/wp-content/themes/denimblog/plugins/social.php', {}, function(data, textStatus) { 
/*
		if (data['facebook'] && data['facebook']['fan_count']) {
			$('#site-tools-module .fb-icon-txt').append(' <span class="count">'+data['facebook']['fan_count']+ ' Fans</span>');
		}
*/
		if (data['twitter'] && data['twitter']['followers_count']) {
			$('#site-tools-module .twitter-icon-txt').append(' <span class="count">'+data['twitter']['followers_count']+ ' Followers</span>');
		}
		if (data['feedburner'] && data['feedburner']['feed']) {
			$('#site-tools-module .rss-icon-txt').append(' <span class="count">'+data['feedburner']['feed']['entry']['@attributes']['circulation']+ ' Subscribers</span>');
		}
	});
});
