	var baners = new Array( 'header.jpg', 'header2.jpg', 'header3.jpg', 'header4.jpg', 'header5.jpg', 'header6.jpg', 'header7.jpg' );
	var banersImg = new Array();
	var stopPreloading = false;
	var path = '/templates/default/images/';
	var pathCSS = 'images/';
	var currentBaner = 0;
	var imgWidth = 750;
	var imgHeight = 153;
	var czasPokazywania = 7000;
	var czasZmiany = 2000;
   
function changeBaner ( currentBaner ) {
	if ( currentBaner == baners.length ) {
		currentBaner = 0;
		stopPreloading = true;
	}
	if ( stopPreloading ) {
		var imgObj = new Image(imgWidth , imgHeight);
		imgObj.src = path + baners[currentBaner+1];	
	}
	var logoImg = $('#logoImg');
	var logoImgTemp = logoImg;
	logoImg.animate({ 'opacity':'0', 'filter':'alpha(opacity=0)'}, czasZmiany, function() {
		logoImgTemp.attr('src',path+baners[currentBaner]);
		setTimeout( function() { 
			logoImgTemp.animate({ 'opacity':'1', 'filter':'alpha(opacity=100)'}, czasZmiany);
			}, 350);
	});
	setTimeout( function() { changeBaner(currentBaner+1); }, czasPokazywania );
}
 
$(function() {

	$('.howto').hide(); 
	$('#howtoUL').find('a').click(function() { 
		$('.howto').hide(); 
		$('#'+ this.href.slice(this.href.indexOf('#') +1 )).fadeIn(); 
		return false;
	});
	
	//	rotator banerow
	
	for(var i=0; i<baners.length; i++) {
		var imgObj = new Image(imgWidth, imgHeight);
		imgObj.src = path + baners[i];	
		banersImg.push(imgObj);
	}
	setTimeout(function() { changeBaner(currentBaner+1); }, czasPokazywania);	
	
	
	//	download
	
	if ( $('#download') ) {
		$('.download').each( function() {
			if ( $(this).find('p.opis').text() ) {
				$(this).find('a.opis_a').show();
			}
	  	});
	}
	
	$('.opis_a').click( function() {
		$(this).parent().find('p.opis').toggle();
		if ( $(this).parent().find('p.opis').is(':visible') ) {
			$(this).text('schowaj');
		} else { 
			$(this).text('opis');
		}
		return false;
	});
	
	var link = window.location.search;
	$('a').each(function() {
		if ( link &&  
			( $(this).attr('href') == link || 
				( ( $(this).attr('href').indexOf( link ) >= 0 || link.indexOf( $(this).attr('href') ) >= 0 )  
					&& link.indexOf('id') >= 0 ) 
			) 
		) { 
			$(this).addClass('active');
		}
	});
	if ( !link ) {
		$($('#menu a').get(0)).addClass('active');
	}
	
	
	//	previe image
	$('.previewImg').click(function(){

		//return false;
	});
});
/*

usunac jedno ga.js


*/
