$(document).ready(function() {		$('#coin-slider').coinslider();	});	
$(function() {
 var options1 =
            {
            zoomType: 'standard',
            lens:true,
            preloadImages: true,
            alwaysOn:false,
            zoomWidth: 380,
            zoomHeight: 220,
            position:'right',
            yOffset:0
            }
            $(".jqzoom").jqzoom(options1);

});
$("img.lazy").lazyload({effect: "fadeIn" });	
$("#tabs").tabs();
$(function(){ $('.star').rating();});

$(document).ready(function() {
  $("#ajaxAdd").click(function() {
    $(".addMessage").fadeIn("normal");
    setTimeout(function() { $(".addMessage").fadeOut(); }, 3500); 
  });
});
$('.tooltip').tipsy({fade: true});
$('.tooltip.north').tipsy({fade: true, gravity: 's'});
$('.tooltip.east').tipsy({fade: true, gravity: 'w'});
$('.tooltip.west').tipsy({fade: true, gravity: 'e'});



function mycarousel_initCallback(carousel)
{
    carousel.buttonNext.bind('click', function() {
        carousel.startAuto(0);
    });
    carousel.buttonPrev.bind('click', function() {
        carousel.startAuto(0);
    });
    carousel.clip.hover(function() {
        carousel.stopAuto();
    }, function() {
        carousel.startAuto();
    });
};

	$(document).ready(function() {
	$(".paging").show();
	$(".paging a:first").addClass("active");
	var imageWidth = $(".window").width();
	var imageSum = $(".image_reel img").size();
	var imageReelWidth = imageWidth * imageSum;
	$(".image_reel").css({'width' : imageReelWidth});
	rotate = function(){	
		var triggerID = $active.attr("rel") - 1; 
		var image_reelPosition = triggerID * imageWidth; 
		$(".paging a").removeClass('active'); 
		$active.addClass('active');
		$(".image_reel").animate({ 
			left: -image_reelPosition
		}, 500 );
	}; 
	rotateSwitch = function(){		
		play = setInterval(function(){ 
			$active = $('.paging a.active').next();
			if ( $active.length === 0) { 
				$active = $('.paging a:first'); 
			}
			rotate();
		}, 7000); 
	};
	rotateSwitch(); 
	$(".image_reel a").hover(function() {
		clearInterval(play);
	}, function() {
		rotateSwitch();
	});	
	$(".paging a").click(function() {	
		$active = $(this); 
		clearInterval(play);
		rotate(); 
		rotateSwitch();
		return false;
	});	
});
