function Is() { var a = navigator.userAgent.toLowerCase(); this.major = parseInt(navigator.appVersion); this.minor = parseFloat(navigator.appVersion); this.ns = ((a.indexOf("mozilla") != -1) && (a.indexOf("spoofer") == -1) && (a.indexOf("compatible") == -1) && (a.indexOf("opera") == -1) && (a.indexOf("webtv") == -1)); this.ns2 = (this.ns && (this.major == 2)); this.ns3 = (this.ns && (this.major == 3)); this.ns4 = (this.ns && (this.major == 4)); this.ns6 = (this.ns && (this.major >= 5)); this.opera = (a.indexOf("opera") != -1); this.opera5 = (this.opera && (a.indexOf("msie 6") != -1)); this.ie = (a.indexOf("msie") != -1) && !this.opera; this.ie3 = (this.ie && (this.major < 4)); this.ie4 = (this.ie && (this.major == 4) && (a.indexOf("msie 5") == -1 && a.indexOf("msie 6") == -1)); this.ie5 = (this.ie && (this.major == 4) && (a.indexOf("msie 5") != -1)); this.ie6 = (this.ie && (this.major == 4) && (a.indexOf("msie 6") != -1)); this.ieX = (this.ie && !this.ie3 && !this.ie4); this.win = (a.indexOf("win") != -1); this.mac = (a.indexOf("mac") != -1); this.unix = (a.indexOf("x11") != -1) } var is = new Is(); if (is.ie5) { document.write('<link type="text/css" href="_css/ie5.css" rel="stylesheet">') } $(document).ready(function() { $("input:submit[value='Search']").click(function() { RedirectSearch($(".searchtextbox").attr("id")); return false }) }); function terms(a) { window.open(a + "/tos.htm", "terms", "width=500, height=600, resizable=yes, scrollbars=yes") } function screenViewer(a) { window.open("/screenviewer.aspx?p=" + a, "", "width=1045, height=768, resizable=yes, scrollbars=yes") } function giftHelp(a) { window.open(a + "/gifts.htm", "gifts", "width=630, height=600, resizable=yes, scrollbars=yes") } var punctuation = ".,;!? "; function trunc(c, b) { if (!b) { b = 20 } if (c.length <= b) { return c } var d = -1; for (var a = 0; a < b; a++) { if (punctuation.indexOf(c.charAt(a)) != -1) { d = a } } if (d == -1) { d = b - 1 } return "" + c.substr(0, d) + "..." } function publisher(a, c) { var b = '<a href="mailto'; b += ":" + a + "@"; b += "ign"; b += '.com"'; b += ">" + c + "<"; b += "/a>"; document.write(b) } function RedirectSearch(a) { location.replace("/Search.aspx?SearchTerm=" + escape($("#" + a).val())) } function verificationPop() { window.open("/verification/ver.htm", "ver", "width=270, height=150, resizable=no, scrollbars=no") } var useRecs = false; function displayRecs() { useRecs = true } function GetQueryStringValue(d, e) { var c = d.indexOf("?"); if (c > -1) { var a = d.substr(c + 1); var b = a.split("&"); for (i in b) { var f = b[i].split("="); if (f[0] == e) { return f[1] } } } return "" } sfHover = function() { var b = document.getElementById("nav").getElementsByTagName("LI"); for (var a = 0; a < b.length; a++) { b[a].onmouseover = function() { this.className += " sfhover" }; b[a].onmouseout = function() { this.className = this.className.replace(new RegExp(" sfhover\\b"), "") } } }; if (window.attachEvent) { window.attachEvent("onload", sfHover) } function GetProductRating(b, c) { var a = "/lab/ratings/GetProductRating.aspx?pid=" + b + "&suffix=" + c; $.getJSON(a, SetRating) } function SetRating(d) { var c = $("#RatingDiv"); var f = $("#RatingImage"); var e = $("#RatingName"); var a = $("#RatingDescriptors"); var b = $("#RatingInfo"); if (d.RatingID > 0) { f.html('<img src="/_img/ratings/' + d.SystemName + "/med/" + d.RatingCode + '.gif" />'); e.html("<b>Rating:</b> " + d.RatingName); a.html(d.RatingDescriptors); b.html(d.RatingInfo); c.show() } else { c.hide() } } var readerReviewUrl = "/jsonrequests/GetReaderReviews.aspx"; function GetScoreText(a, d) { var b = a.split(","); var c = b[parseInt(d)]; if (c != null) { return c } return "" } function GetAverageRatingInfo(c, a, b, d) { productd = a; gameId = b; reviewType = d; $.getJSON(readerReviewUrl, { gameId: gameId, op: 0, pageSize: 1, page: 1, reviewType: reviewType }, function(f) { if (f) { if (f.length > 0) { var e = $("#AverageRatingsMain"); var g = ""; g += CreateAverageRatingHtml(f[0], c); e.html(g) } } }) } function CreateAverageRatingHtml(b, a) { var c = ""; c += '<div class="review_rating">'; c += '<div class="review_avgrtg">'; c += '<div class="avg_rating_txt">AVERAGE D2D USER RATINGS</div>'; c += '<div class="avg_score_txt"><span id="readerReviewsAverage" >' + b.OverallAverage + '</span>&nbsp;<span id="readerReviewsScoreText" Class="score_type_txt">' + GetScoreText(a, b.OverallAverage) + "</span></div>"; c += '<div class="number_txt"><span id="readerReviewsTotal">' + b.TotalReviews + "</span>&nbsp;reader reviews</div>"; return c } function AddPostVote(b, d, c) { var a = $("#postedVoteNote"); $.ajax({ url: readerReviewUrl, type: "POST", data: "postId=" + b + "&isPositive=" + d + "&op=4", dataType: "json", error: function() { a.html("Vote unsuccessful!") }, success: function(e) { if (e) { if (c == e.TotalVotes) { if (e.HasVoted) { a.html("You have already voted.") } else { a.html("Vote unsuccessful!") } } else { a.html("Vote posted. Thanks! Results will not be immediately updated.") } } else { a.html("Vote unsuccessful!") } } }) } var quickLookArray = new Object(); var quickLookDelay = 750; var timeoutID = 0; var quickLookUrl = "/lab/quicklook/quicklook.aspx"; function StartQuickLook(b, a) { StartQuickLook(b, a, 0, 0) } function StartQuickLook(b, a, c) { StartQuickLook(b, a, 0, c) } function StartQuickLook(c, a, b, d) { getMousePos(c); timeoutID = setTimeout("GetQuickLook(" + a + ", " + b + ", " + d + ")", quickLookDelay) } function CancelQuickLook() { clearTimeout(timeoutID) } function GetQuickLook(a) { GetQuickLook(a, 0, 0) } function GetQuickLook(a, b) { GetQuickLook(a, 0, b) } function GetQuickLook(a, c, d) { var b; if ("p" + a in quickLookArray) { SetQuickLook(quickLookArray["p" + a], a, c, d); return } $.getJSON(quickLookUrl, { pid: a }, function(e) { if (e) { quickLookArray["p" + a] = e; SetQuickLook(e, a, c, d) } }) } function SetQuickLook(c, h, q, p) { var n = $("#QuickLookDiv"); var e = $("#quicklook_title"); var u = $("#quicklook_flv"); var j = $("#quicklook_summary"); var o = $("#quicklook_readMore"); var t = $("#quicklook_price"); var f = $("#quicklook_moreinfo"); var s = $("#quicklook_add"); var a = $("#QLRatingImage"); var m = $("#QLRatingName"); var g = $("#QLRatingDescriptors"); var k = $("#QLRatingInfo"); if (c) { e.html(c.Name); if (p > 0 && c.Summary.length > p) { j.html(c.Summary.substring(0, p) + "...") } else { j.html(c.Summary) } t.html("$" + c.Price.toFixed(2)); var l; if (c.SeoName.length > 0) { if (q > 0) { l = "http://" + document.domain + "/" + q + "/" + h + "/product/" + c.SeoName } else { l = "http://" + document.domain + "/" + h + "/product/" + c.SeoName } } else { l = "/product.aspx?pid=" + ProductID + "&gid=" + q } o.attr("href", l); f.attr("href", l); if (c.Availability == "Available") { s.attr("class", "addLg") } else { if (c.Availability == "Preorder") { s.attr("class", "preorderLg") } else { if (c.Availability == "Coming Soon") { s.attr("class", "comingSoonLg2") } } } if (typeof AddToCartJsonUrl == "undefined") { s.attr("href", "/addtocart.aspx?pid=" + h + "&gid=" + q) } else { s.attr("href", "javascript:addProductToCart(" + h + ", " + q + ");") } var b = "mediaURL=http://videos.direct2drive.com/^0/" + c.VideoLink + "_hi.flv"; var d = "mediaLink=" + l; var r = b + "&" + d; u.html('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="210" height="157" id="MyMovie" align="left"><param name="allowScriptAccess" value="always" /><param name="wmode" value="opaque" /><param name="movie" value="/Sites/RET/_swf/QuickLook/FLVPlaybackBasic.swf" /><param name="base" value="" /><param name="FlashVars" value="' + r + '" /><param name="quality" value="high" /><param name="bgcolor" value="#000000" /><embed src="/Sites/RET/_swf/QuickLook/FLVPlaybackBasic.swf" base="" FlashVars="' + r + '" quality="high" bgcolor="#000000" width="210" height="157" name="MyMovie" align="middle" wmode="opaque" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>'); a.html('<img src="/_img/ratings/' + c.Rating.SystemName + "/small/" + c.Rating.RatingCode + '.gif" />'); m.html("<b>Rating:</b> " + c.Rating.RatingName); g.html(c.Rating.RatingDescriptors); k.html(c.Rating.RatingInfo); n.css("top", mouseY + "px"); n.css("left", mouseX + "px"); n.show() } else { } } function HideQuickLook() { var a = $("#QuickLookDiv"); var b = $("#quicklook_flv"); a.hide(); b.html("") } var mouseX; var mouseY; function getMousePos(b) { var c = document.all ? true : false; if (c) { mouseX = event.clientX + document.body.scrollLeft + document.documentElement.scrollLeft; mouseY = event.clientY + document.body.scrollTop + document.documentElement.scrollTop } else { if ($.browser.mozilla && $.browser.version == "1.9.0.1") { mouseX = b.pageX + 150; mouseY = b.pageY } else { mouseX = b.pageX; mouseY = b.pageY } } var a = document.getElementById("divBody"); mouseX = mouseX - (a.offsetLeft + 50); mouseY = mouseY - (a.offsetTop + 300) } function domRollover() { if (navigator.userAgent.match(/Opera (\S+)/)) { var c = parseInt(navigator.userAgent.match(/Opera (\S+)/)[1]) } if (!document.getElementById || c < 7) { return } var a = document.getElementsByTagName("img"); var e = new Array(); var d = new Array(); var b = new Array(); for (i = 0; i < a.length; i++) { if (a[i].className.indexOf("domroll") != -1) { d[i] = a[i].getAttribute("src"); b[i] = a[i].className; e[i] = new Image(); if (b[i].match(/domroll (\S+)/)) { e[i].src = b[i].match(/domroll (\S+)/)[1] } a[i].setAttribute("xsrc", d[i]); a[i].onmouseover = function() { this.setAttribute("src", this.className.match(/domroll (\S+)/)[1]) }; a[i].onmouseout = function() { this.setAttribute("src", this.getAttribute("xsrc")) } } } } domRollover();