function change_company(element) {
	var bid = element.attr('id');	
	var comp_name = element.attr('title');	
	var div_name = '';
	
	$("#brand_text div").each( function(i) {
		var div_name = this.id.replace('lb','');		
		if (div_name == bid) {
			$('#' + this.id).css('display','block');
			//$('#comp_name').text(comp_name);
		} else {
			$('#' + this.id).css('display','none');
		}
	});

}

function change_height() {
	var max_height = 0;
	$("div .offer").each( function(i) {
		var div_id = "#" + this.id;
		var curr_height = parseInt($(div_id).outerHeight());
		if (max_height < curr_height) {
			max_height = curr_height;
		}
	});
	$("div .offer").css('height',max_height + 'px');
}

function loadTip(x,y,tip_text) {
	
	var code = '';
	
	if (tip_text.indexOf('|') >= 0) {
		var arr = tip_text.split('|');
		code = '<h2>' + arr[0] + '</h2>' + arr[1];
		$('#inner').html(code);
	} else {
		code = '<h2>Learn More</h2>' + tip_text;
		$('#inner').html(code);
	}
	
	$('#learn_more_float').modal();
}
