$(document).ready(function() {
    $('.context').hover(function(){
        var title = $(this).attr('title');
        $(this).data('tipText', title).removeAttr('title');
        $('<p class="tooltip"></p>')
        .text(title)
        .appendTo('body')
        .fadeIn('slow');
    }, function() {
        $(this).attr('title', $(this).data('tipText'));
        $('.tooltip').remove();
    }).mousemove(function(e) {
        var mousex = e.pageX - 60;
        var mousey = e.pageY - 50;
        $('.tooltip')
        .css({ top: mousey, left: mousex })
});



$("button#sidebar").click(function () {
$(".element.ad").toggle();
$(this).toggleClass("highlight");
});

$("button#intext").click(function () {
$(".hentry.ad").toggle();
$(this).toggleClass("highlight");
});

$("button#skyscraper").click(function () {
$("div#skyscraper").toggle();
$(this).toggleClass("highlight");
});


$("a[href$='.jpg'], a[href$='.jpeg'], a[href$='.gif'], a[href$='.png']").prettyPhoto({
animationSpeed: 'normal', /* fast/slow/normal */
padding: 40, /* padding for each side of the picture */
opacity: 0.35, /* Value betwee 0 and 1 */
showTitle: true /* true/false */
});

$("a#expandopen, a#expandopen2").click(function(){
  $("#mapwrapper").delay(800).fadeIn(400).animate({height: "600px"}, 1000 );
  $(this).parent().addClass('active');
  return false;
});
$("a#expandclose").click(function(){
  $("#mapwrapper").animate({height: "130px"}, 1 );
  $(this).parent().removeClass('active');
  return false;
});
});

jQuery(function ($) {
        // Load dialog on page load
        //$('#basic-modal-content').modal();

        // Load dialog on click
        $('#basic-modal .basic').click(function (e) {
                $('#basic-modal-content').modal();

                return false;
        });
});

