// OT Document JAVASCRIPT

window.addEvent('domready', function () {
	$$('span.title-mod span, span.contact-name, h1.title, div.manufacturer-details-view h1, h1.category-title, h2.itemTitle').each(function (item) {
		var parts  = item.get('text').clean().split(' ');
		parts[0] = "<span class='first-word'>" + parts[0] + "</span>";
		
		item.set('html', parts.join(' '));
	});
});


function equalheight(){
	
	var hleft = 0;
	var hright = 0;
	if(document.getElementById('hleftcol') != null){
		hleft = document.getElementById('hleftcol').offsetHeight;
	}
	if(document.getElementById('hrightcol') != null){
		hright = document.getElementById('hrightcol').offsetHeight;
	}
	if(document.getElementById('hcontent') != null){
		var hcontent = document.getElementById('hcontent').offsetHeight;
	}
	if(document.getElementById('hmainbody') != null){
		var hmainbody = document.getElementById('hmainbody').offsetHeight;
	}
	
	hbase = Math.max(hleft, hright);
	if(hleft>0) {
		document.getElementById('hleftcol').style.height = hbase + 'px';
	}
	if(hright>0) {
		document.getElementById('hrightcol').style.height = hbase + 'px';
	}
	
}
window.addEvent ('load', function() {
	equalheight();
});