/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */


jQuery.fn.outerHTML = function(s) {
    return (s)
    ? this.before(s).remove()
    : jQuery("<p>").append(this.eq(0).clone()).html();
}

$(document).ready(function(){
    $('#map_link').click(function(){
        $('#mlink').toggleClass('active');
    });
    
    $(document).click(function(ev){
            if($(ev.target).is('#map_link') == false && $('#mlink').hasClass('active') && $(ev.target).closest('#maps_links').length < 1)
                $('#mlink').removeClass('active');
        });
    
});








