jQuery.noConflict();

function createBubble(element, content) {
    var tips_options = {
        style: 'darkgrey',
        stem: 'leftBottom',
        effect: 'appear',
        border: 0,
        radius: 0,
        hook: { target: 'topRight', tip: 'bottomLeft'},
        offset: { x: 0, y: 14 },
        hideOn: false,
        hideAfter: .2,
        width: 'auto',
        delay: .5 
    };

    new Tip(element, content, tips_options);
}

function facebook_automatically_post(ctrl) {
  if ( ctrl.checked ) { 
    FB.Connect.showPermissionDialog("publish_stream", 
        function(perms) { 
          if ( !perms ) { 
            ctrl.checked = false
          }
        }
    );
  }
}

function assigned_account_with_facebook(ctrl) {
  if ( ctrl.checked ) {
    FB.Connect.requireSession(connect_to_facebook());
  }
  else {
    $('de_assigned_facebook').submit();
  }
}

function parse_fbml_tag() {
  if ( FB.XFBML.Host.parseDomTree ) 
    setTimeout( FB.XFBML.Host.parseDomTree, 0 ); 
}

function fix_close_button(){
    var IE = '\v' == 'v';
    if (IE) {
        jQuery('#lightwindow_title_bar').css("position", "relative");
        jQuery('#lightwindow_title_bar').css("left", jQuery('#lightwindow_container').width() - 25);
        
    }
    jQuery("#lightwindow_title_bar_inner").show();
}

