﻿(function (a) { a.fn.extend({ infiniteCarousel: function (b) { var c = { transitionSpeed: 800, displayTime: 4e3, textholderHeight: .25, displayProgressBar: true, displayThumbnails: true, displayThumbnailNumbers: true, displayThumbnailBackground: true, thumbnailWidth: "20px", thumbnailHeight: "20px", thumbnailFontSize: ".7em", easeLeft: "linear", easeRight: "linear", imagePath: "images/", inView: 1, padding: "0px", advance: 1, showControls: true, autoHideControls: false, autoHideCaptions: false, autoStart: true, prevNextInternal: true, enableKeyboardNav: true, onSlideStart: function () { }, onSlideEnd: function () { }, onPauseClick: function () { } }; var b = a.extend(c, b); return this.each(function () { function I(b) { if (b == null) b = d.advance; F(); if (d.displayThumbnails) { for (i = 1; i <= b; i++) { s.unshift(t.pop()); t.unshift(s.pop()) } } a("li:gt(" + (g - (b + 1)) + ")", e).clone(true).insertBefore(a("li:first", e)); d.onSlideStart.call(this, s, "right"); a("ul", e).css("left", -(j * (b + 1)) - parseInt(d.padding) * (b + 1) * 2).animate({ left: -j - parseInt(d.padding) * 2 }, d.transitionSpeed, d.easeRight, function () { a("li:gt(" + (g - 1) + ")", e).remove(); G() }) } function H(b) { if (b == null) b = d.advance; F(); if (d.displayThumbnails) { for (i = 1; i <= b; i++) { s.push(t.shift()); t.push(s.shift()) } } if (d.displayTime == 0) { clearInterval(J) } a("li:lt(" + b + ")", e).clone(true).insertAfter(a("li:last", e)); d.onSlideStart.call(this, s, "left"); a("ul", e).animate({ left: -j * (b + 1) - parseInt(d.padding) * (b + 1) * 2 }, d.transitionSpeed, d.easeLeft, function () { a("li:lt(" + b + ")", e).remove(); a(this).css({ left: -j - parseInt(d.padding) * 2 }); if (d.displayProgressBar && f) k(); G(); if (d.displayTime == 0) { H() } }) } function G() { if (d.showControls && d.prevNextInternal) { a("#play_pause_btn" + c).fadeIn(200); a("#btn_lt" + c).fadeIn(200); a("#btn_rt" + c).fadeIn(200) } B(); if (d.autoHideCaptions && y) z(); if (d.displayThumbnails) for (i = 0; i < s.length; i++) a("#thumb" + c + "_" + s[i]).css({ "border-color": "#ff0000" }).animate({ opacity: 1 }, 500); if (!d.autoHideCaptions) for (i = 1; i <= d.inView; i++) o(a("li:eq(" + i + ") p", e).html(), i); if (d.displayThumbnails) a("#thumbs" + c + " div").unbind("click").bind("click", r).css({ cursor: "pointer" }); ary = []; for (x = 1; x <= d.inView; x++) { ary.push(a("img:eq(" + x + ")", e).attr("src")) } d.onSlideEnd.call(this, ary) } function F() { q(); if (d.showControls && d.prevNextInternal) { a("#play_pause_btn" + c).fadeOut(200); a("#btn_lt" + c).fadeOut(200); a("#btn_rt" + c).fadeOut(200) } if (d.displayThumbnails) for (i = 1; i <= g; i++) a("#thumb" + c + "_" + i).css({ "border-color": "#ccc" }).animate({ opacity: .65 }, 500) } function E() { a("#play_pause_btn" + c).unbind("click"); if (!f) { setTimeout(function () { a("#play_pause_btn" + c).css("background-position", "0 0") }, d.transitionSpeed - 1); f = 1; H(); J = setInterval(function () { H() }, d.displayTime + d.transitionSpeed); setTimeout(function () { a("#play_pause_btn" + c).bind("click", function () { D() }) }, d.transitionSpeed) } } function D() { a("#play_pause_btn" + c).unbind("click"); if (f) { d.onPauseClick.call(this); a("#play_pause_btn" + c).fadeTo(250, 0, function () { a(this).css({ "background-position": "0 -16px", opacity: ".5" }) }).animate({ opacity: .5 }, 250); f = 0; p(); a("#progress" + c).stop().fadeOut(); clearTimeout(J); setTimeout(function () { a("#play_pause_btn" + c).bind("click", function () { E() }) }, d.transitionSpeed) } } function C(b) { d.onPauseClick.call(this); a("#btn_rt" + c).unbind("click"); a("#btn_lt" + c).unbind("click"); setTimeout(function () { a("#play_pause_btn" + c).css("background-position", "0 -16px") }, d.transitionSpeed - 1); f = 0; a("#progress" + c).stop().fadeOut(); u = "pause"; clearTimeout(J); b == "prev" ? I() : H(); a("#play_pause_btn" + c).unbind("click"); setTimeout(function () { a("#play_pause_btn" + c).bind("click", function () { E() }); a("#btn_rt" + c).bind("click", function () { C("next") }); a("#btn_lt" + c).bind("click", function () { C("prev") }) }, d.transitionSpeed) } function B() { if (d.enableKeyboardNav) { a(document).keydown(function (b) { if (b.keyCode == 39) { C("next"); a(document).unbind("keydown") } if (b.keyCode == 37) { C("prev"); a(document).unbind("keydown") } if (b.keyCode == 80 || b.keyCode == 111) D(); if (b.keyCode == 83 || b.keyCode == 115) { E(); a(document).unbind("keydown") } }) } } function q() { a(".textholder", e).stop().animate({ marginBottom: -h * d.textholderHeight - l - 1 + "px" }, d.transitionSpeed) } function p() { if (!f) { a(".minmax", e).fadeIn(250); a(".close", e).fadeIn(250) } } function o(b, d) { if (f) { a("#minmax" + c + "_" + d).hide(); a("#close" + c + "_" + d).hide() } if (b != null) { a("#textholder" + c + "_" + d + " span").html(b); a("#textholder" + c + "_" + d).stop().animate({ marginBottom: "0px" }, 500); a("#minmax" + c + "_" + d).css("background-position", "0 -8px"); p() } } function k(b) { b = b == null ? d.displayTime : b; a("#progress" + c).width("100%").height(5); a("#progress" + c).animate({ width: 0 }, b) } var c = Math.round(Math.random() * 1e8); var d = b; var e = a(this); var f = d.autoStart; var g = a("img", e).length; var h = a("img:first", e).height(); var j = a("img:first", e).width(); if (d.inView > g - 1) d.inView = g - 1; a("p", e).hide(); a(e).css({ position: "relative", overflow: "hidden" }).width(j * d.inView + d.inView * parseInt(d.padding) * 2).height(h + parseInt(d.padding) * 2); a("ul", e).css({ "list-style": "none", margin: "0", padding: "0", position: "relative" }).width(j * g); a("li", e).css({ display: "inline", "float": "left", padding: d.padding }); a("li:last", e).prependTo(a("ul", e)); a("ul", e).css("left", -j - parseInt(d.padding) * 2 + "px").width(9999); if (d.displayProgressBar) { a(e).append('<div id="progress' + c + '" class="ic-progress-bar" style="position:absolute;bottom:0;background:#bbb;left:0;z-index:1"></div>'); a("#progress" + c).width("100%").height(5).css("opacity", ".6") } var l = parseInt(a(e).css("border-bottom-width")) + parseInt(a(e).css("border-top-width")); if (isNaN(l)) l = 0; var m = parseInt(a(e).css("padding-left")); for (i = 1; i <= d.inView; i++) { a(e).append('<div id="textholder' + c + "_" + i + '" class="textholder" style="position:absolute;width:' + j + "px;bottom:0px;margin-bottom:" + -(h * d.textholderHeight + l) + 'px;"><span></span></div>'); a("#textholder" + c + "_" + i).css({ left: (i - 1) * (j + parseInt(d.padding) * 2), "margin-left": parseInt(d.padding) + m, "margin-right": d.padding }); a("#textholder" + c + "_" + i).height(h * d.textholderHeight).css({ backgroundColor: "#FFF", opacity: "0.9" }); html = '<div class="minmax" id="minmax' + c + "_" + i + '" style="width:8px;height:8px;position:absolute;top:1px;right:10px;cursor:pointer;background:url(' + d.imagePath + 'caption.gif) no-repeat 0 -8px"></div>'; html += '<div class="close" id="close' + c + "_" + i + '" style="width:8px;height:8px;position:absolute;top:1px;right:1px;cursor:pointer;background:url(' + d.imagePath + 'caption.gif) no-repeat 0 0"></div>'; a("#textholder" + c + "_" + i).append(html); a("#minmax" + c + "_" + i).hide(); a("#close" + c + "_" + i).hide(); if (!d.autoHideCaptions) o(a("li:eq(" + i + ") p", e).html(), i) } var n = parseInt(a("#textholder" + c + "_1").css("padding-left")) + parseInt(a("#textholder" + c + "_1").css("padding-right")); if (n > 0) a(".textholder", e).width(j - n); a(".close", e).each(function (b) { a(this).click(function () { a("#textholder" + c + "_" + (b + 1)).animate({ marginBottom: -h * d.textholderHeight - l - 1 + "px" }, 500) }) }); a(".minmax", e).each(function (b) { a(this).click(function () { if (parseInt(a("#textholder" + c + "_" + (b + 1)).css("margin-bottom")) == 0) { a("#textholder" + c + "_" + (b + 1)).animate({ marginBottom: -h * d.textholderHeight - l + 12 + "px" }, 500, function () { a("#minmax" + c + "_" + (b + 1)).css("background-position", "0 -16px") }) } else { a("#textholder" + c + "_" + (b + 1)).animate({ marginBottom: "0px" }, 500, function () { a("#minmax" + c + "_" + (b + 1)).css("background-position", "0 -8px") }) } }) }); if (d.displayThumbnails) { function r(b) { target_num = this.id.split("_"); if (s[0] != target_num[1]) { u = "pause"; a("#progress" + c).stop().fadeOut(); clearTimeout(J); a("#thumbs" + c + " div").css({ cursor: "default" }).unbind("click"); f = 0; setTimeout(function () { a("#play_pause_btn" + c).css("background-position", "0 -16px") }, d.transitionSpeed); a("#play_pause_btn" + c).unbind("click").bind("click", function () { E() }) } if (target_num[1] > s[0]) { diff = target_num[1] - s[0]; H(diff) } if (target_num[1] < s[0]) { diff = s[0] - target_num[1]; I(diff) } } var s = []; var t = []; a(e).after('<div id="thumbs' + c + '" style="position:relative;overflow:auto;clear:left;text-align:left;padding-top:5px;"></div>'); for (i = 0; i <= g - 1; i++) { thumb = a("img:eq(" + (i + 1) + ")", e).attr("src"); a("#thumbs" + c).append('<div class="thumb" id="thumb' + c + "_" + (i + 1) + '" style="cursor:pointer;background-image:url(' + thumb + ");display:inline;float:left;width:" + d.thumbnailWidth + ";height:" + d.thumbnailHeight + ";line-height:" + d.thumbnailHeight + ";padding:0;overflow:hidden;text-align:center;border:2px solid #ccc;margin-right:4px;font-size:" + d.thumbnailFontSize + ';font-family:Arial;color:#000;text-shadow:0 0 3px #fff">' + (i + 1) + "</div>"); if (i <= d.inView) a("#thumb" + c + "_" + i).css({ "border-color": "#ff0000" }); t.push(i + 1) } for (i = 1; i <= d.inView; i++) s.push(t.shift()); thumb = a("img:first", e).attr("src"); a("#thumb" + c + "_" + g).css({ "background-image": "url(" + thumb + ")" }); a("#thumbs" + c + " div.thumb:not(:first)").css({ opacity: .65 }); a("#thumbs" + c + " div.thumb").hover(function () { a(this).animate({ opacity: 1 }, 150) }, function () { if (s[0] != this.id.split("_")[1]) a(this).animate({ opacity: .65 }, 250) }); a("#thumbs" + c + " div").bind("click", r); if (!d.displayThumbnailNumbers) a("#thumbs" + c + " div").text(""); if (!d.displayThumbnailBackground) a("#thumbs" + c + " div").css({ "background-image": "none" }) } if (d.showControls) { html = '<div id="play_pause_btn' + c + '" style="cursor:pointer;position:absolute;top:3px;right:3px;border:none;width:16px;height:16px;background:url(' + d.imagePath + 'playpause.gif) no-repeat 0 0"></div>'; a(e).append(html); var u = "play"; a("#play_pause_btn" + c).css("opacity", .5).hover(function () { a(this).animate({ opacity: "1" }, 250) }, function () { a(this).animate({ opacity: ".5" }, 250) }); a("#play_pause_btn" + c).click(function () { u = u == "play" ? "pause" : "play"; u == "play" ? E() : D() }); if (!d.prevNextInternal) { wrapID = a(e).attr("id") + "Wrapper"; a(e).wrap('<div id="' + wrapID + '"></div>').css("margin", "0 auto"); a("#" + wrapID).css("position", "relative").width(a(e).width() + 40 + parseInt(a(e).css("padding-left")) + parseInt(a(e).css("padding-right"))) } arrowsTop = h / 2 - 15 + parseInt(d.padding); html = '<div id="btn_rt' + c + '" style="position:absolute;right:2px;top:' + arrowsTop + "px;cursor:pointer;border:none;width:13px;height:30px;background:url(" + d.imagePath + 'leftright.gif) no-repeat 0 0"></div>'; html += '<div id="btn_lt' + c + '" style="position:absolute;left:2px;top:' + arrowsTop + "px;cursor:pointer;border:none;width:13px;height:30px;background:url(" + d.imagePath + 'leftright.gif) no-repeat -13px 0"></div>'; d.prevNextInternal ? a(e).append(html) : a("#" + wrapID).append(html); a("#btn_rt" + c).css("opacity", 1).click(function () { C("next") }).hover(function () { a(this).animate({ opacity: "1" }, 250) }, function () { a(this).animate({ opacity: "1" }, 250) }); a("#btn_lt" + c).css("opacity", 1).click(function () { C("prev") }).hover(function () { a(this).animate({ opacity: "1" }, 250) }, function () { a(this).animate({ opacity: "1" }, 250) }); if (d.autoHideControls && d.prevNextInternal) { function v() { a("#play_pause_btn" + c).stop().animate({ top: "3px", right: "3px" }, 250); a("#btn_rt" + c).stop().animate({ top: arrowsTop + "px", right: "2px" }, 250); a("#btn_lt" + c).stop().animate({ top: arrowsTop + "px", left: "2px" }, 250) } function w() { a("#play_pause_btn" + c).stop().animate({ top: -16 - l + "px", right: -16 - l + "px" }, 250); a("#btn_rt" + c).stop().animate({ right: "-16px" }, 250); a("#btn_lt" + c).stop().animate({ left: "-16px" }, 250) } a(e).hover(v, w); w() } if (d.autoHideCaptions) { var y; function z() { y = true; for (i = 1; i <= d.inView; i++) o(a("li:eq(" + i + ") p", e).html(), i) } function A() { y = false; q() } a(e).hover(z, A); q() } } if (f) { var J = setInterval(function () { H() }, d.displayTime + d.transitionSpeed); if (d.displayProgressBar) k(d.displayTime + d.transitionSpeed) } else { u = "pause"; a("#play_pause_btn" + c).css({ "background-position": "0 -16px" }) } B() }) } }) })(jQuery); $(document).ready(function () { $(".qitem").hover(function () { $(this).find("img").fadeOut("fast") }, function () { $(this).find("img").fadeIn("slow") }).click(function () { window.location = $(this).find("a").attr("href") }) }); jQuery.easing["jswing"] = jQuery.easing["swing"]; jQuery.extend(jQuery.easing, { def: "easeOutQuad", swing: function (a, b, c, d, e) { return jQuery.easing[jQuery.easing.def](a, b, c, d, e) }, easeInQuad: function (a, b, c, d, e) { return d * (b /= e) * b + c }, easeOutQuad: function (a, b, c, d, e) { return -d * (b /= e) * (b - 2) + c }, 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 }, easeInCubic: function (a, b, c, d, e) { return d * (b /= e) * b * b + c }, easeOutCubic: function (a, b, c, d, e) { return d * ((b = b / e - 1) * b * b + 1) + c }, easeInOutCubic: function (a, b, c, d, e) { if ((b /= e / 2) < 1) return d / 2 * b * b * b + c; return d / 2 * ((b -= 2) * b * b + 2) + c }, easeInQuart: function (a, b, c, d, e) { return d * (b /= e) * b * b * b + c }, easeOutQuart: function (a, b, c, d, e) { return -d * ((b = b / e - 1) * b * b * b - 1) + c }, easeInOutQuart: function (a, b, c, d, e) { if ((b /= e / 2) < 1) return d / 2 * b * b * b * b + c; return -d / 2 * ((b -= 2) * b * b * b - 2) + c }, easeInQuint: function (a, b, c, d, e) { return d * (b /= e) * b * b * b * b + c }, easeOutQuint: function (a, b, c, d, e) { return d * ((b = b / e - 1) * b * b * b * b + 1) + c }, easeInOutQuint: function (a, b, c, d, e) { if ((b /= e / 2) < 1) return d / 2 * b * b * b * b * b + c; return d / 2 * ((b -= 2) * b * b * b * b + 2) + c }, easeInSine: function (a, b, c, d, e) { return -d * Math.cos(b / e * (Math.PI / 2)) + d + c }, easeOutSine: function (a, b, c, d, e) { return d * Math.sin(b / e * (Math.PI / 2)) + c }, easeInOutSine: function (a, b, c, d, e) { return -d / 2 * (Math.cos(Math.PI * b / e) - 1) + c }, easeInExpo: function (a, b, c, d, e) { return b == 0 ? c : d * Math.pow(2, 10 * (b / e - 1)) + c }, easeOutExpo: function (a, b, c, d, e) { return b == e ? c + d : d * (-Math.pow(2, -10 * b / e) + 1) + c }, easeInOutExpo: function (a, b, c, d, e) { if (b == 0) return c; if (b == e) return c + d; if ((b /= e / 2) < 1) return d / 2 * Math.pow(2, 10 * (b - 1)) + c; return d / 2 * (-Math.pow(2, -10 * --b) + 2) + c }, easeInCirc: function (a, b, c, d, e) { return -d * (Math.sqrt(1 - (b /= e) * b) - 1) + c }, easeOutCirc: function (a, b, c, d, e) { return d * Math.sqrt(1 - (b = b / e - 1) * b) + c }, easeInOutCirc: function (a, b, c, d, e) { if ((b /= e / 2) < 1) return -d / 2 * (Math.sqrt(1 - b * b) - 1) + c; return d / 2 * (Math.sqrt(1 - (b -= 2) * b) + 1) + c }, easeInElastic: function (a, b, c, d, e) { var f = 1.70158; var g = 0; var h = d; if (b == 0) return c; if ((b /= e) == 1) return c + d; if (!g) g = e * .3; if (h < Math.abs(d)) { h = d; var f = g / 4 } else var f = g / (2 * Math.PI) * Math.asin(d / h); return -(h * Math.pow(2, 10 * (b -= 1)) * Math.sin((b * e - f) * 2 * Math.PI / g)) + c }, easeOutElastic: function (a, b, c, d, e) { var f = 1.70158; var g = 0; var h = d; if (b == 0) return c; if ((b /= e) == 1) return c + d; if (!g) g = e * .3; if (h < Math.abs(d)) { h = d; var f = g / 4 } else var f = g / (2 * Math.PI) * Math.asin(d / h); return h * Math.pow(2, -10 * b) * Math.sin((b * e - f) * 2 * Math.PI / g) + d + c }, easeInOutElastic: function (a, b, c, d, e) { var f = 1.70158; var g = 0; var h = d; if (b == 0) return c; if ((b /= e / 2) == 2) return c + d; if (!g) g = e * .3 * 1.5; if (h < Math.abs(d)) { h = d; var f = g / 4 } else var f = g / (2 * Math.PI) * Math.asin(d / h); if (b < 1) return -.5 * h * Math.pow(2, 10 * (b -= 1)) * Math.sin((b * e - f) * 2 * Math.PI / g) + c; return h * Math.pow(2, -10 * (b -= 1)) * Math.sin((b * e - f) * 2 * Math.PI / g) * .5 + d + c }, easeInBack: function (a, b, c, d, e, f) { if (f == undefined) f = 1.70158; return d * (b /= e) * b * ((f + 1) * b - f) + c }, easeOutBack: function (a, b, c, d, e, f) { if (f == undefined) f = 1.70158; return d * ((b = b / e - 1) * b * ((f + 1) * b + f) + 1) + c }, easeInOutBack: function (a, b, c, d, e, f) { if (f == undefined) f = 1.70158; if ((b /= e / 2) < 1) return d / 2 * b * b * (((f *= 1.525) + 1) * b - f) + c; return d / 2 * ((b -= 2) * b * (((f *= 1.525) + 1) * b + f) + 2) + c }, easeInBounce: function (a, b, c, d, e) { return d - jQuery.easing.easeOutBounce(a, e - b, 0, d, e) + c }, easeOutBounce: function (a, b, c, d, e) { if ((b /= e) < 1 / 2.75) { return d * 7.5625 * b * b + c } else if (b < 2 / 2.75) { return d * (7.5625 * (b -= 1.5 / 2.75) * b + .75) + c } else if (b < 2.5 / 2.75) { return d * (7.5625 * (b -= 2.25 / 2.75) * b + .9375) + c } else { return d * (7.5625 * (b -= 2.625 / 2.75) * b + .984375) + c } }, easeInOutBounce: function (a, b, c, d, e) { if (b < e / 2) return jQuery.easing.easeInBounce(a, b * 2, 0, d, e) * .5 + c; return jQuery.easing.easeOutBounce(a, b * 2 - e, 0, d, e) * .5 + d * .5 + c } }); (function (a) { a.fn.orbit = function (b) { var c = { animation: "horizontal-push", animationSpeed: 600, timer: true, advanceSpeed: 4e3, pauseOnHover: false, startClockOnMouseOut: false, startClockOnMouseOutAfter: 1e3, directionalNav: true, captions: true, captionAnimation: "fade", captionAnimationSpeed: 600, bullets: false, bulletThumbs: false, bulletThumbLocation: "", afterSlideChange: function () { } }; var b = a.extend(c, b); return this.each(function () { function J(a) { function j() { k.eq(h).css({ "z-index": 1 }); l(); b.afterSlideChange.call(this) } var h = c, i = a; if (h == i) { return false } if (k.length == "1") { return false } if (!g) { m(); if (a == "next") { c++; if (c == d) { c = 0 } } else if (a == "prev") { c--; if (c < 0) { c = d - 1 } } else { c = a; if (h < c) { i = "next" } else if (h > c) { i = "prev" } } I(); k.eq(h).css({ "z-index": 2 }); if (b.animation == "fade") { k.eq(c).css({ opacity: 0, "z-index": 3 }).animate({ opacity: 1 }, b.animationSpeed, j) } if (b.animation == "horizontal-slide") { if (i == "next") { k.eq(c).css({ left: e, "z-index": 3 }).animate({ left: 0 }, b.animationSpeed, j) } if (i == "prev") { k.eq(c).css({ left: -e, "z-index": 3 }).animate({ left: 0 }, b.animationSpeed, j) } } if (b.animation == "vertical-slide") { if (i == "prev") { k.eq(c).css({ top: f, "z-index": 3 }).animate({ top: 0 }, b.animationSpeed, j) } if (i == "next") { k.eq(c).css({ top: -f, "z-index": 3 }).animate({ top: 0 }, b.animationSpeed, j) } } if (b.animation == "horizontal-push") { if (i == "next") { k.eq(c).css({ left: e, "z-index": 3 }).animate({ left: 0 }, b.animationSpeed, j); k.eq(h).animate({ left: -e }, b.animationSpeed) } if (i == "prev") { k.eq(c).css({ left: -e, "z-index": 3 }).animate({ left: 0 }, b.animationSpeed, j); k.eq(h).animate({ left: e }, b.animationSpeed) } } A() } } function I() { if (!b.bullets) { return false } else { F.children("li").removeClass("active").eq(c).addClass("active") } } function A() { if (!b.captions || b.captions == "false") { return false } else { var d = k.eq(c).data("caption"); _captionHTML = a(d).html(); if (_captionHTML) { z.attr("id", d).html(_captionHTML); if (b.captionAnimation == "none") { z.show() } if (b.captionAnimation == "fade") { z.fadeIn(b.captionAnimationSpeed) } if (b.captionAnimation == "slideOpen") { z.slideDown(b.captionAnimationSpeed) } } else { if (b.captionAnimation == "none") { z.hide() } if (b.captionAnimation == "fade") { z.fadeOut(b.captionAnimationSpeed) } if (b.captionAnimation == "slideOpen") { z.slideUp(b.captionAnimationSpeed) } } } } function o() { if (!b.timer || b.timer == "false") { return false } else { r = false; clearInterval(w); u.addClass("active") } } function n() { if (!b.timer || b.timer == "false") { return false } else if (q.is(":hidden")) { w = setInterval(function (a) { J("next") }, b.advanceSpeed) } else { r = true; u.removeClass("active"); w = setInterval(function (a) { var b = "rotate(" + v + "deg)"; v += 2; s.css({ "-webkit-transform": b, "-moz-transform": b, "-o-transform": b }); if (v > 180) { s.addClass("move"); t.addClass("move") } if (v > 360) { s.removeClass("move"); t.removeClass("move"); v = 0; J("next") } }, b.advanceSpeed / 180) } } function m() { g = true } function l() { g = false } var c = 0, d = 0, e, f, g; var h = a(this).addClass("orbit"), j = h.wrap('<div class="orbit-wrapper" />').parent(); h.add(e).width("1px").height("1px"); var k = h.children("img, a, div"); k.each(function () { var b = a(this), c = b.width(), g = b.height(); if (c > h.width()) { h.add(j).width(c); e = h.width() } if (g > h.height()) { h.add(j).height(g); f = h.height() } d++ }); if (k.length == 1) { b.directionalNav = false; b.timer = false; b.bullets = false } k.eq(c).css({ "z-index": 3 }).fadeIn(function () { k.css({ display: "block" }) }); if (b.timer) { var p = '<div class="timer"><span class="mask"><span class="rotator"></span></span><span class="pause"></span></div>'; j.append(p); var q = a("div.timer"), r; if (q.length != 0) { var s = a("div.timer span.rotator"), t = a("div.timer span.mask"), u = a("div.timer span.pause"), v = 0, w; n(); q.click(function () { if (!r) { n() } else { o() } }); if (b.startClockOnMouseOut) { var x; j.mouseleave(function () { x = setTimeout(function () { if (!r) { n() } }, b.startClockOnMouseOutAfter) }); j.mouseenter(function () { clearTimeout(x) }) } } } if (b.pauseOnHover) { j.mouseenter(function () { o() }) } if (b.captions) { var y = '<div class="orbit-caption"></div>'; j.append(y); var z = j.children(".orbit-caption"); A() } if (b.directionalNav) { if (b.directionalNav == "false") { return false } var B = '<div class="slider-nav"><span class="right">Right</span><span class="left">Left</span></div>'; j.append(B); var C = j.children("div.slider-nav").children("span.left"), D = j.children("div.slider-nav").children("span.right"); C.click(function () { o(); J("prev") }); D.click(function () { o(); J("next") }) } if (b.bullets) { var E = '<ul class="orbit-bullets"></ul>'; j.append(E); var F = a("ul.orbit-bullets"); for (i = 0; i < d; i++) { var G = a("<li>" + (i + 1) + "</li>"); if (b.bulletThumbs) { var H = k.eq(i).data("thumb"); if (H) { var G = a('<li class="has-thumb">' + i + "</li>"); G.css({ background: "url(" + b.bulletThumbLocation + H + ") no-repeat" }) } } a("ul.orbit-bullets").append(G); G.data("index", i); G.click(function () { o(); J(a(this).data("index")) }) } I() } }) } })(jQuery); $(function () { $("#whymti").infiniteCarousel({ displayTime: 3e3, textholderHeight: .4, inView: 1, advance: 1, displayThumbnails: 1, displayThumbnailBackground: 0, displayProgressBar: 0, padding: "5px", easeleft: "left", prevNextInternal: false }); $("div.thumb").parent().css({ margin: "0 auto", width: "300px" }) }); $(window).load(function () { $("#featured").orbit({ captions: true, captionAnimation: "slideOpen", animation: "fade" }) }); $(function () { $("ul.dropdown li").hover(function () { $(this).addClass("hover"); $("ul:first", this).css("visibility", "visible") }, function () { $(this).removeClass("hover"); $("ul:first", this).css("visibility", "hidden") }); $("ul.dropdown li ul li:has(ul)").find("a:first").append(" » ") })
