// JavaScript Document

<!-- menu animation -->
	$(function() {
		// set opacity to nill on page load
		$("ul#menu span").css("opacity","0");
		// on mouse over
		$("ul#menu span.hover").hover(function () {
			// animate opacity to full
			$(this).stop().animate({
				opacity: 1
			}, 'medium');
		},
		// on mouse out
		function () {
			// animate opacity to nill
			$(this).stop().animate({
				opacity: 0
			}, 'medium');
		});
	});


<!-- Scrollable Homepage -->
    $(document).ready(function(){ 
			$(".styles-rotation").scrollable({size: 1, speed:1500, clickable: false}).circular().navigator(".navi").autoscroll({ 
            autoplay: false, 
            interval: 6000
        });
    }); 
	
<!-- Client Scrollable -->
    $(document).ready(function(){ 
			$(".client-rotator").scrollable({size: 1, speed:1500, clickable: false}).circular().navigator(".tabs").autoscroll({ 
            autoplay: true, 
            interval: 6000,
			autopause: true
        });
    }); 


<!-- Case Study Scrollable -->
    $(document).ready(function(){ 
			$(".case-study-scroll").scrollable({size: 1, speed:1500, clickable: true}).circular().navigator(".case-navi").autoscroll({ 
            autoplay: false, 
            interval: 6000,
			autopause: true
        });
    }); 
	
<!-- Case Study Accordion NOT NEEDED! -->

$(function() {
	$("div.case-section-tabs").tabs(".case-study-sections > div", {
		// enable "cross-fading" effect
		effect: 'fade',
		fadeOutSpeed: "slow",
		// start from the beginning after the last tab
		rotate: true,
		
	// use the slideshow plugin. It accepts its own configuration 
	}).slideshow({clickable: false});
});


// TOGGLE Script
$(document).ready(function(){
	
	$(".toggle_container").hide();

	$("div.view-more-toggle").toggle(function(){
		$(this).addClass("active"); 
		}, function () {
		$(this).removeClass("active");
	});
	
	$("div.view-more-toggle").click(function(){
		$(this).next(".toggle_container").slideToggle("slow,");
	});

});

<!-- Google Feed Options -->
google.load("feeds", "1");

      function initialize() {
        var feedControl = new google.feeds.FeedControl();
        feedControl.addFeed("http://blog.stylescreative.com/atom.xml");
		feedControl.setNumEntries(2);
        feedControl.draw(document.getElementById("feedControl"));
      }
      google.setOnLoadCallback(initialize);

<!-- Bounce Effect -->
// create custom animation algorithm for jQuery called "bouncy"
$.easing.bouncy = function (x, t, b, c, d) {
	var s = 1.70158;
	if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
	return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
}

// create custom tooltip effect for jQuery Tooltip
$.tools.tooltip.addEffect("bouncy",

	// opening animation
	function(done) {
		this.getTip().animate({top: '+=15'}, 500, 'bouncy', done).show();
	},

	// closing animation
	function(done) {
		this.getTip().animate({top: '-=15'}, 500, 'bouncy', function()  {
			$(this).hide();
			done.call();
		});
	}
);

// 
$(document).ready(function() { 
/* This is basic - uses default settings */ 
$("a.single-image").fancybox();
/* Using custom settings */ 
$("a.video").fancybox({ 'zoomSpeedIn': 300, 'zoomSpeedOut': 300, 'hideOnContentClick': false, 'frameWidth': 485, 'frameHeight': 320 });
$("a.group").fancybox({ 'zoomSpeedIn': 300, 'zoomSpeedOut': 300, 'overlayShow': false }); 
$("a.services-gal").fancybox({ 'zoomSpeedIn': 300, 'zoomSpeedOut': 300, 'overlayShow': false, 'titlePosition': 'over' }); }); 
