$(function(){

    $('a[href*=#]').click(function() {
    
    if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') 
        && location.hostname == this.hostname) {
        
            var $target = $(this.hash);
            
            $target = $target.length && $target || $('[name=' + this.hash.slice(1) +']');
            
            if ($target.length) {
            
                var targetOffset = $target.offset().top;
                
                $('html,body').animate({scrollTop: targetOffset}, 1000);
                    
                return false;
                
            }
            
        }
        
    });
    
});

var erasea_tmp="";

function erasea(contenido){

erasea_tmp=contenido;

}

function load_contacto(){
var height=500;
var formulario="<div class=\"formulario_contacto\"><img alt='Cerrar formulario' src='http://foro.sectorjuegos.net/plugins/fancy_closebox.png' style='position:absolute;top:30px;left:615px;cursor:pointer;' onclick='$(\"div.formulario_contacto\").remove();$(\"div.oscura\").hide()' /> \
<form><input type='text' value='Nombre' onFocus='erasea_tmp=$(this).val();$(this).val(\"\");' onBlur='if($(this).val()==\"\")$(this).val(erasea_tmp);' name='contacto_nombre' class=\"contacto_nombre\" /><input type='text' value='E-mail' name='contacto_email' class=\"contacto_email\" /><input type='text' name='contacto_url' value='URL/Fuente' class=\"contacto_url\" /><textarea name='contacto_texto' class='contacto_texto'id='contacto_texto'>Escribe tu comentario aqui...</textarea> <img src='http://noticias.sectorjuegos.net/img/trans.png' style='cursor:pointer;position:absolute;width:152px;height:42px;border:0px solid #cfcfcf;top:255px;left:140px;' onclick='enviar_form($(\"input[name=contacto_nombre]\").val(),$(\"input[name=contacto_email]\").val(),$(\"input[name=contacto_url]\").val(),$(\"textarea[name=contacto_texto]\").val());' /></form></div>";

$("body").prepend(formulario);
$('.formulario_contacto').css("left", ($(window).width() / 2) - 350 + $(window).scrollLeft() + "px"); 
$('.formulario_contacto').css("top", (($(window).height() - height ) / 2 + $(window).scrollTop()) + 10  + "px"); 


}

function enviar_form(nombre,email,url,coment){



}

