$( document ).ready( function(){

	var items = new Array(
		{ id: 1, type: 1 },
		{ id: 2, type: 1 },
		{ id: 3, type: 1 },
		{ id: 4, type: 1 },
		{ id: 5, type: 1 },
		{ id: 6, type: 1 },
		{ id: 7, type: 1 },
		{ id: 8, type: 1 },
		{ id: 9, type: 1 },
		{ id: 10, type: 1 },
		{ id: 11, type: 1 },
		{ id: 12, type: 1 },
		{ id: 13, type: 1 },
		{ id: 14, type: 1 },
		{ id: 15, type: 1 },
		{ id: 16, type: 1 },
		{ id: 17, type: 1 },
		{ id: 18, type: 1 },
		{ id: 0, type: 0 },
		{ id: 0, type: 0 }
	);

	var msgs = '';
	for( var i = 0; i < items.length; i++ ){
		if( items[i].type == 1 ){
			msgs += '<li class="pi" id="u'+items[i].id+'"><img class="logo" src="img/c/c' + items[i].id + '.gif" alt="" width="149" height="99"><img src="img/c/n' + items[i].id + '.gif" alt="" width="149" height="48"></li>';
		} else {
			msgs += '<li class="po" valign="top"><img src="img/0.gif" alt="" width="97" height="97"></li>';
		}
	}
	$( '#lenta' ).html( msgs );

	$( '.pi' ).hover( 
		function(){ 
			var id = $( this ).attr( 'id' );
			id = parseInt( id.substr( 1 ) );
			$( '#u' + id + ' .logo' ).attr( 'src', 'img/c/h' + id + '.gif' );
		},
		function(){ 
			var id = $( this ).attr( 'id' );
			id = parseInt( id.substr( 1 ) );
			$( '#u' + id + ' .logo' ).attr( 'src', 'img/c/c' + id + '.gif' );
		} 
	);

});
