jQuery.noConflict();
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();
    });
};


jQuery(document).ready(function($) {

	$('img').tipTip({
		defaultPosition: "top",
		minWidth: "10px",
		maxWidth: "200px"
	});
	
	$('.desktopImg, .mobileImg').tipTip({
		defaultPosition: "bottom",
		minWidth: "300px",
		maxWidth: "300px"
	});
	
    $('#mycarousel').jcarousel({
        auto: 10,
        wrap: 'last',
        initCallback: mycarousel_initCallback
    });
	
	$('.youtubeVid').click(function() {
		$(".videoBlock").css('display', 'block');
		$(".splash").css('display', 'block');
		$('[name=videoCont]').attr('src', 'http://www.youtube.com/embed/'+$(this).attr('id')+'?rel=0&amp;hd=1');
		$(".splash").click(function() {
			$(this).css('display', 'none');
			$('.videoBlock').css('display','none');
		});
		$(".close").click(function() {
			$('.videoBlock').css('display','none');
			$('.splash').css('display','none');
		});
	});
	
	$(document).ready(function(){
	
		$(".desktopImg, .mobileImg").hover(
			function() {	
				$(this).stop().animate({"opacity": "0"}, "slow");
			},
			function() {
				$(this).stop().animate({"opacity": "1"}, "slow");
			}
		); 
		
	});
});

