﻿$(document).ready(function () {
    //display news when ready - prevent ie8 problem
    $("#ctl00_ContentPlaceHolder1_newslist").css("display", "block");

    if (liop != "0") {
        $("#in" + sideulop).css("display", "block");
        $("#ctl00_top_nuv  #outli" + ulop + " a").addClass("corrent");
        $("#ctl00_sidemenu  #h_outli" + liop + ".p_menu a").addClass("pcorrent");
        $("#in" + sideulop + " li:nth-child(" + liop + ") a").addClass("Incorrent");
    }
    else if (ulop != "0") {
        $("#ctl00_top_nuv  #outli" + ulop + " a").addClass("corrent");

    }

    if (sideulop != 0) {
        $("#ctl00_sidemenu  #h_outli" + sideulop + " a.outul").addClass("corrent");
        $("#ctl00_sidemenu  #h_outli" + sideulop + " a.outul").addClass("corrent");

    }

    if ($(window).height() +100  >= $(document).height()) {
        $("#backtop").hide();

    }
});


function fbs_click() {
    u = location.href;
    if (u.indexOf("aspx") == -1) {
        if (u.indexOf("?") == -1) {
            u += ".aspx";
        }
        else {
            var newurl = u.split("?");
            u = newurl[0] + ".aspx?" + newurl[1];
        }

    }
    t = document.title;
    window.open('http://www.facebook.com/sharer.php?u=' + encodeURIComponent(u) + '&t=' + encodeURIComponent(t), 'sharer', 'toolbar=0,status=0,width=626,height=436');
    return false;
}
//                    function tweetershareIn() {
//                        var u = location.href;
//                        window.open('http://twitter.com/share?url=' + encodeURIComponent(u), 'sharer', 'toolbar=0,status=0,width=626,height=436');
//                        return false;
//                    }



