function dom_init(){
	if($$('#logowall')) client_blurb_init()
}

function client_blurb_init(){
	$$('.blurb').each(function(e){
		e.hide()
		//e.setStyle({'z-index':'99'})
		Event.observe(e.ancestors().first(), 'mouseover', blurb_on)
		Event.observe(e.ancestors().first(), 'mouseout', blurb_off)
		e.ancestors().first().setStyle({'cursor':'pointer'})
	})
	
	$$('#logowall div .case-study').each(function(e){
		e.hide()
	})
	
	$$('#logowall div').each(function(e){
		/*Event.observe(e, 'mouseover', blurb_on)
		Event.observe(e, 'mouseout', blurb_off)
		e.setStyle({'z-index':'-1', 'cursor':'pointer'})*/
	})
}

function blurb_on(e){
	this.select('.blurb').first().show()
	//this.select('img').first().setStyle({'outline':'#CB2122 solid 2px'}) // wish we could use outline, but IE doesn't support it :(
	this.select('img').first().setStyle({'border':'2px solid #CB2122', 'top' : '-2px', 'left' : '-2px'})
	if(!(this.select('.right').length)){
		arrange_zindexes($$('#logowall div'))
	}else{
		arrange_zindexes($$('#logowall div').reverse())
	}
}

function blurb_off(e){
	this.select('.blurb').first().hide()
	this.select('img').first().setStyle({'border':'none', 'top' : '0', 'left' : '0'})
}

function arrange_zindexes(blocks){
	var blocks = blocks
	var zi = 1000;
	
	if(blocks){
	    blocks.each(function(block, i) {
	        block.style.zIndex = zi--;
	    });
	}
}



document.observe('dom:loaded', dom_init)