/**
 * @copyright 2011 Syzygy
 * @author m.stiller
 * @package hahn
 * @namespace hahn.base
 * 
 * sew JavaScript: hahn.base
 */


var HahnBase = {

    __version: 1.0, // class version 
    __class: '', // class name


    /**
    * options
    */
    options:
	{
	},

    /** 
    * 
    * @method setup
    * @param {Void}
    * @return {Void}
    */
    cufonReplaceText: function () {
        Cufon.replace('a.mainCategory', { fontFamily: 'MagdaCleanOT', hover: true });
        Cufon.replace('.red h1', { fontFamily: 'MagdaCleanOT', hover: true });
        Cufon.replace('h2', { fontFamily: 'MagdaCleanOT', hover: true });
    },

    /** 
    * 
    * @method setup
    * @param {Void}
    * @return {Void}
    */
    // Read a page's GET URL variables and return them as an associative array.
    getUrlVars: function () {
        var vars = [], hash;
        var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
        for (var i = 0; i < hashes.length; i++) {
            hash = hashes[i].split('=');
            vars.push(hash[0]);
            vars[hash[0]] = hash[1];
        }
        return vars;
    },

    getUrlVar: function (name) {
        return $.getUrlVars()[name];
    },

    /** 
    * Contructor
    * @method initialize
    * @param {Void}
    * @return {Void}
    */
    initialize: function () {
        var lang = $.getUrlVar('cc');

        if (lang != 'ru') {
            //this.cufonReplaceText();
        }
    }
};

jQuery(document).ready(
    jQuery.proxy(HahnBase.initialize, HahnBase)
);

