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;
    });
	
	
/**/
$("#latest_g ul.thumb li").hover(function() {
	$(this).css({'z-index' : '10000'}); /*Add a higher z-index value so this image stays on top*/ 
	$(this).find('img').addClass("hover").stop() /* Add class of "hover", then stop animation queue buildup*/
		.animate({
			marginTop: '-110px', /* The next 4 lines will vertically align this image */ 
			marginLeft: '-118px',
			top: '50%',
			left: '50%',
			width: '150px', /* Set new width */
			padding: '10px'
		}, 200); /* this value of "200" is the speed of how fast/slow this hover animates */

	} , function() {
	$(this).css({'z-index' : '0'}); /* Set z-index back to 0 */
	$(this).find('img').removeClass("hover").stop()  /* Remove the "hover" class , then stop animation queue buildup*/
		.animate({
			marginTop: '0', /* Set alignment back to default */
			marginLeft: '0',
			top: '0',
			left: '0',
			width: '102px', /* Set width back to default */
			padding: '0px'
		}, 400);
});

$("#latest_g ul.thumb li.lx").hover(function() {
	$(this).css({'z-index' : '10000'}); /*Add a higher z-index value so this image stays on top*/ 
	$(this).find('img').addClass("hover").stop() /* Add class of "hover", then stop animation queue buildup*/
		.animate({
			marginTop: '-110px', /* The next 4 lines will vertically align this image */ 
			marginLeft: '-65px',
			top: '50%',
			left: '50%',
			width: '150px', /* Set new width */
			padding: '10px'
		}, 200); /* this value of "200" is the speed of how fast/slow this hover animates */

	} , function() {
	$(this).css({'z-index' : '0'}); /* Set z-index back to 0 */
	$(this).find('img').removeClass("hover").stop()  /* Remove the "hover" class , then stop animation queue buildup*/
		.animate({
			marginTop: '0', /* Set alignment back to default */
			marginLeft: '0',
			top: '0',
			left: '0',
			width: '102px', /* Set width back to default */
			padding: '0px'
		}, 400);
});	
	
	
	
	
/*easyslider:*/	
$("#slider").easySlider({
				auto: true, 
				continuous: true,
				controlsShow:	false,
				pause:		4000

			});


			
			
			
$("#pozdro_sw").click(function(){

	$("#pozdro").hide('slow');
	return false;
});

$("#po_add").click(function(){

	$("#pozdro").show('slow');
	return false;
});


$("#pozdros").marquee({yScroll: "bottom"});

$('#pozdro').draggable();



 });
 
 

