$(document).ready(function(){
	//slider 1 szerokie zdj�cia, tytu� po atrybucie title z img
	 $('#slider-main').nivoSlider({
	        effect:'random', //Specify sets like: 'fold,fade,sliceDown'
	        slices:3,
	        animSpeed:500, //Slide transition speed
	        pauseTime:5000,
	        directionNav:false,
	        captionOpacity:0.8,
	        controlNav:true
	 });
	
	 //dyskografia g��wna
	 $('#disc-slids').cycle({
			fx: 'scrollHorz',
			timeout: 7000, 
			cleartypeNoBg: true,
			next:   '#nextBtn1', 
		    prev:   '#prevBtn1' 
		});
	
	//slider 2
	$("#slider-nav ul").tabs("#panes > div.slide-item",  {effect: 'fade'});
   
	$(".tip").tipTip();
	
	//dodaj wpis
		$('.ad-commment').click(function() {
		$('#comment-form').slideDown();
		$('.cancel').show();
		$(this).hide();

		});
		$('.cancel').click(function() {
			$('#comment-form').slideUp();
			$(this).hide();
			$('.ad-commment').show();
		});
	//fancybox	
	$(".gallery-item a").fancybox({'titleShow': true,
		'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'titlePosition' 	: 'over'});
		
	$('.gallery-item ul li').hover(function() {
		$('.zoom', this).fadeIn();
	});
	$('.gallery-item ul li').mouseleave(function() {
		$('.zoom', this).fadeOut();
	});
	
	$(".player-item a").fancybox({'titleShow': true,
		'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'titlePosition' 	: 'over'});
	
	 /*IE7 z-index*/
		if($.browser.msie && parseFloat($.browser.version) < 8){
		$(function() {
						var zIndexNumber = 100;
						$('div').each(function() {
							$(this).css('zIndex', zIndexNumber);
							zIndexNumber += 10;
						});
					});
					$('.nivo-controlNav').css('zIndex', 9500);

		};
		
		
		
		//dodaj do ulubionych
		$('.dodajdoul').click(function dodajDoUlubionych()
		{
		    title = "AGAPETOS - oficjalna strona zespołu";
		    url = "http://agapetos.org.pl/";

		    if (window.sidebar)
		        window.sidebar.addPanel(title, url,"");// Mozilla Firefox Bookmark
		    else if( window.external )
		        window.external.AddFavorite( url, title); // IE Favorite
		    else if(window.opera && window.print)
		        return true; // Opera Hotlist
		});


});


