$(function() {

  // $('.cycle').before('<div id="nav">').cycle({ 
  //     fx:     'fade', 
  //     speed:  'slow', 
  //     timeout: 5000, 
  //     pager:  '.pager' 
  // });
    
	$('.imageHover').hover(function(){
			$(this).fadeTo('fast', .6);
		}, function(){
			$(this).fadeTo('fast', 1);			
	});
	
  $('.gallery').cycle({ 
    speed:  '1200', 
    timeout: 0, 
    before:  function(currSlideElement, nextSlideElement, options, forwardFlag){
      $('.middleSectionTitle').html($(nextSlideElement).attr('alt'));
    },
    pause:  0, 
    pauseOnPagerHover:   1,
    timeout:   4000,
    pager:  '.pager'
  });
  
  // $("#constructionGallery").PikaChoose({show_captions:true, slide_enabled:false});
  
	$('.colorbox').colorbox({
		rel : true,
		opacity : ".9",
		next : "Next &raquo;",
		previous : "&laquo; Prev",
		close : "Close"
	});
	
  if($('#animationContainer').length > 0 && swfobject.hasFlashPlayerVersion("9.0.0")){
    var videoFlashvars = {skin:"/swf/bekle.swf",
                          autostart:"false",
                          displayclick:"none",
                          name:"animationContainer",
                          id:"animationContainer",
                          screencolor:"#000",
                          file:"/flv/animation.f4v",
                          image:"/images/animation_preview.png"};
                          
    var videoParams =    {wmode:"transparent",
                          allowfullscreen:"true",
                          allowscriptaccess:"always"};
                
    var videoAttributes = {};
    swfobject.embedSWF("/swf/player.swf", "animationContainer", "595", "335", "9.0.0","/swf/expressInstall.swf", videoFlashvars, videoParams, videoAttributes);
  }
  else{
    $('.noFlash').show();
  }
  
  // $('a.lightbox').lightBox();

	
	
});

$(window).load(function() {
	$('#slider').nivoSlider({
		controlNav : false
	})
});

