﻿function UpdateNumberOfClicks(a, b, c) { $.getJSON(c + "?cid=" + b + "&clicks=" + a) } function LoadBannerPreview(a, b, c, d, e, f, g, h, i) { try { var j = 15; $("." + c).css("visibility", "hidden"); if (d == "1") { $("." + c).flash({ src: a, width: b, _class: "flash_" + c, _borderWidth: j }) } else { $("." + c).append("<img class='img_" + c + "' src='" + a + "' alt='banner'  />") } $("." + c).jScale({ w: b + "px" }); $("." + e).jScale({ w: b + "px" }); $("." + e).click(function () { if (f != "#") { g += 1; UpdateNumberOfClicks(g, h, i); window.open(f) } }); $(this).delay(2e3, function () { $("." + e).css("text-align", "center"); $("." + e).css("width", b); $("." + e).css("height", $("." + c).css("width")); $("." + c).css("z-index", "2"); $("." + e).css("z-index", "3"); if ($.browser.msie) { $("." + e).css("background-color", "white"); $("." + e).css("filter", "alpha(opacity=1)") } $("." + c).css("visibility", "visible") }); $(this).delay(1e3, function () { if ($(".img_" + c).width != "null") { if ($(".img_" + c).width() > b) { $(".img_" + c).jScale({ w: b - j + "px" }) } } }) } catch (k) { } } function LoadBanner(a, b, c, d, e, f, g, h) { var i = $("." + b).parent(); if (c != "#") { $("." + b).css("cursor", "pointer") } LoadBannerPreview(a, $(i).width(), b, g, h, c, d, e, f); $("." + b).css("text-align", "center") } function setSizePx(a, b, c) { $("#" + a).css("width", b); $("#" + a).css("height", c) } function setPosition(a, b, c) { $("#" + a).css("top", b + "px"); $("#" + a).css("left", c + "px") } function getCssTop(a) { return pixelsToInt($("#" + a).css("top")) } function getCssLeft(a) { return pixelsToInt($("#" + a).css("left")) } function pixelsToInt(a) { var b = a.substr(0, a.length - 2); return parseInt(b) } function iwkArticleCarousel_ValidateTitle(a, b, c) { var d = b; $("#" + c.ID + "_titlevalidator").text(d); while ($("#" + c.ID + "_titlevalidator").width() > pixelsToInt(c.Width)) { d = d.substr(0, d.length - 1); $("#" + c.ID + "_titlevalidator").text(d + "...") } $("#" + a).text($("#" + c.ID + "_titlevalidator").text()) } function iwkArticleCarousel_MoveBlocksTop(a, b) { var c = false; var d = getCssTop(b.ID + "_moveblockA"); $("#" + b.ID + "_moveblockA").css("top", d + a + "px"); if (d + a == 0) c = true; d = getCssTop(b.ID + "_moveblockB"); $("#" + b.ID + "_moveblockB").css("top", d + a + "px"); if (d + a == 0) c = true; if (c == false) $(this).delay(b.EffectSpeed, function () { iwkArticleCarousel_MoveBlocksTop(a, b) }) } function iwkArticleCarousel_MoveBlocksLeft(a, b) { var c = false; var d = getCssLeft(b.ID + "_moveblockA"); $("#" + b.ID + "_moveblockA").css("left", d + a + "px"); if (d + a == 0) c = true; d = getCssLeft(b.ID + "_moveblockB"); $("#" + b.ID + "_moveblockB").css("left", d + a + "px"); if (d + a == 0) c = true; if (c == false) $(this).delay(b.EffectSpeed, function () { iwkArticleCarousel_MoveBlocksLeft(a, b) }) } function iwkArticleCarousel_ChangeDirection(a) { switch (a) { case "Up": a = "Down"; break; case "Down": a = "Up"; break; case "Left": a = "Right"; break; case "Right": a = "Left"; break } return a } function iwkArticleCarousel_Slide(a, b, c, d) { if (d.Loaded == true) { if (d.EffectOn == true) { var e; if (a == "A") e = "B"; else e = "A"; d.CurrentItem += c; if (d.Effect == "SlideVerticalElastic" || d.Effect == "SlideHorizontalElastic") { if (c > 0) { if (d.CurrentItem > d.TotalItems) { d.CurrentItem = d.TotalItems - 1; c = -1; b = iwkArticleCarousel_ChangeDirection(b) } } else { if (d.CurrentItem < 1) { d.CurrentItem = 2; c = 1; b = iwkArticleCarousel_ChangeDirection(b) } } } else { if (c > 0) { if (d.CurrentItem > d.TotalItems) d.CurrentItem = 1 } else { if (d.CurrentItem < 1) d.CurrentItem = d.TotalItems } } iwkArticleCarousel_SetDetails(e, d.CurrentItem, d); switch (b) { case "Up": setPosition(d.ID + "_moveblock" + e, pixelsToInt(d.Height), 0); iwkArticleCarousel_MoveBlocksTop(-2, d); break; case "Down": setPosition(d.ID + "_moveblock" + e, pixelsToInt(d.Height) * -1, 0); iwkArticleCarousel_MoveBlocksTop(2, d); break; case "Left": setPosition(d.ID + "_moveblock" + e, 0, pixelsToInt(d.Width)); iwkArticleCarousel_MoveBlocksLeft(-2, d); break; case "Right": setPosition(d.ID + "_moveblock" + e, 0, pixelsToInt(d.Width) * -1); iwkArticleCarousel_MoveBlocksLeft(2, d); break } a = e } } else { setPosition(d.ID + "_moveblockB", pixelsToInt(d.Height), 0); $("#" + d.ID + "_controlItemA").show(); $("#" + d.ID + "_controlItemB").show(); $("#" + d.ID + "_controlholder").fadeIn("slow"); d.Loaded = true } if (d.TotalItems > 1) $(this).delay(d.EffectTime, function () { iwkArticleCarousel_Slide(a, b, c, d) }) } function iwkArticleCarousel_Fade(a) { if (a.EffectOn == true) { if (a.Loaded == true) { $("#" + a.ID + "_controlItem").fadeOut("slow", function () { a.CurrentItem += 1; if (a.CurrentItem > a.TotalItems) a.CurrentItem = 1; iwkArticleCarousel_SetDetails("", a.CurrentItem, a); $("#" + a.ID + "_controlItem").fadeIn("slow") }) } else { $("#" + a.ID + "_controlholder").fadeIn("slow"); a.Loaded = true } } if (a.TotalItems > 1) $(this).delay(a.EffectTime, function () { iwkArticleCarousel_Fade(a) }) } function iwkArticleCarousel_AddItem(a, b, c) { $("#" + a).append("<div id='" + c.ID + "_controlItem" + b + "' class='CarouselItem'></div>"); $("#" + c.ID + "_controlItem" + b).css("width", c.Width); $("#" + c.ID + "_controlItem" + b).append("<h4><a id='" + c.ID + "_title" + b + "' class='ArticleCarouselTitle' ></a></h4>"); $("#" + c.ID + "_controlItem" + b).append("<div id='" + c.ID + "_date" + b + "' class='ArticleCarouselDate' ></div>"); $("#" + c.ID + "_controlItem" + b).append("<div id='" + c.ID + "_text" + b + "' class='ArticleCarouselText' ></div>"); if (c.ShowRedirect == true) { $("#" + c.ID + "_controlItem" + b).append("<div id='" + c.ID + "_redirectbutton" + b + "' class='RedirectButton' ></div>"); $("#" + c.ID + "_redirectbutton" + b).append("<a><span></span></a>") } if (c.Display == "Inline") { $("#" + c.ID + "_title" + b).css("float", "left"); $("#" + c.ID + "_date" + b).css("float", "left"); $("#" + c.ID + "_text" + b).css("float", "left"); $("#" + c.ID + "_redirectbutton" + b).css("float", "left") } } function iwkArticleCarousel_SetDetails(a, b, c) { $("#" + c.ID + "_title" + a).attr("href", c.RedirectPathArray[b]); iwkArticleCarousel_ValidateTitle(c.ID + "_title" + a, c.TitleArray[b], c); if (c.Display == "Inline") { $("#" + c.ID + "_date" + a).text(" (" + c.DateArray[b] + ") "); $("#" + c.ID + "_text" + a).text(c.TextArray[b] + " ") } else { $("#" + c.ID + "_date" + a).text(c.DateArray[b]); $("#" + c.ID + "_text" + a).text(c.TextArray[b]) } if (c.ShowRedirect == true) { $("#" + c.ID + "_redirectbutton" + a).children("a").attr("href", c.RedirectPathArray[b]); $("#" + c.ID + "_redirectbutton" + a).children("a").children("span").text(c.RedirectText) } } function setDisplay(a, b) { $("#" + a).css("display", b) } function InitArticleCarousel(a, b, c, d, e, f, g, h) { try { iwkArticleCarousel[iwkACKey(a)] = new iwkArticleCarousel_Struct(a, false, b, c, d, e, true, f, g, h) } catch (i) { iwkArticleCarousel = new Object; iwkArticleCarousel[iwkACKey(a)] = new iwkArticleCarousel_Struct(a, false, b, c, d, e, true, f, g, h) } var j = iwkArticleCarousel[iwkACKey(a)]; try { $(document).ready(function () { $("#" + j.ID).find(".Injector").remove(); $("#" + j.ID).append("<div id='" + j.ID + "_controlholder' class='CarouselHolder'></div>"); $("#" + j.ID + "_controlholder").hide(); $("#" + j.ID).append("<div id='" + j.ID + "_controlLoader' class='CarouselLoader'><div class='CarouselLoadContent'> </div></div>"); $("#" + j.ID + "_controlLoader").hide(); $("#" + j.ID + "_controlholder").css("width", j.Width); $("#" + j.ID + "_controlholder").css("height", j.Height); $("#" + j.ID + "_controlLoader").css("width", j.Width); $("#" + j.ID + "_controlLoader").css("height", j.Height); $("#" + j.ID + "_controlLoader").fadeIn("slow"); j.RedirectPathArray[0] = ""; j.TitleArray[0] = ""; j.TextArray[0] = ""; $("li").each(function () { if ($(this).parent().parent().attr("id") == j.ID) { j.TotalItems = j.TotalItems + 1; j.TitleArray[j.TotalItems] = $(this).children("h4").text(); j.RedirectPathArray[j.TotalItems] = $(this).children("h4").children("a").attr("href"); j.DateArray[j.TotalItems] = $(this).children("p:first").text(); j.TextArray[j.TotalItems] = $(this).children("p:last").text(); j.RedirectText = $(this).children("a").text(); $(this).hide() } }); $("#" + j.ID).append("<h4><div id='" + j.ID + "_titlevalidator' class='ArticleCarouselTitle'></div></h4>"); $("#" + j.ID + "_titlevalidator").hide(); $("#" + j.ID + "_titlevalidator").css("position", "absolute"); switch (j.Effect) { case "FadeInOut": j.CurrentItem = 1; iwkArticleCarousel_AddItem(j.ID + "_controlholder", "", j); iwkArticleCarousel_SetDetails("", 1, j); $("#" + j.ID + "_controlItem").hover(function () { j.EffectOn = false }, function () { j.EffectOn = true }); $("#" + j.ID + "_controlLoader").fadeOut("slow", function () { iwkArticleCarousel_Fade(j) }); break; case "SlideVerticalElastic": case "SlideVerticalUp": case "SlideVerticalDown": case "SlideHorizontalElastic": case "SlideHorizontalLeft": case "SlideHorizontalRight": $("#" + j.ID + "_controlholder").append("<div id='" + j.ID + "_moveblockA' class='CarouselMoveBlock'></div>"); $("#" + j.ID + "_moveblockA").css("position", "absolute"); setPosition(j.ID + "_moveblockA", 0, 0); j.CurrentItem = 1; iwkArticleCarousel_AddItem(j.ID + "_moveblockA", "A", j); iwkArticleCarousel_SetDetails("A", 1, j); $("#" + j.ID + "_controlholder").append("<div id='" + j.ID + "_moveblockB' class='CarouselMoveBlock'></div>"); $("#" + j.ID + "_moveblockB").css("position", "absolute"); iwkArticleCarousel_AddItem(j.ID + "_moveblockB", "B", j); $("#" + j.ID + "_controlItemA").hover(function () { j.EffectOn = false }, function () { j.EffectOn = true }); $("#" + j.ID + "_controlItemB").hover(function () { j.EffectOn = false }, function () { j.EffectOn = true }); switch (j.Effect) { case "SlideVerticalElastic": case "SlideVerticalDown": $("#" + j.ID + "_controlLoader").fadeOut("slow", function () { iwkArticleCarousel_Slide("A", "Down", 1, j) }); break; case "SlideVerticalUp": $("#" + j.ID + "_controlLoader").fadeOut("slow", function () { iwkArticleCarousel_Slide("A", "Up", 1, j) }); break; case "SlideHorizontalElastic": case "SlideHorizontalLeft": $("#" + j.ID + "_controlLoader").fadeOut("slow", function () { iwkArticleCarousel_Slide("A", "Left", 1, j) }); break; case "SlideHorizontalRight": $("#" + j.ID + "_controlLoader").fadeOut("slow", function () { iwkArticleCarousel_Slide("A", "Right", 1, j) }); break } break } }) } catch (i) { alert("Error in Article Carousel Control: Unable to load control \n\n" + i) } } function iwkArticleCarousel_Struct(a, b, c, d, e, f, g, h, i, j) { this.ID = a; this.Loaded = b; this.EffectOn = g; this.Display = e; this.Effect = f; this.EffectTime = h; this.EffectSpeed = i; this.ShowRedirect = j; this.TotalItems = 0; this.Width = c; this.Height = d; this.RedirectPathArray = new Array; this.TitleArray = new Array; this.DateArray = new Array; this.TextArray = new Array; this.RedirectText = ""; this.CurrentSlide = 0; this.CurrentItem = 0 } function iwkACKey(a) { var b = -1; try { var c; for (c = 0; c < iwkACControlKeys.length; c++) { if (iwkACControlKeys[c] == a) return c } iwkACControlKeys[c] = a; b = c } catch (d) { iwkACControlKeys = new Array; iwkACControlKeys[0] = a; b = 0 } return b } function mousewheelon() { } function mousewheeloff() { return false } function addPixels(a, b) { var c = pixelsToInt(a) + pixelsToInt(b); return c + "px" } function intToPixels(a) { return a + "px" } function pixelsToInt(a) { var b = a.substr(0, a.length - 2); return parseInt(b) } function setSizeClass(a, b, c) { $("." + a).width(b); $("." + a).height(c) } function setSize(a, b, c) { $("#" + a).width(b); $("#" + a).height(c) } function iwkGallery_SizeBind(a, b, c) { c.Width = a; c.Height = b; setSize(c.ID + "_imageholder", c.Width, c.Height); setSize(c.ID + "_imagefrontwarpper", c.Width, c.Height) } function iwkGallery_AutoPlay(a) { if (a.Playing == true && a.ChangeTime > 0) { if (a.CurrentPage * a.PageLimit + a.CurrentImage < a.ImageArray.length - 1) { if (a.CurrentImage < iwkGallery_PageImages(a) - 1) { a.CurrentImage = a.CurrentImage + 1; iwkGallery_ImageChange(a); iwkGallery_ValidateButtons(a) } else { iwkGallery_NextPage(a) } } else { a.CurrentImage = 0; a.CurrentPage = 0; iwkGallery_ImageChange(a); iwkGallery_ValidateButtons(a); iwkGallery_UpdateButtons(a) } } $(this).delay(a.ChangeTime, function () { iwkGallery_AutoPlay(a) }) } function iwkGallery_UpdateImageIndex(a, b) { a.CurrentImageIndex = b + a.CurrentPage * a.PageLimit } function iwkGallery_ReturnImage(a, b, c) { if (b == true) { var d = c.ThunbernailsArray[a + c.CurrentPage * c.PageLimit]; if (d.length > 0) { return d } else { return c.ImageArray[a + c.CurrentPage * c.PageLimit] } } else { return c.ImageArray[a + c.CurrentPage * c.PageLimit] } } function iwkGallery_ImageChange(a) { var b = $("#" + a.ID + "_imageholder").find(".ImageWarpper"); var c = $("#" + a.ID + "_imageholderfront").find(".ImageFrontWarpper"); var d = b.find("img"); var e = iwkGallery_ReturnImage(a.CurrentImage, false, a); if (d.length > 0) { c.find("img").detach(); d.show(); c.append(d); d.attr("class", "ImageBack") } e.css("visibility", "hidden"); e.attr("class", "Image"); b.append(e); e.css("margin-top", Math.abs((c.height() - e.height()) / 2) + "px"); e.hide(); e.css("visibility", ""); $("#" + a.ID + "_positionButtonsCenter").find(".PBL.Selected").removeClass("Selected"); $("#" + a.ID + "_button" + a.CurrentImage).find(".PBL").addClass("Selected"); if (a.Loaded == true) { d.fadeOut("slow"); e.fadeIn("slow") } else { $("#" + a.ID + "_Loader").fadeOut("slow", function () { setSize(a.ID + "_Loader", 0, 0); c.show(); b.show(); $("#" + a.ID + "_viewermenu").fadeIn("slow", function () { $("#" + a.ID + "_image").fadeIn("slow", function () { $("#" + a.ID + "_imageEnlargeTextBackground").show(); $("#" + a.ID + "_imageEnlargeText").show() }) }); a.Loaded = true }) } } function iwkGallery_PageImages(a) { if (a.CurrentPage + 1 < a.Pages) { return a.PageLimit } else { return a.ImageArray.length - (a.Pages - 1) * a.PageLimit } } function iwkGallery_UpdateButtons(a) { for (var b = 0; b < iwkGallery_PageImages(a); b++) { if (a.ThumbnailsButtons == true) { $("#" + a.ID + "_button" + b).find("img").detach(); $("#" + a.ID + "_button" + b).append(iwkGallery_ReturnImage(b, true, a)) } else { $("#" + a.ID + "_buttonlink" + b).text(numberZeroValidator(a.CurrentPage * a.PageLimit + b + 1)) } } } function iwkGallery_ValidateButtons(a) { if (a.CurrentPage == 0 && a.CurrentImage == 0) { $("#" + a.ID + "_buttonPrevious").css("display", "none"); $("#" + a.ID + "_buttonPreviousDisabled").css("display", "table-cell") } else { $("#" + a.ID + "_buttonPrevious").css("display", "table-cell"); $("#" + a.ID + "_buttonPreviousDisabled").css("display", "none") } if (a.CurrentPage == 0) { $("#" + a.ID + "_buttonPreviousPage").css("display", "none"); $("#" + a.ID + "_buttonPreviousPageDisabled").css("display", "table-cell") } else { $("#" + a.ID + "_buttonPreviousPage").css("display", "table-cell"); $("#" + a.ID + "_buttonPreviousPageDisabled").css("display", "none") } if (a.CurrentPage == a.Pages - 1 && a.CurrentImage == a.ImageArray.length - a.CurrentPage * a.PageLimit - 1) { $("#" + a.ID + "_buttonNext").css("display", "none"); $("#" + a.ID + "_buttonNextDisabled").css("display", "table-cell") } else { $("#" + a.ID + "_buttonNext").css("display", "table-cell"); $("#" + a.ID + "_buttonNextDisabled").css("display", "none") } var b = a.ImageArray.length - (a.Pages - 1) * a.PageLimit; if (a.CurrentPage == a.Pages - 1) { $("#" + a.ID + "_buttonNextPage").css("display", "none"); $("#" + a.ID + "_buttonNextPageDisabled").css("display", "table-cell"); for (var c = b; c < a.PageLimit; c++) { $("#" + a.ID + "_button" + c).css("display", "none") } } else { $("#" + a.ID + "_buttonNextPage").css("display", "table-cell"); $("#" + a.ID + "_buttonNextPageDisabled").css("display", "none"); for (var c = b; c < a.PageLimit; c++) { $("#" + a.ID + "_button" + c).css("display", "block") } } } function numberZeroValidator(a) { var b; if (a < 10) b = "0" + a; else b = a; return b } function iwkGallery_PreviousPage(a) { if (a.CurrentPage > 0) { previousImage = a.CurrentImage; a.CurrentImage = a.PageLimit - 1; a.CurrentPage = a.CurrentPage - 1; iwkGallery_ValidateButtons(a); iwkGallery_UpdateButtons(a); iwkGallery_ImageChange(a) } } function iwkGallery_NextPage(a) { if (a.CurrentPage < a.Pages - 1) { previousImage = a.CurrentImage; a.CurrentImage = 0; a.CurrentPage = a.CurrentPage + 1; iwkGallery_ImageChange(a); iwkGallery_ValidateButtons(a); iwkGallery_UpdateButtons(a) } } function iwkGallery_GetButtonPosByID(a, b) { var c = 0; for (var d = 0; d < iwkGallery_PageImages(b); d++) { if (a == b.ID + "_button" + d || a == b.ID + "_buttonlink" + d || a == b.ID + "_imagebutton" + d) c = d } return c } function iwkGallery_UpdateFullSiseImage(a) { $(".FullImage").fadeOut("slow", function () { $(".FullImage").attr("style", "display:none"); var b = a.ImageArray.length - 1; if (a.CurrentImageIndex > b) { a.CurrentImageIndex = b } if (a.CurrentImageIndex < 0) { a.CurrentImageIndex = 0 } if (a.CurrentImageIndex == 0) { $(".ButtonPrevious").hide() } else { $(".ButtonPrevious").show() } if (a.CurrentImageIndex == b) { $(".ButtonNext").hide() } else { $(".ButtonNext").show() } $(".FullImage").attr("src", a.ImageArray[a.CurrentImageIndex].src); $(".FullImage").attr("alt", a.AltTextArray[a.CurrentImageIndex]); if (a.DescriptionArray[a.CurrentImageIndex].length > 0) { $(".BMidleMidle").children("span").text(a.DescriptionArray[a.CurrentImageIndex]) } else { $(".BMidleMidle").children("span").text(a.Locate.fullimage[1]) } $(".ImagesNumberText").text(a.Locate.fullimage[5] + " " + (a.CurrentImageIndex + 1) + " " + a.Locate.fullimage[6] + " " + a.ImageArray.length) + " " }) } function iwkGallery_LoadedFullSiseImage(a, b, c) { if ($(".FullImage").width() == b && $(".FullImage").height() == c) { $(".FullImage").fadeIn("slow") } else { $(this).delay(300, function () { iwkGallery_LoadedFullSiseImage(a) }) } } function iwkGallery_LoadFullSiseImage(a) { if ($(".FullImage").height() > 0) { var b = intToPixels($(".FullImage").width()); var c = intToPixels($(".FullImage").height()); var d = $(window).height(); var e = $(window).width(); if (pixelsToInt(c) > d - 60) { b = intToPixels(pixelsToInt(b) * ((d - 60) / pixelsToInt(c)) | 0); c = intToPixels(d - 60) } if (pixelsToInt(b) > e - 60) { c = intToPixels(pixelsToInt(c) * ((e - 60) / pixelsToInt(b)) | 0); b = intToPixels(e - 60) } setSizeClass("FullImage", b, c); setSizeClass("MidleImage", b, c); iwkGallery_LoadedFullSiseImage(a, pixelsToInt(b), pixelsToInt(c)) } else { $(this).delay(300, function () { iwkGallery_LoadFullSiseImage(a) }) } } function iwkGallery_FullImage(a) { document.onmousewheel = mousewheeloff; $("#" + a.ID + "_imageEnlarged").remove(); $("#" + a.ID + "_imageEnlargedBackground").remove(); iwkGallery_UpdateImageIndex(a, a.CurrentImage); $("body").append("<div id= '" + a.ID + "_imageEnlargedBackground' class='GalleryImageEnlargedBackground'></div>"); $("body").append("<div id= '" + a.ID + "_imageEnlarged' class='GalleryImageEnlarged'></div>"); var b = $(document).scrollTop(); $("body").css("overflow", "hidden"); $("#" + a.ID + "_imageEnlarged").append("<table class='GalleryFullImageFrame'></table>"); $(".GalleryFullImageFrame").append("<tr><td class='TopLeft'> </td><td class='TopMidle'> </td><td class='TopRight'> </td></tr>"); $(".GalleryFullImageFrame").hide(); $(".GalleryFullImageFrame").append("<tr><td class='MidleLeft'> </td><td class='MidleImage'><img class='FullImage' src='' /></td><td class='MidleRight'> </td></tr>"); $(".GalleryFullImageFrame").append("<tr><td class='BLeft'> </td><td class='BMidle'></td><td class='BRight'> </td></tr>"); $(".MidleImage").prepend("<div class='ButtonPrevious'><div class='ButtonPreviousContent'>" + a.Locate.fullimage[4] + "</div><div class='ButtonPreviousHead'> </div></div><div class='ButtonNext'><div class='ButtonNextHead'> </div><div class='ButtonNextContent'>" + a.Locate.fullimage[3] + "</div></div><div class='ImagesNumbers'><div class='ImagesNumbersCenter'><div class='ImagesNumberHead'> </div><div class='ImagesNumberContent'><div class='ImagesNumberText'>" + a.Locate.fullimage[5] + " " + (a.CurrentImageIndex + 1) + " " + a.Locate.fullimage[6] + " " + a.ImageArray.length + "<div></div></div></div>"); $(".BMidle").append("<div class='BMidleUp'> </div>"); $(".BMidle").append("<table><tr><td class='BMidleLeft'> </td><td class='BMidleMidle'><span>" + a.DescriptionArray[a.CurrentImageIndex] + "</span></td><td class='BMidleRight'> </td></tr></table>"); $(".BMidleMidle").append("<div class='SimpleButton'><span>" + a.Locate.fullimage[2] + "   x " + "</span></div>"); setSizeClass("MidleImage", 300, 200); $("#" + a.ID + "_imageEnlargedBackground").css("top", b.toString() + "px"); $("#" + a.ID + "_imageEnlarged").css("top", b.toString() + "px"); $(".SimpleButton").click(function () { $("#" + a.ID + "_imageEnlarged").remove(); $("#" + a.ID + "_imageEnlargedBackground").remove(); document.onmousewheel = mousewheelon; $("body").css("overflow", ""); return false }); $(".ButtonPrevious").click(function () { a.CurrentImageIndex -= 1; iwkGallery_UpdateFullSiseImage(a); return false }); $(".ButtonNext").click(function () { a.CurrentImageIndex += 1; iwkGallery_UpdateFullSiseImage(a); return false }); iwkGallery_UpdateFullSiseImage(a); $(".GalleryFullImageFrame").fadeIn("slow") } function iwkGallery_AutoPlayPlay(a) { a.Playing = true; $("#" + a.ID + "_buttonPlay").hide(); $("#" + a.ID + "_buttonPause").show() } function iwkGallery_AutoPlayPause(a) { a.Playing = false; $("#" + a.ID + "_buttonPlay").show(); $("#" + a.ID + "_buttonPause").hide() } function SetupYSImageViewer(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) { try { iwkGallery[iwkGallery_Key(a)] = new iwkGallery_Struct(a, false, f, i, g, h, b, c, d, e, k, l, m, n, o) } catch (p) { iwkGallery = new Object; iwkGallery[iwkGallery_Key(a)] = new iwkGallery_Struct(a, false, f, i, g, h, b, c, d, e, k, l, m, n, o) } var q = iwkGallery[iwkGallery_Key(a)]; try { $(document).ready(function () { $("#" + q.ID).hide(); var b = ""; if (q.ThumbnailsButtons == true) { b = "ThumbnailsButtons" } else { } $("#" + q.ID).append("<div id= '" + q.ID + "_imageholder' class='ImageHolder'></div>"); $("#" + q.ID).append("<div id= '" + q.ID + "_imageholderfront' class='ImageHolderFront'></div>"); $("#" + q.ID + "_imageholderfront").append("<div id= '" + q.ID + "_imagefrontwarpper' class='ImageFrontWarpper'></div>"); if (q.Enlarge == true) { $("#" + q.ID + "_imageholder").append("<div id= '" + q.ID + "_imageEnlargeTextWarpper' class='ImageEnlargeTextWarpper'> </div>"); $("#" + q.ID + "_imageEnlargeTextWarpper").append("<div id= '" + q.ID + "_imageEnlargeTextBackground' class='ImageEnlargeTextBackground'> </div>"); $("#" + q.ID + "_imageEnlargeTextBackground").hide(); $("#" + q.ID + "_imageEnlargeTextWarpper").append("<div id= '" + q.ID + "_imageEnlargeText' class='ImageEnlargeText'>" + q.Locate.fullimage[0] + "</div>"); $("#" + q.ID + "_imageEnlargeText").hide(); setSize(q.ID + "_imageEnlargeTextWarpper", q.Width, q.Height) } $("#" + q.ID + "_imageholder").append("<div class='ImageWarpper'></div>"); $("#" + a).append("<div id= '" + q.ID + "_viewermenu' class='ViewerMenu" + b + "'></div>"); $("#" + q.ID + "_viewermenu").hide(); $("#" + q.ID).append("<div id='" + q.ID + "_Loader' class='GalleryLoader'></div>"); if (q.ThumbnailsButtons == true) { setSize(q.ID + "_Loader", q.Width, addPixels(q.Height, "55px")) } else { setSize(q.ID + "_Loader", q.Width, addPixels(q.Height, "24px")) } setSize(q.ID + "_viewermenu", q.Width, ""); $("#" + a).append("<div id= '" + q.ID + "_imageholderPreview' class='imageHolderPreview'></div>"); setSize(q.ID + "_imageholderPreview", intToPixels(pixelsToInt(q.Width) * j * .01 | 0), intToPixels(pixelsToInt(addPixels(q.Height, "24px")) * j * .01 | 0)); $("#" + q.ID + "_imageholderPreview").hide(); $("#" + q.ID).fadeIn("slow"); $("#" + a).append("<div id= '" + q.ID + "_imageholderPreviewCursor' class='imageHolderPreviewCursor'></div>"); $("#" + q.ID + "_imageholderPreviewCursor").hide(); $("#" + q.ID + "_viewermenu").append("<table cellpadding='0' cellspacing='0' class='MenuTable'><tr id= '" + q.ID + "_menuTable'></tr></table>"); $("#" + q.ID + "_menuTable").append("<td><div id= '" + q.ID + "_positionPreviousPage' class='PositionPreviousPage'></div></td>"); $("#" + q.ID + "_positionPreviousPage").append("<div id= '" + q.ID + "_buttonPreviousPage' class='ButtonPreviousPage' > </div><div id= '" + q.ID + "_buttonPreviousPageDisabled' class='ButtonPreviousPageDisabled' > </div>"); $("#" + q.ID + "_buttonPreviousPage").attr("title", q.Locate.menu.previouspage); $("#" + q.ID + "_buttonPreviousPageDisabled").hide(); $("#" + q.ID + "_menuTable").append("<td><div id= '" + q.ID + "_positionPrevious' class='PositionPrevious'></div></td>"); $("#" + q.ID + "_positionPrevious").append("<div id= '" + q.ID + "_buttonPrevious' class='ButtonPrevious' > </div><div id= '" + q.ID + "_buttonPreviousDisabled' class='ButtonPreviousDisabled' > </div>"); $("#" + q.ID + "_buttonPrevious").attr("title", q.Locate.menu.previous); $("#" + q.ID + "_buttonPreviousDisabled").hide(); $("#" + q.ID + "_menuTable").append("<td><div id= '" + q.ID + "_positionButtonsLeftBorder' class='PositionButtonsLeftBorder' ></td><td class='PositionButtons'><table cellpadding='0' cellspacing='0' class='PositionButtonsCenter'><tr id= '" + q.ID + "_positionButtonsCenter'></tr></table></td><td><div id= '" + q.ID + "_positionButtonsRightBorder' class='PositionButtonsRightBorder' ></td>"); $("#" + q.ID + "_menuTable").append("<td><div id= '" + q.ID + "_positionNext' class='PositionNext'></div></td>"); $("#" + q.ID + "_positionNext").append("<div id= '" + q.ID + "_buttonNext' class='ButtonNext' > </div><div id= '" + q.ID + "_buttonNextDisabled' class='ButtonNextDisabled' > </div>"); $("#" + q.ID + "_buttonNext").attr("title", q.Locate.menu.next); $("#" + q.ID + "_buttonNextDisabled").hide(); $("#" + q.ID + "_menuTable").append("<td><div id= '" + q.ID + "_positionNextPage' class='PositionNextPage'></div></td>"); $("#" + q.ID + "_positionNextPage").append("<div id= '" + q.ID + "_buttonNextPage' class='ButtonNextPage' > </div><div id= '" + q.ID + "_buttonNextPageDisabled' class='ButtonNextPageDisabled' > </div>"); $("#" + q.ID + "_buttonNextPage").attr("title", q.Locate.menu.nextpage); $("#" + q.ID + "_buttonNextPageDisabled").hide(); $("#" + q.ID + "_menuTable").append("<td><div id= '" + q.ID + "_autoplaymenu' class='AutoPlayMenu'></div></td>"); $("#" + q.ID + "_autoplaymenu").append("<div id= '" + q.ID + "_buttonPlay' class='buttonPlay'></div><div id= '" + q.ID + "_buttonPause' class='buttonPause'></div>"); $("#" + q.ID + "_buttonPause").attr("title", q.Locate.menu.pause); $("#" + q.ID + "_buttonPlay").attr("title", q.Locate.menu.play); if (q.ChangeTime <= 0) { $("#" + q.ID + "_buttonPause").hide(); $("#" + q.ID + "_buttonPlay").hide() } else { if (q.Playing != true) $("#" + q.ID + "_buttonPause").hide(); else $("#" + q.ID + "_buttonPlay").hide() } if (q.ChangeTime <= 0) $("#" + q.ID + "_buttonPlay").hide(); for (var c = 0; c < iwkGallery_PageImages(q); c++) { $("#" + q.ID + "_positionButtonsCenter").append("<td><div id= '" + q.ID + "_button" + c + "' class='PBL PositionButton'></div></td>"); if (q.ThumbnailsButtons == true) { var d = iwkGallery_ReturnImage(c, true, q); d.addClass("ImageButton"); $("#" + q.ID + "_button" + c).append(d) } else { $("#" + q.ID + "_button" + c).append("<a id= '" + q.ID + "_buttonlink" + c + "' class='PBL PositionButtonLink'  href='javascript:__doPostBack('someID','')' >" + numberZeroValidator(c + 1) + "</a>") } } iwkGallery_SizeBind(q.Width, q.Height, q); for (var c = 0; c < iwkGallery_PageImages(q); c++) { $("#" + q.ID + "_button" + c).click(function (a) { var b = a.target.id; previousImage = q.CurrentImage; q.CurrentImage = iwkGallery_GetButtonPosByID(b, q); iwkGallery_ImageChange(q); iwkGallery_ValidateButtons(q); if (q.Playing == true) iwkGallery_AutoPlayPause(q); return false }); $("#" + q.ID + "_button" + c).hover(function (a) { q.CurrentThunbernail = a.target.id; if (q.ShowThunbernails == true) { $("#" + q.ID + "_imageholderPreview").find("img").detach(); $("#" + q.ID + "_imageholderPreview").append(iwkGallery_ReturnImage(iwkGallery_GetButtonPosByID(q.CurrentThunbernail, q), true, q)); $("#" + q.ID + "_imageholderPreview").show(); $("#" + q.ID + "_imageholderPreviewCursor").show(); var b = $("#" + q.ID + "_buttonlink" + iwkGallery_GetButtonPosByID(q.CurrentThunbernail, q)).offset(); var c = $("#" + q.ID).offset(); $("#" + q.ID + "_imageholderPreview").css("top", b.top - $("#" + q.ID + "_imageholderPreview").height() - 10 - c.top + "px"); $("#" + q.ID + "_imageholderPreview").css("left", b.left - ($("#" + q.ID + "_imageholderPreview").width() / 2 | 0) + 8 - c.left + "px"); $("#" + q.ID + "_imageholderPreviewCursor").css("top", b.top - $("#" + q.ID + "_imageholderPreviewCursor").height() - c.top + "px"); $("#" + q.ID + "_imageholderPreviewCursor").css("left", b.left - ($("#" + q.ID + "_imageholderPreviewCursor").width() / 2 | 0) + 8 - c.left + "px") } }, function (a) { if (q.ShowThunbernails == true) { $("#" + q.ID + "_imageholderPreview").hide(); $("#" + q.ID + "_imageholderPreviewCursor").hide() } }) } $("#" + q.ID + "_buttonNextPage").click(function () { iwkGallery_NextPage(q); if (q.Playing == true) iwkGallery_AutoPlayPause(q) }); $("#" + q.ID + "_buttonNext").click(function () { if (q.CurrentImage < iwkGallery_PageImages(q) - 1) { previousImage = q.CurrentImage; q.CurrentImage = q.CurrentImage + 1; iwkGallery_ImageChange(q); iwkGallery_ValidateButtons(q) } else { iwkGallery_NextPage(q) } if (q.Playing == true) iwkGallery_AutoPlayPause(q) }); $("#" + q.ID + "_buttonPrevious").click(function () { if (q.CurrentImage > 0) { previousImage = q.CurrentImage; q.CurrentImage = q.CurrentImage - 1; iwkGallery_ImageChange(q); iwkGallery_ValidateButtons(q) } else { iwkGallery_PreviousPage(q) } if (q.Playing == true) iwkGallery_AutoPlayPause(q) }); $("#" + q.ID + "_buttonPreviousPage").click(function () { iwkGallery_PreviousPage(q); if (q.Playing == true) iwkGallery_AutoPlayPause(q) }); $("#" + q.ID + "_buttonPlay").click(function () { iwkGallery_AutoPlayPlay(q) }); $("#" + q.ID + "_buttonPause").click(function () { iwkGallery_AutoPlayPause(q) }); $(this).delay(q.ChangeTime, function () { iwkGallery_AutoPlay(q) }); if (q.Enlarge == true) { $("#" + q.ID + "_image").css("cursor", "pointer"); $("#" + q.ID + "_image").click(function () { iwkGallery_FullImage(q) }); $("#" + q.ID + "_imageEnlargeTextWarpper").click(function () { iwkGallery_FullImage(q) }) } iwkGallery_ImageChange(q); iwkGallery_ValidateButtons(q) }) } catch (p) { alert("Error in image control: Unable to load control \n\n" + p) } } function iwkGallery_Struct(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) { var p = 0; this.ID = a; this.Loaded = b; this.PageLimit = c; this.ShowThunbernails = d; if (f > 0) this.Playing = e; else this.Playing = false; this.ChangeTime = f; this.ImageArray = new Array; this.ThunbernailsArray = new Array; this.ThumbnailsButtons = o; if (this.ThumbnailsButtons == true) this.ShowThunbernails = false; this.AltTextArray = i; this.DescriptionArray = j; this.Height = l; this.Width = k; this.Enlarge = m; this.Locate = n; if (g.length != c) this.Pages = (g.length / c | 0) + 1; else this.Pages = g.length / c | 0; if ((this.Pages - 1) * c == g.length) this.Pages = this.Pages - 1; this.CurrentThunbernail = 0; this.CurrentImage = 0; this.CurrentPage = 0; this.CurrentImageIndex = 0; for (p = 0; p < g.length; p++) { var q = $("<img src='" + g[p] + "' style='max-width:" + k + "; max-height:" + l + "' />"); this.ImageArray.push(q); this.ThunbernailsArray.push($("<img src='" + h[p] + "' class='imagePreview' />")) } } function iwkGallery_Key(a) { var b = -1; try { var c; for (c = 0; c < iwkGallery_ControlKeys.length; c++) { if (iwkGallery_ControlKeys[c] == a) return c } iwkGallery_ControlKeys[c] = a; b = c } catch (d) { iwkGallery_ControlKeys = new Array; iwkGallery_ControlKeys[0] = a; b = 0 } return b } function bindspc(a, b) { $(document).ready(function () { if (!isUndefined(b) && !isUndefined(a)) { a.find(".Injector").remove(); var c = { options: { playing: true, loaded: false, firstrun: true, direction: -1, cellwidth: 0 }, properties: { base: undefined, pages: 0, current: 0, ppp: 0, count: 0, seen: 0, calculate: function () { var a = this.base; this.count = a.design.properties.length; this.ppp = a.parameters.Rows * a.parameters.Columns; this.pages = Math.ceil(this.count / this.ppp) } }, parameters: b.Parameters, statistic: b.Statistic, locate: b.Locate, design: { me: a, carousel: a.find(".spcarousel"), rows: a.find(".rows"), rowtemplate: a.find(".row.Template"), celltemplate: a.find(".cell.Template"), properties: a.find(".item") }, addrow: function () { var a = this.design.rowtemplate.clone(); this.design.rows.append(a) }, animation: function () { var a = this; var b = new Array; switch (a.parameters.Effect) { case 0: if (a.options.playing) { var c = a.design.rows.find(".row"); var d = 0; var e = 0; var f = a.design.rows.find(".current"); f.removeClass("current"); for (var g = 1; g <= a.parameters.Columns * a.parameters.Rows; g++) { a.properties.current = a.properties.current + 1; if (a.properties.current > a.properties.count) { a.properties.current = 1; a.options.firstrun = false } a.design.properties.eq(a.properties.current - 1).hide(); a.design.properties.eq(a.properties.current - 1).css("position", "relative"); a.design.properties.eq(a.properties.current - 1).addClass("current"); pos = g - a.properties.ppp * Math.floor((g - 1) / a.properties.ppp); d = Math.ceil(pos / a.parameters.Columns); e = pos - (d - 1) * a.parameters.Columns; c.eq(d - 1).find(".cells").find(".cell").eq(e - 1).append(a.design.properties.eq(a.properties.current - 1).clone()); if (a.options.firstrun) { b.push(a.design.properties.eq(a.properties.current - 1).find("cite:first").text()) } } if (a.options.firstrun) { a.updatestats(b) } f.css("position", "absolute"); a.design.rows.find(".current").fadeIn("slow"); f.fadeOut("slow", function () { $(this).remove() }) } if (a.properties.pages > 1) { setTimeout(function () { a.animation() }, a.parameters.EffectTickTime) } break; case 1: case 2: case 3: if (a.properties.pages > 1) { if (a.options.playing) { var h = Math.ceil(a.properties.count / a.parameters.Rows); var c = a.design.rows.find(".row"); for (var g = 0; g < a.parameters.Rows; g++) { var i; if (a.options.direction == 1) { i = c.eq(g).find(".cell:last"); i.animate({ marginRight: a.options.cellwith * -1 + 1 }, a.parameters.EffectTickTime, function () { var b = $(this); var d = a.getrownumber(b); b.detach(); b.css("margin-right", ""); c.eq(d - 1).find(".cells").prepend(b); a.properties.seen++; if (a.options.firstrun) { a.updatestats([b.find("cite:first").text()]) } if (d == a.parameters.Rows) { if (a.properties.seen > a.parameters.Rows * (h - a.parameters.Columns)) { if (a.parameters.Effect == 1) { a.options.direction = -1; c.find(".cells").css("float", "") } a.options.firstrun = false; a.properties.seen = 0 } a.animation() } }) } else { i = c.eq(g).find(".cell:first"); i.animate({ marginLeft: a.options.cellwith * -1 + 1 }, a.parameters.EffectTickTime, function () { var b = $(this); var d = a.getrownumber(b); b.detach(); b.css("margin-left", ""); c.eq(d - 1).find(".cells").append(b); a.properties.seen++; if (a.options.firstrun) { a.updatestats([b.find("cite:first").text()]) } if (d == a.parameters.Rows) { if (a.properties.seen > a.parameters.Rows * h) { if (a.parameters.Effect == 1) { a.options.direction = 1; c.find(".cells").css("float", "right") } a.options.firstrun = false; a.properties.seen = 0 } a.animation() } }) } } } else { setTimeout(function () { a.animation() }, a.parameters.EffectTickTime) } } break; case 4: if (a.options.playing) { var f = a.design.properties.filter(".current"); f.removeClass("current"); a.properties.current = a.properties.current + 1; if (a.properties.current > a.properties.pages) { a.properties.current = 1; a.options.firstrun = false } for (g = 1; g <= a.properties.count; g++) { if (Math.floor((g - 1) / a.properties.ppp) + 1 == a.properties.current) { a.design.properties.eq(g - 1).css("position", "relative"); a.design.properties.eq(g - 1).addClass("current"); if (a.options.firstrun) { b.push(a.design.properties.eq(g - 1).find("cite:first").text()) } } } if (a.options.firstrun) { a.updatestats(b) } f.css("position", "absolute"); a.design.properties.filter(".current").fadeIn(); f.fadeOut() } if (a.properties.pages > 1) { setTimeout(function () { a.animation() }, a.parameters.EffectTickTime) } break } }, getrownumber: function (a) { return parseInt(a.attr("row")) }, bindproperties: function (a) { var b = this; var c = new Array; var d = b.design.rows.find(".row"); var e = 0; var f = 0; var g; switch (b.parameters.Effect) { case 0: var h = 0; for (g = 1; g <= b.parameters.Rows; g++) { for (var i = 1; i <= b.parameters.Columns; i++) { d.eq(g - 1).find(".cells").append(b.design.celltemplate.clone()) } } b.design.properties.detach(); for (g = 1; g <= b.properties.count; g++) { if (g <= b.parameters.Columns * b.parameters.Rows) { h = g - b.properties.ppp * Math.floor((g - 1) / b.properties.ppp); e = Math.ceil(h / b.parameters.Columns); f = h - (e - 1) * b.parameters.Columns; b.design.properties.eq(g - 1).css("position", "relative"); b.design.properties.eq(g - 1).addClass("current"); d.eq(e - 1).find(".cells").find(".cell").eq(f - 1).append(b.design.properties.eq(g - 1).clone()); c.push(b.design.properties.eq(g - 1).find("cite:first").text()); b.properties.current = g } else { b.design.properties.eq(g - 1).hide() } } b.updatestats(c); if (b.properties.pages > 1) { setTimeout(function () { b.animation() }, b.parameters.EffectTickTime) } break; case 1: case 2: case 3: var j = Math.ceil(b.properties.count / b.parameters.Rows); for (g = 1; g <= b.properties.count; g++) { e = Math.ceil(g / j); var k = b.design.celltemplate.clone(); d.eq(e - 1).find(".cells").append(k); k.append(b.design.properties.eq(g - 1)); k.attr("row", e) } b.options.cellwith = d.eq(0).find(".cell:first").width(); d.width(b.options.cellwith * b.parameters.Columns); var l = d.eq(b.parameters.Rows - 1).find(".cell").length < d.eq(0).find(".cell").length; if (l > 0) { for (g = 0; g < l; g++) { var m = d.eq(b.parameters.Rows - 1).find(".cells").eq(g).clone(); d.eq(b.parameters.Rows - 1).find(".cells").append(m) } } if (b.parameters.Effect == 3) { b.options.direction = 1; d.find(".cells").css("float", "right") } else { b.options.direction = -1 } setTimeout(function () { b.animation() }, b.parameters.EffectTickTime); break; case 4: var h = 0; for (g = 1; g <= b.parameters.Rows; g++) { for (var i = 1; i <= b.parameters.Columns; i++) { d.eq(g - 1).find(".cells").append(b.design.celltemplate.clone()) } } for (g = 1; g <= b.properties.count; g++) { h = g - b.properties.ppp * Math.floor((g - 1) / b.properties.ppp); e = Math.ceil(h / b.parameters.Columns); f = h - (e - 1) * b.parameters.Columns; d.eq(e - 1).find(".cells").find(".cell").eq(f - 1).append(b.design.properties.eq(g - 1)); b.design.properties.eq(g - 1).hide() } setTimeout(function () { b.animation() }, b.parameters.EffectTickTime); break } }, noproperties: function () { var a = this; a.design.me.removeClass("loading"); a.design.me.addClass("NoProperties") }, afterload: function () { var a = this; a.design.me.removeClass("loading"); a.design.carousel.css("visibility", ""); a.design.carousel.css("visibility", ""); a.options.loaded = true }, updatestats: function d(a) { var b = this; if (b.statistic.Update && a.length > 0 && b.statistic.Handler.path.length > 0) { var c = new Date + (new Date).getMilliseconds(); urlstring = b.statistic.Handler.path + "?" + b.statistic.Handler.plkey + "=" + (typeof a == "Array" ? a.join(",") : a) + "&" + b.statistic.Handler.stkey + "=" + b.statistic.Type + "&anticache=" + c; $.ajaxSetup({ scriptCharset: "utf-8", contentType: "application/json; charset=utf-8" }); return $.getJSON(urlstring) } }, init: function () { var a = this; a.design.me.find(".properties").css("visibility", "hidden"); a.design.me.find(".properties").show(); a.design.me.css("visibility", ""); a.properties.base = this; a.properties.calculate(); if (a.properties.count > 0) { a.design.celltemplate.detach(); a.design.celltemplate.removeClass("Template"); a.design.rowtemplate.detach(); a.design.rowtemplate.removeClass("Template"); a.design.properties.detach(); for (var b = 0; b < a.parameters.Rows; b++) { a.addrow() } a.bindproperties(); a.design.me.hover(function () { a.options.playing = false }, function () { a.options.playing = true }); if (!a.options.loaded) { a.afterload() } } else { a.noproperties() } } }; c.init() } }) } function isUndefinedOrNull(a) { if (isUndefined(a)) return true; return a == null } function isNull(a) { return a == null } function isUndefined(a) { return typeof a == "undefined" } function SetupNewsletter(a, b) { $(document).ready(function () { var c = "#" + a + "_btnSubscribe"; var d = "#" + a + "_txtEmail"; $(d).toggleVal(); $(c).click(function () { if ($(d).val() == b || $(d).val() == "") { return false } }) }) } function SetupSearchByReference(a) { $(document).ready(function () { var b = "#" + a + "_btnSearch"; var c = "#" + a + "_txtReference"; $(b).click(function () { if ($(c).val() == "") { return false } }) }) } jQuery.fn.delay = function (a, b) { this.each(function () { setTimeout(b, a) }); return this }; Array.prototype.indexOf = function (a) { for (var b = 0; b < this.length; b++) { if (this[b] == a) { return b } } return -1 }; var iwkGallery; var iwkGallery_ControlKeys; var iwkArticleCarousel; var iwkACControlKeys; (function (a) { a.fn.toggleVal = function (b) { if (!b || typeof b == "object") { b = a.extend({ focusClass: "tv-focused", changedClass: "tv-changed", populateFrom: "default", text: null, removeLabels: false }, b) } else if (typeof b == "string" && b.toLowerCase() == "destroy") { var c = true } return this.each(function () { if (c) { a(this).unbind("focus.toggleval").unbind("blur.toggleval").removeData("defText"); return false } var d = ""; switch (b.populateFrom) { case "alt": d = a(this).attr("alt"); a(this).val(d); break; case "label": d = a("label[for='" + a(this).attr("id") + "']").text(); a(this).val(d); break; case "custom": d = b.text; a(this).val(d); break; default: d = a(this).val() } a(this).addClass("toggleval").data("defText", d); if (b.removeLabels == true) { a("label[for='" + a(this).attr("id") + "']").remove() } a(this).bind("focus.toggleval", function () { if (a(this).val() == a(this).data("defText")) { a(this).val("") } a(this).addClass(b.focusClass).removeClass(b.changedClass) }).bind("blur.toggleval", function () { if (a(this).val() == "") { a(this).val(a(this).data("defText")) } a(this).removeClass(b.focusClass); if (a(this).val() != a(this).data("defText")) { a(this).addClass(b.changedClass) } else { a(this).removeClass(b.changedClass) } }) }) } })(jQuery); (function (a) { a.fn.cjObjectScaler = function (b) { function f() { var b = a(d.elem)[0]; if (c.destObj === null || typeof c.method !== "string" || typeof a(c.destObj)[0] !== "object") { return } else { if (a(c.destObj).css("position") === "static") { a(c.destObj).css({ position: "relative" }) } if (c.fade > 0) { a(b).hide() } if (a(b)[0].nodeName === "IMG") { if (a(b).attr("complete")) { e(a(b)[0]) } else { a(b).load(function () { e(a(b)[0]) }) } } else { e(a(b)[0]) } } } function e(b) { var d = c.destObj, e = a(d).width(), f = a(d).height(), g, h, i, j, k; g = e / a(b).width(); h = f / a(b).height(); if (!a(b).hasClass("cf_image_scaler_fill") && (a(b).hasClass("cf_image_scaler_fit") || c.method === "fit")) { i = g < h ? g : h } else if (!a(b).hasClass("cf_image_scaler_fit") && (a(b).hasClass("cf_image_scaler_fill") || c.method === "fill")) { i = g > h ? g : h } j = parseInt(a(b).width() * i, 10); k = parseInt(a(b).height() * i, 10); a(b).css({ width: j + "px", height: k + "px", position: "absolute", top: parseInt((f - k) / 2, 10) + "px", left: parseInt((e - j) / 2, 10) + "px" }).attr({ width: j, height: k }); if (c.fade > 0) { a(b).fadeIn(c.fade) } } var c = { destObj: null, method: "fill", fade: 0 }; var d = { version: "2.0.0", elem: null }; if (b) { a.extend(c, b) } return this.each(function () { d.elem = this; f() }) } })(jQuery); jQuery.fn.delay = function (a, b) { this.each(function () { setTimeout(b, a) }); return this }; (function () { function c() { var a = ""; for (var b in this) if (typeof this[b] != "function") a += b + "=" + encodeURIComponent(this[b]) + "&"; return a.replace(/&$/, "") } function b() { var a = ""; for (var b in this) if (typeof this[b] != "function") a += b + '="' + this[b] + '" '; return a } var a; a = jQuery.fn.flash = function (b, c, d, e) { var f = d || a.replace; c = a.copy(a.pluginOptions, c); if (!a.hasFlash(c.version)) { if (c.expressInstall && a.hasFlash(6, 0, 65)) { var g = { flashvars: { MMredirectURL: location, MMplayerType: "PlugIn", MMdoctitle: jQuery("title").text()}} } else if (c.update) { f = e || a.update } else { return this } } b = a.copy(a.htmlOptions, g, b); return this.each(function () { f.call(this, a.copy(b)) }) }; a.copy = function () { var a = {}, b = {}; for (var c = 0; c < arguments.length; c++) { var d = arguments[c]; if (d == undefined) continue; jQuery.extend(a, d); if (d.flashvars == undefined) continue; jQuery.extend(b, d.flashvars) } a.flashvars = b; return a }; a.hasFlash = function () { if (/hasFlash\=true/.test(location)) return true; if (/hasFlash\=false/.test(location)) return false; var b = a.hasFlash.playerVersion().match(/\d+/g); var c = String([arguments[0], arguments[1], arguments[2]]).match(/\d+/g) || String(a.pluginOptions.version).match(/\d+/g); for (var d = 0; d < 3; d++) { b[d] = parseInt(b[d] || 0); c[d] = parseInt(c[d] || 0); if (b[d] < c[d]) return false; if (b[d] > c[d]) return true } return true }; a.hasFlash.playerVersion = function () { try { try { var a = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"); try { a.AllowScriptAccess = "always" } catch (b) { return "6,0,0" } } catch (b) { } return (new ActiveXObject("ShockwaveFlash.ShockwaveFlash")).GetVariable("$version").replace(/\D+/g, ",").match(/^,?(.+),?$/)[1] } catch (b) { try { if (navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin) { return (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]).description.replace(/\D+/g, ",").match(/^,?(.+),?$/)[1] } } catch (b) { } } return "0,0,0" }; a.htmlOptions = { height: 240, flashvars: {}, pluginspage: "http://www.adobe.com/go/getflashplayer", src: "#", type: "application/x-shockwave-flash", width: 320, _class: "myFlash", _borderWidth: 15 }; a.pluginOptions = { expressInstall: false, update: true, version: "6.0.65" }; a.replace = function (b) { this.innerHTML = '<div class="alt">' + this.innerHTML + "</div>"; jQuery(this).addClass("flash-replaced").prepend(a.transform(b)) }; a.update = function (a) { var b = String(location).split("?"); b.splice(1, 0, "?hasFlash=true&"); b = b.join(""); var c = '<p>This content requires the Flash Player. <a href="http://www.adobe.com/go/getflashplayer">Download Flash Player</a>. Already have Flash Player? <a href="' + b + '">Click here.</a></p>'; this.innerHTML = '<span class="alt">' + this.innerHTML + "</span>"; jQuery(this).addClass("flash-update").prepend(c) }; a.transform = function (a) { a.toString = b; var d = a.width - a._borderWidth; if (a.flashvars) a.flashvars.toString = c; return '<embed onclick="" id="' + a._class + '" ' + String(a) + ' wmode="transparent" class="' + a._class + '" style="width:' + d + 'px;" />' }; if (window.attachEvent) { window.attachEvent("onbeforeunload", function () { __flash_unloadHandler = function () { }; __flash_savedUnloadHandler = function () { } }) } })(); jQuery.jScale = { getnewSize: function (a, b) { var c = a == "w" ? "h" : "w"; if (typeof b == "undefined" || b == null) var d = this.ndimensions[c] * this.odimensions[a] / this.odimensions[c]; else var d = /%/.test(b) ? parseInt(b) / 100 * this.odimensions[a] : parseInt(b); this.ndimensions[a] = Math.round(d) }, getnewDimensions: function (a, b, c, d) { var e = a('<img src="' + b.src + '" style="position:absolute; top:0; left:0; visibility:hidden" />').prependTo("body"); this.odimensions = { w: e.width(), h: e.height() }; var f = this.odimensions.w > this.odimensions.h ? ["w", "h"] : ["h", "w"]; this.ndimensions = {}; if (typeof c.ls != "undefined") { c[f[0]] = c.ls; c[f[1]] = null } var g = c.w ? ["w", "h"] : c.h ? ["h", "w"] : []; if (g.length > 0) { this.getnewSize(g[0], c[g[0]]); this.getnewSize(g[1], c[g[1]]); var h = d || function () { }; if (c.speed > 0) a(b).animate({ width: this.ndimensions.w + "px", height: this.ndimensions.h + "px" }, c.speed, h); else { a(b).css({ width: this.ndimensions.w + "px", height: this.ndimensions.h + "px" }); h.call(b) } } e.remove() } }; jQuery.fn.jScale = function (a, b) { return this.each(function () { var c = this; if (typeof a == "undefined" || c.tagName != "IMG") return true; if (c.complete) { jQuery.jScale.getnewDimensions(jQuery, c, a, b) } else { $(this).bind("load", function () { jQuery.jScale.getnewDimensions(jQuery, c, a, b) }) } }) }
