$(document).ready(function() {
	
	$('a[href=#top]').click(function(){
        $('html, body').animate({scrollTop:0}, 'slow');
	        return false;
	    });
		

$(function(){
	
	$('.overlay')
		.css( {opacity:0} )
		.mouseover(function(){
			$(this).stop().animate({opacity: 1}, {duration:400})
		})
		.mouseout(function(){
			$(this).stop().animate({opacity: 0}, {duration:400})
		})
		
		
});


	$("ul.gallery2 li").hover(function() { 

		var thumbOver = $(this).find("img").attr("src"); 

		$(this).find("a.thumb").css({'background' : 'url(' + thumbOver + ') no-repeat center bottom'});

		$(this).find("span").stop().fadeTo('normal', 0 , function() {
			$(this).hide()
		});
	} , function() { 
		$(this).find("span").stop().fadeTo('normal', 1).show();
	});
  
});

jQuery(window).load(function() {
	jQuery('#slider').nivoSlider({
		effect:'fold',
		slices:1,
		animSpeed:500, 
        pauseTime:3000,
        startSlide:0, 
        directionNav:true, 
        directionNavHide:true, 
        controlNav:true, 
        controlNavThumbs:false, 
        controlNavThumbsFromRel:false, 
        controlNavThumbsSearch: '.jpg', 
        controlNavThumbsReplace: '_thumb.jpg', 
        keyboardNav:true, 
        pauseOnHover:true, 
        manualAdvance:false, 
        captionOpacity:0, 
        beforeChange: function(){},
        afterChange: function(){},
        slideshowEnd: function(){}, 
        lastSlide: function(){}, 
        afterLoad: function(){}
	});
});

$(document).ready(function() {
for (i=1; i<=5 ; i++){
	$test = '<span class="hover"></span>'
	$('.menuItem'+i).append($test).each(function () {
	  var $span = $('> span.hover', this).css('opacity', 0);
	  $(this).hover(function () {
	    $span.stop().fadeTo(500, 1);
	  }, function () {
	    $span.stop().fadeTo(500, 0);
	  });
	});};
});

// <![CDATA[
	var vvqflashvars = {};
	var vvqparams = { wmode: "opaque", allowfullscreen: "true", allowscriptaccess: "always" };
	var vvqattributes = {};
	var vvqexpressinstall = "<?php echo plugins_url('/vipers-video-quicktags/resources/expressinstall.swf'); ?>";
// ]]>


(function(){
		try {
			// Disabling SWFObject's Autohide feature
			if (typeof swfobject.switchOffAutoHideShow === "function") {
				swfobject.switchOffAutoHideShow();
			}
		} catch(e) {}
	})();

