var Language = {
    init: function(elm, path) {
        $(document).ready(function() {
            Language._init(elm, path)
        });
    },

    _init: function(elm, path) {
		if (elm) {
			$(elm).find('a.arrow').click(function() {
				var current = $(elm).find('.device').height();
				var target = $(elm).find('.device').attr('scrollHeight');
				
				if (current <=15) {
					$(elm).find('.device').animate({height: target},500);
					$(elm).find('a.arrow img').attr({src: path + "images/btn-language-up.gif"});
				} else {
					$(elm).find('.device').animate({height: 15},500);
					$(elm).find('a.arrow img').attr({src: path + "images/btn-language-down.gif"});
				}
				return false;
			});
		}
	}
}
