$(document).ready(function() {
	var x = 1;

	$('div.items').each(function() {
		this.id = "box" + x++;
        $(this).removeClass('items');
        $(this).addClass('box');
		 // alert(this.id);
	});
	$('.box').hide();

	x = 1;
	
	$('div.cat').each(function() {
		this.id = x++;
		 $( this ).bind (
				 "click",
				 function(){
					 var id = $(this).attr('id');
				     $('#box' + id).toggle(500);
				  }
				);
	});

}); 