function arraySearch( value, arr ) {
	for (var i = 0; i < arr.length; i++) {
		if (arr[i].indexOf( value ) !== -1) {
			return (true);
		}
	}
	return (false);
}

var kepek = new Array;
kepek.concat(document.images);

function loadImage( src ) {
	if (!arraySearch( 'sys/image.php?file='+src+'&width=271&height=384&vagott', kepek )) {
	  $('.biggerpic').fadeTo("slow",0, function() {
		$('.biggerpic').html('<div style="width: 271px; height: 384px; background: url(static/images/load.gif) center center no-repeat;"></div>').fadeTo('fast',1);
		 var img = new Image();
		  $(img).load(function() {
			$('.biggerpic').empty().append(img);
			kepek.push(img.src);
			$('.biggerpic').fadeTo("fast",1);
		  }).attr('src','sys/image.php?file='+src+'&width=271&height=384&vagott');
		});
	} else {
		$('.biggerpic').fadeTo("fast",0, function () {
			 var img = new Image();
			  $(img).load(function() {
				$('.biggerpic').empty().append(img);
				kepek.push(img.src);
				$('.biggerpic').fadeTo("fast",1);
			  }).attr('src','sys/image.php?file='+src+'&width=271&height=384&vagott');
			$('.biggerpic').fadeTo("fast",1);
		});
	}

}
