$(document).ready(function(){ 
	$('#cytatyRotator').cycle({
		fx: 'fade',
		speed:    300, 
	    timeout:  5000,
	    sync:true,
	    cleartype: true, 
	    cleartypeNoBg: true
	});
		
	$('#SiteBigTop').cycle({
		fx: 'fade',
		speed:    1000, 
	    timeout:  5000,
	    cleartype: true, 
	    cleartypeNoBg: true 
	});
	$('#rotatorSponsorzyGlowna').cycle({
		fx: 'fade',
		speed:    1000, 
	    timeout:  5000,
	    cleartype: true, 
	    cleartypeNoBg: true 
	});
		
	$('#videoRotator').cycle({
		fx: 'fade',
		speed:    1000, 
	    timeout:  0,
	    pager:  '.navi',
	    cleartype: true, 
	    cleartypeNoBg: true 
	});
		
	$.blimp($('.blimp'),{url:'/ajax/blimp.php?idt='});

 $('a[href*=#]').bind('click',function() {
    if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) 
    {
      var $target = $(this.hash);
      $target = $target.length && $target || $('[name=' + this.hash.slice(1) +']');
      if ($target.length) 
      {
        var targetOffset = $target.offset().top;
        $('html,body').animate({scrollTop: targetOffset}, 1000);
       return false;
      }
    }
  });
  
 $('.print').bind('click',function(){window.print();});
 $('.ico-rss').bind('click',function(){	$('.rssBox').toggle(); });
 $('.kolumnaDwa').height( $('.poprzednieEdycje').parent('ul').height());
	$("a[rel^='prettyPhoto']").prettyPhoto({
		gallery_markup:'',
		theme: 'light_rounded',
		allow_resize:false
	});
	
	/*$f("mp3player", "/swf/flowplayer-3.2.5.swf", {
		plugins: {
			controls: {
				fullscreen: false,
				height: 30,
				autoHide: false,
			}
		},
		clip: {
			autoPlay: false,
			onBeforeBegin: function() {
				$f("player").close();
			}
	}
	});*/
 $('.partnerzyMore').slideUp();
 $('.showMore').bind('click',function(){
 	$(this).parents('.white').find('.partnerzyMore').toggle('slow');
 	return false();
 });

})

function email_validate(address)
{
   var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
   if(reg.test(address) == false) 
   {
      return false;
   }
   return true;

}
function newsletter() 
{
	if(!email_validate($('.inputNewsletter').val()))
	{
		$('.emialErrorJs').show();
		return false;
	}
	return true;
}
