﻿/*  Google Analytics Code
_________________________________*/
		var _gaq = _gaq || [];
		  _gaq.push(['_setAccount', 'UA-8852965-2']);
		  _gaq.push(['_trackPageview']);
		  (function() {
		    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
		    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
		    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
		  })();
/*_________________________________*/	  
		  
$(document).ready(function(){

				$.easing.InOutBack = 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;
				}
				$(".scroll").scrollable({ // enable circular scrollables with a click handler
					easing: 'InOutBack', 
					speed: 1000,
					circular: true
				}).autoscroll({
					autoplay: true,
					interval: 45000
				}).click(function() {
					$(this).data("scrollable").next();
				}); 
				// applies reflection effect to all thumbnail images
				$('.pics img').reflect({height: 0.3, opacity: 0.4});
				// after page loads this makes all images within DIV visible- prevents ugly page loading
				$(window).load(function(){
					$('.scroll').css('visibility', 'visible');
				});
				
});
