/* Nivo slider */

$(window).load(function() {
 $('#slider').nivoSlider({
        effect: 'sliceDownLeft', // Specify sets like: 'fold,fade,sliceDown'
        slices: 15, // For slice animations
        boxCols: 8, // For box animations
        boxRows: 4, // For box animations
        animSpeed: 500, // Slide transition speed
        pauseTime: 4000, // How long each slide will show
        startSlide: 0, // Set starting Slide (0 index)
        directionNav: false, // Next & Prev navigation
        controlNav: true, // 1,2,3... navigation
        keyboardNav: false, // Use left & right arrows
        pauseOnHover: true, // Stop animation while hovering
        captionOpacity: 0.8 // Universal caption opacity
    });
});



/* Fancy box */
$(document).ready(function() {
	$("a.zoomImage").fancybox({
		'overlayColor'	: '#000000',
		'overlayOpacity': 0.4,
		'transitionIn'	: 'elastic',
		'transitionOut'	: 'elastic'
	});
});


/* Smooth scroll */

$(document).ready(function() {
      $('.profileLink a').smoothScroll({
      	easing: 'swing',
      	speed: 1500
      });
      $('.specLink a').smoothScroll({
      	easing: 'swing',
      	speed: 1500
      });
      $('.toTop a').smoothScroll({
      	easing: 'swing',
      	speed: 1500
      });
});
    

/* Show Related Products */

$(".showRelatedProducts").click(function () {
    $(".showOnBuyProduct").show("slow");
    $(".hideOnBuyProduct").hide("slow");
});

if (location.href.indexOf("#") != -1) {
    $(".showOnBuyProduct").show("slow");
    $(".hideOnBuyProduct").hide("slow");
    $(".closeRelated").delay(1000).fadeIn("slow");
}

$(".closeRelated").click(function () {
    $(".showOnBuyProduct").hide("slow");
    $(".hideOnBuyProduct").show("slow");
});


/* Show "SELECT SIZE" */

$(".showAboutFrameSizes a").click(function () {
    $(".aboutFrameSizes").fadeIn("slow");
    $(".aboutFrameSizes").delay(2500).fadeOut("slow");
});



$(".hiddenOnLoad img").each(function(i) {
  $(this).delay(i * 300).fadeIn();
});




