$(function(){


  $(window).bind( 'hashchange', function(e) {


    var location = $.param.fragment();


        if ($("#p7ContactLeftMenuClick").html() == "default") {

            if ($('#p7ContactLeft')) {
                $('#p7ContactLeft').addClass('loadingContact');
                $('#p7ContactLeft').html('');

                $.get('/contact/ajaxContactLeft',{
                        currenturl: ''+location+''
                    },
                    function(data) {

                        $('#p7ContactLeft').removeClass('loadingContact');
                        $('#p7ContactLeft').html(data);

                    });
            }
        

        } else {
            $("#p7ContactLeftMenuClick").html("default");
        }

      
        

        if ($('#p7ContactRight')) {
             $('#p7ContactRight').addClass('loadingContact');
             $('#p7ContactRight').html('');

            $.get('/contact/ajaxContactRight',{
                    currenturl: ''+location+''
                },
                function(data) {

                    $('#p7ContactRight').removeClass('loadingContact');
                    $('#p7ContactRight').html(data);

                });
        }


  })

  // Since the event is only triggered when the hash changes, we need to trigger
  // the event now, to handle the hash the page may have loaded with.
  $(window).trigger( 'hashchange' );

});



