jQuery(document).ready(function($){
  
  // PORTFOLIO IMAGE HOVER:
  var speed = 300;
  var portfolio_link_opacity = 1;
  var icon_link_opacity = 1;
  
  
  var tour_slide_width = 700;
  var actual_tour_selected = 1;
 
    $('.tour_pagenavi_left').click(function(){
    var clicked = $(this).attr('rel');
    
         $('#tour_nav a').removeClass('tour_nav_active');
     $('#tour_nav a').eq(clicked-1).addClass('tour_nav_active');
     
    $('#tour_slider ul').children('li').eq(clicked-1).css('display','block');
    $('#tour_slider ul').children('li').eq(clicked-1).css('height','auto');
    $('#tour_slider ul').animate({left: tour_slide_width*(clicked-1)*-1}, 300, function() {
      var size = $('#tour_slider ul').children('li').size();
      for(var i =0; i< size; i++)
      {
      
        
        if(i != (clicked-1))
        {
     //   alert (clicked + " " + i);  
         $('#tour_slider ul').children('li').eq(i).css('height','7px');
        }
      }
    });
    
    //alert()
    return false;
  } ); 
  
  
  
  $('.portfolio_link').hover(function(){
  $(this).find('img').stop().animate({opacity:0.5}, speed);

    
  },function(){   
  $(this).find('img').stop().animate({opacity:1}, speed);
  });
  
    $('.gallery_link').hover(function(){
    $(this).find('img').stop().animate({opacity:0.5}, speed);
    
  },function(){ 
    $(this).find('img').stop().animate({opacity:1}, speed);
  });
	jQuery(".toggle_body").hide(); 

	jQuery("h4.toggle").toggle(function(){
		jQuery(this).addClass("toggle_active");
		}, function () {
		jQuery(this).removeClass("toggle_active");
	});
	
	jQuery("h4.toggle").click(function(){
		jQuery(this).next(".toggle_body").slideToggle();

	});
	

	
	
	// Google Analytics
	/*var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
	document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));


	try {
	    var pageTracker = _gat._getTracker("UA-11757044-1");
	    pageTracker._trackPageview();
	} catch(err) {}
	*/
	
});
