function nneon(){};
$(function () {
   fneon = Math.random();
    orig_bg = $('#bg').css('background-color');
    bg_bg = $('#maincontent').css('background-color');
    fnn = Math.random()*300;
    function neon() {
    
        $('#bg').animate({
            backgroundColor: bg_bg
        }, (fnn * fneon+ 10), function () {
            $('#bg').animate({
                backgroundColor: orig_bg
            }, (fnn * fneon+ 10), function () {
                if (Math.random() * 1000 > 970) {
                    fneon = Math.random();
                    fnn = Math.random()*300;
                    return;
                } else {
                    setTimeout(nneon, fnn * fneon);
                }
            });
        });
    }
    nneon = neon;
/*    function neon() {
        $('#bg').animate({
            backgroundColor: bg_bg
        }, Math.random() * (100 * fneon), function () {
            $('#bg').animate({
                backgroundColor: orig_bg
            }, Math.random() * (100 * fneon), function () {
                if (Math.random() * 1000 > 940) {
                    return;
                } else {
                    fneon = Math.random();
                    setTimeout(nneon, Math.random() * 300 + 10 * fneon);
                }
            });
        });
    }
    if (Math.random() * 1000 > 600) {

    }
    
    //neon();


*/
    $('#maincontent a, .loga a, #rss, #fb').tooltip();
    $('#fb, .loga a, .banner700 a, .banner200 a').click(function () {
        window.open(this.href);
        return false;
    });


});
function goTranslate(el) {
    var vars = [],
        hash;
    var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');

    for (var i = 0; i < hashes.length; i++) {
        hash = hashes[i].split('=');
        vars.push(hash[0]);
        vars[hash[0]] = hash[1];
    }
    if (Boolean(vars['u'])) {
        var u = vars['u'];
    } else {
        var u = document.location.href;
    };
    if (el[el.selectedIndex]['value'] == "sk") {
        var tURL = u;
    } else {
        var tURL = "http://translate.google.com/translate_c?hl=sk" + el[el.selectedIndex]['value'] + "&u=" + u + "";
    }
    if (parent.window) {
        parent.window.location.href = unescape(tURL);
    } else {
        window.location.href = unescape(tURL);
    }
    //return vars;
}
