jQuery(document).ready(function() {
	$(function() {
	    $('a[rel*=external]').click( function() {
	        window.open(this.href);
	        return false;
	    });
	});
	$(function(){
      $('#tech').masonry({
		columnWidth: 480, 
		singleMode: true,
        itemSelector: '.half'
      });

    });
	$("#play").click(function() {
		play_video();
	});
	$(".product-content").fadeIn();
	if ($('#products-holder').length > 0) {
		 $('#products-holder').cycle({
    	    fx:     'turnUp',
	        speed:  'fast',
        	timeout: 0,
    	    pager:  '#sub-products-menu',
			pagerAnchorBuilder: function(idx, slide) {
        	return '#sub-products-menu li:eq(' + idx + ') a'; 
		    }
    	});
	}
	if ($('#icons').length > 0) {
		 $('#icons').cycle({
    	    fx:     'fade',
	        speed:  'fast',
        	timeout: 0,
    	    pager:  '#sub-products-menu',
			pagerAnchorBuilder: function(idx, slide) {
        	return '#sub-products-menu li:eq(' + idx + ') a'; 
		    }
    	});
	}
	if ($('.tooth-tips').length > 0) {
		$('.tooth-tips').cycle({ 
				fx: 'fade', 
				startingSlide: 1,
				timeout:  0, 
				speed:    500, 
				prev:    '#prev', 
				next:    '#next'
		}); 
	};
});
function reset_btn(){
	$("#sub-products-menu li.active").each(function() {
       $(this).animate({"top": "+=40px"});
    });	
}
function hide_playbtn(){
	$("#play").fadeOut();
}
function show_playbtn(){
	$("#play").fadeIn();
}
