$("document").ready(function(){
   
   $('.offset').hide();
   
   // slider na uvode
	$('#slider').nivoSlider({
		effect:'fade', //Specify sets like: 'fold,fade,sliceDown'
		slices:15,
		animSpeed:500, //Slide transition speed
		pauseTime:4000,
		startSlide:0, //Set starting Slide (0 index)
		directionNav:false, //Next & Prev
		directionNavHide:true, //Only show on hover
		controlNav:true, //1,2,3...
		controlNavThumbs:false, //Use thumbnails for Control Nav
      controlNavThumbsFromRel:false, //Use image rel for thumbs
		controlNavThumbsSearch: '.jpg', //Replace this with...
		controlNavThumbsReplace: '_thumb.jpg', //...this in thumb Image src
		keyboardNav:true, //Use left & right arrows
		pauseOnHover:true, //Stop animation while hovering
		manualAdvance:false, //Force manual transitions
		captionOpacity:0.8, //Universal caption opacity
		beforeChange: function(){},
		afterChange: function(){},
		slideshowEnd: function(){} //Triggers after all slides have been shown
	});
	// end

   // fancybox
   	$(".fancybox, .fancybox-hidden").fancybox({
         'transitionIn':'fade',
         'transitionOut':'fade',
         'speedIn':300, 
         'speedOut':300, 
         'overlayOpacity':0.4,
         'overlayColor':'#2a180b',
         'padding':0,
         'margin':0,
         'titleShow':true,
         'titlePosition':'over',
         'centerOnScroll':true
   	});
   // end

	// switch cennikov
		$("#cenniksubmenu a").click(function(){
			var requestid = $(this).attr('id');
			realrequestid = requestid.slice(6,7);
			// hide all
			$("#cenniky div").hide(0, function(){
				// show requested
				$("#cennik"+realrequestid+"div").show(0);
				$("#cennik"+realrequestid+"div div").show(0);
			});
		});
	// end
	
	// otvarat mapu v novom okne
		$(".targetblank").click(function(){window.open(this.href); return false;});
	// end
	
	// interaktivne lupky
	   $(".img-wrap").hover(
         function(){
            $('.over2', this).stop(true,true).fadeIn();
         },
         function(){
            $('.over2', this).stop(true,true).fadeOut();
         }
      );
	// end
	
	$("input[name='phone']").parent().parent().hide();
	$("input[name='surname']").parent().parent().hide();

});

