$(window).load(function(){
    $('#container').delay(1000).css('visibility','visible');
    $('#loaderIcon').delay(800).hide();

	
});


$(document).ready(function() {

$('.image-grid .item a').hover(function() {
      $(this).find('strong').animate({ top: '10px' });
      $(this).find('span').animate({ top: '44px' });
    }, function() {
      $(this).find('strong').animate({ top: '-60px' });
      $(this).find('span').animate({ top: '-54px' });
    });
  


	$(window).scroll(function () {
		var a = $(window).scrollTop();
		if (a > 150) {
			$("#backtotop").fadeIn("slow")
		}
		if (a < 150) {
			$("#backtotop").fadeOut("slow")
		}
	});
	$("#backtotop").hover(function () {
		$(this).addClass("hover")
	},
	function () {
		$(this).removeClass("hover")
	});
	$(".meta div ").hover(function () {
		$(this).addClass("hover")
	},
	function () {
		$(this).removeClass("hover")
	});
	$("#backtotop").click(function () {
		$.scrollTo(0, {
			duration: 700,
			axis: "y"
		})
	});	
	


 $(function() {
		$("#backtotop")
		.mouseenter(function() {
			$(this).addClass('ui-state-hover');
		})
		.mouseleave(function() {
			$(this).removeClass("ui-state-hover");
		});	
	});




 $.reject({
                closeCookie: true // Set cookie to remmember close for this session
            }); 

			
//
		
		//$.cookie('shownDialog', 'true', { expires: 1 } );
     // }
       // Set cookie
	//});



 // ======================= Isotope ===============================
var $container = $('#container');

$(function(){

      $container.imagesLoaded( function(){
        $(this).isotope({
          itemSelector : '.item',
		  layoutMode : 'cellsByRow',
  cellsByRow : {
    columnWidth : 240,
    rowHeight : 195
  }
	
        });
      });
    });
	
	
 
	
	 // ======================= Filter and Sort Code ===============================   
   
	 // filter buttons
    $('.filters a').click(function() {
		var $this = $(this);
        // don't proceed if already selected
        if ( $this.hasClass('selected') ) {
          return false;
        }
        var $optionSet = $this.parents('.option-set');
        $optionSet.find('.selected').removeClass('selected');
        $this.addClass('selected');
        var selector = $(this).attr('data-filter');
        $container.isotope({
            filter: selector
        });
      $container.isotope('reLayout');  
        return false;
    });
	

  
    $(function(){
      $container.isotope({
        itemSelector : '.item',
        getSortData : {
          category : function( $elem ) {
            return $elem.attr('data-category');
          },
          number : function( $elem ) {
            return parseInt( $elem.find('.number').text(), 10 );
          },
          date : function( $elem ) {
            return parseFloat( $elem.find('.date').text().replace( /[\(\)]/g, '') );
			
          },
          folder : function( $elem ) {
            return $elem.find('.folder').text();
          },
		   name : function ( $elem ) {
            return $elem.find('.item a[title]').text();
          },
		   imageWidth : function ( $elem ) {
            return $elem.find('.width').text();
          },
		   imageHeight : function ( $elem ) {
            return $elem.find('.height').text();
          },
		  width : function ( $elem ) {
            return $elem.find('a img').width();
          },
		   height : function ( $elem ) {
            return $elem.find('a img').height();
          }
		 
        }
      });      
    });
	

	
});

	
	 $('.lightbox').lightbox();
 $.extend(jQuery.lightbox().options, {
 	 background: '#951ef9',
       modal: false,
       overlay: {'opacity': 0.8},
       showDuration: 400,
       closeDuration: 200,
       showTransition: 'easeOutBack',
       closeTransition:  'easeOutBack',
       moveTransition: 'easeOutBack',
       resizeTransition: 'easeOutBack',
      
	  moveDuration    : 1,
      resizeDuration  : 0.5,
	  emergefrom: 'top'
	  
    });
	 $('.lightbox3').lightbox();
 $.extend(jQuery.lightbox().options, {
 	 background: '#951ef9',
       modal: false,
       overlay: {'opacity': 0.8},
       showDuration: 400,
       closeDuration: 200,
       showTransition: 'easeOutBack',
       closeTransition:  'easeOutBack',
       moveTransition: 'easeOutBack',
       resizeTransition: 'easeOutBack',
      
	  moveDuration    : 1,
      resizeDuration  : 0.5,
	  emergefrom: 'top'
	  
    });

   
    $(".lightbox2").live('click', function(e) {
      var size   = { x: $(window).width(), y: $(window).height() };
      var href   = $(this).attr("href");
      var width  = size.x * 75 / 100;
      var height = size.y * 75 / 100;
      if (href.indexOf("?")>0) {
        var concat = "&";
      } else {
        var concat = "?";
      }
      href += concat + "lightbox[iframe]=true&lightbox[width]=" + width + "&lightbox[height]=" + height;
      $.lightbox(href);
      e.preventDefault();
    });
	
	

    $("#logos").click(function(ev) {
      $.lightbox(["lightbox/ID/11logos1.png", "lightbox/ID/11logos2.png", "lightbox/ID/11logos3.png", "lightbox/ID/11logos4.png","lightbox/ID/11logos5.png","lightbox/ID/11logos6.png","lightbox/ID/11logos7.png","lightbox/ID/11logos8.png","lightbox/ID/11logos9.png"]);
      ev.preventDefault();
    });

 $("#print").click(function(ev) {
      $.lightbox(["lightbox/ID/12print1.png", "lightbox/ID/12print2.png", "lightbox/ID/12print3.png", "lightbox/ID/12print4.png", "lightbox/ID/12print5.png", "lightbox/ID/12print6.png", "lightbox/ID/12print7.png", "lightbox/ID/12print8.png", "lightbox/ID/12print9.png", "lightbox/ID/12print10.png", "lightbox/ID/12print11.png","lightbox/ID/12print12.png" ]);
      ev.preventDefault();
    });
	
	 $("#onlineadv").click(function(ev) {
      $.lightbox(["lightbox/WEB/png/15aonlineadv.png", "lightbox/WEB/png/15bonlineadv.png", "lightbox/WEB/png/15conlineadv.png", "lightbox/WEB/png/15donlineadv.png", "lightbox/WEB/png/15eonlineadv.png", "lightbox/WEB/png/15fonlineadv.png", "lightbox/WEB/15b_cyberarts300x100.gif", "lightbox/WEB/15b_cyberarts728x90.gif", "lightbox/WEB/15c_wegen300x250_10.gif", "lightbox/WEB/15d_bookingcenter450x200if.gif", "lightbox/WEB/15e_truenorthbody.gif", "lightbox/WEB/15f_conceptA_450x150.gif", "lightbox/WEB/15f_conceptB_450x150.gif", "lightbox/WEB/15f_conceptC_450x150.gif"]);
      ev.preventDefault();
    });
	
	 $("#cyberarts").click(function(ev) {
      $.lightbox(["lightbox/ID/7cyberarts1.png", "lightbox/ID/8cyberarts2.png"]);
      ev.preventDefault();
    });
 // ======================= AddThis Code ===============================			
var addthis_config =
{
  ui_cobrand: 'Jalbum LightBoxes Skin'
};

