function slideshow() { function a(a) { var b = {}; b.current = 0; b.scrollspeed = 800; b.playing = true; b.speed = 5e3; var c = { init: function () { c.slideshow = $j(a); c.slider = $j("#slider", c.slideshow); c.slides = $j("li", c.slider); c.controls = $j("#bw-controls", c.slideshow); c.links = $j("a", c.controls); b.slideWidth = c.slideshow.width(); c.slider.append(c.slides.filter("#bw-slide-1").clone()); b.totalSlides = c.slides.length; c.events() }, slide: function (a) { if (b.current == 0 && b.playing == true) c.slider.css("left", 0); b.current = a; c.slider.stop().animate({ left: -(b.current * b.slideWidth) }, b.scrollspeed, "easeInOutQuad", c.update()) }, update: function () { b.current == b.totalSlides ? b.current = 0 : null; c.links.filter(".current").removeClass("current").end().filter('[rel="' + (b.current + 1) + '"]').addClass("current"); if (b.startTimer) window.clearTimeout(b.startTimer); if (b.playing == true) { b.startTimer = window.setTimeout(function () { switch (b.current) { case b.totalSlides: c.slide(1); break; default: c.slide(b.current + 1); break } }, b.speed) } }, stopAuto: function () { b.playing = false; window.clearTimeout(b.startTimer) }, events: function () { c.links.click(function (a) { a.preventDefault(); b.playing == true ? c.stopAuto() : null; c.slide($j(this).attr("rel") - 1) }); b.startTimer = window.setTimeout(function () { c.slide(b.current + 1) }, b.speed) } }; c.init() } $j("#bw-slideshow").each(function () { var b = new a($j(this)) }); } function videoPopUpPlayer() { function a(a) { var b = { init: function () { b.wrapper = a; b.player = $j("#videoPlayer", b.wrapper); b.thumbs = $j(".videoThumbs li", b.wrapper); b.selected = b.thumbs.filter(".selected"); b.play(); b.monitor() }, play: function () { $f("player", { src: "/resources/flowplayer/flowplayer.tradeit-3.1.1.swf", wmode: "transparent" }, { clip: { scaling: "fit" }, screen: { height: "100pct", top: 0 }, canvas: { backgroundGradient: "none" }, plugins: { controls: { borderRadius: 13, timeColor: "#ffffff", slowForward: true, bufferGradient: [.5, .2, 0], backgroundColor: "rgba(0, 0, 0, 1)", volumeSliderGradient: "none", slowBackward: false, timeBorderRadius: 20, time: true, progressGradient: "none", height: 30, volumeColor: "#ffffff", tooltips: { marginBottom: 5, volume: false, scrubber: true, buttons: false }, opacity: 1, fastBackward: false, timeFontSize: 12, volumeSliderColor: "#ffffff", border: "0px", bufferColor: "rgba(0, 0, 0, 1)", buttonColor: "rgba(255, 255, 255, 1)", mute: false, autoHide: { enabled: true, hideDelay: 1e3, hideStyle: "fade", mouseOutDelay: 2500, hideDuration: 400, fullscreenOnly: false }, backgroundGradient: [.5, .2, 0], width: "40pct", display: "block", sliderBorder: "1px solid rgba(128, 128, 128, 0.7)", buttonOverColor: "#ffffff", fullscreen: true, timeBgColor: "rgba(0, 0, 0, 0)", borderWidth: 0, scrubberBarHeightRatio: .1, bottom: "13pct", stop: false, sliderColor: "#000000", zIndex: 1, scrubberHeightRatio: .5, tooltipTextColor: "#ffffff", spacing: { time: 6, volume: 8, all: 2 }, sliderGradient: "none", timeBgHeightRatio: .7, volumeSliderHeightRatio: .4, name: "controls", timeSeparator: " ", volumeBarHeightRatio: .1, left: "50pct", tooltipColor: "#000000", playlist: false, durationColor: "#a3a3a3", play: true, fastForward: true, progressColor: "#ffffff", timeBorder: "0px solid rgba(0, 0, 0, 0.3)", volume: false, scrubber: true, builtIn: false, volumeBorder: "1px solid rgba(128, 128, 128, 0.7)", margins: [2, 6, 2, 12]}} }) }, monitor: function () { function a(a) { var c = $j(a); c.after("<span></span>").append("<span></span>"); c.children("span").css({ opacity: 0, display: "block" }); b.selected.children("a").children("span").css("opacity", .1); c.click(function (a) { a.preventDefault(); b.selected.removeClass("selected").children("a").children("span").css("opacity", 0); $f("player").play(c.attr("href")); c.parent().addClass("selected"); b.selected = c.parent() }); c.hover(function () { c.children("span").stop().animate({ opacity: .1 }, 200) }, function () { if (!c.parent().hasClass("selected")) c.children("span").stop().animate({ opacity: 0 }, 200) }) } b.thumbs.children("a").each(function () { var b = new a($j(this)) }); } }; b.init() } $j("#videoOverlay").each(function () { var b = new a($j(this)) }); } function tabContent() { function a(a) { var b = { init: function () { b.triggerList = a; b.selected = b.triggerList.children(".selected"); b.selectedTab = $j(b.selected.children("a").attr("href")); $j(".tabContent:not(:first-child)").hide(); b.monitor() }, monitor: function () { function a(a) { a.click(function (c) { b.selected.removeClass("selected"); b.selectedTab.hide(); b.selectedTab = $j(a.attr("href")); b.selectedTab.show(); a.parent().addClass("selected"); b.selected = a.parent(); if ("Cufon" in window) Cufon.refresh(); return false }) } b.triggerList.children(".tabTrigger").children("a").each(function () { var b = new a($j(this)) }); } }; b.init() } $j("#tabTriggers").each(function () { var b = new a($j(this)) }); } function validateForm() { function a(a) { jQuery.validator.messages.required = ""; var b = $j("p.error"); $j(a).validate({ invalidHandler: function (a, c) { var d = c.numberOfInvalids(); if (d) { var e = d == 1 ? "You missed 1 field. It has been highlighted above" : "You missed " + d + " required fields. They have been highlighted above"; b.html(e); b.show() } else { b.hide() } }, onkeyup: false }) } $j(".overlayBoxInner form").not("#newsletterSignup").each(function () { var b = new a($j(this)) }); } function galleryImages() { function a(a) { var b = { init: function () { b.feature = a; b.media = $j("#galleryMedia", b.feature); b.video = $j("#player", b.feature); b.imgItems = $j(".imgThumbs li", b.feature); b.videoItems = $j(".videoThumbs li", b.feature); b.href = ""; b.selected = $j(".selected", b.feature); b.selected.children("a").children("span").css("opacity", .1); if (b.imgItems) b.showImages(); if (b.videoItems.length > 0) { b.showVideos(); b.media.children("div.img").css("opacity", 1); $f("player").play(b.selected.children("a").attr("href")); b.isPlaying = true } else { b.video.css("opacity", 0); b.isPlaying = false } if ($j("#seriesBannerFeature").html()) b.hideShowControls() }, showImages: function () { function a(a) { a.after("<span></span>").append("<span></span>"); a.children("span").css({ opacity: 0, display: "block" }); b.selected.children("a").children("span").css("opacity", .1); a.click(function (c) { c.preventDefault(); if (a.parent("li").hasClass("selected")) return false; b.href = a.attr("href"); b.selected.removeClass("selected").children("a").children("span").css("opacity", 0); if (b.video.length > 0) { if (b.isPlaying || !b.video.is(":visible")) { $f("player").pause(); b.video.stop().animate({ opacity: 0 }, 200); b.isPlaying = false } } b.media.children("div.img").fadeOut("fast", function () { b.media.empty().append("<div class='img'><img src='" + b.href + "'/></div>").children("img").css({ opacity: 0 }).stop().animate({ opacity: 0 }, 800).animate({ opacity: 1 }, 300) }); a.parent().addClass("selected"); b.selected = a.parent() }); a.hover(function () { a.children("span").stop().animate({ opacity: .1 }, 200) }, function () { if (!a.parent().hasClass("selected")) a.children("span").stop().animate({ opacity: 0 }, 200) }) } $j.preloadImages(b.imgItems.children("a").attr("href")); b.imgItems.children("a").each(function () { var b = new a($j(this)) }); }, showVideos: function () { function a(a) { a.after("<span></span>").append("<span></span>"); a.click(function (c) { c.preventDefault(); b.isPlaying = true; b.href = a.attr("href"); b.media.children("div.img").fadeOut("fast", function () { $f("player").play(b.href); b.video.stop().animate({ opacity: 1 }, 200, function () { }) }); b.selected.removeClass("selected").children("a").children("span").css("opacity", 0); a.parent().addClass("selected"); b.selected = a.parent() }); a.hover(function () { a.children("span").css("opacity", 1) }, function () { }) } b.videoItems.children("a").each(function () { var b = new a($j(this)) }); }, hideShowControls: function () { if (!isiPad) { b.feature.children(".seriesOverlay").css("bottom", "-61px").end().hover(function () { b.feature.children(".seriesOverlay").stop().animate({ bottom: 0 }, 200) }, function () { b.feature.children(".seriesOverlay").stop().animate({ bottom: -61 }, 400, function () { }); b.controls.stop().animate({ opacity: 0 }, 200) }) } } }; b.init() } $j("#galleryFeature, #seriesBannerFeature").each(function () { var b = new a($j(this)) }); } function customScrollBar() { function a(a) { a.jScrollPane({ scrollbarWidth: 5, showArrows: true }) } $j(".scrolBox").each(function () { var b = new a($j(this)); try { $j(".jScrollPaneDrag").addTouch() } catch (c) { } $j(".jScrollArrowUp, .jScrollArrowDown").live("click", function (a) { a.preventDefault() }) }); } function starRating() { function a(a) { var b = { init: function () { b.star = a; b.rate = $j("#rate"); b.prev = b.star.prevAll(".rateStar").andSelf(); b.next = b.star.nextAll(".rateStar"); b.monitor() }, monitor: function () { b.star.hover(function () { b.prev.addClass("sHover") }, function () { b.prev.removeClass("sHover") }); b.star.click(function (a) { b.prev.addClass("sel"); b.next.removeClass("sel"); b.rate.attr("value", b.star.val()) }) } }; b.init(); return b } $j(".rateStarForm .rateStar").each(function () { var b = new a($j(this)) }); } function showOverlay() { function a(a) { var b = { init: function () { b.button = a; b.overlay = $j("#overlay").css({ opacity: .8 }); b.loader = b.overlay.children("#loader").css({ opacity: 1 }); b.box = $j(".overlayBoxWrapper"); b.closeButton = "<a href='javascript:void(0);' class='close'>Close</a>"; b.location = b.button.attr("href"); b.monitor() }, monitor: function () { b.button.click(function (a) { a.preventDefault(); b.overlay.fadeIn(100); b.loader.fadeIn(100); if (b.button.hasClass("r-iframe")) { b.box.append('<div id="registerInterestOverlay" class="overlayBoxInner"><a href="javascript:void(0);" class="close">Close</a><iframe src ="' + b.location + '" width="790" height="683" scrolling="no" frameborder="0" style="margin: 0 auto; display:block;"></iframe></div>'); b.update() } else { b.box.load(b.location + " .overlayBoxInner", function () { b.update() }) } return false }); b.overlay.click(function () { b.distroy() }) }, update: function () { b.loader.fadeOut(100); var c = b.box.height() * .5; var d = b.box.height(); if (typeof window.innerHeight == "number") { d = window.innerHeight } else if (document.documentElement && document.documentElement.clientHeight) { d = document.documentElement.clientHeight } if (d < b.box.height()) { b.box.css("position", "absolute"); b.box.css("top", "0px"); c = 0 } b.box.css("marginTop", -c).show(); b.box.children(".overlayBoxInner").prepend(b.closeButton).find(".close").click(function (a) { a.preventDefault(); b.distroy() }); if ("Cufon" in window) Cufon.refresh(); customScrollBar(); starRating(); validateForm(); videoPopUpPlayer(); a.trigger("overlayLoaded.RED") }, distroy: function () { b.overlay.fadeOut(200); b.box.hide().empty() } }; b.init(); return b } $j("#bandw").after("<div id='overlay'><span id='loader'><img src='/Styles/GF/Images/ajax-loader.gif'/></span></div><div class='overlayBoxWrapper'></div>"); $j(".overlayLink").each(function () { var b = new a($j(this)) }); } function scrollerSetUp() { function a(a) { var b = { init: function () { b.scroller = a; b.scroller.children(".viewer").after("<a href='javascript:void(0);' class='scrollLeft'>Left</a><a href='javascript:void(0);' class='scrollRight'>Right</a>"); b.leftButton = $j(".scrollLeft", b.scroller); b.rightButton = $j(".scrollRight", b.scroller); b.addScroll(); b.addItemRollovers(); b.addRollovers() }, addScroll: function () { b.scroller.scrollable({ clickable: false, items: "ul.contentConveyor", keyboard: false, next: ".scrollRight", prev: ".scrollLeft", loop: false, speed: 600, easing: "quad", size: 5 }).circular(); var a = b.scroller.scrollable(); b.scroller.swipe({ threshold: { x: 50, y: 25 }, swipeLeft: function () { a.next() }, swipeRight: function () { a.prev() } }) }, addItemRollovers: function () { $j("li", b.scroller).each(function () { var a = $j(this); a.hover(function () { a.children("a").stop().animate({ top: 0 }, 300, "easeInOutQuad"); a.children("small").stop().animate({ opacity: 1 }, 200, "easeInOutQuad") }, function () { a.children("a").stop().animate({ top: 40 }, 250, "easeInOutQuad"); a.children("small").stop().animate({ opacity: 0 }, 150, "easeInOutQuad") }).append("<small></small>").find("small").css("opacity", 0) }) }, addRollovers: function () { b.rightButton.hover(function () { b.rightButton.stop().animate({ right: -10 }, 100, "easeInOutQuad") }, function () { b.rightButton.stop().animate({ right: -6 }, 100, "easeInOutQuad") }); b.leftButton.hover(function () { b.leftButton.stop().animate({ left: -10 }, 100, "easeInOutQuad") }, function () { b.leftButton.stop().animate({ left: -6 }, 100, "easeInOutQuad") }) } }; b.init(); return b } $j("#productScroller").each(function () { var b = new a($j(this)) }); } function productListSlider() { function a(a) { var b = 0; var c = 0; var d = 0; var e = { init: function () { e.scroller = $j("ul", a); e.slider = $j("#slider", a); e.scrollItems = $j("li", e.scroller); e.viewer = $j(".viewer", a); e.itemsWidth = e.scrollItems.length * parseInt(e.scrollItems.css("width")) - parseInt(e.viewer.css("width")); e.enableRolls = true; e.addControls(); if (e.scrollItems.length > 4) e.addScrollFunction(); e.addRollovers(); e.currentIndex = 0; e.oldValue = 0; e.fromState = null; e.overrider = false; e.prevButton = $j("#prevNextButtons .products_prev > a", a); e.nextButton = $j("#prevNextButtons .products_next > a", a); e.prevButton.bind("click", e.prev); e.nextButton.bind("click", e.next); e.slider.addTouch(); if (typeof e.scroller.swipe !== "undefined" && e.scroller.swipe !== null) { e.scroller.swipe({ threshold: { x: 75, y: 25 }, swipeLeft: function () { e.next() }, swipeRight: function () { e.prev() } }) } }, addControls: function () { e.viewer.append("<span class='overlayLeft'></span><span class='overlayRight'></span>"); e.scroller.css("width", e.scrollItems.length * parseInt(e.scrollItems.css("width"))) }, addScrollFunction: function () { e.slider.slider({ min: 0, max: e.itemsWidth, animate: true }).bind("slide", function (a, b) { e.scroller.css("left", b.value * -1) }).bind("slidestart", e.onSliderStart).bind("slidestop", e.onSliderStop).bind("slidechange", e.onSliderChange) }, onSliderChange: function (a, b) { if (e.overrider) { value = e.overrider; c = Math.round(parseInt(value * -1)) * 235; d = Math.abs(Math.round(c / e.itemsWidth * 100 * 1e4) / 1e4); e.slider.children("a").stop(true).css("left", e.fromState).animate({ left: d + "%" }, 500, "easeInOutQuad", function () { e.fromState = e.slider.children("a").css("left"); e.oldValue = e.fromState }) } e.overrider = false }, onSliderStart: function (a, b, c) { e.enableRolls = false; if (!c && c != 0) { e.fromState = e.slider.children("a").css("left") } else { e.overrider = c; e.fromState = e.slider.children("a").css("left") } }, onSliderStop: function (a, f, g) { e.enableRolls = true; if (!g && g !== 0) { value = f.value; b = parseFloat(e.slider.children("a").css("left")); c = Math.round(parseInt(value * -1) / 235) * 235; d = Math.abs(Math.round(c / e.itemsWidth * 100 * 1e4) / 1e4); e.scroller.stop().animate({ left: c }, 150, "easeInOutQuad"); e.slider.children("a").stop().animate({ left: d + "%" }, 100, "easeInOutQuad", function () { e.fromState = e.slider.children("a").css("left"); e.currentIndex = c * -1 / 235; if (e.currentIndex + 1 < e.scrollItems.length - 3) { e.nextButton.css("display", "block").stop().animate({ opacity: 1 }, 400, "easeInOutQuad", function () { e.nextButton.removeClass("disabled") }) } else { e.nextButton.stop().animate({ opacity: 0 }, 100, "easeInOutQuad", function () { e.nextButton.addClass("disabled") }) } if (e.currentIndex > 0) { e.prevButton.css("display", "block").stop().animate({ opacity: 1 }, 400, "easeInOutQuad", function () { e.prevButton.removeClass("disabled") }) } else { e.prevButton.stop().animate({ opacity: 0 }, 100, "easeInOutQuad", function () { e.prevButton.addClass("disabled") }) } }) } else { value = g; c = Math.round(parseInt(value * -1)) * 235; e.scroller.stop().animate({ left: c }, 500, "easeInOutQuad"); d = Math.abs(Math.round(c / e.itemsWidth * 100 * 1e4) / 1e4) } }, prev: function () { if (e.currentIndex > 0) { e.currentIndex--; e.slider.trigger("slidestart", [this, e.currentIndex]); e.slider.slider("value", e.currentIndex); e.slider.trigger("slidestop", [this, e.currentIndex]); if (e.currentIndex + 1 < e.scrollItems.length - 3) { e.nextButton.css("display", "block").stop().animate({ opacity: 1 }, 400, "easeInOutQuad", function () { e.nextButton.removeClass("disabled") }) } else { e.nextButton.stop().animate({ opacity: 0 }, 100, "easeInOutQuad", function () { e.nextButton.addClass("disabled") }) } if (e.currentIndex > 0) { e.prevButton.css("display", "block").stop().animate({ opacity: 1 }, 400, "easeInOutQuad", function () { e.prevButton.removeClass("disabled") }) } else { e.prevButton.stop().animate({ opacity: 0 }, 100, "easeInOutQuad", function () { e.prevButton.addClass("disabled") }) } } return false }, next: function () { if (e.currentIndex + 1 < e.scrollItems.length - 3) { e.currentIndex++; e.slider.trigger("slidestart", [this, e.currentIndex]); e.slider.slider("value", e.currentIndex); e.slider.trigger("slidestop", [this, e.currentIndex]); if (e.currentIndex + 1 < e.scrollItems.length - 3) { e.nextButton.css("display", "block").stop().animate({ opacity: 1 }, 400, "easeInOutQuad", function () { e.nextButton.removeClass("disabled") }) } else { e.nextButton.stop().animate({ opacity: 0 }, 100, "easeInOutQuad", function () { e.nextButton.addClass("disabled") }) } if (e.currentIndex > 0) { e.prevButton.css("display", "block").stop().animate({ opacity: 1 }, 400, "easeInOutQuad", function () { e.prevButton.removeClass("disabled") }) } else { e.prevButton.stop().animate({ opacity: 0 }, 100, "easeInOutQuad", function () { e.prevButton.addClass("disabled") }) } } return false }, addRollovers: function () { e.scrollItems.each(function () { var a = $j(this); a.find("a").append("<span></span>").find("span").css("opacity", 0).end().hover(function () { if (e.enableRolls == true) { a.find("img").stop().animate({ width: "232px", height: "auto", marginLeft: "-116px" }, 100).end().find("span").stop().animate({ opacity: 1 }, 100, "easeInOutQuad") } }, function () { if (e.enableRolls == true) { a.find("img").stop().animate({ width: "220px", height: "auto", marginLeft: "-110px" }, 100).end().find("span").stop().animate({ opacity: 0 }, 300, "easeInOutQuad") } }) }) } }; e.init(); return e } $j("#seriesProductScroller").each(function () { var b = new a($j(this)) }); } function speakersSlider() { function a(a) { var b = 0; var c = 0; var d = 0; var e = null; var f = { init: function () { f.viewer = $j(".viewer", a); f.scroller = $j("ul", f.viewer); f.slider = $j("#slider", a); f.scrollItems = $j("li", f.viewer); f.itemsWidth = f.scrollItems.length * parseInt(f.scrollItems.css("width")) - parseInt(f.viewer.css("width")); f.enableRolls = true; f.addControls(); if (f.scrollItems.length > 4) f.addScrollFunction(); f.addRollovers(); f.currentIndex = 0; f.oldValue = 0; f.fromState = null; f.overrider = false; f.prevButton = $j(".viewer_prev > a", a); f.nextButton = $j(".viewer_next > a", a); f.prevButton.bind("click", f.prev); f.nextButton.bind("click", f.next); f.slider.addTouch(); f.viewer.swipe({ threshold: { x: 75, y: 25 }, swipeLeft: function () { f.next() }, swipeRight: function () { f.prev() } }) }, addControls: function () { f.viewer.append("<span class='overlayLeft'></span><span class='overlayRight'></span>"); f.scroller.css("width", f.scrollItems.length * parseInt(f.scrollItems.css("width"))) }, addScrollFunction: function () { a.addClass("scrollTime"); f.slider.slider({ startValue: 0, min: 0, max: f.itemsWidth, animate: true, slide: function (a, b) { var c = b.value; f.scroller.css("left", c * -1); f.currentIndex = c / f.itemsWidth }, value: 0 }).bind("slidestart", f.onSliderStart).bind("slidestop", f.onSliderStop).bind("slidechange", f.onSliderChange) }, onSliderChange: function (a, b) { if (f.overrider) { value = f.overrider; c = Math.round(parseInt(value * -1)) * 235; d = Math.abs(Math.round(c / f.itemsWidth * 100 * 1e4) / 1e4); f.slider.children("a").stop(true).css("left", f.fromState).animate({ left: d + "%" }, 500, "easeInOutQuad", function () { f.fromState = f.slider.children("a").css("left"); f.oldValue = f.fromState }) } f.overrider = false }, onSliderStart: function (a, b, c) { f.enableRolls = false; if (!c && c !== 0) { f.fromState = f.slider.children("a").css("left") } else { f.overrider = c; f.fromState = f.slider.children("a").css("left") } e = f.scroller.children(".selected"); e.find("strong").stop().animate({ bottom: -34 }, 300, "easeInOutQuad").end().find("span,em").stop().animate({ opacity: 0 }, 300, "easeInOutQuad").end().removeClass("selected") }, onSliderStop: function (a, e, g) { f.enableRolls = true; if (!g && g !== 0) { value = e.value; b = parseFloat(f.slider.children("a").css("left")); c = Math.round(parseInt(value * -1) / 235) * 235; d = Math.abs(Math.round(c / f.itemsWidth * 100 * 1e4) / 1e4); f.scroller.stop().animate({ left: c }, 150, "easeInOutQuad"); f.slider.children("a").stop().animate({ left: d + "%" }, 100, "easeInOutQuad", function () { f.fromState = f.slider.children("a").css("left"); f.currentIndex = c * -1 / 235; f.testDisabled() }) } else { value = g; c = Math.round(parseInt(value * -1)) * 235; f.scroller.stop().animate({ left: c }, 500, "easeInOutQuad") } }, prev: function () { if (f.currentIndex > 0) { f.currentIndex--; if (f.currentIndex < 0) f.currentIndex = 0; f.slider.trigger("slidestart", [this, f.currentIndex]); f.slider.slider("value", f.currentIndex); f.slider.trigger("slidestop", [this, f.currentIndex]); if (f.currentIndex + 1 < f.scrollItems.length - 3) { f.nextButton.css("display", "block").stop().animate({ opacity: 1 }, 400, "easeInOutQuad", function () { f.nextButton.removeClass("disabled") }) } else { f.nextButton.stop().animate({ opacity: 0 }, 100, "easeInOutQuad", function () { f.nextButton.addClass("disabled") }) } if (f.currentIndex > 0) { f.prevButton.css("display", "block").stop().animate({ opacity: 1 }, 100, "easeInOutQuad", function () { f.prevButton.removeClass("disabled") }) } else { f.prevButton.stop().animate({ opacity: 0 }, 100, "easeInOutQuad", function () { f.prevButton.addClass("disabled") }) } } return false }, next: function () { if (f.currentIndex + 1 < f.scrollItems.length - 3) { f.currentIndex++; f.slider.trigger("slidestart", [this, f.currentIndex]); f.slider.slider("value", f.currentIndex); f.slider.trigger("slidestop", [this, f.currentIndex]); if (f.currentIndex + 1 < f.scrollItems.length - 3) { f.nextButton.css("display", "block").stop().animate({ opacity: 1 }, 100, "easeInOutQuad", function () { f.nextButton.removeClass("disabled") }) } else { f.nextButton.stop().animate({ opacity: 0 }, 100, "easeInOutQuad", function () { f.nextButton.addClass("disabled") }) } if (f.currentIndex > 0) { f.prevButton.css("display", "block").stop().animate({ opacity: 1 }, 400, "easeInOutQuad", function () { f.prevButton.removeClass("disabled") }) } else { f.prevButton.stop().animate({ opacity: 0 }, 100, "easeInOutQuad", function () { f.prevButton.addClass("disabled") }) } } return false }, addRollovers: function () { f.scrollItems.each(function () { var a = $j(this); a.find("strong").prepend("<em></em>"); if (!a.hasClass("selected")) { a.find("span,em").css({ display: "block", opacity: 0 }) } else { a.find("span,em").css({ display: "block", opacity: .8 }) } a.hover(function () { if (!a.hasClass("selected") && f.enableRolls == true) { e = a.parent().find(".selected"); e.find("strong").stop().animate({ bottom: -34 }, 300, "easeInOutQuad").end().find("span,em").stop().animate({ opacity: 0 }, 300, "easeInOutQuad").end().removeClass("selected"); a.find("span,em").stop().animate({ opacity: .8 }, 200, "easeInOutQuad").end().find("strong").stop().animate({ bottom: 0 }, 300, "easeInOutQuad").end().addClass("selected") } }, function () { }) }) }, testDisabled: function () { if (f.currentIndex + 1 < f.scrollItems.length - 3) { f.nextButton.css("display", "block").stop().animate({ opacity: 1 }, 400, "easeInOutQuad", function () { f.nextButton.removeClass("disabled") }) } else { f.nextButton.stop().animate({ opacity: 0 }, 100, "easeInOutQuad", function () { f.nextButton.addClass("disabled") }) } if (f.currentIndex > 0) { f.prevButton.css("display", "block").stop().animate({ opacity: 1 }, 400, "easeInOutQuad", function () { f.prevButton.removeClass("disabled") }) } else { f.prevButton.stop().animate({ opacity: 0 }, 100, "easeInOutQuad", function () { f.prevButton.addClass("disabled") }) } } }; f.init(); return f } $j("#seriesScroller").each(function () { var b = new a($j(this)) }); } function hotSpotLinks() { function a(a) { var b = { init: function () { b.link = $j(a); b.href = b.link.attr("href"); b.title = b.link.attr("title"); b.col = $j(a).parents(".col"); b.col2 = $j(a).parents(".col2"); b.monitor() }, monitor: function () { b.link.css("display", "none"); b.col.attr("title", b.title); b.col.addClass("linkCol").click(function () { window.location = b.href }); b.col2.attr("title", b.title); b.col2.addClass("linkCol").click(function () { window.location = b.href }) } }; b.init(); return b } $j(".row").find(".hotLink").each(function () { var b = new a($j(this)) }); } function inputValueReplace() { function a(a) { var b = { init: function () { b.field = $j(a); b.isSet = false; b.defaultValue = b.field.val(); b.monitor() }, monitor: function () { b.field.focus(function () { if ($j(this)[0].value == b.defaultValue) { $j(this)[0].value = "" } }); b.field.blur(function () { if ($j(this)[0].value == "") { $j(this)[0].value = b.defaultValue } }) } }; b.init(); return b } $j("input.valueReplace").each(function () { var b = new a($j(this)) }); } function navigation() { function a(a) { $j("#countrySelector").hover(function () { $j(this).find("#selectList").css({ display: "block", opacity: 0 }).stop().animate({ opacity: 1 }, 100, "easeInOutQuad") }, function () { $j(this).find("#selectList").stop().animate({ opacity: 0 }, 300, "easeInOutQuad", function () { $j(this).css({ display: "none" }) }) }); var b = { init: function () { b.nav = $j(a); b.nav.children("ul").hover(function () { if (typeof videoPlayer !== "undefined" && videoPlayer !== null) videoPlayer.pause() }, function () { if (typeof videoPlayer !== "undefined" && videoPlayer !== null) { if (!videoPlayer.isPlaying()) videoPlayer.play() } }); b.overNav = false; b.subMenus() }, subMenus: function () { b.nav.find(".siteNavSub").each(function () { $j(this).find("> ul > li").each(function (a) { if (a > 5) { var b = $j(this); b.addClass("bottomOver").find(".info").prependTo(b.find(".siteNavSubSub > div")) } }) }); b.nav.find(".cLink").each(function () { function d() { a.sub.css("z-index", 10).stop().fadeTo(400, 0, function () { a.sub.css("display", "none") }) } function c() { a.sub.css("z-index", 1e3).stop().fadeTo(150, 1) } var a = {}; a.li = $j(this); a.sub = a.li.children(".siteNavSubSub"); if (isiPad) { a.li.click(function () { c() }) } var b; a.li.mouseenter(function () { clearTimeout(b); b = setTimeout(c, 300) }); a.li.mouseleave(function () { b = setTimeout(d, 500) }); }) } }; if ($j(".homePage").html()) b.init(); if ($j(".greyTheme").html()) b.init(); if ($j(".blackTheme").html()) b.init(); if ($j(".whiteTheme").html()) b.init(); if ($j(".miniTheatreTheme").html()) b.init() } $j("#siteNav").each(function () { var b = new a($j(this)) }); } function animateAnchors() { function b(b) { var c = window.location.hash; var d = c.substring(1); var e = $j("a[x-name=" + d + "]"); if (e.length == 0) return; var f = isiPad ? a(e[0]) : e.offset(); if (!f) return; if (b === true) { $j("html, body").scrollTop(0) } if (isiPad) { $j("html, body").scrollTop(f.top) } else { $j("html, body").animate({ scrollTop: f.top }, 500) } } function a(a) { var b = 0; var c = 0; for (obj = a; obj != null; obj = obj.offsetParent) { b += obj.offsetLeft; c += obj.offsetTop } return { top: c, left: b} } $j("a.substituteName").each(function () { $j(this).attr("x-name", $j(this).attr("name")); $j(this).removeAttr("name") }); b(true); $j(window).bind("hashchange", b) } function init() { $j("body").addClass("js"); if ($j.browser.msie) { $j("body").addClass("ie") } navigation(); animateAnchors(); hotSpotLinks(); speakersSlider(); productListSlider(); scrollerSetUp(); showOverlay(); starRating(); galleryImages(); tabContent(); inputValueReplace(); slideshow(); var a = "ontouchstart" in document; $j("html").addClass(a ? "touch" : "nontouch"); $j(document).bind("touchend", function () { if (isiPad && $j(".siteNavSub").is(":visible")) { $j("#productVideoHolder").hide() } else { if ($j("#CloseWelcomeOverlay").length <= 0) { $j("#productVideoHolder").show() } } }) } var $j = jQuery.noConflict(); var isiPad = navigator.userAgent.match(/iPad/i) != null; $j(document).ready(function () { init() }); jQuery.preloadImages = function () { var a = typeof arguments[0] == "object" ? arguments[0] : arguments; for (var b = a.length - 1; b >= 0; b--) { jQuery("<img>").attr("src", a[b]) } }; $j.easing.quad = function (a, b, c, d, e) { if ((b /= e / 2) < 1) return d / 2 * b * b + c; return -d / 2 * (--b * (b - 2) - 1) + c }; $j.easing.easeInOutQuad = function (a, b, c, d, e) { if ((b /= e / 2) < 1) return d / 2 * b * b + c; return -d / 2 * (--b * (b - 2) - 1) + c }
