 
	function nowy_token() {
	var id = new Date().getTime();
	$("#token").attr("src","includes/CaptchaSecurityImages.php?date="+id);
	$("#security_code").attr("value", "");
}



$(document).ready(function() {
$("a.fb").fancybox();
$("a.zoom1").fancybox({
'zoomOpacity' : true,
'overlayShow' : false,
'overlayOpacity' : 0.5,
});

$("a.inline").fancybox({
'zoomOpacity' : true, 
'zoomSpeedIn' : 500,
'zoomSpeedOut' : 500,
'overlayShow' : false,
'overlayOpacity' : 0.5
});


$(".youtube").click(function() {
                 $.fancybox({
                  'padding'             : 0,
                  'autoScale'   : false,
                  'transitionIn'        : 'elastic',
                  'transitionOut'       : 'elastic',
                  'title'               : this.title,
                  'width'               : 680,
                  'height'              : 495,
                  'href'                : this.href.replace(new RegExp("watch\\?v=", "i"), 'v/'),
                  'type'                : 'swf',    // <--add a comma here
                  'swf'                 : {'allowfullscreen':'true'} // <-- flashvars here
                  });
                 return false;

            });



});


	$(document).ready(function() {
				
				
				$('.ask-plain').click(function(e) {
					
					e.preventDefault();
					thisHref	= $(this).attr('href');
					
					if(confirm('Are you sure')) {
						window.location = thisHref;
					}
					
				});
				
				$('.ask-custom').jConfirmAction({question : "Jesteś pewien ?", yesAnswer : "Tak", cancelAnswer : "Nie"});
				$('.erotyka').jConfirmAction({question : "Kategoria do której próbujesz wejść zawiera treści o tematyce erotycznej i jest przeznaczona TYLKO dla osób pełnoletnich. Czy masz ukończone 18 lat ?", yesAnswer : "Tak", cancelAnswer : "Nie"});
				$('.ask').jConfirmAction();
			});
			
			
			



/* var win=null;
function NewWindow(mypage,myname,w,h,scroll,pos){
if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
win=window.open(mypage,myname,settings);}



	

function txt_limit(field, countfield, maxlimit, progress) {
var field = document.getElementById(field);
var countfield = document.getElementById(countfield);
var progress = document.getElementById(progress);
var prawdziwa = 0;

if (navigator.appName != "Netscape") {
prawdziwa = 1;
}

if (field.value.length > maxlimit) {
field.value = field.value.substring(0, maxlimit);
}
else {
progress_perc = (100/(maxlimit/field.value.length));
progress.style.width = (progress_perc/2)+'px';
}
} */


