<!--
function popImage(url,windowTitle,windowName,closeOnClick,width,height,t){
	closeOnClick=true;
	if(!url)return
	function readSize(){if(t.complete)showPopup(t.width,t.height);else setTimeout(readSize,1e2)}
	function showPopup(w,h){with(window.open('',windowName||'','width='+(width||w)+',height='+(height||h)).document){open();write('<html><head><title>'+(windowTitle||'')+'</title></head><body onBlur="self.close()" style="margin:0;padding:0"><img src="'+url+'" style="display:block'+(closeOnClick?';cursor: pointer" onclick="self.close()" title="Zamknij okno"':'"')+'></body></html>');close()}}
	if(!width||!height)t=new Image(),t.src=url,readSize()
	else showPopup(width,height)
}

function popup(mylink) 
{
	if (!window.focus)return true;
	var href;
	if (typeof(mylink) == 'string')
	   href=mylink;
	else
	   href=mylink.href;
	window.open(href, 'Popup', 'width=636,height=400,scrollbars=yes');
	return false;
}

function changeAmount(iId, iAmount, iForceAmount) //cart
{
	var hInput = jQuery('#amount' + iId);
	var iValue = eval(hInput.val());
	if (iForceAmount != undefined) {
		hInput.val(iForceAmount);
	} else {
		if ((iValue + iAmount) >= 0) {
			hInput.val(iValue + iAmount);
		}
	}
}

function removeProduct(iId)
{
	jQuery("#productAmount_" + iId).val(0);
}

/*
Form2Pop Script- By Peter Bailey (http://www.peterbailey.net)
Featured on JavaScriptKit.com
Visit http://www.javascriptkit.com for this script and more
*/

function createTarget(sTarget,sWhat,sOptions){
	window.open(sWhat, sTarget, sOptions);
	return false;
}

var iLastHeaderNewsId = -1;
function switchToCurrent(iTarget){
	jQuery('#navigate_' + iLastHeaderNewsId).removeClass('hoverActive');
	jQuery('#navigate_' + iTarget).addClass('hoverActive');
	jQuery('.newsScroll').trigger('goto', [iTarget]);
	iLastHeaderNewsId = iTarget;
	
}

function submitForm(sFormName, bDontHideButton){
//	showHideFixedPreloader();
	if (bDontHideButton == undefined) {
		bDontHideButton = false;
	}
	if (!bDontHideButton) {
		jQuery('#' + sFormName + 'Submit').hide();
	}
	jQuery('#' + sFormName).submit();
}

function initializeFancyBoxImages()
{
	jQuery("a.fancyBoxImage").fancybox({
		'zoomSpeedIn':	500,
		'zoomSpeedOut':	300,
		'overlayShow':	true,
		'hideOnContentClick': true
	});
}

function v()
{
	void(null);
}

function initializeInputFocusEffect(sInputName, sText)
{
	if (!jQuery("input[name='" + sInputName + "']").attr('value')) {
		jQuery("input[name='" + sInputName + "']").attr('value', sText);
	}
	jQuery("input[name='"+sInputName+"']").focus(function()
		{
			jQuery("input[name='"+sInputName+"']").attr('value','');
		}
	)
	jQuery("input[name='"+sInputName+"']").blur(function()
		{
			if (!jQuery("input[name='"+sInputName+"']").attr('value')) {
				jQuery("input[name='"+sInputName+"']").attr('value', sText);
			}
		}
	)
}

/*** JQUERY ***/
jQuery.noConflict();
jQuery(document).ready(function() {
	externalLinks();
	/*** FANCY BOX ***/
	initializeFancyBoxImages();
	switchToCurrent(iLastHeaderNewsId);
	
	initializeInputFocusEffect('newsletterEmail', 'wpisz adres e-mail');
	initializeInputFocusEffect('searchProduct', 'szukane wyrażenie');
	
	jQuery('#prices').children('.price').hide()

	jQuery("#packageSize").change(function(){
		jQuery("#price_" + this.value).show().siblings().hide()
	});
	
	jQuery("#packageSize").change();
	
//	showLanguageMenu();
//	setLanguageMenuTimeout();
});

function showHidePreloader(sTargetDiv, bHide)
{
	if (bHide == 'undefined') {
		bHide = false;
	}
	var iDivContentHeight = jQuery('.' + sTargetDiv).height();
	var divPreloader = jQuery('div.preloaderApla_' + sTargetDiv);
	iDivContentHeight = (iDivContentHeight > 59) ? iDivContentHeight : 60;
	jQuery(divPreloader).height(iDivContentHeight);
	if (!bHide) {
		jQuery(divPreloader).show();
	} else {
		jQuery(divPreloader).hide();
	}
}

function showHideFixedPreloader(bHide)
{
	if (bHide == undefined) {
		bHide = false;
	}
	var divFixedPreloader = jQuery('div#ajaxLoading');
	if (!bHide) {
		jQuery(divFixedPreloader).show();
	} else {
		jQuery(divFixedPreloader).hide();
	}
}

-->

