var step0 = 0;
var step1 = 50;
var step2 = 550;
var step3 = 950;
var step4 = 1250;
var step5 = 1700;
var step6 = 2380;
var step7 = 3200;
var step8 = 3670;
var step9 = 4200;
var step10 = 4300;
var step11 = 5000;
var step12 = 5800;
var step13 = 6700;
var causes = 7380;
var contact = 8840;
var support = 10100;
var heart = 11000;
var donate = 11150;
var curSection = 0;
var sections = new Array('#home', '#step1','#back1', '#step2', '#step3', '#step4', '#step5', '#step6', '#step7', '#step8', '#step9', '#step10', '#step11', '#step12', '#step13', '#causes', '#contact', '#support', '#heart', '#donate');
$(document)['ready'](function () {
    function _0x8eabx15(_0x8eabx16, _0x8eabx17, _0x8eabx18, _0x8eabx19) {
        curSection = _0x8eabx16;
        $('#nav a.slider')['removeClass']('current');
        switch (_0x8eabx16) {
        case '#home':
            targetPos = (step0 * _0x8eabx19) + 'px';
            curSection = 0;
            break;;
        case '#step1':
            targetPos = (step1 * _0x8eabx19) + 'px';
            curSection = 1;
            $('#footer #nav .step1 a')['addClass']('current');
            break;;
        case '#step2':
            targetPos = (step2 * _0x8eabx19) + 'px';
            curSection = 2;
            $('#footer #nav .step2 a')['addClass']('current');
            break;;
        case '#step3':
            targetPos = (step3 * _0x8eabx19) + 'px';
            curSection = 3;
            $('#footer #nav .step3 a')['addClass']('current');
            break;;
        case '#step4':
            targetPos = (step4 * _0x8eabx19) + 'px';
            curSection = 4;
            $('#footer #nav .step4 a')['addClass']('current');
            break;;
        case '#step5':
            targetPos = (step5 * _0x8eabx19) + 'px';
            curSection = 5;
            $('#footer #nav .step5 a')['addClass']('current');
            break;;
        case '#step6':
            targetPos = (step6 * _0x8eabx19) + 'px';
            curSection = 6;
            $('#footer #nav .step6 a')['addClass']('current');
            break;;
        case '#step7':
            targetPos = (step7 * _0x8eabx19) + 'px';
            curSection = 7;
            $('#footer #nav .step7 a')['addClass']('current');
            break;;
        case '#step8':
            targetPos = (step8 * _0x8eabx19) + 'px';
            curSection = 8;
            $('#footer #nav .step8 a')['addClass']('current');
            break;;
        case '#step9':
            targetPos = (step9 * _0x8eabx19) + 'px';
            curSection = 9;
            $('#footer #nav .step9 a')['addClass']('current');
            break;;
        case '#step10':
            targetPos = (step10 * _0x8eabx19) + 'px';
            curSection = 10;
            $('#footer #nav .step10 a')['addClass']('current');
            break;;
        case '#step11':
            targetPos = (step11 * _0x8eabx19) + 'px';
            curSection = 11;
            $('#footer #nav .step11 a')['addClass']('current');
            break;;
        case '#step12':
            targetPos = (step12 * _0x8eabx19) + 'px';
            curSection = 12;
            $('#footer #nav .step12 a')['addClass']('current');
            break;;
	    case '#step13':
            targetPos = (step13 * _0x8eabx19) + 'px';
            curSection = 13;
            $('#footer #nav .step13 a')['addClass']('current');
            break;;
        case '#causes':
            targetPos = (causes * _0x8eabx19) + 'px';
            curSection = 13;
            $('#footer #nav .causes a')['addClass']('current');
            break;;
        case '#contact':
            targetPos = (contact * _0x8eabx19) + 'px';
            curSection = 14;
            $('#footer #nav .contact a')['addClass']('current');
            break;;
        case '#back1':
            targetPos = (support * _0x8eabx19) + 'px';
            curSection = 15;
            $('#footer #nav .support a')['addClass']('current');
            break;;
        case '#heart':
            targetPos = (heart * _0x8eabx19) + 'px';
            curSection = 16;
            break;;
        case '#donate':
            targetPos = (donate * _0x8eabx19) + 'px';
            curSection = 17;
            break;;
        default:
            break;;
        };
        $(_0x8eabx17)['animate']({
            scrollLeft: targetPos
        }, {
            duration: _0x8eabx18,
            easing: 'easeOutCubic',
            queue: false
        });
    };


    $('#menu a.slider')['click'](function () {
        _0x8eabx15($(this)['attr']('href'), '#wrapper', 900, 0.6);
        _0x8eabx15($(this)['attr']('href'), '#dottedLine', 800, 0.6);
        _0x8eabx15($(this)['attr']('href'), '#cloudsFore', 1200, 0.6);
        _0x8eabx15($(this)['attr']('href'), '#cloudsBack', 960, 0.6);
        _0x8eabx15($(this)['attr']('href'), '#bgHolder', 880, 0.3);
        return false;
    });
	
	
	
	$('#menu2 a.slider2')['click'](function () {
        _0x8eabx15($(this)['attr']('href'), '#wrapper', 900, 0.6);
        _0x8eabx15($(this)['attr']('href'), '#dottedLine', 800, 0.6);
        _0x8eabx15($(this)['attr']('href'), '#cloudsFore', 1200, 0.6);
        _0x8eabx15($(this)['attr']('href'), '#cloudsBack', 960, 0.6);
        _0x8eabx15($(this)['attr']('href'), '#bgHolder', 880, 0.3);
        return false;
    });
	
	
	
	
	
	
    $('#menu a.arrowRight ')['click'](function () {
        curSection++;
        if (curSection > 17) {
            curSection = 17;
            return false;
        };
        _0x8eabx15(sections[curSection], '#wrapper', 900, 0.6);
        _0x8eabx15(sections[curSection], '#dottedLine', 800, 0.6);
        _0x8eabx15(sections[curSection], '#cloudsFore', 1200, 0.6);
        _0x8eabx15(sections[curSection], '#cloudsBack', 960, 0.6);
        _0x8eabx15(sections[curSection], '#bgHolder', 880, 0.3);
        return false;

		
    });
    $('#menu a.arrowLeft ')['click'](function () {
        curSection--;
        if (curSection < 0) {
            curSection = 0;
            return false;
        };
        _0x8eabx15(sections[curSection], '#wrapper', 900, 0.6);
        _0x8eabx15(sections[curSection], '#dottedLine', 800, 0.6);
        _0x8eabx15(sections[curSection], '#cloudsFore', 1200, 0.6);
        _0x8eabx15(sections[curSection], '#cloudsBack', 960, 0.6);
        _0x8eabx15(sections[curSection], '#bgHolder', 880, 0.3);
        return false;
    });
});
