		function tabs(el)
		{
			if($('#'+el+'big').is(":hidden"))
			{
				$('.tabs').hide();
				$('#'+el+'big').slideToggle('fast');
				$('#'+el+'big').addClass('active');				
			}
			else{
				$('.tabs').hide();
			}

		}

       
        $(document).ready(function(){
			var w = $(document).width();
			var h = $(document).height()-400;
			$('#info').css('width',w+'px');
			$('#contener').css('min-height',h+'px');
			$('#sklepybig').css('width',w+'px');            
                    	
			$("#slider").easySlider({
				auto: true, 
				continuous: true,
				controlsShow:false,
				speed: 800
			});
			$("#slider2").easySlider({
				auto: true, 
				continuous: true,
				controlsShow:false,
				speed: 1000
			});	
			$("#slider3").easySlider({
				auto: true, 
				continuous: true,
				controlsShow:false,
				speed: 1000
			});		
			$("#slider4").easySlider({
				auto: true, 
				continuous: true,
				controlsShow:false,
				speed: 1200
			});		
		
	        $("a[rel=photos]").fancybox({
	            'transitionIn': 'elastic',
	            'transitionOut': 'elastic',
	            'titlePosition'		: 'outside',
	            'overlayColor': '#fbd9c9',
	            'overlayOpacity': 0.4,

	        });			
            $(".carousel").jCarouselLite({
                visible: 1,
                circular: true,
                auto: 1700,
                speed: 700,
            });
            $(".carousel2").jCarouselLite({
                visible: 1,
                circular: true,
                auto: 2100,
                speed: 700,
				
            });	
            $(".carousel3").jCarouselLite({
                visible: 1,
                circular: true,
                auto: 2100,
                speed: 700,
				
            });	
           
           var speed = 1000, // animation speed
         	$wall = $('#demo').find('.wrap'), masonryOptions = { // initial masonry options
                itemSelector: '.box:not(.invis)',
                columnWidth: 1,
                animate: true,
                animationOptions: {
                    duration: 150,
                    easing: 'linear',
                    queue: false
                }
            }
            $(window).load(function(){
				
                // run masonry on start-up to capture all the boxes we'll need
                $wall.masonry(masonryOptions);
                if (window.location.hash) {
                    // get rid of the '#' from the hash
                    var possibleFilterClass = window.location.hash.replace('#', '');
                    switch (possibleFilterClass) {
                        // if the hash matches the following words
                        case 'black':
                            // set masonry options animate to false
                            masonryOptions.animate = false;
                            // hide boxes that don't match the filter class
                            $wall.children().not('.' + possibleFilterClass).toggleClass('invis').hide();
                            // run masonry again, this time with the necessary stuff hidden
                            $wall.masonry(masonryOptions);
                            break;
                    }
                }
            });
			$('#insidemenu a').click(function(){
			  var 
			    color = $(this).attr('class'),
			    filterClass = '.' + color;
			  ;
			
			  if (filterClass == '.all') {
			    // show all hidden boxes
			    $wall.children('.invis')
			      .toggleClass('invis').fadeIn(speed);
			  } else {
			    // hide visible boxes 
			    $wall.children().not(filterClass).not('.invis')
			      .toggleClass('invis').fadeOut(speed);
			    // show hidden boxes
			    $wall.children(filterClass+'.invis')
			      .toggleClass('invis').fadeIn(speed);
			  }
			  $wall.masonry({ animate: true });
			  // set hash in URL
			  window.location.hash = color;
			  return false;
			});		      
        });
		function showN()
		{
			var hh = $(window).height();
			var ww = $(window).width();
			$('#overlay').css('height',hh);
			$('#overlay').css('width',ww);
			$('#overlay').show();
		} 
		function hideN()
		{
			$('#overlay').hide();
		}  		
        function slideSwitch() {
            var $active = $('#slideshow IMG.active');
            if ( $active.length == 0 ) $active = $('#slideshow IMG:last');
            var $next =  $active.next().length ? $active.next()
                : $('#slideshow IMG:first');
            $active.addClass('last-active');
            $next.css({opacity: 0.0})
                .addClass('active')
                .animate({opacity: 1.0}, 500, function() {
                    $active.removeClass('active last-active');
                });
        }
        $(function(){
            setInterval( "slideSwitch()", 2000 );
        });
        function slideSwitch2() {
            var $active = $('#slideshow2 IMG.active');
            if ( $active.length == 0 ) $active = $('#slideshow2 IMG:last');
            var $next =  $active.next().length ? $active.next()
                : $('#slideshow2 IMG:first');
            $active.addClass('last-active');
            $next.css({opacity: 0.0})
                .addClass('active')
                .animate({opacity: 1.0}, 500, function() {
                    $active.removeClass('active last-active');
                });
        }
        $(function(){
            setInterval( "slideSwitch2()", 3000 );
        });
        function slideSwitch3() {
            var $active = $('#slideshow3 IMG.active');
            if ( $active.length == 0 ) $active = $('#slideshow3 IMG:last');
            var $next =  $active.next().length ? $active.next()
                : $('#slideshow3 IMG:first');
            $active.addClass('last-active');
            $next.css({opacity: 0.0})
                .addClass('active')
                .animate({opacity: 1.0}, 500, function() {
                    $active.removeClass('active last-active');
                });

        }
        $(function(){
            setInterval( "slideSwitch3()", 2500 );
        });   			  
        function addEmail(){
            $.ajax({
    			url:'index.php?class=logicSiteNewsletter&type=logic',
                type: 'post',
    			cache: false,
    			data:{
            		email:  $('#email' ).val(),
            		action: 'send_confirm'
    	            },
                success: function(html){
    	            $('#confirm').html(html);
    	            $('#confirm').show();
                }
            });
        }
		//$("#IndexBaner").trigger('click');   
