$(document).ready(function(){
    active_value = false;
    hash_pos = location.hash.lastIndexOf("#");
    if (hash_pos != -1) {
        item_id = location.hash.substr(hash_pos + 2);
        $("#accordion h3").each(function(i) {
            if (this.className == "p_" + item_id) {
                active_value = i;
                return false;
            }
        });
    }
    $("#accordion").accordion({
        active: active_value,
        header: "h3",
        collapsible: true,
        autoHeight: false
    });
    $(".lightbox").lightbox();
});