	function lookup(inputString) {
		if(inputString.length == 0) {
			// Hide the suggestion box.
			$('#suggestions').hide();
		} else {
	/*	aqui tenemos que poner la ruta absoluta de rpc.php(http://juegogle.com/rpc.php) porque con el .htacces de los juegos no encuentra la ruta*/
            $.post("rpc.php", {queryString: ""+inputString+""}, function(data){
				if(data.length >0) {
					$('#suggestions').show();
					$('#autoSuggestionsList').html(data);
				}
			});
		}
	} // lookup
	
	function fill(thisValue) {
		$('#inputString').val(thisValue);
		setTimeout("$('#suggestions').hide();", 200);
	}
$(document).ready(function(){
    
$('#lista0 a').bind('mouseover',function(){ 
var imgPreview = $(this).attr('rel'); 
var url = $(this).attr('href');
var titulo = $(this).attr('titulo');
$('#img-cont0 img').attr('src',imgPreview) 
$('#img-cont0 a').attr('href', url) 
$('#img-cont0 img').attr('title', titulo)});

$('#lista1 a').bind('mouseover',function(){ 
var imgPreview = $(this).attr('rel'); 
var url = $(this).attr('href');
var titulo = $(this).attr('titulo');
$('#img-cont1 img').attr('src',imgPreview) 
$('#img-cont1 a').attr('href', url) 
$('#img-cont1 img').attr('title', titulo)});

$('#lista2 a').bind('mouseover',function(){ 
var imgPreview = $(this).attr('rel'); 
var url = $(this).attr('href');
var titulo = $(this).attr('titulo');
$('#img-cont2 img').attr('src',imgPreview) 
$('#img-cont2 a').attr('href', url) 
$('#img-cont2 img').attr('title', titulo)});

$('#lista3 a').bind('mouseover',function(){ 
var imgPreview = $(this).attr('rel'); 
var url = $(this).attr('href');
var titulo = $(this).attr('titulo');
$('#img-cont3 img').attr('src',imgPreview) 
$('#img-cont3 a').attr('href', url) 
$('#img-cont3 img').attr('title', titulo)});

$('#lista4 a').bind('mouseover',function(){ 
var imgPreview = $(this).attr('rel'); 
var url = $(this).attr('href');
var titulo = $(this).attr('titulo');
$('#img-cont4 img').attr('src',imgPreview) 
$('#img-cont4 a').attr('href', url) 
$('#img-cont4 img').attr('title', titulo)});

$('#lista5 a').bind('mouseover',function(){ 
var imgPreview = $(this).attr('rel'); 
var url = $(this).attr('href');
var titulo = $(this).attr('titulo');
$('#img-cont5 img').attr('src',imgPreview) 
$('#img-cont5 a').attr('href', url) 
$('#img-cont5 img').attr('title', titulo)});

$('#lista6 a').bind('mouseover',function(){ 
var imgPreview = $(this).attr('rel'); 
var url = $(this).attr('href');
var titulo = $(this).attr('titulo');
$('#img-cont6 img').attr('src',imgPreview) 
$('#img-cont6 a').attr('href', url) 
$('#img-cont6 img').attr('title', titulo)});

$('#lista7 a').bind('mouseover',function(){ 
var imgPreview = $(this).attr('rel'); 
var url = $(this).attr('href');
var titulo = $(this).attr('titulo');
$('#img-cont7 img').attr('src',imgPreview) 
$('#img-cont7 a').attr('href', url) 
$('#img-cont7 img').attr('title', titulo)});

$('#lista8 a').bind('mouseover',function(){ 
var imgPreview = $(this).attr('rel'); 
var url = $(this).attr('href');
var titulo = $(this).attr('titulo');
$('#img-cont8 img').attr('src',imgPreview) 
$('#img-cont8 a').attr('href', url) 
$('#img-cont8 img').attr('title', titulo)});

$('#lista9 a').bind('mouseover',function(){ 
var imgPreview = $(this).attr('rel'); 
var url = $(this).attr('href');
var titulo = $(this).attr('titulo');
$('#img-cont9 img').attr('src',imgPreview) 
$('#img-cont9 a').attr('href', url) 
$('#img-cont9 img').attr('title', titulo)});

$('#lista10 a').bind('mouseover',function(){ 
var imgPreview = $(this).attr('rel'); 
var url = $(this).attr('href');
var titulo = $(this).attr('titulo');
$('#img-cont10 img').attr('src',imgPreview) 
$('#img-cont10 a').attr('href', url) 
$('#img-cont10 img').attr('title', titulo)});

$('#lista11 a').bind('mouseover',function(){ 
var imgPreview = $(this).attr('rel'); 
var url = $(this).attr('href');
var titulo = $(this).attr('titulo');
$('#img-cont11 img').attr('src',imgPreview) 
$('#img-cont11 a').attr('href', url) 
$('#img-cont11 img').attr('title', titulo)});

$('#lista12 a').bind('mouseover',function(){ 
var imgPreview = $(this).attr('rel'); 
var url = $(this).attr('href');
var titulo = $(this).attr('titulo');
$('#img-cont12 img').attr('src',imgPreview) 
$('#img-cont12 a').attr('href', url) 
$('#img-cont12 img').attr('title', titulo)});

$('#lista13 a').bind('mouseover',function(){ 
var imgPreview = $(this).attr('rel'); 
var url = $(this).attr('href');
var titulo = $(this).attr('titulo');
$('#img-cont13 img').attr('src',imgPreview) 
$('#img-cont13 a').attr('href', url) 
$('#img-cont13 img').attr('title', titulo)});

$('#lista14 a').bind('mouseover',function(){ 
var imgPreview = $(this).attr('rel'); 
var url = $(this).attr('href');
var titulo = $(this).attr('titulo');
$('#img-cont14 img').attr('src',imgPreview) 
$('#img-cont14 a').attr('href', url) 
$('#img-cont14 img').attr('title', titulo)});

$('#lista15 a').bind('mouseover',function(){ 
var imgPreview = $(this).attr('rel'); 
var url = $(this).attr('href');
var titulo = $(this).attr('titulo');
$('#img-cont15 img').attr('src',imgPreview) 
$('#img-cont15 a').attr('href', url) 
$('#img-cont15 img').attr('title', titulo)});

$('#lista16 a').bind('mouseover',function(){ 
var imgPreview = $(this).attr('rel'); 
var url = $(this).attr('href');
var titulo = $(this).attr('titulo');
$('#img-cont16 img').attr('src',imgPreview) 
$('#img-cont16 a').attr('href', url) 
$('#img-cont16 img').attr('title', titulo)});

$('#lista17 a').bind('mouseover',function(){ 
var imgPreview = $(this).attr('rel'); 
var url = $(this).attr('href');
var titulo = $(this).attr('titulo');
$('#img-cont17 img').attr('src',imgPreview) 
$('#img-cont17 a').attr('href', url) 
$('#img-cont17 img').attr('title', titulo)});

$('#lista18 a').bind('mouseover',function(){ 
var imgPreview = $(this).attr('rel'); 
var url = $(this).attr('href');
var titulo = $(this).attr('titulo');
$('#img-cont18 img').attr('src',imgPreview) 
$('#img-cont18 a').attr('href', url) 
$('#img-cont18 img').attr('title', titulo)});

$('#lista19 a').bind('mouseover',function(){ 
var imgPreview = $(this).attr('rel'); 
var url = $(this).attr('href');
var titulo = $(this).attr('titulo');
$('#img-cont19 img').attr('src',imgPreview) 
$('#img-cont19 a').attr('href', url) 
$('#img-cont19 img').attr('title', titulo)});

$('#lista20 a').bind('mouseover',function(){ 
var imgPreview = $(this).attr('rel'); 
var url = $(this).attr('href');
var titulo = $(this).attr('titulo');
$('#img-cont20 img').attr('src',imgPreview) 
$('#img-cont20 a').attr('href', url) 
$('#img-cont20 img').attr('title', titulo)});

$('#lista21 a').bind('mouseover',function(){ 
var imgPreview = $(this).attr('rel'); 
var url = $(this).attr('href');
var titulo = $(this).attr('titulo');
$('#img-cont21 img').attr('src',imgPreview) 
$('#img-cont21 a').attr('href', url) 
$('#img-cont21 img').attr('title', titulo)});



    $('#suggestions').corner("10px");
  
    $('#dentro_login').corner("15px");
    
    $('#contenedor_logo').corner("bottom 20px");
    
    $('#div_fav').corner("15px");
    
    $('#ultimoad').corner("15px");
    
    $('#mas_popular').corner("15px");
    
    $('#contenedor_categorias').corner("15px");
    
    $('#donar').corner("15px");
    
    $('#mas_categorias').corner("15px");
    
    $('#main_contents').corner("15px");
    
    $('#main_contents_index').corner("15px");
  
  
$('#juegos0').corner("15px");

$('#juegos1').corner("15px");

$('#juegos2').corner("15px");

$('#juegos3').corner("15px");

$('#juegos4').corner("15px");

$('#juegos5').corner("15px");

$('#juegos6').corner("15px");

$('#juegos7').corner("15px");

$('#juegos8').corner("15px");

$('#juegos9').corner("15px");

$('#juegos10').corner("15px");

$('#juegos11').corner("15px");

$('#juegos12').corner("15px");

$('#juegos13').corner("15px");

$('#juegos14').corner("15px");

$('#juegos15').corner("15px");

$('#juegos16').corner("15px");

$('#juegos17').corner("15px");

$('#juegos18').corner("15px");

$('#juegos19').corner("15px");

$('#juegos20').corner("15px");

$('#juegos21').corner("15px");


    
    
    $('#juego_izquierda').corner("25px");
    
    $('#juego_derecha').corner("15px");
    
    $('#bajo_juego').corner("15px");
    
    $('#rel').corner("15px");
    
    $('#rss').corner("15px");
    
    $('#megusta').corner("15px");
    
    $('#nube_tags').corner("15px");
    
    $('#links').corner("15px");
    
    $('#estadisticas').corner("15px");
    
    $('#footer_juego').corner("top 15px");
    
    
    	$('#quitar_jefe').click(function(){
		
			$('#div_jefeizq').hide("normal");
            $('#div_jefe_drch').hide("normal");
            $('#quitar_jefe').hide("fast");
            $('#quitar_jefe2').hide("fast");
            $('#poner_jefe').show("normal");
            $('#poner_jefe2').show("normal");
})
    	$('#poner_jefe').click(function(){
		
			$('#div_jefeizq').show("normal");
            $('#div_jefe_drch').show("normal");
            $('#quitar_jefe').show("normal");
            $('#quitar_jefe2').show("normal");
            $('#poner_jefe').hide("fast");
            $('#poner_jefe2').hide("fast");
})

$('#quitar_jefe2').click(function(){
		
			$('#div_jefeizq').hide("normal");
            $('#div_jefe_drch').hide("normal");
            $('#quitar_jefe').hide("fast");
            $('#quitar_jefe2').hide("fast");
            $('#poner_jefe').show("normal");
            $('#poner_jefe2').show("normal");
})

$('#poner_jefe2').click(function(){
		
			$('#div_jefeizq').show("normal");
            $('#div_jefe_drch').show("normal");
            $('#quitar_jefe').show("normal");
            $('#quitar_jefe2').show("normal");
            $('#poner_jefe').hide("fast");
            $('#poner_jefe2').hide("fast");
})

$('#compartir').mouseover (function(){
        $('#bajo_juego_izquierda_1').hide("fast");
        $('#bajo_juego_izquierda_2').show("fast");
}) 
$('#minijuego').mouseover(function(){
        $('#bajo_juego_izquierda_1').show("fast");
        $('#bajo_juego_izquierda_2').hide("fast");
}) 


$(function() {
$('#suggestions a').tooltip({
	track: true,
	delay: 0,
	showURL: false,
	showBody: " - ",
	fade: 250
});
});

$(function() {
$('#rel a').tooltip({
	track: true,
	delay: 0,
	showURL: false,
	showBody: " - ",
	fade: 250
});
});

$(function() {
$('#ultimoad a').tooltip({
	track: true,
	delay: 0,
	showURL: false,
	showBody: " - ",
	fade: 250
});
});

$(function() {
$('#mas_popular a').tooltip({
	track: true,
	delay: 0,
	showURL: false,
	showBody: " - ",
	fade: 250
});
});


$(function() {
$('#ads2 a').tooltip({
	track: true,
	delay: 0,
	showURL: false,
	showBody: " - ",
	fade: 250
});
});


$(function() {
$('.index_files_right a').tooltip({
	track: true,
	delay: 0,
	showURL: false,
    showBody: " - ",
	fade: 250
});
});
$('#luz').click(function(){
    $('#luz_ap').fadeTo('fast',0.9, function(){
      $('#luz_ap').show("fast")  
    });
    
});

$('#luz_ap').click(function(){
    $('#luz_ap').hide("fast");
});
});

