$(function(){
// Dialog
    $('#dialog1').dialog({
        autoOpen: false,
        width: 600,
        modal: true,
        buttons: {
        "Вход": function() {
        document.loginform.submit();
        },
        "х": function() {
        $(this).dialog("close");
        }
        }
});

    $('#dialog2').dialog({
        autoOpen: false,
        width: 600,
        modal: true,
        buttons: {
        "Регистрация": function() {
        document.registerform.submit();
        },
        "х": function() {
        $(this).dialog("close");
        }
        }
});

    $('#dialog3').dialog({
        autoOpen: false,
        width: 600,
        modal: true,
        buttons: {
        "Вход": function() {
        document.loginform3.submit();
        },
        "х": function() {
        $(this).dialog("close");
        }
        }
});

    $('#dialog4').dialog({
        autoOpen: false,
        width: 600,
        modal: true,
        buttons: {
        "Регистрация": function() {
        document.registerform4.submit();
        },
        "х": function() {
        $(this).dialog("close");
        }
        }
});

    $('#dialog7').dialog({
        autoOpen: false,
        width: 170,
        modal: true,
});
                                                                                            
                                                                                    
// Dialog Link
    $('#dialog_link1').click(function(){
    $('#dialog1').dialog('open');
    return false;
    });

    $('#dialog_link2').click(function(){
    $('#dialog2').dialog('open');
    return false;
    });

    $('#dialog_link3').click(function(){
    $('#dialog3').dialog('open');
    return false;
    });

    $('#dialog_link4').click(function(){
    $('#dialog4').dialog('open');
    return false;
    });

    $('#dialog_link5').click(function(){
    $('#dialog4').dialog('open');
    return false;
    });

    $('#dialog_link6').click(function(){
    $('#dialog').dialog('open');
    return false;
    });
    
    $('#dialog_link7').click(function(){
    $('#dialog7').dialog('open');
    return false;
    });
                                                
// Slider
    $('#slider').slider({
        range: true,
        values: [17, 67]
    });
//hover states on the static widgets
    $('#dialog_link1, ul#icons li').hover(
        function() { $(this).addClass('ui-state-hover'); },
        function() { $(this).removeClass('ui-state-hover'); }
    );
    $('#dialog_link2, ul#icons li').hover(
        function() { $(this).addClass('ui-state-hover'); },
        function() { $(this).removeClass('ui-state-hover'); }
    );
    $('#dialog_link3, ul#icons li').hover(
        function() { $(this).addClass('ui-state-hover'); },
        function() { $(this).removeClass('ui-state-hover'); }
    );
    $('#dialog_link3, ul#icons li').hover(
        function() { $(this).addClass('ui-state-hover'); },
        function() { $(this).removeClass('ui-state-hover'); }
    );
	
});


