if(top.frames.length > 0) {    top.location.href = self.location;
}

$(document).ready(function(){ 
    $("div#sort-by").hide();
    $("div#about").hide();
    $("div#statistics").hide();
    $("div#similar-sites").hide();
});

function change_star_over(siteid, star) {
    for (var i = 1; i <= 5; i++) {
        if(i <= star) {
            document.getElementById("star-" + siteid + "-" + i).className = 'full-star-rate';
        } else {
            document.getElementById("star-" + siteid + "-" + i).className = 'none-star-rate';    
        } 
    }
}

function change_star_out(siteid) {
    for (var i = 1; i <= 5; i++) {
        document.getElementById("star-" + siteid + "-" + i).className = ''; 
    }
}

function rate_effect(siteid, rate) {
    rate_site(siteid, rate);
    //$('div#star-' + siteid).fadeOut(1500, function(){ rate_site(siteid, rate); });
    //$('div#star-' + siteid).fadeIn(1500); 
}

function clear_suggest(doit) {
    if(doit == true) {
        document.getElementById("link").value = '';
    } else {
        setTimeout("clear_suggest(true)", 1000);
    }
}

function jump_sort() {
    window.location.href = '/links/' + document.getElementById("sortby").value + '/';
}