
/*----------------------------------------
Q2 ImageSlideshow v0.1
Developed by: Q2 Interactive | david.krasensky@q2.cz
Requires: jQuery Framework
----------------------------------------*/

			
					
					
	// toggle boxu s popisem k fotkam
	function imageInfoToggle(box) {
		e = document.getElementById(box).style;						
		if(e.display == 'none'){
			$('#info-box').fadeIn("slow");
			}
		else {									
			$('#info-box').fadeOut("slow");	
		}
	}
	
	// toggle boxu s obsahem
	function imageContentToggle(box) {
		e = document.getElementById(box).style;	
		if(e.display == 'none'){
			$('#image-hidden-content').fadeIn("slow");
			$('#image-content-box').css("margin-top","357px");
			$('#image-hidden-content').css("height","212px"); /* IE6 fix*/
			$('#image-content-box a#closed').addClass("opened");
			$('#image-content-box a#closed').removeClass("closed");
			//$('#image-content-box a#closed').css("background-image","url(img/home-image-contentbox02.png)");
			}
		else {									
			$('#image-hidden-content').css("display","none");
			$('#image-content-box').css("margin-top","569px");
			$('#image-content-box a#closed').addClass("closed");
			$('#image-content-box a#closed').removeClass("opened");	
			//$('#image-content-box a#closed').css("background-image","url(img/home-image-contentbox01.png)");
		}
	}
	
	
	
	
	// posun obrazku ve slideshow
	function goImage(direction,stopslide) {
		
		
		if(stopslide == "stop")
			clearInterval(slideshow);
		
		
		// counter
		c = document.image_hid.image_count.value;
		//alert(arrayCount);
		
		if (direction == "r") {
			c++;
			// konec pole
			if (c == arrayCount) c = 0;
			document.image_hid.image_count.value = c;
			$('#info-box').empty().append(imageBoxDescription[c]);	
			
			// zmizeni obrazku behem daneho poctu milisekund
			$('#image-changer').fadeOut(3000);
			// po teto dobe se nahradi obrazek, aktualne skryty
			ctime = setTimeout("$('#image-changer').css(\"backgroundImage\",\"url(\" + imageBoxPhoto[c] + \")\")",3000);
			// objeveni obrazku behem daneho poctu milisekund
			ctime = setTimeout("$('#image-changer').fadeIn(3000);",0);
			
													
		}
		/*
		else {
			// tato vetev aktualne neni vyuzivana - bylo odstraneni prochazeni zpet
			c--;
			// zacatek pole
			if (c < 0) c = arrayCount-1;
			document.image_hid.image_count.value = c;
			$('#info-box').empty().append(imageBoxDescription[c]);	
			$('#image-changer').css("backgroundImage","url(" + imageBoxPhoto[c] + ")");
			$('#image-changer').css("display","none");
			$('#image-changer').fadeIn("slow");
		}	
		*/
	
	}
	
					
					



