$(document).ready(function(){ 
	
	var descriptView = 300; // ile znakÃ³w ma byc widoczne
	
	/*
	 * On off dostawa i wysylka
	 */
	$('.OnOff').click(function(){
		var onoff = $(this).attr('rel');
		$('#'+onoff).toggle('slow');
		return false;
	});
	
	var il = $('#prodDesc').text();
	if(descriptView != '' ){
		$('#all').css("display","block");
		$('#all a').click(function(){
			if($('#prodDesc').is(":hidden")){
				$('#prodDesc').slideDown(300);
				$('#all  b').html('zwiÅ„ &raquo;');
			}else{
				$('#prodDesc').slideUp(300);
				$('#all b').html('wiÄ™cej &raquo;');
			}
			return false;
		});
	}
/**
 * kolorowanie  wyników  product list
 */
	
	$("#oddd li:odd").css("background-color", "#f4f4f4"); 
	
	/**
	 * wywietlanie zdjec galeria
	 */
	$(function(){
		$('#lightbox a').lightBox({fixedNavigation:true});
	});
	
	
	/*
	 * slidshow
	 */
	$(function() {
		$('.slideshow').cycle({
			fx: 'scrollHorz',
	        startingSlide: 1,  // start on the slide that was in the markup
	        timeout:  10000,
	        speed:    1500,
	        prev:    '#prev',
	        next:    '#next'
	    });
	});
	
	$('.hiddenSite').click(function(){
			
		var $a = $('#container').css('opacity');
		if($a == 0){
			$('#container').animate({opacity :1},1200);
		}else{
			$('#container').animate({opacity :0},1200);
		}
		return false;
	});
	$('.customBackground').click(function(){
		
		$('.naviBar').css('display','block');
		$('.naviBar').animate({opacity :0.5},1200);
		
		
		return false;
	});
	
	
	
	$(function() {
		if(!$.cookie("ageValid")) {
			 $('#first').jqm({modal:true});
			 $('#first').jqmShow();
		}
		 
	});
	
	
});
function rememberAge() {
	$.cookie("ageValid", "1");
	$('#first').jqmHide();
}
