$(function() {

	  $('#nav').droppy();
  
    $('.img img').tooltip({
      	showURL: false,
      	bodyHandler: function() {
      		return $("<img/>").attr("src", this.src.replace('/170/','/300/'));
      	}
    });

    if($.cookie('preview') != '1')
    {
        $.tooltip.block();
    }
    
    $('#preview-tooltip-toggle').click(function() {
        $.tooltip.block();
        if($.cookie('preview') == '1')
        {
            $.cookie('preview', null);
        }
        else
        {
            $.cookie('preview', '1');
        }
        return false;
    });

});

function loadContent(elementSelector, sourceUrl) {
  $(elementSelector).load("./"+sourceUrl);
}
function wishToggle(elementSelector) {
  $(elementSelector).slideToggle('slow');
}
function appToggle(elementSelector) {
  $(elementSelector).slideToggle('slow');
}
function appHide(elementSelector) {
  $(elementSelector).hide();
}
function appShow(elementSelector) {
  $(elementSelector).show();
}
function appFadeIn(elementSelector) {
  $(elementSelector).fadeIn(1000);
}
