﻿$(function(){

    $('.yourSelectList li').each(function(num){
        $('.yourSelectList li:first').addClass('selected');
        $('div.yourSelectInfo').not(':first').hide();
    
        $(this).click(function(){
           $('div.yourSelectInfo').each(function(divNum){
           
                if( num == divNum){
                    $(this).show();
                    $(this).siblings('div.yourSelectInfo').hide();
                }
               
            });
        });
    
        $('.yourSelectList li').each(function(num){
        
            var Retail = '5px';
            var Dating = '32px';
            var VIOP = '60px';
            var MMPOG = '85px';
            var Social = '110px';
            var Payment = '140px';
            var Sports = '170px';
            var Bingo = '192px';
            var Casino = '220px';
            var Poker = '245px';
            var Other = '275px';
              
            $(this).click(function(){
                $(this).addClass('selected').siblings('li.selected').removeClass('selected');
             
                if (num == 0){
                    $('img.pointer').css('margin-top',Retail);
                }
                else if (num == 1){
                    $('img.pointer').css('margin-top',Dating);
                     
                }
                 else if (num == 2){
                    $('img.pointer').css('margin-top',VIOP );
                     
                }
                 else if (num == 3){
                    $('img.pointer').css('margin-top',MMPOG);
                     
                }
                 else if (num == 4){
                    $('img.pointer').css('margin-top',Social);
                     
                }
                 else if (num == 5){
                    $('img.pointer').css('margin-top',Payment);
                     
                }
                 else if (num == 6){
                    $('img.pointer').css('margin-top',Sports);
                     
                }
                 else if (num == 7){
                    $('img.pointer').css('margin-top',Bingo );
                     
                }
                 else if (num == 8){
                    $('img.pointer').css('margin-top',Casino);
                     
                }
                 else if (num == 9){
                    $('img.pointer').css('margin-top',Poker);
                     
                }
                 else if (num == 10){
                    $('img.pointer').css('margin-top',Other);
                     
                }
                return false;
            });
        });
    });
});