Advertisement
mindfriction

footer js

Jul 6th, 2012
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
jQuery 56.45 KB | None | 0 0
  1. /*
  2.  * Superfish v1.4.8 - jQuery menu widget
  3.  * Copyright (c) 2008 Joel Birch
  4.  *
  5.  * Dual licensed under the MIT and GPL licenses:
  6.  *  http://www.opensource.org/licenses/mit-license.php
  7.  *  http://www.gnu.org/licenses/gpl.html
  8.  *
  9.  * CHANGELOG: http://users.tpg.com.au/j_birch/plugins/superfish/changelog.txt
  10.  */ (function (a) {
  11.     a.fn.superfish = function (d) {
  12.         var c = a.fn.superfish,
  13.             b = c.c,
  14.             j = a(['<span class="', b.arrowClass, '"> &#187;</span>'].join("")),
  15.             g = function () {
  16.                 var c = a(this),
  17.                     b = h(c);
  18.                 clearTimeout(b.sfTimer);
  19.                 c.showSuperfishUl().siblings().hideSuperfishUl();
  20.             },
  21.             i = function () {
  22.                 var b = a(this),
  23.                     d = h(b),
  24.                     e = c.op;
  25.                 clearTimeout(d.sfTimer);
  26.                 d.sfTimer = setTimeout(function () {
  27.                     e.retainPath = -1 < a.inArray(b[0], e.$path);
  28.                     b.hideSuperfishUl();
  29.                     e.$path.length && 1 > b.parents(["li.", e.hoverClass].join("")).length && g.call(e.$path);
  30.                 }, e.delay);
  31.             },
  32.             h = function (a) {
  33.                 a = a.parents(["ul.", b.menuClass, ":first"].join(""))[0];
  34.                 c.op = c.o[a.serial];
  35.                 return a
  36.             };
  37.         return this.each(function () {
  38.             var k = this.serial = c.o.length,
  39.                 f = a.extend({}, c.defaults, d);
  40.             f.$path = a("li." + f.pathClass, this).slice(0, f.pathLevels).each(function () {
  41.                 a(this).addClass([f.hoverClass, b.bcClass].join(" ")).filter("li:has(ul)").removeClass(f.pathClass)
  42.             });
  43.             c.o[k] = c.op = f;
  44.             a("li:has(ul)", this)[a.fn.hoverIntent && !f.disableHI ? "hoverIntent" : "hover"](g, i).each(function () {
  45.                 f.autoArrows && a(">a:first-child", this).addClass(b.anchorClass).append(j.clone())
  46.             }).not("." + b.bcClass).hideSuperfishUl();
  47.             var e = a("a", this);
  48.             e.each(function (a) {
  49.                 var b = e.eq(a).parents("li");
  50.                 e.eq(a).focus(function () {
  51.                     g.call(b)
  52.                 }).blur(function () {
  53.                     i.call(b)
  54.                 })
  55.             });
  56.             f.onInit.call(this)
  57.         }).each(function () {
  58.             var d = [b.menuClass];
  59.             c.op.dropShadows && !(a.browser.msie && 7 > a.browser.version) && d.push(b.shadowClass);
  60.             a(this).addClass(d.join(" "))
  61.         })
  62.     };
  63.     var b = a.fn.superfish;
  64.     b.o = [];
  65.     b.op = {};
  66.     b.IE7fix = function () {
  67.         var d = b.op;
  68.         a.browser.msie && (6 < a.browser.version && d.dropShadows && void 0 != d.animation.opacity) && this.toggleClass(b.c.shadowClass + "-off")
  69.     };
  70.     b.c = {
  71.         bcClass: "sf-breadcrumb",
  72.         menuClass: "sf-js-enabled",
  73.         anchorClass: "sf-with-ul",
  74.         arrowClass: "sf-sub-indicator",
  75.         shadowClass: "sf-shadow"
  76.     };
  77.     b.defaults = {
  78.         hoverClass: "sfHover",
  79.         pathClass: "overideThisToUse",
  80.         pathLevels: 1,
  81.         delay: 800,
  82.         animation: {
  83.             opacity: "show"
  84.         },
  85.         speed: "normal",
  86.         autoArrows: !0,
  87.         dropShadows: !0,
  88.         disableHI: !1,
  89.         onInit: function () {},
  90.         onBeforeShow: function () {},
  91.         onShow: function () {},
  92.         onHide: function () {}
  93.     };
  94.     a.fn.extend({
  95.         hideSuperfishUl: function () {
  96.             var d = b.op,
  97.                 c = !0 === d.retainPath ? d.$path : "";
  98.             d.retainPath = !1;
  99.             c = a(["li.",
  100.             d.hoverClass].join(""), this).add(this).not(c).removeClass(d.hoverClass).find(">ul").hide().css("visibility", "hidden");
  101.             d.onHide.call(c);
  102.             return this
  103.         },
  104.         showSuperfishUl: function () {
  105.             var a = b.op,
  106.                 c = this.addClass(a.hoverClass).find(">ul:hidden").css("visibility", "visible");
  107.             b.IE7fix.call(c);
  108.             a.onBeforeShow.call(c);
  109.             c.animate(a.animation, a.speed, function () {
  110.                 b.IE7fix.call(c);
  111.                 a.onShow.call(c)
  112.             });
  113.             return this
  114.         }
  115.     })
  116. })(jQuery);
  117.  
  118.  
  119. /* ------------------------------------------------------------------------
  120.     Class: prettyPhoto
  121.     Use: Lightbox clone for jQuery
  122.     Author: Stephane Caron (http://www.no-margin-for-errors.com)
  123.     Version: 3.0.3
  124. ------------------------------------------------------------------------- */
  125. (function (a) {function g(a, g) {
  126.         var a = a.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]"),
  127.             i = RegExp("[\\?&]" + a + "=([^&#]*)").exec(g);
  128.         return null == i ? "" : i[1]
  129.     }
  130.     a.prettyPhoto = {
  131.         version: "3.0.2"
  132.     };
  133.     a.fn.prettyPhoto = function (h) {function s() {
  134.             a(".pp_loaderIcon").hide();
  135.             $ppt.fadeTo(settings.animation_speed, 1);
  136.             projectedTop = scroll_pos.scrollTop + (e / 2 - b.containerHeight / 2);
  137.             0 > projectedTop && (projectedTop = 0);
  138.             $pp_pic_holder.find(".pp_content").animate({
  139.                 height: b.contentHeight,
  140.                 width: b.contentWidth
  141.             }, settings.animation_speed);
  142.             $pp_pic_holder.animate({
  143.                 top: projectedTop,
  144.                 left: d / 2 - b.containerWidth / 2,
  145.                 width: b.containerWidth
  146.             }, settings.animation_speed, function () {
  147.                 $pp_pic_holder.find(".pp_hoverContainer,#fullResImage").height(b.height).width(b.width);
  148.                 $pp_pic_holder.find(".pp_fade").fadeIn(settings.animation_speed);
  149.                 isSet && "image" == m(pp_images[set_position]) ? $pp_pic_holder.find(".pp_hoverContainer").show() : $pp_pic_holder.find(".pp_hoverContainer").hide();
  150.                 b.resized ? a("a.pp_expand,a.pp_contract").show() : a("a.pp_expand,a.pp_contract").hide();
  151.                 settings.autoplay_slideshow && (!j && !n) && a.prettyPhoto.startSlideshow();
  152.                 settings.changepicturecallback();
  153.                 n = !0
  154.             });
  155.             isSet && settings.overlay_gallery && "image" == m(pp_images[set_position]) ? (itemWidth = 57, navWidth = "facebook" == settings.theme ? 58 : 38, itemsPerPage = Math.floor((b.containerWidth - 100 - navWidth) / itemWidth), itemsPerPage = itemsPerPage < pp_images.length ? itemsPerPage : pp_images.length, totalPage = Math.ceil(pp_images.length / itemsPerPage) - 1, 0 == totalPage ? (navWidth = 0, $pp_pic_holder.find(".pp_gallery .pp_arrow_next,.pp_gallery .pp_arrow_previous").hide()) : $pp_pic_holder.find(".pp_gallery .pp_arrow_next,.pp_gallery .pp_arrow_previous").show(), galleryWidth = itemsPerPage * itemWidth + navWidth, $pp_pic_holder.find(".pp_gallery").width(galleryWidth).css("margin-left", - (galleryWidth / 2)), $pp_pic_holder.find(".pp_gallery ul").width(itemsPerPage * itemWidth).find("li.selected").removeClass("selected"), goToPage = Math.ceil((set_position + 1) / itemsPerPage) < totalPage ? Math.ceil((set_position + 1) / itemsPerPage) : totalPage, a.prettyPhoto.changeGalleryPage(goToPage), $pp_pic_holder.find(".pp_gallery ul li:eq(" + set_position + ")").addClass("selected")) : ($pp_pic_holder.find(".pp_content").unbind("mouseenter mouseleave"), $pp_pic_holder.find(".pp_gallery").hide())
  156.         }function i(c) {
  157.             $pp_pic_holder.find("#pp_full_res object,#pp_full_res embed").css("visibility", "hidden");
  158.             $pp_pic_holder.find(".pp_fade").fadeOut(settings.animation_speed, function () {
  159.                 a(".pp_loaderIcon").show();
  160.                 c()
  161.             })
  162.         }function x(c) {
  163.             1 < c ? a(".pp_nav").show() : a(".pp_nav").hide()
  164.         }function f(a, b) {
  165.             resized = !1;
  166.             t(a, b);
  167.             imageWidth = a;
  168.             imageHeight = b;
  169.             if ((k > d || l > e) && doresize && settings.allow_resize && !o) {
  170.                 resized = !0;
  171.                 for (fitting = !1; !fitting;) k > d ? (imageWidth = d - 200, imageHeight = b / a * imageWidth) : l > e ? (imageHeight = e - 200, imageWidth = a / b * imageHeight) : fitting = !0, l = imageHeight, k = imageWidth;
  172.                 t(imageWidth, imageHeight)
  173.             }
  174.             return {
  175.                 width: Math.floor(imageWidth),
  176.                 height: Math.floor(imageHeight),
  177.                 containerHeight: Math.floor(l),
  178.                 containerWidth: Math.floor(k) + 40,
  179.                 contentHeight: Math.floor(p),
  180.                 contentWidth: Math.floor(u),
  181.                 resized: resized
  182.             }
  183.         }function t(c, b) {
  184.             c = parseFloat(c);
  185.             b = parseFloat(b);
  186.             $pp_details = $pp_pic_holder.find(".pp_details");
  187.             $pp_details.width(c);
  188.             detailsHeight = parseFloat($pp_details.css("marginTop")) + parseFloat($pp_details.css("marginBottom"));
  189.             $pp_details = $pp_details.clone().appendTo(a("body")).css({
  190.                 position: "absolute",
  191.                 top: -1E4
  192.             });
  193.             detailsHeight += $pp_details.height();
  194.             detailsHeight = 34 >= detailsHeight ? 36 : detailsHeight;
  195.             a.browser.msie && 7 == a.browser.version && (detailsHeight += 8);
  196.             $pp_details.remove();
  197.             $pp_title = $pp_pic_holder.find(".ppt");
  198.             $pp_title.width(c);
  199.             titleHeight = parseFloat($pp_title.css("marginTop")) + parseFloat($pp_title.css("marginBottom"));
  200.             $pp_title = $pp_title.clone().appendTo(a("body")).css({
  201.                 position: "absolute",
  202.                 top: -1E4
  203.             });
  204.             titleHeight += $pp_title.height();
  205.             $pp_title.remove();
  206.             p = b + detailsHeight;
  207.             u = c;
  208.             l = p + titleHeight + $pp_pic_holder.find(".pp_top").height() + $pp_pic_holder.find(".pp_bottom").height();
  209.             k = c
  210.         }function m(a) {
  211.             return a.match(/youtube\.com\/watch/i) ? "youtube" : a.match(/vimeo\.com/i) ? "vimeo" : a.match(/\b.mov\b/i) ? "quicktime" : a.match(/\b.swf\b/i) ? "flash" : a.match(/\biframe=true\b/i) ? "iframe" : a.match(/\bcustom=true\b/i) ? "custom" : "#" == a.substr(0,
  212.             1) ? "inline" : "image"
  213.         }function q() {
  214.             doresize && "undefined" != typeof $pp_pic_holder && (scroll_pos = v(), contentHeight = $pp_pic_holder.height(), contentwidth = $pp_pic_holder.width(), projectedTop = e / 2 + scroll_pos.scrollTop - contentHeight / 2, 0 > projectedTop && (projectedTop = 0), $pp_pic_holder.css({
  215.                 top: projectedTop,
  216.                 left: d / 2 + scroll_pos.scrollLeft - contentwidth / 2
  217.             }))
  218.         }function v() {
  219.             if (self.pageYOffset) return {
  220.                 scrollTop: self.pageYOffset,
  221.                 scrollLeft: self.pageXOffset
  222.             };
  223.             if (document.documentElement && document.documentElement.scrollTop) return {
  224.                 scrollTop: document.documentElement.scrollTop,
  225.                 scrollLeft: document.documentElement.scrollLeft
  226.             };
  227.             if (document.body) return {
  228.                 scrollTop: document.body.scrollTop,
  229.                 scrollLeft: document.body.scrollLeft
  230.             }
  231.         }function w() {
  232.             a("body").append(settings.markup);
  233.             $pp_pic_holder = a(".pp_pic_holder");
  234.             $ppt = a(".ppt");
  235.             $pp_overlay = a("div.pp_overlay");
  236.             if (isSet && settings.overlay_gallery) {
  237.                 currentGalleryPage = 0;
  238.                 toInject = "";
  239.                 for (var b = 0; b < pp_images.length; b++) classname = pp_images[b].match(/\b(jpg|jpeg|png|gif)\b/gi) ? "" : "default", toInject += "<li class='" + classname + "'><a href='#'><img src='" + pp_images[b] + "' width='50' alt='' /></a></li>";
  240.                 toInject = settings.gallery_markup.replace(/{gallery}/g, toInject);
  241.                 $pp_pic_holder.find("#pp_full_res").after(toInject);
  242.                 $pp_pic_holder.find(".pp_gallery .pp_arrow_next").click(function () {
  243.                     a.prettyPhoto.changeGalleryPage("next");
  244.                     a.prettyPhoto.stopSlideshow();
  245.                     return !1
  246.                 });
  247.                 $pp_pic_holder.find(".pp_gallery .pp_arrow_previous").click(function () {
  248.                     a.prettyPhoto.changeGalleryPage("previous");
  249.                     a.prettyPhoto.stopSlideshow();
  250.                     return !1
  251.                 });
  252.                 $pp_pic_holder.find(".pp_content").hover(function () {
  253.                     $pp_pic_holder.find(".pp_gallery:not(.disabled)").fadeIn()
  254.                 },
  255.  
  256.                 function () {
  257.                     $pp_pic_holder.find(".pp_gallery:not(.disabled)").fadeOut()
  258.                 });
  259.                 itemWidth = 57;
  260.                 $pp_pic_holder.find(".pp_gallery ul li").each(function (b) {
  261.                     a(this).css({
  262.                         position: "absolute",
  263.                         left: b * itemWidth
  264.                     });
  265.                     a(this).find("a").unbind("click").click(function () {
  266.                         a.prettyPhoto.changePage(b);
  267.                         a.prettyPhoto.stopSlideshow();
  268.                         return !1
  269.                     })
  270.                 })
  271.             }
  272.             settings.slideshow && ($pp_pic_holder.find(".pp_nav").prepend('<a href="#" class="pp_play">Play</a>'), $pp_pic_holder.find(".pp_nav .pp_play").click(function () {
  273.                 a.prettyPhoto.startSlideshow();
  274.                 return !1
  275.             }));
  276.             $pp_pic_holder.attr("class", "pp_pic_holder " + settings.theme);
  277.             $pp_overlay.css({
  278.                 opacity: 0,
  279.                 height: a(document).height(),
  280.                 width: a(window).width()
  281.             }).bind("click", function () {
  282.                 settings.modal || a.prettyPhoto.close()
  283.             });
  284.             a("a.pp_close").bind("click", function () {
  285.                 a.prettyPhoto.close();
  286.                 return false
  287.             });
  288.             a("a.pp_expand").bind("click", function () {
  289.                 if (a(this).hasClass("pp_expand")) {
  290.                     a(this).removeClass("pp_expand").addClass("pp_contract");
  291.                     doresize = false
  292.                 } else {
  293.                     a(this).removeClass("pp_contract").addClass("pp_expand");
  294.                     doresize = true
  295.                 }
  296.                 i(function () {
  297.                     a.prettyPhoto.open()
  298.                 });
  299.                 return false
  300.             });
  301.             $pp_pic_holder.find(".pp_previous, .pp_nav .pp_arrow_previous").bind("click", function () {
  302.                 a.prettyPhoto.changePage("previous");
  303.                 a.prettyPhoto.stopSlideshow();
  304.                 return false
  305.             });
  306.             $pp_pic_holder.find(".pp_next, .pp_nav .pp_arrow_next").bind("click", function () {
  307.                 a.prettyPhoto.changePage("next");
  308.                 a.prettyPhoto.stopSlideshow();
  309.                 return false
  310.             });
  311.             q()
  312.         }
  313.         var h = jQuery.extend({
  314.             animation_speed: "fast",
  315.             slideshow: !1,
  316.             autoplay_slideshow: !1,
  317.             opacity: 0.8,
  318.             show_title: !0,
  319.             allow_resize: !0,
  320.             default_width: 500,
  321.             default_height: 344,
  322.             counter_separator_label: "/",
  323.             theme: "facebook",
  324.             hideflash: !1,
  325.             wmode: "opaque",
  326.             autoplay: !0,
  327.             modal: !1,
  328.             overlay_gallery: !0,
  329.             keyboard_shortcuts: !0,
  330.             changepicturecallback: function () {},
  331.             callback: function () {},
  332.             markup: '<div class="pp_pic_holder"> <div class="ppt">&nbsp;</div> <div class="pp_top"> <div class="pp_left"></div> <div class="pp_middle"></div> <div class="pp_right"></div> </div> <div class="pp_content_container"> <div class="pp_left"> <div class="pp_right"> <div class="pp_content"> <div class="pp_loaderIcon"></div> <div class="pp_fade"> <a href="#" class="pp_expand" title="Expand the image">Expand</a> <div class="pp_hoverContainer"> <a class="pp_next" href="#">next</a> <a class="pp_previous" href="#">previous</a> </div> <div id="pp_full_res"></div> <div class="pp_details clearfix"> <p class="pp_description"></p> <a class="pp_close" href="#">Close</a> <div class="pp_nav"> <a href="#" class="pp_arrow_previous">Previous</a> <p class="currentTextHolder">0/0</p> <a href="#" class="pp_arrow_next">Next</a> </div> </div> </div> </div> </div> </div> </div> <div class="pp_bottom"> <div class="pp_left"></div> <div class="pp_middle"></div> <div class="pp_right"></div> </div> </div> <div class="pp_overlay"></div>',
  333.             gallery_markup: '<div class="pp_gallery"> <a href="#" class="pp_arrow_previous">Previous</a> <ul> {gallery} </ul> <a href="#" class="pp_arrow_next">Next</a> </div>',
  334.             image_markup: '<img id="fullResImage" src="{path}" />',
  335.             flash_markup: '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="{width}" height="{height}"><param name="wmode" value="{wmode}" /><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="{path}" /><embed src="{path}" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="{width}" height="{height}" wmode="{wmode}"></embed></object>',
  336.             quicktime_markup: '<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" height="{height}" width="{width}"><param name="src" value="{path}"><param name="autoplay" value="{autoplay}"><param name="type" value="video/quicktime"><embed src="{path}" height="{height}" width="{width}" autoplay="{autoplay}" type="video/quicktime" pluginspage="http://www.apple.com/quicktime/download/"></embed></object>',
  337.             iframe_markup: '<iframe src ="{path}" width="{width}" height="{height}" frameborder="no"></iframe>',
  338.             inline_markup: '<div class="pp_inline clearfix">{content}</div>',
  339.             custom_markup: ""
  340.         }, h),
  341.             r = this,
  342.             o = !1,
  343.             b, n, p, u, l, k, e = a(window).height(),
  344.             d = a(window).width(),
  345.             j;
  346.         doresize = !0;
  347.         scroll_pos = v();
  348.         a(window).unbind("resize.prettyphoto").bind("resize.prettyphoto", function () {
  349.             q();
  350.             e = a(window).height();
  351.             d = a(window).width();
  352.             "undefined" != typeof $pp_overlay && $pp_overlay.height(a(document).height()).width(d)
  353.         });
  354.         h.keyboard_shortcuts && a(document).unbind("keydown.prettyphoto").bind("keydown.prettyphoto", function (b) {
  355.             if ("undefined" != typeof $pp_pic_holder && $pp_pic_holder.is(":visible")) switch (b.keyCode) {
  356.             case 37:
  357.                 a.prettyPhoto.changePage("previous");
  358.                 b.preventDefault();
  359.                 break;
  360.             case 39:
  361.                 a.prettyPhoto.changePage("next");
  362.                 b.preventDefault();
  363.                 break;
  364.             case 27:
  365.                 settings.modal || a.prettyPhoto.close(), b.preventDefault()
  366.             }
  367.         });
  368.         a.prettyPhoto.initialize = function () {
  369.             settings = h;
  370.             a.browser.msie && 6 == parseInt(a.browser.version) && (settings.theme = "light_square");
  371.             theRel = a(this).attr("rel");
  372.             galleryRegExp = /\[(?:.*)\]/;
  373.             pp_images = (isSet = galleryRegExp.exec(theRel) ? !0 : !1) ? jQuery.map(r, function (b) {
  374.                 if (a(b).attr("rel").indexOf(theRel) != -1) return a(b).attr("href")
  375.             }) : a.makeArray(a(this).attr("href"));
  376.             pp_titles = isSet ? jQuery.map(r, function (b) {
  377.                 if (a(b).attr("rel").indexOf(theRel) != -1) return a(b).find("img").attr("alt") ? a(b).find("img").attr("alt") : ""
  378.             }) : a.makeArray(a(this).find("img").attr("alt"));
  379.             pp_descriptions = isSet ? jQuery.map(r, function (b) {
  380.                 if (a(b).attr("rel").indexOf(theRel) != -1) return a(b).attr("title") ? a(b).attr("title") : ""
  381.             }) : a.makeArray(a(this).attr("title"));
  382.             w(this);
  383.             settings.allow_resize && a(window).bind("scroll.prettyphoto", function () {
  384.                 q()
  385.             });
  386.             set_position = jQuery.inArray(a(this).attr("href"), pp_images);
  387.             a.prettyPhoto.open();
  388.             return !1
  389.         };
  390.         a.prettyPhoto.open = function (c, d, e) {
  391.             "undefined" == typeof settings && (settings = h, a.browser.msie && 6 == a.browser.version && (settings.theme = "light_square"), pp_images = a.makeArray(c), pp_titles = d ? a.makeArray(d) : a.makeArray(""), pp_descriptions = e ? a.makeArray(e) : a.makeArray(""), isSet = 1 < pp_images.length ? !0 : !1, set_position = 0, w(c.target));
  392.             a.browser.msie && 6 == a.browser.version && a("select").css("visibility", "hidden");
  393.             settings.hideflash && a("object,embed").css("visibility", "hidden");
  394.             x(a(pp_images).size());
  395.             a(".pp_loaderIcon").show();
  396.             $ppt.is(":hidden") && $ppt.css("opacity", 0).show();
  397.             $pp_overlay.show().fadeTo(settings.animation_speed, settings.opacity);
  398.             $pp_pic_holder.find(".currentTextHolder").text(set_position + 1 + settings.counter_separator_label + a(pp_images).size());
  399.             $pp_pic_holder.find(".pp_description").show().html(unescape(pp_descriptions[set_position]));
  400.             settings.show_title && "" != pp_titles[set_position] && "undefined" != typeof pp_titles[set_position] ? $ppt.html(unescape(pp_titles[set_position])) : $ppt.html("&nbsp;");
  401.             movie_width = parseFloat(g("width", pp_images[set_position])) ? g("width", pp_images[set_position]) : settings.default_width.toString();
  402.             movie_height = parseFloat(g("height", pp_images[set_position])) ? g("height", pp_images[set_position]) : settings.default_height.toString(); - 1 != movie_height.indexOf("%") && (movie_height = parseFloat(a(window).height() * parseFloat(movie_height) / 100 - 150), o = !0); - 1 != movie_width.indexOf("%") && (movie_width = parseFloat(a(window).width() * parseFloat(movie_width) / 100 - 150), o = !0);
  403.             $pp_pic_holder.fadeIn(function () {
  404.                 imgPreloader = "";
  405.                 switch (m(pp_images[set_position])) {
  406.                 case "image":
  407.                     imgPreloader = new Image;
  408.                     nextImage = new Image;
  409.                     if (isSet && set_position < a(pp_images).size() - 1) nextImage.src = pp_images[set_position + 1];
  410.                     prevImage = new Image;
  411.                     if (isSet && pp_images[set_position - 1]) prevImage.src = pp_images[set_position - 1];
  412.                     $pp_pic_holder.find("#pp_full_res")[0].innerHTML = settings.image_markup.replace(/{path}/g,
  413.                     pp_images[set_position]);
  414.                     imgPreloader.onload = function () {
  415.                         b = f(imgPreloader.width, imgPreloader.height);
  416.                         s()
  417.                     };
  418.                     imgPreloader.onerror = function () {
  419.                         alert("Image cannot be loaded. Make sure the path is correct and image exist.");
  420.                         a.prettyPhoto.close()
  421.                     };
  422.                     imgPreloader.src = pp_images[set_position];
  423.                     break;
  424.                 case "youtube":
  425.                     b = f(movie_width, movie_height);
  426.                     movie = "http://www.youtube.com/v/" + g("v", pp_images[set_position]);
  427.                     settings.autoplay && (movie = movie + "&autoplay=1");
  428.                     toInject = settings.flash_markup.replace(/{width}/g, b.width).replace(/{height}/g,
  429.                     b.height).replace(/{wmode}/g, settings.wmode).replace(/{path}/g, movie);
  430.                     break;
  431.                 case "vimeo":
  432.                     b = f(movie_width, movie_height);
  433.                     movie_id = pp_images[set_position];
  434.                     movie = "http://player.vimeo.com/video/" + movie_id.match(/http:\/\/(www\.)?vimeo.com\/(\d+)/)[2] + "?title=0&amp;byline=0&amp;portrait=0";
  435.                     settings.autoplay && (movie = movie + "&autoplay=1;");
  436.                     vimeo_width = b.width + "/embed/?moog_width=" + b.width;
  437.                     toInject = settings.iframe_markup.replace(/{width}/g, vimeo_width).replace(/{height}/g, b.height).replace(/{path}/g, movie);
  438.                     break;
  439.                 case "quicktime":
  440.                     b = f(movie_width, movie_height);
  441.                     b.height = b.height + 15;
  442.                     b.contentHeight = b.contentHeight + 15;
  443.                     b.containerHeight = b.containerHeight + 15;
  444.                     toInject = settings.quicktime_markup.replace(/{width}/g, b.width).replace(/{height}/g, b.height).replace(/{wmode}/g, settings.wmode).replace(/{path}/g, pp_images[set_position]).replace(/{autoplay}/g, settings.autoplay);
  445.                     break;
  446.                 case "flash":
  447.                     b = f(movie_width, movie_height);
  448.                     flash_vars = pp_images[set_position];
  449.                     flash_vars = flash_vars.substring(pp_images[set_position].indexOf("flashvars") + 10, pp_images[set_position].length);
  450.                     filename = pp_images[set_position];
  451.                     filename = filename.substring(0, filename.indexOf("?"));
  452.                     toInject = settings.flash_markup.replace(/{width}/g, b.width).replace(/{height}/g, b.height).replace(/{wmode}/g, settings.wmode).replace(/{path}/g, filename + "?" + flash_vars);
  453.                     break;
  454.                 case "iframe":
  455.                     b = f(movie_width, movie_height);
  456.                     frame_url = pp_images[set_position];
  457.                     frame_url = frame_url.substr(0, frame_url.indexOf("iframe") - 1);
  458.                     toInject = settings.iframe_markup.replace(/{width}/g, b.width).replace(/{height}/g,
  459.                     b.height).replace(/{path}/g, frame_url);
  460.                     break;
  461.                 case "custom":
  462.                     b = f(movie_width, movie_height);
  463.                     toInject = settings.custom_markup;
  464.                     break;
  465.                 case "inline":
  466.                     myClone = a(pp_images[set_position]).clone().css({
  467.                         width: settings.default_width
  468.                     }).wrapInner('<div id="pp_full_res"><div class="pp_inline clearfix"></div></div>').appendTo(a("body")).show();
  469.                     doresize = false;
  470.                     b = f(a(myClone).width(), a(myClone).height());
  471.                     doresize = true;
  472.                     a(myClone).remove();
  473.                     toInject = settings.inline_markup.replace(/{content}/g, a(pp_images[set_position]).html())
  474.                 }
  475.                 if (!imgPreloader) {
  476.                     $pp_pic_holder.find("#pp_full_res")[0].innerHTML = toInject;
  477.                     s()
  478.                 }
  479.             });
  480.             return !1
  481.         };
  482.         a.prettyPhoto.changePage = function (b) {
  483.             currentGalleryPage = 0;
  484.             if ("previous" == b) {
  485.                 if (set_position--, 0 > set_position) {
  486.                     set_position = 0;
  487.                     return
  488.                 }
  489.             } else "next" == b ? (set_position++, set_position > a(pp_images).size() - 1 && (set_position = 0)) : set_position = b;
  490.             doresize || (doresize = !0);
  491.             a(".pp_contract").removeClass("pp_contract").addClass("pp_expand");
  492.             i(function () {
  493.                 a.prettyPhoto.open()
  494.             })
  495.         };
  496.         a.prettyPhoto.changeGalleryPage = function (b) {
  497.             "next" == b ? (currentGalleryPage++, currentGalleryPage > totalPage && (currentGalleryPage = 0)) : "previous" == b ? (currentGalleryPage--, 0 > currentGalleryPage && (currentGalleryPage = totalPage)) : currentGalleryPage = b;
  498.             itemsToSlide = currentGalleryPage == totalPage ? pp_images.length - totalPage * itemsPerPage : itemsPerPage;
  499.             $pp_pic_holder.find(".pp_gallery li").each(function (b) {
  500.                 a(this).animate({
  501.                     left: b * itemWidth - itemsToSlide * itemWidth * currentGalleryPage
  502.                 })
  503.             })
  504.         };
  505.         a.prettyPhoto.startSlideshow = function () {
  506.             "undefined" == typeof j ? ($pp_pic_holder.find(".pp_play").unbind("click").removeClass("pp_play").addClass("pp_pause").click(function () {
  507.                 a.prettyPhoto.stopSlideshow();
  508.                 return !1
  509.             }), j = setInterval(a.prettyPhoto.startSlideshow, settings.slideshow)) : a.prettyPhoto.changePage("next")
  510.         };
  511.         a.prettyPhoto.stopSlideshow = function () {
  512.             $pp_pic_holder.find(".pp_pause").unbind("click").removeClass("pp_pause").addClass("pp_play").click(function () {
  513.                 a.prettyPhoto.startSlideshow();
  514.                 return !1
  515.             });
  516.             clearInterval(j);
  517.             j = void 0
  518.         };
  519.         a.prettyPhoto.close = function () {
  520.             $pp_overlay.is(":animated") || (a.prettyPhoto.stopSlideshow(), $pp_pic_holder.stop().find("object,embed").css("visibility", "hidden"), a("div.pp_pic_holder,div.ppt,.pp_fade").fadeOut(settings.animation_speed,
  521.  
  522.             function () {
  523.                 a(this).remove()
  524.             }), $pp_overlay.fadeOut(settings.animation_speed, function () {
  525.                 a.browser.msie && 6 == a.browser.version && a("select").css("visibility", "visible");
  526.                 settings.hideflash && a("object,embed").css("visibility", "visible");
  527.                 a(this).remove();
  528.                 a(window).unbind("scroll");
  529.                 settings.callback();
  530.                 doresize = !0;
  531.                 n = !1;
  532.                 delete settings
  533.             }))
  534.         };
  535.         return this.unbind("click.prettyphoto").bind("click.prettyphoto", a.prettyPhoto.initialize)
  536.     }
  537. })(jQuery);
  538.  
  539.  
  540. /*
  541.  * jQuery Nivo Slider v3.0.1
  542.  * http://nivo.dev7studios.com
  543.  *
  544.  * Copyright 2012, Dev7studios
  545.  * Free to use and abuse under the MIT license.
  546.  * http://www.opensource.org/licenses/mit-license.php
  547.  */ (function (a) {
  548.     var t = function (m, r) {
  549.             var e = a.extend({}, a.fn.nivoSlider.defaults, r),
  550.                 b = {
  551.                     currentSlide: 0,
  552.                     currentImage: "",
  553.                     totalSlides: 0,
  554.                     running: !1,
  555.                     paused: !1,
  556.                     stop: !1,
  557.                     controlNavEl: !1
  558.                 },
  559.                 j = a(m);
  560.             j.data("nivo:vars", b).addClass("nivoSlider");
  561.             var k = j.children();
  562.             k.each(function () {
  563.                 var c = a(this),
  564.                     f = "";
  565.                 c.is("img") || (c.is("a") && (c.addClass("nivo-imageLink"), f = c), c = c.find("img:first"));
  566.                 var d = 0 === d ? c.attr("width") : c.width(),
  567.                     e = 0 === e ? c.attr("height") : c.height();
  568.                 "" !== f && f.css("display", "none");
  569.                 c.css("display", "none");
  570.                 b.totalSlides++
  571.             });
  572.             e.randomStart && (e.startSlide = Math.floor(Math.random() * b.totalSlides));
  573.             0 < e.startSlide && (e.startSlide >= b.totalSlides && (e.startSlide = b.totalSlides - 1), b.currentSlide = e.startSlide);
  574.             b.currentImage = a(k[b.currentSlide]).is("img") ? a(k[b.currentSlide]) : a(k[b.currentSlide]).find("img:first");
  575.             a(k[b.currentSlide]).is("a") && a(k[b.currentSlide]).css("display", "block");
  576.             var n = a('<img class="nivo-main-image" src="#" />');
  577.             n.attr("src", b.currentImage.attr("src")).show();
  578.             j.append(n);
  579.             a(window).resize(function () {
  580.                 j.children("img").width(j.width());
  581.                 n.attr("src", b.currentImage.attr("src"));
  582.                 n.stop().height("auto");
  583.                 a(".nivo-slice").remove();
  584.                 a(".nivo-box").remove()
  585.             });
  586.             j.append(a('<div class="nivo-caption"></div>'));
  587.             var u = function (c) {
  588.                     var f = a(".nivo-caption", j);
  589.                     if (b.currentImage.attr("title") != "" && b.currentImage.attr("title") != void 0) {
  590.                         var d = b.currentImage.attr("title");
  591.                         d.substr(0, 1) == "#" && (d = a(d).html());
  592.                         if (f.css("display") == "block") setTimeout(function () {
  593.                             f.html(d)
  594.                         }, c.animSpeed);
  595.                         else {
  596.                             f.html(d);
  597.                             f.stop().fadeIn(c.animSpeed)
  598.                         }
  599.                     } else f.stop().fadeOut(c.animSpeed)
  600.                 };
  601.             u(e);
  602.             var l = 0;
  603.             !e.manualAdvance && 1 < k.length && (l = setInterval(function () {
  604.                 o(j, k, e, false)
  605.             }, e.pauseTime));
  606.             e.directionNav && (j.append('<div class="nivo-directionNav"><a class="nivo-prevNav">' + e.prevText + '</a><a class="nivo-nextNav">' + e.nextText + "</a></div>"), e.directionNavHide && (a(".nivo-directionNav", j).hide(), j.hover(function () {
  607.                 a(".nivo-directionNav", j).show()
  608.             }, function () {
  609.                 a(".nivo-directionNav", j).hide()
  610.             })), a("a.nivo-prevNav", j).live("click", function () {
  611.                 if (b.running) return false;
  612.                 clearInterval(l);
  613.                 l = "";
  614.                 b.currentSlide = b.currentSlide - 2;
  615.                 o(j, k, e, "prev")
  616.             }), a("a.nivo-nextNav", j).live("click", function () {
  617.                 if (b.running) return false;
  618.                 clearInterval(l);
  619.                 l = "";
  620.                 o(j, k, e, "next")
  621.             }));
  622.             if (e.controlNav) {
  623.                 b.controlNavEl = a('<div class="nivo-controlNav"></div>');
  624.                 j.after(b.controlNavEl);
  625.                 for (var p = 0; p < k.length; p++) if (e.controlNavThumbs) {
  626.                     b.controlNavEl.addClass("nivo-thumbs-enabled");
  627.                     var s = k.eq(p);
  628.                     s.is("img") || (s = s.find("img:first"));
  629.                     s.attr("data-thumb") && b.controlNavEl.append('<a class="nivo-control" rel="' + p + '"><img src="' + s.attr("data-thumb") + '" alt="" /></a>')
  630.                 } else b.controlNavEl.append('<a class="nivo-control" rel="' + p + '">' + (p + 1) + "</a>");
  631.                 a("a:eq(" + b.currentSlide + ")", b.controlNavEl).addClass("active");
  632.                 a("a", b.controlNavEl).bind("click", function () {
  633.                     if (b.running || a(this).hasClass("active")) return false;
  634.                     clearInterval(l);
  635.                     l = "";
  636.                     n.attr("src", b.currentImage.attr("src"));
  637.                     b.currentSlide = a(this).attr("rel") - 1;
  638.                     o(j, k, e, "control")
  639.                 })
  640.             }
  641.             e.pauseOnHover && j.hover(function () {
  642.                 b.paused = true;
  643.                 clearInterval(l);
  644.                 l = ""
  645.             }, function () {
  646.                 b.paused = false;
  647.                 l === "" && !e.manualAdvance && (l = setInterval(function () {
  648.                     o(j, k, e, false)
  649.                 }, e.pauseTime))
  650.             });
  651.             j.bind("nivo:animFinished", function () {
  652.                 n.attr("src", b.currentImage.attr("src"));
  653.                 b.running = false;
  654.                 a(k).each(function () {
  655.                     a(this).is("a") && a(this).css("display", "none")
  656.                 });
  657.                 a(k[b.currentSlide]).is("a") && a(k[b.currentSlide]).css("display", "block");
  658.                 l === "" && (!b.paused && !e.manualAdvance) && (l = setInterval(function () {
  659.                     o(j, k, e, false)
  660.                 }, e.pauseTime));
  661.                 e.afterChange.call(this)
  662.             });
  663.             var q = function (c, f, d) {
  664.                     a(d.currentImage).parent().is("a") && a(d.currentImage).parent().css("display", "block");
  665.                     a('img[src="' + d.currentImage.attr("src") + '"]', c).not(".nivo-main-image,.nivo-control img").width(c.width()).css("visibility", "hidden").show();
  666.                     for (var b = a('img[src="' + d.currentImage.attr("src") + '"]', c).not(".nivo-main-image,.nivo-control img").parent().is("a") ? a('img[src="' + d.currentImage.attr("src") + '"]', c).not(".nivo-main-image,.nivo-control img").parent().height() : a('img[src="' + d.currentImage.attr("src") + '"]', c).not(".nivo-main-image,.nivo-control img").height(), g = 0; g < f.slices; g++) {
  667.                         var h = Math.round(c.width() / f.slices);
  668.                         g === f.slices - 1 ? c.append(a('<div class="nivo-slice" name="' + g + '"><img src="' + d.currentImage.attr("src") + '" style="position:absolute; width:' + c.width() + "px; height:auto; display:block !important; top:0; left:-" + (h + g * h - h) + 'px;" /></div>').css({
  669.                             left: h * g + "px",
  670.                             width: c.width() - h * g + "px",
  671.                             height: b + "px",
  672.                             opacity: "0",
  673.                             overflow: "hidden"
  674.                         })) : c.append(a('<div class="nivo-slice" name="' + g + '"><img src="' + d.currentImage.attr("src") + '" style="position:absolute; width:' + c.width() + "px; height:auto; display:block !important; top:0; left:-" + (h + g * h - h) + 'px;" /></div>').css({
  675.                             left: h * g + "px",
  676.                             width: h + "px",
  677.                             height: b + "px",
  678.                             opacity: "0",
  679.                             overflow: "hidden"
  680.                         }))
  681.                     }
  682.                     a(".nivo-slice", c).height(b);
  683.                     n.stop().animate({
  684.                         height: a(d.currentImage).height()
  685.                     }, f.animSpeed)
  686.                 },
  687.                 v = function (c, f, d) {
  688.                     a(d.currentImage).parent().is("a") && a(d.currentImage).parent().css("display", "block");
  689.                     a('img[src="' + d.currentImage.attr("src") + '"]', c).not(".nivo-main-image,.nivo-control img").width(c.width()).css("visibility", "hidden").show();
  690.                     for (var b = Math.round(c.width() / f.boxCols), g = Math.round(a('img[src="' + d.currentImage.attr("src") + '"]', c).not(".nivo-main-image,.nivo-control img").height() / f.boxRows), h = 0; h < f.boxRows; h++) for (var i = 0; i < f.boxCols; i++) {
  691.                         i === f.boxCols - 1 ? c.append(a('<div class="nivo-box" name="' + i + '" rel="' + h + '"><img src="' + d.currentImage.attr("src") + '" style="position:absolute; width:' + c.width() + "px; height:auto; display:block; top:-" + g * h + "px; left:-" + b * i + 'px;" /></div>').css({
  692.                             opacity: 0,
  693.                             left: b * i + "px",
  694.                             top: g * h + "px",
  695.                             width: c.width() - b * i + "px"
  696.                         })) : c.append(a('<div class="nivo-box" name="' + i + '" rel="' + h + '"><img src="' + d.currentImage.attr("src") + '" style="position:absolute; width:' + c.width() + "px; height:auto; display:block; top:-" + g * h + "px; left:-" + b * i + 'px;" /></div>').css({
  697.                             opacity: 0,
  698.                             left: b * i + "px",
  699.                             top: g * h + "px",
  700.                             width: b + "px"
  701.                         }));
  702.                         a('.nivo-box[name="' + i + '"]', c).height(a('.nivo-box[name="' + i + '"] img', c).height() + "px")
  703.                     }
  704.                     n.stop().animate({
  705.                         height: a(d.currentImage).height()
  706.                     }, f.animSpeed)
  707.                 },
  708.                 o = function (c, f, d, b) {
  709.                     var g = c.data("nivo:vars");
  710.                     g && g.currentSlide === g.totalSlides - 1 && d.lastSlide.call(this);
  711.                     if ((!g || g.stop) && !b) return false;
  712.                     d.beforeChange.call(this);
  713.                     if (b) {
  714.                         b === "prev" && n.attr("src", g.currentImage.attr("src"));
  715.                         b === "next" && n.attr("src", g.currentImage.attr("src"))
  716.                     } else n.attr("src", g.currentImage.attr("src"));
  717.                     g.currentSlide++;
  718.                     if (g.currentSlide === g.totalSlides) {
  719.                         g.currentSlide = 0;
  720.                         d.slideshowEnd.call(this)
  721.                     }
  722.                     if (g.currentSlide < 0) g.currentSlide = g.totalSlides - 1;
  723.                     g.currentImage = a(f[g.currentSlide]).is("img") ? a(f[g.currentSlide]) : a(f[g.currentSlide]).find("img:first");
  724.                     if (d.controlNav) {
  725.                         a("a", g.controlNavEl).removeClass("active");
  726.                         a("a:eq(" + g.currentSlide + ")", g.controlNavEl).addClass("active")
  727.                     }
  728.                     u(d);
  729.                     a(".nivo-slice", c).remove();
  730.                     a(".nivo-box", c).remove();
  731.                     var h = d.effect,
  732.                         f = "";
  733.                     if (d.effect === "random") {
  734.                         f = ["sliceDownRight", "sliceDownLeft", "sliceUpRight", "sliceUpLeft", "sliceUpDown", "sliceUpDownLeft", "fold", "fade", "boxRandom", "boxRain", "boxRainReverse", "boxRainGrow", "boxRainGrowReverse"];
  735.                         h = f[Math.floor(Math.random() * (f.length + 1))];
  736.                         h === void 0 && (h = "fade")
  737.                     }
  738.                     if (d.effect.indexOf(",") !== -1) {
  739.                         f = d.effect.split(",");
  740.                         h = f[Math.floor(Math.random() * f.length)];
  741.                         h === void 0 && (h = "fade")
  742.                     }
  743.                     g.currentImage.attr("data-transition") && (h = g.currentImage.attr("data-transition"));
  744.                     g.running = true;
  745.                     var i = 0,
  746.                         e = 0,
  747.                         j = f = "",
  748.                         k = "",
  749.                         f = "";
  750.                     if (h === "sliceDown" || h === "sliceDownRight" || h === "sliceDownLeft") {
  751.                         q(c, d, g);
  752.                         e = i = 0;
  753.                         f = a(".nivo-slice", c);
  754.                         h === "sliceDownLeft" && (f = a(".nivo-slice", c)._reverse());
  755.                         f.each(function () {
  756.                             var b = a(this);
  757.                             b.css({
  758.                                 top: "0px"
  759.                             });
  760.                             e === d.slices - 1 ? setTimeout(function () {
  761.                                 b.animate({
  762.                                     opacity: "1.0"
  763.                                 }, d.animSpeed, "", function () {
  764.                                     c.trigger("nivo:animFinished")
  765.                                 })
  766.                             }, 100 + i) : setTimeout(function () {
  767.                                 b.animate({
  768.                                     opacity: "1.0"
  769.                                 },
  770.                                 d.animSpeed)
  771.                             }, 100 + i);
  772.                             i = i + 50;
  773.                             e++
  774.                         })
  775.                     } else if (h === "sliceUp" || h === "sliceUpRight" || h === "sliceUpLeft") {
  776.                         q(c, d, g);
  777.                         e = i = 0;
  778.                         f = a(".nivo-slice", c);
  779.                         h === "sliceUpLeft" && (f = a(".nivo-slice", c)._reverse());
  780.                         f.each(function () {
  781.                             var b = a(this);
  782.                             b.css({
  783.                                 bottom: "0px"
  784.                             });
  785.                             e === d.slices - 1 ? setTimeout(function () {
  786.                                 b.animate({
  787.                                     opacity: "1.0"
  788.                                 }, d.animSpeed, "", function () {
  789.                                     c.trigger("nivo:animFinished")
  790.                                 })
  791.                             }, 100 + i) : setTimeout(function () {
  792.                                 b.animate({
  793.                                     opacity: "1.0"
  794.                                 }, d.animSpeed)
  795.                             }, 100 + i);
  796.                             i = i + 50;
  797.                             e++
  798.                         })
  799.                     } else if (h === "sliceUpDown" || h === "sliceUpDownRight" || h === "sliceUpDownLeft") {
  800.                         q(c, d, g);
  801.                         var l = e = i = 0,
  802.                             f = a(".nivo-slice", c);
  803.                         h === "sliceUpDownLeft" && (f = a(".nivo-slice", c)._reverse());
  804.                         f.each(function () {
  805.                             var b = a(this);
  806.                             if (e === 0) {
  807.                                 b.css("top", "0px");
  808.                                 e++
  809.                             } else {
  810.                                 b.css("bottom", "0px");
  811.                                 e = 0
  812.                             }
  813.                             l === d.slices - 1 ? setTimeout(function () {
  814.                                 b.animate({
  815.                                     opacity: "1.0"
  816.                                 }, d.animSpeed, "", function () {
  817.                                     c.trigger("nivo:animFinished")
  818.                                 })
  819.                             }, 100 + i) : setTimeout(function () {
  820.                                 b.animate({
  821.                                     opacity: "1.0"
  822.                                 }, d.animSpeed)
  823.                             }, 100 + i);
  824.                             i = i + 50;
  825.                             l++
  826.                         })
  827.                     } else if (h === "fold") {
  828.                         q(c, d, g);
  829.                         e = i = 0;
  830.                         a(".nivo-slice", c).each(function () {
  831.                             var b = a(this),
  832.                                 f = b.width();
  833.                             b.css({
  834.                                 top: "0px",
  835.                                 width: "0px"
  836.                             });
  837.                             e === d.slices - 1 ? setTimeout(function () {
  838.                                 b.animate({
  839.                                     width: f,
  840.                                     opacity: "1.0"
  841.                                 }, d.animSpeed, "", function () {
  842.                                     c.trigger("nivo:animFinished")
  843.                                 })
  844.                             }, 100 + i) : setTimeout(function () {
  845.                                 b.animate({
  846.                                     width: f,
  847.                                     opacity: "1.0"
  848.                                 }, d.animSpeed)
  849.                             }, 100 + i);
  850.                             i = i + 50;
  851.                             e++
  852.                         })
  853.                     } else if (h === "fade") {
  854.                         q(c, d, g);
  855.                         j = a(".nivo-slice:first", c);
  856.                         j.css({
  857.                             width: c.width() + "px"
  858.                         });
  859.                         j.animate({
  860.                             opacity: "1.0"
  861.                         }, d.animSpeed * 2, "", function () {
  862.                             c.trigger("nivo:animFinished")
  863.                         })
  864.                     } else if (h === "slideInRight") {
  865.                         q(c, d, g);
  866.                         j = a(".nivo-slice:first",
  867.                         c);
  868.                         j.css({
  869.                             width: "0px",
  870.                             opacity: "1"
  871.                         });
  872.                         j.animate({
  873.                             width: c.width() + "px"
  874.                         }, d.animSpeed * 2, "", function () {
  875.                             c.trigger("nivo:animFinished")
  876.                         })
  877.                     } else if (h === "slideInLeft") {
  878.                         q(c, d, g);
  879.                         j = a(".nivo-slice:first", c);
  880.                         j.css({
  881.                             width: "0px",
  882.                             opacity: "1",
  883.                             left: "",
  884.                             right: "0px"
  885.                         });
  886.                         j.animate({
  887.                             width: c.width() + "px"
  888.                         }, d.animSpeed * 2, "", function () {
  889.                             j.css({
  890.                                 left: "0px",
  891.                                 right: ""
  892.                             });
  893.                             c.trigger("nivo:animFinished")
  894.                         })
  895.                     } else if (h === "boxRandom") {
  896.                         v(c, d, g);
  897.                         k = d.boxCols * d.boxRows;
  898.                         i = e = 0;
  899.                         f = t(a(".nivo-box", c));
  900.                         f.each(function () {
  901.                             var b = a(this);
  902.                             e === k - 1 ? setTimeout(function () {
  903.                                 b.animate({
  904.                                     opacity: "1"
  905.                                 },
  906.                                 d.animSpeed, "", function () {
  907.                                     c.trigger("nivo:animFinished")
  908.                                 })
  909.                             }, 100 + i) : setTimeout(function () {
  910.                                 b.animate({
  911.                                     opacity: "1"
  912.                                 }, d.animSpeed)
  913.                             }, 100 + i);
  914.                             i = i + 20;
  915.                             e++
  916.                         })
  917.                     } else if (h === "boxRain" || h === "boxRainReverse" || h === "boxRainGrow" || h === "boxRainGrowReverse") {
  918.                         v(c, d, g);
  919.                         var k = d.boxCols * d.boxRows,
  920.                             m = i = e = 0,
  921.                             o = 0,
  922.                             p = [];
  923.                         p[m] = [];
  924.                         f = a(".nivo-box", c);
  925.                         if (h === "boxRainReverse" || h === "boxRainGrowReverse") f = a(".nivo-box", c)._reverse();
  926.                         f.each(function () {
  927.                             p[m][o] = a(this);
  928.                             o++;
  929.                             if (o === d.boxCols) {
  930.                                 m++;
  931.                                 o = 0;
  932.                                 p[m] = []
  933.                             }
  934.                         });
  935.                         for (g = 0; g < d.boxCols * 2; g++) {
  936.                             f = g;
  937.                             for (b = 0; b < d.boxRows; b++) {
  938.                                 if (f >= 0 && f < d.boxCols) {
  939.                                     (function (b, f, g, e, i) {
  940.                                         var j = a(p[b][f]),
  941.                                             k = j.width(),
  942.                                             l = j.height();
  943.                                         (h === "boxRainGrow" || h === "boxRainGrowReverse") && j.width(0).height(0);
  944.                                         e === i - 1 ? setTimeout(function () {
  945.                                             j.animate({
  946.                                                 opacity: "1",
  947.                                                 width: k,
  948.                                                 height: l
  949.                                             }, d.animSpeed / 1.3, "", function () {
  950.                                                 c.trigger("nivo:animFinished")
  951.                                             })
  952.                                         }, 100 + g) : setTimeout(function () {
  953.                                             j.animate({
  954.                                                 opacity: "1",
  955.                                                 width: k,
  956.                                                 height: l
  957.                                             }, d.animSpeed / 1.3)
  958.                                         }, 100 + g)
  959.                                     })(b, f, i, e, k);
  960.                                     e++
  961.                                 }
  962.                                 f--
  963.                             }
  964.                             i = i + 100
  965.                         }
  966.                     }
  967.                 },
  968.                 t = function (c) {
  969.                     for (var a, b, e = c.length; e; a = parseInt(Math.random() * e, 10), b = c[--e], c[e] = c[a], c[a] = b);
  970.                     return c
  971.                 },
  972.                 w = function (a) {
  973.                     this.console && typeof console.log !== "undefined" && console.log(a)
  974.                 };
  975.             this.stop = function () {
  976.                 if (!a(m).data("nivo:vars").stop) {
  977.                     a(m).data("nivo:vars").stop = true;
  978.                     w("Stop Slider")
  979.                 }
  980.             };
  981.             this.start = function () {
  982.                 if (a(m).data("nivo:vars").stop) {
  983.                     a(m).data("nivo:vars").stop = false;
  984.                     w("Start Slider")
  985.                 }
  986.             };
  987.             e.afterLoad.call(this);
  988.             return this
  989.         };
  990.     a.fn.nivoSlider = function (m) {
  991.         return this.each(function () {
  992.             var r = a(this);
  993.             if (r.data("nivoslider")) return r.data("nivoslider");
  994.             var e = new t(this,
  995.             m);
  996.             r.data("nivoslider", e)
  997.         })
  998.     };
  999.     a.fn.nivoSlider.defaults = {
  1000.         effect: "random",
  1001.         slices: 15,
  1002.         boxCols: 8,
  1003.         boxRows: 4,
  1004.         animSpeed: 500,
  1005.         pauseTime: 3E3,
  1006.         startSlide: 0,
  1007.         directionNav: !0,
  1008.         directionNavHide: !0,
  1009.         controlNav: !0,
  1010.         controlNavThumbs: !1,
  1011.         pauseOnHover: !0,
  1012.         manualAdvance: !1,
  1013.         prevText: "Prev",
  1014.         nextText: "Next",
  1015.         randomStart: !1,
  1016.         beforeChange: function () {},
  1017.         afterChange: function () {},
  1018.         slideshowEnd: function () {},
  1019.         lastSlide: function () {},
  1020.         afterLoad: function () {}
  1021.     };
  1022.     a.fn._reverse = [].reverse
  1023. })(jQuery);
  1024.  
  1025.  
  1026. jQuery(document).ready(function () {
  1027.  
  1028.     // Main menu
  1029.     jQuery('ul.sf-menu').superfish({
  1030.         delay: 500, // 1/2 second delay on mouseout
  1031.         animation: {
  1032.             opacity: 'show',
  1033.             height: 'show'
  1034.         }, // fade-in and slide-down animation
  1035.         speed: 'fast', // faster animation speed
  1036.         autoArrows: false, // generation of arrow mark-up (for submenu)
  1037.         dropShadows: false // done in CSS instead (RL)
  1038.     });
  1039.  
  1040.  
  1041.     // FAQ Toggle Web Content Template
  1042.     jQuery('.faq-list dt').css('cursor', 'pointer');
  1043.     jQuery('.faq-list dd').hide();
  1044.     jQuery('.faq-list dt.open dd').delay(300).slideDown('fast');
  1045.     jQuery('.faq-list').on('click', 'dt', function (e) {
  1046.         jQuery(this).next('dd').slideToggle('fast').addClass('open');
  1047.     });
  1048.  
  1049.  
  1050. });
  1051.  
  1052.  
  1053. jQuery(window).load(function () {
  1054.  
  1055.  
  1056.     // Homepage Slideshow
  1057.     jQuery('.nivo-slider').nivoSlider({
  1058.         effect: 'fold',
  1059.         animSpeed: 500,
  1060.         pauseTime: 5000,
  1061.         startSlide: 1,
  1062.         slices: 15,
  1063.         directionNav: true,
  1064.         directionNavHide: true,
  1065.         controlNav: true,
  1066.         controlNavThumbs: false,
  1067.         pauseOnHover: true
  1068.     });
  1069.  
  1070.     // Gallery
  1071.     // Opens images in lightbox
  1072.     jQuery("#gallery .portfolio a[rel^='prettyPhoto']").prettyPhoto({
  1073.         animationSpeed: 'slow',
  1074.         theme: 'facebook',
  1075.         slideshow: false,
  1076.         autoplay_slideshow: false,
  1077.         show_title: true,
  1078.         overlay_gallery: false
  1079.     });
  1080.  
  1081.     jQuery('#gallery .portfolio li img').hide();
  1082.     // Incrementally fade in gallery images...
  1083.     var i = 1;
  1084.     var imgs = jQuery('#gallery .portfolio li img').length;
  1085.     var int = setInterval(function () {
  1086.         //console.log(i); check to make sure interval properly stops
  1087.         if (i >= imgs) clearInterval(int);
  1088.         jQuery('#gallery .portfolio li img:hidden').eq(0).fadeIn(300);
  1089.         i++;
  1090.     }, 300);
  1091. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement