$(document).ready(function() {


		navWidth = $('#nav-top').width() - 20;
		navMargin = ((715 - navWidth)/2)-40;
		 $('#nav-top').css({marginLeft:navMargin+'px'});
		
	  $('#txt-tools a.resize').click(function(){
		    size = $(this).attr('id');
		    size = size.substring(1);
			$('.text, #trainig-detals').css({'font-size':size});
		    return false;
		  });

	  $('#txt-tools a.print').click(function(){
		    window.print();
		    return false;
		  });
	  



	
	var speed = 400;	

	$('#nav-left ul li').each(function(index) {
	    if($(this).hasClass('open')){
	    	$(this).find('ul').slideToggle(speed,function() {
	    		
	    	});	
	    }       
	});		
	$('#nav-left ul .a-down').click(function() {


		  $(this).parent().find('ul').slideToggle(300);
		return false;	
	});


	$('#freshmail_name').val('Imię');
	$('#freshmail_name').focusin(function() {
		if($(this).val() == 'Imię')
		{	
			$(this).val('');
		}
  });
	$('#freshmail_name').focusout(function() {
		if($(this).val() == '')
		{	
			$(this).val('Imię');
		}
	
  });
	$('#freshmail_email').val('Adres email');
	$('#freshmail_email').focusin(function() {
		if($(this).val() == 'Adres email')
		{	
			$(this).val('');
		}
  });
	$('#freshmail_email').focusout(function() {
		if($(this).val() == '')
		{	
			$(this).val('Adres email');
		}
  });

	

	FLIR.init({ path: baseUrl + '/js/facelift/' });	
	$("ul#nav-top li").each( function() { FLIR.replace(this); } );

	FLIR.replace('#nav-left li a.head', new FLIRStyle({ mode:'wrap', hq:true }) );

	


});

var tcm = { src: baseUrl + '/js/sIFR/tcm.swf' };

    	    // sIFR.useStyleCheck = true;
    	    sIFR.activate(tcm);
    	    sIFR.replace(tcm, {
        	      selector: '#cols h1'
        	      ,wmode: 'transparent'   
        	      ,fitExactly: true 
        	      ,css: [
        	    	        '.sIFR-root { color:#ffffff; font-size:30px; }'
        	    	        ,'a { text-decoration: none; }'
        	    	        ,'a:link { color: #ffffff; }'
        	    	        ,'a:hover { color: #ffffff; }'
        	     		]
        	    });
    	    
    	    
    	    
    	    sIFR.replace(tcm, {
    	      selector: 'h1'
    	      ,wmode: 'transparent'   
    	      ,fitExactly: true 
    	      ,css: [
    	    	        '.sIFR-root { color:#ffffff; font-size:24px; }'
    	    	        ,'a { text-decoration: none; }'
    	    	        ,'a:link { color: #ffffff; }'
    	    	        ,'a:hover { color: #ffffff; }'
    	     		]
    	    });
    	 // if console is not defined, e.g., Firebug console is not enabled or Non-Firefox browser
    	    if (typeof console == 'undefined') {
    	        var console = {};
    	        console.log = function(msg) {
    	            return;
    	        };
    	    }
