var guiders=function(n){var t=n.guiders={},i;return t.version="2.0.0",t._defaultSettings={attachTo:null,autoFocus:!1,buttons:[{name:"Close"}],buttonCustomHTML:"",classString:null,closeOnEscape:!0,description:"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",highlight:null,isHashable:!0,maxWidth:null,offset:{top:null,left:null},onClose:null,onHide:null,onShow:null,overlay:!1,position:0,shouldSkip:function(){},title:"Sample title goes here",width:400,xButton:!1},t._htmlSkeleton="<div class='guider'>  <div class='guiders_content'>    <h1 class='guiders_title'><\/h1>    <div class='guiders_close'><\/div>    <p class='guiders_description'><\/p>    <div class='guiders_buttons_container'>    <\/div>  <\/div>  <div class='guiders_arrow'>  <\/div><\/div>",t._arrowSize=42,t._backButtonTitle="Back",t._buttonAttributes={href:"javascript:void(0);"},t._buttonClassName="guiders_button",t._buttonClickEvent="click touch",t._buttonElement="<a><\/a>",t._closeButtonTitle="Close",t._currentGuiderID=null,t._fixedOrAbsolute="fixed",t._guiders={},t._lastCreatedGuiderID=null,t._nextButtonTitle="Next",t._offsetNameMapping={topLeft:11,top:12,topRight:1,rightTop:2,right:3,rightBottom:4,bottomRight:5,bottom:6,bottomLeft:7,leftBottom:8,left:9,leftTop:10},t._windowHeight=0,i=navigator.userAgent.match(/MSIE\s([\d.]+)/),t._isIE=i&&i.length>1,t._ieVersion=i&&i.length>1?Number(i[1]):-1,t._addButtons=function(i){var f=i.elem.find(".guiders_buttons_container"),e,r,u,o,s;if(i.buttons===null||i.buttons.length===0){f.remove();return}for(f.html(""),e=i.buttons.length-1;e>=0;e--)if(r=i.buttons[e],u=n(t._buttonElement,n.extend({"class":t._buttonClassName,html:r.name},t._buttonAttributes,r.html||{})),typeof r.classString!="undefined"&&r.classString!==null&&u.addClass(r.classString),f.append(u),o=r.name.toLowerCase(),r.onclick)u.bind(t._buttonClickEvent,r.onclick);else switch(o){case t._closeButtonTitle.toLowerCase():u.bind(t._buttonClickEvent,function(){if(t.hideAll(),i.onClose)i.onClose(i,!1);n("body").trigger("guidersClose")});break;case t._nextButtonTitle.toLowerCase():u.bind(t._buttonClickEvent,function(){i.elem.data("locked")||t.next()});break;case t._backButtonTitle.toLowerCase():u.bind(t._buttonClickEvent,function(){i.elem.data("locked")||t.prev()})}i.buttonCustomHTML!==""&&(s=n(i.buttonCustomHTML),i.elem.find(".guiders_buttons_container").append(s));i.buttons.length===0&&f.remove()},t._addXButton=function(i){var u=i.elem.find(".guiders_close"),r=n("<div><\/div>",{"class":"guiders_x_button",role:"button"});u.append(r);r.click(function(){if(t.hideAll(),i.onClose)i.onClose(i,!0);n("body").trigger("guidersClose")})},t._attach=function(i){var l,a;if(typeof i=="object"){var s=n(i.attachTo),u=i.elem.innerHeight(),f=i.elem.innerWidth();if(i.position===0||s.length===0){l="fixed";t._isIE&&t._ieVersion<9&&(l="absolute");i.elem.css("position",l);i.elem.css("top",(n(window).height()-u)/3+"px");i.elem.css("left",(n(window).width()-f)/2+"px");return}var v=s.offset(),h=v.top,c=v.left,p=n("body").outerHeight(!0)-n("body").outerHeight(!1);h-=p;t._offsetNameMapping[i.position]&&(i.position=t._offsetNameMapping[i.position]);var e=s.innerHeight(),o=s.innerWidth(),r=.9*t._arrowSize,w={1:[-r-u,o-f],2:[0,r+o],3:[e/2-u/2,r+o],4:[e-u,r+o],5:[r+e,o-f],6:[r+e,o/2-f/2],7:[r+e,0],8:[e-u,-f-r],9:[e/2-u/2,-f-r],10:[0,-f-r],11:[-r-u,0],12:[-r-u,o/2-f/2]},y=w[i.position];return h+=y[0],c+=y[1],a="absolute",s.css("position")==="fixed"&&t._fixedOrAbsolute==="fixed"&&(a="fixed",h-=n(window).scrollTop(),c-=n(window).scrollLeft()),i.offset.top!==null&&(h+=i.offset.top),i.offset.left!==null&&(c+=i.offset.left),t._styleArrow(i),i.elem.css({position:a,top:h,left:c}),i}},t._dehighlightElement=function(t){n(t).removeClass("guiders_highlight")},t._hideOverlay=function(){n("#guiders_overlay").fadeOut("fast")},t._highlightElement=function(t){n(t).addClass("guiders_highlight")},t._initializeOverlay=function(){n("#guiders_overlay").length===0&&n("<div id='guiders_overlay'><\/div>").hide().appendTo("body")},t._showOverlay=function(){n("#guiders_overlay").fadeIn("fast",function(){this.style.removeAttribute&&this.style.removeAttribute("filter")});t._isIE&&n("#guiders_overlay").css("position","absolute")},t._styleArrow=function(i){var u=i.position||0,f,e;if(u){f=n(i.elem.find(".guiders_arrow"));e={1:"guiders_arrow_down",2:"guiders_arrow_left",3:"guiders_arrow_left",4:"guiders_arrow_left",5:"guiders_arrow_up",6:"guiders_arrow_up",7:"guiders_arrow_up",8:"guiders_arrow_right",9:"guiders_arrow_right",10:"guiders_arrow_right",11:"guiders_arrow_down",12:"guiders_arrow_down"};f.addClass(e[u]);var o=i.elem.innerHeight(),s=i.elem.innerWidth(),r=t._arrowSize/2,h={1:["right",r],2:["top",r],3:["top",o/2-r],4:["bottom",r],5:["right",r],6:["left",s/2-r],7:["left",r],8:["bottom",r],9:["top",o/2-r],10:["top",r],11:["left",r],12:["left",s/2-r]},u=h[i.position];f.css(u[0],u[1]+"px")}},t._showIfHashed=function(n){var i="guider=",r=window.location.hash.indexOf(i),u;r!==-1&&(u=window.location.hash.substr(r+i.length),n.id.toLowerCase()===u.toLowerCase()&&t.show(n.id))},t._updatePositionOnResize=function(){var i=undefined;n(window).resize(function(){typeof i!="undefined"&&clearTimeout(i);i=setTimeout(function(){i=undefined;typeof t!="undefined"&&t.reposition()},20)})},t._updatePositionOnResize(),t._unwireEscape=function(){n(document).unbind("keydown")},t._wireEscape=function(i){n(document).keydown(function(r){if(r.keyCode==27||r.which==27){if(t.hideAll(),i.onClose)i.onClose(i,!0);return n("body").trigger("guidersClose"),!1}})},t.createGuider=function(i){var r,u;return(i===null||i===undefined)&&(i={}),myGuider=n.extend({},t._defaultSettings,i),myGuider.id=myGuider.id||"guider_random_"+String(Math.floor(Math.random()*1e3)),r=n("#"+myGuider.id),r.length||(r=n(t._htmlSkeleton)),myGuider.elem=r,typeof myGuider.classString!="undefined"&&myGuider.classString!==null&&myGuider.elem.addClass(myGuider.classString),Number(myGuider.width)===myGuider.width&&(myGuider.width=String(myGuider.width)+"px"),Number(myGuider.maxWidth)===myGuider.maxWidth&&(myGuider.maxWidth=String(myGuider.maxWidth)+"px"),myGuider.elem.css("width",myGuider.width),myGuider.elem.css("maxWidth",myGuider.maxWidth),u=r.find(".guiders_title"),u.html(myGuider.title),r.find(".guiders_description").html(myGuider.description),t._addButtons(myGuider),myGuider.xButton&&t._addXButton(myGuider),r.hide(),r.appendTo("body"),r.attr("id",myGuider.id),typeof myGuider.attachTo!="undefined"&&myGuider!==null&&t._attach(myGuider),t._initializeOverlay(),t._guiders[myGuider.id]=myGuider,t._lastCreatedGuiderID!=null&&(myGuider.prev=t._lastCreatedGuiderID),t._lastCreatedGuiderID=myGuider.id,myGuider.isHashable&&t._showIfHashed(myGuider),t},t.get=function(n){return typeof t._guiders[n]=="undefined"?null:t._guiders[n]||null},t.getCurrentGuider=function(){return t._guiders[t._currentGuiderID]||null},t.hideAll=function(i,r){r=r||!1;n(".guider:visible").each(function(i,u){var f=t.get(n(u).attr("id"));if(f.onHide)f.onHide(f,r)});n(".guider").fadeOut("fast");var u=t._guiders[t._currentGuiderID];return u&&u.highlight&&t._dehighlightElement(u.highlight),typeof i!="undefined"&&i===!0||t._hideOverlay(),t},t.next=function(){var n=t._guiders[t._currentGuiderID],i,r,u;return typeof n=="undefined"?null:(n.elem.data("locked",!0),i=n.next||null,i!==null&&i!==""?(r=t.get(i),u=r.overlay?!0:!1,t.hideAll(u,!0),n&&n.highlight&&t._dehighlightElement(n.highlight),r.shouldSkip&&r.shouldSkip()?(t._currentGuiderID=r.id,t.next(),t.getCurrentGuider()):(t.show(i),t.getCurrentGuider())):void 0)},t.prev=function(){var r=t._guiders[t._currentGuiderID],n,i,u,f;return typeof r=="undefined"?null:r.prev===null?null:(n=t._guiders[r.prev],n.elem.data("locked",!0),i=n.id||null,i!==null&&i!==""?(u=t.get(i),f=u.overlay?!0:!1,t.hideAll(f,!0),n&&n.highlight&&t._dehighlightElement(n.highlight),t.show(i),u):void 0)},t.reposition=function(){var n=t._guiders[t._currentGuiderID];t._attach(n)},t.scrollToCurrent=function(){var i=t._guiders[t._currentGuiderID];if(typeof i!="undefined"){var r=t._windowHeight,o=n(window).scrollTop(),u=i.elem.offset(),f=i.elem.height(),e=Math.round(Math.max(u.top+f/2-r/2,0));window.scrollTo(0,e)}},t.show=function(i){var r;if(!i&&t._lastCreatedGuiderID&&(i=t._lastCreatedGuiderID),r=t.get(i),r.overlay&&(t._showOverlay(r),r.highlight&&r.attachTo&&t._highlightElement(r.attachTo)),r.closeOnEscape?t._wireEscape(r):t._unwireEscape(r),r.onShow)r.onShow(r);t._attach(r);r.elem.fadeIn("fast").data("locked",!1);t._currentGuiderID=i;var e=t._windowHeight=n(window).height(),u=n(window).scrollTop(),f=r.elem.offset(),o=r.elem.height(),s=u+e<f.top+o,h=f.top<u;return r.autoFocus&&(s||h)&&setTimeout(t.scrollToCurrent,10),n(r.elem).trigger("guiders.show"),t},n.fn.guider=function(i){var u,e,f,r;i=i||{};u=n.extend({},i);u.id=n(this).attr("id");e=[];n(this).find(".guiders_buttons_container").children().each(function(){var t={name:n(this).html(),classString:n(this).attr("class")},i;n(this).attr("data-onclick")&&(i=n(this).attr("data-onclick"),t.onclick=function(){window[i]()});n(this).remove();e.push(t)});u.buttons=e;title=n(this).find(".guiders_title").html();title&&(u.title=title);description=n(this).find(".guiders_description").html();description&&(u.description=description);for(f in t._defaultSettings)t._defaultSettings.hasOwnProperty(f)&&(r=n(this).attr("data-"+f),r!==undefined&&r!==null)&&(r=="true"?r=!0:r=="false"&&(r=!1),u[f]=r);return t.createGuider(u),this},t}.call(this,jQuery);typeof JSON!="object"&&(JSON={}),function(){"use strict";function i(n){return n<10?"0"+n:n}function f(n){return o.lastIndex=0,o.test(n)?'"'+n.replace(o,function(n){var t=s[n];return typeof t=="string"?t:"\\u"+("0000"+n.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+n+'"'}function r(i,e){var s,l,h,a,v=n,c,o=e[i];o&&typeof o=="object"&&typeof o.toJSON=="function"&&(o=o.toJSON(i));typeof t=="function"&&(o=t.call(e,i,o));switch(typeof o){case"string":return f(o);case"number":return isFinite(o)?String(o):"null";case"boolean":case"null":return String(o);case"object":if(!o)return"null";if(n+=u,c=[],Object.prototype.toString.apply(o)==="[object Array]"){for(a=o.length,s=0;s<a;s+=1)c[s]=r(s,o)||"null";return h=c.length===0?"[]":n?"[\n"+n+c.join(",\n"+n)+"\n"+v+"]":"["+c.join(",")+"]",n=v,h}if(t&&typeof t=="object")for(a=t.length,s=0;s<a;s+=1)typeof t[s]=="string"&&(l=t[s],h=r(l,o),h&&c.push(f(l)+(n?": ":":")+h));else for(l in o)Object.prototype.hasOwnProperty.call(o,l)&&(h=r(l,o),h&&c.push(f(l)+(n?": ":":")+h));return h=c.length===0?"{}":n?"{\n"+n+c.join(",\n"+n)+"\n"+v+"}":"{"+c.join(",")+"}",n=v,h}}typeof Date.prototype.toJSON!="function"&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+i(this.getUTCMonth()+1)+"-"+i(this.getUTCDate())+"T"+i(this.getUTCHours())+":"+i(this.getUTCMinutes())+":"+i(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()});var e=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,o=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,n,u,s={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},t;typeof JSON.stringify!="function"&&(JSON.stringify=function(i,f,e){var o;if(n="",u="",typeof e=="number")for(o=0;o<e;o+=1)u+=" ";else typeof e=="string"&&(u=e);if(t=f,!f||typeof f=="function"||typeof f=="object"&&typeof f.length=="number")return r("",{"":i});throw new Error("JSON.stringify");});typeof JSON.parse!="function"&&(JSON.parse=function(text,reviver){function walk(n,t){var r,u,i=n[t];if(i&&typeof i=="object")for(r in i)Object.prototype.hasOwnProperty.call(i,r)&&(u=walk(i,r),u!==undefined?i[r]=u:delete i[r]);return reviver.call(n,t,i)}var j;if(text=String(text),e.lastIndex=0,e.test(text)&&(text=text.replace(e,function(n){return"\\u"+("0000"+n.charCodeAt(0).toString(16)).slice(-4)})),/^[\],:{}\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,"")))return j=eval("("+text+")"),typeof reviver=="function"?walk({"":j},""):j;throw new SyntaxError("JSON.parse");})}(),function(n,t){"use strict";var i=n.History=n.History||{},r=n.jQuery;if(typeof i.Adapter!="undefined")throw new Error("History.js Adapter has already been loaded...");i.Adapter={bind:function(n,t,i){r(n).bind(t,i)},trigger:function(n,t,i){r(n).trigger(t,i)},extractEventData:function(n,i,r){return i&&i.originalEvent&&i.originalEvent[n]||r&&r[n]||t},onDomLoad:function(n){r(n)}};typeof i.init!="undefined"&&i.init()}(window),function(n){"use strict";var i=n.document,u=n.setTimeout||u,f=n.clearTimeout||f,r=n.setInterval||r,t=n.History=n.History||{};if(typeof t.initHtml4!="undefined")throw new Error("History.js HTML4 Support has already been loaded...");t.initHtml4=function(){if(typeof t.initHtml4.initialized!="undefined")return!1;t.initHtml4.initialized=!0;t.enabled=!0;t.savedHashes=[];t.isLastHash=function(n){var r=t.getHashByIndex(),i;return i=n===r,i};t.isHashEqual=function(n,t){return n=encodeURIComponent(n).replace(/%25/g,"%"),t=encodeURIComponent(t).replace(/%25/g,"%"),n===t};t.saveHash=function(n){return t.isLastHash(n)?!1:(t.savedHashes.push(n),!0)};t.getHashByIndex=function(n){var i=null;return i=typeof n=="undefined"?t.savedHashes[t.savedHashes.length-1]:n<0?t.savedHashes[t.savedHashes.length+n]:t.savedHashes[n],i};t.discardedHashes={};t.discardedStates={};t.discardState=function(n,i,r){var f=t.getHashByState(n),u;return u={discardedState:n,backState:r,forwardState:i},t.discardedStates[f]=u,!0};t.discardHash=function(n,i,r){var u={discardedHash:n,backState:r,forwardState:i};return t.discardedHashes[n]=u,!0};t.discardedState=function(n){var r=t.getHashByState(n),i;return i=t.discardedStates[r]||!1,i};t.discardedHash=function(n){return t.discardedHashes[n]||!1};t.recycleState=function(n){var i=t.getHashByState(n);return t.discardedState(n)&&delete t.discardedStates[i],!0};t.emulated.hashChange&&(t.hashChangeInit=function(){t.checkerFunction=null;var f="",s,u,e,o,h=Boolean(t.getHash());return t.isInternetExplorer()?(s="historyjs-iframe",u=i.createElement("iframe"),u.setAttribute("id",s),u.setAttribute("src","#"),u.style.display="none",i.body.appendChild(u),u.contentWindow.document.open(),u.contentWindow.document.close(),e="",o=!1,t.checkerFunction=function(){if(o)return!1;o=!0;var r=t.getHash(),i=t.getHash(u.contentWindow.document);return r!==f?(f=r,i!==r&&(e=i=r,u.contentWindow.document.open(),u.contentWindow.document.close(),u.contentWindow.document.location.hash=t.escapeHash(r)),t.Adapter.trigger(n,"hashchange")):i!==e&&(e=i,h&&i===""?t.back():t.setHash(i,!1)),o=!1,!0}):t.checkerFunction=function(){var i=t.getHash()||"";return i!==f&&(f=i,t.Adapter.trigger(n,"hashchange")),!0},t.intervalList.push(r(t.checkerFunction,t.options.hashChangeInterval)),!0},t.Adapter.onDomLoad(t.hashChangeInit));t.emulated.pushState&&(t.onHashChange=function(i){var e=i&&i.newURL||t.getLocationHref(),u=t.getHashByUrl(e),r=null,o=null,f;return t.isLastHash(u)?(t.busy(!1),!1):(t.doubleCheckComplete(),t.saveHash(u),u&&t.isTraditionalAnchor(u)?(t.Adapter.trigger(n,"anchorchange"),t.busy(!1),!1):(r=t.extractState(t.getFullUrl(u||t.getLocationHref()),!0),t.isLastSavedState(r)?(t.busy(!1),!1):(o=t.getHashByState(r),f=t.discardedState(r),f?(t.getHashByIndex(-2)===t.getHashByState(f.forwardState)?t.back(!1):t.forward(!1),!1):(t.pushState(r.data,r.title,encodeURI(r.url),!1),!0))))},t.Adapter.bind(n,"hashchange",t.onHashChange),t.pushState=function(i,r,u,f){if(u=encodeURI(u).replace(/%25/g,"%"),t.getHashByUrl(u))throw new Error("History.js does not support states with fragment-identifiers (hashes/anchors).");if(f!==!1&&t.busy())return t.pushQueue({scope:t,callback:t.pushState,args:arguments,queue:f}),!1;t.busy(!0);var e=t.createStateObject(i,r,u),o=t.getHashByState(e),s=t.getState(!1),h=t.getHashByState(s),c=t.getHash(),l=t.expectedStateId==e.id;return t.storeState(e),t.expectedStateId=e.id,t.recycleState(e),t.setTitle(e),o===h?(t.busy(!1),!1):(t.saveState(e),l||t.Adapter.trigger(n,"statechange"),!t.isHashEqual(o,c)&&!t.isHashEqual(o,t.getShortUrl(t.getLocationHref()))&&t.setHash(o,!1),t.busy(!1),!0)},t.replaceState=function(i,r,u,f){if(u=encodeURI(u).replace(/%25/g,"%"),t.getHashByUrl(u))throw new Error("History.js does not support states with fragment-identifiers (hashes/anchors).");if(f!==!1&&t.busy())return t.pushQueue({scope:t,callback:t.replaceState,args:arguments,queue:f}),!1;t.busy(!0);var e=t.createStateObject(i,r,u),s=t.getHashByState(e),o=t.getState(!1),h=t.getHashByState(o),c=t.getStateByIndex(-2);return t.discardState(o,e,c),s===h?(t.storeState(e),t.expectedStateId=e.id,t.recycleState(e),t.setTitle(e),t.saveState(e),t.Adapter.trigger(n,"statechange"),t.busy(!1)):t.pushState(e.data,e.title,e.url,!1),!0});t.emulated.pushState&&t.getHash()&&!t.emulated.hashChange&&t.Adapter.onDomLoad(function(){t.Adapter.trigger(n,"hashchange")})};typeof t.init!="undefined"&&t.init()}(window),function(n,t){"use strict";var e=n.console||t,r=n.document,o=n.navigator,f=n.sessionStorage||!1,h=n.setTimeout,c=n.clearTimeout,l=n.setInterval,a=n.clearInterval,u=n.JSON,v=n.alert,i=n.History=n.History||{},s=n.history;try{f.setItem("TEST","1");f.removeItem("TEST")}catch(y){f=!1}if(u.stringify=u.stringify||u.encode,u.parse=u.parse||u.decode,typeof i.init!="undefined")throw new Error("History.js Core has already been loaded...");i.init=function(){return typeof i.Adapter=="undefined"?!1:(typeof i.initCore!="undefined"&&i.initCore(),typeof i.initHtml4!="undefined"&&i.initHtml4(),!0)};i.initCore=function(){if(typeof i.initCore.initialized!="undefined")return!1;if(i.initCore.initialized=!0,i.options=i.options||{},i.options.hashChangeInterval=i.options.hashChangeInterval||100,i.options.safariPollInterval=i.options.safariPollInterval||500,i.options.doubleCheckInterval=i.options.doubleCheckInterval||500,i.options.disableSuid=i.options.disableSuid||!1,i.options.storeInterval=i.options.storeInterval||1e3,i.options.busyDelay=i.options.busyDelay||250,i.options.debug=i.options.debug||!1,i.options.initialTitle=i.options.initialTitle||r.title,i.options.html4Mode=i.options.html4Mode||!1,i.options.delayInit=i.options.delayInit||!1,i.intervalList=[],i.clearAllIntervals=function(){var n,t=i.intervalList;if(typeof t!="undefined"&&t!==null){for(n=0;n<t.length;n++)a(t[n]);i.intervalList=null}},i.debug=function(){(i.options.debug||!1)&&i.log.apply(i,arguments)},i.log=function(){var s=typeof e!="undefined"&&typeof e.log!="undefined"&&typeof e.log.apply!="undefined",t=r.getElementById("log"),n,f,h,o,i;for(s?(o=Array.prototype.slice.call(arguments),n=o.shift(),typeof e.debug!="undefined"?e.debug.apply(e,[n,o]):e.log.apply(e,[n,o])):n="\n"+arguments[0]+"\n",f=1,h=arguments.length;f<h;++f){if(i=arguments[f],typeof i=="object"&&typeof u!="undefined")try{i=u.stringify(i)}catch(c){}n+="\n"+i+"\n"}return t?(t.value+=n+"\n-----\n",t.scrollTop=t.scrollHeight-t.clientHeight):s||v(n),!0},i.getInternetExplorerMajorVersion=function(){return i.getInternetExplorerMajorVersion.cached=typeof i.getInternetExplorerMajorVersion.cached!="undefined"?i.getInternetExplorerMajorVersion.cached:function(){for(var n=3,t=r.createElement("div"),i=t.getElementsByTagName("i");(t.innerHTML="<!--[if gt IE "+ ++n+"]><i><\/i><![endif]-->")&&i[0];);return n>4?n:!1}()},i.isInternetExplorer=function(){return i.isInternetExplorer.cached=typeof i.isInternetExplorer.cached!="undefined"?i.isInternetExplorer.cached:Boolean(i.getInternetExplorerMajorVersion())},i.emulated=i.options.html4Mode?{pushState:!0,hashChange:!0}:{pushState:!Boolean(n.history&&n.history.pushState&&n.history.replaceState&&!/ Mobile\/([1-7][a-z]|(8([abcde]|f(1[0-8]))))/i.test(o.userAgent)&&!/AppleWebKit\/5([0-2]|3[0-2])/i.test(o.userAgent)),hashChange:Boolean(!("onhashchange"in n||"onhashchange"in r)||i.isInternetExplorer()&&i.getInternetExplorerMajorVersion()<8)},i.enabled=!i.emulated.pushState,i.bugs={setHash:Boolean(!i.emulated.pushState&&o.vendor==="Apple Computer, Inc."&&/AppleWebKit\/5([0-2]|3[0-3])/.test(o.userAgent)),safariPoll:Boolean(!i.emulated.pushState&&o.vendor==="Apple Computer, Inc."&&/AppleWebKit\/5([0-2]|3[0-3])/.test(o.userAgent)),ieDoubleCheck:Boolean(i.isInternetExplorer()&&i.getInternetExplorerMajorVersion()<8),hashEscape:Boolean(i.isInternetExplorer()&&i.getInternetExplorerMajorVersion()<7)},i.isEmptyObject=function(n){for(var t in n)if(n.hasOwnProperty(t))return!1;return!0},i.cloneObject=function(n){var i,t;return n?(i=u.stringify(n),t=u.parse(i)):t={},t},i.getRootUrl=function(){var n=r.location.protocol+"//"+(r.location.hostname||r.location.host);return(r.location.port||!1)&&(n+=":"+r.location.port),n+="/",n},i.getBaseHref=function(){var t=r.getElementsByTagName("base"),i=null,n="";return t.length===1&&(i=t[0],n=i.href.replace(/[^\/]+$/,"")),n=n.replace(/\/+$/,""),n&&(n+="/"),n},i.getBaseUrl=function(){return i.getBaseHref()||i.getBasePageUrl()||i.getRootUrl()},i.getPageUrl=function(){var t=i.getState(!1,!1),r=(t||{}).url||i.getLocationHref(),n;return n=r.replace(/\/+$/,"").replace(/[^\/]+$/,function(n){return/\./.test(n)?n:n+"/"}),n},i.getBasePageUrl=function(){return i.getLocationHref().replace(/[#\?].*/,"").replace(/[^\/]+$/,function(n){return/[^\/]$/.test(n)?"":n}).replace(/\/+$/,"")+"/"},i.getFullUrl=function(n,t){var u=n,r=n.substring(0,1);return t=typeof t=="undefined"?!0:t,/[a-z]+\:\/\//.test(n)||(u=r==="/"?i.getRootUrl()+n.replace(/^\/+/,""):r==="#"?i.getPageUrl().replace(/#.*/,"")+n:r==="?"?i.getPageUrl().replace(/[\?#].*/,"")+n:t?i.getBaseUrl()+n.replace(/^(\.\/)+/,""):i.getBasePageUrl()+n.replace(/^(\.\/)+/,"")),u.replace(/\#$/,"")},i.getShortUrl=function(n){var t=n,r=i.getBaseUrl(),u=i.getRootUrl();return i.emulated.pushState&&(t=t.replace(r,"")),t=t.replace(u,"/"),i.isTraditionalAnchor(t)&&(t="./"+t),t=t.replace(/^(\.\/)+/g,"./").replace(/\#$/,""),t},i.getLocationHref=function(n){return n=n||r,n.URL===n.location.href?n.location.href:n.location.href===decodeURIComponent(n.URL)?n.URL:n.location.hash&&decodeURIComponent(n.location.href.replace(/^[^#]+/,""))===n.location.hash?n.location.href:n.URL.indexOf("#")==-1&&n.location.href.indexOf("#")!=-1?n.location.href:n.URL||n.location.href},i.store={},i.idToState=i.idToState||{},i.stateToId=i.stateToId||{},i.urlToId=i.urlToId||{},i.storedStates=i.storedStates||[],i.savedStates=i.savedStates||[],i.normalizeStore=function(){i.store.idToState=i.store.idToState||{};i.store.urlToId=i.store.urlToId||{};i.store.stateToId=i.store.stateToId||{}},i.getState=function(n,t){typeof n=="undefined"&&(n=!0);typeof t=="undefined"&&(t=!0);var r=i.getLastSavedState();return!r&&t&&(r=i.createStateObject()),n&&(r=i.cloneObject(r),r.url=r.cleanUrl||r.url),r},i.getIdByState=function(n){var t=i.extractId(n.url),r;if(!t)if(r=i.getStateString(n),typeof i.stateToId[r]!="undefined")t=i.stateToId[r];else if(typeof i.store.stateToId[r]!="undefined")t=i.store.stateToId[r];else{for(;;)if(t=(new Date).getTime()+String(Math.random()).replace(/\D/g,""),typeof i.idToState[t]=="undefined"&&typeof i.store.idToState[t]=="undefined")break;i.stateToId[r]=t;i.idToState[t]=n}return t},i.normalizeState=function(n){var t,r;return(n&&typeof n=="object"||(n={}),typeof n.normalized!="undefined")?n:(n.data&&typeof n.data=="object"||(n.data={}),t={},t.normalized=!0,t.title=n.title||"",t.url=i.getFullUrl(n.url?n.url:i.getLocationHref()),t.hash=i.getShortUrl(t.url),t.data=i.cloneObject(n.data),t.id=i.getIdByState(t),t.cleanUrl=t.url.replace(/\??\&_suid.*/,""),t.url=t.cleanUrl,r=!i.isEmptyObject(t.data),(t.title||r)&&i.options.disableSuid!==!0&&(t.hash=i.getShortUrl(t.url).replace(/\??\&_suid.*/,""),/\?/.test(t.hash)||(t.hash+="?"),t.hash+="&_suid="+t.id),t.hashedUrl=i.getFullUrl(t.hash),(i.emulated.pushState||i.bugs.safariPoll)&&i.hasUrlDuplicate(t)&&(t.url=t.hashedUrl),t)},i.createStateObject=function(n,t,r){var u={data:n,title:t,url:r};return u=i.normalizeState(u),u},i.getStateById=function(n){n=String(n);return i.idToState[n]||i.store.idToState[n]||t},i.getStateString=function(n){var t,r,f;return t=i.normalizeState(n),r={data:t.data,title:n.title,url:n.url},f=u.stringify(r),f},i.getStateId=function(n){var t,r;return t=i.normalizeState(n),r=t.id,r},i.getHashByState=function(n){var t,r;return t=i.normalizeState(n),r=t.hash,r},i.extractId=function(n){var i,t,u,r;return r=n.indexOf("#")!=-1?n.split("#")[0]:n,t=/(.*)\&_suid=([0-9]+)$/.exec(r),u=t?t[1]||n:n,i=t?String(t[2]||""):"",i||!1},i.isTraditionalAnchor=function(n){return!/[\/\?\.]/.test(n)},i.extractState=function(n,t){var r=null,u,f;return t=t||!1,u=i.extractId(n),u&&(r=i.getStateById(u)),r||(f=i.getFullUrl(n),u=i.getIdByUrl(f)||!1,u&&(r=i.getStateById(u)),!r&&t&&!i.isTraditionalAnchor(n)&&(r=i.createStateObject(null,null,f))),r},i.getIdByUrl=function(n){return i.urlToId[n]||i.store.urlToId[n]||t},i.getLastSavedState=function(){return i.savedStates[i.savedStates.length-1]||t},i.getLastStoredState=function(){return i.storedStates[i.storedStates.length-1]||t},i.hasUrlDuplicate=function(n){var r=!1,t;return t=i.extractState(n.url),r=t&&t.id!==n.id,r},i.storeState=function(n){return i.urlToId[n.url]=n.id,i.storedStates.push(i.cloneObject(n)),n},i.isLastSavedState=function(n){var t=!1,r,u,f;return i.savedStates.length&&(r=n.id,u=i.getLastSavedState(),f=u.id,t=r===f),t},i.saveState=function(n){return i.isLastSavedState(n)?!1:(i.savedStates.push(i.cloneObject(n)),!0)},i.getStateByIndex=function(n){var t=null;return t=typeof n=="undefined"?i.savedStates[i.savedStates.length-1]:n<0?i.savedStates[i.savedStates.length+n]:i.savedStates[n],t},i.getCurrentIndex=function(){var n=null;return n=i.savedStates.length<1?0:i.savedStates.length-1,n},i.getHash=function(n){var r=i.getLocationHref(n),t;return t=i.getHashByUrl(r),t},i.unescapeHash=function(n){var t=i.normalizeHash(n);return t=decodeURIComponent(t),t},i.normalizeHash=function(n){return n.replace(/[^#]*#/,"").replace(/#.*/,"")},i.setHash=function(n,t){var u,f;return t!==!1&&i.busy()?(i.pushQueue({scope:i,callback:i.setHash,args:arguments,queue:t}),!1):(i.busy(!0),u=i.extractState(n,!0),u&&!i.emulated.pushState?i.pushState(u.data,u.title,u.url,!1):i.getHash()!==n&&(i.bugs.setHash?(f=i.getPageUrl(),i.pushState(null,null,f+"#"+n,!1)):r.location.hash=n),i)},i.escapeHash=function(t){var r=i.normalizeHash(t);return r=n.encodeURIComponent(r),i.bugs.hashEscape||(r=r.replace(/\%21/g,"!").replace(/\%26/g,"&").replace(/\%3D/g,"=").replace(/\%3F/g,"?")),r},i.getHashByUrl=function(n){var t=String(n).replace(/([^#]*)#?([^#]*)#?(.*)/,"$2");return t=i.unescapeHash(t),t},i.setTitle=function(n){var t=n.title,u;t||(u=i.getStateByIndex(0),u&&u.url===n.url&&(t=u.title||i.options.initialTitle));try{r.getElementsByTagName("title")[0].innerHTML=t.replace("<","&lt;").replace(">","&gt;").replace(" & "," &amp; ")}catch(f){}return r.title=t,i},i.queues=[],i.busy=function(n){if(typeof n!="undefined"?i.busy.flag=n:typeof i.busy.flag=="undefined"&&(i.busy.flag=!1),!i.busy.flag){c(i.busy.timeout);var t=function(){var n,r,u;if(!i.busy.flag)for(n=i.queues.length-1;n>=0;--n)(r=i.queues[n],r.length!==0)&&(u=r.shift(),i.fireQueueItem(u),i.busy.timeout=h(t,i.options.busyDelay))};i.busy.timeout=h(t,i.options.busyDelay)}return i.busy.flag},i.busy.flag=!1,i.fireQueueItem=function(n){return n.callback.apply(n.scope||i,n.args||[])},i.pushQueue=function(n){return i.queues[n.queue||0]=i.queues[n.queue||0]||[],i.queues[n.queue||0].push(n),i},i.queue=function(n,t){return typeof n=="function"&&(n={callback:n}),typeof t!="undefined"&&(n.queue=t),i.busy()?i.pushQueue(n):i.fireQueueItem(n),i},i.clearQueue=function(){return i.busy.flag=!1,i.queues=[],i},i.stateChanged=!1,i.doubleChecker=!1,i.doubleCheckComplete=function(){return i.stateChanged=!0,i.doubleCheckClear(),i},i.doubleCheckClear=function(){return i.doubleChecker&&(c(i.doubleChecker),i.doubleChecker=!1),i},i.doubleCheck=function(n){return i.stateChanged=!1,i.doubleCheckClear(),i.bugs.ieDoubleCheck&&(i.doubleChecker=h(function(){return i.doubleCheckClear(),i.stateChanged||n(),!0},i.options.doubleCheckInterval)),i},i.safariStatePoll=function(){var r=i.extractState(i.getLocationHref()),t;if(!i.isLastSavedState(r))return t=r,t||(t=i.createStateObject()),i.Adapter.trigger(n,"popstate"),i},i.back=function(n){return n!==!1&&i.busy()?(i.pushQueue({scope:i,callback:i.back,args:arguments,queue:n}),!1):(i.busy(!0),i.doubleCheck(function(){i.back(!1)}),s.go(-1),!0)},i.forward=function(n){return n!==!1&&i.busy()?(i.pushQueue({scope:i,callback:i.forward,args:arguments,queue:n}),!1):(i.busy(!0),i.doubleCheck(function(){i.forward(!1)}),s.go(1),!0)},i.go=function(n,t){var r;if(n>0)for(r=1;r<=n;++r)i.forward(t);else{if(!(n<0))throw new Error("History.go: History.go requires a positive or negative integer passed.");for(r=-1;r>=n;--r)i.back(t)}return i},i.emulated.pushState){var y=function(){};i.pushState=i.pushState||y;i.replaceState=i.replaceState||y}else i.onPopState=function(t,r){var e=!1,u=!1,o,f;return i.doubleCheckComplete(),o=i.getHash(),o?(f=i.extractState(o||i.getLocationHref(),!0),f?i.replaceState(f.data,f.title,f.url,!1):(i.Adapter.trigger(n,"anchorchange"),i.busy(!1)),i.expectedStateId=!1,!1):(e=i.Adapter.extractEventData("state",t,r)||!1,u=e?i.getStateById(e):i.expectedStateId?i.getStateById(i.expectedStateId):i.extractState(i.getLocationHref()),u||(u=i.createStateObject(null,null,i.getLocationHref())),i.expectedStateId=!1,i.isLastSavedState(u)?(i.busy(!1),!1):(i.storeState(u),i.saveState(u),i.setTitle(u),i.Adapter.trigger(n,"statechange"),i.busy(!1),!0))},i.Adapter.bind(n,"popstate",i.onPopState),i.pushState=function(t,r,u,f){if(i.getHashByUrl(u)&&i.emulated.pushState)throw new Error("History.js does not support states with fragement-identifiers (hashes/anchors).");if(f!==!1&&i.busy())return i.pushQueue({scope:i,callback:i.pushState,args:arguments,queue:f}),!1;i.busy(!0);var e=i.createStateObject(t,r,u);return i.isLastSavedState(e)?i.busy(!1):(i.storeState(e),i.expectedStateId=e.id,s.pushState(e.id,e.title,e.url),i.Adapter.trigger(n,"popstate")),!0},i.replaceState=function(t,r,u,f){if(i.getHashByUrl(u)&&i.emulated.pushState)throw new Error("History.js does not support states with fragement-identifiers (hashes/anchors).");if(f!==!1&&i.busy())return i.pushQueue({scope:i,callback:i.replaceState,args:arguments,queue:f}),!1;i.busy(!0);var e=i.createStateObject(t,r,u);return i.isLastSavedState(e)?i.busy(!1):(i.storeState(e),i.expectedStateId=e.id,s.replaceState(e.id,e.title,e.url),i.Adapter.trigger(n,"popstate")),!0};if(f){try{i.store=u.parse(f.getItem("History.store"))||{}}catch(p){i.store={}}i.normalizeStore()}else i.store={},i.normalizeStore();i.Adapter.bind(n,"unload",i.clearAllIntervals);i.saveState(i.storeState(i.extractState(i.getLocationHref(),!0)));f&&(i.onUnload=function(){var n,t,r;try{n=u.parse(f.getItem("History.store"))||{}}catch(o){n={}}n.idToState=n.idToState||{};n.urlToId=n.urlToId||{};n.stateToId=n.stateToId||{};for(t in i.idToState)i.idToState.hasOwnProperty(t)&&(n.idToState[t]=i.idToState[t]);for(t in i.urlToId)i.urlToId.hasOwnProperty(t)&&(n.urlToId[t]=i.urlToId[t]);for(t in i.stateToId)i.stateToId.hasOwnProperty(t)&&(n.stateToId[t]=i.stateToId[t]);i.store=n;i.normalizeStore();r=u.stringify(n);try{f.setItem("History.store",r)}catch(e){if(e.code!==DOMException.QUOTA_EXCEEDED_ERR)throw e;f.length&&(f.removeItem("History.store"),f.setItem("History.store",r))}},i.intervalList.push(l(i.onUnload,i.options.storeInterval)),i.Adapter.bind(n,"beforeunload",i.onUnload),i.Adapter.bind(n,"unload",i.onUnload));i.emulated.pushState||(i.bugs.safariPoll&&i.intervalList.push(l(i.safariStatePoll,i.options.safariPollInterval)),(o.vendor==="Apple Computer, Inc."||(o.appCodeName||"")==="Mozilla")&&(i.Adapter.bind(n,"hashchange",function(){i.Adapter.trigger(n,"popstate")}),i.getHash()&&i.Adapter.onDomLoad(function(){i.Adapter.trigger(n,"hashchange")})))};(!i.options||!i.options.delayInit)&&i.init()}(window),function(){function t(n){var t,i;if(typeof n.length!="number"||n.length===0)return[];t=[];for(i in n[0])t.push({headerText:i,rowText:i});return t}ko.simpleGrid={viewModel:function(n){this.data=n.data;this.currentPageIndex=ko.observable(0);this.pageSize=n.pageSize||5;this.columns=n.columns||t(ko.utils.unwrapObservable(this.data));this.itemsOnCurrentPage=ko.computed(function(){var n=this.pageSize*this.currentPageIndex();return this.data.slice(n,n+this.pageSize)},this);this.maxPageIndex=ko.computed(function(){return Math.ceil(ko.utils.unwrapObservable(this.data).length/this.pageSize)-1},this)}};var n=new ko.nativeTemplateEngine;n.addTemplate=function(n,t){document.write("<script type='text/html' id='"+n+"'>"+t+"<\/script>")};n.addTemplate("ko_simpleGrid_grid",'                    <table class="ko-grid" cellspacing="0">                        <thead>                            <tr data-bind="foreach: columns">                               <th data-bind="text: headerText"><\/th>                            <\/tr>                        <\/thead>                        <tbody data-bind="foreach: itemsOnCurrentPage">                           <tr data-bind="foreach: $parent.columns">                               <td data-bind="text: typeof rowText == \'function\' ? rowText($parent) : $parent[rowText] "><\/td>                            <\/tr>                        <\/tbody>                    <\/table>');n.addTemplate("ko_simpleGrid_pageLinks",'                    <div class="ko-grid-pageLinks">                        <span>Page:<\/span>                        <!-- ko foreach: ko.utils.range(0, maxPageIndex) -->                               <a href="#" data-bind="text: $data + 1, click: function() { $root.currentPageIndex($data) }, css: { selected: $data == $root.currentPageIndex() }">                            <\/a>                        <!-- /ko -->                    <\/div>');ko.bindingHandlers.simpleGrid={init:function(){return{controlsDescendantBindings:!0}},update:function(t,i,r){for(var u=i(),f=r(),e;t.firstChild;)ko.removeNode(t.firstChild);var o=f.simpleGridTemplate||"ko_simpleGrid_grid",s=f.simpleGridPagerTemplate||"ko_simpleGrid_pageLinks",h=t.appendChild(document.createElement("DIV"));ko.renderTemplate(o,u,{templateEngine:n},h,"replaceNode");e=t.appendChild(document.createElement("DIV"));ko.renderTemplate(s,u,{templateEngine:n},e,"replaceNode")}}}(),function(n){typeof define=="function"&&define.amd?define(["jquery"],n):typeof exports=="object"?n(require("jquery")):n(jQuery)}(function(n){function i(n){return t.raw?n:encodeURIComponent(n)}function f(n){return t.raw?n:decodeURIComponent(n)}function e(n){return i(t.json?JSON.stringify(n):String(n))}function o(n){n.indexOf('"')===0&&(n=n.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return n=decodeURIComponent(n.replace(u," ")),t.json?JSON.parse(n):n}catch(i){}}function r(i,r){var u=t.raw?i:o(i);return n.isFunction(r)?r(u):u}var u=/\+/g,t=n.cookie=function(u,o,s){var y,a,h,v,c,p;if(o!==undefined&&!n.isFunction(o))return s=n.extend({},t.defaults,s),typeof s.expires=="number"&&(y=s.expires,a=s.expires=new Date,a.setTime(+a+y*864e5)),document.cookie=[i(u),"=",e(o),s.expires?"; expires="+s.expires.toUTCString():"",s.path?"; path="+s.path:"",s.domain?"; domain="+s.domain:"",s.secure?"; secure":""].join("");for(h=u?undefined:{},v=document.cookie?document.cookie.split("; "):[],c=0,p=v.length;c<p;c++){var w=v[c].split("="),b=f(w.shift()),l=w.join("=");if(u&&u===b){h=r(l,o);break}u||(l=r(l))===undefined||(h[b]=l)}return h};t.defaults={};n.removeCookie=function(t,i){return n.cookie(t)===undefined?!1:(n.cookie(t,"",n.extend({},i,{expires:-1})),!n.cookie(t))}})