﻿/**
 * JavaScript - Strona Glówna
 * utworzony przez: Dawid Stępień //primastudio.pl
 * data ostatniej modyfikacji: 08.09.2009
 */
$(document).ready(
	function(){
	  //document.body.style.overflow='hidden';
		$('.strona-glowna').removeClass('off').addClass('active');

	  //Hover dla dalej i wstecz
		$('#middle .wstecz-parent .wstecz-child, #middle .dalej-parent .dalej-child').hover(function(){
			$(this).removeClass('off').addClass('on');
		}, function(){
			$(this).removeClass('on').addClass('off');
		});
		
		$(".controllers_hidden").jFlow({
			slides: ".slider-parent",				
			controller: ".slide-controller", 		// must be class, use . sign
			slideWrapper : "#jFlowSlide", // must be id, use # sign //klasa tworzona
			selectedWrapper: "jFlowSelected",  // just pure text, no sign //klasa aktywnego przelacznika
			width: "694px",
			easing: "swing",
			height: "364px",
			duration: 400,
			auto: true,
			direction: 'right',			
			next: ".dalej-parent",		// must be class, use . sign
			prev: ".wstecz-parent"		// must be class, use . sign
		});
		
//		$('.rsLightbox_trigger').rsLightbox({
//			color			: '#251C01',
//			contentID		: '#sylwester-lightbox',
//			animation		: 140,
//			openPrepend		: function(id){
//				var content = this;
//				
//				var width	= 850;
//				var height	= 900;
//				
//				var contentLeft		= ($(window).width()/2) - (width/2);
//				var contentTop		= ($(window).height()/2) - (height/2) - 30;
//
//				if(contentTop < 0) contentTop = 30;
//
//				var contentParameters = {
//					'left'		: contentLeft,
//					'top'		: contentTop
//				}
//
//				content.css(contentParameters);
//				
//			}
//		});
		
//		var lightbox = new rsLightbox({fadeDuration : 120});
//		var sylwester = $('#walentynki_lightbox');
//
//		lightbox.windowCenterHorizontal(sylwester, 30);
//		lightbox.setClickEvent(function()
//  	{
//			lightbox.hide(sylwester);
//    	});
		
//		sylwester.click(function()
//		{
//		    lightbox.hide(sylwester);
//		});
//		
//		lightbox.show(sylwester);
		
	}
);
