// GEKON BOX
$.closeGallery = function(){
	$('.gekonBox').fadeOut('fast', function() {
		$('.box',this).empty();
	});		
 	$(document.documentElement).unbind('.ggEvents');
	$(window).unbind('.ggEvents');
}

$.showGallery = function(path){
	$('.gekonBox').fadeIn('fast', function() {
		$.ajax({
		  url: path,
		  dataType: 'html',
		  complete: function(xhr, textStatus) {
		    //called when complete
		  },
		  success: function(data, textStatus, xhr) {
		    $('.gekonBox .box').append(data);	  
		  },
		  error: function(xhr, textStatus, errorThrown) {
		    //called when there is an error
		  }
		});
	}); 		
}

$.urlParam = function(name){
    var results = new RegExp('[\\?&]' + name + '=([^&#]*)').exec(window.location.href) || 0;
	return results[1] || 0;
}

$.setGallResolution = function (){
ggCanWidth = $('#GekonGallery').parent().width();
ggCanHeight = $('#GekonGallery').parent().height();
}

