$(document).ready(function() {

  $('#login a').on('click', function(event){
    event.preventDefault();
    $target = $(event.target)
    $.ajax({
      url: $target.attr('href')
    }).done(function(response){
        $('#form-container').html(response).hide().fadeIn(300);
    })
  })

  $('#register a').on('click', function(event){
    event.preventDefault();
    $target = $(event.target)
    $.ajax({
      url: $target.attr('href')
    }).done(function(response){
        $('#form-container').html(response).hide().fadeIn(300);
    })
  })
});
@@ -1,8 +1,11 @@
+// 
 $(docume
@@ -28,16 +28,19 @@
 on() %7B%0A%0A
+// 
   $('#lo
@@ -68,32 +68,35 @@
 unction(event)%7B%0A
+// 
     event.preven
@@ -99,32 +99,35 @@
 eventDefault();%0A
+// 
     $target = $(
@@ -132,32 +132,35 @@
 $(event.target)%0A
+// 
     $.ajax(%7B%0A   
@@ -148,38 +148,41 @@
 //     $.ajax(%7B%0A
+//
       
+ 
 url: $target.att
@@ -183,32 +183,35 @@
 et.attr('href')%0A
+// 
     %7D).done(func
@@ -218,32 +218,35 @@
 tion(response)%7B%0A
+// 
         $('#form
@@ -297,21 +297,30 @@
 0);%0A
+//
     
+ 
 %7D)%0A
+// 
   %7D)%0A%0A
+// 
   $(
@@ -363,16 +363,19 @@
 event)%7B%0A
+// 
     even
@@ -394,16 +394,19 @@
 ault();%0A
+// 
     $tar
@@ -427,16 +427,19 @@
 target)%0A
+// 
     $.aj
@@ -443,16 +443,19 @@
 .ajax(%7B%0A
+// 
       ur
@@ -478,20 +478,23 @@
 'href')%0A
+//
     
+ 
 %7D).done(
@@ -513,16 +513,19 @@
 ponse)%7B%0A
+// 
         
@@ -580,23 +580,1042 @@
 n(300);%0A
+// 
     %7D)%0A
+//   %7D)%0A// %7D);%0A%0A%0A$(document).ready(function() %7B%0A%09$(%22#login-box%22).dialog(%7B%0A    modal: true,%0A    autoOpen: false,%0A    minHeight: 200,%0A    width: 200,%0A    appendTo: %22#form-box%22,%0A    position: (%7B my: %22top%22, at: %22center top%22, of: %22#form-box%22 %7D),%0A    show: %7B%0A        effect: %22blind%22,%0A        duration: 1000%0A    %7D,%0A    hide: %7B%0A        effect: %22explode%22,%0A        duration: 1000%0A    %7D%0A%09%7D);%0A%0A  $('#login').on('click', function(event)%7B%0A%09%09event.preventDefault()%0A%09%09$form = $(event.target).next()%0A  %09$('#login-box').dialog('open');%0A  %7D)%0A%0A  $(%22#register-box%22).dialog(%7B%0A    modal: true,%0A    autoOpen: false,%0A    minHeight: 200,%0A    width: 200,%0A    appendTo: %22#form-box%22,%0A    position: (%7B my: %22top%22, at: %22center top%22, of: %22#form-box%22 %7D),%0A    // show: %7B%0A    //     effect: %22blind%22,%0A    //     duration: 1000%0A    // %7D,%0A    hide: %7B%0A        effect: %22explode%22,%0A        duration: 1000%0A    %7D%0A%09%7D);%0A%0A  $('#register').on('click', function(event)%7B%0A%09%09event.preventDefault()%0A%09%09$form = $(event.target).next()%0A  %09$('#register-box').dialog('open');%0A
   %7D)%0A%7D);

add js with jquery dialog for login and register forms