/* Author: 

*/
	$(document).ready(function(){
 
		$('#sliderCode').tinycarousel({
                        pager: true,
                        axis: 'x',
                        interval: true,
                        easing: 'easeInOutBack',
                        duration: 1200,
                        intervaltime: 10000
                }
                
        );
 
	});
	
		$(document).ready(function(){
 
		$('#sliderServiceCode').tinycarousel({
                        pager: true,
                        axis: 'x',
                        interval: true,
                        easing: 'easeInOutBack',
                        duration: 700
                        
                }
                
        );
 
	});
        $(document).ready(function(){
 
		$('#clientSlideshow').tinycarousel({
                        pager: true,
                        axis: 'x',
                        interval: false,
                        duration: 100
 
                }
                
        );
        
    });
    
     $(document).ready(function(){
		$('#relatedClients').tinycarousel({
                        pager: true,
                        axis: 'x',
                        interval: false,
                        duration: 100
 
                }
                
        );
        
 
	});
	
	 $(document).ready(function(){
		$('#workSlider').tinycarousel({
						pager: true,
                        axis: 'x',
                        interval: true,
                        easing: 'easeInOutBack',
                        duration: 700
                }
        );
        
 
	});
	
		/*$("h3.button").click(function () {
    	$("div.toggle").delay(400).slideToggle({
    	    speed: "slow"
    	});
    	$("h3.button").toggleClass("active");
    	return false;
    	});
    	
     $("h3.button2").click(function () {
    	$("div.toggle2").delay(400).slideToggle({
    	    speed: "slow"
    	});
    	$("h3.button2").toggleClass("active");
    	return false;
    	});
    	
    	
    	$("h3.button").click(function(){$(".actionLink").delay(400).toggleClass("active");});*/
    	
    	$("h3.button").click(function () {
    	$("div.toggle").delay(200).animate({height: 'toggle'}, 'slow');
    	$("h3.button").toggleClass("active");
    	return false
    	});
    	
    	$("h3.button2").click(function () {
    	$("div.toggle2").delay(200).animate({height: 'toggle'}, 'slow');
    	$("h3.button2").toggleClass("active");
    	return false
    	});
    	
    	$("h3.button").click(function(){$(".actionLink").delay(400).toggleClass("active");});

    	$("h3.button2").click(function(){$(".actionLink").delay(400).toggleClass("active");});


    	$("a.feedbackButton").click(function () {
    	$("div.feedback").delay(400).slideToggle({
    	    speed: 500
    	    
    	}
    	);
    	$("#contentWrapper").delay(400).slideToggle({
    	    speed: 500
    	    
    	}
    	);
    	$("#sliderCode").delay(400).slideToggle({
    	    speed: 500
    	    
    	}
    	);
    	$("he ader").delay(400).slideToggle({
    	    speed: 500
    	    
    	}
    	);
    	return false;
    	
    	});
    	//$("#ClientSlideshow .buttons").click(function() {
    	 //   $("#clientSlideshow .client").fadeOut(0);
    	  //  $("#clientSlideshow .client").delay(400).fadeIn("slow");
    	//});
    	$("a.feedbackButton").click(function(){
    	        $("a.feedbackButton span").delay(400).toggleClass("active")
    	});

    	$(document).ready(function() {

    		//When page loads...
    		$(".tab_content").hide(); //Hide all content
    		$("ul.tabs li:first").addClass("active").show(); //Activate first tab
    		$(".tab_content:first").show(); //Show first tab content

    		//On Click Event
    		$("ul.tabs li").click(function() {

    			$("ul.tabs li").removeClass("active"); //Remove any "active" class
    			$(this).addClass("active"); //Add "active" class to selected tab
    			$(".tab_content").hide(); //Hide all tab content

    			var activeTab = $(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content
    			$(activeTab).fadeIn(); //Fade in the active ID content
    			return false;
    		});

    	});
    	
    	$("a.teamExtra").click(function () {
    	$("div.teamSliderPanelOne").delay(400).animate({height: 'toggle'}, 'slow', 'easeInOutExpo');
    	
    	$(".teamSliderPanelTwo").delay(400).animate({height: 'toggle'}, 'slow', 'easeInOutExpo');
    	
    	return false;
    	
    	});
    	
   
     $(function(){
    
    var $container = $('.workIsoContainer'),
        filters = {};

    $container.isotope({
      itemSelector : '.workBox, .workBox2',
      masonry: {
        columnWidth: 10
      }
    });

    // filter buttons
    $('.filters a').click(function(){
      var $this = $(this);
      // don't proceed if already selected
      if ( $this.hasClass('selected') ) {return;}
      
      var $optionSet = $this.parents('.options-set');
      // change selected class
      $optionSet.find('.selected').removeClass('selected');
      $this.addClass('selected');
      
      // store filter value in object
      // i.e. filters.color = 'red'
      var group = $optionSet.attr('data-filter-group');
      filters[ group ] = $this.attr('data-filter');
      // convert object into array
      var isoFilters = [];
      for ( var prop in filters ) {
        isoFilters.push( filters[ prop ] )
      }
      var selector = isoFilters.join('');
      $container.isotope({ filter: selector });

      return false;
    });

  });
   
   
   // Form ajax
   
   $(document).ready(function() { 
    // bind form using ajaxForm 
    $('#contact_form').ajaxForm({ 
        // target identifies the element(s) to update with the server response 
        target: '#htmlExampleTarget', 
 
        // success identifies the function to invoke when the server response 
        // has been received; here we apply a fade-in effect to the new content 
        success: function() {$('#htmlExampleTarget').fadeIn('slow');} 
    	}); 
	});
	$(document).ready(function(){$("#contact_form").validate();});
	



// Captify

$(function(){
	$('img.captify').captify({
		// all of these options are... optional
		// ---
		// speed of the mouseover effect
		speedOver: 'fast',
		// speed of the mouseout effect
		speedOut: 'normal',
		// how long to delay the hiding of the caption after mouseout (ms)
		hideDelay: 500,	
		// 'fade', 'slide', 'always-on'
		animation: 'slide',		
		// text/html to be placed at the beginning of every caption
		prefix: '',		
		// opacity of the caption on mouse over
		opacity: '0.7',					
		// the name of the CSS class to apply to the caption box
		className: 'caption-bottom',	
		// position of the caption (top or bottom)
		position: 'bottom',
		// caption span % of the image
		spanWidth: '100%'
	});
});


//$(function() {
//$().jSnow();
//});



