function mycarousel_initCallback(carousel) {
    // Pause autoscrolling if the user moves with the cursor over the clip.
    carousel.clip.hover(function() {
        carousel.stopAuto();
    }, function() {
        carousel.startAuto();
    });
};
$(function () {
	$('.navlinks .menu-item').hover(function () {
		$(this).children('.sub-menu').show();
	}, function () {
		$(this).children('.sub-menu').hide();
	});
	$('.rqf-field input').focus(function () {
		$(this).prev('label').fadeOut();
	});
	$('.rqf-field input').blur(function () {
		if ($(this).val() == '') {
			$(this).prev('label').fadeIn();
		}
	});
	$('.rqf-field textarea').focus(function () {
		$(this).prev('label').fadeOut();
	});
	$('.rqf-field textarea').blur(function () {
		if ($(this).val() == '') {
			$(this).prev('label').fadeIn();
		}
	});
	$('.banner').nivoSlider();
	$('.adbanners').nivoSlider({effect:'fade'});
	$('.ad-roller-ads').jcarousel({
		auto: 3,
		wrap: 'circular',
		initCallback: mycarousel_initCallback
	});
	$(".category-5 .col a").fancybox({
		'transitionIn'	:	'elastic',
		'transitionOut'	:	'elastic',
		'speedIn'		:	600, 
		'speedOut'		:	200, 
		'overlayShow'	:	true
	});
	$(".gallery-images a").fancybox({
		'transitionIn'	:	'elastic',
		'transitionOut'	:	'elastic',
		'speedIn'		:	600, 
		'speedOut'		:	200, 
		'overlayShow'	:	false
	});
	$(".wp-caption a").fancybox({
		'transitionIn'	:	'elastic',
		'transitionOut'	:	'elastic',
		'speedIn'		:	600, 
		'speedOut'		:	200, 
		'overlayShow'	:	false
	});
});
