
$(function() {
		// ustawianie margin-top dla opisów galerii
				$('.imgDescription').each(function() {
					
					if($.browser.msie){
						var mTop = parseInt($(this).innerHeight())*-1;
					}else{
						var mTop = parseInt($(this).innerHeight())*-1-5;
					}
					//$(this).css('margin-top',mTop+'px')
					
					
					
					$($(this).parent()).hover(
				function(){
					$(this).find('img').fadeTo(500,'0.7');
					$(this).find('.imgDescription').css('margin-top',mTop+'px').fadeIn();
				},
				function(){
					$(this).find('img').fadeTo(500,'1');
					$(this).find('.imgDescription').fadeOut();
				})

					
				})
				jQuery('.imgContainer').find('.imgDescription').hide();	
				

})


 $(document).ready(function() {
	 
	 $( ".1accordion" ).accordion({
			icons: false,
			navigation: false
		}); 
	 
	 var licznik = 0;
	 	 $('.newsContainer ul').cycle({
					fx: 'scrollHorz', // choose your transition type, ex: fade, scrollUp, shuffle, etc...
					next:   '.newsNext',
					prev:   '.newsPrev',
					timeout: 0,
					speed: 300,
					onPrevNextEvent:function(isNext, zeroBasedSlideIndex, slideElement){
						
					}, 
					before:  function(curr, next, opts,forwardFlag){
						//console.log(opts.slideCount)
						if(opts.slideCount){
							$('.newsContainerNav').show()
						}
						$('div.news',curr).width($(this).parent().width())
					},
					after:  function(curr, next, opts,forwardFlag) {
						
						
						//console.log($('div.news',next).height());
						$('.newsContainer ul').stop();
						if(licznik){
						$('.newsContainer ul').animate({
							height: $('div.news',next).height()
							},300)
						}else{
							
						$('.newsContainer ul').animate({
							//height: $('div.news',next).height()
							},300)
						}
						
						licznik++;
					}
				});

});

	 
 $(document).ready(function() {
	 
	 
	 
	 
	 
				$('.bannerSlider ul').cycle({
					fx: 'fade', // choose your transition type, ex: fade, scrollUp, shuffle, etc...
					next:   '.next',
					prev:   '.prev',
					pager:  '.nav',
					timeout: 5000,
					cleartype:  false, // disable cleartype corrections 
					pagerAnchorBuilder: function(idx, slide) { 
						return '<li><a href="#" ></a></li>'; 
					} ,
					before:  function() {
						$('.bannerControls').show();
					}
				});
				
				$('.pauseButton').click(function() { 
					var obj = $(this).parent().parent().parent().prev();
					$('ul',obj).cycle('pause');
					$(this).addClass('active');
					$('.resumeButton',$(this).parent().parent()).removeClass('active');
					return false;
				});
				
				$('.resumeButton').click(function() { 
					var obj = $(this).parent().parent().parent().prev();
					$('ul',obj).cycle('resume');
					$(this).addClass('active');
					$('.pauseButton',$(this).parent().parent()).removeClass('active');
					return false;
				});
				
			});

    
$(document).ready(function() {
	$('.lightbox, .gallery a').lightBox({fixedNavigation:false});

	

	$('#frame a.arr').click(function(){
		$('#frame .frameContent').slideToggle("slow",function(){
			if($('#frame a.arr').hasClass('up')){
				$('#frame a.arr').removeClass('up')
				$('#frame a.arr').addClass('down')
			}else{
				$('#frame a.arr').removeClass('down')
				$('#frame a.arr').addClass('up')
			}
		});
	})


        
});

//**/ funkcje menu{}


	 
 $(window).load(function() {
	$('.bannerSlider ul li .descp').css('margin-top',-$('.bannerSlider ul li .descp').outerHeight()-5)
	$('.bannerSlider ul li .descp').fadeIn('fast');
 
});


