
var front = {
	box : { 
		get: function (element_id) {
			// check if element exists
			if (jQuery('#' + element_id).length > 0) { 
				// load msg before update
				jQuery('#' + element_id).html('<img src="' + doc_root + 'misc/icons/loader.gif" style="padding:45%;" />');
				
				jQuery.post(doc_root + 'includes/ajax/front.' + element_id + '.get.php', {
					// params
				}, function (data, status) {
					jQuery('#' + element_id).html(data); 
				},'json');
			}		
		}
	},
	
	community_brands: {
		get: function() {
			jQuery.post(doc_root + 'includes/ajax/front.community-brands.get.php', {
				// params
			}, function (data, status) {
				var html = '<ul>';
				for (var i = 0; i < data.brands.length;  i++) {
					html += '<li><img src="' + doc_root + 'misc/icons/Audi_Logo_klein.jpg" border="0" height="30"/> ' + data.brands[i] + '</li>';
				}
				html += '</ul>';
				
				jQuery('#community-brands').html(html);
				
			},'json');
		}
	},
	technology_cloud: {
		get: function() {
			jQuery.post(doc_root + 'includes/ajax/front.tagbox.get.php', {
				// params
			}, function (data, status) {
				jQuery('#technology-tagcloud').html(data.technology_tagcloud);
				
			},'json');
			
		}	
	}

};
