
var Application = new ApplicationClass({yui_path:'/js/yui2/'});
Application.addTexts({
	"DATATABLE.MSG_EMPTY": "No results were found.",
	"DATATABLE.MSG_ERROR": "Error.",
	"DATATABLE.MSG_LOADING": "Loading...",
	"DATATABLE.MSG_SORTASC": "Sort ascending",
	"DATATABLE.MSG_SORTDESC": "Sort descending",
	"DATATABLE.MSG_NO_FILES_SELECTED": "No media selected",
	"APP.LOADING": "Loading, please wait",
	"APP.INFORMATION": "Information",
	"COMM.MSG_ERROR": "Communication issue.",
  "COMM.MSG_ABORTED": "Operation aborted.",
  "COMM.MSG_TIMEOUT": "Operation timed out.",
	"COMM.MSG_TRY_AGAIN": "Please, try again.",
	"DATA.MSG_INVALID_JSON": "Received data have invalid type.",
	"DATA.MSG_PROCESSING_ERROR": "Error occurred during processing received data.",		
	"Save": "Save",
	"Cancel": "Cancel",
	"Delete": "Delete"
});


var Y = YUI({
 modules: {
	  'app.rating': {fullpath: '/js/app/widget/rating.js', requires:['widget', 'node', 'anim', 'io-base']},
	  'app.nodeanim': {fullpath: '/js/app/controller/nodeanim.js', requires:['node', 'anim', 'plugin']}
  }
});
Y.use('node');

showTooltip = function(node) {
  
}

Application.load(['container', 'button', 'animation']);
Application.onReady(function() {
  var d = new YAHOO.widget.SimpleDialog("dlgAlert",
  {
    width: "400px",
    fixedcenter: true,
    visible: false,
    draggable: false,
    zIndex: 9999,
    close: true,
    modal: true,
    effect:{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.25},
    constraintoviewport: true,
    icon: YAHOO.widget.SimpleDialog.ICON_INFO,
    buttons: [ { text:"ОК", handler: function(){this.hide();}, isDefault:true }]
  });
  d.setHeader(Application.getText("APP.INFORMATION"));
  d.render(document.body);
   
  window.alertLock = window.alert;
  window.alert = function(text){
    d.setBody(text);
    d.bringToTop();
    d.show();
  };
});
