function print(url) {
    window.open(url, "print", "height=600,width=800,left=100,top=30,scrollbars=yes");
    return false;
}

$(".closeHelp").on('click', function () {
    $(".help").hide();
});

$(document).ready(function () {

    /*cabinet's tab*/
    $(".tabsItem").on('click', function () {
        var tabSelId = $(".tabsSelected").attr("id");
        $("." + tabSelId).show();

        $("#about_company").hide();

        var tabsRC = '<img class="tabsRC" alt="" src="/images/tabsRC.png" />';
        var tabsLC = '<img class="tabsLC" alt="" src="/images/tabsLC.png" />';

        $(".tabCont").hide();
        $(".compLogo").show();
        var tabClid = $(this).attr("id");

        if (tabClid == 'tab-1') {
            location.hash = "#about";
        }
        if (tabClid == 'tab-2') {
            location.hash = "#price";
            //$('#yt1').click();
        }
        if (tabClid == 'tab-3') {
            location.hash = "#comments";
        }
        if (tabClid == 'tab-4') {
            location.hash = "#photo";
        }
        if (tabClid == 'tab-8') {
            location.hash = "#demand";
        }
        if (tabClid == 'tab-9') {
            location.hash = "#stock";
            $('.compLogo').hide();
        }
        if (tabClid == 'tab-banners') {
            location.hash = "#banners";
            $('.compLogo').hide();
        }
        if (tabClid == 'tab-admodules') {
            location.hash = "#admodules";
        }
        $(".tabsItem").removeClass("tabsSelected");
        $(".tabsRC").remove();
        $(".tabsLC").remove();
        $(this).toggleClass("tabsSelected");
        $(this).append(tabsRC, tabsLC);
        $("." + tabClid).show();
        if (tabClid == 'tab-5') {
            location.hash = "#map";
        }
    });

    $("").prettyPhoto({
        'deeplinking': false,
        'social_tools': false,
        'default_width': 500,
        'default_height': 800,
        'allow_resize': false,
        'callback': function () {
            window.location.reload(true);
        }
    });
});
