// load all inline scripts here

// Code for Google Analytics | Change UA-XXXXX-X to be your site's ID
//UA-11479292-1
var _gaq=[['_setAccount','UA-XXXXX-X'],['_trackPageview'],['_trackPageLoadTime']];
	(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];g.async=1;
	g.src=('https:'==location.protocol?'//ssl':'//www')+'.google-analytics.com/ga.js';
	s.parentNode.insertBefore(g,s)}(document,'script'));

$(document).ready(function() {
    $('#hpcarousel').jcarousel({
        auto:5,
		wrap: 'circular',
		animation: 1000,
        initCallback: mycarousel_initCallback
    });
    $('#gallery').jcarousel({
        auto:			3,
		wrap: 			'circular',
		animation: 		1000,
        initCallback: 	mycarousel_initCallback,
		setupCallback:  mycarousel_setupCallback
    });
	$('a.gal-item').fancybox({
		overlayColor:'#000',
		overlayOpacity:'0.8'
		});
	$('#workingwith').cycle();
});
function showgallery() {
	  $("a[rel=gallery]:first").trigger('click');

}
function mycarousel_setupCallback(carousel) {
	$('#gallery').animate({opacity: 1});
}

function mycarousel_initCallback(carousel)
{
    // Disable autoscrolling if the user clicks the prev or next button.
    carousel.buttonNext.bind('click', function() {
        carousel.startAuto(0);
    });
 
    carousel.buttonPrev.bind('click', function() {
        carousel.startAuto(0);
    });
 
    // Pause autoscrolling if the user moves with the cursor over the clip.
    carousel.clip.hover(function() {
        carousel.stopAuto();
    }, function() {
        carousel.startAuto();
    });
};
