jQuery(document).ready( function() {
    
    
    	jQuery(function(){
			// Set starting slide to 1
			var startSlide = 1;
			// Get slide number if it exists
			
			// Initialize Slides
			jQuery('#slides').slides({
				preload: true,
				preloadImage: 'img/loading.gif',
				generatePagination: true,
				play: 7000,
				pause: 2500,
				hoverPause: true,
				// Get the starting slide
				start: startSlide,
				animationComplete: function(){
				}
			});
		});
                
   
    
    
     jQuery("a[class='zgloszenieodkryj']").bind("click",function(e){      
         jQuery("div.zgloszenieukryte").show();
})

   
     


    jQuery("span[class='prwiecej']").bind("click",function(e){
        
jQuery(this).parents("li").find("ul").show();
jQuery(this).hide();
jQuery(this).parents('li').find("span.prmniej").show();


})

  jQuery("span[class='prmniej']").bind("click",function(e){
        
jQuery(this).parents("li").find("ul").hide();
jQuery(this).hide();
jQuery(this).parents('li').find("span.prwiecej").show();


})
	

            
    
function submitform()
{
  document.nlform.submit();
}


    jQuery('div.vertical-widget-title:odd').addClass('oddbg');
});



//Tabs main page

jQuery(document).ready(function() {

var myanchor = document.URL.split('#')[1];


if( jQuery("div#formBuilderCSSIDZgoszenie div.formBuilderFailure").length > 0 )

{
    jQuery("div.zgloszenieukryte").show();
    
}

if( jQuery("div#formBuilderCSSIDZgoszenie div.formBuilderSuccess").length > 0 )

{
    jQuery("div.zgloszenieukryte").show();
    
}
if (myanchor == 'zgloszenie') {
    
    jQuery("div.zgloszenieukryte").show();
    
}
    


        //On page load
	jQuery(".tab_content").hide(); //Hide all content
	jQuery("ul.tabs li:first").addClass("active").show(); //Activate first tab
	jQuery(".tab_content:first").show(); //Show first tab content

	//On Click Event
	jQuery("ul.tabs li").click(function() {

		jQuery("ul.tabs li").removeClass("active"); //Remove any "active" class
		jQuery(this).addClass("active"); //Add "active" class to selected tab
		jQuery(".tab_content").hide(); //Hide all tab content

		var activeTab = jQuery(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content
		jQuery(activeTab).fadeIn(); //Fade in the active ID content
		Cufon.refresh('ul.tabs li a');
		return false;
		
	});
        
        //next
        
         jQuery(function() {
	jQuery.support.placeholder = false;
	test = document.createElement('input');
	if('placeholder' in test) jQuery.support.placeholder = true;
});

 jQuery(function() {
	if(!jQuery.support.placeholder) { 
		var active = document.activeElement;
		jQuery(':text').focus(function () {
			if (jQuery(this).attr('placeholder') != '' && jQuery(this).val() == jQuery(this).attr('placeholder')) {
				jQuery(this).val('').removeClass('hasPlaceholder');
			}
		}).blur(function () {
			if (jQuery(this).attr('placeholder') != '' && (jQuery(this).val() == '' || jQuery(this).val() == jQuery(this).attr('placeholder'))) {
				jQuery(this).val(jQuery(this).attr('placeholder')).addClass('hasPlaceholder');
			}
		});
		jQuery(':text').blur();
		jQuery(active).focus();
		jQuery('form#nlform:/').submit(function () {
			jQuery(this).find('.hasPlaceholder').each(function() { jQuery(this).val(''); });
		});
	}
});


});
