$(document).ready(function(){

	/*$(".thBoxInner").css("opacity","0");
	$(".thBox").hover(
		function () {
			$(this).animate({
				opacity: 0.75
			}, 500);
    	}, 
		function () {
			$(this).animate({
				opacity: 1
			}, 500);
		}
	);*/
	
	$(".thDockTab").click(function(){
		$(".thDockBox").slideDown();
	});
	$("#thBody").click(function(){
		$(".thDockBox").slideUp();
	});
	
	$("#thForm").validate({
		rules: {
			subject: "required",
			message: "required",
			email: {
				required: true,
				email: true
			}
		},
		messages: {
			subject: "Toto pole je povinné",
			message: "Toto pole je povinné",
			email: {
				required: "Toto pole je povinné",
				email: "Špatný formát"
			}
		},
		submitHandler: function(form) {
			$.post('form.php', $("#thForm").serialize(), function(data) {
				$("#thMessage").show().html(data);
			});
		}
	});
	
	$("#thFolio A").css("opacity","0.3");
	$("#thFolio A").hover(
		function () {
			$(this).animate({
				opacity: 1
			}, 500);
    	}, 
		function () {
			$(this).animate({
				opacity: .3
			}, 100);
		}
	);

	$(function() {

		jQuery("div#logoParade").smoothDivScroll();
	
		// Logo parade event handlers
		$("div#logoParade").bind("mouseover", function() {
			$(this).smoothDivScroll("stopAutoScroll");
		}).bind("mouseout", function() {
			$(this).smoothDivScroll("startAutoScroll");
		});
	
	});
	
	$(function() {
		$('#gThumbs a').lightBox();
	});
	
});
