$(document).ready(function () {
   $('#preloader').fadeOut('slow', function() { $(this).remove(); });
});

$(document).ready(function(){
   $("#showcase").awShowcase({
      content_width: 964,
      content_height: 400,
      hundred_percent: false,
      auto: true,
      interval: 5000,
      continuous: true,
      loading: true,
      arrows: true,
      buttons: true,
      btn_numbers: false,
      keybord_keys: true,
      mousetrace: false,
      pauseonover: true,
      transition: 'hslide', /* hslide/vslide/fade */
      transition_delay: 100,
      transition_speed: 500,
      show_caption: 'onload', /* onload/onhover/show */
      dynamic_height: false,
      speed_change: true,
      viewline: false
   });
});

$(document).ready(function() {
   $('.opdrachtgevers').cycle({
      fx: 'fade',
      pause: true,
      speed: 500, 
      timeout: 5000
   });
   $('.impressie-studio').cycle({
      fx: 'fade',
      pause: true,
      speed: 500, 
      timeout: 5000
   });
   $('.diensten').cycle({
      fx: 'fade',
      pause: true,
      speed: 500, 
      timeout: 5000
   });
   $('.werk').cycle({
      fx: 'fade',
      pause: true,
      speed: 500, 
      timeout: 5000
   });
});
     
$(document).ready(function(){
   $('.boxgrid.captionfull,.boxgrid2.captionfull,.boxgrid3.captionfull').hover(function(){
      $(".cover", this).stop().animate({top:'70px'},{queue:false,duration:160});
   }, function() {
   $(".cover", this).stop().animate({top:'100px'},{queue:false,duration:160});
   });	
});
	   
$(document).ready(function(){
   $('#js-news').ticker();
      // hide the release history when the page loads
      $('#release-wrapper').css('margin-top', '-' + ($('#release-wrapper').height() + 20) + 'px');	

	  // show/hide the release history on click
	  $('a[href="#release-history"]').toggle(function () {	
	  $('#release-wrapper').animate({
	     marginTop: '0px'
	  }, 600, 'linear');
   }, function () {
      $('#release-wrapper').animate({
	     marginTop: '-' + ($('#release-wrapper').height() + 20) + 'px'
	  }, 600, 'linear');
   });	
});  

$(document).ready(function(){				
   var hover_in_easing="easeInExpo";
   var hover_out_easing="easeOutExpo";
      $(".info_container").show();
      $("div.portfolio_div").hover(function(){			
      $(this).find(".info_container").animate({top:"0px"},{duration: 400, easing: hover_in_easing});
   },function(){
   $(this).find(".info_container").animate({top:"100px"},{duration: 500, easing: hover_out_easing});
   });
});

$(document).ready(function () {				
   // Adding support for :nth-child for IE						
   $('.footer li:nth-child(4n)').addClass('end-row');  
   $('.footer li:nth-child(4n+1)').addClass('first-row');
   $('#opdrachtgevers li:nth-child(4n)').addClass('end-row');
   $('#opdrachtgevers li:nth-child(4n+1)').addClass('first-row');
   $('.display li:nth-child(4n)').addClass('end-row');
   $('.display li:nth-child(4n+1)').addClass('first-row');
});

$(document).ready(function() {
   $().UItoTop({ easingType: 'easeOutQuart' });	
});

$(document).ready(function() {
   $('.viewport').mouseenter(function(e) {
      $(this).children('a').children('img').animate({ height: '100', left: '0', top: '0', width: '235'}, 100);
      $(this).children('a').children('span').fadeIn(200);
   }).mouseleave(function(e) {
   $(this).children('a').children('img').animate({ height: '100', left: '0', top: '0', width: '235'}, 100);
      $(this).children('a').children('span').fadeOut(200);
   });
});

$(document).ready(function(){
    $("a.switch_thumb").toggle(function(){
        $(this).addClass("swap");
        $("ul.display").fadeOut("fast", function() {
            $(this).fadeIn("fast").removeClass("thumb_view");
        });
    }, function () {
        $(this).removeClass("swap");
        $("ul.display").fadeOut("fast", function() {
            $(this).fadeIn("fast").addClass("thumb_view");
        });
    }); 
});

$(document).ready(function(){
   //Hide (Collapse) the toggle containers on load
   $(".toggle_container").hide(); 

   //Switch the "Open" and "Close" state per click then slide up/down (depending on open/close state)
   $("h4.trigger").click(function(){
      $(this).toggleClass("active").next().slideToggle("slow");
         return false; //Prevent the browser jump to the link anchor
   });
});

$(document).ready(function () {
            $("#map").gMap({ 
                  html_prepend: '<div class="gmap_marker">',
                  html_append: '</div>',
                  controls: ["GSmallZoomControl3D", "GMapTypeControl"],
                  scrollwheel: false,
                  maptype: G_NORMAL_MAP,
                  markers: [{ latitude: 52.073741,
                              longitude: 4.332588,
                              icon: { image: "/site-layout/gfx/image.png",
                                      shadow: "/site-layout/gfx/shadow.png",
                                      iconsize: [69, 90],
                                      iconanchor: [12,90],
                                      infowindowanchor: [0, 0] } },
                           ],
                  icon: { image: "/site-layout/gfx/image.png", 
                          iconsize: [69, 90],
                          iconanchor: [12, 90],
                          infowindowanchor: [0, 0] },
                  latitude: 52.073741,
                  longitude: 4.332588,
                  zoom: 15 });
});
