$(document).ready(function() {
	$('li#meta-home a').html('<img src="/fileadmin/templates/Renz_standard/images/icon-home.png" alt="Home" />');
	$('select#languageselect').change(function () {
		var url = $(this).val();
		window.location.href = '/'+url;
	});
});


$(document).ready(function() {
    if (jQuery.browser.msie) {
        select_init();
    }
});
 
function select_init () {
    var selects = $('table select');
    for (var i = 0; i < selects.length; i++) {
        _resizeselect.init(selects[i]);
    }
}
 
 
var _resizeselect = {
    obj : new Array(),
    init : function (el) {
        this.obj[el] = new resizeselect (el);
    }
}
 
function resizeselect (el) {
    this.el = el;
    this.p = el.parentNode;
    this.ht = el.parentNode.offsetHeight;
    var obj = this;
    this.set = false;
    el.onmousedown = function () {
        obj.set_select("mousedown");
    }
    el.onblur = function () {
        obj.reset_select("blur");
    }
/*
    el.onchange = function () {
        obj.reset_select("change");
    }
*/
    jQuery(el).bind('change',function(){
      obj.reset_select("change");
    });
}
 
resizeselect.prototype.set_select = function (str) {
 
    if (this.set) {
        this.set = false;
        return;
    }
 
    this.el.style.width = "auto";
    this.el.style.position = "absolute";
    
    this.p.style.zIndex = 100;
    this.set = true;
    this.el.focus();
}
 
resizeselect.prototype.reset_select = function (str) {
    this.el.style.width = "";
    this.el.style.position = "";
    
    this.p.style.zIndex = 1;
    this.set = false;
    window.focus();
}