/*********************************************************************************
							--jQuery image preloader--
**********************************************************************************/
		
		$(function () {
			$('.gallery img').hide();//hide all the images on the page
			//$("#gallery-filter ul li span.prjname").hide();
		});
		
		var i = 0;//initialize
		var int=0;//Internet Explorer Fix
		$(window).bind("load", function() {//The load event will only fire if the entire page or document is fully loaded
			var int = setInterval("doThis(i)",30);//500 is the fade in speed in milliseconds
		});

		function doThis() {
			var imgs = $('.gallery img').length;//count the number of images on the page
			if (i >= imgs) {// Loop the images
				clearInterval(int);//When it reaches the last image the loop ends
				showPrjname();
			}
			$('.gallery img:hidden').eq(0).fadeIn(500);//fades in the hidden images one by one
			i++;//add 1 to the count
		}
		


$(document).ready(function(){
	$(".kwicks li img").fadeTo("slow", 0.5); // This sets the opacity of the thumbs to fade down to 30% when the page loads
	$(".kwicks li img").hover(function(){
	$(this).fadeTo("slow", 1.0); // This should set the opacity to 100% on hover
	},function(){
	$(this).fadeTo("slow", 0.5); // This should set the opacity back to 30% on mouseout
	});
});

$(document).ready(function(){
	$("#gallery2 ul li img.a").fadeTo("slow", 0); // This sets the opacity of the thumbs to fade down to 30% when the page loads
	$("#gallery2 ul li img.a").hover(function(){
	$(this).fadeTo("slow", 1.0); // This should set the opacity to 100% on hover
	},function(){
	$(this).fadeTo("slow", 0); // This should set the opacity back to 30% on mouseout
	});
});

$(document).ready(function(){
	$("#gallery3 ul li img.a").fadeTo("slow", 0); // This sets the opacity of the thumbs to fade down to 30% when the page loads
	$("#gallery3 ul li img.a").hover(function(){
	$(this).fadeTo("slow", 1.0); // This should set the opacity to 100% on hover
	},function(){
	$(this).fadeTo("slow", 0); // This should set the opacity back to 30% on mouseout
	});
});

function showPrjname(){
	$(".gallery-filter ul li span.prjname").fadeTo("slow", 1).css({'display':'block'});
};

$(document).ready(function(){
/*	$('#gallery-filter ul li').Zoomer({
		speedView:200,speedRemove:400,altAnim:true,speedTitle:400,debug:false
	});*/
/*	$('#gallery-filter ul li img.eta1').imageZoom({
		small: 'http://betatrencin.sk/wp-content/themes/greatio/timthumb.php?src=/wp-content/uploads/2010/11/eta1.png&h=80&w=100&zc=1',
		original: 'http://betatrencin.sk/wp-content/themes/greatio/timthumb.php?src=/wp-content/uploads/2010/11/eta1.png&h=122&w=232&zc=1',
		viewpoint: {
			width: 250,
			height: 175
		}
	});*/
});

