/**
 * @author decama
 */
jQuery(function($){
    $("#thumnail-slider").jCarouselLite({
        btnNext:"#next-button",
        btnPrev:"#prev-button",
        mouseWheel:true,
        visible:3.19,
        speed:500
    });
    $("a[rel*=modal]").nyroModal({
        endShowContent:function(){
            if ($(".nyroModalNext").length) {
                $(".nyroModalNext").click(function(){$("#next-button").click()})
            }
            if ($(".nyroModalPrev").length) {
                $(".nyroModalPrev").click(function(){$("#prev-button").click()})
            }
        }
    });
    $(".link-switch").animate({opacity:0}, 0);
    $("#screenshot-link").click(function(){
        $("#interactive-content-description").fadeOut(1000);
        $("#interactive-content-screenshots").fadeIn(1000, function(){
            $("#description-link").fadeTo(0, 0.5).fadeTo(500, 0);
        });
        return false;
    });
    $("#description-link").click(function(){
        $("#interactive-content-description").fadeIn(1000);
        $("#interactive-content-screenshots").fadeOut(1000, function(){
            $("#screenshot-link").fadeTo(0, 0.5).fadeTo(500, 0);
        });
        return false;
    });
	$("#video-demo-link").fadeTo(0, 0).hover(
		function(){
			$(this).stop().fadeTo(200, 1);
		},
		function(){
			$(this).stop().fadeTo(200, 0);
		} 
	);
    if (location.pathname == "/" || location.pathname == "/index.html") {
        $("#interactive-content-description").fadeOut(0).fadeIn(1000, function(){
            $("#screenshot-link").fadeTo(0, 0.5).fadeTo(500, 0);
        });
    }
    else {
        $("#screenshot-link").fadeTo(0, 0.5).fadeTo(500, 0);
    }
    $("#interactive-content-screenshots").hide();
});
if (location.pathname == "/product.html") {
	swfobject.registerObject("vtd-demo-movie", "10.0.22.87", "expressInstall.swf");
}
