/**
 * General Isle functions
 *
 */

function showWaitingIcon(element) {
    var waitingSpan = document.createElement('span');
    var waitingImg = document.createElement('img');
    waitingImg.src = '/_img/loading.gif';
    waitingImg.alt = 'Please wait';
    waitingSpan.appendChild(waitingImg);
    waitingSpan.appendChild(document.createTextNode(''));
    element.parentNode.insertBefore(waitingSpan, element);
    element.style.display = 'none';
}
function showWaitingIconMini(element) {
    var waitingSpan = document.createElement('span');
    var waitingImg = document.createElement('img');
    waitingImg.src = '/_img/loading.gif';
    waitingSpan.appendChild(waitingImg);
    waitingSpan.appendChild(document.createTextNode(''));
    element.parentNode.insertBefore(waitingSpan, element);
    element.style.display = 'none';
}



function ShowPopup(){$('#fadeWrap').show();$('#popup').show();}
function HidePopup() { $('#fadeWrap').hide(); $('#popup').hide(); }

var contentHandler = "/_handlers/loader/content.ashx";
var rightColHandler = "/_handlers/loader/rightcol.ashx";
var functionHandler = "/_handlers/func/calls.ashx";
var videoHandler = "/_handlers/loader/bcvideo.ashx";

function LoadCol(ref, colClass) {
   //Load up col:
   var s = "ref=" + ref;
   $.ajax({
      type: 'POST',
      url: rightColHandler,
      data: s,
      success: function(data, textStatus) {
         $(colClass).html(data);
      },
      error: function(XMLHttpRequest, textStatus, errorThrown) {
      },
      complete: function(XMLHttpRequest, textStatus) {
      }
   });
}

$(document).ready(function() {

   $(".enlargeImg").click(function() {
      var href = $(this).attr('href');
      var thumbHref = $(this).children('img').attr('src');
      $(this).children('img').attr('src', href);
      $(this).attr('href', thumbHref);
      return false;
   });

});