diff --git a/index.html b/index.html
index 847b42a..c011fb9 100644
--- a/index.html
+++ b/index.html
@@ -50,7 +50,33 @@
$('#layoutswitcher').on('change', function() {
switchLayout(this.value);
});
- switchLayout('de_CH');
+ $.cookie.defaults.expires = 365;
+ $.cookie.defaults.path = '/';
+ var theme = $.cookie('theme');
+ var layout = $.cookie('layout');
+ var status = $.cookie('status');
+ if (theme == undefined) {
+ theme = 'black';
+ }
+ if(layout == undefined) {
+ layout = 'de_CH';
+ }
+ if (status == undefined) {
+ status = 'on';
+ }
+ $('#themeswitcher').val(theme);
+ switchTheme(theme);
+ $('#layoutswitcher').val(layout);
+ switchLayout(layout);
+ if (status == 'on') {
+ if(!isOn()) {
+ $('#onoffswitch').click();
+ }
+ } else {
+ if(isOn()) {
+ $('#onoffswitch').click();
+ }
+ }
});