$(document).ready(function(){
	$("*[blockId][ajax='true']").each(function(i,e){
		var blockId = $(this).attr("blockId");
		var type = $(this).attr("type");
		var refresh = $(this).attr("refresh");
		var cron = $(this).attr("cron");
		var storage = $(this).attr("storage");
		var encrypt = $(this).attr("encrypt");
		if (!encrypt) {
			encrypt = "false";
		}
		$.post(window.location.href,{blockId:blockId,type:type,refresh:refresh,cron:cron,storage:storage,encrypt:encrypt},function(data){
			var cont = data;
			if (encrypt == "true") {
				cont = $.base64Decode(cont);
			}
			if ($.trim(cont) != "") {
				$(e).html(cont);
			}
		});
	});
});

