﻿$(document).ready(function() {
    var btn11 = $('#btnLogin');
    btn11.click(function() {
        jBox.open('iframe-Login', 'iframe', $(this).attr('href'), $(this).attr('title'), 'width=320,height=220,center=true,minimizable=false,resize=false,draggable=true,model=true,scrolling=false');
        return false;
    });
    var btn22 = $('#btnReg');
    btn22.click(function() {
        jBox.open('iframe-Reg', 'iframe', $(this).attr('href') + '?returnUrl=' + window.location.href, $(this).attr('title'), 'width=720,height=550,center=true,minimizable=false,resize=false,draggable=false,model=true,scrolling=false');
        return false;
    });
    var btn33 = $('#btnChangePass');
    btn33.click(function() {
        jBox.open('iframe-ChangePass', 'iframe', $(this).attr('href') + '?returnUrl=' + window.location.href, $(this).attr('title'), 'width=350,height=180,center=true,minimizable=false,resize=false,draggable=false,model=true,scrolling=false');
        return false;
    });
    
    $('#NavMenu').hover(
        function () {
            $("p", this).fadeIn("fast");
        },
        function () {
            $("p", this).fadeOut("fast");
        }
    ); 
    
    if(window.location.hash.indexOf("#Login") >= 0)
    {
        btn11.click();
    }
});
function OpenWindow(obj, width, height)
{
    var o = $(obj);
    jBox.open(o.attr("href"), 'iframe', o.attr("href"), o.text(), 'width=' + width + ',height=' + height + ',center=true,minimizable=false,resize=false,draggable=true,model=true,scrolling=false');
}
function OpenWindow2(url, title, width, height)
{
    jBox.open(url, 'iframe', url, title, 'width=' + width + ',height=' + height + ',center=true,minimizable=false,resize=false,draggable=true,model=true,scrolling=false');
}