$(function() { 
    /*  
    $(window).bind( 'hashchange', function(e) {
        var urlHash = location.hash.substr(1);
        var typeSearch = urlHash.indexOf('type');
        
        if(urlHash != undefined && typeSearch != -1){
            handleHash(urlHash);
        }//end if
    });//end window bind hashchange

    function handleHash(hash){
        var urlHashParts = hash.split('&');
        var reqType = urlHashParts[0].split('=');
        reqType = reqType[1];
        var id = urlHashParts[1].split('=');
        id = id[1];
        
        switch(reqType){
            case 'pedal':
                if(id != ''){
                    loadPedal(id);
                }//end if
            break;
            case 'mod':
                if(id != ''){
                    loadMod(id);
                }//end if
            break;
       }//end switch
    }//end handleHash() 

    $("a.pedalLink").click(function(){
        location.hash = 'type=pedal&id=' + $(this).attr('rev');
    });//end pedalLink click();

    $('a.modLink').click(function(){
        location.hash = 'type=mod&id=' + $(this).attr('rev');
    });

    var loadPedal = function(id){
       $('#content').hide('fast',function(){
            $("#content").load('pedals.php?pedal='+id, function(){  
                $("#content").show('normal');//content show();
                $('#slider').anythingSlider({
                    resizeContents: false,
                    buildNavigation: false
                });//end slider();
            });//end content load();
        }); //end content hide(); 
    };

    var loadMod = function(id){
        $('#content').hide('fast',function(){
            $("#content").load('mods.php?mod='+id, function(){
                $("#content").show('normal');//content show();
                $("#accordion").accordion({ 
                    header: "h3", 
                    autoHeight: false
                }); 
            });//end content load();
        }); //end content hide();
    };

    $(window).trigger( 'hashchange' );

    */
    $("#accordion").accordion({
        header: "h3",
        autoHeight: false
    });

    $('#slider').anythingSlider({
        resizeContents: false,
        buildNavigation: false
    });//end slider();
});//end document Ready();

