

$(document).ready(function() {
even();
longDiv();

});


function longDiv() {
//( Longdiv is looooooooooooooooooooooooong! :] 
	if ($('.longdiv').length>0) {
		h = $('.longdiv').parent().height();
		h = h.toString() + 'px';
		$('.longdiv').css({height: h});
	}
}





function drops() {
	$('.drops > div').hover(
		function() {
			$('div', this).show();
		},
		function() {
			$('div', this).hide();
		}
	);
}


function orly_init() {
	links = $('.confirm');
	links.click(function(e){
		if (!confirm('ORLY?')) {
			e.preventDefault();
		}
	})
}


function titling() {
 	imgs = $('img[title]');
 	imgs.each(function(){
		src = this.src;
		text = this.title;
		w = 2 + 2 * parseInt($(this).css('marginLeft')) + 2 * parseInt($(this).css('paddingLeft'));
		w = (w + $(this).width()).toString() + 'px;';
		
		//f = ($(this).css('float').toString());
		f = $(this).css('float');
		style = 'text-align: center;' + 'width:' + w  + 'float:' + f;
	 
		div = '<div class="titled" style="' + style + '"><img src="' + src +'" alt=""/>'+ text + '</div>';
		
	 	$(this).replaceWith(div);
 	})
 
 }
 
 
 
function even() {

 	$('#left .menu .body a:odd').addClass('alt');
 }