jQuery(document).ready(function(){

/* ------------------------------------------ Home Product Gallery ------------------------------------------ */

	jQuery('#home_gallery').cycle ({
		fx: 'fade',
		speed:500,
		timeout:0,
		random:1,
		pager: '#home_gallery_nav',
		pagerAnchorBuilder: function(idx, slide) {
            // return sel string for existing anchor
            return '#home_gallery_nav li:eq(' + (idx) + ') a';
        }

	});

/* ------------------------------------------ Home News Feed Gallery ------------------------------------------ */

	jQuery('#home_news_gallery').cycle ({
		fx: 'scrollHorz',
		speed:500,
		timeout:10000,
		pager: '#home_news_nav',
		pagerAnchorBuilder: function(idx, slide) {
            // return sel string for existing anchor
            return '#home_news_nav li:eq(' + (idx) + ') a';
        }

	});

/* ------------------------------------------ Product Featured Gallery ------------------------------------------ */

	jQuery('#product_featured_gallery').cycle ({
		fx: 'scrollHorz',
		speed:500,
		timeout:0,
		pager: '#product_featured_nav',
		pagerAnchorBuilder: function(idx, slide) {
            // return sel string for existing anchor
            return '#product_featured_nav li:eq(' + (idx) + ') a';
        }

	});

	function mycarousel_initCallback(carousel) {
    jQuery('#product_featured-next').bind('click', function() {
        carousel.next();
        return false;
    });

    jQuery('#product_featured-prev').bind('click', function() {
        carousel.prev();
        return false;
    });
};
	
	jQuery('#product_featured_nav').jcarousel ({
		scroll: 1,
        initCallback: mycarousel_initCallback,
		buttonNextHTML: null,
        buttonPrevHTML: null	
	});
	
	

/* ------------------------------------------ Sectors Gallery ------------------------------------------ */

	jQuery('#sectors_gallery_wrapper').cycle ({
		fx: 'fade',
		speed:500,
		timeout:0,
		pager: '#sectors_gallery_nav',
		pagerAnchorBuilder: function(idx, slide) {
            // return sel string for existing anchor
            return '#sectors_gallery_nav li:eq(' + (idx) + ') a';
        }

	});



/* ------------------------------------------ Nav DD ------------------------------------------ */


	jQuery('#nav_products_dd_trigger').hover(function(){
		jQuery('#product_dd').slideDown(200);	
	}, function() {
		jQuery('#product_dd').slideUp(150);	
	});

	jQuery('#nav_about_dd_trigger').hover(function(){
		jQuery('#about_dd').slideDown(200);	
	}, function() {
		jQuery('#about_dd').slideUp(150);	
	});

/* ------------------------------------------ Colorbox ------------------------------------------ */

	jQuery('.colorbox').colorbox();

/* ------------------------------------------ Contact Events ------------------------------------------ */

});
