// =============================================
//                   jQuery
// =============================================

$(document).ready(function(){


    /* Simple object toggle snippet */
    $("[toggle]").click( function() {
      
      var targetObjId = $(this).attr("toggle");
      var targetObj = $("[id="+targetObjId+"]");
      var targetObjGroup = $(targetObj).attr("group");
      
      if( targetObjGroup )
      {
          $("[group="+targetObjGroup+"]").not(targetObj).slideUp();
          $(targetObj).slideDown();
      }
      else
      {
          if( $(targetObj).is(":hidden") ) $(targetObj).slideDown();
          else $(targetObj).slideUp();
      }
      
      return false;
  
    });


    /* Simple show tab snippet */
    $("[showtab]").click( function() {
      
      var targetObjId = $(this).attr("showtab");
      var targetObj = $("[id="+targetObjId+"]");
      var targetObjGroup = $(targetObj).attr("group");
      
      if( targetObjGroup )
      {
          $("[group="+targetObjGroup+"]").not(targetObj).hide();
          $(targetObj).fadeIn();
      }
      else
      {
          if( $(targetObj).is(":hidden") ) $(targetObj).fadeIn();
          else $(targetObj).fadeOut();
      }
      
      return false;
  
    });


    /* Simple object show snippet */
    $("[show]").click( function() {
      
      var targetObjId = $(this).attr("show");
      var targetObj = $("[id="+targetObjId+"]");
      
      $(targetObj).slideDown();
  
    });


    /* Simple object hide snippet */
    $("[hide]").click( function() {
      
      var targetObjId = $(this).attr("hide");
      var targetObj = $("[id="+targetObjId+"]");
      
      $(targetObj).slideUp();
  
    });






	$( ".gallery a" ).lightBox ( {
	
			imageLoading:			window.baseUrl + 'assets/js/lightbox/images/lightbox-ico-loading.gif',		// (string) Path and the name of the loading icon
			imageBtnPrev:			window.baseUrl + 'assets/js/lightbox/images/lightbox-btn-prev.gif',			// (string) Path and the name of the prev button image
			imageBtnNext:			window.baseUrl + 'assets/js/lightbox/images/lightbox-btn-next.gif',			// (string) Path and the name of the next button image
			imageBtnClose:			window.baseUrl + 'assets/js/lightbox/images/lightbox-btn-close.gif',		// (string) Path and the name of the close btn
			imageBlank:				window.baseUrl + 'assets/js/lightbox/images/lightbox-blank.gif'			// (string) Path and the name of a blank image (one pixel)

	
	} );

});

