



$(document).ready(function() { 
	


$('#showed').show(); 

var show_gallery = 0;

$('#Pokaż_galerie').click(function() {
	
	if(show_gallery == 0)
	{ $("div#mygalone").slideView(); show_gallery = 1; }
	else {  }
		
});

var change = 0;


$('#show_hide').click(function() {

  if(change == 0)
  {
     document.getElementById('show_hide').innerHTML = '----------------------------------------------------------------------------------------------------------------- + Rozwiń komentarze    	';
     change = 1;
  } 
  else{
    document.getElementById('show_hide').innerHTML = '-------------------------------------------------------------------------------------------------------------- - Zwiń komentarze  	';
     change = 0;
}


  $('#showed').slideToggle(400);
return false;
}); 

document.getElementById('show_hide').innerHTML = '-------------------------------------------------------------------------------------------------------------- - Zwiń komentarze  	';
});

function vote(id,action,module) {

var pro = module;

switch(pro){
    case 'game':       
	$.ajax({url: 'modules/AjaxVoteGames/vote.php?id='+id+'&action='+action, success: function(data){
		$('#rating').html(data);
	}
	});
    break;
    case 'video':       
	$.ajax({url: 'modules/AjaxVoteVideo/vote.php?id='+id+'&action='+action, success: function(data){
		$('#rating').html(data);
	}
	});
    break;      
    case 'photo':       
	$.ajax({url: 'modules/AjaxVotePhoto/vote.php?id='+id+'&action='+action, success: function(data){
		$('#rating').html(data);
	}
	});
    break;    


}

}

function vote_jokes(id) {
	$.ajax({url: 'modules/Jokes/vote.php?id='+id, success: function(data){
		$('#glosowanie_jokes_'+id).html(data);
	}
	});
	
	
}


$(function() {
$('.tooltip li a').tooltip({
   showURL: false,
   fade: 250
});
$('.tooltip_profile img').tooltip({
   showURL: false,
   fade: 250
});




});

function change_profil(action)
{
	//alert('dziala');
	
	  var action = action;
	  
	  switch(action)
	  {
			  case 'k' : { 
				  document.getElementById('search_small_form').removeAttribute('action');
				  document.getElementById('search_small_form').setAttribute('action','http://przelotne.pl/szukaj/kobiety.html');
			  	}break;
			  case 'm' : { 
				  document.getElementById('search_small_form').removeAttribute('action');
				  document.getElementById('search_small_form').setAttribute('action','http://przelotne.pl/szukaj/mezczyzni.html');
			  	}break;	 
			  case 'p' : { 
				  document.getElementById('search_small_form').removeAttribute('action');
				  document.getElementById('search_small_form').setAttribute('action','http://przelotne.pl/szukaj/pary.html');
			  	}break;	
	  }
}


function show_profile(action)
{

  var action = action;	
	
switch(action)
{

case 'szczegoly' : { 
	document.getElementById('profil_szczegoly').style.display = 'block';
	document.getElementById('profil_galeria').style.display = 'none';
	document.getElementById('profil_znajomi').style.display = 'none';
	document.getElementById('profil_opowiadania').style.display = 'none';
	document.getElementById('profil_ankiety').style.display = 'none';
	document.getElementById('profil_imprezy').style.display = 'none';

	
	
	
} break;
case 'galeria' : {
	document.getElementById('profil_galeria').style.display = 'block';
	document.getElementById('profil_szczegoly').style.display = 'none';
	document.getElementById('profil_znajomi').style.display = 'none';
	document.getElementById('profil_opowiadania').style.display = 'none';
	document.getElementById('profil_ankiety').style.display = 'none';
	document.getElementById('profil_imprezy').style.display = 'none';

	

	
} break;
case 'znajomi' : {
	document.getElementById('profil_znajomi').style.display = 'block';	
	document.getElementById('profil_szczegoly').style.display = 'none';
	document.getElementById('profil_galeria').style.display = 'none';
	document.getElementById('profil_opowiadania').style.display = 'none';
	document.getElementById('profil_ankiety').style.display = 'none';
	document.getElementById('profil_imprezy').style.display = 'none';
	
} break;
case 'opowiadania' : {
	document.getElementById('profil_opowiadania').style.display = 'block';	
	document.getElementById('profil_szczegoly').style.display = 'none';
	document.getElementById('profil_galeria').style.display = 'none';
	document.getElementById('profil_znajomi').style.display = 'none';
	document.getElementById('profil_ankiety').style.display = 'none';
	document.getElementById('profil_imprezy').style.display = 'none';

} break;
case 'ankiety' : { 
	document.getElementById('profil_ankiety').style.display = 'block';	
	document.getElementById('profil_szczegoly').style.display = 'none';
	document.getElementById('profil_galeria').style.display = 'none';
	document.getElementById('profil_znajomi').style.display = 'none';
	document.getElementById('profil_opowiadania').style.display = 'none';
	document.getElementById('profil_imprezy').style.display = 'none';

} break;
case 'imprezy' : {
	document.getElementById('profil_imprezy').style.display = 'block';
	document.getElementById('profil_szczegoly').style.display = 'none';
	document.getElementById('profil_galeria').style.display = 'none';
	document.getElementById('profil_znajomi').style.display = 'none';
	document.getElementById('profil_opowiadania').style.display = 'none';
	document.getElementById('profil_ankiety').style.display = 'none';

	
} break;
}
}
	


$(function() {
	 $('a[@rel*=lightbox]').lightBox();
		 
});



