/*
* Ezee Dragger is a module designed to make editing the location of your logo 
* easier for those who who do not want to spend much time coding. 
* On top of this it also makes the logo draggable! 
* (c) Copyright: Ninjoomla, www.ninjoomla.com - Code so sharp, it hurts.
* email: daniel@ninjoomla.com 
* date: Sep, 2007
* Release: 1.1.1
* PHP Code License : http://www.gnu.org/copyleft/gpl.html GNU/GPL 
* JavaScript Code  : http://creativecommons.org/licenses/by-nc-sa/3.0/
*
* Changelog
* 
* 1.1.1  Sep 25, 07
*       Added XHTML and CSS validation
*       Revised and improved code speed
*		Misc php cleaning and optimising
*		Added alt param for better SEO and validation
*
* 1.1 July 18, 07 : 
*       Added a lot of comments to the source (pro version) 
*       Revised the JS to be cleaner
*       Added PNG fix functionality
* 
* 1.0 May 3, 07 : 
*       Initial Version
* 
*/


//window.addEvent is used to ensure that other events can be attached to the window also
window.addEvent('domready', function() {

    //The index level is use to ensure that the current item is always on top
    //Set to 100 to ensure the objects start above most, if not all, page elements. 
    var ezeeDraggerIndexLevel = 100;
    
    //Make every object with the class ezeDragger draggable  
    $$('.ezeeDragger').makeDraggable({
    		  container:varCon,
              onStart:function()
              {
                  //make sure the index is incremented each time something is grabbed
                  ezeeDraggerIndexLevel++;
                  //We don't want the index to increase endlessly and blow something up. 
                  //Feel free to modify the upper and lower limits to suit how much
                  //your items will be used.  
                  if (ezeeDraggerIndexLevel >= 1000) {
                      ezeeDraggerIndexLevel = 100;
                  }
                  //Set the index of our draggable picture to the new index level
                  this.handle.style.zIndex = ezeeDraggerIndexLevel;
              }
       });//make draggable
  
});//window.addEvent
