$(document).ready(function() {
    $("#carousel").featureCarousel({
        largeFeatureWidth: 636,
        largeFeatureHeight: 285,
        smallFeatureWidth: 0.9,
        smallFeatureHeight: 0.9,
        topPadding: 30,
        sidePadding: 60,
        smallFeatureOffset: 15,
        trackerSummation: false,
        autoPlay: 5000
    });
    //remove margin from end sections
    $("#sections div:nth-child(4n)").addClass("fourth");
    $("#sections div:nth-child(4n+1)").addClass("s-left");
    $("#sections div:nth-child(1)").addClass("s-left");

    $("#homeSections div:nth-child(4n+1)").addClass("fourth");
    $("#homeSections div:nth-child(4n+2)").addClass("s-left");
    $("#homeSections div:nth-child(1)").addClass("s-left");
    //hover style
    $(".section").hover(
		  function() {
		      $(this).addClass("s-hover");
		  },
		  function() {
		      $(this).removeClass("s-hover");
		  }
	);
    //make whole section clickable
    $("div.section").click(function() {
        window.location = $(this).find("a").attr("href"); return false;
    });
    //image previews
    $('#images a').lightBox({ fixedNavigation: true });
    //tabbed product page
    //$("#tabs").tabs();
    $("#tabsv2").tabs();

    $("#ctl00_SearchString").watermark('e.g. switch, keyboard...');

    $('ul.nav-menu').superfish({
        delay: 200,                            // one second delay on mouseout 
        animation: { opacity: 'show', height: 'show' },  // fade-in and slide-down animation 
        speed: 'fast',                          // faster animation speed 
        autoArrows: false,                           // disable generation of arrow mark-up 
        dropShadows: false                            // disable drop shadows 
    });
});
