function ocq (obj,zm,min) {
		
		var inp = obj.parentNode.firstChild;
		trobj = obj.parentNode.parentNode;
		inp = inp.nextSibling;
		
		var tmpIl = parseInt(inp.value,10);

		var reszta = tmpIl%zm;

		if ((zm > 0) && (tmpIl < 999999) ) {
			inp.value = tmpIl + zm - reszta;
		}

		else if ((zm < 0) && (tmpIl > 0)){

			if ( reszta > 0 ) { inp.value = tmpIl - reszta; }
			else {	inp.value = tmpIl + zm; }
			

		}
		trobj.className = (inp.value > 0)?'wyr':'';
		$('#zzm').addClass("bma");

}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


$(document).ready(function()
{
	$("#galleryPreview").hide();

	$("#orderForm").hide();
	
	$(".gotoform").click(function(){ $("#orderForm").show('slow'); return false; });
	
	$(".gitem a[rel='gallery']").colorbox({scalePhotos: true, maxWidth: '950px', maxHeight: '100%', close: 'Zamknij'});
	
	$('#counter span').countdown({ until: new Date(2011, 4 - 1, 3, 16, 0, 0, 0), layout: '{d<}{dn} dni {d>}'+ '{hn}h, {mn}m, {sn}s'});
	
	$('.fx-rotate').cycle({fx: 'fade', speed:  0, timeout: 1000 });
});


function startGallerySlideshow()
{
	$("#flashPlayer").hide();
	$("#galleryPreview").show();
	$('#galleryPreview div').cycle({ fx: 'fade',  timeout: 1500,  speed: 1500 });
}
