﻿/* Core.Min.js */
function URLEncode(f) { var h = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_.!~*'()"; var b = "0123456789ABCDEF"; var e = f; var g = ""; for (var c = 0; c < e.length; c++) { var d = e.charAt(c); if (d == " ") { g += "+" } else { if (h.indexOf(d) != -1) { g += d } else { var a = d.charCodeAt(0); if (a > 255) { alert("Unicode Character '" + d + "' cannot be encoded using standard URL encoding.\n(URL encoding only supports 8-bit characters.)\nA space (+) will be substituted."); g += "+" } else { g += "%"; g += b.charAt((a >> 4) & 15); g += b.charAt(a & 15) } } } } return g } function InitializeRatingsControl(h) { var c = $(".wrapper_arrow_ratings"); var b, a, f, e, d; for (var g = 0; g < c.length; g++) { b = c[g]; if (b != null) { a = b.id; f = $("#" + a); e = $("#" + a + "-itemid").val(); if (!h || h == null) { d = f.position(); $(".rate_login").css({ left: d.left + 4 + "px", top: d.top - 2 + "px" }); $(".rate_message").css({ left: d.left + 4 + "px", top: d.top - 2 + "px" }) } f.fadeTo(250, 0.5); $.ajax({ type: "POST", url: "/resources/handlers/rating.ashx", data: "itemid=" + $("#" + a + "-itemid").val(), dataType: "json", success: function(i) { GetItemRating(i, (h != null) ? false : true) } }) } } } function GetItemRating(j, c) { var f = "rating-" + j.ItemId; var i = $("#" + f + "-voteup"); var a = $("#" + f + "-votedown"); var g = $("#" + f + "-voteupcount"); var h = $("#" + f + "-votedowncount"); var e = $("#voteimageup-" + j.ItemId); var d = $("#voteimagedown-" + j.ItemId); $("#" + f).fadeTo(250, 1); if (j != null) { if (j.VoteSuccess) { if (j.VoteDirection == 2) { var b = Number(g.text()); g.text(b + 1); h.text(j.VoteDistribution.VotesDown); i.toggleClass("rated", true); a.toggleClass("rated", false); g.fadeTo(250, 1) } else { if (j.VoteDirection == 1) { var b = Number(h.text()); g.text(j.VoteDistribution.VotesUp); h.text(b + 1); i.toggleClass("rated", false); a.toggleClass("rated", true); h.fadeTo(250, 1) } } i.unbind("click"); a.unbind("click") } else { g.text(j.VoteDistribution.VotesUp); h.text(j.VoteDistribution.VotesDown) } if (c) { if (!j.HasVoted) { i.click(function() { SubmitVote(f, 2, j.IsAuthenticated) }); a.click(function() { SubmitVote(f, 1, j.IsAuthenticated) }); e.attr("src", "/resources/images/ui/icons/arrow-active-nr-up.png"); d.attr("src", "/resources/images/ui/icons/arrow-active-nr-down.png") } else { if (j.VoteDirection == 2) { i.addClass("rated"); e.attr("src", "/resources/images/ui/icons/arrow-inactive-rated-up.png") } else { if (j.VoteDirection == 1) { a.addClass("rated"); d.attr("src", "/resources/images/ui/icons/arrow-inactive-rated-down.png") } } } } } } function SubmitVote(c, f, a) { if (!a) { var h = $("#" + c + "-login"); h.fadeIn(500); h.mouseleave(function() { $(this).fadeOut(500) }) } else { voteId = $("#" + c + "-itemid").val(); var g = $("#voteimageup-" + voteId); var e = $("#voteimagedown-" + voteId); var d = $("#" + c + "-voteupcount"); var b = $("#" + c + "-votedowncount"); if (f == 2) { g.toggleClass("voteanimated"); g.attr("src", "/resources/images/ui/icons/icon-rate-up-ani.gif"); d.fadeTo(250, 0.5) } else { if (f == 1) { e.toggleClass("voteanimated"); e.attr("src", "/resources/images/ui/icons/icon-rate-down-ani.gif"); b.fadeTo(250, 0.5) } } $.ajax({ type: "POST", url: "/resources/handlers/rating.ashx", data: "itemid=" + $("#" + c + "-itemid").val() + "&rating=" + f, processData: false, dataType: "json", success: function(i) { GetItemRating(i, false) } }) } } function InitPage() { PageGate() } function SetPlayerTime(b) { var a = document.getElementById("SilverlightMediaPlayer"); if (a != null) { a.Content.Page.SetVideoTime(b) } window.location.hash = "videoplayer" };

/* CommunityBarMin.js */
var msc_menuDisplayTime, msc_displayTime, msc_speed, msc_wait; var msc_itemCount, msc_itemIndex, msc_links, msc_MouseIsOver, msc_isFirstTime; var msc_fadeOutElement, msc_fadeOutOpacity, msc_fadeInElement, msc_fadeInOpacity; var msc_isMouseOverLink; function msc_hideMenu() { if (!msc_MouseIsOver) { document.getElementById("cb_menu").style.display = "none" } else { setTimeout(msc_hideMenu, msc_menuDisplayTime * 500) } } function cb_showmenu() { var cbMenu; cbMenu = document.getElementById("cb_menu"); cbMenu.style.display = "block"; setTimeout(msc_hideMenu, msc_menuDisplayTime * 1000); msc_MouseIsOver = true } function msc_menuMouseOut() { msc_MouseIsOver = false; setTimeout(msc_hideMenu, msc_menuDisplayTime * 500) } function msc_menuMouseOver() { msc_MouseIsOver = true } function msc_setTitle(title) { window.title = title } function msc_mouseOverLink() { msc_isMouseOverLink = true } function msc_mouseOutLink() { msc_isMouseOverLink = false } function msc_rotateLinks() { if (!msc_isMouseOverLink) { var currentItemID = "cb_link" + msc_itemIndex; var currentItem = document.getElementById(currentItemID); if (currentItem && !msc_isFirstTime) { currentItem.style.display = "none" } msc_itemIndex++; if (msc_itemIndex > msc_itemCount) { msc_itemIndex = 1 } currentItemID = "cb_link" + msc_itemIndex; currentItem = document.getElementById(currentItemID); if (currentItem) { currentItem.style.display = msc_isFirstTime ? "inline" : "block" } } setTimeout(msc_rotateLinks, msc_displayTime * 1000) } function msc_initVar() { var e; msc_menuDisplayTime = 1; msc_displayTime = 10; msc_itemCount = 20; msc_itemIndex = Math.floor(Math.random() * msc_itemCount); msc_fadeOutElement = null; msc_fadeOutOpacity = null; msc_fadeInElement = null; msc_fadeInOpacity = null; msc_isFirstTime = true; msc_isMouseOverLink = false; msc_rotateLinks(); msc_isFirstTime = false; msc_MouseIsOver = false; for (var i = 1; i <= msc_itemCount; i++) { e = document.getElementById("cb_link" + i.toString()); if (e) { e.onmouseover = msc_mouseOverLink; e.onmouseout = msc_mouseOutLink } } } function msc_fadeOut(elementID, opacity) { if (elementID === undefined || elementID === null || opacity === undefined || opacity === null) { elementID = msc_fadeOutElement; if (msc_fadeOutOpacity === null) { opacity = 99 } else { opacity = msc_fadeOutOpacity } } else { msc_fadeOutElement = elementID } if (opacity >= 5) { msc_setOpacity(elementID, opacity); opacity -= 4; msc_fadeOutOpacity = opacity; setTimeout(msc_fadeOut, 50) } else { msc_fadeOutElement = null; msc_fadeOutOpacity = null; document.getElementById(elementID).style.display = "none" } } function msc_fadeIn(elementID, opacity) { if (elementID === undefined || elementID === null || opacity === undefined || opacity === null) { elementID = fadeInElement; if (msc_fadeInOpacity === null) { opacity = 0 } else { opacity = msc_fadeInOpacity } } else { msc_fadeInElement = elementID } if (opacity < 99) { msc_setOpacity(elementID, opacity); opacity += 4; msc_fadeInOpacity = opacity; setTimeout(msc_fadeIn, 50) } else { msc_fadeInElement = null; msc_fadeInOpacity = null; msc_setOpacity(elementID, 100) } } function msc_setOpacity(elementID, opacity) { var e = document.getElementById(elementID); if (e) { e.style.filter = "alpha(style = 0, opacity:" + opacity + ")"; e.style.KHTMLOpacity = opacity / 100; e.style.MozOpacity = opacity / 100; e.style.opacity = opacity / 100 } };