function clear_me(id) {
	if (id.value==id.defaultValue) {
		id.value='';
		id.style.backgroundPosition='top left';
	}
	else
		if (id.value=='') {
			id.value=id.defaultValue;
			id.style.backgroundPosition='0px -20px';
		}
}

function confirm_del(mode) {

	switch (mode) {
	
		case 'art': return confirm('Na pewno chcesz usunąć ten artykuł?\nOperacji nie będzie można cofnąć!'); 
		case 'user': return confirm('Na pewno chcesz usunąć konto tego użytkownika?\nOperacji nie będzie można cofnąć!'); 
		case 'cat': return confirm('Na pewno chcesz usunąć wybraną kategorię?\nOperacji nie będzie można cofnąć!'); 
	}
	
}

function display_sw(param) {
	var id = document.getElementById(param);
	
	if (id.style.display=="none")
		id.style.display="block";
	else
		id.style.display="none";
}

//obsluga przeladowania strony w js
 $(document).ready(function(){
 
 
    $('#a').click(function(){
		if ($(this).attr('href') == '?') 
			$(this).attr('href') = '';
		if ($(this).attr('href') != '#')
			$('#content').load($(this).attr('href') + '&mode=ajax');
		return false;
    });
	
	

	
	
	//obsluga przeladowania strony w js
    $('a').live('click', function(){
	
	var x = $(this);
	if ($(this).attr('rel') == 'follow') return true;
	if ($(this).attr('href') == '?') $(this).attr('href') = '';
	if ($(this).attr('href') == '#') return false;
		
	if ($(this).attr('rel') == 'confirm_del')
		if (confirm_del()==false) return false;
	if ($(this).attr('rel') == 'custom') return false;
	
	
	
			
	$("#column_center")
		.css('position', 'relative')
		.animate({
			top: "20px"
			
		}, 100)
		.animate({
			opacity: "0",
			top: "-600px"
			
		}, 300, function() {
				$('#content').load(x.attr('href') + '&mode=ajax');
				
		});
		return false;
	});
	/*koniec przeladowania strony*/	
	
 


 });
 
 

