
jQuery(function($) {
	
function formatText(index, panel) {
  return index + "";
  }
	 $(function () {
      
          $('.anythingSlider').anythingSlider({
              easing: "easeInOutExpo",        // Anything other than "linear" or "swing" requires the easing plugin
              autoPlay: true,                 // This turns off the entire FUNCTIONALY, not just if it starts running or not.
              delay: 12000,                   // How long between slide transitions in AutoPlay mode
              startStopped: false,            // If autoPlay is on, this can force it to start stopped
              animationTime: 1000,            // How long the slide transition takes
              hashTags: true,                 // Should links change the hashtag in the URL?
              buildNavigation: true,          // If true, builds and list of anchor links to link to each slide
      		pauseOnHover: true,             // If true, and autoPlay is enabled, the show will pause on hover
      		startText: "Go",             // Start text
		        stopText: "Stop",               // Stop text
		        navigationFormatter: formatText       // Details at the top of the file on this use (advanced use)
          });

		 $('.beforeAfter').anythingSlider({
              easing: "easeInOutExpo",        // Anything other than "linear" or "swing" requires the easing plugin
              autoPlay: true,                 // This turns off the entire FUNCTIONALY, not just if it starts running or not.
              delay: 12000,                    // How long between slide transitions in AutoPlay mode
              startStopped: false,            // If autoPlay is on, this can force it to start stopped
              animationTime: 1000,             // How long the slide transition takes
              hashTags: true,                 // Should links change the hashtag in the URL?
              buildNavigation: true,          // If true, builds and list of anchor links to link to each slide
      		pauseOnHover: true,             // If true, and autoPlay is enabled, the show will pause on hover
      		startText: "Go",             // Start text
		        stopText: "Stop",               // Stop text
		        navigationFormatter: formatText       // Details at the top of the file on this use (advanced use)
          });
              
		$(".firstSlide").click(function(e){
		    $('.beforeAfter').anythingSlider(1);
		    e.preventDefault();
		});
		
		$(".secondSlide").click(function(e){
		    $('.beforeAfter').anythingSlider(2);
		    e.preventDefault();
		});
		
		$(".thirdSlide").click(function(e){
		    $('.beforeAfter').anythingSlider(3);
		    e.preventDefault();
		});
     
      });

	
  $('#testify ul').innerfade({
  	animationtype: 'fade',
  	speed: 750,
  	timeout: 10000,
  	type: 'sequence',
  	containerheight: 'auto'
  });


$('#primary .post-summary li h3 a')
  .hover(function(e) {
     $(this).hoverFlow(e.type, { left: 7 }, 'fast').css('background-color', '#efefef').css('color', '#007083');
  }, function(e) {
    $(this).hoverFlow(e.type, { left: 0 }, 'fast').css('background-color', 'transparent').css('color', '#111');
  });

//ACCORDIAN ACTIONS, ETC.
$('#content-accordian').accordion({ 
		autoHeight: false, 
        alwaysOpen: false
         });


 $('#content-tabs #tabs').tabs({ fx: {  opacity: 'toggle', duration: 'slow' } });


	$(window).load(function () {
	  // In one second, do something!
	  $.doTimeout( 7000, function(){
	    $('#landing-form').animate({ 
			backgroundColor: "#406182" 
			}, 100).animate({ 
				backgroundColor: "#caf7ff" 
				}, 1000);			
	  });
		
	});

	$(function() {
	    $('#baseUrl').click( function() {
	        window.location = $(this).attr('href') + '/?field3=' + $('#appendUrl').val();
	        return false;
	    });
	});
	
	$('.slide-out-div').tabSlideOut({
	 tabHandle: '.handle',   //class of the element that will become your tab
	 pathToTabImage: 'http://www.optimum7.com/internet-marketing/wp-content/themes/opt7-simple/images/contact.png', //path to the image for the tab //Optionally can be set using css
	 imageHeight: '370px',   //height of tab image           //Optionally can be set using css
	 imageWidth: '50px',     //width of tab image            //Optionally can be set using css
	 tabLocation: 'left',    //side of screen where tab lives, top, right, bottom, or left
	 speed: 300,             //speed of animation
	 action: 'click',        //options: 'click' or 'hover', action to trigger animation
	 topPos: '0px',        //position from the top/ use if tabLocation is left or right
	 leftPos: '20px',        //position from left/ use if tabLocation is bottom or top
	 fixedPosition: true    //options: true makes it stick(fixed position) on scroll
	 });

	//$('.web-analysis').stickyScroll({ container: '#main' });

});


