// JavaScript Document			

var $jq2 = jQuery.noConflict();
var cur_img = 1;
var images_paths = new Array("empty","empty");

function showImage (whatImg) {
			cur_img=whatImg;
			updateStatus();
			$jq2("#overlayer").fadeIn(1000, function() {
				$jq2("#big_img").attr("src",images_paths[cur_img]);
				$jq2("#sbox").delay(1000).fadeIn(800, function() {});
			});
		}

function updateStatus(){
	var curent = 0;
	curent = parseInt(parseInt(cur_img)+1);
	$jq2("#status").html(" "+curent+" / "+img_count);
}
$jq2(document).ready(function(){
		
	$jq2("#overlayer").click(
		function () {
			$jq2("#sbox").hide();
			$jq2("#overlayer").fadeOut(1000, function() {});
		});

	$jq2("#close_over").click(
			function () {
				$jq2("#sbox").hide();
				$jq2("#overlayer").fadeOut(1000, function() {});
		});

	$jq2("#prev").click(
		function () {
			if (cur_img!=0){
				$jq2("#sbox").fadeOut(1000, function() {
					cur_img--;
					$jq2("#big_img").attr("src",images_paths[cur_img]);
					$jq2("#sbox").delay(1500).fadeIn(800, function() {});
					updateStatus();
				});
			}
		});
	$jq2("#next").click(
		function () {
			if (cur_img!=img_count-1){
				$jq2("#sbox").fadeOut(1000, function() {
					
					cur_img++;
					$jq2("#big_img").attr("src",images_paths[cur_img]);
					$jq2("#sbox").delay(1500).fadeIn(800, function() {});
					updateStatus();
				});
			}
		});
});
	
