<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
$('#myModal').modal('show') //т.е. id и вызов.
$(location.hash).modal('show');
if ( $('#myModal').length > 0 ) {
$(location.hash).modal('show');
}