//<![CDATA[


jQuery().ready(function()
		{
       //formularz ajax
 
       
       
       
      //mennu rozwijane
      $('#left_content .menu li span.active_label').parent('li').addClass('open');
      
    
           
    
      
      $('#left_content .menu li span').click(function(){
            
             $(this).addClass('active_label green');
         
          if($(this).siblings('ul').length>0){
         
          $('#left_content .menu li ul').fadeOut();
         $(this).siblings('ul:first').fadeIn();
         return false;
         }
      });
 if(document.getElementById("fileInput")){  
    $('#fileInput').uploadify({
'uploader'  : 'http://kameleon.ayz.pl/multimed/media/uploadify/uploadify.swf',
'script'    : 'http://kameleon.ayz.pl/multimed/media/uploadify/uploadify.php',
'cancelImg' : 'http://kameleon.ayz.pl/multimed/media/uploadify/cancel.png',
'auto'      : true,
'folder'    : 'http://kameleon.ayz.pl/multimed/uploads',
'buttonText' : 'Dodaj CV',
'queueID' : 'queue',
'onComplete': function(event, queueID, fileObj, reposnse, data) {
     $('#filesUploaded').append('<a href='+fileObj.filePath+'>'+fileObj.name+'</a><br>');
}
});
    }
    
  

      
    
// See which font size the user wants
		$(".fontResizer a").click(function() {
			switch ($(this).attr("class")) {
				case 'small'	: setFontSize(.8);	break;
				case 'large'	: setFontSize(1.2);	break;
				default			: setFontSize(1);	break;
			}
			$(".fontResizer a").removeClass('actual_size');
			$(this).addClass('actual_size');
			
			return false;
		});

		// Set the font size and set a cookie
		function setFontSize(size) {
            $("#center_column").animate({fontSize: size+"em"}, 500).fadeIn("slow");
			createCookie(size);
		}

		// Create and read coookies
		// Code functions by: Peter-Paul Koch
		// http://www.quirksmode.org/js/cookies.html
		function createCookie(value) {
			var date = new Date();
			date.setTime(date.getTime()+(30*24*60*60*1000));
			var expires = "; expires="+date.toGMTString();
			document.cookie = "font_size="+value+expires+"; path=/";
		}

		function readCookie() {
			var nameEQ = "font_size=";
			var ca = document.cookie.split(';');
			for(var i=0;i < ca.length;i++) {
				var c = ca[i];
				while (c.charAt(0)==' ') c = c.substring(1,c.length);
				if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
			}
			return 1;
		}
			
           
      
      
      
      });
//funckja animacja po wjechaniu slajdu
function onAfter() { 
    
     setTimeout(effect_down,100); 
     setTimeout(effect_up,5500); 
}
function effect_up(){
    $('.banner_text').slideUp(1000)
}
function effect_down(){
         $('.banner_text').slideDown(1000); 
}
//koniec efekty zwiaznae z animacjami boxa

//dodawanie do ulubionych
var bookmarkurl=document.location
var bookmarktitle=document.title

function addbookmark(){
if (document.all)
window.external.AddFavorite(bookmarkurl,bookmarktitle)
}

function dodaj() { var tytul = 'Multimed'; var adres = 'http://multimed.pl/';
 //FireFox 
 if (window.sidebar) { window.sidebar.addPanel(tytul, adres, "");
  //IE 
  } else if (window.external) { window.external.AddFavorite(adres, tytul); //Opera
   } else if (window.opera && window.print) { var a = document.createElement('a'); a.setAttribute('href', adres); a.setAttribute('title', tytul); a.setAttribute('rel','sidebar'); a.click(); } 
   } 
   
   //if (window.external || window.sidebar || (window.opera && window.print) ) { document.writeln('<a href="javascript:dodaj()"> Dodaj do ulubionych</a>'); }          
          
//etykiety w ppolach formularza
this.label2value = function(){	
    
	// CSS class names
	// put any class name you want
	// define this in external css (example provided)
	var inactive = "inactive";
	var active = "active";
	var focused = "focused";
	
	// function
	$("#window_content label").each(function(){		
		obj = document.getElementById($(this).attr("for"));
		if(($(obj).attr("type") == "text") || (obj.tagName.toLowerCase() == "textarea")){			
			$(obj).addClass(inactive);			
			var text = $(this).text();
			$(this).css("display","none");			
			$(obj).val(text);
			$(obj).focus(function(){	
				$(this).addClass(focused);
				$(this).removeClass(inactive);
				$(this).removeClass(active);								  
				if($(this).val() == text) $(this).val("");
			});	
			$(obj).blur(function(){	
				$(this).removeClass(focused);													 
				if($(this).val() == "") {
					$(this).val(text);
					$(this).addClass(inactive);
				} else {
					$(this).addClass(active);		
				};				
			});				
		};	
	});		
};




