/*
$(window).load(function(){
	if($('.body').height() < $(window).height()){
		$('.body').height(parseInt($(document).height()));
	}
});
*/

function focusInput(el, txt){
	$(el).css('color', '#3A5966');
	$(el).css('text-align', 'left');
	if(el.value == txt){
		el.value=''
	}
}
function blurInput(el, txt){
	if(el.value == ''){
		$(el).css('color', '#8b9a9f');
		$(el).css('text-align', 'center');
		el.value=txt;
	}
}
function prints(){
	var link = document.location.href;

	if(link[link.length-1] != '/') {
		link = link+'&print=1';
	}
	else {
		link = link+'?print=1';
	}

	print = window.open(link ,"print", "menubar=no,width=675,height=500,toolbar=no,location=no");
	return false;
}

$(document).ready(function(){
	/*$(".button").hover(
		function(){
			$(this).addClass('hover');
		},
		function(){	
			$(this).removeClass('hover');
		}
	);*/

	$(".comment_add").click(function(){
		$(".base .komentarze .formularz").slideToggle("fast", function () {
			if(!$(".comment_add").hasClass('response')){
				$(".comment_add").addClass('response');
			}
			else{
				$(".comment_add").removeClass('response');
			}
      		});
		return false;
	});
});

$(window).load(function(){
	if($('.content .left').height()<$('.content .right').height()){
		$('.content .left').height($('.content .right').height());
	}


	$('.cycle').cycle({
		fx: 'scrollUp',
		//fx: 'scrollHorz',
		//speed: 300,
		pause: 1,
		cleartypeNoBg: true,
		timeout: 5000
	});

	$('.gal_foto').cycle({
		//fx: 'scrollUp',
		fx: 'scrollHorz',
		//speed: 300,
		pause: 1,
		//cleartypeNoBg: true,
		next:   '.gal_right', 
   		prev:   '.gal_left',
		timeout: 5000
	});
});
