 $(document).ready(function() {
		
		$('.bis_next').click( function () {
    	$.getJSON('/ajax', {id: $(this).attr('id'), type: 'BISNEXT'},
			function(json) {
				var result = json.result;
				if (result == 1) {
					var newValue = json.bisId + '_' + json.picId;
					//$('#pic_id').html(newValue);
					$('#slidePictureContainer').html(json.image);
					$('.bis_next').attr('id', newValue);
					$('.bis_prev').attr('id', newValue);
					$('#picIndex').html(json.picIndex);
					$('#picText').html(json.picText);
					$('#picIndexMax').html(json.picIndexMax);
					$(function(){
						$('#slidePictureContainer').hide();
						$("img.preload").load(function(){
							$('#slidePictureContainer').fadeIn(500);
						});
					});
				}
			});
   });
	 
	 $('.bis_prev').click( function () {
    	$.getJSON('/ajax', {id: $(this).attr('id'), type: 'BISPREV'},
			function(json) {
				var result = json.result;
				if (result == 1) {
					var newValue = json.bisId + '_' + json.picId;
					//$('#pic_id').html(newValue);
					$('#slidePictureContainer').html(json.image);
					$('.bis_prev').attr('id', newValue);
					$('.bis_next').attr('id', newValue);
					$('#picIndex').html(json.picIndex);
					//alert(json.picText);
					$('#picText').html(json.picText);
					$('#picIndexMax').html(json.picIndexMax);
					$(function(){
						$('#slidePictureContainer').hide();
						$("img.preload").load(function(){
							$('#slidePictureContainer').fadeIn(500);
						});
					});
				}
			});
   });
	 
});

