/*
 * This file is part of the mgWidgets package.
 * (c) 2008-2009 Qarmaq / MenuGourmet
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

function adSense1(){
  // this global attributes  
  this.wuid = null;
  this.widget = null;
  
  // widget attributes
  // this.field1 = null;
  //
}

adSense1.prototype = new mgWidgetObject();

// this method is call when the object is created
adSense1.prototype.init = function(wuid) {
  // common code
  this.wuid = wuid;
  this.widget = jQuery('#' + wuid);
  //jQuery(window).bind('load.adSense1', [this, 'load']);
  
  // extra params
  // place here your extra init information
  
}

// this method is call when the DOM / window is loaded
adSense1.prototype.load = function()
{
  // add here your load event
  // always use jQuery's namespace event
//  jQuery(window).bind('click.adSense1', [this, 'onClickButton']);
}

adSense1.prototype.unload = function()
{
  // place here all code to unbind event
  // always use jQuery's namespace event
//  jQuery(window).unbind('load.adSense1', [this, 'load']);
//  this.load = function() {}; // make sure the metthod is not exececuted
//
//  jQuery(window).unbind('click.adSense1', [this, 'onClickButton']);
//  this.onClickButton = function() {};
}

adSense1.prototype.resize = function(size)
{
//  log('You have resized the widget to : ' + size + 'px');
}

adSense1.prototype.onClickButton = function()
{
  // catch your on click button
//  alert('you click on the button from the widget adSense1 : ' + this.wuid);
}

// set javascript for this widget as loaded 
WIDGET_LOADED['adSense1'] = true;
