function dynamic_comments_show()
{
		$(".article").hide();
		$(".comments").show();
		if($(".comments").html() == "")
		{
			$(".comments").append("<p style=\"text-align:center;\"><img src=\"http://www.gadgetine.com/wp-content/themes/boot/img/ajax-loader.gif\" alt=\"loading\" style=\"text-align:center;\"/></p>");
			$.ajax({ url: "http://www.gadgetine.com/wp-content/themes/boot/ajax_comments.php", data: "id="+cid, dataType: "html", success: function(d) {
				$(".comments").html(d);
				}
			});
		}

}

function dynamic_comments_hide()
{
	$(".comments").hide();
	$(".article").show();
	size_pictures();
}

$(document).ready(function(){
	
	var str = document.location.toString();
	if(str.indexOf("#comments") != -1)
	{
		dynamic_comments_show();
	}
	else if(str.indexOf("#respond") != -1)
	{
		dynamic_comments_show();
	}
	else
	{
		dynamic_comments_hide();
	}
		

	setTimeout("size_pictures()",1000);
});

	function size_pictures() {
		$('.text img').each(function(index) {
		  if ($(this).width() > 490) {
				$(this).css('width', '490px');
		  }
		});
	}