// JavaScript Document
$(document).ready(function() {

		
		//http://www.sohtanaka.com/web-design/simple-tabs-w-css-jquery/

		//When page loads...
		$(".tab_content").hide(); //Hide all content
		$("ul.tabs li:first").addClass("active").show(); //Activate first tab
		$(".tab_content:first").show(); //Show first tab content
	
		//On Click Event
		$("ul.tabs li").click(function() {
	
			$("ul.tabs li").removeClass("active"); //Remove any "active" class
			$(this).addClass("active"); //Add "active" class to selected tab
			$(".tab_content").hide(); //Hide all tab content
	
			var activeTab = $(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content
			$(activeTab).fadeIn(); //Fade in the active ID content
			return false;
		});
 
		// animace produkt 
		
			$(".popis-in").css('top', '80px');
						
			$(".zbozi").hover(function () {
				$(this).find(".popis-in").animate({ 
					top: "0"
				}, 200 );
			}, function() {
				$(this).find(".popis-in").animate({ 
					top: "80px"
				}, 300 );
			});

			// animace seradit 

			$(".podle").css('display', 'none');
			$(".razeni").hover(function () {
				$(".podle").fadeIn('fast');
			}, function() {
				$(".podle").fadeOut('fast');
			});

			
		 	// $(".fotogalerie a").lightBox();
	
			//stridani barvy
			$('.table tr:even').addClass('tr2');
			
      //onmouseover
			$(".table tr").mouseover(function() {
      	$(this).addClass("over");
			});
			$(".table tr").mouseout(function() {
				$(this).removeClass("over");
			});	
				
		//http://jquery.malsup.com/corner/
		$('.col1 .menu, .col1 .box, .box4a, .box4b, .box4a-b').corner();
		
		$('.col2 .box h2, .box4').corner('top');
		$('.col2 .box, .col1 .kontakt').corner('bottom');

		//http://www.steamdev.com/imgr/  //corners for images
		$('.clanek .img, .banner').imgr({size:"0px",color:"red",radius:"10px"});
		
		//prid class poslednimu sourozenci
		$('ul.ul li:last-child, .menu li:last-child, .aktualita:last-child').addClass("last");

		//3. prvek 
		//$(".fotogalerie a img:nth-child(3n)").addClass("rd");
		//$(".fotogalerie a img:nth-child(3n+1)").addClass("th");
		//alert("OK");
		
		//zmizi text v inputu 
		//http://mudge.github.com/jquery_example/
		
});	


