﻿/*CURRENCY TOGGLE*/


function toggleCurrency(currency) {

    if (currency !=  undefined) {
   
    switch (currency) {
        case 'euros':
            $.post("/togglecurrency.aspx?c=euros"); 
            $('.displayPrice .pounds').hide();
            $('.displayPrice .euros').show();
            currentCurrency = 'euros';
            $('#rdo_euros').attr('checked', 'checked');
            break;
        case 'pounds':
            $.post("/togglecurrency.aspx?c=pounds");  
            $('.displayPrice .pounds').show();
            $('.displayPrice .euros').hide();
            currentCurrency = 'pounds';
            $('#rdo_pounds').attr('checked', 'checked');
            break;
    };

}
};

$(toggleCurrency);
/*TABS*/
var tabGroupCount = 0;

function tabsStartup() {
    $('.tabGroup').each(function (index, item) {
        item.id = 'tabGroup_' + tabGroupCount;

        $('#tabGroup_' + tabGroupCount + ' .tabItem').hide();
        $('#tabGroup_' + tabGroupCount + ' .tabItem').first().show();
        
        $('#tabGroup_' + tabGroupCount + ' .tabs .tab').each(function (index, item) {
            item.href = 'javascript:tabsShow(' + tabGroupCount + ',' + index + ');';
        });

        tabGroupCount++;
    });

};

function tabsShow(tabGroup, tab) {
    $('#tabGroup_' + tabGroup + ' .tabs .tab').removeClass('selected');
    $('#tabGroup_' + tabGroup + ' .tabs .tab' + tab).addClass('selected');

    $('#tabGroup_' + tabGroup + ' .tabItem').hide();
    $('#tabGroup_' + tabGroup + ' .tab' + tab).show();
};


function warning(warning) {
    alert(warning);
};

function message(message) {
    alert(message);
};

function popUp(elementID) {
    $(elementID).slideDown();
};

function popDown(elementID) {
    $(elementID).hide();
};


function showContent(elementID) {
    $(elementID).show();
}

function hideContent(elementID) {
    $(elementID).hide();
}

function toggleContent(elementID) {
    if ($(elementID + ":visible").length == 0) {
        $(elementID).show();
    }
    else {
        $(elementID).hide();
    }
}

/*end - slide expander */

$(tabsStartup);



