
	
	
	
	
	
	
	
	
	
	
	
	
 jQuery.fn.fadeSliderToggle = function(settings) {
 	/* Damn you jQuery opacity:'toggle' that dosen't work!~!!!*/
 	 settings = jQuery.extend({
		speed:500,
		easing : "swing"
	}, settings)
	
	caller = this
 	if($(caller).css("display") == "none"){
 		$(caller).animate({
 			opacity: 1,
 			height: 'toggle'
 		}, settings.speed, settings.easing);
	}else{
		$(caller).animate({
 			opacity: 0,
 			height: 'toggle'
 		}, settings.speed, settings.easing);
	}
}; 









		$(document).ready(function() {
		
		

$('.dodaj_galerie_tabelka').tableDnD();

		
		
		
		
	$(function() {
		$("#utwory_przelacz").tabs();
			$("#utwory_przelacz1").tabs();
	});

	
	
	
	
	


		
		
 $('#logowanie_pokaz').click( function() {
 

$('#logrej').animate({
  opacity:0
  }, 500, function() {
	
	$('#logrej').hide();
	$('#logowanie').show();
	
	$('#logowanie').animate({
	opacity:1
	}, 500
	);
	}
	
	);
	
	return false;
});
		
		
		
		
		
		
		$('.panel_lewa .permalink input').focus(function(){
    // Select input field contents
    this.select();
});




		//$("#archiwum_wyd").accordion();
$(".archiwum_ukrywanie .archiwum_wyd").accordion({ autoHeight:false,animated:false,active:false,collapsible: true
 });
$('.archiwum_ukrywanie .archiwum_wyd .active').click();
		

var poprzedni = '';
$('.odkryjKolejny').toggle(

function()
{

if(poprzedni === ''){
 } else {
//poprzedni.hide();

 }
//poprzedni = $(this).next();
$(this).next().show();
  $(this).next().animate({
  opacity:1
 }, 800);

},
function()
{
//poprzedni = '';
var aaa = $(this).next();
  $(this).next().animate({
  opacity:0
  }, 700, function() {
	
	aaa.hide()
	
	}
	
	);
	

});


	
    var options = { 
        target:        '#komentarzWynik'
 
    }; 
		
		$('a span .r img').click(function(){
		window.location=$(this).parent().parent().parent().attr( 'href');
	 });
		
    $('#dodajKomentarz').ajaxForm(options); 
		

var query = location.href.split('#');

if( query[1] != undefined){

$.cookie("anchor", query[1]);

window.location = query[0];


}
			
			
			
			
			
			
			
			
			

			
			
			
   $('#menu a, .odkryjKolejny, .focus, #utwory_przelacz a, #utwory_przelacz1 a, .zaokraglone, .najnowsze_galerie a, .sc_menu li a, .fotka_poprzednia, .fotka_nastepna, .archiwum_ukrywanie a, a[rel^="lightbox"]').focus(function(){
	 
	 this.blur();
	 });			
			
			
			

			
$('a.regulamin_czytaj').click( function() {

    var width = screen.availWidth*80/100;
    var height = screen.availHeight*60/100;
    var left = parseInt((screen.availWidth/2) - (width/2));
    var top = parseInt((screen.availHeight/2) - (height/2));
    var windowFeatures = "width=" + width + ",height=" + height + ",status,resizable,left=" + left + ",top=" + top + "screenX=" + left + ",screenY=" + top;
    myWindow = window.open($(this).attr('href'), "subWind", windowFeatures);
return false;

			});
			
			
			
	 
	 
	 
	 
	 
	 
	 
	 
	 
	 
	 
	 $('.podziel_sie_linki a, #follow a').click( function() {
window.open(this.href);
return false;
	
});

});$(function(){
	//Get our elements for faster access and set overlay width
	var div = $('div.sc_menu'),
		ul = $('ul.sc_menu'),
		ulPadding = 15;
	
	//Get menu width
	var divWidth = div.width();

	//Remove scrollbars	
	div.css({overflow: 'hidden'});
	
	//Find last image container
	var lastLi = ul.find('li:last-child');
	
	//When user move mouse over menu
	div.mousemove(function(e){
		//As images are loaded ul width increases,
		//so we recalculate it each time
		var ulWidth = lastLi[0].offsetLeft + lastLi.outerWidth() + ulPadding;	
		var left = (e.pageX - div.offset().left) * (ulWidth-divWidth) / divWidth;
		div.scrollLeft(left);
	});
});


