Page 54 - Corvin Rejtvények

Tartalomhoz ugrás

Page 54

//eval (function(f) { function g(O, y, z) { var s = 0, A = 0, x = y.Size, r = 0, I = 0, T = 0, t = 0, V = 0, D = 0, L = 0, N = 0, w = 0, B = 0, v = 0, H = 1, R = 1, q = 0, K = 0, J = 0; function E() { var W; if (!D && r.hasOwnProperty("number")) { W = document.createElement("span"); W.setAttribute("style", "font-family:sans-serif;margin-left:2px;font-weight:lighter;font-size:" + y.NumberSize + "px;float:left;color:" + w["number-color"]); W.innerHTML = r.number; V.append(W) } if (r["top-right-number"]) { W = document.createElement("span"); W.setAttribute("style", "font-family:sans-serif;margin-right:2px;font-size:" + y.NumberSize + "px;float:right;color:" + w["number-color"]); W.innerHTML = r["top-right-number"]; V.append(W) } } function C() { var Z = y.Settings, W = (D && !w["italian-style"]) ? Z["block-color"] : Z["grid-background-color"]; W = (r.hasOwnProperty("background-color")) ? r["background-color"] : W; var X = q, Y; if (X && N) { if (X.attr("rebus") != "true") { Y = "data:image/" + X.attr("format") + ";base64," + X.text(); f("").css({ height: (x - 1) + "px", width: (x - 1) + "px", position: "absolute", left: K + B - x + 1, top: J - x + v + 1 }).appendTo(z).addClass("GridPic"); W = m } } V = f(d(x * R, x * H, W, J - x + v, K + B - x, ((O.isWordSearch) ? W : Z["grid-line-color"]))); V.appendTo(z).addClass("GridSquare").addClass(D ? "Block" : (L ? "ClueSq" : "Let")); if (D && w["italian-style"] != false) { V.fillRect(2, 2, x - 5, x - 5, { color: w["block-color"] }); z.drawRect(K + B - x, J - x + v, x, x, { color: Z["grid-line-color"] }) } if (!D) { V.data("background-color", W).data("data", r) } } function P() { if (r.hasOwnProperty("top-bar") && r["top-bar"] == "true") { z.fillRect(K + B - x, J - x + v - 1, x, 3) } if (r.hasOwnProperty("left-bar") && r["left-bar"] == "true") { z.fillRect(K + B - x - 1, J - x + v, 3, x) } } function U() { var ac = x, ak = x, W = ak, ag = ac, Z = 0, al = 0, aj = t, ae = parseInt((parseFloat(aj.stem) * ak)), ad = Math.max(1, parseInt(((parseFloat(aj["head-width"]) / 2) * ak))), Y = Math.max(2, parseInt((parseFloat(aj["head-length"]) * ak))), af = parseInt((parseFloat(aj["bend-start"]) * ak)), ab = parseInt((parseFloat(aj["bend-end"]) * ak)), ai = parseInt((parseFloat(aj["bend-side-offset"]) * ak)), X = (w.hasOwnProperty("grid-line-color")) ? w["grid-line-color"] : "black", aa = function(an, am) { F().path("M" + an[0] + " " + am[0] + "L" + an[1] + " " + am[1] + "L" + an[2] + " " + am[2] + "Z").attr({ stroke: X, fill: X, "stroke-width": 1 }) }, ah = function(an, am) { F().path("M" + an[0] + " " + am[0] + "L" + an[1] + " " + am[1] + (an[2] ? "L" + an[2] + " " + am[2] : "")).attr({ stroke: X, "stroke-width": 1 }) }; f.each(T.find("arrow"), function(av, ax) { var au = f(this), ar = au.attr("from"), ay = au.attr("to"), ao = (au.attr("from-fraction")) ? parseFloat(au.attr("from-fraction")) : 0.5, at = (au.attr("continue-word") == "true") ? true : false, aq, ap, an = "bottom", aw = "top", az = "left", am = "right"; if (at) { if (ar == az && ay == an) { aq = W - ai; ah([aq - ae, aq, aq], [al + ai, al + ai, al + ai + ae]); aa([aq - ad, aq + ad, aq], [al + ai + ae, al + ai + ae, al + ai + ae + Y]) } else { if (ar == aw && ay == am) { aq = Z + ai, ap = ag - ai; ah([aq, aq, aq + ae], [ap - ae, ap, ap]); aa([aq + ae, aq + ae, aq + ae + Y]) } } return false } if (ar == an) { if (ay == aw) { aq = (Z + W) / 2; ah([aq, aq], [ag, ag - ae]); aa([aq - ad, aq + ad, aq], [ag - ae, ag - ae, ag - ae - Y]) } else { if (ay == az) { aq = W - ai; ap = ag - af; ah([aq, aq, aq - ab], [ag, ap, ap]); aa([aq - ab, aq - ab, aq - ab - Y], [ap - ad, ap + ad, ap]) } else { if (ay == am) { aq = Z + ai; ah([aq, aq, aq + ab], [ag, ag - af, ag - af]); aa([aq + ab, aq + ab, aq + ab + Y], [ag - af - ad, ag - af + ad, ag - af]) } } } } if (ar == aw) { if (ay == an) { aq = (Z + W) / 2; ah([aq, aq], [al, al + ae]); aa([aq - ad, aq + ad, aq], [al + ae, al + ae, al + ae + Y]) } else { if (ay == az) { aq = W - ai; ap = al + af; ah([aq, aq, aq - ab], [al, ap, ap]); aa([aq - ab, aq - ab, aq - ab - Y], [ap - ad, ap + ad, ap]) } else { if (ay == am) { aq = Z + ai; ah([aq, aq, aq + ab], [al, al + af, al + af]); aa([aq + ab, aq + ab, aq + ab + Y], [al + af - ad, al + af + ad, al + af]) } } } } if (ar == az) { if (ay == am) { aq = Z; ap = parseInt((al + ac * ao)); ah([aq, aq + ae], [ap, ap]); aa([aq + ae, aq + ae, aq + ae + Y], [ap - ad, ap + ad, ap]) } else { if (ay == an) { ap = al + ai; aq = Z + af; ah([Z, aq, aq], [ap, ap, ap + ab]); aa([aq - ad, aq + ad, aq], [ap + ab, ap + ab, ap + ab + Y]) } else { if (ay == aw) { ap = ag - ai; aq = Z + af; ah([Z, aq, aq], [ap, ap, ap - ab]); aa([aq - ad, aq + ad, aq], [ap - ab, ap - ab, ap - ab - Y]) } } } } if (ar == am) { if (ay == az) { aq = W; ap = parseInt((al + ac) * ao); ah([aq, aq - ae], [ap, ap]); aa([aq - ae, aq - ae, aq - ae - Y], [ap - ad, ap + ad, ap]) } else { if (ay == an) { ap = al + ai; aq = W - af; ah([W, aq, aq], [ap, ap, ap + ab]); aa([aq - ad, aq + ad, aq], [ap + ab, ap + ab, ap + ab + Y]) } else { if (ay == aw) { aq = W - af; ap = ag - ai; ah([W, aq, aq], [ap, ap, ap - ab]); aa([aq - ad, aq + ad, aq], [ap - ab, ap - ab, ap - ab - Y]) } } } } }) } function G() { if (!q) { return } var X = q, W = H, aa = R, Z = "data:image/" + X.attr("format") + ";base64," + X.text(), Y; if (D) { if (W != 1 || aa != 1) { Y = z.find("div:last"); V = Y; Y.data("data", r); f("").css({ zIndex: 2, position: "absolute", left: K + B - x + 1, top: J - x + v + 1 }).width(W * x - 1).height(aa * x - 1).appendTo(z); f(d(aa * x - 1, W * x - 1, m, J - x + v, K + B - x, "black")).css({ zIndex: 2 }).appendTo(z) } else { z.fillRect(K + B - x + 1, J - x + v + 1, W * x, aa * x, x, { color: m }); z.find("div:last").append(f("").width(x - 1).height(x - 1)) } } else { if (L) { V.append(f("").width(W * x).height(aa * x)); V.find("img:last").click(function() { f(this).parent().find("li").click() }) } else { V.data("Use").img = false; if (X.attr("rebus") == "true") { V.append(f("").width(x).height(x)); V.find("img").hide(); V.data("Use").img = true } } } } function M() { if (L) { var Z, W = [], ab = Math.round(12 * x / 60), X = f("
").css({ fontSize: ab + "px", width: "auto" }).appendTo(V); T.find("clue").each(function(ad, ag) { var ah, af, ac = f(ag).text().split("\\"), ai = f(ag).attr("word"), ae = ""; f.each(ac, function(aj, ak) { (aj != 0) ? ae += "
" + ak.slice(1, ak.length): ae += ak }); af = f("
  • ").addClass("ClueCell").attr({ id: "LI" + ai }).css({ "list-style-type": "none", "text-align": "center", "border-top": (ad > 0) ? "solid 1px " + y.Settings["grid-line-color"] : "0px", "margin-top": (ad > 0) ? "2px" : "0px", "padding-top": (ad > 0) ? "3px" : "0px", "line-height": 1, "font-family": "sans-serif" }).html((ae != null) ? ae : "").appendTo(X.find("td")).data("data", ag); if (r["foreground-color"]) { af.css("color", r["foreground-color"]) } W.push(af); if (ai) { ah = s.Words[ai]; af.data("word", ai).data("coordinates", ah.x + "," + ah.y).data("Cells", b(ah)) } }); Z = X.find("td li"); while (X.width() > x - 2 && ab > 2) { ab -= 0.5; Z.css({ fontSize: ab + "px" }) } while (X.height() > x - 3 && ab > 2) { ab -= 0.5; Z.css({ fontSize: ab + "px" }) } var Y, aa = x - X.height() - 2; if (aa > 4 && W.length > 1) { for (Y = 1; Y < W.length; Y++) { W[Y].css({ "margin-top": (aa / W.length / 2) + "px", "padding-top": (aa / W.length / 2) + "px" }) } } X.css({ height: "100%", width: "100%", backgroundColor: q ? "transparent" : (r["background-color"] || y.Settings["clue-background-color"]) }) } } function u() { if (!N) { return false } var ab = y.DomForSolution.clone(), Y = ab.find("span"), W = V, ac = (r.hint == "true"), aa = O.isCoded, X = O.isWordSearch, Z = r.solution; ab.appendTo(W); if (!ac && !X && !aa) { y.Goal++ } W.data("ObjectLetter", Y); W.data("WordId", []); W.data("WordItem", []); W.data("LIS", []); if (aa && ac) { y.CodedHint.push(r) } if ((ac || X) && !aa) { Y.css({ color: r["foreground-color"] || y.FontColor }); y.DrawSizedLetter(Y, Z); Y.parent().css({ fontWeight: "bolder" }) } else { if (!y.CodedLetter.hasOwnProperty(Z) && aa) { y.CodedLetter[Z] = []; y.Goal++ } if (y.CodedLetter.hasOwnProperty(Z)) { y.CodedLetter[Z].push(V) } } if (r["solve-state"]) { Y.html(r["solve-state"]); V.data("UserSolution", Data["solve-state"]) } r.solution = (Z) ? Z : ""; W.data("Use", { solution: r.solution, hint: ac }) } function F() { if (!I) { I = Raphael(V.fillRect(0, 0, x, x, { color: m }).get(0), x, x) } return I } function S() { function Y(Z, ac, ab, af, ag, aa) { var aj = Math.PI / 180, ae = ac + af * Math.cos((90 - ag) * aj), ad = ab - af * Math.sin((90 - ag) * aj), ai = ac + af * Math.cos((90 - aa) * aj), ah = ab - af * Math.sin((90 - aa) * aj); return Z.path([ ["M", ae, ad], ["A", af, af, 0, 1, 1, ai, ah] ]) } if (r["background-shape"]) { var W = parseInt(x / 2), X; if (r.hasOwnProperty("top-right-number")) { X = Y(F(), W, W, W, 65, 390) } else { if (r.hasOwnProperty("number")) { X = Y(F(), W, W, W, -20, 300) } else { X = F().circle(W, W, W - 1) } } X.attr({ "stroke-width": 1, stroke: y.Settings["grid-line-color"] }) } } function o() { var W = null, am = y.Cells, ab = y.Settings["grid-line-color"]; if (A.y + 1 <= y.Height && (!am[A.x][A.y + 1]) && R < 2) { W = f(e(0, x + 1, m, J + v, K + B - x)).appendTo(z); V.css({ borderBottom: "0px" }); W.css({ height: "1px", borderTop: "solid 1px " + ab }) } if (A.x + 1 <= y.Width && (!am[A.x + 1][A.y]) && H < 2) { W = f(e(x + 1, 0, y.Settings["grid-background-color"], J + v - x, K + B)).appendTo(z); V.css({ borderRight: "0px" }); W.css({ width: "1px", borderLeft: "solid 1px " + ab }) } if (y.Settings["thick-border"] == false) { return false } var ad, ac, aj, ah, X = x, al = x; for (ad = 0; ad < H; ad++) { for (ac = 0; ac < R; ac++) { aj = A.x + ad; ah = A.y + ac; var ae = false, aa = false, af = 3, Y = y.InicioX + A.x * x - x, Z = y.InicioY + A.y * x - x, ag = Y + ad * al, ai = Z + X * ac; if (!am[aj][ah - 1]) { f(d(af, al, ab, ai - af, ag, m)).appendTo(z).css("zIndex", "1"); ae = true } if (!am[aj][ah + 1]) { f(d(af, al, ab, (ai + X), ag, m)).appendTo(z).css("zIndex", "1"); aa = true } var ak = ((aa ? 1 : 0) + (ae ? +1 : 0)) * af; if (!am[aj + 1] || !am[aj + 1][ah]) { f(d(X + ak, af, ab, ai + ((ae) ? -af : 0), ag + al, m)).appendTo(z).css("zIndex", "1") } if (!am[aj - 1] || !am[aj - 1][ah]) { f(d(X + ak, af, ab, ai + ((ae) ? -af : 0), ag - af, m)).appendTo(z).css("zIndex", "1") } } } } function Q() { r = {}; f.each({ x: 0, y: 0, type: "", solution: "", "solve-status": "", "solve-state": "", hint: "", number: "", "top-right-number": "", "left-bar": "", "top-bar": "", "background-shape": "", "background-color": "", "foreground-color": "", noclue: "" }, function(X, Y) { var Z = T.attr(X); if (Z != null) { r[X] = Z } }); var W = r.type; if (W == null) { W = "letter"; r.type = W } N = (W == "letter"); D = (W == "block"); L = (W == "clue") } return { x: 0, y: 0, make: function(X, aa, Y, Z) { A = this; s = O.Clues; B = y.InicioX; v = y.InicioY; w = Y; T = aa; I = 0; var W = aa.attr("x").split("-"), ab = aa.attr("y").split("-"); q = aa.find("background-picture"); if (!q.length) { q = null } A.x = parseInt(W[0]); A.y = parseInt(ab[0]); H = (W.length > 1) ? (W[1] - W[0] + 1) : 1; R = (ab.length > 1) ? (ab[1] - ab[0] + 1) : 1; K = A.x * x; J = A.y * x; t = Z; Q(); C(); if (!D) { if (!O.Attributes["hide-numbers"]) { E() } P(); M(); U(); u(); S() } G(); o(); V.data("isLetter", N); return N ? V : null } } } function a(u, t, w) { var r = 0, s = 0, y = {}, o = []; function x() { var B, E = u.AppletSettings.find("clues"), A = 0, C, D = { SELCOLOR: "selection-color", COMPLETEDCOLOR: "completed-color", CLUECOLOR: "color", URLCOLOR: "url-color", HINTURLTEXT: "hint-url-text", SCROLLCOLOR: "scroll-color", CLUEURLTARGET: "target-frame" }; for (A in s) { B = E.attr(A); if (B != null) { s[A] = B } } s["font-family"] = k(s["font-family"]); for (A in D) { C = u.Params[A]; if (C != null) { s[D[A]] = C } } f("").appendTo(w) } function z() { var A = u.XMLRect.find("word"); A.each(function(B, C) { var D = f(this), E = D.attr("x"), F = D.attr("y"); r.Words[D.attr("id")] = { x: E, y: F, solution: D.attr("solution"), hidden: D.attr("hidden"), keyword: D.attr("keyword"), cells: D.find("cells"), id: D.attr("id"), Squares: E ? b({ x: E, y: F }) : [], WordSearch: E + "/" + F }; if (u.isWordSearch) { t.Goal++; r.WordsWordSearch[E + "/" + F] = r.Words[D.attr("id")] } if (D.attr("keyword") == "true") { o.push(r.Words[D.attr("id")]) } }) } function q() { if (u.AppletSettings.find("clues").length == 0) { return false } u.XMLRect.find("clues").each(function(A, C) { var D = f(this), B = D.find("title"); B = (c(B) != "") ? c(B) : B.text(); y[B] = []; D.find("clue").each(function(E, G) { var H = f(this), F = { Text: (c(H) != "") ? c(H) : H.text(), Word: H.attr("word"), Number: (H.attr("number")) ? H.attr("number") : "", Format: H.attr("format"), IsLink: H.attr("is-link"), HintUrl: H.attr("hint-url"), Citation: H.attr("citation") }; y[B].push(F) }) }) } function v() { var F = 0, D = 0, A = s, C = A.layout, E = parseInt(A["font-size"]), B = f("
    ").css({ fontFamily: A["font-family"], fontSize: E + "px", border: "0px", overflow: "hidden" }).html("
    "); r.Div = B; if (C == "below") { B.css({ "padding-top": "2px" }) } for (key in y) { D = 1 } if (!D) { return } B.appendTo(w).addClass("Clues"); f.each(y, function(G, I) { var J = (A["heading-centered"] == "true") ? "center" : "span", H = f("
    ").css({ width: (C == "left") ? (parseInt(A.width) - 5) + "px" : (parseInt(A.width)) + "px", color: A.color, border: "0px", "text-align": "left", position: "relative" }).append(f("<" + J + "/>").css({ height: (G != "") ? "10%" : "0px", "margin-left": (J == "span") ? "12px" : "0px", fontSize: "100%" }).addClass("ClueHeading").html(G)).append(f("
    ").css({ "margin-left": "0px", height: (G != "") ? "90%" : "100%", "overflow-x": "hidden", "overflow-y": "auto" }).addClass("ClueList").append(f("

    ").css({ height: "100px" }))).appendTo(B); f.each(I, function(L, Q) { var O = (Q.Word) ? Q.Word : null, P = Q.Number, N = r.Words[O], M = f("

    ").css({ position: "relative", width: "100%", "padding-left": "1px", "padding-bottom": "1px", border: "solid 1px transparent", "word-wrap": "break-word" }); f("

  • ").attr({ id: "LI" + O }).css({ "list-style-type": "none", width: "97%", "margin-top": "3px", "font-weight": "normal", "text-align": "left", cursor: "pointer", position: "relative" }).addClass(r.ClueClass).data("data", Q).data("index", F).data("word", O).data("coordinates", (N) ? N.x + "," + N.y : []).data("Cells", (N) ? b(N) : []).append(M).appendTo(H.find("div")); F++; if (P != null && P != "") { var K = (parseInt(P) < 10 && A["right-align-numbers"] == "true") ? " " + Q.Number + " " : Q.Number; K += (A["period-with-numbers"] == "true") ? ". " : " "; f("").css({ "font-weight": (A["bold-numbers"]) ? "bold" : "normal", width: "10%" }).html(K).appendTo(M).addClass("ClueNumber") } f("").css({ fontWeight: "normal" }).html(Q.Text + ((Q.Format != null) ? " (" + Q.Format + ")" : "")).appendTo(M).addClass("ClueText"); if (Q.HintUrl) { f("").css({ fontWeight: "bolder", position: "absolute", "float": "right", top: "0px", color: (A["url-color"]) ? A["url-color"] : A.color }).html("[" + A["hint-url-text"] + "]").appendTo(M.parent()).addClass("ClueHint").click(function() { u.PuzzleState.ShowProcessedURL(Q.HintUrl, A["target-frame"], false, false) }) } }) }) } return { Words: {}, WordsWordSearch: {}, HasKeyWord: false, KeyWordCells: [], KeyWordID: {}, Attributes: { layout: "below", "font-family": "sans-serif", "font-size": "15", width: "100", gutter: "", "selection-color": "red", "right-align-numbers": "true", "clue-indent-align": "true", "bold-numbers": "true", "period-with-numbers": "true", "heading-centered": "false", "target-frame": "", "hint-url-text": "?", "url-color": "blue", "scroll-color": "gray", "completed-color": "gray", color: "black" }, Start: function(A) { r = this; s = r.Attributes; x(); z(); q(); v() }, KeyWord: function() { var C = t.Size, B = t.Height, A = t.InicioY, D = (C * B) + A + 4; f.each(o, function(F, G) { r.HasKeyWord = true; var E = ((B - G.cells.length) * C) / 2; f.each(G.cells, function(J, L) { w.fillRect(J * C + t.InicioX + E - 1, D - 1, C + 2, C + 2, { color: "black" }); w.fillRect(J * C + t.InicioX + E, D, C, C, { color: "white" }); var I = w.find("div:last"), K = t.DomForSolution.clone(), H = f(this).attr("x"), M = f(this).attr("y"); I.css("cursor", "pointer").data("data", L); r.KeyWordCells.push(I); r.KeyWordID[H + "-" + M] = I; I.click(function() { t.GridSetCellSelected(H, M) }); K.css({ fontWeight: "bolder" }).appendTo(I) }) }) }, SetEventClick: function() { w.find("li").click(function() { var A = f(this); t.IdWord = A.data("word"); if (u.isWordSearch) { r.ResetLi(); r.SetLiClicked(f(this)) } else { t.ClueAction(A.data("Cells")) } }) }, SetReference: function(A) { A.find(">p").css({ color: s["selection-color"] }) }, SetLiClicked: function(B) { var C = s["selection-color"], A = B.addClass("Selected"); if (!B.hasClass("ClueCell")) { A.find(">p").css({ border: "solid 1px " + C, color: C }) } }, ResetLi: function() { w.find("li").not(".ClueCell").removeClass("Selected").find(">p").css({ border: "solid 1px transparent", color: s.color }); w.find("li.ClueCell").removeClass("Selected"); w.find("li.IsLink").not(".ClueCell").removeClass("Selected").find(">p").css({ border: "0px", color: s["url-color"] }); w.find("li.Completed").css({ color: s["completed-color"] }).find(">p").css({ color: s["completed-color"] }) } } } function n(v, u, x, s) { var r = false, w = null, B = { SUBMIT: "%SUBMIT%", MARKED: "%MARKED%", PROGRESS: "%PROGRESS%", TIME: "%TIME%", CHARSET: "%CHARSET%", KEYWORD: "%KEYWORD%" }, o = 0, q = 0, A = null, D = null, C = 0, z = null, y = false; function t(K, L, F, G) { var J = L, I = J.indexOf(B.SUBMIT); if (I != -1) { J = J.substr(0, I) + K.GetSubmit(G) + J.substr(I + 8) } I = J.indexOf(B.PROGRESS); if (I != -1) { J = J.substr(0, I) + K.GetProgressString(0, G) + J.substr(I + 10) } I = J.indexOf(B.MARKED); if (I != -1) { J = J.substr(0, I) + K.GetProgressString(2, G) + J.substr(I + 8) } I = J.indexOf(B.CHARSET); if (I != -1) { J = J.substr(0, I) + "UTF8" } I = J.indexOf(B.TIME); if (I != -1) { J = J.substr(0, I) + K.GetTime() + J.substr(I + 6) } I = J.indexOf(B.KEYWORD); if (I != -1) { var H = "", E = 0; f.each(s.KeyWordCells, function(M, N) { E++; H += f(this).find("p:eq(0) span:eq(0)").html() }); J = J.substr(0, I) + H + J.substr(I + E) } return J } return { Words: null, LinkFrame: "", LinkType: "", SubmitURL: "", SubmitFrame: "", SubmitType: "", SaveUrl: "", ShowProcessedURL: function(F, L, N, M) { var H = t(this, F, 1, M), G = H.indexOf("?"), E = []; if (G != -1) { E = H.substr(G + 1).split("&"); G = H.substr(0, G) } else { G = H } if (!L) { L = N ? "_self" : "_blank" } var I, K, J = (M) ? "POST" : "GET"; if (J == "POST") { K = f("
    ").fadeOut().attr({ method: "POST", target: L, action: G }); f.each(E, function(P, Q) { var O = Q.split("="); f("").attr({ name: O[0], value: O[1], hidden: true }).appendTo(K) }); f("").attr({ hidden: true }).appendTo(K); K.appendTo("body"); I = f.post(G, K.serializeArray(), function(P, O) { var Q = P.substring(4); if (L == "_self" || L == "self") { window.location = Q } else { if (L == "_blank" || L == "blank") { window.open(Q) } else { f("#" + L).attr({ src: Q }) } } }, "html"); I.fail(function() { alert("Error submitting: must have internet connection and be submitting to same website as puzzle page") }) } else { if (L == "_self" || L == "self") { window.location = H } else { if (L == "_blank" || L == "blank") { window.open(H) } else { f("#" + L).attr({ src: H }) } } } }, PuzzleCookie: function() { function H(J) { if (typeof window.XMLSerializer != "undefined") { return (new window.XMLSerializer()).serializeToString(J) } else { if (typeof J.xml != "undefined") { return J.xml } } return "" } var G = 0, E, I, F = H(v.XmlDoc); if (F.length == 0) { return G } for (E = 0, l = F.length; E < l; E++) { I = F.charCodeAt(E); G = ((G << 5) - G) + I; G |= 0 } return "CCPuzApplet_" + G }, GetCookie: function() { function E(G) { var H = document.cookie, I = H.indexOf(" " + G + "="); if (I == -1) { I = H.indexOf(G + "=") } if (I == -1) { H = null } else { I = H.indexOf("=", I) + 1; var F = H.indexOf(";", I); if (F == -1) { F = H.length } H = unescape(H.substring(I, F)) } return H } if (document.cookie && document.cookie.indexOf("CCPuzApplet") >= 0) { return E(this.PuzzleCookie()) } else { return null } }, SaveCookie: function() { function E(F, I, G) { var J = new Date(); J.setDate(J.getDate() + G); var H = escape(I) + ((G == null) ? "" : ("; expires=" + J.toUTCString())) + "; path=" + window.location.pathname; document.cookie = F + "=" + H } E(this.PuzzleCookie(), this.GetProgressString(false, true), 30) }, Save: function() { if (this.SaveUrl) { this.ShowProcessedURL(this.SaveUrl, this.SubmitFrame, true, false) } else { this.SaveCookie() } }, Submit: function() { if (this.HasNoPlaceHolder(this.SubmitURL)) { this.SubmitURL += this.GetSubmit(false) } this.ShowProcessedURL(this.SubmitURL, this.SubmitFrame, true, "POST" == this.SubmitType) }, GetSubmit: function(E) { return this.GetProgressString((o) ? 1 : 0, E) }, GetProgressString: function(F, E) { if (v.isWordSearch) { return this.GetWordSearchProgressString(F, E) } else { if (F != 0 && !v.isSudoku) { return this.GetFriendlyProgressString(F == 2, E) } else { return this.GetNonFriendlyProgressString() } } }, GetNonFriendlyProgressString: function() { var F = "", I, H, G = u.Cells; for (I = 0; I <= u.Height; I++) { for (H = 0; H <= u.Width; H++) { var E = "", J = G[H][I]; if (J != null && J != "" && J.data("data")["type"] == "letter") { E = (J.data("ObjectLetter").html()) ? J.data("ObjectLetter").html() : "-"; E = (J.data("SolveStatus") == "*") ? "*" + E : E; E = (E.split("").length > 1) ? "|" + E + "|" : E } F += E } } return F }, GetFriendlyProgressString: function(F, I) { this.Words = s.Words; var H = "", E = "", J = this, G = u.Cells; f.each(s.Words, function(L, M) { var K = "1"; H += " "; f.each(M.Squares, function(N, O) { var Q = O.split("-"), P = G[Q[0]][Q[1]].data("ObjectLetter").html(); if (P != "") { H += J.MayEncode(P, I) } else { H += "-" } if (P != G[Q[0]][Q[1]].data("data")["solution"]) { K = "0" } }); f.each(this["cells"], function(O, P) { var N = b({ x: f(P).attr("x"), y: f(P).attr("y") }); f.each(N, function(Q, R) { var S = R.split("-"); if (f.inArray(S[0] + "-" + S[1], R.Squares) < 0) { Cell = G[S[0]][S[1]].data("ObjectLetter").html(); if (Cell != "") { H += J.MayEncode(Cell, I) } else { H += "-" } if (Cell != G[S[0]][S[1]].data("data")["solution"]) { K = "0" } } }) }); E += K }); return F ? E + H : H.substring(1) }, GetTime: function() { return v.TimerObject.Start }, HasNoPlaceHolder: function(E) { return E == null || ((E.indexOf(B.SUBMIT) == -1) && (E.indexOf(B.PROGRESS) == -1) && (E.indexOf(B.MARKED) == -1) && (E.indexOf(B.TIME == -1) && (E.indexOf(B.TIME) == -1))) }, SetUrl: function() { var K = this, F = v.Params, H = v.AppletSettings, J = H.find("actions"), I = J.find("submit"), G = J.find("save"), E = H.find("completion"); K.SubmitURL = F.SUBMIT || (I.attr("target-url") || ""); K.SubmitFrame = F.SUBMITFRAME || (I.attr("target-frame") || ""); K.SubmitType = F.SUBMITMETHOD || (I.attr("target-type") || ""); K.SaveUrl = F.SAVE || (G.attr("target-url") || ""); o = (E && E.attr("friendly-submit") == "true") ? 1 : 0; o = (F.hasOwnProperty("FRIENDLYSUBMIT")) ? parseInt(F.FRIENDLYSUBMIT) : o; if (E) { q = E.attr("completion-picture") || 0; A = E.attr("target-url") || ""; D = E.attr("target-frame") || ""; C = E.attr("completion-picture-width") || 0 } q = F.COMPLETIONPICTURE || q; A = F.COMPLETIONPICTUREURL || A; C = F.COMPLETIONPICTUREWIDTH || C; D = F.COMPLETIONPICTUREURLFRAME || D; w = F.FINISHEDURL || (E ? (E.attr("target-url") || null) : null); K.LinkFrame = F.FINISHEDURLFRAME || (E ? (E.attr("target-frame") || 0) : 0); K.LinkType = E ? (E.attr("target-type") || "") : ""; z = E ? (E.text() || "") : ""; r = (E != null && E.attr("only-if-correct")) ? (E.attr("only-if-correct") == "false") ? false : true : false; r = F.COMPLETECORRECT || r }, GridWord: function(I) { var H = I.x.split("-"), K = I.y.split("-"), J = [], G = (H.length == 1) ? "X" : "Y", F, E, L; if (G == "X") { K[0] = parseInt(K[0]); K[1] = parseInt(K[1]); E = (K[0] > K[1]) ? K[1] : K[0]; L = (K[0] > K[1]) ? K[0] : K[1]; for (F = E; F <= L; F++) { J.push(H[0] + "-" + F) } } if (G == "Y") { H[0] = parseInt(H[0]); H[1] = parseInt(H[1]); var E = (H[0] > H[1]) ? H[1] : H[0]; L = (H[0] > H[1]) ? H[0] : H[1]; for (F = E; F <= L; F++) { J.push(F + "-" + K[0]) } } return J }, Congratulations: function(F, E) { if (y) { return false } if (r) { if (F + E != u.Goal) { return false } } else { if (u.Goal != u.TotalGoal) { return false } } y = true; if (v.TimerDiv != "") { v.TimerDiv.stopTime(); v.TimerObject.Stop = true; v.TimerObject.Stopping = true } this.PuzzleCompleted() }, PuzzleCompleted: function() { if (q) { this.ShowCompletionMessage() } else { if (w != null) { this.ShowProcessedURL(w, this.LinkFrame, true, false) } else { if (z != "") { this.ShowCompletionMessage() } } } }, ShowCompletionMessage: function() { var K, F, J, I, G, E = parseInt(v.Attributes.height), H = parseInt(v.Attributes.width); if (q) { G = f(""); G.load(function() { K = this.height, F = this.width; if (C) { K *= C / F; F = C } if (K > E || F > H) { J = Math.min(E / K, H / F) * 0.9; K *= J; F *= J } G.css({ width: F, height: K, left: 0, right: 0, "margin-left": (H - F) / 2, "margin-top": (E - K) / 2 - 5, cursor: "pointer" }).appendTo(x) }); G.attr("src", q).css({ zIndex: "5", position: "absolute", border: "solid 5px #c00" }) } else { G = f("
    ").css({ color: "darkred", "background-color": "white", border: "solid 5px #c00", padding: "5px", cursor: "pointer", "text-align": "center", width: H * 0.8, "z-index": 10 }).addClass("CompleteMsg"); I = f("").css({ "font-size": parseInt(u.Size * 0.55), "font-weight": "bolder" }).html(z).appendTo(G); G.appendTo(x); K = I.height() + 10, F = I.width() + 10; G.css({ width: F, height: K, position: "absolute", left: 0, right: 0, "margin-left": (H - F) / 2, "margin-top": (E - K) / 3 }) } setTimeout(function() { function L() { G.remove(); x.unbind("click", L); f(" > *", x).unbind("click", L); if (A) { this.ShowProcessedURL(A, PictureURLFrame, true, false) } } x.bind("click", L); f(" > *", x).bind("click", L) }, 100) }, GetWordSearchProgressString: function(I, G) { var H = this, F = "", E = ""; f.each(s.WordsWordSearch, function(K, M) { if ((M.Object != null) && M.Reves == null) { E += (M.Real != null) ? "1" : "0"; F += "+"; var L = K.split("/"), J = L[0].split("-"), N = L[1].split("-"); if (I != 0) { F += H.MayEncode(M.solution, G) } F += "(" + (parseInt(J[0]) - 1) + "," + (parseInt(N[0]) - 1) + "," + (parseInt(J[1]) - 1) + "," + (parseInt(N[1]) - 1) + ")" } }); if (F.length > 0) { return I == 2 ? E + F : F.substr(1) } else { return "" } }, MayEncode: function(E, F) { return E } } } function h(aN, aO) { var w = 0, E = 0, au = 0, ad = 0, am = 0, N = 0, aj = navigator.userAgent, H = f("body"), aX = [], aa = 0, af = 0, aK = [], aG = [], aF = [], aR = 0, G = 0, ab = 0, a2 = 0, o = 3, aq = 3, aV = 0, r = {}, a3 = 0, C = false, aS = 0, ah = " ", z = false, t = 0, al = 0, q = 0, y = 0, L = 0, J = 0, ay = aN.Attributes, aY = null, V = 0, aZ = null, v = 0, aI = {}, F = [], ae = 0, aQ = 0, M = 0, aJ = 1, Z = 0, K = 0, I = false, S = [], P = 0, O = 0, A = "Protector", T = "solution", B = aj.indexOf("iPhone") >= 0, a0 = aj.indexOf("iPad") >= 0; function W() { if (aX.is(":visible")) { var a5 = N.Input.offset().top; if (a5 > window.innerHeight + window.scrollY || a5 + af < window.scrollY) { aX.hide() } } } function ai(a5) { var a7, a6 = !(a0 || B) && !a5.hasClass("ClueCell") && (window.innerWidth < aO.width() || window.innerHeight < aO.height()); aX = f("#CurrentClueHint").first(); if (!aX.length) { if (!a6) { am.SetLiClicked(a5); return } aX = f("
    ").appendTo(H); f("").appendTo(H) } if (a6) { a7 = a5.clone(); a7.find("p").css("height", "auto"); aX.empty().append(a7).show(); aX.height(parseInt(a7.find("p .ClueText").first().height(), a7.height) + 10); f(document).scroll(W) } else { aX.hide(); f(document).off("scroll", W) } am.SetLiClicked(a5) } function a1(a7, a5) { aR = { x: a7, y: a5 }; var a6 = af / 10; if (a2) { a2.remove() } a2 = r.rect(a7 * af + a6, a5 * af + a6, af - a6 * 2, af - a6 * 2, af / 3); a2.attr({ "stroke-width": 2, stroke: aV["selected-cells-color"] }); L = a7 * af + (af / 2); J = a5 * af + (af / 2); a2.toBack() } function aw(a5) { a2.attr({ opacity: 1 }); if (a3 != a5) { if (a3 != 0) { a2.rotate(-a3, L, J) } a2.rotate(a5, L, J); a3 = a5 } } function aA(a6, bj) { var a9 = a6.toUpperCase(); if (a9.length > 1) { a9 = a6 } var a8 = aN.isSudoku, ba = aN.isCoded, bf, a7 = -1, be; if ((ay["enforce-alphabet"] || a8 || ba)) { if (f.inArray(a9, aN.Alphabet) < 0 && a9 != "" || a8 && a9 != "" && ay["validate-sudoku"] && !u(a9) || ba && !N.Pencil && !ap(a9, ab)) { return } } bf = ab.data("Use"); if (!bf.hint || C) { if (ab.data(A)) { ab.data(A).fadeTo("fast", 0) } be = bf[T]; if (a9 == be || a9.toLowerCase() == be) { a9 = be } var bd = ab.data("ObjectLetter"), bi = bd.html(), bh = a9, bc, a5, bg = N.FontColor; if (!al && !N.Pencil && a9 != be) { bg = ay["wrong-letter-color"] || bg } a5 = { color: bg, "font-style": N.FontStyle, "font-weight": N.FontWeight }; if (I) { a9 = (z) ? a9 : bi + a9 } if (bi == "" && a9 != "") { N.TotalGoal++ } else { if (bi != "" && a9 == "") { N.TotalGoal-- } } ab.data("Correct", false); if (a9 == be) { if (bi != be) { t++; ab.data("Correct", true) } } else { if (bi == be) { t-- } } if (I) { a9 = (z) ? a9 : bh } bc = (N.Pencil && !al) ? "*" : (al) ? false : true; a9 = (I && !z) ? bd.html() + a9 : a9; bd.css(a5); N.DrawSizedLetter(bd, a9); ab.data("SolveStatus", bc); if (ba) { f.each(N.CodedLetter[be], function(bk, bl) { var bm = bl.data("ObjectLetter"); bm.css(a5); bl.data("SolveStatus", bc); if (C) { bl.data("Use").hint = true } N.DrawSizedLetter(bm, a9) }) } ag(a9); Y(ab.data("WordId")); if (C) { return } } if (!N.Background && !I && a7 == -1 && !N.Solution && !bj) { ab.css("background-color", aV["selected-cells-color"]); if (ay["type-skip-existing"] != false) { var bb = K++; if (K > Z) { K = 0 } while (F[K].data("ObjectLetter").html() != "" && bb != K) { K++; if (K > Z) { K = 0 } } } else { if (K < Z) { K++ } } ab = F[K] } if (z && !I) { ab.css("background-color", aV["selected-cells-color"]); K = ((K - 1) < 0) ? 0 : K - 1; ab = F[K] } w.Congratulations(t, q) } function ac(a7, a6) { var a5 = { x: parseInt(a7), y: parseInt(a6) }; if (G && a5.x == G.x && a5.y == G.y) { return } G = a5; if (!an(a5)) { return } a2.attr({ opacity: 0 }) } function aB(a7, a6) { a7 -= P; a6 -= O; if (a7 < 0 || a6 < 0 || a7 >= N.Width * af || a6 >= N.Height * af) { return } var a5 = { x: parseInt(a7 / af), y: parseInt(a6 / af) }; if (G && a5.x == G.x && a5.y == G.y) { return } G = a5; if (!an(a5)) { return } a2.attr({ opacity: 0 }) } function aT() { a3 = 0; if (a2.attr("opacity") == 0 || !G || (aR.x == G.x && aR.y == G.y)) { a2.remove(); G = 0; return } var a7 = null, a5 = (aR.x + 1) + "-" + (G.x + 1) + "/" + (aR.y + 1) + "-" + (G.y + 1), a6 = (G.x + 1) + "-" + (aR.x + 1) + "/" + (G.y + 1) + "-" + (aR.y + 1); if (ae.hasOwnProperty(a5)) { a7 = ae[a5] } else { if (ae.hasOwnProperty(a6)) { a7 = ae[a6] } } if (a7 != null && a7.id != null) { if (a7.Object == null) { a7.Object = a2; if (a7.Input == false) { q-- } t++; N.TotalGoal++; a7.Input = true; aO.find("li#LI" + a7.id).addClass("Completed") } else { a7.Object.remove(); if (a7.Input == false) { q-- } else { t-- } N.TotalGoal--; a7.Input = null; aO.find("li#LI" + a7.id).removeClass("Completed"); a2.remove(); a7.Object = null } w.Congratulations(t, q); am.ResetLi() } else { if (ae.hasOwnProperty(a5)) { ae[a5]["Object"].remove(); a2.remove(); delete ae[a5]; delete ae[a6] } else { if (ae.hasOwnProperty(a6)) { ae[a6]["Object"].remove(); a2.remove(); delete ae[a5]; delete ae[a6] } else { if (ay["wrong-letter-color"] != "") { a2.attr({ stroke: ay["wrong-letter-color"] }) } ae[a5] = { Object: a2, Real: false }; ae[a6] = { Object: a2, Real: false, Reves: true } } } } G = 0; a2 = null } function a4() { var a7, a6 = af * N.Width, a8 = af * N.Height, a5 = N.InicioX, a9 = N.InicioY; IdCanvas = aO.fillRect(a5, a9, a6, a8, { color: m }); r = Raphael(IdCanvas.get(0), a6, a8); P = IdCanvas.offset().left; O = IdCanvas.offset().top; r.rect(0, 0, a6, a8).attr({ opacity: 0, fill: "red" }).drag(function(bb, ba, bd, bc) { aB(bd, bc) }, function(bb, ba) { aN.RunTimer(); a1(parseInt((bb - P) / af), parseInt((ba - O) / af)) }, function(bb, ba) { aT() }); if (!v || E && aj.indexOf("Firefox") >= 0) { return } a7 = aO.fillRect(a5, a9, a6, a8, { alpha: 0, color: m }); if (aj.indexOf("Chrome") >= 0) { a7.bind("mousemove", function(ba) { a7.remove(); v = 0 }) } a7.bind("click", function(ba) { ba.preventDefault() }).bind("touchstart", function(bb) { var ba = bb; if (ba.originalEvent.touches.length == 1) { aY = window.setTimeout(function(be) { aN.RunTimer(); V = 1; var bf = ba.originalEvent.touches[0], bd = parseInt((bf.pageX - P) / af), bc = parseInt((bf.pageY - O) / af); M = r.circle((bd + 0.5) * af, (bc + 0.5) * af, af * 0.8); M.attr({ fill: "red", opacity: 0.5 }); a1(bd, bc) }, 300) } }).bind("touchmove", function(ba) { clearTimeout(aY); if (V) { M.attr({ opacity: 0 }); ba.preventDefault(); aB(ba.originalEvent.touches[0].pageX, ba.originalEvent.touches[0].pageY) } }).bind("touchend", function() { clearTimeout(aY); if (V) { M.remove(); V = 0; aT() } }).bind("touchcancel", function() { clearTimeout(aY); if (V) { M.remove(); a2.remove(); G = 0; V = 0 } }) } function u(bc) { if (N.Pencil) { return true } function a6(be) { return be.data("ObjectLetter").html() == bc && be.data("SolveStatus") != "*" } var bd = N.Cells, a7 = parseInt(ab.data("data")["x"]), a5 = parseInt(ab.data("data")["y"]), bb = a7, a8 = a5, ba, a9; for (ba = 1; ba <= N.Width; ba++) { if (ba != a5 && a6(bd[a7][ba])) { return false } } for (ba = 1; ba <= N.Height; ba++) { if (ba != a7 && a6(bd[ba][a5])) { return false } } a7 = (a7 <= o) ? 1 : a7 - ((a7 % o == 0) ? o : a7 % o) + 1; a5 = (a5 <= aq) ? 1 : a5 - ((a5 % aq == 0) ? aq : a5 % aq) + 1; for (ba = a7; ba < a7 + o; ba++) { for (a9 = a5; a9 < a5 + aq; a9++) { if (ba != bb && a9 != a8 && a6(bd[ba][a9])) { return false } } } return true } function aW() { var a5 = aN.XMLGame.find("arrows"); if (a5.length == 0) { return false } f.each(N.ArrowSettings, function(a6, a7) { if (a5.attr(a6)) { N.ArrowSettings[a6] = parseFloat(a7) } }) } function s() { var a6, bg = aV["scroll-width"], bc = aV["scroll-height"], a5 = aO, a8 = N.InicioX, a7 = N.InicioY; if (bg || bc) { N.Scroll = true; aO = f("
    ").css({ overflow: "auto", "float": "left", display: "inline-block", position: "relative", backgroundColor: "gray", borderLeft: "solid 1px transparent", borderTop: "solid 1px transparent" }).appendTo(aO); if (bg) { aO.css({ width: (bg - 1) + "px" }) } if (bc) { aO.css({ height: (bc - 1) + "px" }) } N.InicioX = 0; N.InicioY = 0 } a6 = g(aN, N, aO); aC(); var bb, a9, be = aS.find("cell"), bd = {}, bf, ba = N.Cells; f.each(be, function(bk, bl) { var bi = f(this).attr("x").split("-"), bo = f(this).attr("y").split("-"), bm = (bi.length > 1) ? (bi[1] - bi[0] + 1) : 1, bj = (bo.length > 1) ? (bo[1] - bo[0] + 1) : 1, bh = parseInt(bi[0]), bn = parseInt(bo[0]); for (bb = 0; bb < bm; bb++) { for (a9 = 0; a9 < bj; a9++) { if (bb || a9) { ba[bh + bb][bn + a9] = "?" } } } ba[bh][bn] = "?"; bd[bh + "-" + bn] = f(bl) }); for (bb = 1; bb <= N.Width; bb++) { for (a9 = 1; a9 <= N.Height; a9++) { if (bd[bb + "-" + a9] != null) { bf = a6.make(r, bd[bb + "-" + a9], aa, N.ArrowSettings); if (bf) { ba[a6.x][a6.y] = bf; S.push(bf); az(bf) } } } } for (bb = 1; bb <= N.Width; bb++) { for (a9 = 1; a9 <= N.Height; a9++) { if (ba[bb][a9] == "?") { ba[bb][a9] = null } } } if (bg || bc) { aO = a5; N.InicioX = a8; N.InicioY = a7 } } function ak() { var a6 = aN.Params; function a5(a7, a8) { if (a6.hasOwnProperty(a7)) { aa[a8] = a6[a7] } } a5("GRIDBACKCOLOR", "grid-background-color"); a5("GRIDCOLOR", "grid-line-color"); a5("BLOCKCOLOR", "block-color"); a5("FONTCOLOR", "font-color"); a5("NUMCOLOR", "number-color"); a5("REVEALEDCOLOR", "revealed-color"); if (a6.hasOwnProperty("NOPOPUPKEYBOARD")) { N.NoFocus = a6.NOPOPUPKEYBOARD != "false" } aD(a6.PROGRESS || w.GetCookie()) } function ag(a5) { var a6 = ab.data("data"), a7 = am.KeyWordID[a6.x + "-" + a6.y]; if (a7) { N.DrawSizedLetter(f(a7).find("p span"), a5, 1, parseInt(af * 0.75)) } } function aC() { var a6 = aN.Params.GRIDBACKCOLOR || m, a5 = aO.fillRect(N.InicioX, N.InicioY, N.Width * af + 1, N.Height * af + 1, { color: a6 }); Raphael(a5.get(0), N.Width * af, N.Height * af) } function az(a6) { f(a6).bind("click", function(a8) { var a7 = f(this); aN.RunTimer(); try { if (!(I == true && ab.get(0) == this && v)) { I = false } } catch (a8) { I = false } if (ab != "" && I != true) { if (ab.data("data")["x"] == a7.data("data")["x"] && ab.data("data")["y"] == a7.data("data")["y"]) { aJ = !aJ } } ab = a7; if (au) { aP(); F = new Array(ab) } else { aH() } X(); x(); return false }); if (v) { function a5() { clearTimeout(aZ); aZ = null } f(a6).bind("touchstart", function(a7) { if (a7.originalEvent.touches.length == 1 && ab.get(0) == this) { aZ = window.setTimeout(function() { alert("Multiletter On"); I = true }, 1000) } }).bind("touchend", a5).bind("touchmove", a5) } } function R() { var a5 = aN.XMLGame, a6 = a5.find("grid-look"); f.each(aa, function(a7, a8) { if (a7 != "numbered-sides" && a6.attr(a7) != null) { aa[a7] = a6.attr(a7) } }); if (au) { aq = parseInt(a5.attr("box-height")); o = parseInt(a5.attr("box-width")) } af = parseInt(aa["cell-size-in-pixels"]); N.Size = af; N.FontSize = parseInt(10 * af * (aN.Attributes["hide-numbers"] ? 0.75 : 0.65)) / 10; N.NumberSize = parseInt(af * 0.38 * 10) / 10; if (aa["thick-border"] == "true") { N.InicioX += 2; N.InicioY++ } ak(); N.FontColor = aa["font-color"]; f("").appendTo(aO) } function at() { var a6 = false; if (ab.data("ImLink")) { var a5 = [], ba = aK.split(","), bc = b({ x: ba[0], y: ba[1] }); f.each(am.Words[aQ]["Squares"], function(bd, bf) { if (f.inArray(bf, bc) < 0) { var be = bf.split("-"); a5.push(N.Cells[be[0]][be[1]]) } }); f.each(ab.data("WordId"), function(bd, bg) { var bf = am.Words[bg], be = bf.cells; f.each(be, function(bk, bm) { var bn = f(this).attr("x") + "," + f(this).attr("y"); if (aK == bn) { aQ = bf.id; var bl = b({ x: be.attr("x"), y: be.attr("y") }), bh = [], bj = [], bi = false; f.each(bf.Squares, function(bo, bq) { var bp = bq.split("-"); if (f.inArray(bq, bl) < 0) { bh.push(N.Cells[bp[0]][bp[1]]); K++ } }); f.each(bf.cells, function(bo, bq) { var bp = f(this), br = bp.attr("x") + "," + bp.attr("y"), bs; if (aK == br) { bi = true } else { bs = b({ x: bp.attr("x"), y: bp.attr("y") }); f.each(bs, function(bu, bv) { var bw = bv.split("-"), bt = bi ? bj : bh; bt.push(N.Cells[bw[0]][bw[1]]); if (!bi) { K++ } }) } }); F = f.merge(bh, F); F = (bj.length > 0) ? f.merge(F, bj) : F; a6 = true } }) }) } var a8 = F; if (!au && a8[1] != null) { var a9 = a8[0].data("WordId"), a7 = a8[1].data("WordId"); f.each(a9, function(bd, be) { if (f.inArray(be, a7) > -1) { aQ = be } }); if (!a6 && (a8[1].data("ImLink") || a8[0].data("ImLink"))) { var bb = am.Words[aQ]["cells"].eq(0); f.each(bb, function(be, bg) { var bf = b({ x: bb.attr("x"), y: bb.attr("y") }), bd = []; f.each(am.Words[aQ]["Squares"], function(bh, bj) { var bi = bj.split("-"); if (f.inArray(bj, bf) < 0) { N.Cells[bi[0]][bi[1]].css({ backgroundColor: aV["selected-cells-color"] }); bd.push(N.Cells[bi[0]][bi[1]]); K++ } }); ab.css({ backgroundColor: aV["cursor-color"] }); F = f.merge(bd, F) }) } } } function ao() { if (ab.data("WordItem") != null && ab.data("ImLink") == null) { var a6 = aK.split(","), a5 = b({ x: a6[0], y: a6[1] }); f.each(am.Words[aQ]["cells"], function(a8, a9) { var a7 = b({ x: f(a9).attr("x"), y: f(a9).attr("y") }); f.each(a7, function(ba, bc) { var bb = bc.split("-"); if (f.inArray(bb[0] + "-" + bb[1], a5) < 0) { a5.push(bb[0] + "-" + bb[1]); F.push(N.Cells[bb[0]][bb[1]]) } }) }) } } function aH() { aP(); aK = []; aG = []; aF = []; F = !aJ ? f.merge(U(0, -1), U(0, 1)) : f.merge(U(-1, 0), U(1, 0)); if (F.length == 1) { if (ab.data("Unique") == null || ab.data("Unique") == "") { ab.data("Unique", "YES"); aJ = !aJ; aH() } } aK = (aG.length > 1 && aG[0] == aG[1]) ? aG[0] + "," + aF[0] + "-" + aF[aF.length - 1] : aG[0] + "-" + aG[aG.length - 1] + "," + aF[0]; ab.data("Unique", ""); ao(); at(); Z = F.length - 1; f.each(F, function(a5, a6) { a6.css("background-color", aV["selected-cells-color"]) }) } function Y(a5) { if (a5 != null) { f.each(a5, function(a6, a8) { var a9 = am.Words[a8]["Squares"]; f.each(am.Words[a8]["cells"], function(ba, bb) { a9 = f.merge(b({ x: f(this).attr("x"), y: f(this).attr("y") }), a9) }); var a7 = true; f.each(a9, function(ba, bb) { var bc = bb.split("-"); if (N.Cells[bc[0]][bc[1]].data("ObjectLetter").html() == "") { a7 = false } }); (a7) ? f("li#LI" + a8).addClass("Completed"): f("li#LI" + a8).removeClass("Completed") }) } } function ar(a5) { if (!isNaN(aN.MaxCheat) && aN.MaxCheat != -1 && y < aN.MaxCheat) { y++ } else { if (aN.MaxCheat != -1) { a5.fadeTo("fast", 0.5); if (Action.hasOwnProperty("reveal-word")) { Action["reveal-word"].fadeTo("fast", 0.5) } return false } } return true } function av() { var a5 = aN.XMLGame.find("numbered-sides"); if (a5.length > 0) { if (a5.attr("top") != null) { var a6 = a5.attr("top").split(","); aa["numbered-sides"]["top"] = a6; f.each(a6, function(a8, a9) { if (a8 >= N.Width) { return false } aO.fillRect(N.InicioX + ((a8 + 1) * af), N.InicioY, af, af, { color: m }); aO.find("div:last").append(f("

    ").css({ width: af + "px", fontFamily: "sans-serif", marginTop: "9px", "text-align": "center", fontSize: parseInt(af * 0.5) + "px" }).html(a9)) }); N.InicioY += af } if (a5.attr("left") != null) { var a7 = a5.attr("left").split(","); aa["numbered-sides"]["left"] = a7; f.each(a7, function(a8, a9) { if (a8 >= N.Height) { return false } aO.fillRect(N.InicioX, N.InicioY + ((a8) * af), af, af, { color: m }); aO.find("div:last").append(f("").css({ "float": "right", marginTop: parseInt(af * 0.25) + "px", marginRight: "4px", fontFamily: "sans-serif", fontSize: parseInt(af * 0.5) + "px" }).html(a9)) }); N.InicioX += af } } } function x() { var a8 = N.Input, a7 = f(window); if (!(N.NoFocus && v)) { a8.focus(); if (!a8.is(":focus")) { a8.css({ width: "1px", height: "1px" }); a8.focus() } } if (aX.length) { var a6 = a8.offset().top, a5 = aX.offset().top; if (aX.is(":visible") && a6 > a5) { a7.scrollTop(a7.scrollTop() + a6 - a5 + af) } } } function aD(a8) { if (!a8) { return } var a6, a5 = false, a7 = ""; if (!E) { a8 = a8.split(""); for (a6 = 0; a6 < a8.length; a6++) { if (a8[a6] != "|" && !a5) { N.Progress.push({ solution: a8[a6], Pencil: false }) } else { a5 = true } if (a5 && a8[a6] != "|" && a8[a6] != "*") { a7 += a8[a6] } if (a8[a6] == "|" && a7 != "") { N.Progress.push({ solution: a7, Pencil: true }); a7 = ""; a5 = false } } } else { N.Progress = a8.split(/\).?\(/g); for (a6 = 0; a6 < N.Progress.length; ++a6) { N.Progress[a6] = N.Progress[a6].replace(/[\(\)]/g, "") } } } function aP() { f.each(F, function(a5, a6) { if (a6.data("Correct") == true || !a6.data("Use").img) { a6.find("img").show() } a6.css("background-color", a6.data("background-color")) }) } function Q(a5) { if (console && console.error) { console.error(a5) } throw a5 } function X() { if (!ab) { Q(new Error("CellSelected is Undefined")) } var a7 = ab, bg = 0, a8; a7.css("background-color", aV["cursor-color"]).find("img").hide(); if (au) { aP(); F = []; F.push(a7); a7.css("background-color", aV["cursor-color"]) } a7 = a7 || ab; am.ResetLi(); a8 = a7.offset(); if (j) { bg = ((af / 2) * 0.8) } N.Input.offset({ top: a8.top + bg, left: a8.left }); if (au || a7.data("LIS") == null) { return } f.each(ab.data("LIS"), function(bl, bm) { f.each(bm, function(bs, bv) { var bu = f(this); if (!bu.data("coordinates")) { return false } if (!bu.hasClass("ClueCell")) { am.SetReference(bu) } if (!bu.data("data")["IsLink"] && bu.data("coordinates") == aK) { if (bu.hasClass("ClueCell")) { am.ResetLi(); am.SetReference(bu) } ai(bu) } var bq = bu.offset(), br = bu.parent(), bt = br.find("li").eq(0).offset(), bp = bq.top - bt.top, bo = (bp + bu.height() + 5 > br.scrollTop() + br.height() || br.scrollTop() > bp + bu.height() + 5), bn = (bp > br.scrollTop() + br.height() || br.scrollTop() > bp); if (bo || bn) { br.scrollTop(bp) } }) }); if (ay["scroll-height"] || ay["scroll-width"]) { var a6 = a7.parent(), bd = a7.parent().offset(), be = bd.top, bk = bd.left, bj = a6.scrollLeft(), ba = a6.scrollTop(), a9 = a6.width() - 20, bi = a6.height() - 20, bf = a8.top - be, bc = a8.left - bk, a5 = a7.width(), bb = a7.height(), bh = F[Z].offset(); if (bh.left + a5 > a9 - 5) { a6.scrollLeft(bj + bc) } else { if (bc < 0) { a6.scrollLeft(bc + bj) } } if (bh.top + bb > bi - 5) { a6.scrollTop(ba + bf) } else { if (bf < 0) { a6.scrollTop(bf + ba) } } } } function an(a5) { var a6 = 0.85; if (aR.x == a5.x) { a2.attr({ height: Math.abs(a5.y - aR.y) * af + af * a6 }); (aR.y > a5.y) ? aw(180): aw(0); return false } else { if (aR.y == a5.y) { a2.attr({ height: Math.abs(a5.x - aR.x) * af + af * a6 }); (aR.x > a5.x) ? aw(90): aw(270); return false } else { a2.attr({ height: parseInt(Math.sqrt(af * af * 2)) * (Math.abs(a5.x - aR.x) + 1) - af * 2 * (1 - a6) }); if (a5.x > aR.x) { if (aR.y == a5.y + (a5.x - aR.x)) { aw(225); return false } else { if (aR.y == a5.y - (a5.x - aR.x)) { aw(315); return false } } } else { if (aR.y == a5.y + (a5.x - aR.x)) { aw(45); return false } else { if (aR.y == a5.y - (a5.x - aR.x)) { aw(135); return false } } } } } return true } function aU(a7, a8, a5) { var a9 = undefined; a7.focus(a6).blur(ba); function a6() { if (a9 === undefined) { ah = a7.val() || ""; a9 = setInterval(bb, a8) } } function ba() { if (a9 !== undefined) { clearInterval(a9); a9 = undefined; a7.val(" "); ah = " " } } function bb() { var be, bf, bc, bd = a7.val() || "", bg = ah; if (bd.length > bg.length) { bf = bd.substr(bg.length); for (be = 0; be < bf.length; ++be) { a5.call(a7.get(0), { which: bf.charCodeAt(be) }) } } else { if (bd.length < bg.length) { bc = bg.length - bd.length; for (be = 0; be < bc; ++be) { a5.call(a7.get(0), { which: 8 }) } } } if (bd.length <= 0) { bd = " "; a7.val(bd) } ah = bd } } function ax() { var a7 = navigator.userAgent, a6 = true; if (E) { return false } function a8(bc) { if (bc.which == 0 || bc.which == 8) { return true } aN.RunTimer(); N.DrawLetter(String.fromCharCode(bc.which), bc.which, bc); if (a6) { bc.preventDefault() } } function bb(bc) { if (f.inArray(bc.which, [37, 38, 39, 40, 46, 45, 8]) > -1) { N.DrawLetter(String.fromCharCode(bc.which), bc.which, bc); if (a6) { bc.preventDefault() } } } var a9 = N.Input, a5 = a7.indexOf("Android") >= 0, ba = a7.indexOf("OS 3_2 like Mac") >= 0 || a5 && a7.indexOf("Chrome") >= 0; a9.css({ position: "absolute", "z-index": "-10000", overflow: "hidden", background: "transparent", display: "block", "font-size": "1px", border: "none", "box-shadow": "none", "-moz-box-shadow": "none", "-webkit-box-shadow": "none", color: "transparent", opacity: "0", width: "1px", height: "1px" }).appendTo(aO).attr("autocorrect", "off").attr("spellcheck", "false").attr("autocomplete", "off"); if (a7.indexOf("Fennec") >= 0 || a5 && a7.indexOf("Firefox") >= 0 || ba) { a6 = false; aU(a9, 40, function(bc) { if (bc.which == 8) { bb.apply(N, arguments) } else { a8.apply(N, arguments) } }) } else { a9.keypress(a8).keydown(bb) } if (a5 || B || a0) { if (!ba) { a9.css({ width: "0px", height: "0px" }) } if (B || a0 || a5) { a9.css("font-size", "16px") } } if (j) { a9.css("font-size", "0px") } if (j <= 8) { a9.css("zoom", ".01") } if (v) { a9.css({ top: aO.offset().top + "px", left: ((ay.width) / 2) + "px" }) } } function aL(a5) { if (au) { aP(); F = new Array(ab) } else { aH() } aA(a5, true) } function D(bb) { N.FontColor = (aa["revealed-color"] != false) ? aa["revealed-color"] : aa["font-color"]; N.FontStyle = ""; N.FontWeight = "bolder"; var a6 = N.Pencil; N.Pencil = false; al = true; if (E && N.IdWord != 0) { N.RevealWordSearch(); return } else { var a8 = null, a5 = [], a9 = ab, a7; for (a7 = 0; a7 < bb.length; a7++) { a8 = bb[a7].data("Use"); var ba = a8[T]; bb[a7].data("ObjectLetter"); bb[a7].data("Correct", true); if (bb[a7].data(A)) { bb[a7].data(A).css({ opacity: 0 }) } if (a8.img) { bb[a7].find("img").show() } if (ad && aI[ba]) { ab = aI[ba]; aL("") } ab = bb[a7]; aL(ba); a5 = f.merge(a5, F[a7].data("WordId")) } if (a9) { ab = ""; a9.click() } a5 = f.unique(a5); Y(a5); if (!v) { x() } } al = false; if (a6) { N.FontStyle = "italic"; N.FontWeight = ""; N.FontColor = aa["pencil-color"]; N.Pencil = true } } function aE() { var a5, a7, a6; N.Width = parseInt(aS.attr("width")); N.Height = parseInt(aS.attr("height")); N.ViewHeight = aV["scroll-height"] || af * N.Height; N.ViewWidth = aV["scroll-width"] || af * N.Width; for (a6 = 0; a6 <= N.Width; a6++) { a7 = []; for (a5 = 0; a5 <= N.Height; a5++) { a7.push("") } N.Cells.push(a7) } } function U(bb, a8) { var ba = ab, bf = ba.data("data"), a6 = bf.x, a5 = bf.y, bd = [], bc = (ba.data("WordId")) ? ba.data("WordId") : [], a9 = 1, a7 = "", be; while ((bb > 0 && ++a6 <= N.Width || bb < 0 && a6-- > 0 || a8 > 0 && a5++ < N.Height || a8 < 0 && a5-- > 0) && a9) { a7 = N.Cells[a6][a5]; a9 = 0; if (a7 != null && a7 != "") { be = a7.data("WordId"); if (be != null) { f.each(bc, function(bg, bh) { if (!a9) { if (f.inArray(bh, be) >= 0) { a9 = 1; bd.push(a7); aQ = bh; aG.push(a6); aF.push(a5) } } }) } } } if (a8 < 0 || bb < 0) { K = bd.length; bd = bd.reverse(); bd.push(ab); aG.reverse(); aG.push(bf.x); aF.reverse(); aF.push(bf.y) } return bd } function aM(bf, a9) { var be = ab.data("data"), a7 = parseInt(be.y), a8 = parseInt(be.x), bc = a8, ba = a7, bb = true, a5 = true, bd = aJ == true; if (aN.isCoded) { a9 = false } if (!a9) { aJ = (bf == 40 || bf == 38) ? false : true } else { if ((bf == 40 && aJ) || ((bf == 37 || bf == 39) && !aJ) || (aJ && bf == 38 && K != 0)) { bb = false } } while (bb) { if (bf == 40 && ++a7 > N.Height || bf == 38 && --a7 == 0 || bf == 39 && ++a8 > N.Width || bf == 37 && --a8 == 0) { bb = false; a5 = true } if (bb && N.Cells[a8][a7] != null && N.Cells[a8][a7] != "") { if (ab.data("ObjectLetter").html() != "") { N.Cells[a8][a7].click() } else { if (bd != aJ) { aJ = !aJ; N.Cells[bc][ba].click() } else { N.Cells[a8][a7].click() } } bb = a5 = false } } if (a9 && a5) { var a6 = aO.find("li.Selected"), bg = null; if (a6.length == 1) { if (bf == 40 || bf == 39) { bg = aO.find("li").eq(a6.data("index") + 1); if (bg.length == 0) { bg = aO.find("li:first") } bg.click(); return } else { if (bf == 38 || bf == 37) { bg = aO.find("li").eq(a6.data("index") - 1); if (bg.length == 0) { bg = aO.find("li:last") } bg.click(); return } } } } } function ap(a6, a8) { var a9 = f.inArray(a6, N.LetterUsed); if (a9 >= 0 && a6 != "") { if (ab.data("ObjectLetter").html() != "") { if (!N.Background && !I && !N.Solution) { ab.css("background-color", aV["selected-cells-color"]); if (ay["type-skip-existing"] != false) { var a7 = K++; if (K > Z) { K = 0 } while (F[K].data("ObjectLetter").html() != "" && a7 != K) { K++; if (K > Z) { K = 0 } } } else { if (K < Z) { K++ } } ab = F[K] } } return false } else { var a5 = ab.data("ObjectLetter").html(); if (a5) { N.LetterUsed[f.inArray(a5, N.LetterUsed)] = ""; aI[a5] = undefined; N.LetterUsed = f.grep(N.LetterUsed, function(ba) { return ba != "" }) } N.LetterUsed.push(a6); aI[a6] = a8; N.RepaintAlphabet() } return true } return { CodedHint: [], FontSize: 0, NumberSize: 0, IdWord: 0, CodedLetter: {}, Progress: [], Scroll: false, Solution: false, TotalGoal: 0, Goal: 0, Shift: false, NoFocus: false, LetterUsed: [], Pencil: false, InicioX: 0, InicioY: 0, Input: f(""), XML: {}, Cells: [], Cell: {}, CellSelected: function() { return ab }, Width: 0, Height: 0, ViewHeight: 0, ViewWidth: 0, Size: 0, X: 200, Y: 200, FontColor: "black", FontStyle: "", FontWeight: "bolder", DomForSolution: f("

    ").css({ width: "100%", "text-align": "center", "font-family": "sans-serif", "font-weight": "normal", position: "absolute" }).append(f("")), Settings: { "numbered-sides": { top: 0, left: 0 }, "italian-style": false, "bars-in-collocations": "?", "thick-border": false, "numbering-schema": "normal", "cell-size-in-pixels": 21, "grid-line-color": "black", "grid-background-color": "white", "block-color": "black", "font-color": "black", "pencil-color": "blue", "number-color": "black", "clue-background-color": "white", "clue-foreground-color": "", "clue-square-divider-width": 1, "revealed-color": false }, ArrowSettings: { stem: 0.1, "head-width": 0.1, "head-length": 0.1, "bend-start": 0.2, "bend-end": 0.1, "bend-side-offset": 0.1 }, Start: function(a8, a5, a7, a6) { N = this; am = aN.Clues; ae = am.WordsWordSearch; w = aN.PuzzleState; E = aN.isWordSearch; au = aN.isSudoku; ad = aN.isCoded; aS = aN.XMLGame.find("grid"); aa = N.Settings; N.InicioX = a7; N.InicioY = a6; aV = a5; N.XML = a8; R(); _isTouch = ("ontouchstart" in window) || window.DocumentTouch && document instanceof DocumentTouch || window.navigator.maxTouchPoints > 0; try { document.createEvent("TouchEvent"); v = true } catch (a9) {} aE(); av(); aW(); s(); aN.RepaintHeightClues(); if (!E) { ax(); return false } a4() }, FirstTime: function() { if (f(window).scrollTop() + f(window).height() >= S[0].offset().top) { aJ = S[0] == ab ? false : true; S[0].click() } }, ClueAction: function(a8) { if (a8 && a8.length > 1) { var a6 = a8[0].split("-"); var a5 = a8[1].split("-"), a7 = aJ; if (a6[0] == a5[0]) { aJ = false } else { if (a6[1] == a5[1]) { aJ = true } } if (ab && ab.data("data")["x"] == a6[0] && ab.data("data")["y"] == a6[1]) { aJ = a7 != aJ ? a7 : aJ } N.Cells[parseInt(a6[0])][parseInt(a6[1])].click() } }, GridSetCellSelected: function(a5, a6) { ab = N.Cells[a5][a6]; aH(); X(); x(); N.Input.get(0).scrollIntoView() }, DrawLetter: function(a6, a7, a8) { if (f.inArray(a7, [37, 38, 39, 40]) > -1) { aM(a7, a8.shiftKey); return false } switch (a7) { case 13: I = false; var a9 = aO.find("li").index(aO.find("li.Selected").eq(0)); if (a8.shiftKey) { a9 = (a9 == 0) ? aO.find("li").length - 1 : a9 - 1 } else { a9 = (a9 + 1 < (aO.find("li").length)) ? a9 + 1 : 0 } aO.find("li").eq(a9).click(); break; case 46: aA("", true); break; case 32: aA("", false); break; case 27: aA("", false); break; case 45: if (!au) { if (ad && !this.Pencil) { return false } I = !I } break; case 8: var a5 = ab.data("ObjectLetter").html(); a5 = a5.split(""); z = true; a5 = ((a5.length > 1) ? a5.slice(0, a5.length - 1) : [""]).join(""); aA(a5, true); z = false; break; default: aA(a6, false) } X(); x() }, DrawSizedLetter: function(a9, ba, a6, bb) { a6 = a6 || au || E || aN.Attributes["hide-numbers"]; bb = bb || N.FontSize; var a8 = a9.parent(), a5 = (E ? 0 : (a6 ? 2 : N.NumberSize - 1)); a9.css({ fontSize: bb + "px", "line-height": 1 }).html(ba); if (ba.length > 1) { var a7 = a9.width(), bc = af / a7; if (a7 > af - 3) { bb *= (bc - 0.1); a9.css({ fontSize: bb + "px" }) } } a8.css({ "margin-top": a5 + "px", fontSize: "1px" }); if (bb < af - a5) { a9.css("line-height", (af - a5) + "px") } }, RepaintAlphabet: function() { f.each(aN.LetterAlphabet, function(a5, a6) { (f.inArray(f(this).html(), N.LetterUsed) >= 0) ? f(this).fadeTo("fast", 0.5): f(this).fadeTo("fast", 1) }) }, LoadProgress: function() { var a8, a5, a7, a6 = N.Progress; if (E) { for (a8 = 0; a8 < a6.length; a8++) { a7 = a6[a8].split(","); if (a7[0] != "") { a1(parseInt(a7[0]), parseInt(a7[1])); ac(parseInt(a7[2]), parseInt(a7[3])); aT(); a7.shift() } } return } for (a8 = 1; a8 <= N.Height; a8++) { for (a5 = 1; a5 <= N.Width; a5++) { if (N.Cells[a5][a8] != null && N.Cells[a5][a8] != "") { if (a6[0] != null && a6[0].solution != "-") { if (a6[0].Pencil) { N.Pencil = true; N.FontStyle = "italic"; N.FontWeight = ""; N.FontColor = aa["pencil-color"] } ab = N.Cells[a5][a8]; aL(a6[0].solution); a6.shift(); N.Pencil = false; N.FontStyle = ""; N.FontWeight = "bolder"; N.FontColor = aa["font-color"] } else { if (a6[0] != null && a6[0].solution == "-") { a6.shift() } } } } } }, ButtonActions: { revert: function() { var a5, a6; am.Div.find("li").removeClass("Completed").find("p").css({ color: am.Attributes.color }); if (E) { f.each(ae, function(a7, a8) { if (a8.Object != null) { if (!a8.Object._raph_removed) { a8.Object.remove(); a8.Object._raph_removed = true } a8.Object = null; a8.Input = null } if (a8.Real != null) { delete ae[a7] } }) } else { a6 = ab; f.each(S, function(a7, a9) { var a8 = f(this); a5 = a8.data("Use"); if (a5.hint != true) { a8.find("img").hide(); if (a8.data("ObjectLetter").html()) { ab = a8; aL(""); if (a8.data(A)) { a8.data(A).css({ opacity: 0 }) } } } }); if (a6) { ab = ""; a6.click() } x() } t = 0; q = 0; N.TotalGoal = 0 }, check: function() { if (E) { f.each(ae, function(a6, a7) { if (a7.Real == false) { if (!a7.Object._raph_removed) { a7.Object.remove(); a7.Object._raph_removed = true } delete ae[a6] } }) } x(); if (E) { return false } function a5(a6) { if (a6.data("isLetter")) { var a7 = a6.fillRect(0, 0, af, af, { color: m }); a7.css({ textAlign: "center", fontFamily: "sans-serif", fontSize: af * 1.1 + "px", color: "red", fontWeight: "normal" }).append(f("

    ").css({ opacity: "0" }).html("X")); a6.data(A, a7.find("div:eq(0)")) } } f.each(S, function(a6, a7) { $this = f(this); var a8 = $this.data("ObjectLetter").html(); if (a8 != "" && $this.data("Use")[T] != a8) { if (!$this.data(A)) { a5($this) } if ($this.data(A)) { $this.data(A).fadeTo("fast", 1) } } }) }, save: function() { w.Save() }, submit: function() { w.Submit() }, "reveal-word": function() { if (!ar(f(this))) { return false } D(F); return false }, "reveal-letter": function() { if (!ar(f(this))) { return false } D(new Array(ab)); return false }, solution: function() { am.Div.find("li").addClass("Completed").find("p").css({ color: am.Attributes["completed-color"] }); if (E) { f.each(ae, function(a9, ba) { if (ba.Object != null) { ba.Object.remove(); ba.Object = null } if (ba.Real == null) { var bd = a9.split("/"), bc = bd[0].split("-"), bb = bd[1].split("-"); a1(bc[0] - 1, bb[0] - 1); G = { x: bc[1] - 1, y: bb[1] - 1 }; an({ x: bc[1] - 1, y: bb[1] - 1 }); a3 = 0; ba.Object = a2; a2 = null } }); return false } N.Solution = true; for (var a6 = 0; a6 < S.length; a6++) { var a8 = S[a6], a5 = a8.data("Use"), a7 = a8.data("ObjectLetter"); if (a5.hint) { continue } a7.css({ color: aa["font-color"], fontWeight: "bolder", fontStyle: "" }); if (a5.img) { a8.find("img").show() } a8.data("Correct", true); if (a8.data(A)) { a8.data(A).css({ opacity: 0 }) } N.DrawSizedLetter(a7, a5[T]) } N.Solution = false; x() }, pencil: function() { x(); if (E) { return false } if (!N.Pencil) { N.FontStyle = "italic"; N.FontWeight = ""; N.FontColor = aa["pencil-color"]; f(this).css({ border: "solid 1px black" }); f(this).height(f(this).height() - 2) } else { N.FontStyle = ""; N.FontWeight = "bolder"; N.FontColor = aa["font-color"]; f(this).css({ border: "solid 1px transparent" }); f(this).height(f(this).height() + 2) } N.Pencil = !N.Pencil } }, RevealWordSearch: function() { var a5 = am.Words[N.IdWord]["WordSearch"], a6 = ae[a5]; if (a6.Object != null) { return false } am.Div.find("li#LI" + N.IdWord).addClass("Completed"); am.ResetLi(); var a9 = a5.split("/"), a8 = a9[0].split("-"), a7 = a9[1].split("-"); a1(a8[0] - 1, a7[0] - 1); G = { x: a8[1] - 1, y: a7[1] - 1 }; an({ x: a8[1] - 1, y: a7[1] - 1 }); a3 = 0; if (a6.Object != null) { a6.Object.remove() } a6.Object = a2; a6.Input = false; a2 = null }, ProcessHintLetter: function() { if (aN.isCoded) { var a6, a7 = N.CodedHint, a5 = ab; C = true; for (a6 = 0; a6 < a7.length; a6++) { ab = N.Cells[parseInt(a7[a6]["x"])][parseInt(a7[a6]["y"])]; aA(a7[a6][T], false) } C = false; ab = a5 } } } } function e(s, q, t, r, o) { var u = document.createElement("div"); u.setAttribute("style", "cursor:default;height:" + s + "px;width:" + q + "px;background-color:" + t + "; position: absolute; top:" + r + "px; left:" + o + "px;"); return u } function d(s, q, t, r, o, v) { var u = e(s, q, t, r, o); f(u).css({ border: "solid " + v + " 1px" }); return u } function c(t) { var r = new Array(t.find(">*").length), o = ["b", "i", "sub", "sup", "span"], q, s = ""; f.each(o, function(u, w) { for (q = 0; q < t.children(w).length; q++) { var x = t.find(w).eq(q), y = (x.find(">*").length > 0) ? c(x) : (x.text()) ? x.text() : "", v = f("
    ").append(f("<" + w + "/>").html(y)).html(); r[t.find("*").index(x)] = (v != null) ? v : "" } }); f.each(r, function(u, v) { s += (v != null) ? v : "" }); return s } function k(r) { var o = r.split(""), q = ""; f.each(o, function(s, t) { if (t == t.toUpperCase() && s != 0) { q += "-" + t } else { q += t } }); return q.toLowerCase() } function b(t) { if (t == null) { return [] } var s = t.x.split("-"), v = t.y.split("-"), u = [], r = (s.length == 1) ? "X" : "Y", o, w, q; if (r == "X") { v[0] = parseInt(v[0]); v[1] = parseInt(v[1]); o = (v[0] > v[1]) ? v[1] : v[0]; w = (v[0] > v[1]) ? v[0] : v[1]; for (q = o; q <= w; q++) { u.push(s[0] + "-" + q) } } if (r == "Y") { s[0] = parseInt(s[0]); s[1] = parseInt(s[1]); o = (s[0] > s[1]) ? s[1] : s[0]; w = (s[0] > s[1]) ? s[0] : s[1]; for (q = o; q <= w; q++) { u.push(q + "-" + v[0]) } } return u }(function(r) { r.fn.settings = { color: "#000000", stroke: 1, alpha: 1 }; r.fn.fillRect = function(u, D, v, z, B) { var C = t(r(this), B), A = q(C, u, D, v, z); return A }; r.fn.drawRect = function(u, C, v, z, A) { var B = t(r(this), A); B.drawRect(B, u, C, v, z); return r(this) }; function t(v, u) { v.opts = r.extend({}, r.fn.settings, u); return s(v) } function s(u) { u.drawRect = o; return u } function o(C, u, B, v, A) { var z = C.opts.stroke; q(C, u, B, v, z); q(C, u + v, B, z, A); q(C, u, B + A, v + z, z); q(C, u, B + z, z, A - z) } function q(C, v, B, z, A) { var u = r('
    '); u.css("opacity", C.opts.alpha); C.append(u); return u } })(jQuery); jQuery.fn.extend({ everyTime: function(q, r, s, t, o) { return this.each(function() { jQuery.timer.add(this, q, r, s, t, o) }) }, oneTime: function(o, q, r) { return this.each(function() { jQuery.timer.add(this, o, q, r, 1) }) }, stopTime: function(o, q) { return this.each(function() { jQuery.timer.remove(this, o, q) }) } }); jQuery.extend({ timer: { guid: 1, global: {}, regex: /^([0-9]+)\s*(.*s)?$/, powers: { ms: 1, cs: 10, ds: 100, s: 1000, das: 10000, hs: 100000, ks: 1000000 }, timeParse: function(r) { if (r == undefined || r == null) { return null } var o = this.regex.exec(jQuery.trim(r.toString())); if (o[2]) { var q = parseInt(o[1], 10); var s = this.powers[o[2]] || 1; return q * s } else { return r } }, add: function(t, r, s, v, w, q) { var o = 0; if (jQuery.isFunction(s)) { if (!w) { w = v } v = s; s = r } r = jQuery.timer.timeParse(r); if (typeof r != "number" || isNaN(r) || r <= 0) { return } if (w && w.constructor != Number) { q = !!w; w = 0 } w = w || 0; q = q || false; if (!t.$timers) { t.$timers = {} } if (!t.$timers[s]) { t.$timers[s] = {} } v.$timerID = v.$timerID || this.guid++; var u = function() { if (q && this.inProgress) { return } this.inProgress = true; if ((++o > w && w !== 0) || v.call(t, o) === false) { jQuery.timer.remove(t, s, v) } this.inProgress = false }; u.$timerID = v.$timerID; if (!t.$timers[s][v.$timerID]) { t.$timers[s][v.$timerID] = window.setInterval(u, r) } if (!this.global[s]) { this.global[s] = [] } this.global[s].push(t) }, remove: function(r, q, s) { var t = r.$timers, o; if (t) { if (!q) { for (q in t) { this.remove(r, q, s) } } else { if (t[q]) { if (s) { if (s.$timerID) { window.clearInterval(t[q][s.$timerID]); delete t[q][s.$timerID] } } else { for (var s in t[q]) { window.clearInterval(t[q][s]); delete t[q][s] } } for (o in t[q]) { break } if (!o) { o = null; delete t[q] } } } for (o in t) { break } if (!o) { r.$timers = null } } } } }); (/MSIE ([0-9]{1,}[\.0-9]{0,})/).exec(navigator.userAgent); var j = parseFloat(RegExp.$1), m = "transparent"; if (j) { jQuery(window).one("unload", function() { var r = jQuery.timer.global, o, q; for (o in r) { q = r[o], i = q.length; while (--i) { jQuery.timer.remove(q[i], o) } } }) } f.fn.CrosswordCompiler = function(r, x, L) { var H = f(this).attr("id"); if (H == null) { alert("You Must Pass An Element With an Id"); return } f("").appendTo(f(this)); if (!f.isXMLDoc(r)) { r = f.parseXML(r) } var t = 0, q = 0, z = 0, u = f("#" + H), v = 0, Q = 0, A = ["\x53\x6F\x66\x74\x77\x61\x72\x65\x20\x26\x63\x6F\x70\x79\x3B\x20\x32\x30\x31\x37\x20\x3C\x73\x70\x61\x6E\x3E\x63\x72\x6F\x73\x73\x77\x6F\x72\x64\x2D\x63\x6F\x6D\x70\x69\x6C\x65\x72\x2E\x63\x6F\x6D\x3C\x2F\x73\x70\x61\x6E\x3E"], P = 0, O = 0, G = 0, M = "compiler.com", D = 0, B = 0, s = ""; function K() { Q = v.XML.find("applet-settings"); G = v.Attributes; v.AppletSettings = Q; f.each(G, function(U, V) { var W = Q.attr(U); if (W != null) { if (G[U] === false) { W = W == "true" } else { if (G[U] === 0) { W = parseInt(W) } } G[U] = W } }); var T = Q.find("timer"), S = Q.find("completion"); if (S.length == 1 && S.attr("cheating")) { v.MaxCheat = parseInt(S.attr("cheating")) } if (T.length == 1) { v.TimerObject.Enabled = true; if (T.attr("initial-value")) { v.TimerObject.Start = parseInt(T.attr("initial-value")) } if (T.attr("start-on-load")) { v.TimerObject.OnLoad = ((T.attr("start-on-load") == "true")) } if (T.attr("allow-pause")) { v.TimerObject.Pause = ((T.attr("allow-pause") == "true")) } } E() } function o() { f.each(["crossword", "coded", "sudoku", "word-search"], function(S, T) { if (P.find(T).length == 1) { v.XMLGame = P.find(T); v.isWordSearch = (T == "word-search"); v.isSudoku = (T == "sudoku"); v.isCoded = (T == "coded") } }) } function E() { var Y = Q.find("copyright"), X = v.Params.TITLEHEIGHT, T = v.Params.MAXCHEATS, S = L.ROOTIMAGES || "CrosswordImages/"; function W(aa, Z) { if (L.hasOwnProperty(aa)) { G[Z] = L[aa] } } f.each(v.Images, function(Z, aa) { v.Images[Z] = S + v.Images[Z] }); if (X && parseInt(X)) { G["title-height"] = parsetInt(X) } if (T && parseInt(T)) { v.MaxCheat = parseInt(T) } var U = "SCROLLWIDTH", V = "SCROLLHEIGHT"; if (L.hasOwnProperty(U)) { G["scroll-width"] = parseInt(L[U]) || 0 } if (L.hasOwnProperty(V)) { G["scroll-height"] = parseInt(L[V]) || 0 } W("TITLELEFT", "title-left"); W("CURCOLOR", "cursor-color"); W("WRONGCOLOR", "wrong-letter-color"); W("BACKCOLOR", "background-color"); W("VALIDATESUDOKU", "validate-sudoku"); if (L.hasOwnProperty("TIMER")) { v.Timer.Enabled = L.TIMER } if (L.hasOwnProperty("STARTTIME")) { v.Timer.Start = L.STARTTIME } if (L.hasOwnProperty("NOPAUSE")) { v.Timer.Pause = L.NOPAUSE } if (L.hasOwnProperty("TIMEFROMLOAD")) { v.Timer.OnLoad = L.TIMEFROMLOAD } O = L.COPYRIGHT || ((Y.length == 1) ? (c(Y) == "") ? Y.text() : c(Y) : "") } function R() { var aa = null, Y = 208, Z = null, S = "crossword", X = G["show-alphabet"], U = f("
    ").css({ position: "absolute", fontSize: "11px", color: "black", fontFamily: "sans-serif", fontWeight: "normal", backgroundColor: m, cursor: "default", width: "220px", textAlign: "right" }).html(A[0]).appendTo(u).find("span").css({ color: "black", textDecoration: "none", cursor: "pointer" }).mouseover(function() { if (!aa) { f(this).css({ color: "blue", textDecoration: "underline" }) } }).mouseout(function() { f(this).css({ color: "black", textDecoration: "none" }) }).click(function() { if (aa) { return false } window.open("http://www." + S + "-" + M) }).on("touchend", (function() { if (X) { clearTimeout(aa); return false } })).on("touchstart", (function() { if (X) { aa = window.setTimeout(function() { window.open("http://www." + S + "-" + M) }, 1000); return false } })).end(), W = t.InicioY + 2, ad = t.InicioX - Y; W += t.ViewHeight + ((q.HasKeyWord) ? t.Size + 4 : 0); W += (q.Attributes.layout == "below" && q.Div.find(">div").length > 0) ? q.Div.height() : 0; var ab = t.ViewWidth; ad += ab; if (t.Settings["thick-border"] == "true") { W += 2 } U.css({ top: W + "px", marginLeft: (ad - 10) + "px" }); if (O != "") { Z = f("
    ").css({ position: "absolute", fontSize: "11px", color: "black", fontFamily: "sans-serif", fontWeight: "normal", backgroundColor: m, cursor: "default", top: W, marginLeft: t.InicioX + 2 + "px" }).addClass("PuzzleCopyright").html(O).appendTo(u); if (U.width() + Z.width() > ab) { var ae = parseInt(G.width) - Y - 12, T = v.TimerObject; if (v.TimerDiv && !T.Actions && q.Attributes.layout == "right") { ae -= v.TimerDiv.width() + 14 } U.css({ marginLeft: ae }) } } if (G["show-alphabet"] && Z == null) { var V = t.InicioX + (ab / 2) - Y / 2, ac = (t.InicioX + (ab / 2)) + (Y / 2); if (ac > G.width) { u.css({ width: u.width() + (parseInt(ac) - u.width()) + "px" }) } U.css({ marginLeft: V + "px" }) } } function C() { var S = Q.find("title"), T = (S.length > 0) ? (c(S)) ? c(S) : S.text() : ""; T = (L.hasOwnProperty("TITLE")) ? v.Params.TITLE : T; if (T != null && T != "" && T != "%TITLE%") { v.DivTitle = f("
    ").css({ "font-size": G["title-height"] + "px", width: "100%", "text-align": "center", "font-family": "sans-serif", "font-weight": "normal" }).addClass("PuzzleTitle").html(T); if (G["title-left"]) { DivTitle.css({ "text-align": "left" }) } u.append(v.DivTitle); B += v.DivTitle.height() } } function N() { if (v.DivTitle != "") { v.DivTitle.css({ opacity: 0 }); v.DivTitle.clone().css({ position: "absolute", opacity: 1, width: t.ViewWidth + "px", left: t.InicioX + "px", top: "0px" }).appendTo(u) } } function F() { if (v.TimerObject.Enabled == true) { v.TimerDiv = f("
    ").css({ "font-family": "sans-serif", "font-size": "14px", border: "0px", "font-weight": "bolder", cursor: "default" }).addClass("Timer").html("00:00").click(function() { if (v.TimerObject.Pause == true) { f(this).stopTime(); f(this).fadeTo("fast", 0.5); v.TimerObject.Stop = true } }) } } function w() { var W = P.attr("alphabet"); if (W != null) { v.Alphabet = W.split("") } if (G["show-alphabet"]) { var V = t.InicioY + t.ViewHeight + 5, Z = t.InicioX, T = 14, U = 14, S; W = v.Alphabet; while (T * W.length > t.Width * t.Size) { T--; U-- } S = t.ViewWidth - (W.length * T); S /= 2; Z += S; f.each(W, function(X, Y) { var aa = u.fillRect(Z + (T * X), V, T, 20, { color: "white" }).addClass("AlphabetLetter"); aa.click(function() { if (t.CellSelected()) { t.DrawLetter(f(this).html(), 5000) } }).html(Y).css({ cursor: "pointer", "font-weight": "bolder", "font-size": U + "px", "text-align": "center", "font-family": "sans-serif" }); v.LetterAlphabet.push(aa) }); t.InicioY += 22 } } function J() { if (v.isWordSearch) { return } f.each(v.Words, function(T, U) { if (U.keyword == "true") { return } var S = u.find("li#LI" + T); f.each(U.Squares, function(V, Y) { var W = Y.split("-"), X = v.Cells[parseInt(W[0])][parseInt(W[1])]; X.data("WordId").push(T); X.data("WordItem").push(U); X.data("LIS").push(S) }); f.each(U.cells, function(V, W) { var X = f(this), Y = b({ x: X.attr("x"), y: X.attr("y") }); f.each(Y, function(Z, ab) { var aa = ab.split("-"), ac = v.Cells[parseInt(aa[0])][parseInt(aa[1])]; if (ac != null) { ac.data("ImLink", true); ac.data("WordId").push(T); ac.data("LIS").push(S) } }) }) }) } function I() { var ab = [], Y = Q.find("actions"), T = Y.attr("buttons-layout"), ah = (T == "below"), ae = Y.attr("graphical-buttons") == "true", af = Y.attr("wide-buttons") == "true", Z = (af && ae) ? 100 : (ae || af) ? 80 : 60, aa, W = 0; s = f("
    ").css({ border: "solid 0px", "font-size": G["title-height"], "font-weight": "normal", "font-family": "sans-serif", width: Z + "px" }); f.each(t.ButtonActions, function(an, ar) { var al = Y.find(an), aq = Z, am = 35, aj, ak, ap = (an == "pencil"), ao; if (al.length == 1) { if (!ae && ah) { am = 30 } aj = f("
    ").data("id", an).css({ height: am + "px", cursor: "pointer", "text-align": "left" }); ak = t.ButtonActions[an]; if (ae) { aj.append(f("
    ").addClass(an).addClass("ButtonImage")).addClass("ActionButton").addClass("Graphical"); aj.click(ak); f("").appendTo(u); aq -= 25 + 2 } else { if (ap) { f("").appendTo(aj).css({ "margin-right": "4px", "vertical-align": "middle" }).click(ak); aq -= 20 } else { aj.click(ak).addClass("ActionButton") } } ao = f("").addClass("ButtonText").css({ "line-height": am + "px", "white-space": "nowrap", marginLeft: (ae ? "2px" : "0px") }).html(al.attr("label")); ab.push(ao); aj.append(f("
    ").height(am).width(aq).append(ao)); if (!ae) { aj.css({ backgroundColor: ap ? "" : "#E0E0E0", textAlign: ap ? "left" : "center", marginBottom: ah ? "2px" : "5px", border: (an != "pencil") ? "solid gray 1px" : "solid 0px" }) } aj.appendTo(s); aj.find("*").css({ display: "inline-block" }) } }); if (!ah) { s.css({ "float": T }) } s.addClass("CCPuzButtons"); u.append(s); if (ah) { u.fillRect(0, G.height - 35, G.width, 35, { color: G["background-color"] }); for (aa = 0; aa < ab.length; aa++) { var X = ae ? 35 : 4, ac = ab[aa], U = ac.parent(), S = U.parent(); ag = ac.width() + 4; if (!ae) { if (S.find(">input").length > 0) { X = 25 } else { if (ag < 70) { ag = 70 } } } U.width(ag); ag += X; S.css({ display: "inline-block", width: ag + "px", marginRight: "2px", marginLeft: "2px" }); W += ag + 4 } s.css({ width: W + 20, margin: "auto" }); s.appendTo(u.find("div:last")) } else { for (aa = 0; aa < ab.length; aa++) { var ad = ab[aa], ai = ad.width(), ag = ad.parent().width(), V = (parseFloat(ad.css("font-size")) * ag / ai * 0.95); if (ai > ag) { ad.css({ "font-size": V + "px" }) } } if (T == "left" && s.find("div").length > 0) { D += s.width() + 5; v.TimerObject.Actions = true } } } v = { MaxCheat: -1, Images: { "reveal-word": "revealword.png", "reveal-letter": "revealletter.png", revert: "revert.png", solution: "solution.png", check: "check.png", pencil: "pencil.png", submit: "submit.png", save: "save.png" }, TimerObject: { Enabled: false, OnLoad: false, Start: 0, Pause: true, Stop: true, Actions: false }, TimerDiv: "", DivTitle: "", Cells: {}, Words: {}, Alphabet: [], LetterAlphabet: [], XMLGame: {}, Timer: { "initial-value": 0, "start-on-load": "false", "allow-pause": "true" }, XML: {}, Width: 0, Height: 0, X: 0, Y: 0, Params: {}, Attributes: { "background-color": "white", "wrong-letter-color": "", "selected-cells-color": "gray", "cursor-color": "yellow", width: 0, height: 0, "scroll-width": 0, "scroll-height": 0, "hide-numbers": false, "show-alphabet": false, "enforce-alphabet": false, "validate-sudoku": true, "title-left": false, "title-height": 11, "type-skip-existing": false, "clue-float-background": "#CCFFFF" }, RunTimer: function() { var S = v.TimerObject; if (typeof v.TimerDiv == "object" && S.Stop && S.Enabled) { S.Stop = false; v.TimerDiv.fadeTo("fast", 1).everyTime(1000, function() { v.TimerObject.Start++; var T = Math.floor((S.Start) / 60), U = (S.Start) % 60; T = (T < 10) ? "0" + T : T; U = (U < 10) ? "0" + U : U; f(this).html(T + ":" + U) }) } }, RepaintHeightClues: function() { var U = q.Attributes, T = q.Div, X = (U.layout == "below"), W = X ? parseFloat(G.height) - (t.InicioY + (t.ViewHeight)) : (t.ViewHeight) / T.find(">div").length; if (T.find(">div").length == 1 && X) { W -= 5 } if (t.Settings["numbered-sides"]["top"] != "") { W += t.Size / 2 } if (X) { var V = t.InicioY + 2 + t.ViewHeight, S = G.height - V - 15; T.css({ position: "absolute", top: V + "px", height: S + "px" }).find(">div").css({ height: S + "px" }); T.css({ width: t.ViewWidth + "px", marginLeft: t.InicioX + "px" }); f.each(T.find(">div"), function(Y, Z) { f(Z).css({ marginLeft: "0px", width: "50%", display: "inline-block", marginTop: "0px", height: S + "px" }) }) } else { if (T != null) { T.css({ "float": U.layout, marginLeft: "5px" }); f.each(T.find(">div"), function(Y, Z) { f(Z).css({ height: W + "px" }) }) } } f.each(T.find("li"), function(ae, ag) { if (f(this).find(">span").eq(0).length == 1) { var ad = f(this), af = ad.width(), Z = ad.find(">span").eq(0).width(), aa = af - Z, Y = ad.find(">p").eq(0), ac = Y.find("span"), ah = (ac.eq(0).length == 1) ? ac.eq(0).width() : 0, ab = ac.eq(1); ad.find(">span").eq(0).css({ marginLeft: aa }); Y.css({ width: (aa - 2) + "px" }); ab.css({ width: aa - ah + "px" }); if (ab.width() != aa - ah) { ab.html(ab.html() + "   "); ab.css({ width: aa - ah - 2 + "px" }) } } }); if (U["right-align-numbers"] == "true") { f.each(T.find("li"), function(Z, ae) { var ad = f(this).find("p"), aa = (ad.find(">span").eq(0).length == 1) ? ad.find(">span").eq(0) : null, Y = (ad.find(">span").eq(1).length == 1) ? ad.find(">span").eq(1) : null, ab, ac; if (aa != null && Y != null) { ab = parseInt(aa.parent().width() / 10); if (aa.height() != Y.height()) { Y.css({ position: "absolute" }); if (j >= 8 && j < 9) { Y.css({ marginRight: 16 + "px" }) } if (aa.width() - 10 > ab) { ac = parseInt((aa.width() - ab)), p = f(""), span = f("").html(Y.html()); Y.html(" ").append(p).append(span); Y.css({ left: ab - 1 + "px" }); while (p.width() < ac) { p.html(p.html() + " ") } } Y.parent().css({ height: Y.height() }) } } }) } q.Div.find(">div").each(function(Y, aa) { var Z = f(this); Z.find("p").eq(0).remove(); if (Z.find("div:eq(0)").height() + Z.find("*:eq(0)").height() > Z.height()) { Z.find("div:eq(0)").height(Z.height() - Z.find("*:eq(0)").height()) } if (navigator.userAgent.indexOf("Mozilla") >= 0) { Z.find("li:last").css({ marginBottom: "1px" }) } }); return false } }; v.Iframe = u; t = h(v, u); q = a(v, t, u); z = n(v, t, u, q); v.Grid = t; v.Clues = q; v.PuzzleState = z; v.Params = L; if (x != null) { v.images = f.extend(v.Images, x) } v.X = 0; v.Y = 0; v.XmlDoc = r; v.XML = f(r); P = f(r).find("rectangular-puzzle"); v.XMLRect = P; o(); K(); u.css({ "background-color": G["background-color"] + "", width: G.width + "", height: G.height + "", position: "relative", "-webkit-user-select": "none", "-moz-user-select": "none", "-webkit-touch-callout": "none", "-webkit-tap-highlight-color": "transparent" }); C(); F(); I(); q.Start(f(r)); if (q.Attributes.layout == "left") { D += parseInt(q.Attributes.width) } t.Start(f(r), G, D, B); w(); q.KeyWord(); v.Words = q.Words; v.Cells = t.Cells; J(); N(); q.SetEventClick(); z.SetUrl(); t.LoadProgress(); if (!v.isWordSearch) { t.FirstTime() } v.RunTimer(); var y = v.TimerObject; if (y.Enabled) { (y.Actions) ? v.TimerDiv.appendTo(s): v.TimerDiv.css({ "float": "right", marginRight: "10px" }).appendTo(q.Div); if (s.height() > u.height()) { u.height(s.height()) } if (y.OnLoad == false) { v.TimerDiv.stopTime(); y.Stop = true } } R(); t.ProcessHintLetter(); u.get(0).CrossWord = v } })(jQuery);
  • Vissza a tartalomhoz