if (kendo.support.browser.webkit || kendo.support.browser.mozilla || (kendo.support.browser.msie && kendo.support.browser.version >= 10)) { (function($, undefined) { var original = $("#simulator")[0].src, mobiles = { ipad: { ua: "Mozilla/5.0(iPad; U; CPU OS 7_0_2 like Mac OS X; en-us) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0.2 Mobile/11a501 Safari/8536.25", size: "11px" }, iphone: { ua: "Mozilla/5.0 (iPhone; U; CPU iPhone OS 7_0_2 like Mac OS X; xx-xx) AppleWebKit/537.51.1 (KHTML, like Gecko) Mobile/11a501", size: "12px" }, nexus5: { ua: "Mozilla/5.0 (Linux; U; Android 2.3.3; en-gb; Nexus S Build/GRI20) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1", size: "12px" }, a100: { ua: "Mozilla/5.0 (Linux; U; Android 4.0; en-us; A100 Build/HTJ85B) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13", size: "11px" }, z10: { ua: "Mozilla/5.0 (BB10; Touch) AppleWebKit/537.10+ (KHTML, like Gecko) Version/10.0.9.2372 Mobile Safari/537.10+", size: "12px" }, playbook: { ua: "Mozilla/5.0 (PlayBook; U; RIM Tablet OS 2.0.0; en-US) AppleWebKit/535.1+ (KHTML, like Gecko) Version/7.2.0.0 Safari/535.1+", size: "11px" }, wp8: { ua: "Mozilla/5.0 (compatible; MSIE 10.0; Windows Phone 8.0; Trident/6.0; IEMobile/10.0; ARM; Touch; NOKIA; Lumia 920)", size: "14px" }, n9: { ua: "Mozilla/5.0 (MeeGo; NokiaN950-00/00) AppleWebKit/534.13 (KHTML, like Gecko) NokiaBrowser/8.5.0 Mobile Safari/534.13", size: "11px" } }, currentDevice = kendo.support.detectOS(mobiles["ipad"].ua); function setOrientation(orientation) { var orientationClass = "km-" + orientation; $(".device-container") .removeClass("horizontal vertical") .addClass(orientation); if (currentDevice.blackberry) { orientationClass = orientationClass == "km-horizontal" ? "km-vertical" : "km-horizontal"; } frame.contentWindow.orientation = orientationClass == "km-horizontal" ? 90 : 0; $(foreignDocument.documentElement) .removeClass("km-horizontal km-vertical") .addClass(orientationClass); } function changeDevice() { var devicename = deviceSelector.value(), head = $(document.getElementsByTagName("head")[0]), deviceLink = head.find("link[href*='devices/']"), location = (/^.*?(?=\?|#)/.exec(window.location.href) || [ window.location.href ])[0], url, newLink, matches; location += location[location.length-1] != "/" ? "/" : ""; url = location + "../../content/integration/simulator/devices/" + devicename + "/styles.css"; if (kendo.support.browser.msie && kendo.support.browser.version < 11) { newLink = document.createStyleSheet(url); } else { newLink = deviceLink .eq(0) .clone() .attr("href", url); } head.append(newLink); matches = deviceSelector.text().match(/(^\w+)\s(.*)/m); $(".description .device") .html(matches[1] + "" + matches[2] + "") .css("background-image", "url('" + location + "../../content/integration/simulator/images/" + devicename + ".png')"); setTimeout(function () { deviceLink.remove(); setTimeout( function () { $(".content").kendoStop(true, true).kendoAnimate("tile:up", function () { resizeContent(); }); }, 500); }, 0); } function resizeContent() { var container = $(".device-container"), iframe = $(".device-container iframe"); container[0].style.cssText = ""; iframe[0].style.cssText = ""; var offset = parseInt($(".device-skin").css("padding-top"), 10), heightOffset = parseInt(container.css("padding-top"), 10) - offset; if (offset) { iframe.animate({ height: iframe.height() + heightOffset }); container.animate({ paddingTop: "+" + offset }); } } function fixAdjust() { var doc = $(foreignDocument.documentElement); if (kendo.support.transitions.prefix == "webkit") { doc.add(foreignDocument.body).css("-webkit-text-size-adjust", "auto"); } changeFontSize(); } function loadUrl(url) { var currentMobile = mobiles[deviceSelector.value()]; $.get(url, function (file) { var fileContent = file.replace(/(
)/igm, "$1\n