
//var bReady = "../Styles/";
var sStylePath = "Styles/";
var cookie_name_onlytext = 'fiatAutonomy_text';
var cookie_name_textsize = 'fiatAutonomy_textsize';
var cookie_name_contrast = 'fiatAutonomy_contrast';
var options = { path: '/', expires: 10 };
var url = document.URL;


$(document).ready(
    function() {

        // Structure
        if (($.cookie(cookie_name_onlytext)) != null) {
            if ($.cookie(cookie_name_onlytext) == "fiatAutonomy_text") {
                // Set Only Text
                fiatAutonomy_text();
            } else {
                // Set Structure
                fiatAutonomy_structure();
            }
        } else {
            // Set Cookie Structure Default
            $.cookie(cookie_name_onlytext, 'fiatAutonomy_structure', options);
            // Set Structure Default
            fiatAutonomy_structure();
        }

        


        // Font size
        if (($.cookie(cookie_name_textsize)) != null) {
            if ($.cookie(cookie_name_textsize) == "fiatAutonomy_small") {
                // Set Small Text
                fiatAutonomy_small();
            } else if ($.cookie(cookie_name_textsize) == "fiatAutonomy_medium") {
                // Set Medium Text
                fiatAutonomy_medium();
            } else if ($.cookie(cookie_name_textsize) == "fiatAutonomy_big") {
                // Set Big Text
                fiatAutonomy_big();
            }
        } else {
            // Set Cookie Small Text Default
            $.cookie(cookie_name_textsize, 'fiatAutonomy_small', options);
            // Set Small Text
            fiatAutonomy_small();
        }
		
		// Contrast
        if (($.cookie(cookie_name_contrast)) != null) {
            if ($.cookie(cookie_name_contrast) == "fiatAutonomy_contrast_On") {
                fiatAutonomy_contrast();
            }
        } else {
            // Set Cookie Structure Default
            $.cookie(cookie_name_contrast, 'fiatAutonomy_contrast_Off', options);
            // Set Structure Default
            //fiatAutonomy_contrast();
        }
		
    });

// Get Function
function fiatAutonomy_small() {
    //alert('fiatAutonomy_small');
    $('head').append('<link rel="stylesheet" href="Styles/fiatAutonomy_small.css" type="text/css" />');
}

function fiatAutonomy_medium() {
    //alert('fiatAutonomy_medium');
    $('head').append('<link rel="stylesheet" href="Styles/fiatAutonomy_medium.css" type="text/css" />');
}

function fiatAutonomy_big() {
    //alert('fiatAutonomy_big');
    $('head').append('<link rel="stylesheet" href="Styles/fiatAutonomy_big.css" type="text/css" />');
}

function fiatAutonomy_structure() {
    //alert('fiatAutonomy_structure');
    $('head').append('<link rel="stylesheet" href="Styles/fiatAutonomy_structure.css" type="text/css" />');
}

function fiatAutonomy_text() {
    //alert('fiatAutonomy_text');
    $('head').append('<link rel="stylesheet" href="Styles/fiatAutonomy_text.css" type="text/css" />');
}

function fiatAutonomy_contrast() {
    //alert('fiatAutonomy_contrast');
    $('head').append('<link rel="stylesheet" href="Styles/fiatAutonomy_contrast.css" type="text/css" />');
}

// Set Function
function set_fiatAutonomy_small() {
    // Set Cookie
    $.cookie(cookie_name_textsize, 'fiatAutonomy_small', options);
    $.cookie(cookie_name_onlytext, 'fiatAutonomy_structure', options);
    reloadPage();
}

function set_fiatAutonomy_medium() {
    // Set Cookie
    $.cookie(cookie_name_textsize, 'fiatAutonomy_medium', options);
    $.cookie(cookie_name_onlytext, 'fiatAutonomy_structure', options);
    reloadPage();
}

function set_fiatAutonomy_big() {
    // Set Cookie
    $.cookie(cookie_name_textsize, 'fiatAutonomy_big', options);
    $.cookie(cookie_name_onlytext, 'fiatAutonomy_structure', options);
    reloadPage();
}

function set_fiatAutonomy_structure() {
    // Set Cookie
    $.cookie(cookie_name_textsize, 'fiatAutonomy_small', options);
    $.cookie(cookie_name_onlytext, 'fiatAutonomy_structure', options);
    reloadPage();
}

function set_fiatAutonomy_text() {
    // Set Cookie
    $.cookie(cookie_name_contrast, 'fiatAutonomy_null', options);
    $.cookie(cookie_name_textsize, 'fiatAutonomy_null', options);
    $.cookie(cookie_name_onlytext, 'fiatAutonomy_text', options);
    reloadPage();
}

function set_fiatAutonomy_contrast() {
    // Set Cookie

    if (($.cookie(cookie_name_contrast)) != null) {
        if ($.cookie(cookie_name_contrast) == "fiatAutonomy_contrast_Off") {
            // Set Cookie Contraxt On
            $.cookie(cookie_name_contrast, 'fiatAutonomy_contrast_On', options);
            reloadPage();
        } else {
            // Set Cookie Contraxt Off
            $.cookie(cookie_name_contrast, 'fiatAutonomy_contrast_Off', options);
            reloadPage();
        }
    } else {
        $.cookie(cookie_name_contrast, 'fiatAutonomy_contrast_On', options);
        reloadPage();
    }
}

function reloadPage() {
    document.location.reload();
}
