$(document).ready(function() 
		{
			
			/*//slideshow box mesaje
			$('#listare_bottom').serialScroll({
				items:'div.listare_bottom',	// name/type of container for the element to scroll
				prev:'#listare_bottom a.prev',			//prev button
				next:'#listare_bottom a.next',			//next button
				offset:-1, 		//when scrolling to photo, stop 1 before reaching it (from the left)
				start:0, 		//as we are centering it, start at the 2nd
				step:1,			//how many elements to scroll each time. Use a negative number to go on the other way.
				duration:400,	//slide duration
				force:true, 	//if true, an initial scroll will be forced on start.
				stop:false, 	//if true, the plugin will stop any previous animations of the element, to avoid queuing.
				lock:false, 	//if true(default), the plugin will ignore events if already animating. Then animations can't be queued.
				cycle:true, 	//if true, the first element will be shown after going over the last, and the other way around.
				jump: false 	//if true click on the images to scroll to them
			});
		*/
			
						
		  	$('#next').click(function () {
  						
		  		
		  			
		        	$.ajax({
		          	url: 'get_message.php',
		          	data: 'next_page=next',
		          	type: 'post',
		          	success: function (msg) {
		            	//listare_bottom.html(j.msg);
		            	document.getElementById('message_container').innerHTML = msg;

		            	
		          	}
		        	});
		        	return false;
		    	});
		    	
		    	
		    	$('#prev').click(function () {
  						
		  		
		  			
		        	$.ajax({
		          	url: 'get_message.php',
		          	data: 'prev_page=prev',
		          	type: 'post',
		          	success: function (msg) {
		            	//listare_bottom.html(j.msg);
		            	document.getElementById('message_container').innerHTML = msg;

		            	
		          	}
		        	});
		        	return false;
		    	});
		  	
			
			

			// get current number of characters
			$('#counter').html(110 - $('#obicei').val().length );
			
			$('#obicei').keyup(function()
			{
				// get new length of characters
				$('#counter').html(110 - $(this).val().length );
			});

			
		});