if(( typeof jQuery != "undefined" ) && ( typeof jQuery.ui != "undefined" )) {
  $(document).ready( function() {
    var url = "";

    $("#tabs").tabs({
      fx: { opacity: 'toggle', duration: 'normal' },
      select: function(event,ui) {
        // 旧コンテンツの表示？
        if( ui.index == 6 )  {
          url=$.data(ui.tab, 'load.tabs');
          $("#confirm").dialog('open');
          return false;
        }
        return true;
      }
    });
    $("#confirm").dialog({
      bgiframe: true,
      autoOpen: false,
      width: 500,
      height: 300,
      modal: true,
      resizable: false,
      buttons: {
        'Cancel': function() {
          $("#confirm").dialog('close');
        },
        'OK': function() {
          $("#confirm").dialog('close');
          document.location=url;
        }
      }
    }); 
  });
}

