// hack shadowbox for wp custom menus
// set title in custom menus to shadowbox
// this will set the title to the title of the menu
// and the rel for shadow box to work

$(document).ready(function() {					   
	var e = document.getElementById('nav').getElementsByTagName('a');
	
	if(e) {
	var j = e.length;
	
	for(var i = 0; i < j; i++) {
		var t = $(e[i]).attr('title');
		if(t == "shadowbox") {
			$(e[i]).attr('rel', 'shadowbox;width=420;height=400');
			$(e[i]).attr('title', e[i].innerHTML);}			
	} } //end hack
	
	Shadowbox.init();
});
