
$(document).ready(function(){
	if ( $.browser.opera )
	{
		$("#top_right #search_query").css({"padding-top":"0px"});
		$("#content #main_content .paging li").css({"padding-top":"1px"});
	}

	$(window).load( function () {
		$(".eqh1").equalHeights();
		$(".eqh2").equalHeights();
		$(".eqh3").equalHeights();
		$(".more").css({'position':'absolute', 'left':'0', 'bottom':'0'}); 
	});
	
	if ($.browser.msie && $.browser.version == 6.0) 
	{
		$("h1").textShadow({
			color:   "#444",
			xoffset: "0.5px",
			yoffset: "0px",
			radius:  "0",
			opacity: "30"
		});
		$("#home h2").textShadow({
			color:   "#444",
			xoffset: "5px",
			yoffset: "0px",
			radius:  "0",
			opacity: "30"
		});
		$("h3").textShadow({
			color:   "#444",
			xoffset: "0.5px",
			yoffset: "10px",
			radius:  "0",
			opacity: "30"
		});
		$("#left_navi ul.shadow li.gshadow a,#left_navi ul.shadow li.sub.archive a").textShadow({
			color:   "#444",
			xoffset: "0.5px",
			yoffset: "0px",
			radius:  "0",
			opacity: "20"
		});
		$("#content #left_navi ul li.sub.current.nnavi a").textShadow({
			color:   "#BFBFBF",
			xoffset: "-1px",
			yoffset: "0px",
			radius:  "0",
			opacity: "30"
		});
		
	}
	else
	{
		$("h1").textShadow({
			color:   "#444",
			xoffset: "0.5px",
			yoffset: "0.5px",
			radius:  "0",
			opacity: "30"
		});
		$("#home h2").textShadow({
			color:   "#444",
			xoffset: "5px",
			yoffset: "0.5px",
			radius:  "0",
			opacity: "30"
		});
		$("h3:not(.high)").textShadow({
			color:   "#444",
			xoffset: "0.5px",
			yoffset: "10px",
			radius:  "0",
			opacity: "30"
		});
		$("#left_navi ul.shadow li.gshadow a,#left_navi ul.shadow li.sub.archive a").textShadow({
			color:   "#444",
			xoffset: "0.5px",
			yoffset: "0.5px",
			radius:  "0",
			opacity: "40"
		});
		$("#content #left_navi ul li.sub.current.nnavi a").textShadow({
			color:   "#BFBFBF",
			xoffset: "0px",
			yoffset: "0px",
			radius:  "0",
			opacity: "30"
		});
	}
});

function sameCyfry(eventObj, obj)
{
	var keyCode
	if (document.all){ 
		keyCode=eventObj.keyCode
	}
	else{
		keyCode=eventObj.which
	}
	var str=obj.value

	if((keyCode<48 || keyCode >58)  &&  (keyCode != 8)){
		return false
	}
	return true
}

function pole( tid, stan )
{
	if ( stan == true )
	{
		$("input#ile"+tid).removeAttr( "disabled" );
		$("#pole"+tid).show();
	}
	else
	{
		$("input#ile"+tid).attr( "disabled", "disabled" );
		$("#pole"+tid).hide();
	}
}

$.fn.equalHeights = function(px) {
	var currentTallest = 0;
	$(this).each(function() {
		var currentHeight = $(this).height();
		if ( currentHeight > currentTallest) {
			currentTallest = currentHeight;
		}
	});
	currentTallest += 'px';
	// for ie6, set height since min-height isn't supported
	if ($.browser.msie && $.browser.version == 6.0) {
		$(this).css({'height': currentTallest});
	}
	$(this).css({'min-height': currentTallest}); 
	
	return this;
};