$(function() {
    $("a[rel*='clearbox[item]']").attr('rel', 'clearboxd[gallery=]');
	
	// reverse menu order because of the float-right property
	$.fn.reverseOrder = function() {
		return this.each(function() {
			$(this).prependTo( $(this).parent() );
		});
	};

	$('#nav li').reverseOrder();	
})
