var displaying=false;

window.onload=function(){
$(".microImg").parent().parent().parent().find("a.fancy:gt(0)").css("display","none");

$("#menu").animate( {  "top":"100px" },  { duration: 500, queue: false }   );

}

$(document).ready(function(){

$(".microImg").click(function(){
var ind2=$("tr").index($(this).parent());
var ind=$(this).parent().find("img").index(this);
$(this).parent().parent().parent().find(".fancy").css("display","none");
$(this).parent().parent().parent().find("a.fancy:eq("+ind+")").css("display","block").css("width","150px").css("height","100px");
$(this).parent().parent().parent().find("a.fancy:eq("+ind+") canvas").css("display","block").css("width","150px").css("height","100px");

});
$(".fancy").fancybox({ 'zoomOpacity' : true, 'zoomSpeedIn': 300, 'zoomSpeedOut': 300, 'overlayShow': true }); 
		$(".fancy img").each(function(){
			jQuery(this).addClass('corner');
			jQuery(this).addClass('iradius16');		
		}).css("height","100px").css("width","150px");
		
$(".round").addClass('corner').addClass('iradius16').css("height","100px").css("width","150px");	
$(".miniSep").css("height","1px");
$(".men12").mouseout(function(){
	$(this).css("background","");
});
$(".men12").mouseenter(function(){
	$(this).css("background","transparent url(images/menu-rozsz_11.png) repeat-x scroll 0px 0px");
});

		if (!ismainpage) $("#menu").css("top","-300px");
	
	
	
$(".hoverbold a").mouseenter(function(){
	$(this).css("color","#DEDEDE");
});
$(".hoverbold a").mouseout(function(){
	$(this).css("color","#CECECE");
});

$('.formFieldSubmit').click(function(){
var str=$('#email').val();
			if (!((str.indexOf(".") > 2) && (str.indexOf("@") > 0) && str.lastIndexOf(".")>str.indexOf("@")+1))
			{
				alert('Wpisz swój poprawny adres e-mail.');
				$(this).focus();
				return false;
			}
			else
$('.newsletterForm').submit();
});
	$('.centerPlay').css('left',$('.centerPlay').parent().width()/2-$('.centerPlay').width()/2+'px');
	$('.centerPlay').css('top',$('.centerPlay').parent().height()/2-$('.centerPlay').height()/2+'px');
	$('.centerPlay').css('display','block');
	
	$('.centerPlay').mouseenter(function(){
	$(this).css('opacity','0.8');
	});	
	$('.centerPlay').mouseout(function(){
	$(this).css('opacity','1');
	});

});
