    // pieces of flair for swf
    var flashvars = {
    };
    var params = {
      menu: "false",
      wmode: "transparent"
    };
    var attributes = {
    };
    
    // swf callbacks
    function onPopupReady() {
      // things to do after popup loads (if you so wish)
    }
    function onPopupClosed() {
      hidePopup();
    }
    function onSignedIn() {
      $(".signed-out").hide();
      $(".signed-in").show();
    }
    function onSignedOut() {
      $('.signed-in').hide();
      $('.signed-out').show();
    }
    
    // functions
    function showPopup() {
      //$('body').css("overflow","hidden");
      $('#login').css("z-index","1000");
      $('#login-swf').focus();
      if (jQuery.browser.msie) {
        $('#gallery-swf').hide();
      }
    }
    function hidePopup() {
      //$('body').css("overflow","visible");
      $('#login').css("z-index","-1000");
      if (jQuery.browser.msie) {
        $('#gallery-swf').show();
      }
    }
    
    // we have contact
    $(document).ready(function() {
      
      // Hacks for IE
      $('body, .button').ifixpng();
      
      if (jQuery.browser.msie) {
        $('a.button').css("font-weight","bold");
        if (jQuery.browser.version.substr(0,3)=="6.0") {
          $('a.button').css("color","#000000");
        }
      }
      
      // events
      $("a:contains('Upload Photo')").click(function(event) {
        event.preventDefault(); 
        showPopup(); 
        document.getElementById('login-swf').startUpload();
      });
      $("a:contains('Register')").click(function(event) {
        event.preventDefault();
        showPopup();        
        document.getElementById('login-swf').register();
      });
      $("a:contains('Sign In')").click(function(event) {
        event.preventDefault();
        showPopup(); 
        document.getElementById('login-swf').signIn();
      });
      $("a:contains('Sign Out')").click(function(event) {
        event.preventDefault();  
        document.getElementById('login-swf').signOut();
      });
      
      $.swfobject.embedSWF("loginWindow.swf", "login-swf", "100%", "100%", "9.0.0", "expressInstall.swf", flashvars, params, attributes);
      
    });
    
