var toolTipBG = new Image();
toolTipBG.src = '_style/_images/bubble2.png';

var dropDownBG = new Image();
dropDownBG.src = '_style/_images/bg-sub-nav.jpg';

function initToolTips(elements) {
    if (elements == null) {
        elements = $$('.toolTips');
    }
    var Tips2 = new Tips(elements, {
        initialize:function(){
            this.fx = new Fx.Style(this.toolTip, 'opacity', {duration: 500, wait: false}).set(0);
        },
        onShow: function(toolTip) {
            this.fx.start(1);
        },
        onHide: function(toolTip) {
            this.fx.start(0);
        },
        offsets: {'x': 25, 'y': -40}
    });
}

function isInteger( string ) {
    return !isNaN( parseInt( string ) );
}
function confirmDelete(ev) {
    if(!confirm("Are you sure you want to delete the following: " + this.title + "?")) {
        new Event(ev).stop()
    }
}
window.addEvent('domready', function() {

    $$('.popup-calendar').each(function (element) {
        Calendar.setup(
        {
            inputField : element.getAttribute('id'), // ID of the input field
            ifFormat : "%Y-%m-%d", // the date format
            button : element.getAttribute('id'), // ID of the button
            singleClick : true
        }
      );
    });
    MOOdalBox.init.bind(MOOdalBox);    
    initToolTips();
});
