function guid(){function a(){return(((1+Math.random())*65536)|0).toString(16).substring(1)}return(a()+a()+"-"+a()+"-"+a()+"-"+a()+"-"+a()+a()+a())}function CheckGuidValueMatch(a){var b=new RegExp("^({{0,1}([0-9a-fA-F]){8}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){12}}{0,1})$");return a.match(b)}function log(c,b){function a(){var f=new Date();var d=f.getHours();var i=f.getMinutes();var e=f.getSeconds();var g="AM";if(d>11){g="PM"}if(d>12){d=d-12}if(d===0){d=12}if(d<10){d="0"+d}if(i<10){i="0"+i}if(e<10){e="0"+e}var h=d+":"+i+":"+e+" "+g;return h}c=a()+" - "+c;if((jQuery.browser.mozilla||isBrowserWebKit())&&window.console!==undefined){switch(b){case"debug":console.debug(c);break;case"info":console.info(c);break;case"error":console.error(c);break;case"log":console.log(c);break;case undefined:console.log(c)}}}function emailCheck(b){var r=1;var u=/^(com|net|org|edu|int|mil|gov|arpa|biz|aero|name|coop|info|pro|museum)$/;var q=/^(.+)@(.+)$/;var o='\\(\\)><@,;:\\\\\\"\\.\\[\\]';var j="[^\\s"+o+"]";var d='("[^"]*")';var p=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/;var a=j+"+";var n="("+a+"|"+d+")";var k=new RegExp("^"+n+"(\\."+n+")*$");var f=new RegExp("^"+a+"(\\."+a+")*$");var c=b.match(q);if(c==null){return false}var s=c[1];var t=c[2];for(l=0;l<s.length;l++){if(s.charCodeAt(l)>127){return false}}for(l=0;l<t.length;l++){if(t.charCodeAt(l)>127){return false}}if(s.match(k)==null){return false}var h=t.match(p);if(h!=null){for(var l=1;l<=4;l++){if(h[l]>255){return false}}return true}var g=new RegExp("^"+a+"$");var e=t.split(".");var m=e.length;for(l=0;l<m;l++){if(e[l].search(g)==-1){return false}}if(r&&e[e.length-1].length!=2&&e[e.length-1].search(u)==-1){return false}if(m<2){return false}return true}function generateRandSeq(d,a,g){var f,c,e="",b="";for(c=1;c<=d;c++){for(f=1;f<=a;f++){b+=g.charAt(randomInt(0,g.length-1))}}e+=b;return e}function randomInt(a,b){return Math.floor(Math.random()*(b-a+1))+a}function getRandomURL(){var b="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHILMNOPQRSTUVWXYZ";var a=generateRandSeq(5,1,b);return a}function isBrowserSafari(){var a=navigator.userAgent.toLowerCase().indexOf("safari")>-1;return a}function isBrowserWebKit(){var a=navigator.userAgent.toLowerCase().indexOf("safari")>-1;var b=navigator.userAgent.toLowerCase().indexOf("chrome")>-1;return a||b}function isFirefoxBETA(){var b=navigator.userAgent;var c=b.indexOf("Firefox/3.");if(c>-1){var a=b.charAt(c+10);if(a=="0"){return false}else{return true}}else{return false}}function getFullPublicURL(a){return"http://ibri.it/"+a}(function(h){var j="iframeEditor";h.fn.ibriiEditor=function(z){if(!(document.designMode||document.contentEditable)){return"Error - This browser does not support desing mode"}if(z=="disable"){g(h("iframe."+j,this));return}var A={editorBar:".formattingBar",editorTextArea:".textareaZone",cssUrl:"/styles/ibriiEditorO4.css",editorOffset:{height:0,width:0,left:0,top:0},minHeight:0,boldButton:".bold",underlineButton:".underline",unorderedListButton:".unorderedList",increaseFontSizeButton:".increaseSize",decreaseFontSizeButton:".decreaseSize",highLightButton:".highlight",hiliteColorSelector:"#hiliteColorsContainer",hiliteColor:".hiliteColor",moreFormat:".moreFormatButton",extraFormatCommandsContainer:"#extraFormatCommandsContainer",extraFormatCommand:"#extraFormatCommandsContainer .noteFormat",textAlignLeftButton:".textAlignLeftButton",textAlignJustifyButton:".textAlignJustifyButton",textAlignRightButton:".textAlignRightButton",textAlignCenterButton:".textAlignCenterButton",orderedListButton:".orderedListButton",clearFormattingButton:".clearFormattingButton",undoButton:".undoButton",redoButton:".redoButton",formatMenu:".formatMenu",orderedListButton:".orderedListButton",eraseEditor:".eraseEditor ",addImageButton:".addImageButton",linkButton:".linkButton",eraseConfirmMessage:"",editorLoaded:function(){},contentChanged:function(C,B){},editorContent:null};var z=h.fn.ibriiEditor.options=jQuery.extend(A,z);h.fn.ibriiEditor.reEnableDropEvents=k;return this.each(function(){var E=h(this);var D=h(z.EditorClass,E);var G=h(z.extraFormatCommandsContainer);var F=h(z.editorBar);var B={EditorTextArea:h(z.editorTextArea,this),CssUrl:z.cssUrl,EditorOffset:z.editorOffset,MinHeight:z.minHeight,BoldButton:h(z.boldButton,F),UnderlineButton:h(z.underlineButton,F),UnorderedListButton:h(z.unorderedListButton,F),IncreaseFontSizeButton:h(z.increaseFontSizeButton,F),DecreaseFontSizeButton:h(z.decreaseFontSizeButton,F),HighLightButton:h(z.highLightButton,F),MoreFormat:h(z.moreFormat,F),HiliteColorSelector:h(z.hiliteColorSelector),HiliteColor:h(z.hiliteColor),ExtraFormatCommandsContainer:G,ExtraFormatCommand:h(z.extraFormatCommand),TextAlignLeftButton:h(z.textAlignLeftButton,G),TextAlignJustifyButton:h(z.textAlignJustifyButton,G),TextAlignRightButton:h(z.textAlignRightButton,G),TextAlignCenterButton:h(z.textAlignCenterButton,G),OrderedListButton:h(z.orderedListButton,G),ClearFormattingButton:h(z.clearFormattingButton,G),UndoButton:h(z.undoButton,G),RedoButton:h(z.redoButton,G),OrderedListButton:h(z.orderedListButton,G),EraseEditor:h(z.eraseEditor,G),AddImageButton:h(z.addImageButton,G),LinkButton:h(z.linkButton,G),EraseConfirmMessage:z.eraseConfirmMessage,FormatMenu:h(z.formatMenu),EditorLoaded:z.editorLoaded,ContentChanged:z.contentChanged,EditorContent:z.editorContent};if(D.length>0){var C=B.EditorTextArea.html();h(D.contentWindow.document.body).html(C);n(D,B)}else{f(this,B)}h.fn.ibriiEditor.editorEnabled=true})};function f(F,z){var B=document.createElement("iframe");B.frameBorder=0;B.frameMargin=0;B.framePadding=0;var D=h(B);D.addClass(j);z.EditorTextArea.parent().append(B);D.bind("contentChanged",z.ContentChanged);D.hide();var A="";if(z.CssUrl){var A="<style type='text/css' id='ibriiEditorCss'>"+x(z.CssUrl)+"</style>"}var C=z.EditorTextArea.html();if((h.trim(C)=="")&&(h.browser.mozilla)){C="<br>"}var E="<html><head><link rel='stylesheet' type='text/css' href='http://yui.yahooapis.com/2.7.0/build/reset/reset-min.css'>"+A+"</head><body id='iFrameNoteBody' class='frameBody'>"+C+"</body></html>";i(B,E,function(){n(B,z)});b(B)}function i(A,B,C){if(!A){return false}try{A.contentWindow.document.designMode="on";A.contentWindow.document.open();A.contentWindow.document.write(B);A.contentWindow.document.close();C(A);return true}catch(z){}setTimeout(function(){i(A,B,C)},500);return false}function n(B,z){try{if(h.browser.webkit){var A=h(B);A.css("overflow","hidden");h(B.contentWindow.document.body).css({"min-height":"70px",overflow:"hidden"})}w(B,z);v(B);B.setAttribute("allowTransparency","true");d(B,z);if((jQuery.browser.msie)){B.focus();B.contentWindow.focus();B.contentWindow.document.body.focus();var C=B.contentWindow.document.selection.createRange();C.collapse();C.select()}z.EditorLoaded(B)}catch(D){log("error after enabling the design mode"+D.message,"debug")}}function d(B,A){var z=A.EditorTextArea;c(B,z,A)}function a(D,z){var B=D.contentWindow.document;var A=D.contentWindow;var C=B.body;z.EditorTextArea.mousedown(function(E){h(document.body).data("selectionStartDiv",this)});h("html").mouseup(function(L){var J=h(document.body);var S=J.data("selectionStartDiv");h(document.body).data("selectionStartDiv",null);if(S==null){return}var N=h(S);if(!(jQuery.browser.msie)){var F=window.getSelection().getRangeAt(0);var Q=F.startOffset;var E=F.startContainer;var M=F.endOffset;var K=F.endContainer}else{var H=t(N[0]);var Q=H.start;var M=H.end}c(D,N);var R=h(C);var P=h(document.body).data("lastEditableDiv");if((P)&&P!=N[0]){P.empty();h(C).contents().each(function(){if(!(jQuery.browser.msie)){var U=document.importNode(this,true)}else{var U=this}h(U).appendTo(P)})}N.contents().each(function(){var V=(this==E);var W=(this==K);if(!(jQuery.browser.msie)){var U=B.importNode(this,true)}else{var U=this}R.empty();h(U).appendTo(R);if(V){E=U}if(W){K=U}});h(document.body).data("lastEditableDiv",N);if(!(jQuery.browser.msie)){D.focus();A.focus();C.focus();var T=A.getSelection();var O=B.createRange();O.setStart(E,Q);O.setEnd(K,M);T.removeAllRanges();T.addRange(O.cloneRange());T.collapseToEnd();T.addRange(O)}else{var I=C.createTextRange();var G=M-Q;if(G==0){}I.collapse(true);I.moveStart("character",Q);I.moveEnd("character",M-Q);I.select()}})}function g(B){var C=h(B[0].contentWindow.document.body);var A=B.data("currentDiv");var z=C.html();A.html(z);C.empty();B.remove()}function t(B){var z=document.selection.createRange();var A=z.duplicate();A.moveToElementText(B);A.setEndPoint("EndToEnd",z);var C={start:0,end:0};C.start=A.text.length-z.text.length;C.end=C.start+z.text.length;return C}function c(C,D,z){var A=h(C);y(D,A,z);A.data("currentDiv",D);A.show();C.focus();C.contentWindow.focus();C.contentWindow.document.body.focus();var B=h(C.contentWindow.document.body);B.effect("highlight","slow");h(C).bind("contentChanged keydown",function(G){D=A.data("currentDiv");if(h.browser.msie){var E=B[0].scrollHeight}else{if(h.browser.mozilla){var F=20;var E=B.outerHeight()+F}else{if(h.browser.webkit){var E=B.height()}}}if(E>z.MinHeight){D.height(E);A.height(E)}});h(C.contentWindow.document).keydown()}function q(z){h(z).hide()}function y(A,D,B){var C=A.position();var z={top:A.scrollTop(),left:A.scrollLeft()};D.css({position:"absolute",left:(C.left+z.left+B.EditorOffset.left)+"px",top:(C.top+z.top+B.EditorOffset.top)+"px",width:(A.width())+B.EditorOffset.width+"px",height:(A.parent().height())+B.EditorOffset.height+"px"})}function w(B,z){var A=function(){if(B.contentWindow==null){B=h("#divvone .textareaZone")[0]}return B};z.BoldButton.unbind("mousedown").mousedown(function(){e(A(),"bold");return false});z.UnderlineButton.unbind("mousedown").mousedown(function(){e(A(),"underline");return false});z.UnorderedListButton.unbind("mousedown").mousedown(function(){e(A(),"insertunorderedlist");return false});z.IncreaseFontSizeButton.unbind("mousedown").mousedown(function(){e(A(),"increasefontsize");return false});z.DecreaseFontSizeButton.unbind("mousedown").mousedown(function(){e(A(),"decreasefontsize");return false});z.HighLightButton.mousedown(function(){var C=h(this);z.HiliteColorSelector.show();var D=C.offset();m(z,B);if(!(z.HiliteColorSelector.hasClass("noMove"))){z.HiliteColorSelector.css("left",D.left+"px");z.HiliteColorSelector.css("top",D.top+"px")}z.HiliteColor.click(function(){z.HiliteColorSelector.hide();l(z,B)})});z.HiliteColorSelector.hover(function(){z.HiliteColorSelector.show()},function(){h(this).hide()}).click(function(C){z.HiliteColorSelector.hide();l(z,B)});z.MoreFormat.mousedown(function(){var F=h(this);z.ExtraFormatCommandsContainer.show();var G=F.offset();var E=z.ExtraFormatCommandsContainer.width();var D=F.width();var C=G.left-(E-D)+10;var H=G.top;p(z,B);if(!(z.ExtraFormatCommandsContainer.hasClass("noMove"))){z.ExtraFormatCommandsContainer.css("left",C+"px");z.ExtraFormatCommandsContainer.css("top",H+"px")}});z.ExtraFormatCommandsContainer.hover(function(){h(this).show()},function(){z.ExtraFormatCommandsContainer.hide();r(z,B)}).click(function(C){z.ExtraFormatCommandsContainer.hide();r(z,B)})}function p(z,B){var A=function(){return B};z.TextAlignLeftButton.unbind("mousedown").bind("mousedown",function(){e(A(),"justifyleft");return false});z.TextAlignCenterButton.unbind("mousedown").bind("mousedown",function(){e(A(),"justifycenter");return false});z.TextAlignRightButton.unbind("mousedown").bind("mousedown",function(){e(A(),"justifyright");return false});z.TextAlignJustifyButton.unbind("mousedown").bind("mousedown",function(){e(A(),"justifyfull");return false});z.ClearFormattingButton.unbind("mousedown").bind("mousedown",function(){e(A(),"removeformat");return false});z.UndoButton.unbind("mousedown").bind("mousedown",function(){e(A(),"undo");return false});z.RedoButton.unbind("mousedown").bind("mousedown",function(){e(A(),"redo");return false});z.OrderedListButton.unbind("mousedown").bind("mousedown",function(){e(A(),"insertorderedlist");return false});z.EraseEditor.unbind("mousedown").bind("mousedown",function(){var C=confirm(z.EraseConfirmMessage);if(C){if(h.browser.mozilla){h(A()).inside("body").html("<br>")}else{h(A()).inside("body").empty()}}return false});z.AddImageButton.unbind("mousedown").bind("mousedown",function(){var D=h("#menus .addImageEditorPanel").clone();var C=h(B);C.before(D);D.show("slide",{direction:"up"},1000);function E(){D.hide("slide",{direction:"up"},1000,function(){D.remove()})}h(".cancelButton",D).click(function(){E()});h(".okButton",D).click(function(){var F=h(".imageUrl",D).val();e(A(),"InsertImage",F);E()})});z.LinkButton.unbind("mousedown").bind("mousedown",function(){var C=h("#menus .createLinkEditorPanel").clone();var E=h(B);if(h.browser.msie){var D=B.contentWindow.document.selection.createRange()}else{var D=B.contentWindow.document.getSelection()}E.before(C);C.show("slide",{direction:"up"},1000);function F(){C.hide("slide",{direction:"up"},1000,function(){C.remove()})}h(".cancelButton",C).click(function(){F()});h(".okButton",C).click(function(){var G=h(".linkUrl",C).val();var H=G.substring(0,5)=="http:";if(!H){G="http://"+G}e(A(),"CreateLink",G,D);b(B);F()})})}function b(z){h(z).contents().find("a").dblclick(function(){var A=h(this).attr("href");if(A.substring(0,5)!="http:"){A="http://"+A}window.open(h.trim(A))})}function r(z,B){var A=function(){return B};z.TextAlignLeftButton.unbind("mousedown");z.TextAlignCenterButton.unbind("mousedown");z.TextAlignRightButton.unbind("mousedown");z.TextAlignJustifyButton.unbind("mousedown");z.ClearFormattingButton.unbind("mousedown");z.UndoButton.unbind("mousedown");z.RedoButton.unbind("mousedown");z.OrderedListButton.unbind("mousedown")}function m(z,B){var A=function(){if(B.contentWindow==null){B=h("#divvone .textareaZone")[0]}return B};z.HiliteColor.one("click",function(){e(A(),"hilitecolor",h(this).css("background-color"));z.HiliteColorSelector.hide();return false})}function l(z,A){z.HiliteColor.unbind("click")}function e(A,E,z,C){A.contentWindow.focus();if((C)&&h.browser.msie){var B=C}else{var B=A.contentWindow.document}try{if(E=="hilitecolor"&&h.browser.msie){B.execCommand("BackColor",false,z)}else{if((E=="increasefontsize")||(E=="decreasefontsize")){s(B,E)}else{B.execCommand(E,false,z)}}}catch(D){}A.contentWindow.focus();h(A).trigger("contentChanged",A.contentWindow.document.body);h(A).trigger("textFormatted",A)}function x(A){if(A==undefined){return""}var z=jQuery("body").data("editorCss");if(!(z)){jQuery.ajax({url:A,success:function(B){z=B},async:false});jQuery("body").data("editorCss",z)}return z}function s(C,B){var D=0;if(B=="increasefontsize"){D=1}else{D=-1}if(h.browser.mozilla){if(D>0){C.execCommand("increasefontsize",false,[])}else{C.execCommand("decreasefontsize",false,[])}}else{var A={10:1,13:2,16:3,18:4,24:5,32:6,48:7};var z=C.queryCommandValue("FontSize");z=z==null?2:parseInt(z);if(isBrowserWebKit()){z=o(z)}if(z>7){z=A[z]}if(D>0){if(z&&z<7){C.execCommand("FontSize",false,z+D)}}else{if(z&&z>1){C.execCommand("FontSize",false,z+D)}}}}function o(z){if(z<=10){return 1}else{if(z<=13){return 2}else{if(z<=16){return 3}else{if(z<=18){return 4}else{if(z<=24){return 5}else{if(z<=32){return 6}else{return 7}}}}}}}function u(C){if(isBrowserWebKit()){B(C)}else{if(h.browser.mozilla){if(isFirefoxBETA()){A(C)}else{D(C)}}else{if(h.browser.msie){z(C)}}}function B(I){var F=0;var H=I.contentWindow.document;var E=0;var G=0;H.ondragover=function(J){var K=new Date();F=K.getTime();isDragging=1;return true};I.contentWindow.document.addEventListener("DOMNodeInserted",function(K){var L=new Date();if((L.getTime()-F)<=1000){var J=unescape(K.target.href);var M=J.indexOf("<object");if(M==-1){M=J.indexOf("<embed")}K.className="ibriiDragger";if(M!=-1){h(I).trigger("droppedItem",escape(J.substring(M)));E=1;h(I).trigger("contentChanged",I.contentWindow.document.body)}if(G==0){G=1;setTimeout(function(){h(I).trigger("droppedItemSetSource");h(I).trigger("contentChanged",I.contentWindow.document.body);G=0},1000)}else{G=0}if(E==1){G=0;E=0}}},false)}function D(E){var F=h(E.contentWindow.document);F.bind("dragexit drop",this,function(G){h(E).trigger("droppedItem");h(E).trigger("contentChanged",E.contentWindow.document.body)});F.bind("dragdrop",this,function(G){h(E).trigger("droppedItemSetSource")})}function A(F){var H=h(F.contentWindow.document);function G(I){h(F).trigger("droppedItem");h(F).trigger("contentChanged",F.contentWindow.document.body);if(I.isValidDrop!="false"){setTimeout(function(){h(F).trigger("droppedItemSetSource")},200)}H.unbind("drop",G);H.bind("drop",this,G)}H.bind("drop",this,G);function E(I){H.unbind("drop",G);H.bind("drop",this,G);h(window).one("resize",E)}h(window).one("resize",E)}function z(E){var F=E.contentWindow.document;F.body.attachEvent("ondrop",function(G){h(E).trigger("droppedItem",G);h(E).trigger("contentChanged",E.contentWindow.document.body)})}}function v(z){h(z.contentWindow.document).bind("keydown dragdrop ondrop paste",function(A){h(z).trigger("contentChanged",z.contentWindow.document.body)})}function k(z){u(z);v(z)}})(jQuery);(function(e){var c;var w;var g=null;e.fn.ibriiBricks=function(x){var y={enableDrop:true,contentItemTemplate:"#contentItemTemplate",contentItem:"li.contentItem",contentItemBody:".contentBody",iFillerDiv:".iFillerDiv",iDropAddBefore:".iDropAddBefore",iDropAddAfter:".iDropAddAfter",iDropContainerEmpty:"iDropContainerEmpty",cancelBrickButton:".deleteBrick",editBrickButton:".editBrick",editBrickDoneButton:".editBrickdone",lastElementClass:"last",positionChange:function(A,z){},brickEdited:function(z,A){},brickDeleted:null,brickCreated:function(z){},brickContentChanged:function(z,A){}};x=e.fn.ibriiBricks.options=jQuery.extend(y,x);m(x);return this.each(function(){var z=e(this);if(x.enableDrop){e(x.iDropAddBefore+","+x.iDropAddAfter,this).contentDroppable({iframeParent:z,trasformContent:d})}j(x,this);t(this,x);s(this,x);var A=jQuery(e.fn.ibriiBricks.options.iFillerDiv,z);if(e.browser.msie&&e.browser.version=="7.0"){setTimeout(function(){h(A,z)},2000)}else{h(A,z)}})};function m(y,z){var x=e(e(y.contentItemTemplate).html());w=x.clone();w.removeClass(y.contentItemTemplate);x.remove()}function d(A,y){p();var C=b(A);var x=y.parent();var B=jQuery(e.fn.ibriiBricks.options.iFillerDiv,x);for(var z=0;z<C.length;z++){e(C[z]).contentDroppable({iframeParent:x,trasformContent:d});if(y.hasClass("iFillerDiv")){e(C[z]).insertBefore(y)}else{e(C[z]).insertAfter(y)}if(x.hasClass("iDropContainerEmpty")){x.removeClass("iDropContainerEmpty")}}h(B,x);e.fn.ibriiBricks.options.brickCreated(C)}function p(){if((g)&&(g.hasClass("editingMode"))){var x=e(document.getElementById("iframeEditor"));x.ibriiEditor("disable");g.removeClass("editingMode");q()}}function b(D){var y=[];var F=null;if(e.browser.msie){if(e.browser.version=="7.0"){if(D.length<=3){D.each(function(){var J=e(this);if(J.hasClass("ibriiDragger")){F=unescape(J.attr("embed"))}})}}else{var A=e("a.ibriiDragger",D);if(A.length>0){F=unescape(A.attr("embed"))}}}else{if(e.browser.webkit){D=D.filter(":not(meta)");if(D.length==1&&D[0].tagName=="A"){var E=unescape(D.attr("href"));var z=E.indexOf("<object");if(z==-1){z=E.indexOf("<embed")}if(z!=-1){F=E.substring(z)}}}else{if(D.hasClass("ibriiDragger")){F=unescape(D.attr("embed"))}}}if((F)&&F.length>0){var C=F;var B=w.clone();var G=e(".contentBody",B);G.html(C);B.addClass("embedBrick");y.push(B);i(B);return y}var x=n(D);if(x.html!=null){var H=w.clone();var G=e(".contentBody",H);var I=f(x.html);G.html(I);H.addClass("htmlBrick");y.push(H)}e(x.images).each(function(){var K=w.clone();var L=e(".contentBody",K);K.addClass("imgBrick");var J=r(this);if(J){L.append(this);y.push(K)}});return y}function r(y){var x=e(y);x.removeAttr("width");x.removeAttr("height");return x[0]}function f(x){return x}function i(y){var x=280;e("embed,object,img",y).each(function(){var B=e(this);var A=this.getAttribute("width");var C=this.getAttribute("height");if(A!=undefined&&C!=undefined){if(A>(x-1)){B.attr("width",x);var z=Math.floor(C-(((A-x)/A)*C));B.attr("height",z);B.data("oldSize",{height:C,width:A})}}})}function n(A){var z={videos:null,images:[],html:null};var C=[];var B="";var x=document.createDocumentFragment();A.each(function(){var E=document.createElement("div");var D="";if(e.browser.msie){if(this.nodeType==3){D=this.nodeValue}else{D=this.outerHTML}E.innerHTML=D}else{E.appendChild(this)}B+=l(E,C)});B=jQuery.trim(B);if(B.length>0){z.html=B}if(C.length>0){var y;e(C).each(function(){var D=e(this);D.removeAttr("style");z.images.push(this)})}return z}function l(A,D){var x="";if(A.nodeType===1){var z=A.childNodes;for(var y=0;y<z.length;y++){var C=z[y];if(C.nodeName!="SCRIPT"&&C.nodeName!="STYLE"){if(C.nodeName=="A"){var B=l(C,D);B=e.trim(B);if(B.length>0){x+='<a href="'+C.href+'" target="_blank">'+B+"</a>"}}else{if(C.nodeName=="LI"||C.nodeName=="UL"||C.nodeName=="OL"||C.nodeName=="STRONG"||C.nodeName=="BR"||C.nodeName=="H1"||C.nodeName=="H2"||C.nodeName=="H3"||C.nodeName=="H4"||C.nodeName=="H5"||C.nodeName=="P"||C.nodeName=="B"||C.nodeName=="TR"||C.nodeName=="TD"||C.nodeName=="TH"||C.nodeName=="TBODY"){x+="<"+C.nodeName+">"+l(C,D)+"</"+C.nodeName+">"}else{if(C.nodeName=="IMG"){D.push(C)}else{if(C.nodeName=="TABLE"){x+="<"+C.nodeName+" border=1>"+l(C,D)+"</"+C.nodeName+">"}else{x+=l(C,D)}}}}}}}else{if(A.nodeType===3){x+=A.nodeValue}}return x}function u(y,x,z){var C=e(x);var F=e.fn.ibriiBricks.options;var B=C.parents(F.contentItem);var D=B.parent();var A=e(F.iFillerDiv,D);if(g){o(F,g,D,A)}if(!(w)){m(F,this)}var E=w.clone();E.attr("id","ax");if(y=="after"){B.after(E)}else{if(y=="before"){C.before(E)}else{C.after(E)}}E.addClass("htmlBrick editingMode");g=E;E.resizable({handles:"s",minHeight:"45"});a(F,E,D,A);if(!(C.hasClass("iFillerDiv"))){C.css("visibility","hidden");C.one("mouseout",function(){setTimeout(function(){C.css("visibility","visible")},2000)})}if(F.enableDrop){E.contentDroppable({trasformContent:d,iframeParent:z})}h(A,D)}function v(x){x.sortable("disable")}function q(x){x.sortable("enable")}function t(z,x){var y=e(z);y.sortable({axis:"y",items:x.contentItem,tolerance:"pointer",scrollSensitivity:40,placeholder:"true",update:function(C,D){var A=D.item;var F=e(this);var B=e(x.contentItem,F);if(B.length==1){F.addClass(x.iDropContainerEmpty)}else{if(A.hasClass(x.lastElementClass)){B.eq(B.length-2).addClass(x.lastElementClass);A.removeClass(x.lastElementClass)}}var E=jQuery(e.fn.ibriiBricks.options.iFillerDiv,F);h(E,F);x.positionChange(C,D)}})}function s(y,x){e(x.contentItem,y).each(function(){var z=e(this);z.resizable({handles:"s",alsoResize:e(x.contentItemBody,this)})})}function h(C,y){var y=e(".contentsList");var A=e("li.contentItem",y);var D=y.height();var x=0;if(A.length==0){x=D}else{var E=A.eq(A.length-1);var B=E.position().top;var z=E.outerHeight();x=D-(B+z+5);if(x<0){x=0}}C.height(x);if(A.length==0){y.addClass("iDropContainerEmpty")}else{y.removeClass("iDropContainerEmpty");A.removeClass("last");E.addClass("last")}}function k(A){var z=e(this);var y=A.data;var x=z.parents(y.contentItem);if(y.brickDeleted){y.brickDeleted(x,y)}else{e.fn.ibriiBricks.deleteBrick(x,y)}}e.fn.ibriiBricks.deleteBrick=function(x,z){var B=x.parent();var y=e(z.contentItem,B);var A=e(z.iFillerDiv,B);if(y.length==1&&(A.length!=0)){B.addClass(z.iDropContainerEmpty)}else{if(x.hasClass(z.lastElementClass)){y.eq(y.length-2).addClass(z.lastElementClass)}}g=null;x.remove();var A=e(z.iFillerDiv,B);h(A,B)};function a(A,x,z,B){var y=e(".contentBody",x);e(x).ibriiEditor({editorBar:".formattingBar",editorTextArea:y,contentChanged:function(E,D){var C=e("ul.contentsList");h(B,C);A.brickContentChanged(E,{data:D,brick:x})}}).resizable("disable");x.addClass("editingMode");v(z);e(A.editBrickButton,x).addClass("hidden");e(A.editBrickDoneButton,x).removeClass("hidden");g=x}function o(z,x,y,A){e(x).ibriiEditor("disable");x.removeClass("editingMode");x.resizable("enable");q(y);e(z.editBrickButton,x).removeClass("hidden");e(z.editBrickDoneButton,x).addClass("hidden");g=null}function j(x,y){e(x.cancelBrickButton,y).live("click",x,k);e(x.editBrickButton,y).live("click",{itemsContainer:y,options:x},function(E){var B=E.data.options;var C=e(this);var z=C.parents(B.contentItem);var A=e(B.contentItemBody,z);var F=e(E.data.itemsContainer);var D=e(B.iFillerDiv,F);if(g){o(B,g,F,D)}a(B,z,F,D)});e(x.editBrickDoneButton,y).live("click",{itemsContainer:y,options:x},function(F){var C=F.data.options;var D=e(this);var z=D.parents(C.contentItem);var A=e(C.contentItemBody,z);var G=e(F.data.itemsContainer);var E=e(C.iFillerDiv,G);o(C,z,G,E);var B=e("A",A);B.each(function(){var J=e(this);J.attr("target","_blank");var H=J.attr("href");if(H!=undefined){if(H.indexOf("http://")==-1){var K=urlReferrer.split(/\/+/g)[1];if(K.indexOf("/")==K.length-1){K=K.substr(0,K.length-1)}if(H.indexOf("/")==0){H=H.substr(1,H.length)}var I="http://"+K+"/"+H;J.attr("href",I)}}});C.brickEdited(z,A.html())});e("li .newElement",y).live("click",function(){u("after",this,y)});e(".newElementTop",y).live("click",function(){u("outside",this,y)});e(".iEditAddBefore",y).live("click",function(){u("before",this,y)})}})(jQuery);(function(a){ibriiServer=function(){this.test=""};ibriiServer.prototype={createNewPost:function(c,b,g,d){var e={newPost:c,actualClient:b};var f=JSON.stringify(e);a.ajax({type:"POST",url:"/Server/OradeaService.asmx/CreateNewPost",data:f,contentType:"application/json; charset=utf-8",dataType:"json",success:function(h){g(h.d)},error:d})},savePost:function(d,b,g,c){var e={post:d,actualClient:b};var f=JSON.stringify(e);a.ajax({type:"POST",url:"/Server/OradeaService.asmx/SavePost",data:f,contentType:"application/json; charset=utf-8",dataType:"json",success:function(h){g(h.d)},error:c})},getPublishedPostURL:function(d,b,g,c){var e={postID:postID,actualClient:b};var f=JSON.stringify(e);a.ajax({type:"POST",url:"/Server/OradeaService.asmx/GetPublishedPostURL",data:f,contentType:"application/json; charset=utf-8",dataType:"json",success:function(h){g(h.d)},error:c})},savePostTitle:function(d,b,g,c){var e={post:d,actualClient:b};var f=JSON.stringify(e);a.ajax({type:"POST",url:"/Server/OradeaService.asmx/SavePostTitle",data:f,contentType:"application/json; charset=utf-8",dataType:"json",success:function(h){g(h.d)},error:c})},savePostTags:function(d,b,g,c){var e={post:d,actualClient:b};var f=JSON.stringify(e);a.ajax({type:"POST",url:"/Server/OradeaService.asmx/SavePostTags",data:f,contentType:"application/json; charset=utf-8",dataType:"json",success:function(h){g(h.d)},error:c})},deletePost:function(c,b,g,d){var e={postID:c,actualClient:b};var f=JSON.stringify(e);a.ajax({type:"POST",url:"/Server/OradeaService.asmx/DeletePost",data:f,contentType:"application/json; charset=utf-8",dataType:"json",success:function(h){g(h.d)},error:d})},publishPost:function(f,b,g,c){var d={published:f,actualClient:b};var e=JSON.stringify(d);a.ajax({type:"POST",url:"/Server/OradeaService.asmx/PublishPost",data:e,contentType:"application/json; charset=utf-8",dataType:"json",success:function(h){g(h.d)},error:c})},unpublishPost:function(g,b,f,c){var d={publishedPost:g,actualClient:b};var e=JSON.stringify(d);a.ajax({type:"POST",url:"/Server/OradeaService.asmx/UnpublishPost",data:e,contentType:"application/json; charset=utf-8",dataType:"json",success:function(h){f(h.d)},error:c})},deleteNote:function(d,b,g,c){var e={noteID:d,actualClient:b};var f=JSON.stringify(e);a.ajax({type:"POST",url:"/Server/OradeaService.asmx/DeleteNote",data:f,contentType:"application/json; charset=utf-8",dataType:"json",success:function(h){g(h.d)},error:c})},upadateNotesPosition:function(d,b,g,c){var e={notes:d,actualClient:b};var f=JSON.stringify(e);a.ajax({type:"POST",url:"/Server/OradeaService.asmx/UpadateNotesPosition",data:f,contentType:"application/json; charset=utf-8",dataType:"json",success:function(h){g(h.d)},error:c})},saveNote:function(d,b,g,c){var e={note:d,actualClient:b};var f=JSON.stringify(e);a.ajax({type:"POST",url:"/Server/OradeaService.asmx/SaveNote",data:f,contentType:"application/json; charset=utf-8",dataType:"json",success:function(h){g(h.d)},error:c})},createNewNotes:function(d,b,g,c){var e={newNotes:d,actualClient:b};var f=JSON.stringify(e);a.ajax({type:"POST",url:"/Server/OradeaService.asmx/CreateNewNotes",data:f,contentType:"application/json; charset=utf-8",dataType:"json",success:function(h){g(h.d)},error:c})},sendPostByEmail:function(c,f,d,b,i,e){var g={postID:c,receivers:f,displayName:d,actualClient:b};var h=JSON.stringify(g);a.ajax({type:"POST",url:"/Server/OradeaService.asmx/SendPostByEmail",data:h,contentType:"application/json; charset=utf-8",dataType:"json",success:function(j){i(j.d)},error:e})},deleteComment:function(c,b,g,d){var e={commentID:c,actualClient:b};var f=JSON.stringify(e);a.ajax({type:"POST",url:"/Server/OradeaService.asmx/DeleteComment",data:f,contentType:"application/json; charset=utf-8",dataType:"json",success:function(h){g(h.d)},error:d})}}})(jQuery);var srv=new ibriiServer();var clientType_DASHBOARD="DASHBOARD";var clientType_CLIPPER="CLIPPER";var clientType_CLIPPER_FREE="CLIPPER_FREE";var clientType_CLIPPER_FF_EXT="CLIPPER_FF_EXT";var clientType_CLIPPER_FF_EXT_FREE="CLIPPER_FF_EXT_FREE";var clientTypes={DASHBOARD:0,CLIPPER:1,CLIPPER_FREE:2,CLIPPER_FF_EXT:3,CLIPPER_FF_EXT_FREE:4};var actualClient;if(clientType!=null){if(clientType==clientType_DASHBOARD){actualClient=clientTypes.DASHBOARD}else{if(clientType==clientType_CLIPPER){actualClient=clientTypes.CLIPPER}else{if(clientType==clientType_CLIPPER_FREE){actualClient=clientTypes.CLIPPER_FREE}else{if(clientType==clientType_CLIPPER_FF_EXT){actualClient=clientTypes.CLIPPER_FF_EXT}else{if(clientType==clientType_CLIPPER_FF_EXT_FREE){actualClient=clientTypes.CLIPPER_FF_EXT_FREE}}}}}}var newElementID="00000000-0000-0000-0000-000000000000";var shortURL_PublishedNote="/n/";function ExecuteCropping(a){setTimeout(function(){resizePreviewImages(a)},1000)}function GetClientNoteTemplate(){var a={Text:"",URLSource:"",Type:1,Position:0,NoteID:"",PostID:""};return a}function GetClientPostTemplate(){var a={Title:"",Tags:"",isPublic:false,Notes:null,PostID:newElementID};return a}function GetNoteURLSource(b){var a=b.attr("urlsource");if(a==undefined){a=GetURLSourceInternals()}return a}function GetURLSourceInternals(){var a=document.referrer;if(urlReferrer!=""){a=urlReferrer}return a}function ShowSaving(){if((clientType!=clientType_CLIPPER_FREE)&&(clientType!=clientType_CLIPPER_FF_EXT_FREE)){var a=$(".save");if(a){a.show()}}}function HideSaving(){if((clientType!=clientType_CLIPPER_FREE)&&(clientType!=clientType_CLIPPER_FF_EXT_FREE)){var a=$(".save");if(a){a.hide()}}}function SaveNote(c,b){ShowSaving();var a=GetClientNoteTemplate();a.Position=GetNotePosition(c);a.NoteID=GetNoteID(c);a.PostID=GetPostID(c.parent());a.Text=b;a.Type=GetNoteType(c);a.URLSource=GetNoteURLSource(c);saveNote(a,actualClient,function(d){if(d){HideSaving()}else{HideSaving();globalError(null,"Ops...error!Please, try again..")}},function(d){HideSaving();globalError(d,"Ops...error!Please, try again..")})}function GetNotePosition(a){var b=a.attr("position");return b}function GetNoteType(a){if(a.hasClass("htmlBrick")){return 0}else{if(a.hasClass("imgBrick")){return 1}else{if(a.hasClass("embedBrick")){return 2}}}}function GetNoteContent(a){var b=$(".contentBody",a).html();return b}function DeleteNote(d,a){var b=GetNoteID(d);if(b==undefined){$.fn.ibriiBricks.deleteBrick(d,a)}else{var c=d.parent();d.hide();deleteNote(b,actualClient,function(e){if(e){$.fn.ibriiBricks.deleteBrick(d,a)}else{globalError(null,"Ops...error!Please, try again..");d.show()}UpdateNotesPosition(c)},function(e){globalError(e,"Ops...error!Please, try again..");d.show();UpdateNotesPosition(c)})}}function GetNoteID(a){var b=a.attr("note");return b}function GetPostID(a){var b=a.attr("post");return b}function GetAlternativeTitle(){var c=document.referrer;if(actualClient!=clientTypes.DASHBOARD){if(urlReferrer!=""){c=urlReferrer}}var b="";var a=c.match(/:\/\/(.[^/]+)/);if(a!=null){b=c.match(/:\/\/(.[^/]+)/)[1]}else{b=c}return b}function CreateNewNotes(e){ShowSaving();var f=new Array();var h=false;for(var b=0;b<e.length;b++){var g=GetClientNoteTemplate();var a=$(e[b]);g.Position=a.index();g.NoteID=newElementID;g.PostID=GetPostID(a.parent());if(g.PostID==undefined){h=true}g.Type=GetNoteType(a);g.Text=GetNoteContent(a);if(g.Text!=""){if(g.Type==1){var c=$(g.Text);if(c.length){g.Text=c.attr("src")}}g.URLSource=GetNoteURLSource(a);f.push(g)}}if(a==undefined||GetPostID(a.parent())==undefined){h=true}if(h){var d=GetClientPostTemplate();var j=titleEl.val();if(j==""){j=GetAlternativeTitle()}d.Title=j;d.Notes=f;createNewPost(d,actualClient,function(i){if(i.PostID!=newElementID){notesContainer.attr("post",i.PostID);postID=i.PostID;HideSaving()}else{globalError(null,"Ops...error!Please, try again..");HideSaving()}},function(i){globalError(i,"Ops...error!Please, try again..");HideSaving()})}else{if(f.length>0){createNewNotes(f,actualClient,function(l){if(l.length>0){for(var k=0;k<e.length;k++){$(e[k]).attr("note",l[k])}UpdateNotesPosition(notesContainer);HideSaving()}else{globalError(null,"Ops...error!Please, try again..");HideSaving()}},function(i){globalError(i,"Ops...error!Please, try again..");HideSaving()})}}}function UpdateNotesPosition(e){notesContainer=e;notes=$("li",notesContainer);if(notes.length>0){var d=new Array();for(var b=0;b<(notes.length);b++){var a=b+1;$(notes[b]).attr("position",a);var c=GetClientNoteTemplate();c.Position=a;c.NoteID=GetNoteID($(notes[b]));c.PostID=GetPostID(notesContainer);d.push(c)}upadateNotesPosition(d,actualClient,function(f){if(f){}else{globalError(null,"Ops...error!Please, try again..")}},function(f){globalError(f,"Ops...error!Please, try again..")})}}function UpdateStatusOnPostDashboard(c){if(actualClient==clientTypes.DASHBOARD&&c=="public"){var d=$("[post="+postID+"]").parent();var b=$(".postVisibility",d);b.removeClass("private");b.addClass("public");var a=$(".makePrivate",d).parent();a.removeClass("hidden");var e=$(".comments",d).parent();e.removeClass("hidden")}if(actualClient==clientTypes.DASHBOARD&&c=="private"){var d=$("[post="+postID+"]").parent();var b=$(".postVisibility",d);b.removeClass("public");b.addClass("private");var a=$(".makePrivate",d).parent();a.addClass("hidden");var e=$(".comments",d).parent();e.addClass("hidden")}}function UpdateStatusOnPostClipper(b){if(actualClient!=clientTypes.DASHBOARD&&b=="public"){var a=$(".postVisibility");a.removeClass("private");a.addClass("public")}if(actualClient!=clientTypes.DASHBOARD&&b=="private"){var a=$(".postVisibility");a.removeClass("public");a.addClass("private")}}function BrickAutoSave(a){if(autosaveOnHTMLBrick){autosaveOnHTMLBrick=false;setTimeout(function(){var b=a.brick;notesContainer=b.parent();var c=a.data.innerHTML;if(c!=""){if(b.attr("note")!=undefined){SaveNote(b,c)}else{$(".contentBody",b).html(c);CreateNewNotes(b)}}autosaveOnHTMLBrick=true},5000)}}function SaveTags(c,e){var d=c;if(!d.hasClass("disabled")){d.addClass("disabled");var a=$(".tagsInput",d.parent()).val();var b=GetClientPostTemplate();b.Title="";b.Tags=a;b.isPublic=false;b.Notes=null;b.PostID=GetPostID(e);savePostTags(b,actualClient,function(f){if(f){d.removeClass("disabled")}else{globalError(null,"Ops...error!Please, try again..");d.removeClass("disabled")}},function(f){globalError(f,"Ops...error!Please, try again..");d.removeClass("disabled")})}}function MakePrivatePost(a,b,c){unpublishPost(a,actualClient,function(d){switch(d.Result){case 0:break;case 1:globalError(null,"Ops...error!Please, try again..");break;case 2:globalError(null,"Ops...error!Please, try again..");break;case 3:if(b){UpdateStatusOnPostDashboard("private")}else{if(c){c.removeClass("postShared")}UpdateStatusOnPostDashboard("private");UpdateStatusOnPostClipper("private")}break;case 4:globalError(null,"Ops...error!Please, try again..");break;default:break}},function(d){globalError(d,"Ops...error!Please, try again..")})}function ExecuteSearch(b,a,c){if(b.keyCode==13){if(this.value!=""){if(c!=""){var d=a+c;window.location=d}}}}function showPagePanelNotification(e,b,d,g){var c=$("#emailSharingPanel .ibriiNotificationMessage");var f=$(".ibriiNotificationMessageList",c);f.empty();if(e!=undefined){$(".ibriiNotificationMessageTitle",c).text(e).show()}else{$(".ibriiNotificationMessageTitle",c).hide()}if((b!=undefined)&&b.length>0){f.empty().show();jQuery.each(b,function(h,j){var i=$("<li>").text(j);f.append(i)})}else{f.hide()}if(d!=undefined){$(".ibriiNotificationMessageTitle2",c).text(d).show()}else{$(".ibriiNotificationMessageTitle2",c).hide()}var a=$(".ibriiNotificationMessageList2",c);if((g!=undefined)&&g.length>0){a.empty().show();jQuery.each(g,function(h,j){var i=$("<li>").text(j);a.append(i)})}else{a.hide()}$(".ibriiNotificationMessageClose",c).click(function(){hidePagePanelNotification()});c.show("slow")}function hidePagePanelNotification(){var a=$("#emailSharingPanel .ibriiNotificationMessage");a.hide("slow")}function setZeroClipboard(a){if(a!=null){clip=new ZeroClipboard.Client();clip.setText("");clip.setHandCursor(true);clip.addEventListener("mouseDown",function(b){clip.setText(a.val());var c=$("#copiedToTheClipboardNotification");c.show(500,function(){setTimeout(function(){c.hide(500)},3000)})});clip.glue("copyPermalinkToTheClipboardButton")}else{setTimeout(function(){setZeroClipboard(a)},500)}}function globalError(a,b){alert(b)}function globalAlert(a){alert(a)}function createNewPost(b,a,d,c){srv.createNewPost(b,a,d,c)}function savePost(c,a,d,b){srv.savePost(c,a,d,b)}function getPublishedPostURL(c,a,d,b){srv.getPublishedPostURL(c,a,d,b)}function savePostTitle(c,a,d,b){srv.savePostTitle(c,a,d,b)}function savePostTags(c,a,d,b){srv.savePostTags(c,a,d,b)}function deletePost(b,a,d,c){srv.deletePost(b,a,d,c)}function publishPost(c,a,d,b){srv.publishPost(c,a,d,b)}function unpublishPost(d,a,c,b){srv.unpublishPost(d,a,c,b)}function deleteNote(c,a,d,b){srv.deleteNote(c,a,d,b)}function upadateNotesPosition(c,a,d,b){srv.upadateNotesPosition(c,a,d,b)}function saveNote(c,a,d,b){srv.saveNote(c,a,d,b)}function createNewNotes(c,a,d,b){srv.createNewNotes(c,a,d,b)}function sendPostByEmail(b,e,c,a,f,d){srv.sendPostByEmail(b,e,c,a,f,d)}function deleteComment(b,a,d,c){srv.deleteComment(b,a,d,c)}if(!this.JSON){this.JSON={}}(function(){function f(n){return n<10?"0"+n:n}if(typeof Date.prototype.toJSON!=="function"){Date.prototype.toJSON=function(key){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(key){return this.valueOf()}}var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;function quote(string){escapable.lastIndex=0;return escapable.test(string)?'"'+string.replace(escapable,function(a){var c=meta[a];return typeof c==="string"?c:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+string+'"'}function str(key,holder){var i,k,v,length,mind=gap,partial,value=holder[key];if(value&&typeof value==="object"&&typeof value.toJSON==="function"){value=value.toJSON(key)}if(typeof rep==="function"){value=rep.call(holder,key,value)}switch(typeof value){case"string":return quote(value);case"number":return isFinite(value)?String(value):"null";case"boolean":case"null":return String(value);case"object":if(!value){return"null"}gap+=indent;partial=[];if(Object.prototype.toString.apply(value)==="[object Array]"){length=value.length;for(i=0;i<length;i+=1){partial[i]=str(i,value)||"null"}v=partial.length===0?"[]":gap?"[\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"]":"["+partial.join(",")+"]";gap=mind;return v}if(rep&&typeof rep==="object"){length=rep.length;for(i=0;i<length;i+=1){k=rep[i];if(typeof k==="string"){v=str(k,value);if(v){partial.push(quote(k)+(gap?": ":":")+v)}}}}else{for(k in value){if(Object.hasOwnProperty.call(value,k)){v=str(k,value);if(v){partial.push(quote(k)+(gap?": ":":")+v)}}}}v=partial.length===0?"{}":gap?"{\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"}":"{"+partial.join(",")+"}";gap=mind;return v}}if(typeof JSON.stringify!=="function"){JSON.stringify=function(value,replacer,space){var i;gap="";indent="";if(typeof space==="number"){for(i=0;i<space;i+=1){indent+=" "}}else{if(typeof space==="string"){indent=space}}rep=replacer;if(replacer&&typeof replacer!=="function"&&(typeof replacer!=="object"||typeof replacer.length!=="number")){throw new Error("JSON.stringify")}return str("",{"":value})}}if(typeof JSON.parse!=="function"){JSON.parse=function(text,reviver){var j;function walk(holder,key){var k,v,value=holder[key];if(value&&typeof value==="object"){for(k in value){if(Object.hasOwnProperty.call(value,k)){v=walk(value,k);if(v!==undefined){value[k]=v}else{delete value[k]}}}}return reviver.call(holder,key,value)}cx.lastIndex=0;if(cx.test(text)){text=text.replace(cx,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})}if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){j=eval("("+text+")");return typeof reviver==="function"?walk({"":j},""):j}throw new SyntaxError("JSON.parse")}}}());var ibriiReleaseVersion=2209;var panelRequestSent;function loadPagePanel(d,f,h){var a=15000;if(!(panelRequestSent)){panelRequestSent=true;setTimeout(function(){if(panelRequestSent){panelRequestSent=false;if((typeof f)=="function"){f("timeout")}}},a);var g=$("#panelLoader");var b=$("#panelContent");var j=typeof ibriiReleaseVersion=="undefined"?"":"_";var e=typeof ibriiReleaseVersion=="undefined"?0:ibriiReleaseVersion;var c=d.substring(0,d.lastIndexOf("."));var i=" <link rel='stylesheet' type='text/css' href='"+c+".css?v="+e+"'>";var k=$(i);if($("link[href='"+c+"'.css]",g).length==0){$(g).append(k)}$.ajax({async:false,type:"GET",url:d,cache:true,dataType:"html",complete:function(n,p){var o=n.responseText;if((typeof f)=="function"){f()}panelRequestSent=false;g.hide();b.html(o);if(h){}$.getScript(c+j+".js?v="+e);var m=$("link",g);m.each(function(){var q=$(this);q.attr("href",q.attr("href"))});g.hide();var l=g.height();g.show();$(".closeButton",g).click(function(){g.hide(500,function(){b.empty()})})}})}}function jNotification(c){var b=$(".panelNotificationDiv");var a=$(".panelNotificationMessage",b);a.html(c);b.hide().show("slide",{direction:"up"},1000);$(".panelNotificationClose").one("click",function(){b.hide("slide",{direction:"up"},1000)})};