var Sosedi = {};
Sosedi.mtypes = { forum: 1, user: 3, place: 4, comment: 7, image: 9, album: 11, review: 12, talk: 20 };

// типы комплиментов
Sosedi.compliment = {
	none: 0, thanks: 1, writer: 2, respect: 3, pic: 4, hot: 5, profile: 6, more: 7, funny: 8, comment: 9
};

Sosedi.zoom = { km50: 9, km25: 10, km10: 11, km3: 13, km1: 15};

//Defines the top level Class
function Class() {}
Class.prototype.construct = function() {};
Class.extend = function(def) {
    var classDef = function() {
        if (arguments[0] !== Class) { this.construct.apply(this, arguments); }
    };
    
    var proto = new this(Class);
    var superClass = this.prototype;
    
    for (var n in def) {
        var item = def[n];                        
        if (item instanceof Function) item.$ = superClass;
        proto[n] = item;
    }

    classDef.prototype = proto;
    
    //Give this new class the same static extend method    
    classDef.extend = this.extend;        
    return classDef;
};

/**
 * create method reference
 * @param {Object} object
 * @param {Object} methodName
 */
function $R(object, methodName) {
  return function () {
    return object[methodName].apply(object, arguments);
  };
}

// fix IE6 background images bug
try {document.execCommand("BackgroundImageCache", false, true);} catch(e){}

function getCurrentCityName() {
	return context_name;
}

