var ifrDoc; $(function () { if (!$('#neoCMSDashScrollWrap').length) tempCache(); $('#neoCMSConfigRetry').bind('click', function () { window.location.reload(true) }); $('#neoCMSLoginWrap').css({display: "block", opacity: "0"}).fadeTo(600, 1.0, function () { if ($.browser.msie) $(this, ifrDoc)[0].style.removeAttribute('filter'); overlay() }); $(window).bind('resize', windowResize); $('#neoCMSLoginForm').bind('submit', loginSubmit); $('#neoCMSUsername input').focus(); $('#neoCMSHome').bind('click', function () { checkURL(fpath()) }); fBrowseBind() }); tempCache = function () { $.ajax({url: "templates/editor.html", cache: true, dataType: "html"}); $.ajax({url: "templates/image-editor.html", cache: true, dataType: "html"}); $.ajax({url: "templates/video-editor.html", cache: true, dataType: "html"}); $.ajax({url: "templates/html-editor.html", cache: true, dataType: "html"}); $.ajax({url: "templates/link-editor.html", cache: true, dataType: "html"}); $.ajax({url: "templates/table-editor.html", cache: true, dataType: "html"}); $.ajax({url: "templates/prompt.html", cache: true, dataType: "html"}); $.ajax({url: "templates/upload.html", cache: true, dataType: "html"}) }; fBrowseBind = function () { $('.neoCMSFBrowse').unbind('click').bind('click', function () { linkFiles($(this).attr('rel')) }) }; getIfrDoc = function () { ifrDoc = $('#neoCMSPageSrc')[0]; ifrDoc = (ifrDoc.contentDocument) ? ifrDoc.contentDocument : ifrDoc.contentWindow.document }; loginSubmit = function () { if (loginValid()) { var loginIframe; try { loginIframe = document.createElement('